3

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'
timbo
  • 209
  • 1
  • 4
  • 12

2 Answers2

2

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.

Gerald Combs
  • 6,331
  • 23
  • 35
0

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.

sybreon
  • 7,357
  • 1
  • 19
  • 19
  • Let me try and make my question more succinct. There is only one interface here which has the 'bridge' keyword applied to it. What is the purpose in 'bridging' a single interface? – timbo Apr 28 '10 at 00:01
  • 1
    You can definitely bridge a single interface, if for example, you want to bridge other stuff to it in the future. For some routers, it might be possible to bridge the LAN and WIFI or to isolate them separately. This is done through bridging. If isolated, there will be WIFI, LAN, and WAN zones. – sybreon Apr 28 '10 at 01:48
  • OpenWRT is used on a number of different hardware models and supports many different configurations. Generally, you'd have the WLAN and LAN interfaces bridged. Further, on an atheros chipsert, OpenWRT also supports multiple independent WLANs on the same card. My take on this, is that the bridge is there since it simplifies configurations for the OpenWrt devs, provides support for additional router setups, and really wont hurt anything if you're running off of a simplified setup such as yours. – jonathanserafini Dec 29 '10 at 17:32