VLAN-INTERFACES(5)
β¨ VLAN-INTERFACES β¨ (that's the vlan manpage bestie π
)
okay so this is the manual page for vlan β it's a file format page, sitting at section 5, and it's all about the vlan glow-up for /etc/network/interfaces. π¦
πΈ NAME πΈ
/etc/network/interfaces (vlan) β the vlan extensions for the interfaces(5) file format. that's it, that's the name, no notes. π
π« DESCRIPTION π«
/etc/network/interfaces is where all the network interface configuration lives, and it's what ifup(8) and ifdown(8) read when they do their thing. β¨
this page is specifically about the vlan extensions to the standard interfaces(5) format. not the whole format, just the vlan part. iykyk. π
so there's two kinds of extensions going on here:
- primary extensions β these make vlan interfaces and destroy vlan interfaces. the main characters. π
- secondary extensions β these do ipv4 interface manipulation, and you lowkey generally need them when you're running (a lot of) vlans.
π§ VLAN CREATION π§
a vlan interface definition is made of two things: the vlan interface name, and an optional raw-device parameter. that's the whole recipe bestie. π
vlan interfaces are numbered 1 to 4095. β
and here's the fun part β you get to choose how your interface names look: you can have them zero-padded to 4 numbers, or just the plain digits with no leading zero. both are valid, they just give you different names.
the following example shows four ways to create a vlan with id 1 on interface eth0. and no cap β they all result in different names. π
iface eth0.1 inet static
address 192.168.1.1
netmask 255.255.255.0
iface vlan1 inet static
vlan-raw-device eth0
address 192.168.1.1
netmask 255.255.255.0
iface eth0.0001 inet static
address 192.168.1.1
netmask 255.255.255.0
iface vlan0001 inet static
vlan-raw-device eth0
address 192.168.1.1
netmask 255.255.255.0
# We don't have br support out of the box
iface br0.2 inet static
vlan-raw-device br0
address 192.168.1.1
netmask 255.255.255.0
# Aliases are ignored
iface br0.2:1 inet static
address 192.168.1.1
netmask 255.255.255.255
see how eth0.1 and vlan1 and eth0.0001 and vlan0001 are all the same vlan id but four totally different names? that's the zero-padding situation right there. π«Ά
also peep the comments: no br support out of the box, and aliases are ignored. noted. π
π EXTRA IFACE OPTIONS π
usually if you're out here using vlans, you also wanna do some other little manipulations with the ip stack or the interface. relatable honestly. so here's the extra options:
vlan-raw-devicedevicename β tells it which device to create the vlan on. β οΈ this one gets ignored when the devicename is already part of the vlan interface name. so if it's in the name, you don't need to say it again.ip-proxy-arp0|1β turns proxy-arp off (0) or on (1) for this specific interface. and yes bestie, this also works on plain ethernet-like devices. β¨ip-rp-filter0|1|2β sets the return path filter for this specific interface. same deal, this also works on plain ethernet-like devices. πhw-mac-addressmac-address β this sets the mac address of the interface before bringing it up. works on any device that lets you set the hardware address with theipcommand. π₯
π AUTHOR π
this manpage was adapted from interfaces(5) by Ard van Breemen <ard@kwaak.net> β shoutout to them, real ones. π
π SEE ALSO π
π and that's the whole page bestie, you ate it. go forth and vlan responsibly. π β¨
so this page is from the vlan manual and it's dated September 30 2007 β yeah it's giving vintage but it still serves. mwah. ππ¦πΈ
π¦ where this page comes from
- debian bookworm: vlan 2.0.5 Β· GPL-2.0-or-later
- ubuntu jammy: vlan 2.0.5ubuntu5 Β· GPL-2.0-or-later
- ubuntu noble: vlan 2.0.5ubuntu5 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms