Network bridge and broadcast ethernet frames

bridgenetworking

Let R1 and R2 be two (wireless) routers. Both R1 and R2 have one wired interface eth0 and one wireless interface wlan0. On each router, both interfaces are bridged on br0. So:

  • R1.br0 = R1.eth0 + R1.wlan0
  • R2.br0 = R2.eth0 + R2.wlan0

Let C1 and C2 be wireless clients connected to R1 and R2 respectively.

What will happen exactly when C1 sends a broadcast ethernet frame B, that's supposed to be received by C2 (say, an ARP request for C2's IP address)?

My questions:

  1. Upon receipt of B by R1, will it send the frame through R1.br0 (therefore sending it to both R1.eth0 and R1.wlan0) or will send the frame only through R1.eth0 (since it knows that the frame came through R1.wlan0)?

  2. In any case, R2 will eventually receive B. Upon receipt of B by R2, a question mostly equivalent to the first one: will R2 send the frame through R2.br0 (…) or through R2.wlan0 (…)? I'm not sure the answer to both questions has necessarily to be the same, since the source interface is not really the same thing, one is wire, the other is wireless, that's why I ask both.

If the answer to question 2 is "R2 will send the frame through both R2.wlan0 and R2.eth0", won't there be some kind of loop (by applying the same reasoning of my question (2) to R1 when it receives B again, this time from R1.eth0)? How does ethernet deals with this? The most simple solution I see is to make bridges so that they send the broadcast frames to all the interfaces but from the one which it originated.

I don't know how wireless networks work, so, if it is true that a bridge won't send a packet to the interface from which it originated, how can we be sure that the other wireless clients will receive the broadcast frame? Do wireless clients on a wireless (802.11b/g/n, whatever) network communicate directly to each other?

Actually, is all of this defined anywhere, or is it implementation specific? If it is defined, where can I get the standards?

Best Answer

The bridges act as switches, and send a broadcast frame out every interface except the one where it was received.

The trick with this is the wlan interfaces, which don't behave in the same way as you'd think of a normal interface. A number of clients can be associated, but each client doesn't get sent all traffic - conceptually, think of each associated client as a port on a switch (and while we're at it, feel free to think of an open, unencrypted wireless network as a hub).

R1 will get the frame in br0, which plays switch and will send it to wireless clients except the one that sent the frame as well as its eth0, then R2 will get it on br0 and send it to all interfaces except the ingress interface, sending the frame to all associated wireless clients.

IEEE 802 is where all these standards live, but it's not exactly light reading.

Related Topic