etc/network/interfaces multiple connections (wired static + wifi dhcp), how?

خرید بک لینک

I would like to configure /etc/network/interfaces so that it connects to wifi when the cable is not connected, is it possible?

Following is the content of /etc/network/interfaces (Ubuntu 15.04):

auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet static
    address 140.136.38.16
    netmask 255.255.0.0
    network 140.136.1.0
    broadcast 140.136.1.255
    #gateway 140.136.38.254
    dns-nameservers 140.136.73.154 140.136.13.4

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp 
    wpa-ssid WIFI
    wpa-psk  WIFIWIFI

With the above configuration and cable not connected I still need to do # ifconfig eth0 down to have access the inteet.

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 241 تاريخ: پنجشنبه 23 ارديبهشت 1395 ساعت: 2:59

صفحه بندی