[Voyage-linux] bridge wlan eth [ 0.7.5 ]

(spam-protected) (spam-protected)
Thu Sep 1 23:59:04 HKT 2011


Thanks Punky,

In this way, both the eth0 and the wlan0 are getting the IP address from the same DHCP, isn't it. 
Your solution works perfectly on IPv4.
The problem is that I need to assign to the wlan0 both an IPv4 and IPv6 address because the wifi has to work on IPv6.

When I add the following to the /etc/network/interfaces the br0 doesn't get an IPv4 anymore:

iface wlan0 inet6 static
address fec0::1:1
netmask 64

Any suggestion?

Cheers

Davide



On 1 Sep 2011, at 15:48, Punky Tse wrote:

> 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, themrorange at gmail.com 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
>> Voyage-linux at list.voyage.hk
>> 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)
> 





More information about the Voyage-linux mailing list