Rate this page

Flattr this

Configure an Ethernet interface as a VLAN trunk


To configure an Ethernet interface as an IEEE 802.1Q VLAN trunk.


There are two ways to connect a machine to a switch that carries 802.1Q VLANs:

The advantage of a tagged port is that it allows multiple VLANs to be carried by a single physical bearer. The disadvantage is that the machine in question must support 801.q and be configured to use it. Typical practice is to use tagged ports for machines that need to talk to multiple VLANs and untagged ports for everything else.

You need to know whether the port being presented to a machine is tagged or untagged. These instructions apply if and only if it is a tagged port.

VLANs are numbered from 1 to 4094 inclusive (the values 0 and 4095 are reserved). Some manufacturers (including Cisco) additionally recommend that VLAN 1 be reserved for management purposes.


There are two incompatible methods for configuring network interfaces that are in common use by GNU/Linux distributions: the Debian method (using the file /etc/network/interfaces) and the Red Hat method (using files in /etc/sysconfig/network-scripts/). You must use the appropriate method for your system:

See also

Tags: 802.1q | ethernet | vlan