lsmod | grep 8021q
modprobe 8021q
/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
. 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 is eth0
, then the configuration filename should be ifcfg-eth0.192
:
DEVICE=ethX.192 BOOTPROTO=static ONBOOT=yes IPADDR=192.168.1.1 NETMASK=255.255.255.0 USERCTL=no NETWORK=192.168.1.0 VLAN=yes
eth0
, add a new file with the name eth0.193
with the VLAN configuration details.
root
:
systemctl restart network.service