天天看點

centos7劃分vlan

1. lsmod|grep 8021q  确認核心是夠載入了802.1q模組

2.modprobe -a 8021q   如果沒載入使用這個指令載入模組

centos7劃分vlan

3.配置vlan需要vconfig指令,由于centos7上沒有自帶vconfig指令,是以需要安裝vconfig

配置epel源:yum install epel-release -y

安裝vconfig:yum install vconfig -y

4.建立兩個vlan:ens33.10和ens33.20

vconfig add ens33 10

vconfig add ens33 20

centos7劃分vlan

5.通過ip -a或者ifconfig -a檢視。完成!

centos7劃分vlan