Jaguar, DNS and dig

sjsadler

Registered
I've just upgraded our OS X machine for 10.1 to 10.2 (and thence to 10.2.2) and am now having problems with name resolution. Unfortunately I don't have access to another 10.1 machine to compare against.

The problems may lie in part with our DNS servers.

Before the upgrade everything seemed to work - afterwards it was unable to find other machines via hostname.

Further investigation yielded that nslookup worked fine (e.g. looking for a machine "fred" )

nslookup fred -> will give the right ip address
dig fred -> will fail, our DNS responds with SERVFAIL
dig fred.search_domain -> works (search_domain being defined in the "network settings" control panel).

Now I suppose I could try and get our servers updated or re-write all the software / scripts that uses names of network machine, but is there anything I can to my Mac to remove this problem (e.g. force it to use nslookup rather than dig) ?
 
I think you're alittle confused on how the system looks up things with DNS. First nslookup and dig are merely tools used to query DNS servers for testing/debuging purposes. dig is actually the replacement for nslookup, as nslookup is officially depreciated by the ISC (the folks who write BIND). A standard install of bind from source gives you nice messages about this when you run nslookup. Both nslookup and dig go and query a DNS server specifically defaulting to the DNS servers located in /etc/resolv.conf. nslookup will also use the defaultdomain and search list in resolv.conf for trying to lookup a name, for instance if you give it "foo", and you have "search bar.com blee.com bleck.com" in your resolv.conf, it will try to lookup foo, foo.bar.com, foo.blee.com, then foo.bleck.com until it finds a match. This is what the system does by default in it's internal resolver. dig on the other hand doesn't use the search order, altho it can, but it's disabled in the version that ships with 10.2 as dig -h lists:
notes: defname and search don't work; use fully-qualified names.
this is DiG version 8.3
$Id: dig.c,v 1.1.1.3 2001/01/31 03:59:42 zarzycki Exp $

So never fear, everything is working just fine. Try a ping foo.bar.com or whatever if you really want to test how the OS is doing the resolution, cause remember, nslookup and dig are only DNS tools, and hostname resolution is can be done many ways, by /etc/hosts, dns, NIS, NIS+, WINS, etc, so by only using nslookup/dig, you're only testing one of the many ways the OS can get a hostname.

Brian
 
Back
Top