N—WAN多拨图文教程:实现在支持VLAN的路由器上实现多拨.doc
文本预览下载声明
N-WAN配置图文教程
感谢飞翔老大的劳动成果:
1.首先将你的路由配置好,保证能单WAN状态,能正常拨号上网
设置参考 HYPERLINK /bbs/viewthread.php?tid=28extra=page%3D1 \t _blank OpenWrt 快速上网配置教程
HYPERLINK /bbs/viewthread.php?tid=28extra=page%3D1 /bbs/viewthread.php?tid=28extra=page%3D1
2.安装macvlan
在浏览器内输入你的 路由地址
登陆后 点右侧的
然后点击 左边 SystemSoftware
点击 update package lists
完成后查找macvlan 点击 install
3、putty软件,登陆 路由 执行下面的程序
opkg update
opkg install ip iptables iptables-utils iptables-mod-conntrack iptables-mod-conntrack-extra iptables-mod-ipopt
4、配置rc.local文件
使用 winscp软件 登陆你的路由
登陆过程全部点确定就可以了
右侧是你的路由器文件
编辑 /etc/rc.local文件 右键-编辑
增加
ip link add link eth1.1 eth2 type macvlan // eth0.1 根据你的路由配置填,rg100a-aa是这个,rg100a-ee和中兴H618B是eth0.1
ifconfig eth2 hw ether 00:11:22:33:44:5E //MAC 自己随意填写
ifconfig eth2 up
ip link add link eth1.1 eth3 type macvlan // 第三个虚拟WAN,需要更多自己加
ifconfig eth3 hw ether 00:11:22:33:44:5F
ifconfig eth3 up
注:我的是rg100a-aa,配置的是五拨,如果你的和我的一样,你可以直接复制替换里面的所有内容:
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
ip link add link eth1.1 eth2 type macvlan
ifconfig eth2 hw ether 00:11:22:33:44:5E
ifconfig eth2 up
ip link add link eth1.1 eth3 type macvlan
ifconfig eth3 hw ether 00:11:22:33:44:5F
ifconfig eth3 up
ip link add link eth1.1 eth4 type macvlan
ifconfig eth4 hw ether 00:11:22:33:44:5d
ifconfig eth4 up
ip link add link eth1.1 eth5 type macvlan
ifconfig eth5 hw ether 00:11:22:33:44:5C
ifconfig eth5 up
exit 0
完后按上面的保存按钮
5、配置 /etc/config/network
在winscp下找到network 右键编辑
config interface wan
option ifname eth1.1 // 这个是原来的WAN接口名称 前面的和这里要一样
option proto pppoe
option password 用户名
option username 密码
option peerdns 1
option defaultroute 1
option macaddr DA:FE:B8:98:07:3A //增加随便改
以上是原来配置有的下面的是增加的
config interface wan2 //增加WAN2
option ifname eth2 // 这个和rc.local里wan2口定义的一样,其实都是指向eth1.1,这里填写eth1.1也可以
opti
显示全部