8021q
module is loaded by default. If necessary, you can make sure that the module is loaded by issuing the following command as root
:
~]# modprobe --first-time 8021q
modprobe: ERROR: could not insert '8021q': Module already in kernel
To display information about the module, issue the following command:
~]$ modinfo 8021q
See the modprobe(8)
man page for more command options.
/etc/sysconfig/network-scripts/ifcfg-ethX
, where X is a unique number corresponding to a specific interface, as follows:
DEVICE=ethX TYPE=Ethernet BOOTPROTO=none ONBOOT=yes
/etc/sysconfig/network-scripts/
directory. The configuration file name 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 is eth0, then the configuration file name should be ifcfg-eth0.192
:
DEVICE=ethX.192 BOOTPROTO=none ONBOOT=yes IPADDR=192.168.1.1 NETMASK=255.255.255.0 NETWORK=192.168.1.0 VLAN=yes
eth0.193
with the VLAN configuration details.
root
issue the following command:
~]# systemctl restart network