VLAN

Last modified by Sebastian Marsching on 2022/05/29 13:57

Using VLANs on Debian

Note: For newer distributions you should consider using Open vSwitch as it much more powerful.

In order to use Linux VLAN support with Debian (Etch) you first have to install the vlan package.

VLAN interfaces (like other interfaces) are managed in '/etc/network/interfaces'.

Example:

auto eth1
iface eth1 inet static
        address 192.168.0.1
        netmask 255.255.255.0

auto eth1.7
iface eth1.7 inet manual
        up ip link set dev eth1.7 up
        up ip -f inet6 addr flush dev eth1.7
        down ip link set dev eth1.7 down

This example will configure the interface eth1 with a static IPv4 address and create an interface for VLAN 7 (on eth1) which does not have any IP addresses. The line up ip -f inet6 addr flush dev eth1.7 removes the automatically configured link-local IPv6 address.