Wiki source code of VLAN
Version 1.1 by Sebastian Marsching on 2022/03/27 15:15
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | # Using VLANs on Debian | ||
2 | |||
3 | **Note:** For newer distributions you should consider using [Open vSwitch](https://sebastian.marsching.com/wiki/Linux/OpenVSwitch) as it much more powerful. | ||
4 | |||
5 | In order to use Linux VLAN support with Debian (Etch) you first have to install the `vlan` package. | ||
6 | |||
7 | VLAN interfaces (like other interfaces) are managed in '/etc/network/interfaces'. | ||
8 | |||
9 | Example: | ||
10 | |||
11 | auto eth1 | ||
12 | iface eth1 inet static | ||
13 | address 192.168.0.1 | ||
14 | netmask 255.255.255.0 | ||
15 | |||
16 | auto eth1.7 | ||
17 | iface eth1.7 inet manual | ||
18 | up ip link set dev eth1.7 up | ||
19 | up ip -f inet6 addr flush dev eth1.7 | ||
20 | down ip link set dev eth1.7 down | ||
21 | |||
22 | 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. |