Why does my wifi Internet intermittently disappear?

I was having a similar problem with mine, that turned out to be a two-part problem with interference from eth0 (the wired ethernet port) and a slight incompatibility between Linux and my wireless router's implementation of 802.11n.

If you are running the Intel wireless driver (iwlwifi), try typing the following commands at a terminal. These will turn off your ethernet port and disable the wireless N in the wifi driver. It is not permanent and will revert the next time you reboot:

sudo ifconfig eth0 down
sudo modprobe -r iwlwifi
sudo modprobe iwlwifi 11n_disable=1

If that works for you, there's a bash script on my Github that you can download and run each time you reboot: https://github.com/FreedomBen/handy-bash-scripts/blob/master/fixTheInternet.bash

I have this script on my desktop and I just run it each time I reboot. I haven't had any issues since.

Note: You will have to make the script executable. At a terminal, type:

cd path/to/script
chmod +x fixTheInternet.bash

The way I solved this problem(only happened at school network, home and others were fine) was "magical"

  1. I disabled wireless network adapter.
  2. Erased all connection profiles(eth, wlan, mobile...) trough network manager applet.
  3. Reboot.
  4. Re-enabled wireless adapter.
  5. Reboot (I know I come from windows and am noob with Ubuntu)
  6. Connect again.

I have been working for a while with no problems. (I dont know why but if someone figure it out please tell me)


If the MTU is the problem, you can get some tips about finding the correct value here. Generally speaking though, a value of 1500 is pretty standard.

You can set the MTU for your wifi connection as follows:

sudo ifconfig {wifi-interface} mtu {mtu-value}

So if your wifi interface is wlan0 and you want an MTU of 1500, it would be:

sudo ifconfig wlan0 mtu 1500

If this works for you, you can make it permanent by putting the value that worked in /etc/network/interfaces