fails to set up a bridged network interface

Bug #1430675 reported by Timo Aaltonen
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Incomplete
High
Unassigned

Bug Description

I have a simple bridge set up in /etc/network/interfaces so that the virtual machines running on that machine can use it and be on the same subnet. But with systemd it's not started on boot. The bridge is configured as follows

auto br0
iface br0 inet dhcp
 bridge_ports eth0
 bridge_stp off
 bridge_maxwait 5

reproduced now on a fresh vm.

Tags: systemd-boot
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

hrm, though on the vm 'ifup br0' says 'no such device' when the same worked on my desktop/server.

Martin Pitt (pitti)
tags: added: systemd-boot
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Ok after installing bridge-utils I get br0 _and_ eth0 devices show up on ifconfig, and br0 was started fine. But it didn't start on my workstation..

Revision history for this message
Martin Pitt (pitti) wrote :

OK, as we don't have a reproducer, I need some further logs. Right after booting, can you please give me the output of

   systemctl --all|grep ifup
   journalctl -u ifup-wait-all-auto.service
   systemctl status <email address hidden>

Thanks!

Changed in systemd (Ubuntu):
status: New → Incomplete
Martin Pitt (pitti)
Changed in systemd (Ubuntu):
importance: Undecided → High
Revision history for this message
Martin Pitt (pitti) wrote :

Can you please try with current vivid? There were some ifup@ fixes recently.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

I'll do that. Here's the debug output anyway, which I forgot to attach sooner..

Revision history for this message
Philip Muškovac (yofel) wrote :

I tried again on current vivid, br0 is still not auto-starting. Here's the logs

Revision history for this message
zoolook (nbensa) wrote :

I found this in dmesg:

[ 10.604132] systemd[1]: /usr appears to be on its own filesystem and is not already mounted. This is not a supported setup. Some things will probably break (sometimes even silently) in mysterious ways. Consult http://freedesktop.org/wiki/Software/systemd/separate-usr-is-broken for more information.

I use separated /usr. What about you Timo and Philip?

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

nope, I don't have separate /usr

Revision history for this message
Martin Pitt (pitti) wrote :

I tried this with Philip's config, but I still can't reproduce this, I'm afraid. I launch a VM with two network cards, like this:

  qemu-system-x86_64 -enable-kvm -m 2048 -snapshot -drive file=/srv/vm/adt-vivid-amd64-cloud.img,if=virtio -net nic,model=virtio -net user -net nic,vlan=1,macaddr=10:10:10:10:10:10

This is a standard cloud image, thus eth0 comes pre-configured:

$ cat /etc/network/interfaces.d/eth0.cfg
# The primary network interface
auto eth0
iface eth0 inet dhcp

I added Philip's config:

$ cat /etc/network/interfaces.d/br.cfg
#iface eth1 inet manual

auto br0
iface br0 inet static
    address 192.168.1.5
    netmask 255.255.255.0
    gateway 192.168.1.1
    bridge_ports eth1
    bridge_stp off
    bridge_maxwait 0
    bridge_fd 0

NOTE: I tested this with and without the "iface eth1 inet manual" stanza, it works in both cases. Philip's config refers to "bridge_ports eth1" and there's no apparent ifupdown config for eth1. I don't know about Timo's config, as this is apparently not the complete interfaces file.

I also tried with a single network card and bridge, by removing /etc/network/interfaces.d/eth0.cfg and having only

$ cat /etc/network/interfaces.d/br.cfg
auto br0
iface br0 inet dhcp
    bridge_ports eth0

This now uses br0 as the "primary" connection, gets DHCP and connectivity, etc.

So I'm afraid I really need some precise information about:

  * How many network cards do you have, and which is connected to what
  * Your complete /etc/network/interfaces{,.d/*} configuration

Or perhaps you are able to reproduce this in a VM yourself?

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

all my interfaces has besides br0 is:

<--
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
-->

it's an old installation..

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

And I only have the builtin eth0 on the motherboard, nothing else. Nothing in interfaces.d either.

Revision history for this message
zoolook (nbensa) wrote :

Mine is an old install too.

In my case, I have 3 nics. Nothing in interfaces.d/

br0 is my lan
br1 wan (behind router)
br2 is not connected, and no, I don't want an ip address there unless is really necessary .

Here is my interfaces:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto eth1
iface eth1 inet manual

auto eth2
iface eth2 inet manual

auto br0
iface br0 inet static
    address 10.11.101.200/24
    bridge_ports eth0
    bridge_stp off
    bridge_fd 3
    bridge_hello 2
    up route add -net 10.99.97.0/24 gw 10.11.101.254
    up route add -net 10.8.0.0/24 gw 10.11.101.254
    up route add -net 192.168.0.0/22 gw 10.11.101.254
    up route add -net 192.168.4.0/24 gw 10.11.101.254
    up route add -net 192.168.8.0/24 gw 10.11.101.254
    up route add default gw 10.11.101.254 metric 200
    dns-nameservers 10.11.101.254 10.0.0.1
    dns-search lxc bensa.ar flacso.org.ar lan

auto br1
iface br1 inet dhcp
    bridge_ports eth1
    bridge_stp off
    bridge_fd 3
    bridge_hello 2

auto br2
iface br2 inet manual
    bridge_ports eth2
    bridge_stp off
    bridge_fd 3
    bridge_hello 2

BTW, at work I have another vivid host (only one interface) where the bridge goes up as it should:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet manual

auto br0
iface br0 inet static
    address 192.168.0.11
    netmask 255.255.252.0
    gateway 192.168.0.1
    bridge_ports eth0
    dns-nameservers 192.168.0.1 192.168.0.254
    dns-search flacso.org.ar

For now, at home, I've made a workaround for this problem with this snipped in rc.local:

ip link show dev br0 || ifup br0
ip link show dev br1 || ifup br1
ip link show dev br2 || ifup br2

Revision history for this message
Martin Pitt (pitti) wrote :

Vincent Ladeuil reported this on IRC as well, and for him the problem was that /etc/init.d/networking was disabled. I. e. there is no /etc/rcS.d/*networking symlink. Timo, Philip, zoolook, can you please check this?

If you don't have such a symlink, please run

  sudo update-r.cd networking remove
  sudo update-r.cd networking defaults

and then check if the bridge comes up alright after that?

Revision history for this message
Martin Pitt (pitti) wrote :

See also bug 1439109 which is about the missing networking symlink.

Revision history for this message
Martin Pitt (pitti) wrote :

Sorry, I typoed. The correct commands are:

  sudo update-rc.d networking remove
  sudo update-rc.d networking defaults

Revision history for this message
Vincent Ladeuil (vila) wrote :

Re-creating the symlink with the command above was enough to fix the issue for me.

Thanks !

Revision history for this message
Martin Pitt (pitti) wrote :

Timo confirmed as well, so confirming as a duplicate of bug 1439109.

Revision history for this message
zoolook (nbensa) wrote :

Fixed for me.

zoolook@venkman:~$ ls /etc/rcS.d/ | grep net
zoolook@venkman:~$ sudo update-rc.d networking remove
zoolook@venkman:~$ sudo update-rc.d networking defaults
zoolook@venkman:~$ ls /etc/rcS.d/ | grep net
   0 lrwxrwxrwx 1 root root  20 abr  8 08:23 S11networking -> ../init.d/networking*

After reboot, my three bridges came up as they should.

Thanks!

Revision history for this message
mike@papersolve.com (mike-papersolve) wrote :

I did not have to create the symlink, but once I separated my /etc/network/interfaces into 3 separate files in /etc/network/interfaces.d (along with an /etc/network/interfaces that sourced them) my bridge interface came up (although still says Unmanaged in GNOME).

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

Other bug subscribers