I'm running Ubuntu 13.04.

I uninstalled DHCP.

I set my IP address to and it's working just fine. I can connect to it via my other internet network machines.

However, I've tried to set DNS in /etc/network/interfaces to:


And that doesn't work. I tried the prepend before it also.

I tried the resolve.conf and resolve.conf.d/head and tail with nameserver and that doesn't work.

I restart each of the services each time I edit them and try to resolve an address and I get the typical unknown host www.google.com. I've restarted the VM too (it's set to bridged in VirtualBox).

I can't re-install DHCP from repositories because DNS isn't working.

Can someone please help me? I'm getting pretty frustrated. I've tried every solution I can find on google.

  • 1
    When trying to ping I get "Connect: Network is unreachable" – Clob Aug 24 '13 at 23:26
  • The dns-nameservers option mentioned in the previous post works. But this option is not mentioned in the helpfile "man interfaces" which is ackward. I think it should be possible in KDE to configure a static IP with all parameters in system settings -> network settings, but this option is not available in KDE. – user265541 Apr 5 '14 at 8:07

When you do not want to use DHCP and/or want NetworkManager to ignore some interface that you want to manage manually, just provide a configuration via /etc/network/interfaces. The interface will then be ignored by NetworkManager. See

$ man interfaces

for further info on how to configure interfaces manually. This is a template file (snippet) that configures the interface eth0:

auto eth0
iface eth0 inet static

Obviously you need to change the IP addresses. Note that the last line is evaluated by resolconf (it's a package/program, I don't mean the resolv.conf file), when and only when the interface is brought up successfully. You can check if the interface is up with /sbin/ifconfig. That should output the keyword UP and the IP somewhere. gateway in the above snippet denotes the IP of your router. Check if this ip appears in your route with the command route -n. Then ping your router. If that works, then you could ping If that works check if the DNS correctly appears in the /etc/resolv.conf file. If it does, then check if you can resolve DNS names. In that order. If something in betweens fails, it is not a problem with your DNS.

If you're not able to get this straight using /etc/network/interfaces (package ifupdown) and want to know how to bring up an interface with basic commands, drop a comment.

Then you need to investigate how the trouble started in the first place. You've learnt already that you first need to clarify that your machine is able to ping before you conclude to an error at resolving DNS though that server. If all that works fine, but the resolver entry just doesn't get tranfered correctly from /etc/network/interfaces to /etc/resolv.conf then continue your research at the documentation of the package resolvconf.


Do not deinstall your dhcp software, when you depend on the internet connection and have few experiences on how to configure an interface manually. There are a lot of high level packages involved with bringing up an interface, namely network-manager, ifupdown and resolvconf and others. Which one does what is not obvious. ;)

| improve this answer | |

This is not an issue with the DNS, but with the overall internet connection for your VM.

This should be an issue with how you are providing the network connection to the VM client via the host. Explore the possible solutions more with that bend. If it was only an issue with the DNS, your pings would succeed.

Try to make the connection on the VM to NAT rather than to bridge it. See if the connectivity comes up. Once you have the connection to the internet, the DNS should work just fine.

| improve this answer | |
  • 1
    Well, the internet connection was working fine before I removed DHCP in bridged mode. My mistake was removing DHCP instead of understanding how to set the static IP around it. I restored a backup and undid my mistake. Thanks though! – Clob Aug 25 '13 at 18:05

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.