name resolution problem

Hi there,

I have a name resolution problem. The situation is:

PC( <–(WLAN)–> FritzBox( <–(LAN)–> nas1(

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

So far so good. :slight_smile:

My external storage is a NAS which is connected to the FritzBox via LAN. Its name is nas1 and it recieved IP 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. :expressionless:

All hints how to solve this are highly appreciated!

Thanks in advance,


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).

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.

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.

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 :wink:

Thanks again!


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.