Other OS

Problems with eth0 and wlan0

5 3825

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:   *        U     0      0        0 wlan0

With eth0 connected i get:
default                fritz.box              UG    0      0        0 eth0   *        U      0      0        0 wlan0   *        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

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
    wpa-ap-scan 1
    wpa-scan-ssid 1
    wpa-ssid "xyz"
    wpa-psk "4711"

iface default inet dhcp

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 dev wlan0;fi
    post-down if [ `ip route show|grep wlan0|wc -l` -eq 1 ];then route add default gw dev wlan0;fi
That works fine.

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

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

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