[ solved : /etc/machine-id ] DHCP, VMs, dd-wrt switch ports, and Proxmox

steevestroke

Member
May 29, 2022
36
19
13
proxmox:
version: pve-manager/7.2-3/c743d6c1

router:
kernel: Linux 4.4.241 #1327 SMP Tue Nov 3 09:06:16 +03 2020 armv7l
build: DD-WRT v3.0-r44715 std (11/03/20)
hardware: Asus RT-AC5300

Howdy, folks. I'm seeing some strange behavior from the DHCP server servicing my embedded switch. I have a Proxmox server attached to a switch port. Proxmox is configured for bridging with bridge IP assigned via DHCP. VMs mapped to that bridge have unique MAC addresses and are requesting addresses via DHCP also.

As the VMs boot the router is reassigning the same LAN IP address to each VM despite each of them having a distinct MAC. There's nothing in the logs which suggests, for instance, that the initial DHCP request is going out with the bridge MAC and thus that's the source of the re-used IP. Generally, there's nothing in the router logs nor in Proxmox logs to suggest that either is unhappy with the DHCP process though clearly the VMs end up not being happy about the situation.

I dug into STP settings and didn't see anything special that needed to be set on the router to allow for multiple MAC addresses on a single switch port.

I also didn't see anything special that might need to be set in Proxmox bridge networking to play nicely with an upstream non-VLAN-aware switch.

VLANs are enable neither on the router nor on the Proxmox server. I have the option to store MAC addresses in NVRAM turned off because it seems to prevent the WAN port on the router from getting a DHCP address from ISP for some undetermined region.

Any thoughts? At this point I'm considering just virtualizing the firewall/router as a work-around because this has me pretty baffled.

Thx
 
Hi,

with the same LAN IP you mean they all get the same IP as the host?

Can you post your /etc/network/interfaces?
 
It's not the same IP as the VE server. But all VMs have the same IP once they hit the bridge and switch to talk to the DHCP server.

I've been exprimenting quite a lot these last few days. Let me clean things up a bit and I'll share the config soon...
 
What would be interesting in that case would be the config of two VMs that get the same IP can you call qm config <vmid>.
 
Solved! The VMs were deployed from a VM template and they had the same value for /etc/machine-id. I had never even heard of that setting after like ... 20+ years ... of working with Linux.

dhclient submits client-id as part of the DHCP request and many (all?) DHCP servers will address based on values of client-id if its exists as opposed to MAC. I catted /dev/null into the machine-id file and rebooted and everyone is off to the races.

Thanks for your help, folks!
 
  • Like
Reactions: shrdlicka

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!