I do not know why, but when I unplug my ethernet cable, I have no more wifi connection. I use /etc/network/interfaces for configure my static IP

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet static
address 192.168.XXX.XX0
gateway 192.168.XXX.XXX

allow-hotplug wlan0
iface wlan0 inet static
address 192.168.XXX.XX1
gateway 192.168.XXX.XXX
   wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

And my wpa_supllicant.conf is correct

Does anyone know why? Thanks

  • 1
    What OS/release? What evidence - you have posted no stats. There is no point in being coy about a private IP. Probably 80% of users are using the same. Why did you ignore the warning "# Please note that this file is written to be used with dhcpcd # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'"? What else have you changed? – Milliways Nov 9 '17 at 23:52
  • Hi Milliways, i'm very sorry, i'm very noob :-( I think I found by configuring my dhcpcd.conf as follows eth0 interface static ip_address = / 24 static routers = static domain_name_servers = wlan0 interface static ip_address = / 24 static routers = static domain_name_servers = – Brian Nov 10 '17 at 16:36

In case it helps, I have this in my /etc/network/interfaces file:

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

I'm wondering if adding auto wlan0 might help here.

| improve this answer | |
  • Don't use the dhcp bit as you are using static/manual IP address assignment whereas I use dhcp. I just wanted to paste working code, that was all. – Will Nov 12 '17 at 16:16

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