One of our new requirements for a product I work on is to support Ethernet-to-wireless bridging. Suppose we have two network interfaces: eth0 and ath0 (we're using the Madwifi driver). What sort of options do I have to allow computers hooked into eth0 to be able to access the wireless network?
The first thing I tried was the
brctl utility. This seemed to be exactly what I want. And, on wired networks, it is. But on wireless networks, it didn't quite work. Some Wiresharking revealed that the source MAC of the bridged packet was (correctly) set to a computer behind the bridge. However, the AP, having never seen that MAC associate, would drop the packet. If I enable WDS packets (
iwpriv ath0 wds 1), then the packet is sent with the transmitter and receiver addresses, but doesn't seem to be allowed by the AP (it is very old, and we can't change it). Not all APs have to accept WDS, right?
Thus, I'm wondering if we have to do some sort of Ethernet NATing or the like. However, I don't see how it can work -- how can one MAC address be shared amongst n computers?
ebtables appears too low level. Simply rewriting MAC addresses on the way out and the way back in makes it so the bridge computer cannot use the network. Plus, how would it know the ultimate destination for an incoming packet? You'd need details from the IP and TCP/UDP layers, at least.