On Monday 27 August 2001 09:31, Martin F Krafft wrote: > also sprach Cliff Sarginson (on Mon, 27 Aug 2001 07:48:11AM +0200): > > Hello .. "search" and "domain" are mutually exclusive btw. > > The last one in the file is what wins... > > are you serious? i must admit that i never really knew what "domain" > did, but i didn't know that they were mutually diskliking each other. > do you have docs about that? not that i disbelieve you, just > interest...
The behaviour resulting from the domain directive is a little complicated to explain. The domain used to resolve addresses is normally the domain part of the full host name..so if your host is jabberwocky.carrol.net then your default domain is "carrol.net". If you have a hostname without dots, e.g. just "jabberwocky" then the default domain is the root domain "." which is useless...! If you use the domain directive you specify a new default domain. e.g domain lewis.net Then lookups will use this domain instead of rhe implied default. This is your search list. If you just type a host name for resolution that is first looked up as is, if it is not found then the domain part is appended and a new serach begun. The search directive allows you to specify a number of domains to search, up to 6 I believe. The first name in the search list because the default domain. hence any preceding domain definition is just ignored. This is somewhat different in older versions of bind..but I doubt you are running one of those. There is more to the story than this .. trailing dots for example..but that is my two-pennyworth for now. If you want to understand DNS buy the bible O'Reilly book.. DNS and BIND. I think their is a bind user's manual in the distro as well. One of the real headaches with setting up DNS is typing mistakes...that may not raise an error from bind or the resolver..and can be a pain to find. There is a DNS checking program whose name escapes me..someone else doubtless remembers it. You can put any garbage you like in resolv.conf btw, you will never get an error .. lol. Good Luck Cliff