Rev | Author | # | Line |
---|---|---|---|
6 | AristotlePagaltzis | 1 | [VLAN]s under [Linux] are fairly trivial to set up. You’ll need to make sure your switch is passing [VLAN]-tagged frames to you. |
1 | DanielLawson | 2 | |
6 | AristotlePagaltzis | 3 | There are some [VLAN] tools you’ll need – on a [Debian]-based system, <tt>apt-get install vlan</tt> will fix you up. Once you have the tools installed, you can add a [VLAN] to a physical interface with the <tt>vconfig</tt> command: |
1 | DanielLawson | 4 | |
6 | AristotlePagaltzis | 5 | <verbatim> |
6 | vconfig add eth0 1234 | ||
7 | vconfig add eth0 2000 | ||
8 | </verbatim> | ||
1 | DanielLawson | 9 | |
6 | AristotlePagaltzis | 10 | These commands will add two [VLAN]s, 1234 and 2000, to the physical <tt>eth0</tt> device, and create two new interfaces, <tt>eth0.1234</tt> and <tt>eth0.2000</tt>. These interfaces still need to be configured with ifconfig(8). |
1 | DanielLawson | 11 | |
6 | AristotlePagaltzis | 12 | Note that you’ll probably have to stop using the raw physical device. Just use the [VLAN] interfaces. |
1 | DanielLawson | 13 | |
6 | AristotlePagaltzis | 14 | !! [VLAN]s and [Debian]’s interfaces file |
1 | DanielLawson | 15 | |
6 | AristotlePagaltzis | 16 | [Debian] has some fairly nice integration with the [VLAN] tools. You have a choice of methods to use: |
1 | DanielLawson | 17 | |
6 | AristotlePagaltzis | 18 | * This one will work out which [Ethernet] device you are using based on the stub of the device name (don’t get it confused with an aliased [IP] address though!): |
1 | DanielLawson | 19 | |
6 | AristotlePagaltzis | 20 | <verbatim> |
21 | auto eth0.1234 | ||
22 | iface eth0.1234 inet dhcp | ||
23 | </verbatim> | ||
1 | DanielLawson | 24 | |
6 | AristotlePagaltzis | 25 | * This one renames the interface to something easier to read, but you need to specify which [Ethernet] device you are using: |
1 | DanielLawson | 26 | |
6 | AristotlePagaltzis | 27 | <verbatim> |
28 | auto vlan1234 | ||
29 | iface vlan1234 inet dhcp | ||
30 | vlan-raw-device eth0 | ||
31 | </verbatim> | ||
1 | DanielLawson | 32 | |
6 | AristotlePagaltzis | 33 | Both formats also have an option to have the [VLAN] interface name zero-padded to four digits, eg: <tt>eth0.1</tt> or <tt>eth0.0001</tt>, <tt>vlan1</tt> or <tt>vlan0001</tt>. |
4 | CraigBox | 34 | |
6 | AristotlePagaltzis | 35 | __Note:__ you cannot mix differing formats within the same machine (even using one form in <tt>interface</tt> and a different form from some other configuration system). |
4 | CraigBox | 36 | |
6 | AristotlePagaltzis | 37 | Read the <tt>vlan-interfaces</tt> ManPage for more information. |
38 | |||
39 | ---- | ||
5 | AristotlePagaltzis | 40 | Part of CategoryNetworking |
lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 2 times)