When I connect or disconnect the ethernet wire, my ssh connection to the Pi via WiFi goes down.
Sure would like to understand why it happens, and find a way to workaround it.
Any thoughts, or insights would be appreciated...
TIA
Code: Select all
paul@raspberrypi ~ $ sudo ifplugd eth0 --kill
paul@raspberrypi ~ $ sudo ifplugd eth0 --check-running
ifplugd not running
paul@raspberrypi ~ $
Code: Select all
paul@raspberrypi ~ $ ls
Desktop Python
paul@raspberrypi ~ $
Code: Select all
paul@raspberrypi ~ $ sudo ifplugd eth0 --check-running
ifplugd process for device eth0 running as pid 1234
paul@raspberrypi ~ $
Code: Select all
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa.conf
iface default inet dhcpCode: Select all
sudo nano /etc/network/interfacesCode: Select all
auto lo
iface lo inet loopback
allow-hotplug eth0 <<< NEW LINE ADDED >>>
iface eth0 inet dhcp
allow-hotplug wlan0
...
Code: Select all
sudo apt-get remove ifplugdCode: Select all
sudo shutdown -r nowCode: Select all
sudo shutdown -h nowCode: Select all
auto lo
iface lo inet loopback
iface eth0 inet dhcp
pre-up sleep 5
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface MyHomeWirelessSSID inet dhcp
iface default inet dhcp
Code: Select all
INTERFACES=""
HOTPLUG_INTERFACES="wlan0 eth0"
ARGS="-q -f -u0 -d10 -w -I"
SUSPEND_ACTION="stop"
Code: Select all
ssh: connect to host 10.0.0.15 port 22: No route to hostI had the same issue with the wifi disconnecting when an ethernet cable was plugged in. The simple solution for me was to changePaul Newton wrote:Finally got a working solution.
1/ I added "allow-hotplug eth0" into the "interfaces" file in folder "/etc/network"
to edit this file you either need to change the permissions on it, or much easier is to use the nano editor with the sudo prefix. From a terminal window enterThe beginning of my interfaces file now looks like hjorken's:Code: Select all
sudo nano /etc/network/interfaces2/ I removed ifplugd from the Pi using the commandCode: Select all
auto lo iface lo inet loopback allow-hotplug eth0 <<< NEW LINE ADDED >>> iface eth0 inet dhcp allow-hotplug wlan0 ...This was described by Bill Tompkins at https://github.com/BillTompkins/pi-spie ... ve-ifplugd.Code: Select all
sudo apt-get remove ifplugd
3/ Then I rebooted the Pi using the shutdown command to pickup the changes:NB to actually shut down the software running on the Pi so you can safly remove the power, use the option "-h"Code: Select all
sudo shutdown -r nowThat solved the problem for me.Code: Select all
sudo shutdown -h now
Removing the offending ifplugd seems like a brute force way of doing things, and it leaves me wondering if I will miss it later on. Any thoughts?
Code: Select all
wpa-roamCode: Select all
wpa-confCode: Select all
/etc/network/interfaces