Skills/RedHat, CentOS
9.2.6. Setting Up 802.1q VLAN Tagging
로샤스
2014. 7. 31. 03:25
.2.6. Setting Up 802.1q VLAN Tagging
- Ensure that the module is loaded by entering the following command:
lsmod | grep 8021q
- If the module is not loaded, load it with the following command:
modprobe 8021q
- Configure your physical interface in
/etc/sysconfig/network-scripts/ifcfg-eth
, whereX
X
is a unique number corresponding to a specific interface, as follows:DEVICE=ethX TYPE=Ethernet BOOTPROTO=none ONBOOT=yes
- Configure the VLAN interface configuration in
/etc/sysconfig/network-scripts
. The configuration filename should be the physical interface plus a.
character plus the VLAN ID number. For example, if the VLAN ID is 192, and the physical interface iseth0
, then the configuration filename should beifcfg-eth0.192
:DEVICE=ethX.192 BOOTPROTO=none ONBOOT=yes IPADDR=192.168.1.1 NETMASK=255.255.255.0 USERCTL=no NETWORK=192.168.1.0 VLAN=yes
If there is a need to configure a second VLAN, with for example, VLAN ID 193, on the same interface,eth0
, add a new file with the nameeth0.193
with the VLAN configuration details. - Restart the networking service, in order for the changes to take effect, as follows:
service network restart
출처 : https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s2-networkscripts-interfaces_802.1q-vlan-tagging.html