centos7划分vlan

1. lsmod|grep 8021q  确认内核是够载入了802.1q模组

2.modprobe -a 8021q   如果没载入使用这个命令载入模组

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

5.通过ip -a或者ifconfig -a查看。完成!

原文地址:https://www.cnblogs.com/lkun/p/10955517.html