Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
LinuxVlanNotes
Edit
PageHistory
Diff
Info
LikePages
[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. 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: <verbatim> vconfig add eth0 1234 vconfig add eth0 2000 </verbatim> 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). Note that you’ll probably have to stop using the raw physical device. Just use the [VLAN] interfaces. !! [VLAN]s and [Debian]’s interfaces file [Debian] has some fairly nice integration with the [VLAN] tools. You have a choice of methods to use: * 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!): <verbatim> auto eth0.1234 iface eth0.1234 inet dhcp </verbatim> * This one renames the interface to something easier to read, but you need to specify which [Ethernet] device you are using: <verbatim> auto vlan1234 iface vlan1234 inet dhcp vlan-raw-device eth0 </verbatim> 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>. __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). Read the <tt>vlan-interfaces</tt> ManPage for more information. ---- Part of CategoryNetworking
3 pages link to
LinuxVlanNotes
:
802.1q
XenNetworking
VLAN