Score:1

802.1q vlan naming in Debian 10

es flag

Upgrading router and facing problem VLAN interfaces does not go up (error "Unknown interface" if perform 'ifup vlanxxx') if vlans are defined in following manner:

auto vlanxxx
iface vlanxxx inet static
vlan-raw-device eno1
address 192.168.0.1
netmask 255.255.255.0

but it does load if I change VLAN names definition in following manner:

auto eno1.xxx
iface eno1.xxx inet static
address 192.168.0.1
netmask 255.255.255.0

in https://wiki.debian.org/NetworkConfiguration#Manual_config both VLAN naming convention are described, what am I doing wrong?

Score:0
cl flag
A.B

You are most certainly lacking the add-on package vlan:

ifupdown integration for vlan configuration

This package contains integration scripts for configuring vlan interfaces via ifupdown (/etc/network/interfaces). For further details see vlan-interfaces(5) man page in this package.

It also suggests that its VLAN support is limited and one should use one's own iproute2 commands anyway.

Without this add-on package, vlan-raw-device is not a valid command, while interfaces(5) still documents direct support for the interface.VID scheme.


Historically the main use of this package was to provide the vconfig command: it's still provided, but this command has been entirely replaced by ip link commands in the add-on scripts. Now, its main use is to provide the additional VLAN-related commands for ifupdown. About the same goes with the package bridge-utils: not really for its obsolete (but strangely still widely in use) brctl command but for its ifupdown configuration add-on, which still does rely on brctl though.


There is also a complete reimplementation available with the ifupdown2 package which doesn't rely on any obsolete command nor add-on and is mostly (but not completely) compatible, and there might possibly be in the future a new Debian implementation called ifupdown-ng.

user2956477 avatar
es flag
Look like I have it installed: command `apt-get install vlan` give me `vlan is already the newest version (2.0.5).`
user2956477 avatar
es flag
Just found if prepend this line `post-up ip link add name vlan46 link eno1 type vlan id 46` and this line `pre-down ip link delete dev vlan46 type vlan` before vlan definition and reboot machine, than VLAN is up. I can perform `ifdown vlan46` but nothing more untill next reboot. ifup vlan46` cause error 'cannot find device "vlan46"'
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.