Results 1 to 7 of 7

Thread: name resolution problem

  1. #1

    Default name resolution problem

    Hi there,

    I have a name resolution problem. The situation is:

    PC(192.168.178.21) <--(WLAN)--> FritzBox(192.168.178.1) <--(LAN)--> nas1(192.168.178.22)

    My PC connects to a FritzBox via WLAN. The FritzBox serves as DHCP server and more to that as DNS server. As soon as I am connected I find the corresponding entry in my /etc/resolv.conf: nameserver 192.168.178.1

    So far so good.

    My external storage is a NAS which is connected to the FritzBox via LAN. Its name is nas1 and it recieved IP 192.168.178.22 from the DHCP server.

    The problem is: although I can dig/nslookup/host for nas1 (the name is perfectly resolved by the FritzBox), I am unable to ping nas1: unknown host. This is also true for browsing via an internet browser.

    I'm sure there is a simple explanation for this, I just wasn't able to find it.

    All hints how to solve this are highly appreciated!

    Thanks in advance,

    Reinhard.

  2. #2
    Join Date
    Jan 2009
    Location
    Switzerland
    Posts
    1,529

    Default Re: name resolution problem

    This can't work. Your WLAN is on the same network as your LAN. These should be two different networks.

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,798

    Default Re: name resolution problem

    Quote Originally Posted by vodoo View Post
    This can't work. Your WLAN is on the same network as your LAN. These should be two different networks.
    To prove this try to ping to the IP address instead of to the name. This will show you that it is not a name resolution problem (as you already proved by using nslookup, but a connection problem (that is where ping is for).
    Henk van Velden

  4. #4

    Default Re: name resolution problem

    All devices are in the same network, IP communication is fine. (Tested with ping / IP addresses).

    Name resolution still gives me a hard time. Is it possible that ping works different from nslookup/dig/host?

    Cheers, Reinhard.

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,798

    Default Re: name resolution problem

    Yes, ping works different. ping uses the gethostbyaddress() function which uses not only DNS but also /etc/hosts (and other resources). The config for this is in /etc/nsswitch.conf. There it is configured where to look first (e.g. look first in /etc/hosts, when not found use DNS, when again not found fail).

    nslookup and the like do what they say, looking in DNS only.
    Henk van Velden

  6. #6

    Default solved: name resolution problem

    Hi there,

    thank you for your inputs! With the help of wireshark, I finally found the source of the problem: ping automatically adds the search domain (.mydomain.local) and this of course confused my DNS server on the FritzBox because Fritzbox does not know that.

    So I removed all entries of .mydomain.local - I even had to reboot since restart of network services and netconfig update did not help. After the reboot, ping ask for nas1 instead of nas1.mydomain.local and everything is fine ... for now

    Thanks again!

    Reinhard.

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

    Default Re: name resolution problem

    You are welcome.

    Not all those domains, names, etc. installed automagically, so newbies do not have to think about their configuration, are a blessing IMHO.
    Henk van Velden

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
  •