2 IP addresses when wifi is configured
Posted: Fri Sep 01, 2017 7:01 pm
I'm using Stretch lite. I connect to my wifi by editing /etc/wpa_supplicant/wpa_supplicant.conf
Now, when using dhcp, If I boot the pi with an ethernet cable plugged in, I get two different IP addresses. I can connect via putty using either address. Both ips show under ifconfig
If I set a static IP from /etc/dhcpcd.conf, then I reboot the pi, I only get the one IP address. (the static one I set.) If I unplug the ethernet cable, the IP address instantly transfers to the wlan and the connection is not lost. The IP shows for the ethernet port on ifconfig if it's plugged in, and if it's not plugged in, the IP shows for the wireless adapter.
Is their a way for dhcp to act this same way? So that the IP is given to ethernet but if that is unplugged, the same IP is transferred to wireless?
Code: Select all
network={
ssid="MySSID"
psk="MySSIDpassword"
}If I set a static IP from /etc/dhcpcd.conf, then I reboot the pi, I only get the one IP address. (the static one I set.) If I unplug the ethernet cable, the IP address instantly transfers to the wlan and the connection is not lost. The IP shows for the ethernet port on ifconfig if it's plugged in, and if it's not plugged in, the IP shows for the wireless adapter.
Is their a way for dhcp to act this same way? So that the IP is given to ethernet but if that is unplugged, the same IP is transferred to wireless?