|
本人使用路由器是RT-NT13U B1,自己有一条ADSL,另一条是从别人的路由器分出来的,
请教高手以下的应该怎么配置?
1、接线
A、1号线接WAN
B、2号线接LAN中的任何一个口
2、配置:
A、编辑路由器上/etc/rc.local文件,内容如下。编辑方法有多种,vi,WinSCP,管理界面(管理---系统---开机启动)
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
ip link add link br-lan eth2 type macvlan
ifconfig eth2 hw ether 36:37:38:39:40:50
ifconfig eth2 up
exit 0
B、编辑路由器上/etc/config/network文件,内容如下:
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 'ifname' 'eth0.1'
option 'type' 'bridge'
option 'proto' 'static'
option 'ipaddr' '192.168.1.1'
option 'netmask' '255.255.255.0'
option 'macaddr' '00:0c:43:41:46:90'
config 'interface' 'wan'
option 'ifname' 'eth0.2'
option 'proto' 'pppoe'
option 'macaddr' '00:0c:43:41:46:91'
option 'username' 'pppoeusername'
option 'password' 'pppoepassword'
config 'interface' 'wan100'
option 'ifname' 'eth2'
option 'proto' 'pppoe'
option 'username' 'pppoeusername'
option 'password' 'pppoepassword'
C、编辑/etc/config/firewall文件(也可以用管理界面,修改wan100的防火墙接到WAN)
config 'zone'
option 'name' 'wan'
option 'input' 'REJECT'
option 'output' 'ACCEPT'
option 'forward' 'REJECT'
option 'masq' '1'
option 'mtu_fix' '1'
option 'network' 'wan wan100' |
|