Network interface assigned wrong HW (MAC) Address

I have a container with 4 network interfaces. We use macvlan and the HW addresses are set in the container config e.g. “volatile.eth0.hwaddr: 00:16:3e:…” The container is relatively old, 18.04 and the host is a 22.04 machine running latest/stable (currently 5.6-794016a).

All four interfaces have HW addresses set to the Xen Source mac range, I assume this was done when the container was created. Three of the interfaces end up with the expected HW address, but one is assigned an address from the 26:de:e9 range which I think is unallocated. I think it’s always the same address, but I’m not sure. We don’t use DHCP on that interface.

Any ideas what is going wrong here?

Looks like this bug report is similar. Random MAC address after a reboot in the container · Issue #9980 · lxc/lxd · GitHub

I’ve been playing with this and the problem has mysteriously disappeared, just as it came. My only theory is that the interfaces have 20 IPs bound to each of them which creates some load at startup and that there’s a race somewhere.

1 Like