Changing segment or multicast range in NSX Data Center for vSphere
search cancel

Changing segment or multicast range in NSX Data Center for vSphere

book

Article ID: 325138

calendar_today

Updated On:

Products

VMware NSX Networking

Issue/Introduction

This article provides information on how to change segment range and multicast range in NSX Data Center for vSphere. 
You might need a change in segment or multicast range when two single sites with overlapping segment or multicast range need to be brought into a cross-vCenter NSX setup. 

Important: If you have NSX Data Center for vSphere 6.4.3 or earlier installed, and you have distributed logical routers deployed, you must contact VMware Customer Support for assistance with this task. 

If you have NSX Data Center for vSphere 6.4.4 or later installed, you can follow the instructions in this article. 

Notes
  • The introduction of multiple VNI pools as described in this article should only be a temporary solution. In addition, VMware does not support an upgrade in this state.
  • When determining the size of each segment ID pool, keep in mind that the segment ID range controls the number of logical switches that can be created. Choose a small subset of the 16 million potential VNIs. You should not configure more than 10,000 VNIs in a single vCenter Server because vCenter limits the number of dvPortgroups to 10,000.
  • If VXLAN is in place in another NSX deployment, consider which VNIs are already in use and avoid overlapping VNIs. Non-overlapping VNIs are automatically enforced within a single NSX Manager and vCenter Server environment. Local VNI ranges cannot be overlapping. However, it's important for you make sure that VNIs do not overlap in your separate NSX deployments. Non-overlapping VNIs are useful for tracking purposes and helps to ensure that your deployments are ready for a cross-vCenter environment.


Environment

VMware NSX for vSphere 6.4.x
VMware NSX for vSphere 6.3.x

Resolution

Resolving overlapping segment ranges and move logical switches:
  1. Create a new non overlapping Segment Range: 
     
    For example: 
     
    POST https://<NSXMGR_IP>/api/2.0/vdn/config/segments 
    <segmentRange> 
    <name>Segment ID Pool 2</name> 
    <begin>7000</begin> 
    <end>7999</end> 
    </segmentRange> 
      
    # Note the segment range “id” (lets call it newRangeId) returned in response payload. 
      
    # GET segments will also return segment range "id", 
    GET https://<nsxmgr-ip>/api/2.0/vdn/config/segments 
    <segmentRanges> 
        <segmentRange> 
            <id>4</id> 
            <name> Segment ID Pool 2</name>        
            <begin>7000</begin> 
            <end>7999</end> 
            <isUniversal>false</isUniversal> 
            <universalRevision>0</universalRevision> 
        </segmentRange> 
    <segmentRanges>

     
  2. Shutdown or disconnect VNIC from the dvpg (LogicalSwitch).
  3. Move each logical switch from the old segment range to new segment range. This API needs virtualwire-id and rangeId as inputs. API payload is empty: 
     
    For example: 
     
    PUT https://<NSXMGR_IP>/api/2.0/vdn/virtualwires/<virtualwire-id>/segmentreconfig/<newRangeId> 
  4. To resolve overlapping multicast ranges and move logical switches:

    Create a new non overlapping multicast Range: 
     
    For example: 
     
    POST https://<NSXMGR_IP>/api/2.0/vdn/config/multicasts 
    <multicastRange> 

      <name>Range 2</name> 

      <begin>237.0.0.0</begin> 

      <end>237.255.255.255</end> 

    </multicastRange> 
     
    # Note the multicast range “id” (lets call it newRangeId) returned in response payload. 
      
    # GET multicasts will also return multicast range id, 
    GET https://<nsxmgr-ip>/api/2.0/vdn/config/multicasts 
     
    <multicastRanges> 

        <multicastRange> 

            <id>3</id> 

            <name>Range 2</name> 

            <begin>237.0.0.0</begin> 

            <end>237.255.255.255</end> 

            <isUniversal>false</isUniversal> 

            <universalRevision>0</universalRevision> 

        </multicastRange> 

    </multicastRanges>

     
  5. Shutdown or disconnect VNIC from the dvpg (LogicalSwitch).
  6. Move each logical switch from the old multicast range to new multicast range. This API needs virtualwire-id and newRangeId as inputs. API payload is empty: 
     
    For example: 
     
    PUT https://<NSXMGR_IP>/api/2.0/vdn/virtualwires/<virtualwire-id>/multicastreconfig/<newRangeId> 
Move each distributed logical router to the new segment or multicast range.

If you are using segments, use the following API: 

POST https://<NSXMGR_IP>/api/4.0/edges/{edge-id}?action=vdridreconfig&vdnRangeId=<newRangeId> 

To delete the old segment range: 
 
For example: 
 
DELETE https://<NSXMGR_IP>/api/2.0/vdn/config/segments/<oldRangeId> 
 
For more information on overlapping segment ranges, see the Cross vCenter NSX Installation Guide

If you are using multicast, use the following API: 

POST https://<NSXMGR_IP>//api/4.0/edges/{edge-id}?action=vdridreconfig&multicastRangeId=<newRangeId>

To delete the old multicast range: 
 
For example: 
 
DELETE https://<NSXMGR_IP>/api/2.0/vdn/config/multicasts/<oldRangeId>