** RESOLVED ** Issues with DHCP and WPA_supplicant
#1
Fri, 2018-03-23 20:04
Blossom
-
- Offline
- 1 week 1 day ago
- 2018-03-23
Hi,
So im not to sure what's happening but i cant seem to auto connect to wifi for some reason. The wifi service gets initialized and started at boot. Below is more details.
This is my /etc/networking/interfaces:
auto lo iface lo inet loopback auto wlan0 iface auto wlan0 inet dhcp
i also have the correct details in /etc/wpa_supplicant/wpa_supplicant.conf
The problem is that while wpa_supplicant is getting initialized, no dhcp request is being issued, so on every boot i have to either:
udhcp -i wlan0
or
ifup wlan0
in order to be issued with a IP address.
Any help would be great.
You don't need the "auto" bit on the second line, try
^ That works on my Alpine system.
So i have edited it out and rebooted, again i can see the wpa_supplicant service running and initializing but DHCP is not started automatically.
Im not sure what is causing this?
Try
# ifdown wlan0
then# ifup wlan0
Post any errors.
As I said, I've just tried on my system and it works fine.
There are no errors, ifdown brings the connection down and ifup issues a DHCP request and i get an IP address.
The problem is that when i reboot, DHCP is supposed to start, so i can get an IP address and start using the network. but when i boot, wpa_supplicant get's initialized and i have to run the dhcp command, when i shouldn't.
I'll link my config files:
/etc/network/interfaces
/etc/wpa_supplicant/wpa_supplicant.conf
Check the output of
rc-update|grep wpa
, it should be started at "boot", is that the case?Yeah it's set to start at boot
Check /var/log/{messages,dmesg} for any errors.
It's actually quite confusing. I can see the wpa_supplicant service initialize, authenticate then associate it's self with the network, but there is no mention of dhcp at boot time, when looking at logs.
** update **
Issue resolved
i did not have the networking service set to the boot runlevel.
once you
rc-update add networking boot
it should work.Thank you headonsticks for all your help mate!