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

 

相关文章:

  • 2021-04-30
  • 2022-12-23
  • 2021-08-10
  • 2021-12-06
  • 2021-09-04
  • 2021-04-03
  • 2021-11-25
  • 2021-05-12
猜你喜欢
  • 2021-07-14
  • 2021-04-15
  • 2021-12-27
  • 2021-11-30
  • 2022-02-06
相关资源
相似解决方案