Static wifi configuration using /etc/network/interfaces.d and wpa_supplicant
2
votes
0
answers
5264
views
__What I'm trying to achieve__
- Having two different local on the same network ips for Wifi and Ethernet, respectively on a GUI-less Debian Buster 10.10.
Ethernet is working, but wpa_supplicant keeps crashing. I'm trying to follow the instructions on [Debian wiki](https://wiki.debian.org/WiFi/HowToUse#wpa_supplicant) .
2: enp2s0: mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:1d:72:c7:ad:43 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.30/24 brd 192.168.1.255 scope global enp2s0
valid_lft forever preferred_lft forever
inet6 fe80::21d:72ff:fec7:ad43/64 scope link
valid_lft forever preferred_lft forever
3: wlp4s0: mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 00:1f:3b:4e:88:eb brd ff:ff:ff:ff:ff:ff
Content of /etc/network/interfaces.d/enp2s0
:
#custom configuration
allow-hotplug enp2s0
iface enp2s0 inet static
address 192.168.1.30/24
netmask 255.255.255.0
gateway 192.168.1.1
Content of etc/network/interfaces.d/wlps40
allow-hotplug wlp4s0
iface wlp4s0 inet static
wpa-ssid SSID_NAME_WITHOUT_QUOTES
wpa-psk PSK_HASH_OBTAINED_FROM_WPA_SUPPLICANT_WITHOUT_QUOTES
address 192.168.1.31
netmask 255.255.255.0
gateway 192.168.1.1
Content of /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/run/wpa_supplicant
update_config=1
network={
ssid=SSID_NAME_INSIDE_DOUBLE_QUOTES
#psk="PSK_IN_PLAIN_TEXT"
psk=PSK_HASH
}
Then created the [tag:wpa-supplicant] service and restarted it as instructed by the wiki page.
Then the command :
$ sudo wpa_supplicant -B -Dwext -i wlp4s0 -c /etc/wpa_supplicant/wpa_supplicant.conf
I get this response :
Successfully initialized wpa_supplicant
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Journalctl is yelling: wrong key, but my gut is telling me that there are errors config-file wise on top of that.
Any help will be much appreciated.
# update #
Moved and renamed /etc/network/interfaces.d/enp2s0
Edited /etc/network/interfaces.d/wlp4s0
as follows
#wlp4s0 custom configuration
allow-hotplug wlp4s0
iface wlp4s0 inet static
address 192.168.1.31
netmask 255.255.255.0
gateway 192.168.1.1
pre-up wpa_supplicant -i wlp4s0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B -f /var/log/wpa_supplicant.log
Replaced the hash of the [tag:psk] with plain text.
Deleted /run/wpa_supplicant/wlp4s0
and restarted the [tag:wpa-supplicant] service.
Now I am able to connect to the internet using the wireless device.
I ran sudo ifdown wlp4sO
to bring the device down and see if I can bring it up, again.
if up wlp4s0
succeeds after deleting /run/wpa_supplicant/
Asked by dhiaagr
(21 rep)
Jul 11, 2021, 10:31 PM
Last activity: Jul 12, 2021, 01:59 AM
Last activity: Jul 12, 2021, 01:59 AM