1,lede单臂路由配置,vi /etc/config/network,
添加如下内容
- config switch_vlan
- option device eth0
- option vlan 0
- option ports "1 2"
修改
interface lan的ifname为eth0.1,interface wan和wan6的ifname为eth0.2
保存后重启生效。
2,配置centos7 vlan支持,vlan id 假定为1
modprobe 8021q
cd /etc/sysconfig/network-scripts/
cp ifcfg-enp0s3 ifcfg-enp0s3.1
vi ifcfg-enp0s3,修改BOOTPROTO=none
vi ifcfg-enp0s3.1,删除TYPE=Ethernet,添加VLAN=yes,修改DEVICE=enp0s3.1
保存后systemctl restart network生效。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)