Netplan not connecting bridge with static IP

Bug #1872185 reported by Jane Atkinson
42
This bug affects 7 people
Affects Status Importance Assigned to Milestone
netplan.io (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

System is Xubuntu 20.04, built up from Xubuntu-core base.

I have a very simple bridge consisting of one ethernet interface, which I need for bridging to QEMU/KVM vms. It used to work properly on 18.04.

The .yaml file is as follows:

network:
  version: 2
  renderer: networkd
  ethernets:
    enp3s0:
      dhcp4: no

  bridges:
    br0:
      dhcp4: no
      dhcp6: no
      addresses: [ 192.168.1.65/24 ]
      gateway4: 192.168.1.1
      nameservers:
        addresses: [ 192.168.1.1 ]
      interfaces:
        - enp3s0

On logging in immediately after bootup, I see that br0 is UP, but has no IP address assigned to it.

syslog contains the item:

systemd-networkd[367]: br0: Could not set route: Nexthop has invalid gateway. Network is unreachable

If I run "sudo netplan apply", either after logging in or as a @reboot cron job, the bridge then connects with no problem.

If I change br0 to dhcp4: yes (and remove addresses, gateway4 and nameservers), br0 connects automatically on bootup. I can tweak dnsmasq on the router so that the machine gets the IP I want every time, but I'd prefer to be able to set a static IP address and have it work.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: netplan.io 0.98-0ubuntu4
ProcVersionSignature: Ubuntu 5.4.0-21.25-generic 5.4.27
Uname: Linux 5.4.0-21-generic x86_64
ApportVersion: 2.20.11-0ubuntu26
Architecture: amd64
CasperMD5CheckResult: skip
Date: Sat Apr 11 22:44:49 2020
InstallationDate: Installed on 2020-04-08 (3 days ago)
InstallationMedia: Xubuntu Core 20.04 - amd64 - 20200403
SourcePackage: netplan.io
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Jane Atkinson (irihapeti) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in netplan.io (Ubuntu):
status: New → Confirmed
Revision history for this message
Kees Bakker (keestux) wrote :

Same situation for me. I installed Ubuntu 20.04 (beta) on a new
server and used the exact same netplan setup as on an Ubuntu 18.04 server.

At startup it hangs for a long time at "Wait for Network to be Configured"
which never succeeds. Eventually I can login, but the network did not
get up.

This is quite annoying since it is now impossible to remotely reboot.
Well, I can reboot, but then the system remains offline. :-(

Indeed "systemctl restart systemd-networkd" completes without error, and
the bridge is up.

To me it is not clear whether this is a bug in netplan or in systemd-networkd or in the combination of the two.

Revision history for this message
Kees Bakker (keestux) wrote :

A bit of logging from journalctl

Apr 22 11:06:21 ijssel systemd[1]: Starting Network Service...
Apr 22 11:06:22 ijssel systemd-networkd[1006]: br0: netdev ready
Apr 22 11:06:22 ijssel systemd-networkd[1006]: Enumeration completed
Apr 22 11:06:22 ijssel systemd[1]: Started Network Service.
Apr 22 11:06:22 ijssel systemd-networkd[1006]: br0: IPv6 successfully enabled
Apr 22 11:06:22 ijssel systemd-networkd[1006]: eno2: IPv6 successfully enabled
Apr 22 11:06:22 ijssel systemd-networkd[1006]: br0: Link UP
Apr 22 11:06:22 ijssel systemd-networkd[1006]: br0: Gained carrier
Apr 22 11:06:22 ijssel systemd-networkd[1006]: eno2: Link UP
Apr 22 11:06:22 ijssel systemd-networkd[1006]: br0: Lost carrier
Apr 22 11:06:22 ijssel systemd-networkd[1006]: eno1: Link UP
Apr 22 11:06:22 ijssel systemd-networkd[1006]: br0: Could not set route: Nexthop has invalid gateway. Network is unreachable
Apr 22 11:06:22 ijssel systemd-networkd[1006]: br0: Failed
Apr 22 11:06:25 ijssel systemd-networkd[1006]: eno2: Gained carrier
Apr 22 11:06:26 ijssel systemd-networkd[1006]: eno1: Gained carrier
Apr 22 11:06:26 ijssel systemd-networkd[1006]: br0: Gained carrier
Apr 22 11:06:27 ijssel systemd-networkd[1006]: eno2: DHCPv4 address 172.16.16.120/22 via 172.16.16.1
Apr 22 11:06:27 ijssel systemd-networkd[1006]: eno2: Gained IPv6LL

Now compare that with the same (working) setup on Ubuntu 18.04

mrt 20 17:44:02 maas systemd[1]: Starting Network Service...
mrt 20 17:44:02 maas systemd-networkd[983]: br0: netdev ready
mrt 20 17:44:02 maas systemd-networkd[983]: Enumeration completed
mrt 20 17:44:02 maas systemd[1]: Started Network Service.
mrt 20 17:44:02 maas systemd-networkd[983]: lo: Link is not managed by us
mrt 20 17:44:02 maas systemd-networkd[983]: eno2: Link is not managed by us
mrt 20 17:44:02 maas systemd-networkd[983]: eno1: Link is not managed by us
mrt 20 17:44:06 maas systemd-networkd[983]: eno1: Gained carrier
mrt 20 17:44:06 maas systemd-networkd[983]: eno1: Configured
mrt 20 17:44:06 maas systemd-networkd[983]: br0: Gained carrier
mrt 20 17:44:07 maas systemd-networkd[983]: eno1: Gained IPv6LL
mrt 20 17:44:08 maas systemd-networkd[983]: br0: Gained IPv6LL
mrt 20 17:44:08 maas systemd-networkd[983]: br0: Configured

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

Yes, it certainly seems like it's the same problem; I'm going to mark this as a dup of that bug.

Revision history for this message
Sylvain Le Blanc (naz9ul) wrote :

Hi, please make shure that we are not running in circle with both bug mark as duplicate has each other...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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