Ubuntu internet problem: connected to router, ping doesn't work (no problems with Android and Windows)


New Member
The internet connection problem with my Laptop (Ubuntu/Mate) has the following symptoms:
  • After reboot no internet connection problems whatsoever.
  • However, after suspend mode (e.g. closing the lid) and login:
    • From Linux console:
      • No ping response when pinging outside world (e.g. www.google.com).
      • Perfect ping response when pinging within local network.
    • No access to internet (e.g. browsing).
    • Laptop is connected (wired and wireless) to (Virgin Media Superhub 2) router (machine name with correct IP addresses mentioned in router's list);
    • Can successfully ping from the router to the outside world.
No internet connection problems with all other devices (Windows, Android). Help much appreciated.


Staff member
Can you ping the outside world using an ip address? For instance, try to ping (google's public dns).

You can also try to query a domain using google's dns like dig @ www.linux.org

If that works, then add something like this to your /etc/resolv.conf file (this would use google's public dns)



New Member
Indeed, I think it's a nameserver problem. I can't reach the mentioned nameservers and by their IP addresses. Also, if I set these as nameservers in /etc/resolv.conf, after restarting the /etc/init.d/{networking,network-manager} the resolv.conf nameservers are reset to a local IP address ( (Also there are no nameservers specified in the router).

From the output of "systemd-resolve --status" I learn that it sees the ISP (Virgin Media)'s nameservers:

Link 3 (wlp3s0)
DNS Servers:

Yet something stop the machine to use them...


New Member
I've decided to reboot and after suspending a few times everything keeps functioning as normal... All thanks for your help.


New Member
Sounds like Network Manager messing the connection up when it enables wifi power management, the usual solution is to
sudo sed -i 's/wifi.powersave = 3/wifi.powersave = 2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
systemctl restart network-manager.service
as I posted at https://askubuntu.com/a/910186/300665

The first part of the askubuntu.com answer can be ignored as the content of the /etc/NetworkManager/NetworkManager.conf file was changed because of bug reports and it usually only affected USB wifi devices

Members online