MadWifi allows fully transparent bridging in the following modes:
- Master (working as Access Point)
- Managed (working as Access Point client)
- Ad-hoc (working peer-to-peer, without Access Point)
Station Mode client-bridge (ath0-eth0) doesn't work: A STA mode interface can only send using one MAC address.
"Fully transparent" in this context means that you can bridge traffic from other ethernet hosts over the WLAN link. Have a look at the Bridging FAQ (section I still don't understand!'') to learn why this is a noteworthy feature :)
For the same reason it might be worth to warn you about possible compatibility issues: non-madwifi driven equipment might cause problems, due to a lack of a proper support of necessary functionality. The About/TheProjectWDS? page, although related to MadWifi, might give some ideas.
Linux kernel series 2.4 and 2.6 support bridging out of the box, and virtually every distribution comes with the necessary tools. Make sure your kernel has bridging support enabled (option CONFIG_BRIDGE in kernel .config file), and that you have the bridge-tool package installed (name may vary). You should have basic knowledge about how to get a working bridge with Linux, too.
How to configure
Bridging can be used in several scenarios. The most common cases are described below.
Scenario 1: operating as Wireless Distribution System (WDS)
This most probably is what the majority of users might be looking for. WDS? usually is used to make two (or more) Access Points talk to each other, for example to connect two distinct (wired) ethernet networks with a WLAN link. The main difference over the other scenarios below is that there is no need for an association, which allows to have more than one WDS link at the same time.
First you have to create one interface that works in master mode. Configure it according to your needs, at least by setting an ESSID and selecting a channel. Then create one interface per WDS link and enable the use of 4-address-headers with iwpriv ath0 wds 1. After that you need to create a bridge interface and enslave the corresponding interfaces to it.
# create and configure AP interface wlanconfig ath0 create wlandev wifi0 wlanmode ap iwconfig ath0 essid "my_ap_essid" channel <X> # create first WDS interface, tell about WDS partner, enable WDS mode wlanconfig wdsath10 create wlandev wifi0 wlanmode wds iwpriv wdsath10 wds_add <mac_address_of_wds_partner_1> iwpriv wdsath10 wds 1 # create second WDS interface, tell about WDS partner, enable WDS mode wlanconfig wdsath11 create wlandev wifi0 wlanmode wds iwpriv wdsath11 wds_add <mac_address_of_wds_partner_2> iwpriv wdsath11 wds 1 # bring all interfaces up # NOTE: Bringing up the AP interface first is important at this time ifconfig ath0 up ifconfig wdsath10 up ifconfig wdsath11 up # create the bridge and enslave all needed interfaces brctl addbr br0 brctl addif br0 ath0 brctl addif br0 wdsath10 brctl addif br0 wdsath11 # bring up the bridge ifconfig br0 up
Scenario 2: operating as repeater
Do you know the fancy SOHO devices from D-Link and friends? They offer a mode that allows them to work as repeater for another Access Point, which allows to increase the coverage of this AP. Something similar can be done with MadWifi as well.
to be continued