Netplan generates the same MAC address for bridges on two different machines

The two machines in question have different MAC addresses for eth0. However, when I apply the following netplan file, I end up with the same MAC address on both machines, which, of course, is kind of a problem. I'm using Ubuntu 18.04.1 on ARM.

network: version: 2 renderer: networkd ethernets: eth0: dhcp4: no bridges: br0: interfaces: [eth0] dhcp4: true
2

2 Answers

Machines having the same MAC address will mostly only happen when they also have the same machine-id in /etc/machine-id. This will be the case if they use a shared systemimage that has that file already.

In that case delete /etc/machine-id from the systemimage and reinstall using that image. At first boot the machine will generate a random machine-id and the MAC addresses will be different from other machines.

You can also delete /etc/machine-id from an installed machine, but your MAC address and maybe also your ssh server keys will be regenerated.

1
network: version: 2 renderer: networkd ethernets: eth0: dhcp4: no bridges: br0: macaddress: 00:1a:3e:c9:20:03 interfaces: [eth0] dhcp4: true
0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like