Bridging: Loosing WLAN network connection with 4addr on option - Why?
- by WitchCraft
Question:
For use with my Xen VM, I need to create a virtual network interface (vif) that is bridged to wlan0.
If in /etc/network/interfaces I add
auto xenbr0
iface xenbr0 inet dhcp
And then later do
brctl addif xenbr0 wlan0
I get this error message.
can't add wlan0 to bridge xenbr0: Operation not supported
I found out that Linux won't let you bridge a wireless interface in managed mode at all unless you enable the 4addr option (needed to recompile iw):
iw dev wlan0 set 4addr on
Afterwards
brctl addif xenbr0 wlan0
works, and brctl show shows xenbr0 as bridged to wlan0.
Unfortunately, as soon as I execute
iw dev wlan0 set 4addr on
my entire network connection is gone (no connection).
As soon as then I execute
iw dev wlan0 set 4addr off
I reconnect and it works again.
If I re-execute 4addr on, it breaks again, if I execute 4addr off, it works again.
Unfortunately, I can't just turn 4addr on, activate the bridge and then turn it back off (error: device not ready).
Does anybody know why I loose my connection ?