Lately I have been having to switch between a wifi and wired internet connection with some frequency, and have found that the only way I am capable of doing this is to restart the computer. Here are the two cases of how this works:
1) Start computer with wireless automatically connected. This makes it impossible to later switch to an ethernet connection, even with wifi turned off.
2) Start computer with wifi hardware disabled and ethernet plugged in. This allows an ethernet connection, but if I unplug it and enable wifi, I cannot get a connection.
How would I go about resolving this issue?
Here are the contents of my /etc/network/interfaces
file
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
Edit: I have found a work-around script, but no solution so far.
/etc/init.d/networking stop
nano #this is where i unplug wire and enable wifi, or vice versa, then Ctrl-x
/etc/init.d/networking start
# This file describes the network interfaces available on your system
and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
The loopback network interface
auto lo iface lo inet loopback
The primary network interface
allow-hotplug eth0 iface eth0 inet dhcp
– Carl Shiles Jan 19 '17 at 17:46