Openwrt 单wan口N 拨教程

OpenwrtwanN拨教程


使用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' #port1234cpu5属于vlan0

config'switch_vlan' 'eth0_1'记住这里的eth0_1后面有用

option'device' 'eth0'

option'vlan' '1'

option'ports' '0 5' #port0cpu5属于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设置多宽带合并情况



  1. loadblancer distribution设置wan口占有的宽带比例(几个wan口的总和为10),



wan口没有用进行关闭


Wan5关闭

设置好后 保存/应用按钮



下载地址:http://download.csdn.net/detail/dkxatt/6000233

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值