Bond DHCP fails on Ubuntu Server 20.04 netplan

Bug #1908140 reported by Ryan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I recently installed Ubuntu Server 20.04 to replace an ESXi server. During the installation, I configured a bonded interface for two ethernet interfaces. I configured the bond on my ZyXel GS1900-8 as a static LAG. During the setup process, the link came up successfully and was leased an IP via DHCP.

All subsequent boots have failed to acquire an IP address for the bonded interface. Sometimes, if I allow dhcp4 on the enslaved interfaces, and run sudo dhclient -r && sudo dhclient, the enslaved interfaces will be leased an IP address _and_ the bond will get an IP address. I know this is not proper as dhclient and systemd-networkd do not mix.

Also, I would like to configure this as a LACP bond instead. I have enabled LACP on the switch with priority 65535 and "IP/MAC address" load balancing algorithm, switched the LAG from static to LACP, and altered netplan to use the 802.3ad bond mode.

Please let me know what, if anything, I'm doing wrong here. I've looked around at as many netplan DHCP bond posts here as I could find to no avail. See below for configuration files and command outputs. I cannot give you the output of `lsb_release -rd` as the package is not installed and there's no connection to install it.

$ cat /etc/netplan/00-bond.yaml
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: false
    eth1:
      dhcp4: false
  bonds:
    bond0:
      dhcp4: true
      interfaces:
        - eth0
        - eth1
      parameters:
        mode: 802.3ad

$ sudo journalctl -b -u systemd-networkd
Dec 14 08:06:47 lore systemd[1]: Starting Network Service...
Dec 14 08:06:47 lore systemd-networkd[852]: bond0: netdev ready
Dec 14 08:06:47 lore systemd-networkd[852]: Enumeration completed.
Dec 14 08:06:47 lore systemd[1]: Started Network Service.
Dec 14 08:06:47 lore systemd-networkd[852]: bond0: IPv6 successfully enabled
Dec 14 08:06:47 lore systemd-networkd[852]: bond0: Link UP
Dec 14 08:08:53 lore systemd-networkd[852]: rtn1: received neighbor for link '7' we don't know about, ignoring.
Dec 14 08:08:53 lore systemd-networkd[852]: rtn1: received neighbor for link '7' we don't know about, ignoring.
Dec 14 08:08:53 lore systemd-networkd[852]: rtn1: received neighbor for link '7' we don't know about, ignoring.
Dec 14 08:08:53 lore systemd-networkd[852]: rtn1: received neighbor for link '7' we don't know about, ignoring.
Dec 14 08:08:53 lore systemd-networkd[852]: docker0: Link UP

$ sudo ip a
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
eno1: <BROADCAST,MULTICAST> mtu 1500 qdisk noop state DOWN group default qlen 1000
    link/ether 0c:c4:7a:c6:c3:46 brd ff:ff:ff:ff:ff:ff
eno2: <BROADCAST,MULTICAST> mtu 1500 qdisk noop state DOWN group default qlen 1000
    link/ether 0c:c4:7a:c6:c3:47 brd ff:ff:ff:ff:ff:ff
eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 0c:c4:7a:c6:c6:a2 brd ff:ff:ff:ff:ff:ff
eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 0c:c4:7a:c6:c6:a3 brd ff:ff:ff:ff:ff:ff
bond0: <NO-CARRIER,BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisk noqueue state DOWN group default qlen 1000
    link/ether 52:8b:2c:cc:a0:15 brd ff:ff:ff:ff:ff:ff
docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:26:1c:1b:39 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker 0
       valid_lft forever preferred_lft forever

$ cat /run/systemd/network/10-netplan-bond0.netdev
[NetDev]
Name=bond0
Kind=bond

[Bond]
Mode=802.3ad

$ cat /run/systemd/network/10-netplan-bond0.network
[Match]
Name=bond0

[Network]
DHCP=ipv4
LinkLocalAddressing=ipv6
ConfigureWithoutCarrier=yes

[DHCP]
RouteMetric=100
UseMTU=true

$ cat /run/systemd/network/10-netplan-eth0.network
[Match]
Name=eth0

[Network]
LinkLocalAddressing=no
Bond=bond0

$ cat /run/systemd/network/10-netplan-eth1.network
[Match]
Name=eth1

[Network]
LinkLocalAddressing=no
Bond=bond0

$ cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: down
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0

802.3ad info
LACP rate: slow
Min links: 0
Aggregator selection policy (ad_select): stable

Revision history for this message
Dan Streetman (ddstreet) wrote :

> eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
> eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000

your bonded links are down; nothing will happen until they are brought up.

> $ sudo journalctl -b -u systemd-networkd
...

your pasted log appears incomplete since i see no output for eth0 or eth1; please paste or attach your entire log.

Changed in systemd (Ubuntu):
status: New → Incomplete
Revision history for this message
Dan Streetman (ddstreet) wrote :

> please paste or attach your entire log

if that *is* your entire log, then please include the output of:

$ networkctl list
$ networkctl status
$ networkctl status bond0 eth0 eth1

Revision history for this message
Ryan (ryanf-rowe) wrote :
Download full text (5.5 KiB)

> your bonded links are down; nothing will happen until they are brought up.

Yes, I figured as such. I've already tried to bring up eth0, eth1, and bond0 via ip, ifup, and ifconfig to no success.

> your pasted log appears incomplete since i see no output for eth0 or eth1; please paste or attach your entire log.

This is the entire log since reboot. If I look at the journal from previous boots, there are mentions of eth0 and eth1, as well as eno1 and eno2.

$ networkctl list
IDX LINK TYPE OPERATIONAL SETUP
  1 lo loopback carrier unmanaged
  2 eno1 ether off unmanaged
  3 eno2 ether off unmanaged
  4 eth0 ether off pending
  5 eth1 ether off pending
  6 bond0 bond no-carrier configured
  7 docker0 bridge no-carrier unmanaged

After doing ip link set dev {eth0,eth1} up, they change from off to degraded in networkctl list. Attempting the same on bond0 afterward does nothing.

$ networkctl status -n 40
* State: no carrier
  Address: 172.17.0.1 on docker0
Dec 14 21:29:44 lore systemd[1]: Starting Network Service...
Dec 14 21:29:44 lore systemd-networkd[852]: bond0: netdev ready
Dec 14 21:29:44 lore systemd-networkd[852]: Enumeration completed.
Dec 14 21:29:44 lore systemd[1]: Started Network Service.
Dec 14 21:29:44 lore systemd-networkd[852]: bond0: IPv6 successfully enabled
Dec 14 21:29:44 lore systemd-networkd[852]: bond0: Link UP
Dec 14 21:31:44 lore systemd[1]: systemd-networkd-wait-online.service: Main process exited, code=exited, status=1/FAILURE
Dec 14 21:31:44 lore systemd[1]: systemd-networkd-wait-online.service: Failed with result 'exit-code'.
Dec 14 21:31:44 lore systemd[1]: Failed to start Wait for Network to be Configured.
Dec 14 21:31:50 lore systemd-networkd[852]: rtn1: received neighbor for link '7' we don't know about, ignoring.
Dec 14 21:31:50 lore systemd-networkd[852]: rtn1: received neighbor for link '7' we don't know about, ignoring.
Dec 14 21:31:50 lore systemd-networkd[852]: rtn1: received neighbor for link '7' we don't know about, ignoring.
Dec 14 21:31:50 lore systemd-networkd[852]: rtn1: received neighbor for link '7' we don't know about, ignoring.
Dec 14 21:31:50 lore systemd-networkd[852]: docker0: Link UP
Dec 15 18:13:43 lore systemd-networkd[856]: eth1: Link IP
Dec 15 18:13:45 lore systemd-networkd[856]: eth0: Ganied carrier
Dec 15 18:13:47 lore systemd-networkd[856]: eth0: Gained IPv6LL
Dec 15 18:13:47 lore systemd-networkd[856]: eth1: Ganied carrier
Dec 15 18:13:48 lore systemd-networkd[856]: eth1: Gained IPv6LL
Dec 15 18:15:13 lore systemd-networkd[856]: bond0: Link DOWN
Dec 15 18:15:41 lore systemd-networkd[856]: eth0: Link DOWN
Dec 15 18:15:41 lore systemd-networkd[856]: eth0: Lost carrier
Dec 15 18:15:45 lore systemd-networkd[856]: eth1: Link DOWN
Dec 15 18:15:45 lore systemd-networkd[856]: eth1: Lost carrer

All of the lines from today (Dec 15) correspond to my attempts to bring interfaces up as mentioned above, then bringing them back down after it failed.

> networkctl status bond0 eth0 eth1
* 4: eth0
             Link File: n/a
          Network File: n/a
                Status: off (pending)
            HW Address: 0c:c4...

Read more...

Revision history for this message
Ryan (ryanf-rowe) wrote :

I thought this could be related to https://bugzilla.kernel.org/show_bug.cgi?id=199813. Indeed dmidecode -t 41 shows there are two interfaces for type interface 1 and two for 2.

Revision history for this message
Ryan (ryanf-rowe) wrote :

There's a BIOS update available for my board. I'll install this and hopefully I won't need a SW fix.

Revision history for this message
Ryan (ryanf-rowe) wrote :

The BIOS update does indeed fix the type interface number issue. This ticket can be marked as a duplicate of https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1578141 and closed.

Revision history for this message
Ryan (ryanf-rowe) wrote :

Thank you for all of your help!

Nick Rosbrook (enr0n)
Changed in systemd (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.