I ran into this issue a lot with Ubuntu when I was turning up VMs on my ESXI hosts.
Solution 1: Configure DHCP to use MAC instead of Client ID (Netplan)
If you’re using Netplan (common in Ubuntu 18.04 and later), you can modify the Netplan configuration file.
Edit Netplan Configuration File:
bash
sudo nano /etc/netplan/01-netcfg.yaml
Look for the network interface section (it will look something like this):
yaml
network: version: 2 renderer: networkd ethernets: enp3s0: dhcp4: true
Force Netplan to use the MAC address as the Client ID. Add the following option under the interface:
yaml
network: version: 2 renderer: networkd ethernets: enp3s0: dhcp4: true dhcp-identifier: mac
Apply the changes:
This tells Netplan to use the MAC address as the DHCP identifier instead of the Client ID.
Solution 2: Configure DHCP Client to Use MAC (dhclient.conf)
If you're using dhclient directly (common in older versions of Ubuntu), you can modify its behavior.
Edit the DHCP client configuration file:
bash
sudo nano /etc/dhcp/dhclient.conf
Force it to use the MAC address. Add this line at the top or bottom of the file:
conf
send dhcp-client-identifier = hardware;
Restart network services:
bash
sudo systemctl restart networking
Alternatively, you can stop and restart dhclient manually for a specific interface:
bash
sudo dhclient -r enp3s0 # Release the DHCP lease
sudo dhclient enp3s0 # Request a new lease using the MAC address