Hey everyone I have an rpi3 model B. Built in wifi works fine and ethernet too. However, I need to be able to plug it into a second network via ethernet but access it via ssh on it's wifi network (different networks altogether). Every time I plug in the ethernet cable I get booted off my SSH tunnel which was connected by wifi. Here is every config file I can think of:
ifconfig:
eth0 Link encap:Ethernet HWaddr b8:27:eb:d9:28:08
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:1994 errors:0 dropped:0 overruns:0 frame:0
TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:127512 (124.5 KiB) TX bytes:6653 (6.4 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr b8:27:eb:8c:7d:5d
inet addr:172.16.2.124 Bcast:172.16.2.255 Mask:255.255.255.0
inet6 addr: fe80::fca0:bb02:2506:3409/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2532 errors:0 dropped:79 overruns:0 frame:0
TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:484542 (473.1 KiB) TX bytes:23357 (22.8 KiB)
wpa_supplicant.conf:
country=CA
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="CNGuest"
psk="**********" obviously not actually asterix
id_str="internetguest"
}
/etc/network/interfaces
# Include files from /etc/network/interfaces.d: (empty!)
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface eth0 inet manual
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Also worth noting that my default route is set to wlan0. Still eth0 boots it.
Where is this switch taking place and how do I fix it?
Thanks
interfaces
is wrong, and would never have worked. Callingdhcp
disablesdhcpcd
which is the daemon which WOULD have allocated IP addresses. See How do I set up networking/WiFi/Static IP