1

I'm attempting to configure a bridge to be used for a KVM host on Ubuntu 2020.4 LTS. The basic configuration with netplan works, but the bridge does not work until I manually add the ethernet interface to the bridge with brctl. But when doing that the connection becomes flaky and eventually stops. How can I have this start up automatically when booting ? What is wrong to make my connectivity go away after adding the interface to the bridge ?

The netplan file:

root@altair:~# cat /etc/netplan/01-ethernet.yaml 
# This is the network config written by 'subiquity'
network:
  version: 2
  ethernets:
    enp2s0:
      dhcp4: false
      dhcp6: false
      # addresses: [192.168.15.28/24]
      # gateway4: 192.168.15.1
      # mtu: 1500
      # nameservers:
      #   addresses: [192.168.15.1]
  bridges:
    br0:
      interfaces: [ enp2s0 ]
      addresses: [192.168.15.28/24]
      gateway4: 192.168.15.1
      mtu: 1500
      nameservers:
        addresses: [192.168.15.1]
      parameters:
        stp: true
        forward-delay: 4
      dhcp4: no
      dhcp6: no

The bridge status is emtpy after boot, using the brctl command I can add the ethernet interface manually:

root@altair:~# brctl show
bridge name bridge id       STP enabled interfaces
br0     8000.000000000000   yes     
root@altair:~# brctl addif br0 enp4s0
root@altair:~# brctl show
bridge name bridge id       STP enabled interfaces
br0     8000.50e5494e2dd1   yes     enp4s0

Also when running the brctl command, after a while my connection hangs and I can only recover it by running ifctl delif br0 enp4s0.

markus_b
  • 361
  • 1
  • 5
  • Configuration: `enp2s0`, following command: `enp4s0`. Care to explain? – A.B Aug 21 '21 at 10:00
  • Thanks for pointing this out ! Fixing the type in the netplan file fixed my problem. Interestingly enough, the netplan generate command seems to lack checking if the interfaces mentioned actually exist. – markus_b Aug 25 '21 at 09:06

0 Answers0