Results 1 to 9 of 9

Thread: system never tries to access a nameserver

  1. #1

    Default system never tries to access a nameserver

    Hi.

    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:
    ping 8.8.8.8

    However, using "words" in an address doesn't work:
    ping www.google.com
    gives an error like:
    ping: unknown host www.google.com

    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.

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,840

    Default Re: system never tries to access a nameserver

    Well, then you should of course first check your resolver configuration.
    Code:
    grep -v '^#' /etc/resolv/conf
    Henk van Velden

  3. #3

    Default Re: system never tries to access a nameserver

    Quote Originally Posted by hcvv View Post
    Well, then you should of course first check your resolver configuration.
    Code:
    grep -v '^#' /etc/resolv/conf
    /etc/resolv.conf is empty except for comments.

    I am using the KDE network configuration GUI.

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,840

    Default Re: system never tries to access a nameserver

    Quote Originally Posted by LizardBoy View Post
    /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:
    Code:
    henk@boven:~> grep -v '^#' /etc/resolv.conf
    henk@boven:~>
    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:
    Code:
    nameserver 8.8.8.8
    and thus use Googles DNS server from then on.
    Henk van Velden

  5. #5

    Default Re: system never tries to access a nameserver

    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: http://doc.opensuse.org/documentatio...up/cha.nm.html) 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?
    Last edited by LizardBoy; 18-Mar-2014 at 04:51. Reason: correct error

  6. #6
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,685
    Blog Entries
    3

    Default Re: system never tries to access a nameserver

    Quote Originally Posted by LizardBoy View Post
    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:
    Code:
    # rm /etc/resolv.conf
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,840

    Default Re: system never tries to access a nameserver

    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.
    Henk van Velden

  8. #8
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: system never tries to access a nameserver

    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
    Code:
    /etc/sysconfig/network/config
    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.

    TSU

  9. #9

    Default Re: system never tries to access a nameserver

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

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

    Then check the entry in resolv.conf

    Code:
    grep '^[^#]' /etc/resolv.conf
    Just in case you do not want to see the colored output, the \ back slash is not a typo fyi.

    Code:
    \grep '^[^#]' /etc/resolv.conf

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •