802.1Q
(VLAN setup) |
|||
| (One intermediate revision by one user not shown) | |||
| Line 1: | Line 1: | ||
| + | {{Old-doc}} | ||
This page describes '''VLAN tagging''' (802.1Q) setup between the switches and servers. | This page describes '''VLAN tagging''' (802.1Q) setup between the switches and servers. | ||
| Line 26: | Line 27: | ||
'''IF''' no ''native'' VLAN is used, i.e. ''all'' packets sent by the switch to this interface are tagged, then the physical device does not need to be set up separately, and its configuration should be removed, e.g. <tt>/etc/sysconfig/network-scripts/ifcfg-eth0</tt> needs to be deleted. | '''IF''' no ''native'' VLAN is used, i.e. ''all'' packets sent by the switch to this interface are tagged, then the physical device does not need to be set up separately, and its configuration should be removed, e.g. <tt>/etc/sysconfig/network-scripts/ifcfg-eth0</tt> needs to be deleted. | ||
| + | |||
| + | However, sometimes we are using VLAN tagging for one VLAN, for which a VLAN specific interface is setup using <tt>eth0.''vlannr''</tt>, and packets from the ''native'' vlan are received by device ''eth0''. In this case, eth0 should be setup as usual. This dirty setup is in use on [[benet]], for example. Please try to avoid this. | ||
Latest revision as of 23:00, 1 November 2010
This page describes VLAN tagging (802.1Q) setup between the switches and servers.
[edit] Switch
To be written
[edit] Server
Using 802.1Q on Fedora is not that hard. First, enable 802.1Q support by putting
VLAN=yes
in /etc/sysconfig/network. Use the exact same casing, or it won't work.
Every VLAN to which the server needs to be connected gets its own virtual interface on top of the real, physical interface. For example, VLAN 2 connected to eth0 becomes eth0.2.
To make use of an interface in VLAN 2, create a file eth0-interfacename in /etc/sysconfig/network-scripts/ as usual. For example:
DEVICE=eth0.2 BOOTPROTO=static IPADDR=10.0.0.14 NETMASK=255.255.0.0 ONBOOT=yes TYPE=Ethernet REORDER_HDR=no
Repeat this for every VLAN the server needs an interface in.
IF no native VLAN is used, i.e. all packets sent by the switch to this interface are tagged, then the physical device does not need to be set up separately, and its configuration should be removed, e.g. /etc/sysconfig/network-scripts/ifcfg-eth0 needs to be deleted.
However, sometimes we are using VLAN tagging for one VLAN, for which a VLAN specific interface is setup using eth0.vlannr, and packets from the native vlan are received by device eth0. In this case, eth0 should be setup as usual. This dirty setup is in use on benet, for example. Please try to avoid this.