Ubuntu 20.04 Systemd fails to configure bridged network
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Fix Released
|
Critical
|
Balint Reczey | ||
Bionic |
Fix Released
|
Medium
|
Dan Streetman | ||
Eoan |
Fix Released
|
Medium
|
Dan Streetman | ||
Focal |
Fix Released
|
Critical
|
Dan Streetman | ||
Groovy |
Fix Released
|
Critical
|
Balint Reczey |
Bug Description
[impact]
A bridged interface with static ipv4 address and gateway configuration will fail to properly add the route via the gateway, leaving the system without a globally working network.
[test case]
On a Focal system, remove all network configuration and create this netplan:
network:
version: 2
renderer: networkd
ethernets:
enp4s0:
dhcp4: false
bridges:
br0:
interfaces: [enp4s0]
dhcp4: no
addresses: [192.168.0.4/24]
gateway4: 192.168.0.1
nameservers:
search: [mydomain]
addresses: [192.168.
Replace the interface name 'enp4s0' with the actual interface name on the test system.
Reboot the system, and check the route to the gateway, which will be missing:
root@lp1860926-f:~# ip r
192.168.0.0/24 dev br0 proto kernel scope link src 192.168.0.4
The route is expected to be present, e.g.:
ubuntu@
default via 192.168.0.1 dev br0 proto static
192.168.0.0/24 dev br0 proto kernel scope link src 192.168.0.4
[test case, pre-focal]
same netplan as above. Reboot, and the bridge should have its address and route:
ubuntu@test-e:~$ ip a show br0
3: br0: <NO-CARRIER,
link/ether 56:11:da:23:bb:93 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.4/24 brd 192.168.0.255 scope global br0
valid_lft forever preferred_lft forever
ubuntu@test-e:~$ ip r
default via 192.168.0.1 dev br0 proto static linkdown
192.168.0.0/24 dev br0 proto kernel scope link src 192.168.0.4 linkdown
add and remove carrier, by adding and removing a slave interface:
ubuntu@test-e:~$ sudo ip l set dev ens3 master br0 up
ubuntu@test-e:~$ ip a show br0
3: br0: <BROADCAST,
link/ether 56:11:da:23:bb:93 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.4/24 brd 192.168.0.255 scope global br0
valid_lft forever preferred_lft forever
inet6 fe80::5411:
valid_lft forever preferred_lft forever
ubuntu@test-e:~$ sudo ip l set dev ens3 nomaster
the bridge no longer has its address after losing carrier:
ubuntu@test-e:~$ ip a show br0
3: br0: <NO-CARRIER,
link/ether 56:11:da:23:bb:93 brd ff:ff:ff:ff:ff:ff
inet6 fe80::5411:
valid_lft forever preferred_lft forever
[regression potential]
Any regression would likely involve incorrectly configured network after an interface carrier gain/loss.
[scope]
This is needed for Focal, Eoan, and Bionic.
While this only reproduces at boot for Focal, the general loss of configuration on carrier loss even when ConfigureWithou
[original description]
Freshly installed Ubuntu 20.04 fully patched to days date with static IP address works fine and survives a reboot
network:
version: 2
renderer: networkd
ethernets:
enp4s0:
dhcp4: false
addresses: [192.168.0.4/24]
gateway4: 192.168.0.1
nameservers:
search: [mydomain]
addresses: [192.168.
however when converted to a bridged network for kvm
network:
version: 2
renderer: networkd
ethernets:
enp4s0:
dhcp4: false
bridges:
br0:
interfaces: [enp4s0]
dhcp4: no
addresses: [192.168.0.4/24]
gateway4: 192.168.0.1
nameservers:
search: [mydomain]
addresses: [192.168.
will not survive a reboot and required systemd-network to be restarted or
@reboot /usr/sbin/netplan apply
added to the crontab
after a reboot the network can not b eaccseed and a
systemctl status systemd-networkd produces
systemd-
Loaded: loaded (/lib/systemd/
Active: active (running) since Sun 2020-01-26 16:36:28 UTC; 2min 27s ago
TriggeredBy: ● systemd-
Docs: man:systemd-
Main PID: 979 (systemd-network)
Status: "Processing requests..."
Tasks: 1 (limit: 57662)
Memory: 4.1M
CGroup: /system.
└─979 /lib/systemd/
Jan 26 16:38:02 firebolt systemd-
Jan 26 16:38:02 firebolt systemd-
Jan 26 16:38:02 firebolt systemd-
Jan 26 16:38:02 firebolt systemd-
Jan 26 16:38:02 firebolt systemd-
Jan 26 16:38:02 firebolt systemd-
Jan 26 16:38:02 firebolt systemd-
Jan 26 16:38:02 firebolt systemd-
Jan 26 16:38:02 firebolt systemd-
Jan 26 16:38:02 firebolt systemd-
systemctl restart systemd-networkd resolved the issue and a
systemctl status systemd-network producessystemd
Loaded: loaded (/lib/systemd/
Active: active (running) since Sun 2020-01-26 16:39:28 UTC; 41s ago
TriggeredBy: ● systemd-
Docs: man:systemd-
Main PID: 1650 (systemd-network)
Status: "Processing requests..."
Tasks: 1 (limit: 57662)
Memory: 1.6M
CGroup: /system.
└─1650 /lib/systemd/
Jan 26 16:39:28 firebolt systemd[1]: Starting Network Service...
Jan 26 16:39:28 firebolt systemd-
Jan 26 16:39:28 firebolt systemd-
Jan 26 16:39:28 firebolt systemd-
Jan 26 16:39:28 firebolt systemd[1]: Started Network Service.
Jan 26 16:39:28 firebolt systemd-
Jan 26 16:39:28 firebolt systemd-
a journalctl -u systemd-network produces
Jan 26 16:36:28 firebolt systemd[1]: Starting Network Service...
Jan 26 16:36:28 firebolt systemd-
Jan 26 16:36:28 firebolt systemd-
Jan 26 16:36:28 firebolt systemd-
Jan 26 16:36:28 firebolt systemd[1]: Started Network Service.
Jan 26 16:36:28 firebolt systemd-
Jan 26 16:36:28 firebolt systemd-
Jan 26 16:36:28 firebolt systemd-
Jan 26 16:36:28 firebolt systemd-
Jan 26 16:36:28 firebolt systemd-
Jan 26 16:36:28 firebolt systemd-
Jan 26 16:36:28 firebolt systemd-
Jan 26 16:36:28 firebolt systemd-
Jan 26 16:36:28 firebolt systemd-
Jan 26 16:36:28 firebolt systemd-
Jan 26 16:36:28 firebolt systemd-
Jan 26 16:36:28 firebolt systemd-
Jan 26 16:36:28 firebolt systemd-
Jan 26 16:36:30 firebolt systemd-
Jan 26 16:36:31 firebolt systemd-
Jan 26 16:36:31 firebolt systemd-
Jan 26 16:38:02 firebolt systemd-
Jan 26 16:38:02 firebolt systemd-
Jan 26 16:38:02 firebolt systemd-
Jan 26 16:38:02 firebolt systemd-
Jan 26 16:38:02 firebolt systemd-
Jan 26 16:38:02 firebolt systemd-
Jan 26 16:38:02 firebolt systemd-
Jan 26 16:38:02 firebolt systemd-
Jan 26 16:38:02 firebolt systemd-
Jan 26 16:38:02 firebolt systemd-
Jan 26 16:39:28 firebolt systemd[1]: Stopping Network Service...
Jan 26 16:39:28 firebolt systemd[1]: systemd-
Jan 26 16:39:28 firebolt systemd[1]: Stopped Network Service.
Jan 26 16:39:28 firebolt systemd[1]: Starting Network Service...
Jan 26 16:39:28 firebolt systemd-
Jan 26 16:39:28 firebolt systemd-
Jan 26 16:39:28 firebolt systemd-
Jan 26 16:39:28 firebolt systemd[1]: Started Network Service.
Jan 26 16:39:28 firebolt systemd-
Jan 26 16:39:28 firebolt systemd-
the network should restart properly after a reboot liek in earlier version of ubuntu 18.04 for example
tags: | added: systemd-networkd |
Changed in systemd (Ubuntu Focal): | |
importance: | Undecided → Critical |
description: | updated |
description: | updated |
description: | updated |
tags: | added: seg |
description: | updated |
description: | updated |
Changed in systemd (Ubuntu Groovy): | |
status: | Confirmed → New |
Changed in systemd (Ubuntu Bionic): | |
status: | New → In Progress |
Changed in systemd (Ubuntu Eoan): | |
status: | New → In Progress |
Changed in systemd (Ubuntu Focal): | |
status: | Confirmed → In Progress |
Changed in systemd (Ubuntu Bionic): | |
importance: | Undecided → Medium |
Changed in systemd (Ubuntu Eoan): | |
importance: | Undecided → Medium |
Changed in systemd (Ubuntu Bionic): | |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in systemd (Ubuntu Eoan): | |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in systemd (Ubuntu Focal): | |
assignee: | nobody → Dan Streetman (ddstreet) |
tags: |
added: verification-done removed: verification-needed |
description: | updated |
description: | updated |
tags: |
added: verification-done verification-done-bionic removed: verification-needed verification-needed-bionic |
Status changed to 'Confirmed' because the bug affects multiple users.