centos 网卡创建vlan接口
vim /etc/sysconfig/network-scripts/ifcfg-ens32
TYPE=Ethernet
BOOTPROTO=none
DEVICE=ens32
ONBOOT=yes
# vlan 200
vim /etc/sysconfig/network-scripts/ifcfg-ens32.200
DEVICE=ens32.200
BOOTPROTO=none
ONBOOT=yes
IPADDR=172.168.1.10
PREFIX=24
NETWORK=172.168.1.0
VLAN=yes
# vlan 300
vim /etc/sysconfig/network-scripts/ifcfg-ens32.300
DEVICE=ens32.300
BOOTPROTO=none
ONBOOT=yes
IPADDR=172.168.2.10
PREFIX=24
NETWORK=172.168.2.0
VLAN=yes
# 重启网络后验证
systemctl restart network
原文地址:https://blog.csdn.net/sj349781478/article/details/140569284
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!