Hello all,
I am hoping someone has a little insight and can tell me what I'm doing wrong or just not doing at all.
I normally connect to the internet via wpa_supplicant and manually setting my ip which works great. However, whenever I disconnect and try to connect again my wireless connection either takes forever to load pages (+- 2min) or just doesn't work (Temporary failure in name resolution is the usual error). I figure I am missing a step somewhere in disconnecting properly
These are the commands I use to connect
Code:
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
ip addr add 192.168.1.xxx/24 dev wlan0 #Yes, I replace the x's with an actual ip
ip route add default via 192.168.1.1
And to disconnect I just use
Code:
ip addr flush dev wlan0
ip route flush dev wlan0
ip link set wlan0 down
wpa_cli disconnect
Which does indeed disconnect me, but upon attempting to connect again I get the issues mentioned above.
What am I missing? Any insight appreciated