Pivotal Knowledge Base

Follow

How to Update TCP Routing reservable_ports Range via the CF CLI

Environment

Pivotal Cloud Foundry (PCF) Version 1.8
Component- Elastic Runtime

Purpose

PCF version 1.8 supports TCP Routing which can be enabled or configured at Ops Manager > Pivotal Elastic Runtime > Advanced Features. Currently, TCP Routing reservable_ports range only applies the first time you specify it. If you later want to update the range, you must do so with the cf CLI. These commands require an admin user with the routing.router_groups.read and routing.router_groups.write scopes.

Procedure

Follow the steps below to updates TCP Routing reservable_ports vi cf CLI:

  1. In a terminal window, run cf curl /routing/v1/router-groups to view the reservable_ports
    $ cf curl -X GET /routing/v1/router_groups
    [
       {
          "guid": "f88eb253-045e-4c27-657a-c0e8bd4a0878",
          "name": "default-tcp",
          "type": "tcp",
          "reservable_ports": "1024-65535"
       }
    ]
    
  2. Update the reservable_ports
    $ cf curl /routing/v1/router_groups/f88eb253-045e-4c27-657a-c0e8bd4a0878 -X PUT -d '{"reservable_ports":"1024-65534"}'
    {
       "guid": "f88eb253-045e-4c27-657a-c0e8bd4a0878",
       "name": "default-tcp",
       "type": "tcp",
       "reservable_ports": "1024-65534"
    }
    
  3. Confirm reservable_ports were updated
    $ cf curl -X GET /routing/v1/router_groups
    [
       {
          "guid": "f88eb253-045e-4c27-657a-c0e8bd4a0878",
          "name": "default-tcp",
          "type": "tcp",
          "reservable_ports": "1024-65534"
       }
    ]

Additional Information

Updating reservable_ports range via Ops Manager dashboard will be possible in the future patch release. Please refer details of TCP routing of Pivotal CF at Pivotal Cloud Foundry docs.

Comments

Powered by Zendesk