5

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
  • MAC addresses, or IP addresses?
    – heynnema
    Mar 16, 2019 at 14:52
  • mac addresses. From below, I can work around it by assigning them.
    – rory toma
    Mar 18, 2019 at 21:27

2 Answers 2

6

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
  • Thanks. That's good to know. For know, we assign an address that's based on the IP address. But for my little arm machines I was testing on, this is good info.
    – rory toma
    Jun 11, 2019 at 1:00
5

/etc/netplan/01-network-manager-all.yaml

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .