Discussion:
Hostapd + bridge with ifupdown
Michal Zatloukal
2011-01-17 14:45:33 UTC
Permalink
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
[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/
MR ZenWiz
2011-01-17 21:16:33 UTC
Permalink
Post by Michal Zatloukal
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?
Have you considered saving your /etc/network/interfaces file and
letting the system set one up for you (and see if that works)?
Post by Michal Zatloukal
With natty, this does not set up the network on boot-up as expected.
Natty is in alpha test, so you're liable to run into oddball things -
have you tried Maverick?

Loading...