Skip to main content

Edit the DHCP lease for a VNET

After adding, changing, or removing a static binding from an instance that already has a DHCP IP, the DHCP server and client will still have the old lease cached, so additional steps are required.

Follow these steps if you modify the DHCP service for a VNET. After changing a VNET's DHCP settings, such as adding, changing, or removing a static binding from an instance that already has a DHCP IP, follow these steps.

  1. Open a console to the NFV instance.
  2. Run: vi /var/lib/dnsmasq/dnsmasq.leases and type i to edit the file.
  3. Remove the line containing the old IP of the instance whose static binding is being changed. Press ESC and type :wq to save the changes.
  4. Run: systemctl restart dnsmasq
  5. Open a console to the instance whose static binding is being changed.
    • For Linux instances:

      • Run: rm /var/lib/NetworkManager/dhclient-*-<Interface Name>.lease to remove the old DHCP lease file.

      • Then run: nmcli con up <Interface Name> to bring up the interface.

    • For Windows instances:

      • Open Network and Sharing Center and click Change adapter settings.

      • Right-click the network adapter and select Disable this network device.

      • Right-click the network adapter and select Enable this network device.

Note

These changes will not take effect on the clients until they renew their DHCP leases.