Bug 81713 - networkd: Adding VLAN causes main interface to be down
Summary: networkd: Adding VLAN causes main interface to be down
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Tom Gundersen
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-24 11:34 UTC by freedesktop
Modified: 2014-08-19 16:08 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description freedesktop 2014-07-24 11:34:17 UTC
I have installed a fresh archlinux install in virtualbox, installing only base, base-devel, and grub.

I've then built systemd-git pkgbuild and installed.

The following is the simplest configuration I've found that does not work.
The vlan gets added, however all of the interfaces are down, and need to be bought up manually. I've tried with a second vlan, to the same effect. The only way I've found to have the main interface come up on boot, is to not include the vlans.

CONFIG:
----------------------------
enp0s3.network
----------------------------
[Match]
Name=enp0s3

[Network]
VLAN=vlan2
----------------------------


----------------------------
vlan2.netdev
----------------------------
[NetDev]
Name=vlan2
Kind=vlan

[VLAN]
Id=2
----------------------------


----------------------------
vlan2.network
----------------------------
[Match]
Name=vlan2

[Network]
Address=192.168.6.1/24
----------------------------

I've been able to replicate this on two other archlinux machines.

The output of "ip a" with the above configuration after boot is below:
----------------------------
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    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
2: enp0s3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 08:00:27:96:01:af brd ff:ff:ff:ff:ff:ff
3: vlan2@enp0s3: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN group default
    link/ether 86:9c:35:e5:cb:51 brd ff:ff:ff:ff:ff:ff
    inet 192.168.6.1/24 brd 192.168.6.255 scope global vlan2
       valid_lft forever preferred_lft forever
----------------------------


Manually running "ip link set enp0s3 up", makes things work as expected.
What also works, is rebooting with the VLAN line commented out of enp0s3.network, after the system has booted, re-add the line and restart systemd-networkd.service, and everything is working as it should.

There is nothing of note in journal logs for systemd-networkd in the virtualbox environment.

On a box which is running systemd 215-4, the following is present after boot:

Assertion 'link->manager->rtnl' failed at src/network/networkd-address.c:306, function address_configure(). Aborting.

This machine is bringing up two vlans.

This config worked in systemd 214-2.
Comment 1 freedesktop 2014-07-25 04:12:17 UTC
Made a mistake in the issue, it was broken in systemd 214. 213 was when it was last working.

I've uploaded a VirtualBox disk image where the issue is happening.

The image is configured to have root autologin.

In roots home, there is a "configs" directory, which has a couple of examples that I've been wanting to have work. Only the "static" one has worked so far.

The last one, actually contains a udev rule that calls a systemd service, which is the config currently active.

The image is available at: http://techmunk.com/test.vdi.bz2

The image is bz2 compressed, and is a ~770MB download.
Comment 2 Tom Gundersen 2014-08-19 16:08:54 UTC
Thanks for the report, and sorry for the delay in getting back to you!

I think I fixed the bug in current git, but please reopen if the problem persists for you!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.