If you have services running on a virtual machine and do not want the IP address to be changed, you can bind an IP address to the MAC address of a virtual machine. The IP address you bind must not overlap an IP pool.

Procedure

  1. Log in to the vSphere Web Client.
  2. Click Networking & Security > NSX Edges.
  3. Double-click an NSX Edge.
  4. Click Manage > DHCP.
  5. Select Bindings from the left panel.
  6. Click Add.
  7. Select one of the two binding options.
    • Use VM NIC Binding: Select this option when you know the vNIC index of the VM. NSX determines the MAC address from the vNIC index and binds the IP address of the VM to the MAC address.
    • Use MAC Binding: Select this option when you know the MAC address of the VM and want to use it for static binding with the IP address.
  8. Configure the general DHCP binding settings.
    1. Do any one of the following:
      • If you selected the Use VM NIC Binding option, select the interface to bind, the virtual machine, and the vNIC index of the VM to bind to the IP address.
      • If you selected the Use MAC Binding option, enter the MAC address of the VM that you want to use for static binding.
    2. Specify the other general settings.
      These options are common to VM NIC binding and MAC binding.
      Option Action
      Host name Type the host name of the DHCP client virtual machine.
      IP Address Enter the address to which to bind the MAC address of the selected virtual machine.
      Subnet Mask Specify the subnet mask. The subnet mask should be same as the subnet mask of the Edge interface or the DHCP Relay, in case of distributed router.
      Domain Name Enter the domain name of the DNS server.
      Default Gateway Enter the default gateway address. If you do not specify the default gateway IP address, the internal interface of the NSX Edge instance is taken as the default gateway.
      Lease never expires Select to bind the address to the MAC address of the virtual machine forever.
      Lease Time If you did not select Lease never expires, select whether to lease the address to the client for the default time (one day), or enter a value in seconds.
  9. Configure the DNS settings.
    Option Action
    Auto configure DNS Select to use the DNS service configuration for the DHCP binding.
    Primary Name Server If you did not select Auto Configure DNS, enter the Primary Nameserver for the DNS service. You must enter the IP address of a DNS server for hostname-to-IP address resolution.
    Secondary Name Server If you did not select Auto Configure DNS, enter the Secondary Nameserver for the DNS service. You must enter the IP address of a DNS server for hostname-to-IP address resolution.
  10. (Optional) Specify the DHCP options. For detailed information about configuring DHCP options, see step 7 in Add a DHCP IP Pool.
  11. Click Add, and then click Publish Changes.