我有一个Ubiquiti AirRouter与OpenWRT ,我一直在试图分开pipe理的端口。
我已经使用CoovaChilli应用程序格式化了路由器,反正这个应用程序只是帮助在路由器上安装OpenWRT,并且提供了一个简单的UI-WEBpipe理器。
路由器有内部可编程开关,据我所知可以分开局域网端口。
我试过在OpenWRT – Switch Documentation之后configuration/etc/config/network
在我的Ubiquiti路由器中,看起来eth0和eth1与教程不同。 在教程中,交换机是eth0在我的路由器中是eth1
我有基本的configuration,我想修改它,现在4个以太网端口可以访问互联网,并通过默认configuration进行pipe理。
我想有2个默认configuration(Internet访问)端口(1和2),其他2个端口(3和4)redirect到一个热点
我需要有2个不同的“设备”来做到这一点,例如我需要br-lan0作为默认端口和br-hot0redirect端口。
我尝试了100万种方法,每次尝试configuration时,路由器都停止分配IP地址,我不知道发生了什么或者如何解决这个问题。
这是我试过的一个configuration示例:
config 'interface' 'lan' option 'ifname' 'eth1.0' option 'proto' 'static' option 'ipaddr' '192.168.1.1' option 'netmask' '255.255.255.0' option 'defaultroute' '0' option 'peerdns' '0' option 'nat' '1' config 'interface' 'hot' option 'ifname' 'eth1.1' option 'proto' 'dhcp'
Airrouter&OpenWRT的一些技术信息可以在这里find
您必须伴随您的普通networkingconfiguration与相应的交换机configuration。
另外,不要使用VLAN 0,因为这是一个特殊的VLAN。
尝试一下:
config 'interface' 'lan' option 'ifname' 'eth1.1' option 'proto' 'static' option 'ipaddr' '192.168.1.1' option 'netmask' '255.255.255.0' option 'defaultroute' '0' option 'peerdns' '0' option 'nat' '1' config 'interface' 'hot' option 'ifname' 'eth1.2' option 'proto' 'dhcp' config 'switch' option 'name' 'switch0' option 'enable' '1' option 'enable_vlan' '1' option 'reset' '1' config 'switch_vlan' option 'vlan' '1' option 'device' 'switch0' option 'ports' '0t 1 2' config 'switch_vlan' option 'vlan' '2' option 'device' 'switch0' option 'ports' '0t 3 4'
另外,你是否确定交换机在内部是eth1 ?
在OpenWRT发行版中阅读相关的体系结构文件,告诉我大多数ar71xx设备在eth0上都有它们的交换机,包括airrouter。
以下是base-files/etc/uci-defaults/02_network的相关部分:
ap121 |\ ap121-mini |\ ap96 |\ airrouter |\ dir-600-a1 |\ dir-615-c1 |\ dir-615-e4 |\ ja76pf |\ mynet-n600 |\ oolite |\ rb-750 |\ rb-751 |\ tew-632brp |\ tew-712br |\ tl-mr3220 |\ tl-mr3220-v2 |\ tl-mr3420 |\ tl-wdr3500 |\ tl-wr741nd |\ tl-wr741nd-v4 |\ tl-wr841n-v7 |\ tl-wr841n-v9 |\ whr-g301n |\ whr-hp-g300n |\ whr-hp-gn |\ wzr-hp-ag300h) ucidef_set_interfaces_lan_wan "eth0" "eth1" ucidef_add_switch "switch0" "1" "1" ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4" ;;
请注意在eth1之前列出eth0的ucidef_set_interfaces_lan_wan行,它将eth0指定为LAN nic,将eth1指定为WAN nic。
编辑:
(在这种情况下,你可以在上面的configuration中用eth0代替eth1 ,用eth1代替eth0 ,如果你的configuration中有其他地方的话)