Routing for Isolation Segments

Page last updated:

This topic describes how operators can configure and manage routing for isolation segments. Operators can deploy an additional set of routers for each isolation segment to handle requests for applications within the segment. This topic includes the following sections:

For more information about how isolation segments work, see the Isolation Segments section of the Understanding Cloud Foundry Security topic. For more information about creating isolation segments, see the Installing PCF Isolation Segment topic.

Note: The instructions in this topic assume you are using Google Cloud Platform (GCP). The procedures may differ on other IaaSes, but the concepts should be transferable.


Isolation segments isolate the compute resources for one group of applications from another. However, these applications still share the same network resources. Requests for applications on all isolation segments, as well as for system components, transit the same load balancers and Cloud Foundry routers.

A shared Isolation Segment is the default isolation segment assigned to every org and space. This can be overwritten by assigning an explicit default for an organization. For more information about creating isolation segments, see the Installing PCF Isolation Segment topic.

The illustration below shows isolation segments sharing the same network resources.

Routing is

Operators who want to prevent all isolation segments and system components from using the same network resources can deploy an additional set of routers for each isolation segment:

Is distinct domains

Use cases include:

  • Requests for applications in an isolation segment must not share networking resources with requests for other applications.
  • The Cloud Foundry management plane should only be accessible from a private network. As multiple IaaS load balancers cannot typically share the same pool of backends, such as Cloud Foundry routers, each load balancer requires an additional deployment of routers.

Step 1: Create Networks

Create a network or subnet for each isolation segment on your infrastructure

As an example, an operator who wants one shared isolation segment and one private segment could create one network named sample-network with two subnets named sample-subnet-shared, sample-subnet-is1.

The following diagram describes the network topology:

IaaS network: sample-network
  |_____ IaaS subnet: sample-subnet-shared
  |_____ IaaS subnet: sample-subnet-is1

Subnets do not generally span IaaS availability zones, so the same operator with two availability zones will need four subnets

IaaS network: sample-network
|_____ IaaS subnet: sample-subnet-shared-az1
|_____ IaaS subnet: sample-subnet-shared-az2
|_____ IaaS subnet: sample-subnet-is1-az1
|_____ IaaS subnet: sample-subnet-is1-az2

For more information about networks and subnets in GCP, see the Using Networks and Firewalls topic in the GCP documentation.

Step 2: Configure Networks for Routers

To configure the subnets with Bosh, use Bosh Cloud Config subnets. Each subnet in the IaaS should correspond to a Bosh subnet that is labeled with the correct isolation segment

Navigate to the Assign AZs and Networks section of the PCF Isolation Segment tile to assign your isolation segment to the network you created in Step 1. See the Installing PCF Isolation Segment topic for more information.

Step 3: Configure Additional Routers

Navigate to the Resource Config section of the PCF Isolation Segment tile and use the dropdown menu to set your Router instances to a number greater than zero. See the Installing PCF Isolation Segment topic for more information.

Step 4: Add Routers to Load Balancer

If your IaaS supports it, navigate to the Resource Config section of the PCF Isolation Segment tile and enter the name of your load balancer under Load Balancers. See the documentation specific to your IaaS in Installing Pivotal Cloud Foundry for more information. If your IaaS does not support this configuration, you must create static IP addresses and assign them to your load balancer out of band.

Step 5: Configure DNS and Load Balancers

Create a separate domain name for each router instance group, and configure DNS to resolve these domain names to a load balancer that routes requests to the matching routers.

Note: You must configure your load balancers to forward requests for a given domain to one router instance group only.

As router instance groups may be responsible for separate isolation segments, and an application may be deployed to only one isolation segment, requests should only reach a router that has access to the applications for that domain name. Load balancing requests for a domain across more than router instance group can result in request failures unless all the router instance groups have access to the isolation segments where applications for that domain are deployed.

Shared Domain Name

It is a common requirement for applications on separate isolation segments to be accessible at domain names that share a domain, such as To achieve this configuration while also obeying the guideline for forwarding requests for a domain to only one router instance group, create a new Cloud Foundry domain for a needed subdomain, such as *

The diagrams illustrate a topology with separate load balancers, but you could also use one load balancer with multiple interfaces. In this configuration:

  • Requests for system domain * and the shared domain * are forwarded to the routers for the shared isolation segment.
  • Requests for private domain * are forwarded to the routers for IS1. Requests for private domain * are forwarded to the routers for IS2.

Is sharing domains

Step 6: Configure Firewall Rules

Configure firewall rules to allow necessary traffic between the shared isolation segments (sample-shared-is) and the private isolation segments (sample-is1). Assuming a default deny-all rule, these rules should prevent a request with a spoofed Host header from being forwarded by a router to an application in another isolation segment. Firewall rules are specific to each IaaS, so the exact definition of Source and Destination depends on the IaaS. For example, on GCP a Source is a subnet and a Destination is a tag. On AWS, both Source and Destination are security groups.

Rule Name Source Allowed Protocols/Ports Destination Reason
shared-to-bosh sample-shared-is tcp sample-bosh BOSH Agent on VMs in sample-shared-is to reach BOSH Director
bosh-to-shared sample-bosh tcp sample-shared-is BOSH director to control VMs in sample-shared-is
shared-internal sample-shared-is tcp sample-shared-is VMs within sample-shared-is to reach one another
shared-to-is1 sample-shared-is tcp:1801,8853 sample-is1 Diego BBS in sample-shared-is to reach Cells in sample-is1
is1-to-bosh sample-is1 tcp:22,6868,25555,
sample-bosh BOSH agent on VMs in sample-is1 to reach BOSH Director
bosh-to-is1 sample-bosh tcp sample-is1 BOSH director to control VMs in sample-is1
is1-internal sample-is1 tcp sample-is1 VMs within sample-is1 to reach one another
is1-to-shared sample-is1 tcp:3000,3457,4003

See Port Reference Table for information about the processes that use these ports and their corresponding manifest properties.
sample-shared-is Diego Cells in sample-is1 to reach BBS, Auctioneer, and CredHub in sample-shared-is, Metron Agent to reach Traffic Controller, and Routers to reach NATS, UAA, and Routing API

Note: If Diego cells need to download buildpacks to stage applications, it is also neccessary to allow outbound traffic from all Diego cells.

For more information consult the following topics:

  • The bosh-deployment GitHub repository contains documentation describing ports used by agents to communicate with BOSH.
  • The “Using Subnetworks” topic in the GCP documentation describes networks and firewall rules in the “Isolation of Subnetworks” section.

Port Reference Table

See the following table to understand which protocols and ports map to which processes and manifest properties for the is1-to-shared rule above.

Protocol Port Process Manifest Property
tcp 3000 Routing API routing_api.port
tcp 3457 Doppler metron_endpoint.dropsonde_port
tcp 4003 VXLAN Policy Agent cf_networking.policy_server.internal_listen_port
tcp 4103 Silk Controller cf_networking.silk_controller.listen_port
tcp 4222 NATS router.nats.port
tcp 8080 Diego file server diego.file_server.listen_addr
tcp 8082 Doppler gRPC loggregator.doppler.grpc_port
tcp 8083 Reverse Log Proxy Gateway (cf auth proxy) loggregator.reverse_log_proxy_gateway_cf_auth_proxy.proxy_port
tcp 8443 UAA uaa.ssl.port
tcp 8844 CredHub credhub.port
tcp 8853 BOSH DNS health health.server.port from bosh-dns-release
tcp 8889 Diego BBS diego.rep.bbs.api_location
tcp 8891 Diego Database (Locket) diego.locket.listen_addr
tcp 9022 CC stager
tcp 9023 CC TPS
tcp 9090 CC uploader http_port
tcp 9091 CC uploader https_port

Additional GCP Information

For more information, see the following:

Sharding Routers for Isolation Segments

You can configure router sharding for isolation segments depending on your use case:

Use Case Description How to Configure
Securing apps that run in an isolation segment To provide security guarantees in addition to the firewall rules described above, you can configure sharding of the Gorouter’s routing table, resulting in a router dedicated for an isolation segment having knowledge only of routes for applications in the same isolation segment.
  1. In the Networking configuration pane of the Pivotal Application Service (PAS) tile, select the checkbox labeled Routers reject requests for Isolation Segments.
  2. Set the Router Sharding Mode in the isolation segment tile to Isolation Segment Only.
Deploying additional routers for PAS The flexibility of the configuration also supports deployment of a router that excludes all isolation segments.
  1. In the Networking configuration pane of the PAS tile, select the checkbox labeled Routers reject requests for Isolation Segments.
  2. Set the Router Sharding Mode in the isolation segment tile to No isolation Segment.

Note: For compute isolation only, you can leave the Routers reject requests for isolation segments checkbox unselected in the PAS Networking pane. This is the default setting, which does not require any additional routers for the Isolation Segment tile.

Metrics for Routers Associated with Isolation Segments

For metrics emitted by the Gorouter, metrics can be distinguished by the name of the job. For example, the following line is a metric emitted on uptime:

origin:"gorouter" eventType:ValueMetric timestamp:1491338040750977602 deployment:"" job:"router_is1" index:"9a4b639c-8f0e-4b2b-b332-4161ee4646e6" ip:"" valueMetric:<name:"uptime" value:118 unit:"seconds" >
Create a pull request or raise an issue on the source for this page in GitHub