I have an Ubiquiti AirRouter
with OpenWRT on it and I've been trying to separate the manage of the ports.
I've formated the router using CoovaChilli
app, anyways the app just help to install OpenWRT on the router and gives an easy UI-WEB manager.
The router has internal programmable switch, and as far as I understand it is possible to separate the LAN PORTS.
I've tried to configure /etc/config/network
following OpenWRT – Switch Documentation
-
In my Ubiquiti router it seems
eth0
andeth1
are different from the tutorial. In the tutorial the switch iseth0
in my router it iseth1
-
I have the basic configuration and I'd like to modify it, right now 4 ethernet ports have access to internet and are managed by default configuration.
-
I'd like to have 2 ports (1 and 2) with default configuration (Internet access), and the other 2 ports (3 and 4) redirected to a Hotspot
I need to have 2 different "devices" to do this, e.g. I need br-lan0 to be the defaults ports and br-hot0 the redirected ports.
I tried 1 million ways and everytime I try a configuration, the router stopped to assign IP's and I don't know what's happening or how to fix it.
This is an example configuration I've tried:
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'
Some technical information for Airrouter & OpenWRT can be found here
Best Answer
You have to accompany your plain network config with the corresponding switch configuration.
Also, do not use VLAN 0, as this is a special VLAN.
Try something along the lines of this:
Also, are you absolutely sure that the switch is internally
eth1
?Reading through the relevant architecture files in the OpenWRT distribution shows me that most
ar71xx
devices have their switch oneth0
, including the airrouter.Here's the relevant section from
base-files/etc/uci-defaults/02_network
:Note the
ucidef_set_interfaces_lan_wan
line that listseth0
beforeeth1
, which designateseth0
as LAN nic andeth1
as WAN nic.EDIT:
(in which case you would replace
eth1
byeth0
in the above config and replaceeth0
byeth1
, if you have that somewhere else in your config)