❓ What?
Everytime a systemctl restart networking
is run on Proxmox or the host is rebooted, the bridges vmbr{0,1,2..}
are assigned different MAC Addresses. Normally this is fine but as I am running my home router as VM, and all traffic needs to pass through it for internet access and inversely, the router needs to assign a static, private address to the proxmox host via a static DHCP lease, changing MAC addresses would mean different IP assignments.
Also, these MAC addresses are also set on the tap/veth interfaces created by Proxmox for VM/CT network communication.
🎤 How?
For a bridge to have a static MAC address, use the hwaddress
directive for ifupdown2
instead of the bridge_hw
directive that used to work with ifupdown
.
For example:
would result in:
👓 References
https://forum.proxmox.com/threads/how-do-i-configure-static-vmbr0-mac-address.125319/