My question is very similar to this one: Can ping but no DNS

I have setup a static IP on my previous Ubuntu versions - 9.04 and 12.04 - without issue. I have used an identical means this time as well. Namely manually editing the /etc/network/interfaces file to set the static IP.

My router has the IP reserved for this machine. The machine acquires the desired static IP (I now get the networking issues message and extra 60 second wait at reboot). I can ping the router and but I cannot look anything up. I cannot use curl with a domain name like google.com.

My windows laptop does not see it but I can access it by going to the designated static IP.

I tried using nslookup as suggested in the referenced question but the timed out without reaching any servers.

  • 1
    Normally you need to setup the resolve.conf file as well in the etc directory. I believe the dhcp client normally generates this but as you are using a static address it might need it. – Meer Borg Aug 26 '14 at 2:44
  • @MeerBorg I've never needed to alter the resolve.conf file in the previous versions of Ubuntu. They always worked fine. And I looked at it before posting my question. The comments in resolve.conf specifically say not to alter it because any edits will be overwritten by the system. – Gabe Spradlin Aug 26 '14 at 17:06

I don't typically want to answer my own questions but I fixed this issue - mostly. The answers were on these 2 posts:

Static IP configuration causing apt-get errors

resolv.conf doesn't get set on reboot when networking is configured for static ip

Ultimately the answer was to add:


At the end of the eth0 definition in /etc/network/interfaces. This solves all of my access issues to he outside world. However, I have gone from a very quick boot up to a boot up that takes a couple of minutes while it waits on the network config for some reason. The static IP is reserved with the router so conflicts really shouldn't be the issue.

Anyways the system now works functionally with the static IP I want. The long boot up is just an annoyance.

  • Just to remind you, answering own question is not essentially a bad thing, rather it's encouraged. This especially helps when there is no helpful answers. thanks for finding the time to write the answer – Anwar Dec 24 '16 at 18:53
  • I can confirm that after upgrading to 16.04 I had a nearly identical issue on the same machine. This same solution works on 16.04. On 16.04, I couldn't even ping the outside world let alone get DNS so I had to add dns-nameservers – Gabe Spradlin Feb 17 '17 at 18:09

If your installation was first setup via DHCP this other post might give you additional insights:

Static ip but dynamic nameservers?

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.