Bridging: Loosing WLAN network connection with 4addr on option - Why?

Posted by WitchCraft on Ask Ubuntu See other posts from Ask Ubuntu or by WitchCraft
Published on 2012-06-23T16:20:45Z Indexed on 2012/09/24 21:49 UTC
Read the original article Hit count: 463

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 ?

© Ask Ubuntu or respective owner

Related posts about networking

Related posts about network-manager