Change Segment IDs in NSX to Avoid Overlapping

Use case: Often with a standalone NSX deployment a segment ID range of 5000-5999 is used. This same range may be used across multiple sites but once you want to start leveraging cross-vCenter NSX functionality you will want to have different segment ID’s (as an example, 5000-5999 at site 1, 6000-6999 at site 2 and 10000-109999 for Universal). In this post we will walk through the process of changing the segment ID’s at the secondary site.

We will be using the API for this, so you will want to have Postman or similar on your laptop.

In my example the NSX manager in the environment I am changing my segment IDs is nsxmgr-01a.corp.local you’ll want to update with the appropriate FQDN for your environment.

  1. Click the dropdown and select Basic Auth
  2. Enter the NSX Manager credentials, the username will be admin
  3. Enter https://nsxmgr-01a.corp.local/api/2.0/vdn/config/segments as the address
  4. Click the dropdown and choose POST
  5. Click the Update Request button

  1. Click on the Headers tab
  2. Add a new row for Content-Type with a value of application/xml

  1. Click on the Body tab
  2. Click on the raw radio button
  3. Type the following in for the body of the request

4. Click the Send button

  1. Click the drop down and select GET
  2. Click the Send button

  1. Here is the original Segment ID range that we are going to change
  2. Here is the new Segment ID range we just added, note the <id> value, in this case 7, we will need that later

Now we just need to get the IDs of theLogical Switches we want to reconfigure from a 5xxx segment to a 6xxx segment. For that, we can go into the vSphere Web Client.

  1. Click on Logical Switches in Networking & Security
  2. Here we can see the current segment ID is 5000, double click on the Logical Switch

  1. This is the virtualwire ID we will need for the next step to reconfigure the segment ID.

  1. Click the dropdown box and select PUT
  2. Enter the address in using the virtualwire-<id> we found in the previous step as well as the segment ID for the new range we found before (in this example it was 7).
  3. Click Send

Refresh in Logical Switches and we can see the Segment ID has changed from 5000 to 6000

3 comments On Change Segment IDs in NSX to Avoid Overlapping

  • Hi Mike! Thanks for this! Any clue as to how to reflect this segment id pool change in vsphere client as it still displays the legacy pool, which can be quite confusing. Thanks!

    • Is it possible your browser has cached the old IDs? It’s been quite a while since I went through this but I feel like it did update in the UI when I went through this.

      • Unfortunately, not. I’ve just been told by GSS that this procedure is not supported. They have also said that they have had some cases of PSOD after reverting the API changes to the original. They are now analysing the management db and controller logs in order to ascertain the reverting strategy. They were appreciate the fact that the API call exist for it and it should either be removed or an official kb released to support this change. Nothing in the pipeline at this stage. Thanks!

Leave a reply:

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Site Footer