My understanding of bridging is that it ties together two interfaces at layer 2. I am looking at a Ubiquiti Nanostation2 running OpenWRT that has an ethernet port 'eth0' and a wifi port 'ath0'. The ethernet port (the 'wan' port) is not part of the bridge and the bridge is just a single interface. Can anyone clarify this? - seems very different to Ubuntu.
/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' 'wan'
option 'ifname' 'eth0'
option 'proto' 'dhcp'
config 'interface' 'wifi'
option 'ipaddr' '192.168.13.1'
option 'type' 'bridge'
option 'proto' 'static'
option 'netmask' '255.255.255.0'
option 'ifname' 'wifi0'
What do
brctl show
and/etc/config/wireless
say? On my OpenWRT router eth0 is specified as the bridge in /etc/config/network. It looks like the wireless interfaces is added to the LAN bridge (br-lan) via "option 'network' 'lan'" in /etc/config/wireless.It does not bridge between the WAN and LAN because those are two separate networks. In the case of a typical router, it serves as a gateway between those two separate networks. This allows routing and firewall rules to be used to control what traffic gets moved between the two networks. So, be default, the WAN and the LAN are not connected until a routing or firewall rule is written to bridge the two interfaces. However, the WIFI is often bridged with the LAN to automatically create one network between the two.