0

I have multiple machines (desktop and server versions) running 20.04 that have recently broken netplan configurations using bridged networks for the primary interface.

Example config.

network:
  version: 2
  ethernets:
    enp37s0:
    # lan1:
      #match:
      #  macaddress: MAX_ADDRESS
      dhcp4: no
      optional: true
  bridges:
    br0:
      # interfaces: [lan1]
      interfaces: [enp37s0]
      addresses: [10.0.0.87/24]
      gateway4: 10.0.0.1

This had been working with macaddress matching. The interface lan1 would be brought up, added to the bridge, not assigned any IP address, and br0 would be assigned the static IP I configured.

During a recent update/reboot enp37s0 would not get added to the bridge. Removing the macaddress matching and specifying the interface by name would assign it to the bridge but it would still request a DHCP IP for the physical nic. On boot I now have br0 with a static IP and enp37s0 attached to it but also with a DHCP assigned IP which breaks networking and networking is unusable until I manually remove the DHCP assigned IP on enp37s0.

What the heck changed and why isn't this basic VM host type config tested?

  • Do not assume that your problem afflicts everybody. My netplan-defined bridges on my production systems are solid and unchanged. Try as I might, I cannot seem to reproduce the behavior that you describe on a very-similar bridge in a test system that I happen to have handy. – user535733 Oct 17 at 23:05
  • Is this an Amazon AWS EC2? – heynnema Oct 18 at 16:10
  • No, this is on two physical local machines. One is a desktop, one is a server. – Jeffrey Peckham Oct 18 at 18:14
  • Turns out the the dhcp is happening in the initramfs part of boot. When I set my dhcp server to ignore the physical nic mac address the system doesn't boot as it indefinitely attempts to DHCPDISCOVER on all physical nics. I'm assuming this is from trying to discover an nfsroot but I can't really tell. I haven't changed anything in my initramfs.conf from the defaults. – Jeffrey Peckham Oct 22 at 7:05
  • Was able to get initramfs to skip DHCP by setting ip=none in /etc/default/grub:GRUB_CMD_LINUX. – Jeffrey Peckham Oct 22 at 7:41

Your Answer

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

Browse other questions tagged or ask your own question.