While implementing a static IP for my Raspberry I had to update /etc/dhcpcd.conf

interface eth0

static ip_address=
static routers=
static domain_name_servers=

I noticed that without the static domain_name_servers= line I have no access to the internet, so why do I need a Domain Name Server with the same IP as my router for my Raspberry to connect to the internet?


The router line tells the Pi how to connect to the outside world. Without the domain name server line you can connect to other computers using their IP address. The following command would work


The Domain Name Servers are like a phone book for the internet and provide the mapping between the human friendly name (such as raspberrypi.stackexchange.com) and the IP address (

In most home networks the router and the DNS (Domain Name Server) are one and the same, but in bigger networks they do not have to be.

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.