您的位置:首页 > 运维架构 > Linux

openwrt/lede配置单臂路由,centos7开启vlan支持,小记

2017-10-15 21:04 2146 查看
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生效。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: