[Dnsmasq-discuss] Inconsistent name resolution behavior across
Windows XP hosts
László Monda
laci at monda.hu
Wed Mar 18 16:06:53 GMT 2009
On Wed, Mar 18, 2009 at 2:06 PM, Simon Kelley <simon at thekelleys.org.uk> wrote:
> László Monda wrote:
>>
>> Hi List,
>>
>> I'm running dnsmasq inside an OpenWrt router which acts as the LAN
>> gateway.
>>
>> On some Windows XP hosts name resolution works when referring to LAN
>> hosts purely through their name.
>>
>> On other Windows XP hosts I have to explicitly use the local domain
>> such as hostname.lan otherwise the resolution fails.
>>
>> Please shed some light on this issue. I'd love to understand it.
>>
>
> This dnsmasq FAQ entry might help:
>
> Q: Names on the internet are working fine, but looking up local names
> from /etc/hosts or DHCP doesn't seem to work.
>
> A: Resolver code sometime does strange things when given names without
> any dots in. Win2k and WinXP may not use the DNS at all and just
> try and look up the name using WINS. On unix look at "options ndots:"
> in "man resolv.conf" for details on this topic. Testing lookups
> using "nslookup" or "dig" will work, but then attempting to run
> "ping" will get a lookup failure, appending a dot to the end of the
> hostname will fix things. (ie "ping myhost" fails, but "ping
> myhost." works. The solution is to make sure that all your hosts
> have a domain set ("domain" in resolv.conf, or set a domain in
> your DHCP server, see below fr Windows XP and Mac OS X).
> Any domain will do, but "localnet" is traditional. Now when you
> resolve "myhost" the resolver will attempt to look up
> "myhost.localnet" so you need to have dnsmasq reply to that name.
> The way to do that is to include the domain in each name on
> /etc/hosts and/or to use the --expand-hosts and --domain options.
Looks like name resolution worked fine for all WinXP hosts, but I left
a Hosts file on the problematic host long ago and that caused the
problem.
Thanks Simon!
--
Laci <http://monda.hu>
More information about the Dnsmasq-discuss
mailing list