Hi Davide,

This is easy:

In /etc/network/interfaces (br0 request IP from dhcp):
auto br0
iface br0 inet dhcp
        bridge_ports eth0 wlan0

auto eth0
iface eth0 inet manual

auto wlan0
iface wlan0 inet manual
        hostapd /etc/hostapd/hostapd.wlan0.conf

In /etc/hostapd/hostapd.wlan0.conf, make sure you have line:

bridge=br0


On 1/9/2011 20:01, [email protected] wrote:
Hi,

I'm having some troubles configuring an access point and bridging the wifi to 
the ethernet.
The AP is inside a LAN network and gets the ethernet IP from the DHCP server. 
At the same time it has a static wifi network to manage.

I'm facing two main problems:

1) when I bring up the wifi interface (wlan0) the machine cannot reach internet 
anymore.

2) when I bring up the bridge interface (br0) the eth0 get confused with the 
DHCP server and is not reachable anymore. From netstat I can see that the 
default gateway becomes the br0 gateway for the eth0 interface and the wlan0 
loses the ip.

I think that I should add some route telling to the wlan0 how to use the br0 to 
get the eth0 and the other way around but I cannot figure it out. I'm a bit 
confused regarding the bridge interface usage. In witch subnet it supposed to 
be? does it has to be in a separated one? I'm googoling but I haven't get it 
yet.

Please, can you have a look to my /etc/network/interfaces below?

Many thanks

Davide



# Bridge
auto br0
iface br0 inet static
         address 192.168.254.2
         netmask 255.255.255.0
         network 192.168.254.0
         broadcast 192.168.254.255
         gateway 192.168.254.1
         bridge_ports eth0 wlan0


auto eth0
iface eth0 inet dhcp


# Master WLAN infrastructured WPA2
auto wlan0
iface wlan0 inet static
         hostapd /etc/hostapd/hostapd.wlan0.conf
         address 192.168.2.1
         netmask 255.255.255.0
         network 192.168.2.0
         gateway 192.168.2.1
         broadcast 192.168.2.255


_______________________________________________
Voyage-linux mailing list
[email protected]
http://list.voyage.hk/mailman/listinfo/voyage-linux


--

Regards,
Kim-man "Punky" Tse

* Open Source Embedded Solutions and Systems
  - Voyage Linux (http://linux.voyage.hk)
  - Voyage ONE   (http://linux.voyage.hk/voyage-one)
  - Voyage MPD   (http://linux.voyage.hk/voyage-mpd)
* Voyage Store   (http://store.voyage.hk)


_______________________________________________
Voyage-linux mailing list
[email protected]
http://list.voyage.hk/mailman/listinfo/voyage-linux

Reply via email to