WHR G300NV2 Openwrt 单wan口 N 拨教程

我的无线路由器是Whr G300N V2.

从巴法洛原厂固件刷到DD-Wrt,使用dd-wrt下载的buffalo-to-dd-wrt_webflash-MULTI固件,从Web界面刷新。

我刷新时,没有等到网页跳转,很多人说的很严重,不敢关网页,即使它都提示关闭。我是看到无线网络里多了个dd-wrt,就知道刷新完了,然后复位路由器,按Reset大约8秒,Diag灯就亮了。然后又把那个whr-g300nv2-firmware-MULTI在Web 界面里又刷一遍(都说刷一遍好清nvram的数据)


从DD-Wrt刷新到Openwt ,最好使用官方的openwrt-ar71xx-generic-whr-g301n-squashfs-tftp,可以在Windows XP主机安装VBox虚拟主机,安装Ubuntu。

使用风月的Openwrt固件MTD刷新后,添加虚拟网卡: 


 ip link add link eth1 name eth2 type macvlan 会提示 Operaiton not supported的错误。



原文:http://www.openwrt.org.cn/bbs/forum.php?mod=viewthread&tid=1201


使用macvlan+multiwan 单线多拨 教程 不对的地方 斑竹帮忙修正啊


Openwrt 单wan口 N 拨教程

使用macvlan+multiwan 单线多拨成功,带宽叠成功


1 准备 能刷Openwrt 路由一台
Open wrt 下载地址
www.openwrt.org.cn 中文版本下载 可能不支持你的路由

http://downloads.openwrt.org/backfire/10.03/ 英文版 下载相对应的软件版本

只能用G301N的固件,有人说,它和G300N 硬件配置都一样。


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


这个multiwan没法下载,但是可以在software页面找到,就搜索multiwan和luci-app-multiwan,再install就行。要在avalables标签里搜索。



登陆后 输入下面的命令

opkg install ftp://ftp.netlab7.com/multiwan_1.0.16.ipk

等待安装完成,,再安装

opkg install ftp://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和cpu 5属于vlan 0
config 'switch_vlan' 'eth0_1' 记住 这里的eth0_1 后面有用 ------------------G300NV2 这里是个 eth1,这里他看的是vlan,应该是Wan,前后不一样。
option 'device' 'eth0'
option 'vlan' '1'
option 'ports' '0 5' #port0和cpu 5属于vlan 1

编辑/etc/rc.local 增加虚拟wankou 网口
root@OpenWrt:~# vi /etc/rc.local


按键盘 I 进入修改模式
这个可以在luci管理界面,System->startup里直接输入,粘贴也行。

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

ip link add link eth0.1 eth2 type macvlan 增加wan2 虚拟网卡 eth0.1 对应前面记下的

 WHR G300NV2使用 ip link add link eth1 name eth2 type macvlan


ifconfig eth2 hw ether 00:11:22:33:44:5E
ifconfig eth2 up

ip link add link eth0.1 eth3 type macvlan 增加wan3虚拟网卡 eth0.1 对应前面记下的
ifconfig eth3 hw ether 00:11:22:33:44:6E
ifconfig eth3 up

ip link add link eth0.1 eth4 type macvlan 增加wan4虚拟网卡 eth0.1 对应前面记下的
ifconfig eth4 hw ether 00:11:22:33:44:7F
ifconfig eth4 up

ip link add link eth0.1 eth5 type macvlan 增加wan5虚拟网卡 eth0.1 对应前面记下的
ifconfig eth5 hw ether 00:11:22:33:44:8E
ifconfig eth5 up

ip link add link eth0.1 eth6 type macvlan 增加wan6虚拟网卡 eth0.1 对应前面记下的
ifconfig eth6 hw ether 00:11:22:33:44:9E
ifconfig eth6 up

如果需要更多 自行添加 少的话可以少加点

修改后保存 退出
按esc 退出 。shift+:看见左下角显示 :输入wq 保存退出

正确的话,重启路由,在telnet下 ifconfig可以看到新增的虚拟网卡eth2 ...。

WHR G300NV2 Openwrt 单wan口 N 拨教程_第1张图片


修改/etc/config/network
输入命令
Vi /etc/config/network

可以在网络->接口里直接增加下面的wan2...


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'


红色为增加部分 这里总共加了6 WAN 拨号! -------------原文没有红色
根据需要修改!
修改保存,重启路由!

你可能感兴趣的:(windows,网络,ubuntu,System,interface,路由器)