The configuration of VLANs under FC/RHEL/CentOS is something that I always end up looking in the “ifup” script and experimenting around with. This is made worse by there being two different conventions that can be used for the interface naming. Here’s how I set up VLANs.
First of all, the base interface needs to be configured. Usually, it’s already got at least a stub file, which needs to be modified to have the following elements:
DEVICE=eth0 # use real interface name here
BOOTPROTO=static
HWADDR=AA:17:31:9C:8D:BC # use real MAC address here
ONBOOT=no
TYPE=Ethernet
IPADDR=0.0.0.0
NETMASK=255.255.255.0
In this example, I am configuring the device “eth0″ (the file /etc/sysconfig/network-scripts/ifcfg-eth0″, with the MAC address of “AA:17:31:9C:8D:BC”. You will need to plug in your system’s values for these two lines, and the rest should be left the same.
For “vlanX” Interfaces
If you want your interfaces named “vlanX”, use this section. The next section describes how to set it up for interfaces named “eth0.X”. The benefit of vlanX naming is that if you only have one VLAN name-space, you don’t have to care about which interface has the VLAN tagging enabled on it. If you move the physical interface, the vlan interface names stay the same, so you don’t have to modify firewall rules, etc…
Baca selebihnya »
