Re: named



The Natural Philosopher wrote:
Bartlomiej F. Tajchman wrote:
Barry Margolin pisze:
I have a problem with configuration of bind under MacOS control. I have a correct zone file, I can ask bind for this domain, by host/dig/nslookup commands. Answers are OK, I have trace of query in logs. But when I try to use ping/ssh and every other I got "ping: cannot resolve [domainname]: Unknown host.

In resolv.conf I have myself 127.0.0.1.

How can I solve this issue?

The BSD resolver has never worked for me with a server line of 12.0.0.1. I always use the local IP address of the nameserver, even on the box itself.

Interesting. This is a bug that existed for many years (it's even mentioned in the "DNS & BIND" book), but I thought it had been fixed in most flavors of Unix years ago. I'm very surprised that OS X still has it.

If your machine gets its IP dynamically, you can put:

nameserver 0.0.0.0

in /etc/resolv.conf, and this will automatically use the local IP address. Or just leave out the "nameserver" line entirely, as this is the default.

Unfortunately, no success...


Machine is 192.168.1.15. Results after querying about domain:

lisa:~ root# dig test.lisa.tld @192.168.1.15

; <<>> DiG 9.3.4 <<>> test.lisa.tld @192.168.1.15
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39436
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;test.lisa.tld. IN A

;; ANSWER SECTION:
test.lisa.tld. 86400 IN A 192.168.1.15

;; AUTHORITY SECTION:
lisa.tld. 86400 IN NS ns.lisa.tld.

;; ADDITIONAL SECTION:
ns.lisa.tld. 86400 IN A 192.168.1.15

;; Query time: 0 msec
;; SERVER: 192.168.1.15#53(192.168.1.15)
;; WHEN: Tue Jul 31 11:21:11 2007
;; MSG SIZE rcvd: 80


Answer is OK.

But next:

lisa:~ root# ping test.lisa.tld
ping: cannot resolve test.lisa.tld: Unknown host


It doesn't work.

In /etc/resolv.conf I've tried nameserver 192.168.1.15, nameserver 127.0.0.1, nameserver 0.0.0.0 and without any nameserver. Still misfortune...


Mmm. On Linux I merely have nameserver 127.0.0.1


Now I wonder...I have seen this before years ago when SUN first started replacing things with the netinfo stuff..

When you do your ping, or whatever,does it comes straight back and tell you it can't resolve?or does it hang around for about half a minute and then say so?

From man 5 resolver

The resolver is a set of routines in the C library resolv(3) that provide
access to the Internet Domain Name System (DNS). A resolver configura-
tion file contains information used to specify parameters for a DNS
resolver client. The file contains a list of keywords with values that
provide various types of resolver information.

Mac OS X supports a DNS search strategy that may involve multiple DNS
resolver clients. See the SEARCH STRATEGY section below for an overview
of multi-client DNS search.

Each DNS client is configured using the contents of a single configura-
tion file of the format described below, or from a property list supplied
from some other system configuration database. Note that the
/etc/resolv.conf file, which contains configuration for the default (or
"primary") DNS resolver client, is maintained automatically by Mac OS X
and should not be edited manually. Changes to the DNS configuration
should be made by using the Network Preferences panel.


That may be an issue..

Try entering name servers in the 'graphical way' by configuring TCP/IP



Oh.. I just remembered something..when SUN came up with what was first yellow pages, then YP..that IIRC morphed into netinfo, they maintained the old files like /etc/resolv.conf for legacy apps, but these were derivatives of the real information database, generated by tools from there.

I suspect that older programs with legacy resolver libraries would use that file, but my guess is the modern resolver library ignores it completely and uses some other ways to do things..there's another dns daemon in late tiger releases too..

Also consider lookupd. That caches name/address I think, mappings and may need restarting..

Sadly the old days of 'edit a file and it works' (or crashes) are long gone..







Best regards,
Bart.
.



Relevant Pages

  • Re: resolv.conf wrongly gets Belkin routers address
    ... nameserver 192.168.2.1 ... Some routers proxy DNS information through themselves. ... its own address as a DNS server in addition to some upstream DNS ... Inspect the Belkin client DNS configuration and see if that address ...
    (Debian-User)
  • Re: named
    ... The BSD resolver has never worked for me with a server line of 12.0.0.1. ... I always use the local IP address of the nameserver, ... This is a bug that existed for many years (it's even mentioned in the "DNS & BIND" book), but I thought it had been fixed in most flavors of Unix years ago. ... from some other system configuration database. ...
    (comp.sys.mac.system)
  • Re: routing table problem after power failure (sarge)
    ... > - After playing around with Postfix' configuration, ... back one or more nameserver entries doesn't get DNS going? ... check if one of the TLD servers is responding to you - for example B.NIC.FR ...
    (Debian-User)
  • Re: old-school
    ... wireless network uses WPA and my card needs iwpriv commands for it, so at the minute I use a hack in ifup-wireless). ... It did something funny which meant I had to point resolv.conf at my router to get DNS working again, does anyone know what resolv.conf is 'normally'? ... nameserver 192.168.1.2 ... your resolve configuration, then reconfigure their network configurations not to peer DNS. ...
    (Fedora)
  • Re: Cannot telnet to host from host command line and mail servers
    ... >> I have what I believe to be a DNS problem on a 5.0.7 system. ... >> nameserver 127.0.0.1 ... > bootstraps the discovery of Internet top-level DNS servers. ... > The first entry is actually redundant, the resolver should query a local ...
    (comp.unix.sco.misc)