Other OS

Problems with eth0 and wlan0

5 3427
Hello,

i installed Raspbian 3.1 on my BPi with Network (eth0). Than I configure WiFi (wlan0). Both network connections works fine - i can get a connection to the internet.

After these steps I disconnect the eth0 cable. Only over wlan0 i cannot get a connection to the internet. The default route is not set?? I get these values:
192.168.178.0   *               255.255.255.0   U     0      0        0 wlan0

With eth0 connected i get:
default                fritz.box     0.0.0.0              UG    0      0        0 eth0
192.168.178.0   *               255.255.255.0   U      0      0        0 wlan0
192.168.178.0   *               255.255.255.0   U      0      0        0 eth0

When I set the route with route add, it works. What can I do to get the default route also without eth0 disconnected directly after booting?

My /etc/network/interfaces:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 192.168.178.2
    netmask 255.255.255.0
    gateway 192.168.178.1

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
    address 192.168.178.3
    netmask 255.255.255.0
    gateway 192.168.178.1
    wpa-ap-scan 1
    wpa-scan-ssid 1
    wpa-ssid "xyz"
    wpa-psk "4711"

iface default inet dhcp

Regards
Thomas
tkaiser  
Did you try to use NetworkManager (apt-get install network-manager)?

In OS X the configd has permanently an eye on all NIC's status and when something changes it compares the order of network interfaces to the ones available and sets a new default route on the fly if needed. As far as I know Debians network-manager tries to do the same (Sorry, no Linux on desktops installations, we only use Linux on servers with static network configuration)

Thak you for your answer. NetworkManager seems to work only with interfaces they are not configured by /etc/network/interfaces.

I found a other working solution. At the eth0 section i include 2 parameters:
    pre-up if [ `ip route show|grep default|wc -l` -eq 1 ];then route del default gw 192.168.178.1 dev wlan0;fi
    post-down if [ `ip route show|grep wlan0|wc -l` -eq 1 ];then route add default gw 192.168.178.1 dev wlan0;fi
That works fine.

At Raspbian for the Rasberry Pi it works without these items. Where here is her difference?

mmax  
I have similar issue also with bananian (the root of the issue is probably the same)

Hi all
I have had the same issue.
I solved it with:
#auto eth0 and
#gateway .....(only on wlan0)
rest of the interfaces is Ok
eiermann

nekyr  
The thread of the true element is shared for the persons. The natural element and Australia writing is highly occupied for the flow of the traits and all items in the field of the humans.

You have to log in before you can reply Login | Sign Up

Points Rules