OK,... and my situation?<br>
<br><br><div class="gmail_quote">On Thu, Sep 1, 2011 at 08:48, Punky Tse <span dir="ltr"><<a href="mailto:punkytse@punknix.com">punkytse@punknix.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi Davide,<br>
<br>
This is easy:<br>
<br>
In /etc/network/interfaces (br0 request IP from dhcp):<br>
auto br0<br>
iface br0 inet dhcp<div class="im"><br>
        bridge_ports eth0 wlan0<br>
<br>
auto eth0<br></div>
iface eth0 inet manual<br>
<br>
auto wlan0<br>
iface wlan0 inet manual<div class="im"><br>
        hostapd /etc/hostapd/hostapd.wlan0.<u></u>conf<br>
<br></div>
In /etc/hostapd/hostapd.wlan0.<u></u>conf, make sure you have line:<br>
<br>
bridge=br0<div><div></div><div class="h5"><br>
<br>
<br>
On 1/9/2011 20:01, <a href="mailto:themrorange@gmail.com" target="_blank">themrorange@gmail.com</a> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I'm having some troubles configuring an access point and bridging the wifi to the ethernet.<br>
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.<br>
<br>
I'm facing two main problems:<br>
<br>
1) when I bring up the wifi interface (wlan0) the machine cannot reach internet anymore.<br>
<br>
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.<br>


<br>
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.<br>


<br>
Please, can you have a look to my /etc/network/interfaces below?<br>
<br>
Many thanks<br>
<br>
Davide<br>
<br>
<br>
<br>
# Bridge<br>
auto br0<br>
iface br0 inet static<br>
         address 192.168.254.2<br>
         netmask 255.255.255.0<br>
         network 192.168.254.0<br>
         broadcast 192.168.254.255<br>
         gateway 192.168.254.1<br>
         bridge_ports eth0 wlan0<br>
<br>
<br>
auto eth0<br>
iface eth0 inet dhcp<br>
<br>
<br>
# Master WLAN infrastructured WPA2<br>
auto wlan0<br>
iface wlan0 inet static<br>
         hostapd /etc/hostapd/hostapd.wlan0.<u></u>conf<br>
         address 192.168.2.1<br>
         netmask 255.255.255.0<br>
         network 192.168.2.0<br>
         gateway 192.168.2.1<br>
         broadcast 192.168.2.255<br>
<br>
<br>
______________________________<u></u>_________________<br>
Voyage-linux mailing list<br>
<a href="mailto:Voyage-linux@list.voyage.hk" target="_blank">Voyage-linux@list.voyage.hk</a><br>
<a href="http://list.voyage.hk/mailman/listinfo/voyage-linux" target="_blank">http://list.voyage.hk/mailman/<u></u>listinfo/voyage-linux</a><br>
</blockquote>
<br>
<br></div></div>
-- <br>
<br>
Regards,<br>
Kim-man "Punky" Tse<br>
<br>
* Open Source Embedded Solutions and Systems<br>
  - Voyage Linux (<a href="http://linux.voyage.hk" target="_blank">http://linux.voyage.hk</a>)<br>
  - Voyage ONE   (<a href="http://linux.voyage.hk/voyage-one" target="_blank">http://linux.voyage.hk/<u></u>voyage-one</a>)<br>
  - Voyage MPD   (<a href="http://linux.voyage.hk/voyage-mpd" target="_blank">http://linux.voyage.hk/<u></u>voyage-mpd</a>)<br>
* Voyage Store   (<a href="http://store.voyage.hk" target="_blank">http://store.voyage.hk</a>)<div><div></div><div class="h5"><br>
<br>
<br>
______________________________<u></u>_________________<br>
Voyage-linux mailing list<br>
<a href="mailto:Voyage-linux@list.voyage.hk" target="_blank">Voyage-linux@list.voyage.hk</a><br>
<a href="http://list.voyage.hk/mailman/listinfo/voyage-linux" target="_blank">http://list.voyage.hk/mailman/<u></u>listinfo/voyage-linux</a><br>
</div></div></blockquote></div><br>