Wiki source code of VLAN
Last modified by Sebastian Marsching on 2022/05/29 13:57
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
1.1 | 1 | # Using VLANs on Debian |
2 | |||
![]() |
2.1 | 3 | **Note:** For newer distributions you should consider using [[Open vSwitch|doc:Linux.Open_vSwitch.WebHome]] as it much more powerful. |
![]() |
1.1 | 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. |