2

This question already has an answer here:

I've recently been getting into Linux (Debian - Gnome shell) and am currently having trouble with my WiFi.

Basically when I reboot the WiFi works fine for about a minute or two, after that it remains connected but I can't ping any external IP (8.8.8.8 is my test IP address). After googling similar issues I tried a few of the tools I saw suggested.

running route -n on boot (when WiFi is working) gives the following:

Destination    gateway        Genmask       Flags  Metric Ref Use Iface
0.0.0.0        192.168.178.1  0.0.0.0       UG     1024   0   0   wlan0
169.254.0.0    0.0.0.0        255.255.0.0   U      1000   0   0   wlan0
192.168.178.0  0.0.0.0        255.255.255.0 U      0      0   0   wlan0

After a minute or so when the internet access cuts out if I run the same command I get:

Destination    gateway        Genmask       Flags  Metric Ref Use Iface
0.0.0.0        0.0.0.0        0.0.0.0       U      1002   0   0   eth0
0.0.0.0        192.168.178.1  0.0.0.0       UG     1024   0   0   wlan0
169.254.0.0    0.0.0.0        255.255.0.0   U      0      0   0   eth0
169.254.0.0    0.0.0.0        255.255.0.0   U      1000   0   0   wlan0
192.168.178.0  0.0.0.0        255.255.255.0 U      0      0   0   wlan0

so I tried shutting down eth0 with: ifconfig eth0 down and voila the internet works again. for another minute or so only for eth0 to somehow come back online and mess it up again.

I really have no idea what's going on being so new to Linux, so if anyone could shed some light on why eth0 keeps coming online and clashing with my WiFi would be appreciated.

---- EDIT ----- Found the ACTUAL solution for gnome-shell

So all of the solutions I found on the suggested threads (and supposedly duplicate questions) didn't actually help me in the long run. Or they were sub-optimal solutions that forced annoying manual reconfiguration of network devices every time devices are changed.

what I ended up doing was simply removing the eth0 interface from /etc/network/interfaces

so by commenting the following:

# allow-hotplug eth0 # iface eth0 inet dhcp

This allows the network manager that comes with Gnome to take control of eth0 and stops the clashing of the interfaces. meaning the standard GUI networking tools acted as expected.

marked as duplicate by Rui F Ribeiro, countermode, Dmitry Grigoryev, mdpc, Satō Katsura Jan 12 '17 at 8:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

If you want to permanently disable eth0 from your system, i suggest you to edit the network configuration interfaces:

sudo vi /etc/network/interfaces

Then add the line:

iface eth0 inet manual

Once you modified the file, you can restart the network manager by invoking the command:

sudo service network-manager restart

Of course, the mod is reversible.

If you want to mess around with interface metrics to assign priority to an interface above another, i suggest you to try ifmetric.

  • ethernet always has precedence over wifi by default in Linux. – Rui F Ribeiro Jan 11 '17 at 10:30
  • but why does it appear and clash when it isn't plugged in? – Ben Jack Jan 11 '17 at 20:53
  • This forces manual configuration if ethernet is wanted again. See edit in my original post. – Ben Jack Feb 2 '17 at 23:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.