1

The problem is I can ping for example google's ip address but not the domain name (browsing to google.com works as well) sudo apt-get update gives the following :

0% [Connecting to mirrordirector.raspbian.org (2a00:1098:0:80:1000:75:0:3)] [Co
  • Co ... wonder what it says after that – Jaromanda X Jan 24 '18 at 22:49
  • Nothing .... it stops there – Nabil B Jan 24 '18 at 22:51
  • 1
    what is the result of running cat /etc/resolv.conf? – tobyd Jan 24 '18 at 22:57
  • it was nameserver 192.168.1.1 nameserver 2607:fa48:6e80:2690:c256:27ff:fe71:80ab – Nabil B Jan 24 '18 at 22:58
  • changed it to 8.8.8.8 for the first one and 8.8.4.4 for the second didn't solve the issue – Nabil B Jan 24 '18 at 22:58
0

This happened quite often lately with Raspbian Stretch, somehow running apt-get update screw up the gateway setting. This can be observed by run the following command:

route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     202    0        0 eth0

Run this command to add the gateway:

route add default gw [Gateway_IP] [Iface]

in my case, it is

route add default gw 192.168.0.1 eth0

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     202    0        0 eth0

This should fix the problem.

  • Nope, this wasn't the case here my routing was like the second one – Nabil B Jan 25 '18 at 0:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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