You can add multiple DHCP server profiles in your network. Further, you can attach a single DHCP server profile to multiple DHCP servers.

Prerequisites

  • Edge nodes are deployed in the network.
  • Edge cluster is added in the network.

Procedure

  1. From your browser, log in with admin privileges to an NSX Manager at https://<nsx-manager-ip-address>.
  2. Select Networking > IP Management > DHCP.
  3. Click Add DHCP Profile.
  4. Enter a unique name to identify the DHCP server profile.
  5. In the Profile Type drop-down menu, select DHCP Server.
  6. (Optional) Enter the IP address of the DHCP server in a CIDR format.
    Note: A maximum of two DHCP server IP addresses are supported. You can enter one IPv4 address and one IPv6 address. For an IPv4 address, the prefix length must be <= 30, and for an IPv6 address, the prefix length must be <= 126. The DHCP server IP address must not overlap with the addresses used in DHCP ranges and DHCP static binding.

    If no server IP address is specified, 100.96.0.1/30 is autoassigned to the DHCP server.

    The server IP address cannot be any of the following:
    • Multicast IP address
    • Broadcast IP address
    • Loopback IP address
    • Unspecified IP address (address with all zeroes)
  7. (Optional) Edit the lease time in seconds. The default value is 86400.
    Valid range of values is 60–4294967295.
  8. Select an Edge cluster.
    Follow these guidelines:
    • If you are using a Local DHCP server on a segment, you must select an edge cluster in the DHCP server profile. If an edge cluster is unavailable in the profile, an error message is displayed when you save the segment.
    • If you are using a Gateway DHCP server on the segment, select an edge cluster either in the gateway, or DHCP server profile, or both. If an edge cluster is unavailable in either the profile or the gateway, an error message is displayed when you save the segment.
    Caution: You can change the edge cluster in the profile after the DHCP server is created. However, this action causes all the existing DHCP leases that are assigned to the DHCP clients to be lost.

    When a DHCP server profile is attached to a segment that uses a Local DHCP server, the DHCP service is created in the edge cluster that you specified in the DHCP profile. However, if the segment uses a Gateway DHCP server, the edge cluster in which the DHCP service is created depends on a combination of several factors. For a detailed information about how an edge cluster is selected for DHCP service, see Scenarios: Selection of Edge Cluster for DHCP Service.

  9. (Optional) Next to Edges, click Set and select the preferred edge nodes where you want the DHCP service to run.
    To select the preferred edge nodes, edge cluster must be selected. You can select a maximum of two preferred edge nodes. The following table explains the scenarios when DHCP HA is configured.
    Scenario DHCP HA
    No preferred edge node is selected from the edge cluster.

    DHCP HA is configured. A pair of active and standby edge nodes are selected automatically from the available nodes in the edge cluster.

    Only one preferred edge node is selected from the edge cluster.

    DHCP server runs without the HA support.

    Two preferred edge nodes are selected from the edge cluster.

    DHCP HA is configured. The first edge node that you add becomes the active edge, and the second edge node becomes the standby edge.

    The active edge is denoted with a sequence number 1, and the standby edge is denoted with a sequence number 2.

    You can interchange the active and standby edges. For example to change the current active edge to standby, select the active edge and click the Down arrow. Alternatively, you can select the passive edge and click the Up arrow to make it active. The sequence numbers are reversed in both situations.

    After the DHCP server is created, you can change the preferred edge nodes in the DHCP server profile. However, this flexibility includes certain caveats.

    For example, let us assume that the edge cluster in the DHCP profile has four edge nodes N1, N2, N3, and N4, and you have set N1 and N2 as the preferred edge nodes. N1 is the active edge and N2 is the standby edge. The DHCP service is running on the active edge node N1, and the DHCP server has started assigning leases to the DHCP clients on the segment.

    Scenario Impact on DHCP Service
    Delete existing preferred edge nodes N1 and N2, and add N3 and N4 as the new preferred edge nodes.

    A warning message informs you that the current DHCP leases will be lost due to the replacement of existing preferred edges. This action can cause a loss of network connectivity.

    You can prevent loss of connectivity by replacing one edge node at a time.

    Delete existing preferred edges N1 and N2, and keep the preferred edge nodes list empty.

    The DHCP servers remain on the edge nodes N1 and N2. The DHCP leases are retained and the DHCP clients do not lose network connectivity.

    Delete any one of the preferred edges, either N1 or N2.

    When any one of the preferred edges N1 or N2 is deleted, the other edge continues to provide IP addresses to the DHCP clients. The DHCP leases are retained and the DHCP clients do not experience a loss of network connectivity. However, DHCP HA support is lost.

    To retain DHCP HA, you must replace the deleted edge with another edge node, either N3 or N4, in the edge cluster.

  10. (Optional) In the Tag drop-down menu, enter a tag name. When you are done, click Add Item(s).
    The maximum length of the tag name is 256 characters.

    If tags exist in the inventory, the Tag drop-down menu displays a list of all the available tags and their scope. The list of available tags includes user-defined tags, system-defined tags, and discovered tags. You can select an existing tag from the drop-down menu and add it to the DHCP profile.

  11. Click Save.