You are not logged in.
I want to add my wireless interface wlan0 to a bridge br0. But
brctl addif br0 wlan0doesn't support this operation. I searched online and tried with 4addr mode enabled. Then the above code works but my wireless NIC cannot associate with the AP using wpa_supplicant.
Could anyone help me explain this? What's the relationship between wireless bridge, 4addr mode and wpa_supplicant?
Any other solution which can add wlan0 to br0 and associate it with AP using WPA is also welcome. Thank you!
Last edited by cyker (2012-11-23 21:00:01)
.
Offline
Enabling 4addr enables WDS on your wireless device. In order for a WDS enabled device to associate with another it needs to have WDS enabled too. It's not common on many routers to have it, mostly because it's not accepted as a standard yet or something.
Wireless encryption shouldn't affect it.
I don't understand it well enough to explain it properly, other than it has to do with how packets are encapsulated over the air by wireless devices.
Offline
Assuming you want to have the Wireless interface be the GW....
Instead directly connect the wireless interface to the bridge device,
You could use iptables to forward and NAT traffic between wlan0 and br0
Something like.
Connect to the wireless network like you normally would.
Then I guess you have a network of VM's on the bridge?, so...
echo 1 > /proc/sys/net/ipv4/ip_forward
brctl addif br0 eth0
brctl addif br0 tap0
brctl addif br0 tap1
ifconfig br0 10.0.0.1 netmask 255.255.255.0 up
iptables -A FORWARD -i wlan0 -o br0 -s 10.0.0.0/24 -m state --state NEW -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADEI used that config to route hosts connected to my eth0 interface to the Internet through my wlan0 interface. ( i.e. there was no 'br0' in the iptables config instead it was 'eth0')
With that config, the Hosts on eth0, tap0, and tap1 will have their default GW be 10.0.0.1 and the Archlinux/router/computer/laptop in the middle will have a default gw of whatever the wlan0's GW is.
Last edited by hunterthomson (2012-11-27 10:28:50)
OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec
Offline