DHCP assigning same IP to multiple VMs

Hi Folks,

I searched this forum but could not find any solution.

I have a Proxmox server running in one of my VLANs and the VMs are configured to get the IP address from the DHCP server from my hApAC2 router. All of my network is run by hApAC2 router, plus some dumb switches. The MikroTik router is running separate DHCP servers for each VLAN and this configuration has been in place for the past two years. I am noticing that the router keeps assigning the same IP address to multiple VMs that I create in Proxmox. This creates IP collisions and I can’t use my VMs anymore. For more information, I am cloning existing VM to create new one, but all new ones get a unique MAC address and I have made sure of that. How do I address this?

I am running Ubuntu 20.04 LTS on my VMs.
hApAC2 is running ROS latest stable 6.49

Thanks in advance!

I played around with Winbox and there seems to be a temporary solution that I’ve found. But I cannot explain why its working. I would love for someone to educate me on this so that I can figure out how to avoid this in future.

Basically I want to DHCP Server > Leases and then made the IP static for my first VM. I also removed the “Client ID” value in there. Then when I started the second VM, it got a new IP address. If I do not clear the “Client ID” field, then I continue to have this issue.

So what is "Client ID’? How can I make sure that my VMs do not use the same Client ID, even if they are cloned?

Thanks in advance!

Is the DHCP server reporting that each different MAC is getting the same IP, or is it reporting only one MAC getting the IP? Off hand, it would appear that whatever is supposed to be set i9n the VM to assign different MACs is not really working the way it’s supposed to. I’ve never dealt with VMs so can’t help on that part. The router DHCP lease table and maybe in combination with the log should shed some light on the issue.

Its only one MAC getting the IP, which is usually the first VM to power up. Then when the second one comes up, it gets the same IP when I check in the VM, the DHCP server has the MAC of the first one but the hostname in DHCP is of the second VM. Which is what threw me off. I thought DHCP IPs are assigned based on the MAC of the VM but it turns out that Client ID has something to do with it.


Off hand, it would appear that whatever is supposed to be set i9n the VM to assign different MACs is not really working the way it’s supposed to. I’ve never dealt with VMs so can’t help on that part. The router DHCP lease table and maybe in combination with the log should shed some light on the issue.

To be honest, I did not change anything in Ubuntu install. It gave me various options, including getting the IP from the DHCP and I used that. Is there a way to configure the Client ID being sent? But then again, why is Mikrotik using Client ID instead of MAC address?

Found the issue. I had to chance the ID in /etc/machine-id in Ubuntu after cloning the VM. Otherwise it uses the same machine ID to generate the Client IDs for DHCP.