I am struggling to setup my wlan so it can re-associate to another hotspot and renew its IP automatically. I have found a similar question but nobody responded.
I am using Debian stretch. The first association works fine but when the WiFi re-associates with another hotspot (for whatever reason (e.g. first hotspot gets shutdown)) the IP stays the same. If I manually run dhclient wlan0
the IP will refresh. But I want it to be automatic.
Here is my /etc/network/interfaces
:
allow-hotplug eth0
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
/etc/wpa_supplicant/wpa_supplicant.conf
contains:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="FrstHotspot"
psk="some password"
}
network={
ssid="SecondHotspot"
psk="some password"
}