[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#921919: vlan: Double-tagging interfaces (dot1ad) doesn't work



Package: vlan
Version: 1.9-3.2+b1
Severity: normal

Configuring more than one level of VLAN tagging in
/etc/network/interfaces doesn't work.  I attempted to do so as
follows:

auto eth0
iface eth0 inet static
 address 10.0.0.1
 netmask 255.255.255.0

auto eth0.2
iface eth0.2 inet manual
 vlan_raw_device eth0

auto eth0.2.9
iface eth0.2.9 inet static
 address 192.0.2.1
 netmask 255.255.255.0
 vlan_raw_device eth0.2

I then bring up the interfaces in sequence.  When I get to eth0.2.9
(last), I get:

# ifup eth0.2.9
RTNETLINK answers: File exists
ifup: ignoring unknown interface eth0.2.9=eth0.2.9

If I manually run vconfig to create the interface first, then it works
(with some warnings):

# vconfig add eth0.2 9
Added VLAN with VID == 9 to IF -:eth0.2:-
# ifup eth0.2.9
ERROR: trying to add VLAN #9 to IF -:eth0.2:-  error: File exists
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config

It looks like that this is because of a problem in
/etc/network/if-pre-up.d/vlan, which appears to still be present in
the git master version:
https://salsa.debian.org/debian/vlan/blob/debian/debian/network/if-pre-up.d/vlan

VLAN_ID:

$ echo eth0.2.9 | sed
"s/eth[0-9][0-9]*\.0*//g;s/bond[0-9][0-9]*\.0*//g;s/wlan[0-9][0-9]*\.0*//g;s/em[0-9][0-9]*\.0*//g;s/p[0-9][0-9]*\(p[0-9][0-9]*\)\?\(_[0-9][0-9]*\)\?\.0*//g"
2.9

IF_VLAN_RAW_DEVICE:

$ echo eth0.2.9 | sed
"s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/;s/\(em[0-9][0-9]*\)\..*/\1/;s/\(p[0-9][0-9]*\(p[0-9][0-9]*\)\?\(_[0-9][0-9]*\)\?\)\..*/\1/"
eth0

These values are incorrect, and should be "9" and "eth0.2" respectively.

I was able to work around this by adding "up /sbin/vconfig add eth0.2
9" to the "eth0.2" iface configuration.

-- System Information:
Debian Release: 9.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-8-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8),
LANGUAGE=en_AU:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages vlan depends on:
ii  iproute2  4.9.0-1+deb9u1
ii  libc6     2.24-11+deb9u3

vlan recommends no packages.

vlan suggests no packages.

-- no debconf information


Reply to: