1

I hope you can help me.

I'm trying to setup a network bridge adapter with Netplan to use it with my KVM guest machine. I followed a couple of tutorial, including the one on Netplan.io and so far none of these worked.

As of right now, my configure looks like this :

network:
  ethernets:
    eno1:
      dhcp4: no
      dhcp6: no

version: 2 renderer: networkd bridges: br0: interfaces: [eno1] addresses: [10.x.x.x/23] routes: - to : default via: 10.x.x.1 nameservers: search: [ x.com ] addresses: [ x.x.x.x, x.x.x.x ] parameters: stp: true forward-delay: 4 dhcp4: no dhcp6: no

My static IP address works fine when I use eno1 . After configuring bridge for eno1 , the bridge is coming up but no communication happening in and out. Not able to ping the gateway or any IP after creating bridge br0.

Screen image

Serg
  • 808

2 Answers2

3

I've been through this exact same scenario the past 2 days and couldn't make any sense of it. I had identical configuration running on a Ubuntu 20.04 VM and couldn't make it work on 22.04.

It turns out for me the critical piece that was missing was setting the macaddress for the bridge to the MAC address of the interface I was bridging.

As soon as I did that it started working after I don't know how many failed attempts with different configurations.

network:
  ethernets:
    eno1:
      dhcp4: no
      dhcp6: no

version: 2 renderer: networkd bridges: br0: interfaces: [eno1] addresses: [10.x.x.x/23] routes: - to : default via: 10.x.x.1 nameservers: search: [ x.com ] addresses: [ x.x.x.x, x.x.x.x ] macaddress: 34:73:5a:a1:dc:4c parameters: stp: true forward-delay: 4 dhcp4: no dhcp6: no

I hope it helps you as well!

Sven
  • 31
3

sven You can also change the macaddresspolicy in /usr/lib/systemd/network/99-default.link

It has been changed in 22.04 to persistent changing this to none option will revert the previous behaviour so the bridge will clone the first interface attached mac.

Check: https://www.freedesktop.org/software/systemd/man/systemd.link.html#Examples