如下为PC创建vlan 的基本操作:
1,//关闭防火墙
root#systemctl stop firewalld
2,//创建vlan vlan号为10
root#ip link add link p4p1 name p4p1.10 type vlan id 10
3,//添加vland的IP
root#ip addr add x.x.x.x/x dev p4p1.10
4, //up设备
root#ip link set dev p4p1 up //先
5,//up vlan
root#ip link set dev p4p1.10 up //后
6,//查看vlan配置情况
root#ip link
7,//查看路由
root# ip route
8,//