I installed ubuntu 16.04 on my laptop and, since the day I did, I've been having internet trouble. After connecting to any wi-fi network, I will have normal internet access for a little bit. However, after several minutes (sometimes seconds) I will lose all connection to the internet. I'll still be connected to the network (I've verified that I still can send and receive ARP packets). I've scoured forums looking for a solution but nothing works (including Internet keeps failing despite connected wifi on 16.04). The only relief I've found is to run
sudo /etc/init.d/network-manager restart
However, this is a (very) temporary fix.