Results 1 to 9 of 9

Thread: hostname resolution stopped working!

  1. #1

    Default hostname resolution stopped working!

    Hi,

    I have a dual boot installation on my laptop with Opensuse 13.1 and Windows 7. Suddenly, my opensuse installation isn't able to resolve hostnames. DHCP client is able to obtain an IP address and I am able to connect to other computers on my network using their IP addresses just fine. My other computers and Windows 7 installation on the same laptop work fine. So far I have tried, connecting through wired interface, booting into an older kernel, but nothing has made any difference. I tried running nslookup, but that too waits for a long time and returns with no server for hostname resolution. I have run of ideas on how to investigate this problem.

    Has anyone experienced a similar issue? Any resolution or suggestions?

    Thanks

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,336
    Blog Entries
    15

    Default Re: hostname resolution stopped working!

    Hi
    Might be a stale arp entry, do you get output from;
    Code:
    /sbin/arp
    The router dishing up the ip address may need a reboot, else check the entries in /etc/resolv.conf for nameserver entries.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3

    Default Re: hostname resolution stopped working!

    When you are having the problem did you check your system to see if DNS
    client settings were in place?

    Code:
    --------------------
    grep nameserver /etc/resolv.conf
    --------------------

    Also, what do you expect your DNS service's IP to be within your network?
    Pretending it is 192.168.1.254, use the following command with a hostname
    you wish to lookup instead of targethostname and post the full command and
    output:

    Code:
    --------------------
    dig @192.168.1.254 targethostname
    --------------------

    --
    Good luck.

    If you find this post helpful and are logged into the web interface,
    show your appreciation and click on the star below...

  4. #4
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,704
    Blog Entries
    1

    Default Re: hostname resolution stopped working!

    Quote Originally Posted by JantarMantar View Post
    Hi,

    I have a dual boot installation on my laptop with Opensuse 13.1 and Windows 7. Suddenly, my opensuse installation isn't able to resolve hostnames. DHCP client is able to obtain an IP address and I am able to connect to other computers on my network using their IP addresses just fine. My other computers and Windows 7 installation on the same laptop work fine. So far I have tried, connecting through wired interface, booting into an older kernel, but nothing has made any difference. I tried running nslookup, but that too waits for a long time and returns with no server for hostname resolution. I have run of ideas on how to investigate this problem.

    Has anyone experienced a similar issue? Any resolution or suggestions?

    Thanks
    Is this a samba network? If so, can you find machines by name using the following?
    Code:
    nmblookup <machine name>

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

    Default Re: hostname resolution stopped working!

    1. You need to test name resolution for other machines on your network vs public domain names, more than likely and especially if your local network is a workgroup and not a Domain, Host names will be resolved differently.
    2. Are you running a workgroup or a Domain? A workgroup will resolve names by election and browse master which may change if you boot new, powerful machines into your workgroup. On the other hand, Domains implement local DNS servers which are authoritative for name resolution and never change. This is typically resolved by just waiting a few minutes.
    3. If you multi-boot your machine, verify each OS implements a <different> MAC address. I've seen machines incorrectly identified on the network because identity is associated with the MAC address in multiple places but of course when you reboot into a different OS your machine is actually different.

    TSU

  6. #6

    Default Re: hostname resolution stopped working!

    Thanks for all these great suggestions. Just to add some clarification.


    • I have an ubuntu server on my network that acts as dhcp server. I suspected that to be a problem and have since rebooted it. That hasn't made any difference.
    • Since everything works fine when I boot into windows, that kind of rules out any hardware malfunction.
    • I also tried changing the network-manager settings to just get the addresses and used hard-coded DNS server to 8.8.8.8 (google's public DNS). That too, didn't help.
    • I tried wired LAN connection to get a fresh IP address, that too had the same problem.


    I have no entries for namserver (or anything else) in my /etc/resolv.conf

    /sbin/arp with no arguments returned two IP addresses associated with my wifi interface, which I believe are my DNS (my Ubuntu server) and gateway server IP (my router's IP) addresses and they appear to be correct.

    Now, the outputs of dig commands were interesting.

    if I used explicit @DNS server address, my ubuntu (DHCP) server's IP address or even 8.8.8.8 (google's DNS), name resolution works great. If I omit explicit @dsn address, dig commands waits for about 30 seconds before failing with "connection timed out; no servers could be reached"

    Additionally, from what I can tell, the output of nmcli dev list iface <my wifi iface> shows DNS server addresses listed correctly.

    Anything else I should check?

    Thanks again for your suggestions.

  7. #7

    Default Re: hostname resolution stopped working!

    > I have no entries for namserver (or anything else) in my
    > /etc/resolv.conf


    This is the problem. If you have no nameservers, you have no chance of
    resolving DNS stuff, locally or otherwise.

    > if I used explicit @DNS server address, my ubuntu (DHCP) server's IP
    > address or even 8.8.8.8 (google's DNS), name resolution works great. If
    > I omit explicit @dsn address, dig commands waits for about 30 seconds
    > before failing with "connection timed out; no servers could be reached"


    Yes, if you tell it to use a DNS server, all is well. If not, it tries
    the system values (not configured) and naturally fails since you do not
    have any DNS configured.

    Try running the following command:

    Code:
    --------------------
    sudo /sbin/netconfig -f update
    --------------------

    Once done, check your /etc/resolv.conf file again to see what it has. If
    nothing, reboot. If still nothing, try this and post the output:

    Code:
    --------------------
    sudo /usr/sbin/dhcpcd-test wlan0 #where 'wlan0' is your wireless device
    --------------------

    --
    Good luck.

    If you find this post helpful and are logged into the web interface,
    show your appreciation and click on the star below...

  8. #8
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,675
    Blog Entries
    3

    Default Re: hostname resolution stopped working!

    Quote Originally Posted by JantarMantar View Post
    Anything else I should check?

    Thanks again for your suggestions.
    It is my impression that there was a buggy update to netconfig, which might be involved. It has either been recently fixed, or soon will be fixed.

    For the time being, manually enter nameservers in "resolv.conf".

    Check every now and then (say, every boot). If there is a file "/etc/resolv.conf.netconfig", and if its content looks good, then move that to "/etc/resolv.conf". It will be an indication that the problem is fixed.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  9. #9

    Default Re: hostname resolution stopped working!

    Quote Originally Posted by ab View Post
    Try running the following command:

    Code:
    --------------------
    sudo /sbin/netconfig -f update
    --------------------
    Thank you! That forced update indeed updated my /etc/resolv.conf and brought my laptop back to the fast-lanes of internet! Hopefully this is a netconfig bug as nrickert pointed out and I'll not have to do this very often.

    Quote Originally Posted by nrickert View Post
    It is my impression that there was a buggy update to netconfig, which might be involved. It has either been recently fixed, or soon will be fixed.

    For the time being, manually enter nameservers in "resolv.conf".

    Check every now and then (say, every boot). If there is a file "/etc/resolv.conf.netconfig", and if its content looks good, then move that to "/etc/resolv.conf". It will be an indication that the problem is fixed.
    Thanks for pointing it out. I'll keep an eye out for it.

    Thanks for the great suggestions and quick help that you all have been.

Posting Permissions

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