Problems in combination: Bridging and HostAP driver.

M. Grabert xam
Mon Aug 2 15:38:48 PDT 2004

On Fri, Jul 30, 2004 at 12:02:18PM +0200, Dennis Jansen wrote:


> I will further explain my setup:
> 	          <------bridge----->
> Linux.33<-eth1-->Linux.24<--wlan0-->router<--dsl--->internet.
> And I can wait as long as I want, on Ethereal I only see:
> ACK asks: who is
> ACK asks: who is
> ACK asks: who is
> (...) [no quote]
> it just doesn't get answers. And the ACKs from .1.1 asking for .1.24 aren't 
> even received.
> And I can ping back and forth on eth1 no problem.
> And if I remove wlan0 from the bridge again it work immediately.

I can give you one possible explaination for that (probably the most likely
one, but not neccessarily the only one):

I assume that the bridge is using the MAC if wlan0 (if both eth1 and wlan0
are used as bridge devices). I also assume you usually use eth1 to
communicate with the DSL router.
The problem is that DSL router remembers the MAC address of the router in
its ARP table (which will timeout/refeshed every couple of minutes,
depending on the router).

So the router has the MAC of eth1 associated with, and will
ignore all other requests/traffic from a which has NOT the MAC
address of eth1. That explains why you cannot reach via wlan0
or the bridge.

A power cycle of the DSL router should work (this should flush its ARP table),
OTOH it should be sufficient to wait a couple of minutes, so that the
DSL router refreshes its ARP table with the correct MAC address for
If this doesn't work, look whether there is a static ARP entry for
on the DSL router (rather unlikely, but I've seen something like this).

> I tried removing the ips from the interfaces and everything. So if you got the 
> bridge working, please tell me what version of hostap with what network 
> driver you are using, and I'll see if it makes a difference for me.

bridging worked for me always (from the first version I tested, 0.1.2 to
the current CVS version). Bidging should be independed from hostap(d).

> I tried assigning the wlan MAC to the bridge, but only get 
> "ERROR: Can't change MAC: interface up or not permission: Operation not 
> supported" from macchanger.

1. You don't need macchanger to do that.
   A simple "ifconfig <dev> hw XX:XX:XX:XX:XX:XX" works with current tools/kernel.
   IIRC this only works if the interface is not up, so do a
   "ifconfig <dev> down" first.

2. You can't change the MAC of the bridge that way.
   The linux bridging code uses the 'lowest' MAC address of the
   of the interfaces it uses.
   So the only real way to force a linux bridge to use a MAC is to
   assign all interfaces it uses the wanted MAC address prior to
   bringing the bridge interface up.

In your case the proper way to set up the bridge is something similar to

   # create bridge device
   brctl addbr br0

   # change MAC addresses
   ifconfig eth0 down
   ifconfig wlan0 down
   ifconfig eth0 hw ether 00:01:02:03:04:05
   ifconfig wlan0 hw ether 00:01:02:03:04:05
   # add interfaces to the bridge
   brctl addif br0 eth0
   brctl addif br0 wlan0
   # we don't want/need the bridge to communicate with other bridges
   brctl stp br0 off

   # and bring up the network interfaces to activate the bridge
   ifconfig eth0 up
   ifconfig wlan0 up
   # finally configure the IP address of the bridge
   ifconfig br0 up
   route add default gw


More information about the Hostap mailing list