After you save a segment with DHCP configuration, you must be careful about changing the connectivity of the segment.
Segment connectivity changes are allowed only when the segments and gateways belong to the same transport zone.
The following scenarios explain the segment connectivity changes that are allowed or disallowed, and whether DHCP is impacted in each of these scenarios.
Scenario 1: Move a Routed Segment with Gateway DHCP Server to a Different Gateway
Consider that you have added a segment and connected it either to a tier-0 or tier-1 gateway. You configured Gateway DHCP server on this segment, saved the segment, and connected workloads to this segment. DHCP service is now used by the workloads on this segment.
- Starting in NSX-T Data Center 3.0.2, this change is allowed. However, when you save the segment, an information message alerts you that changing the gateway connectivity impacts the existing DHCP leases, which are assigned to the workloads.
- In NSX-T Data Center 3.0 and 3.0.1, you cannot change the connectivity of the segment from one gateway to another gateway when the segment uses a Gateway DHCP server. Use the following steps in the workaround:
- Temporarily disconnect the existing segment from the gateway, or delete the segment. Temporary disconnection of the segment is supported only with the API. Follow these steps:
- Retrieve the segment details by running the following GET API:
GET https://{NSXManager_IP}/policy/api/v1/infra/segments/{segment-id}
Replace segment-id with the actual ID of the segment that you want to disconnect from the gateway.
- Observe that the advanced_config section in the API output shows connectivity:"ON".
- Copy the GET API output in a text file and edit connectivity to OFF. Paste the complete API output in the request body of the following PATCH API:
PATCH https://{NSXManager_IP}/policy/api/v1/infra/segments/{segment-id}
- Run the PATCH API to disconnect the segment.
- Retrieve the segment details by running the following GET API:
- Add a new segment.
- Connect this new segment to the gateway of your choice.
Scenario 2: Move a Routed Segment with Local DHCP Server or Relay to a Different Gateway
Consider that you have added a segment and connected it either to a tier-0 or tier-1 gateway. You configured local DHCP server or DHCP relay on this segment, saved the segment, and connected workloads to this segment. DHCP service is now used by the workloads on this segment.
Later, you decide to change the connectivity of this segment to another tier-0 or tier-1 gateway, which is in the same transport zone. This change is allowed. As the DHCP server is local to the segment, the DHCP configuration settings, including ranges, static bindings, and DHCP options are retained on the segment. The DHCP leases of the workloads are retained and there is no loss of network connectivity.
After the segment is moved to a new gateway, you can continue to update the DHCP configuration settings, and other segment properties.
- If you are using NSX-T Data Center 3.0 or 3.0.1, you cannot change the DHCP type and DHCP profile of a routed segment after moving the segment to a different gateway. For example, you cannot change the DHCP type from a local DHCP server or a DHCP relay to a Gateway DHCP server. In addition, you cannot select a different DHCP server profile or relay profile in the segment. But, you can edit the properties of the DHCP profile, if needed.
- Starting in version 3.0.2, you can change the DHCP type and DHCP profile of a routed segment after moving the segment to a different gateway.
Scenario 3: Move a Standalone Segment with Local DHCP Server to a Tier-0 or Tier-1 Gateway
Consider that you have added a segment with None connectivity in your network. You have configured local DHCP server on this segment, saved the segment, and connected workloads to this segment. DHCP service is now used by the workloads on this segment.
Later, you decide to connect this segment either to a tier-0 or tier-1 gateway, which is in the same transport zone. This change is allowed. As a local DHCP server existed on the segment, the DHCP configuration settings, including ranges, static bindings, and DHCP options are retained on the segment. The DHCP leases of the workloads are retained and there is no loss of network connectivity.
After the segment is connected to the gateway, you can continue to update the DHCP configuration settings, and other segment properties. However, you cannot select a different DHCP type and the DHCP profile in the segment. For example, you cannot change the DHCP type from a local DHCP server to a Gateway DHCP server or a DHCP relay. In addition, you cannot change the DHCP server profile in the segment. But, you can edit the properties of the DHCP profile, if needed.
Scenario 4: Move a Standalone Segment Without DHCP Configuration to a Tier-0 or Tier-1 Gateway
Consider that you have added a segment with None connectivity in your network. You have not configured DHCP on this segment, saved the segment, and connected workloads to this segment.
Later, you decide to connect this segment either to a tier-0 or tier-1 gateway, which is in the same transport zone. This change is allowed. As no DHCP configuration existed on the segment, the segment automatically uses the Gateway DHCP server after it is connected to the gateway. The DHCP profile attached to this gateway gets autoselected in the segment.
Now, you can specify the DHCP configuration settings, including ranges, static bindings, and DHCP options on the segment. You can also edit the other segment properties, if necessary. However, you cannot change the DHCP type from a Gateway DHCP server to a local DHCP server or a DHCP relay.
Remember, you can configure only a Gateway DHCPv4 server on the segment. In NSX-T Data Center 3.0, Gateway DHCPv6 server is not supported.
Scenario 5: Move a Segment with Tier-0 or Tier-1 Connectivity to None Connectivity
Consider that you have added a segment to a tier-0 or tier-1 gateway in your network. You have configured Gateway DHCP server or DHCP relay on this segment, saved the segment, and connected workloads to this segment. DHCP service is now used by the workloads on this segment.
Later, you decide to change the connectivity of this segment to None. This change is not allowed.
- Temporarily disconnect the existing segment from the gateway or delete the segment.
For information about temporarily disconnecting a segment from the gateway, see Scenario 1.
- Add a new segment with a None connectivity.
- Configure a local DHCP server on this standalone segment, if needed.