do 20.04 bridges work? what's amis with mine? do i need a special kernel?

Asked by gregrwm on 2021-01-15

i'm trying to setup a bridge for libvirt using 20.04 netplan. Network is fine before trying to define a bridge, but doesn't come up with my bridge definition. What am i missing?

Do i need a special kernel? See why i pose this question right near the bottom.

Before trying to define a bridge the network works fine with /etc/netplan/00-installer-config.yaml having this content:

# This is the network config written by 'subiquity'
network:
  ethernets:
    eno1:
      addresses:
      - 10.3.8.12/21
      gateway4: 10.3.8.3
      nameservers:
        addresses:
        - 10.3.8.3
  version: 2

in trying to setup a bridge i change the contents to:

network:
  ethernets:
    eno1:
      dhcp4: false
      dhcp6: false
  bridges:
    br96:
      interfaces: [ eno1 ]
      addresses: [10.3.8.12/21]
      gateway4: 10.3.8.3
      nameservers:
        addresses: [10.3.8.3]
  version: 2

Below i show 'ip a' before and after applying the netplan, networkctl status, et al. Can anyone clue me what's amis?

  $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 40:a8:f0:67:12:46 brd ff:ff:ff:ff:ff:ff
    inet 10.3.8.12/21 brd 10.3.15.255 scope global eno1
       valid_lft forever preferred_lft forever
    inet6 fe80::42a8:f0ff:fe67:1246/64 scope link
       valid_lft forever preferred_lft forever

  # netplan --debug generate
DEBUG:command generate: running ['/lib/netplan/generate']
** (generate:1386): DEBUG: 09:50:10.524: Processing input file /etc/netplan/00-installer-config.yaml..
** (generate:1386): DEBUG: 09:50:10.524: starting new processing pass
** (generate:1386): DEBUG: 09:50:10.524: We have some netdefs, pass them through a final round of validation
** (generate:1386): DEBUG: 09:50:10.524: eno1: setting default backend to 1
** (generate:1386): DEBUG: 09:50:10.524: Configuration is valid
** (generate:1386): DEBUG: 09:50:10.524: br96: setting default backend to 1
** (generate:1386): DEBUG: 09:50:10.524: Configuration is valid
** (generate:1386): DEBUG: 09:50:10.524: Generating output files..
** (generate:1386): DEBUG: 09:50:10.524: openvswitch: definition eno1 is not for us (backend 1)
** (generate:1386): DEBUG: 09:50:10.524: NetworkManager: definition eno1 is not for us (backend 1)
** (generate:1386): DEBUG: 09:50:10.524: openvswitch: definition br96 is not for us (backend 1)
** (generate:1386): DEBUG: 09:50:10.524: NetworkManager: definition br96 is not for us (backend 1)
(generate:1386): GLib-DEBUG: 09:50:10.524: posix_spawn avoided (fd close requested)
(generate:1386): GLib-DEBUG: 09:50:10.525: posix_spawn avoided (fd close requested)
  0# netplan apply
(ssh connection drops)
  # reboot
(comes up with no network)

  $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 40:a8:f0:67:12:46 brd ff:ff:ff:ff:ff:ff

  # head -99 /r*/s*/n*k/*
==> /run/systemd/network/10-netplan-br96.netdev <==
[NetDev]
Name=br96
Kind=bridge

==> /run/systemd/network/10-netplan-br96.network <==
[Match]
Name=br96

[Network]
LinkLocalAddressing=ipv6
Address=10.3.8.12/21
Gateway=10.3.8.3
DNS=10.3.8.3
ConfigureWithoutCarrier=yes

==> /run/systemd/network/10-netplan-eno1.network <==
[Match]
Name=eno1

[Network]
LinkLocalAddressing=no
Bridge=br96

  # networkctl
IDX LINK TYPE OPERATIONAL SETUP
  1 lo loopback carrier unmanaged
  2 eno1 ether no-carrier pending

2 links listed.

  0# networkctl status -a
Failed to query link bit rates: Unit dbus-org.freedesktop.network1.service not found.
Failed to query link bit rates: Unit dbus-org.freedesktop.network1.service not found.
● 1: lo
             Link File: /usr/lib/systemd/network/99-default.link
          Network File: n/a
                  Type: loopback
                 State: carrier (unmanaged)
                   MTU: 65536
  Queue Length (Tx/Rx): 1/1
               Address: 127.0.0.1
                        ::1

● 2: eno1
             Link File: /usr/lib/systemd/network/99-default.link
          Network File: n/a
                  Type: ether
                 State: no-carrier (pending)
                  Path: pci-0000:00:19.0
                Driver: e1000e
                Vendor: Intel Corporation
                 Model: Ethernet Connection I217-LM
            HW Address: 40:a8:f0:67:12:46 (Hewlett Packard)
                   MTU: 1500 (min: 68, max: 9000)
  Queue Length (Tx/Rx): 1/1
      Auto negotiation: yes
                 Speed: 1Gbps
                Duplex: full
                  Port: tp

Jan 15 11:07:30 filbert systemd-networkd[752]: eno1: Could not join netdev: No such device
Jan 15 11:07:30 filbert systemd-networkd[752]: eno1: Failed
Jan 15 11:07:30 filbert systemd-networkd[756]: eno1: Could not join netdev: No such device
Jan 15 11:07:30 filbert systemd-networkd[756]: eno1: Failed
Jan 15 11:07:30 filbert systemd-networkd[758]: eno1: Could not join netdev: No such device
Jan 15 11:07:30 filbert systemd-networkd[758]: eno1: Failed
Jan 15 11:07:30 filbert systemd-networkd[760]: eno1: Could not join netdev: No such device
Jan 15 11:07:30 filbert systemd-networkd[760]: eno1: Failed
Jan 15 11:07:30 filbert systemd-networkd[763]: eno1: Could not join netdev: No such device
Jan 15 11:07:30 filbert systemd-networkd[763]: eno1: Failed

  0# journalctl -xe|grep networkd
-- Subject: A start job for unit systemd-networkd.service has begun execution
-- A start job for unit systemd-networkd.service has begun execution.
Jan 15 11:07:30 filbert systemd-networkd[752]: Enumeration completed
Jan 15 11:07:30 filbert systemd-networkd[752]: br96: netdev could not be created: Operation not supported
-- Subject: A start job for unit systemd-networkd.service has finished successfully
-- A start job for unit systemd-networkd.service has finished successfully.
Jan 15 11:07:30 filbert systemd-networkd[752]: eno1: Could not join netdev: No such device
Jan 15 11:07:30 filbert systemd-networkd[752]: eno1: Failed
-- Subject: A start job for unit systemd-networkd-wait-online.service has begun execution
-- A start job for unit systemd-networkd-wait-online.service has begun execution.
Jan 15 11:07:30 filbert systemd-networkd[752]: Assertion 'ifindex' failed at src/network/networkd-link.c:757, function link_get(). Aborting.
Jan 15 11:07:30 filbert systemd[1]: systemd-networkd.service: Main process exited, code=killed, status=6/ABRT
-- An ExecStart= process belonging to unit systemd-networkd.service has exited.
Jan 15 11:07:30 filbert systemd[1]: systemd-networkd.service: Failed with result 'signal'.
-- The unit systemd-networkd.service has entered the 'failed' state with result 'signal'.
Jan 15 11:07:30 filbert systemd[1]: systemd-networkd.service: Scheduled restart job, restart counter is at 1.
-- Automatic restarting of the unit systemd-networkd.service has been scheduled, as the result for
-- Subject: A stop job for unit systemd-networkd.service has finished
-- A stop job for unit systemd-networkd.service has finished.
-- Subject: A start job for unit systemd-networkd.service has begun execution
-- A start job for unit systemd-networkd.service has begun execution.
Jan 15 11:07:30 filbert systemd-networkd[756]: Enumeration completed
Jan 15 11:07:30 filbert systemd-networkd[756]: br96: netdev could not be created: Operation not supported
-- Subject: A start job for unit systemd-networkd.service has finished successfully
-- A start job for unit systemd-networkd.service has finished successfully.
Jan 15 11:07:30 filbert systemd-networkd[756]: eno1: Could not join netdev: No such device
Jan 15 11:07:30 filbert systemd-networkd[756]: eno1: Failed
Jan 15 11:07:30 filbert systemd-networkd[756]: Assertion 'ifindex' failed at src/network/networkd-link.c:757, function link_get(). Aborting.
Jan 15 11:07:30 filbert systemd[1]: systemd-networkd.service: Main process exited, code=killed, status=6/ABRT
-- An ExecStart= process belonging to unit systemd-networkd.service has exited.
Jan 15 11:07:30 filbert systemd[1]: systemd-networkd.service: Failed with result 'signal'.
-- The unit systemd-networkd.service has entered the 'failed' state with result 'signal'.
Jan 15 11:07:30 filbert systemd[1]: systemd-networkd.service: Scheduled restart job, restart counter is at 2.
-- Automatic restarting of the unit systemd-networkd.service has been scheduled, as the result for
-- Subject: A stop job for unit systemd-networkd.service has finished
-- A stop job for unit systemd-networkd.service has finished.
-- Subject: A start job for unit systemd-networkd.service has begun execution
-- A start job for unit systemd-networkd.service has begun execution.
Jan 15 11:07:30 filbert systemd-networkd[758]: Enumeration completed
-- Subject: A start job for unit systemd-networkd.service has finished successfully
-- A start job for unit systemd-networkd.service has finished successfully.
Jan 15 11:07:30 filbert systemd-networkd[758]: br96: netdev could not be created: Operation not supported
Jan 15 11:07:30 filbert systemd-networkd[758]: eno1: Could not join netdev: No such device
Jan 15 11:07:30 filbert systemd-networkd[758]: eno1: Failed
Jan 15 11:07:30 filbert systemd-networkd[758]: Assertion 'ifindex' failed at src/network/networkd-link.c:757, function link_get(). Aborting.
Jan 15 11:07:30 filbert systemd[1]: systemd-networkd.service: Main process exited, code=killed, status=6/ABRT
-- An ExecStart= process belonging to unit systemd-networkd.service has exited.
Jan 15 11:07:30 filbert systemd[1]: systemd-networkd.service: Failed with result 'signal'.
-- The unit systemd-networkd.service has entered the 'failed' state with result 'signal'.
Jan 15 11:07:30 filbert systemd[1]: systemd-networkd.service: Scheduled restart job, restart counter is at 3.
-- Automatic restarting of the unit systemd-networkd.service has been scheduled, as the result for
-- Subject: A stop job for unit systemd-networkd.service has finished
-- A stop job for unit systemd-networkd.service has finished.
-- Subject: A start job for unit systemd-networkd.service has begun execution
-- A start job for unit systemd-networkd.service has begun execution.
Jan 15 11:07:30 filbert systemd-networkd[760]: Enumeration completed
Jan 15 11:07:30 filbert systemd-networkd[760]: br96: netdev could not be created: Operation not supported
-- Subject: A start job for unit systemd-networkd.service has finished successfully
-- A start job for unit systemd-networkd.service has finished successfully.
Jan 15 11:07:30 filbert systemd-networkd[760]: eno1: Could not join netdev: No such device
Jan 15 11:07:30 filbert systemd-networkd[760]: eno1: Failed
Jan 15 11:07:30 filbert systemd-networkd[760]: Assertion 'ifindex' failed at src/network/networkd-link.c:757, function link_get(). Aborting.
Jan 15 11:07:30 filbert systemd[1]: systemd-networkd.service: Main process exited, code=killed, status=6/ABRT
-- An ExecStart= process belonging to unit systemd-networkd.service has exited.
Jan 15 11:07:30 filbert systemd[1]: systemd-networkd.service: Failed with result 'signal'.
-- The unit systemd-networkd.service has entered the 'failed' state with result 'signal'.
Jan 15 11:07:30 filbert systemd[1]: systemd-networkd.service: Scheduled restart job, restart counter is at 4.
-- Automatic restarting of the unit systemd-networkd.service has been scheduled, as the result for
-- Subject: A stop job for unit systemd-networkd.service has finished
-- A stop job for unit systemd-networkd.service has finished.
-- Subject: A start job for unit systemd-networkd.service has begun execution
-- A start job for unit systemd-networkd.service has begun execution.
Jan 15 11:07:30 filbert systemd-networkd[763]: Enumeration completed
Jan 15 11:07:30 filbert systemd-networkd[763]: br96: netdev could not be created: Operation not supported
-- Subject: A start job for unit systemd-networkd.service has finished successfully
-- A start job for unit systemd-networkd.service has finished successfully.
Jan 15 11:07:30 filbert systemd-networkd[763]: eno1: Could not join netdev: No such device
Jan 15 11:07:30 filbert systemd-networkd[763]: eno1: Failed
Jan 15 11:07:30 filbert systemd-networkd[763]: Assertion 'ifindex' failed at src/network/networkd-link.c:757, function link_get(). Aborting.
Jan 15 11:07:30 filbert systemd[1]: systemd-networkd.service: Main process exited, code=killed, status=6/ABRT
-- An ExecStart= process belonging to unit systemd-networkd.service has exited.
Jan 15 11:07:30 filbert systemd[1]: systemd-networkd.service: Failed with result 'signal'.
-- The unit systemd-networkd.service has entered the 'failed' state with result 'signal'.
Jan 15 11:07:30 filbert systemd[1]: systemd-networkd.service: Scheduled restart job, restart counter is at 5.
-- Automatic restarting of the unit systemd-networkd.service has been scheduled, as the result for
-- Subject: A stop job for unit systemd-networkd.service has finished
-- A stop job for unit systemd-networkd.service has finished.
Jan 15 11:07:30 filbert systemd[1]: systemd-networkd.service: Start request repeated too quickly.
Jan 15 11:07:30 filbert systemd[1]: systemd-networkd.service: Failed with result 'signal'.
-- The unit systemd-networkd.service has entered the 'failed' state with result 'signal'.
-- Subject: A start job for unit systemd-networkd.service has failed
-- A start job for unit systemd-networkd.service has finished with a failure.
-- Subject: A start job for unit systemd-networkd-wait-online.service has failed
-- A start job for unit systemd-networkd-wait-online.service has finished with a failure.
Jan 15 11:07:30 filbert systemd[1]: systemd-networkd-wait-online.service: Job systemd-networkd-wait-online.service/start failed with result 'dependency'.
Jan 15 11:07:30 filbert systemd[1]: systemd-networkd.socket: Failed with result 'service-start-limit-hit'.
-- The unit systemd-networkd.socket has entered the 'failed' state with result 'service-start-limit-hit'.
Jan 15 11:07:31 filbert systemd[1]: Starting Dispatcher daemon for systemd-networkd...
-- Subject: A start job for unit networkd-dispatcher.service has begun execution
-- A start job for unit networkd-dispatcher.service has begun execution.
Jan 15 11:07:31 filbert networkd-dispatcher[793]: No valid path found for iwconfig
Jan 15 11:07:31 filbert systemd[1]: Started Dispatcher daemon for systemd-networkd.
-- Subject: A start job for unit networkd-dispatcher.service has finished successfully
-- A start job for unit networkd-dispatcher.service has finished successfully.
Jan 15 11:09:30 filbert systemd-networkd-wait-online[754]: Event loop failed: Connection timed out
Jan 15 11:09:30 filbert systemd[1]: systemd-networkd-wait-online.service: Main process exited, code=exited, status=1/FAILURE
-- An ExecStart= process belonging to unit systemd-networkd-wait-online.service has exited.
Jan 15 11:09:30 filbert systemd[1]: systemd-networkd-wait-online.service: Failed with result 'exit-code'.
-- The unit systemd-networkd-wait-online.service has entered the 'failed' state with result 'exit-code'.

  0# dpkg -l *netplan*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=================-======================-============-===========================================================
ii libnetplan0:amd64 0.100-0ubuntu4~20.04.3 amd64 YAML network configuration abstraction runtime library
un netplan <none> <none> (no description available)
ii netplan.io 0.100-0ubuntu4~20.04.3 amd64 YAML network configuration abstraction for various backends
lines 1-8/8 (END)

  0# apt-get install netplan
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package netplan is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'netplan' has no installation candidate
  100# cat /etc/apt/sources.list
deb http://us.archive.ubuntu.com/ubuntu focal main restricted
deb http://us.archive.ubuntu.com/ubuntu focal-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu focal universe
deb http://us.archive.ubuntu.com/ubuntu focal-updates universe
deb http://us.archive.ubuntu.com/ubuntu focal multiverse
deb http://us.archive.ubuntu.com/ubuntu focal-updates multiverse
deb http://us.archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu focal-security main restricted
deb http://us.archive.ubuntu.com/ubuntu focal-security universe
deb http://us.archive.ubuntu.com/ubuntu focal-security multiverse
  0# ls -ld /etc/apt/sources.list*/*
ls: cannot access '/etc/apt/sources.list*/*': No such file or directory
  2#

So i tried 'apt-get install ifupdown' and tried this in /etc/network/interfaces:

    auto lo
    iface lo inet loopback

    auto eno1
    iface eno1 inet static
          address 10.3.8.12
          netmask 255.255.248.0
          gateway 10.3.8.3
          dns-nameserver 10.3.8.3

That works, so next i tried with a bridge:

    auto lo
    iface lo inet loopback

    auto br0
    iface br0 inet static
       bridge_ports eno1
          address 10.3.8.12
          netmask 255.255.248.0
          gateway 10.3.8.3

And that doesn't work. So i tried:

  # ifup br0
add bridge failed: Package not installed
run-parts: /etc/network/if-pre-up.d/bridge exited with return code 1
ifup: failed to bring up br0
  #

That means "You don't have kernel support for bridging...Compile it in. It should be in 'Networking' → 'Networking options'." according to http://helpful.knobs-dials.com/index.php/Networking_notes_-_the_lower_three_levels#Add_bridge_failed:_Package_not_installed

So do i need a special kernel?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
gregrwm
Solved:
2021-01-19
Last query:
2021-01-19
Last reply:
gregrwm (gregrwm) said : #1

Now that linux-image-5.4.0-62-generic:amd64 has arrived, it all works. Something's broken with the prior kernels here, i have

/boot/vmlinuz-5.4.0-58-generic
/boot/vmlinuz-5.4.0-60-generic
/boot/vmlinuz-5.4.0-62-generic

but only

/lib/modules/5.4.0-62-generic

it's not like i ever aborted an update, or ran out of space, i've got lots. No idea. But it works now.