I have problem to connect on internet over Wi-Fi. Cable is not connected.

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    0      0        0 eth0         UG    303    0        0 wlan0   U     0      0        0 eth0   U     303    0        0 wlan0

After command $ ifdown eth0 internet working.

File /etc/network/interfaces:

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet static
    dns-options rotate

auto wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

How to change configuration, to work over cable if cable is connected and work over Wi-Fi if cable is not connected ?

Thanks :)

1 Answer 1


"How to change configuration" SIMPLE revert to the default settings which work out of the box. See How do I set up networking/WiFi/Static IP.

If you REALLY must use static do it properly!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.