system never tries to access a nameserver


I’ve been using opensuse 13.1 on a laptop with a wired ethernet connection for more than a month.

Tonight I rebooted and found that I couldn’t get web pages.

I am able to successfully ping outside computers using numerical addresses, for example:

However, using “words” in an address doesn’t work:
gives an error like:
ping: unknown host

What seems odd to me is that the activity light on my computer’s ethernet port never lights up when I use the “word” address, unless it is a hostname on my LAN. I am able to get pings back from my local computers whether I refer to them by name or numerically.

The problem seemed to come up spontaneously, except for the reboot, meaning that I didn’t change anything about the network configuration until the problem appeared.

Well, then you should of course first check your resolver configuration.

grep -v '^#' /etc/resolv/conf

/etc/resolv.conf is empty except for comments.

I am using the KDE network configuration GUI.

I will accept your conclusion, but next time please copy/paste the prompt, the command, the output and the next prompt in your post between CODE tags. you get the tags by clicking on the # button in the tool bar of the post editor. That would then look like:

henk@boven:~> grep -v '^#' /etc/resolv.conf

We can then draw our own conclusions and do not depend on your’s, how valuable and true they may be.

When you have nothing there, it is logical that there is no DNS lookup. We can now do two things. We can try to find out why this is not configured. For that, we want to know if you use ifup or NetworkManager, DHCP or not. I am not sure if I understand what the “KDE network configuration GUI” is. In openSUSE you use YaST > Network Devices > Network Settings for configuring.

You can also add the following line at the end of /etc/resolv.conf:


and thus use Googles DNS server from then on.

Henk, I was able to take your previous hint about /etc/resolv.conf and put the IP’s of a couple of nameservers in it, although I didn’t want to, as it feels unsystematic to bypass the network management tools. But that gives me internet access again. Thank you.

But I had previously used NetworkManager (what I called “KDE network configuration GUI”, described here: and entered the same nameserver IP’s through its GUI, without any effect on /etc/resolv.conf, so that is baffling.

When I run the Network Settings GUI of YaST, it tells me “Network is currently controlled by NetworkManager and its settings cannot be edited by YaST”. Then it suggests to switch the network setup method to Traditional with ifup. Do you think I should just start using YaST for this job instead of NetworkManager?

If NetworkManager has been working fine, then leave it as is.

Try this:

delete “/etc/resolv.conf”
immediately reboot

See if that solves the problem.

Explanation: Normally, the DHCP software gets info on DNS servers from your router or DHCP server, and updates “/etc/resolv.conf”. However, there are builtin tests – if you have ever edited “resolve.conf” then it won’t update it any more. Something might have gone wrong at one time. Deleting “resolv.conf” and rebooting will make a fresh start.

To delete “resolv.conf”, as root:

# rm /etc/resolv.conf

I support nrickerts suggestions.

Also, when you want to use that laptop as a “carry around” system where you use different Wifi access points (at home, at work, at the airport, etc.), then you should use NetworkManager and not switch to traditional ifup. When you use that laptop all the time with only your home network, then there is no need to use NetworkManager and a fixed traditional ifup approach is fine.

  1. I also endorse deleting /etc/resolv.conf and rebooting.

  2. But if you do decide to modify /etc/resolv.conf manually (with the objective to avoid deleting the resolv.conf file and rebooting)

I noticed the new comments in /etc/resolv.conf in 13.1 and would recommend following those instructions…

Apparently /etc/resolv.conf is generated dynamically now, which means that if you edit the file manually, those changes you made may/are lost with the next reboot.

Instead, make the required changes in


Needless to say, if you specify nameservers on a portable machine, you should point to a widely accessible nameserver like Google’s (or most any other Tier 1 DNS Server) and not a network specific server run by your ISP.


Normally there is a backup file name /etc/resolv.conf.netconfig just in case you can always copy that file.

cp -v /etc/resolv.conf.netconfig /etc/resolv.conf

Then check the entry in resolv.conf

grep '^^#]' /etc/resolv.conf

Just in case you do not want to see the colored output, the \ back slash is not a typo fyi. :wink:

\grep '^^#]' /etc/resolv.conf