Hostapd + bridge with ifupdown

Michal Zatloukal myxal.mxl at gmail.com
Mon Jan 17 14:45:33 UTC 2011


Hi there.

I'm migrating my debian {router|AP|home_server|etc} to ubuntu-server and
have run into this problem - what exactly am I supposed to put in
/etc/network/interfaces to have the system work as a typical access-point
- the wired network is unprotected, while the WiFi is protected with
WPA2-configured hostapd, and the two interfaces are bridged into br0? I
had this working on debian with the following interfaces file:

auto lo
iface lo inet loopback

auto eth1
iface eth1 inet dhcp

auto eth0
iface eth0 inet manual

auto wlan0
iface wlan0 inet manual
             hostapd /etc/hostapd/hostapd.conf
auto br0
iface br0 inet static
             bridge_ports eth0  wlan0
             bridge_maxwait 0
             bridge_stp off
             address 192.168.1.1
             network 192.168.1.0
             netmask 255.255.255.0

With natty, this does not set up the network on boot-up as expected. I
looked into the manual page for bridge-utils-interfaces to find this bit:

> [bridge-ports option] are the interfaces that are part of the bridge,  
> and they shouldn't have any stanzas defining them on the interfaces file.

So how exactly am I supposed instruct ifupdown to use a particular hostapd
configuration for the wireless interface? I tried moving the line to the
br0 stanza and commenting out the wlan0 and eth0 stanzas but it didn't
help - on boot-up either hostapd is not running or wlan0 is not added to
the bridge, resulting in a non-working wifi (STA authenticates, but gets
no IPaddress.

It seems someone else encountered this problem and got no answer:
http://thread.gmane.org/gmane.linux.ubuntu.user/229711

Regards
Michal

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/




More information about the ubuntu-users mailing list