New to this so sorry for any mistakes.

I’m trying to get my Raspberry Pi Zero to ping ‘www.google.com’ but I just get 100% packet loss. I can ping perfectly fine, as well as my home router at I don’t believe it’s a DNS issue since its showing me the ip for google. I have a static ip set on the pi (tried just getting an ip assigned by the router, didn’t work). I tried disabling the firewall on my router, also didn’t work. I’ve gone through a number of forum posts trying to diagnose what is going on but haven’t seen anyone having this issue specifically, any help would be appreciated. If more info is needed I’ll try and provide it as soon as possible.

2 Answers 2


I assume you are using default Raspbian. When you set a static ip address then you have also set any other configuration by hand including the DNS server ip addresses to use for DNS name resolution. This is done in /etc/dhcpcd.conf together with the static ip address. You will find some examples in that file. An entry of

static domain_name_servers=

should do a good job except you do not want to use your own DNS server.


One of the reasons I recommend Pi users avoid static addresses is because so many do not understand networking and get it wrong.

If you are determined to do it anyway see How to set up Static IP Address

You DO NOT need to know the IP address to connect to your Pi. You can just connect to your server by name e.g. raspberrypi.local instead of IP address. (NOTE raspberrypi is the default hostname, and can/should be changed).

You can easily connect from Linux and OS X with ssh [email protected] (the default hostname is raspberrypi) This should work with popular GUI ssh programs. This is sometimes problematic with some versions of Windows and networks which use .local in a non-standard way. (See https://en.wikipedia.org/wiki/.local)

NOTE .local resolution does not always work e.g. in rsync. The following should resolve IP (and can be included in bash scripts) RemotePi=$(getent hosts hostname.local | awk '{ print $1 }')

If you REALLY want to know the IP address you can discover it by many means;

arp raspberrypi.local on most networks (arp raspberrypi may work on some)


arp archpi.local
archpi.local ( -- no entry


getent hosts archpi.local | awk '{ print $1 }'


ping -c 1 archpi.local
PING archpi.local ( 56 data bytes
64 bytes from icmp_seq=0 ttl=64 time=4.607 ms

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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