赞
踩
Openwrt单wan口N拨教程
使用macvlan+multiwan单线多拨成功,带宽叠成功
1准备能刷Openwrt路由一台
Openwrt下载地址
www.openwrt.org.cn中文版本下载 可能不支持你的路由
http://downloads.openwrt.org/backfire/10.03/英文版 下载相对应的软件版本
2软件putty软件远程登陆路由用SecureCRT
下载地址http://www.crsky.com/soft/6838.html
3.刷新路由的固件从 dd-wrt或者 tomato都可以直接升级
Tftp应该也可以的
升级后将电脑的ip地址设置为192.168.1.X
路由默认ip 192.168.1.1用户名root密码 admin
安装软件前先要配置你的路由能上网
在nerwork下有wan口的设置pppoe拨号上网设置好,保证单wan能上网
4,安装macvlan软件
进入system ---- software –页面
先点一下
Update
然后查找macvlan点左边的install
5.安装multiwan
Multiwan软件参考https://forum.openwrt.org/viewtopic.php?id=23904
有最新版本下载地址
现在的版本
ftp://ftp.netlab7.com/multiwan_1.0.16.ipk
ftp://ftp.netlab7.com/luci-app-multiwan_1.0.16.ipk
用SecureCRT软件登陆路由端口是22
登陆后输入下面的命令
opkginstallftp://ftp.netlab7.com/multiwan_1.0.16.ipk
等待安装完成,,再安装
opkginstallftp://ftp.netlab7.com/luci-app-multiwan_1.0.16.ipk
然后对路由进行配置以下都在SecureCRT登陆下完成的
#查看你的wan口的端口名称
root@OpenWrt:~#cat /etc/config/network
config'switch' 'eth0'
option'enable' '1'
config'switch_vlan' 'eth0_0'
option'device' 'eth0'
option'vlan' '0'
option'ports' '1 2 3 4 5' #port1、2、3、4和cpu5属于vlan0
config'switch_vlan' 'eth0_1'记住这里的eth0_1后面有用
option'device' 'eth0'
option'vlan' '1'
option'ports' '0 5' #port0和cpu5属于vlan1
编辑/etc/rc.local增加虚拟wankou
root@OpenWrt:~#vi /etc/rc.local
按键盘I进入修改模式
#Put your custom commands here that should be executed once
#the system init finished. By default this file does nothing.
iplink add linketh0.1 eth2 typemacvlan 增加wan2虚拟网卡eth0.1对应前面记下的
ifconfigeth2 hw ether 00:11:22:33:44:5E
ifconfigeth2 up
iplink add link eth0.1eth3 typemacvlan 增加wan3虚拟网卡eth0.1对应前面记下的
ifconfigeth3 hw ether 00:11:22:33:44:6E
ifconfigeth3 up
iplink add linketh0.1eth4 type macvlan增加wan4虚拟网卡eth0.1对应前面记下的
ifconfigeth4 hw ether 00:11:22:33:44:7F
ifconfigeth4 up
iplink add link eth0.1 eth5 typemacvlan增加wan5虚拟网卡eth0.1对应前面记下的
ifconfigeth5 hw ether 00:11:22:33:44:8E
ifconfigeth5 up
iplink add linketh0.1 eth6 typemacvlan 增加wan6虚拟网卡eth0.1对应前面记下的
ifconfigeth6 hw ether 00:11:22:33:44:9E
ifconfigeth6 up
如果需要更多自行添加少的话可以少加点
修改后保存退出
按esc退出。shift+:看见左下角显示:输入wq保存退出
修改/etc/config/network
输入命令
Vi /etc/config/network
config'switch' 'eth0'
option'enable' '1'
config'switch_vlan' 'eth0_0'
option'device' 'eth0'
option'vlan' '0'
option'ports' '1 2 3 4 5'
config'switch_vlan' 'eth0_1'
option'device' 'eth0'
option'vlan' '1'
option'ports' '0 5'
config'interface' 'loopback'
option'ifname' 'lo'
option'proto' 'static'
option'ipaddr' '127.0.0.1'
option'netmask' '255.0.0.0'
config'interface' 'lan'
option'type' 'bridge'
option'proto' 'static'
option'netmask' '255.255.255.0'
option'ipaddr' '192.168.3.250'
option'defaultroute' '0'
option'peerdns' '0'
option'ifname' 'eth0.0'
config'interface' 'wan'
option'ifname' 'eth0.1'
option'proto' 'pppoe'
option'password' '用户名'
option'username' '密码'
option'defaultroute' '1'
option'peerdns' '1'
config'interface' 'wan2'
option'ifname' 'eth2'
option'defaultroute' '0'
option'peerdns' '0'
option'proto' 'none'
config'interface' 'wan3'
option'ifname' 'eth3'
option'defaultroute' '0'
option'peerdns' '0'
option'proto' 'none'
config'interface' 'wan4'
option'ifname' 'eth4'
option'defaultroute' '0'
option'peerdns' '0'
option'proto' 'none'
config'interface' 'wan5'
option'ifname' 'eth5'
option'defaultroute' '0'
option'peerdns' '0'
option'proto' 'none'
config'interface' 'wan6'
option'ifname' 'eth6'
option'defaultroute' '0'
option'peerdns' '0'
option'proto' 'none'
红色为增加部分这里总共加了6WAN拨号!
根据需要修改!
修改保存,重启路由!
进入相应的wan口设置你的上网情况,,可以把不用的wan关闭的需要的时候再打开
设置好后保存应用
进入multi-wan设置多宽带合并情况
loadblancer distribution设置此wan口占有的宽带比例(几个wan口的总和为10),
当wan口没有用进行关闭
Wan5关闭
设置好后按 保存/应用按钮
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。