netplan networkd - bridge configuration not work

Bug #1860781 reported by Alexey Smovzh
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
netplan.io (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Ubuntu: 18.04.3 LTS bionic

Kernel: 4.15.0-70-generic

1. configure network bridge with brctl with following commands and all works fine:

sudo brctl addbr br-ex
sudo brctl addif br-ex enp0s3
sudo ip link set mtu 1500 dev br-ex
sudo ip addr del 10.64.10.100/24 brd 10.64.10.255 dev enp0s3
sudo ip addr replace 10.64.10.100/24 brd 10.64.10.255 dev br-ex
sudo ip link set br-ex up
sudo ip -f inet r replace default via 10.64.10.1 dev br-ex

2. configure the same network bridge with netplan and NetworkManager as renderer with following config all works fine:

network:
  version: 2
  renderer: NetworkManager
  ethernets:
    enp0s3:
      dhcp4: no
      dhcp6: no
  bridges:
    br-ex:
      interfaces: [enp0s3]
      addresses: [10.64.10.100/24]
      gateway4: 10.64.10.1
      mtu: 1500
      nameservers:
        addresses: [8.8.8.8]
      dhcp4: no
      dhcp6: no
      parameters:
        stp: no

3. Configure network bridge with same config but with networkd as network renderer does not work
networkctl - shows that interfaces are managed by networkd and its ok
ip a - shows proper bridge configuration and ip address assignment
ip route - shows proper route via 10.64.10.1 and br-ex dev
No any error messages in systemd-networkd service log
But network don't work
I can't ping external hosts from this machine or ping this machine from external host

  network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s3:
      dhcp4: no
      dhcp6: no
  bridges:
    br-ex:
      interfaces: [enp0s3]
      addresses: [10.64.10.100/24]
      gateway4: 10.64.10.1
      mtu: 1500
      nameservers:
        addresses: [8.8.8.8]
      dhcp4: no
      dhcp6: no
      parameters:
        stp: no

Can it be that i mislead some required by networkd configuration parameter?
Or may be networkd does not set some kernel parameter which brctl and NetworkManager does?

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1860781/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → netplan.io (Ubuntu)
tags: added: bionic
Revision history for this message
Alexey Smovzh (alexeysmovzh) wrote :

In systemd-networkd documentation found that networkd assign different MAC address to the bridge than physical interface has and this my lead to some connection issues. To avoid this problems you must specify MAC address to bridge interface same as on your physical device.
After I add proper MAC address to bridge interface configuration start working.

New working config:

network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s3:
      dhcp4: no
      dhcp6: no
  bridges:
    br-ex:
      macaddress: 08:00:27:0b:07:94
      interfaces: [enp0s3]
      addresses: [10.64.10.100/24]
      gateway4: 10.64.10.1
      mtu: 1500
      nameservers:
        addresses: [8.8.8.8]
      dhcp4: no
      dhcp6: no
      parameters:
        stp: no

I suggest this MAC address issue should be mentioned in Netplan documentation.
Particular in examples page (https://netplan.io/examples) because it appear as first result when googling how to configure network with netplan.

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
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.