Lope
Posts: 70
Joined: Tue Jul 02, 2013 7:53 pm

WPA supplicant static IP /etc/network/interfaces problem

Sat Mar 12, 2016 10:12 am

If I do this, my resolv.conf file is as expected
nameserver 8.8.8.8
nameserver 8.8.4.4

/etc/network/interfaces
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.0.140
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 8.8.8.8 8.8.4.4

Alright, but I haven't connected to any network, so I try this

/etc/network/interfaces
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 10.0.0.5
netmask 255.255.255.0
gateway 10.0.0.1
dns-nameservers 8.8.8.8 8.8.4.4
wpa-scan-ssid 1
wpa-ap-scan 1
wpa-key-mgmt WPA-PSK
wpa-proto RSN WPA
wpa-pairwise CCMP TKIP
wpa-group CCMP TKIP
wpa-ssid "blah"
wpa-psk blahblah

That works, but my resolv conf gets some extra crap from dhcpcd which should not be called by ifup :/

dhcpcd adds these 2 lines, in the name of wlan0
nameserver 10.0.0.1
nameserver fe80::1%wlan0

if I run resolvconf -i I get
wlan0 wlan0:ra wlan0.inet

I want static. I don't want those entries in my resolv.conf file. And I don't want dhcpcd getting called.

Any ideas?

PS: I like the /etc/network/interfaces ONLY approach. But if it's buggy with static I could use a WPA supplicant conf file.
Alternatively how can I disable resolvconf?

User avatar
DougieLawson
Posts: 42177
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: WPA supplicant static IP /etc/network/interfaces problem

Sat Mar 12, 2016 11:01 am

With Jessie static IP addresses are done on /etc/dhcpcd.conf NOT in /etc/network/interfaces. Undo your changes.

The man dhcpcd.conf command tells you how to do it.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

Lope
Posts: 70
Joined: Tue Jul 02, 2013 7:53 pm

Re: WPA supplicant static IP /etc/network/interfaces problem

Mon Mar 14, 2016 7:06 am

Wow, thanks for the info. I really disagree with this change. I made a special post about it.
viewtopic.php?f=66&t=140045&p=928358#p928358

Return to “Networking and servers”