I'm trying to set up BIND9 as a local caching DNS server. I'm about to do that on all my systems: Linux, SmartOS, Mac OS X. Seems like it's quite easy to setup bind for that. My question is: Do I need to add "nameserver 127.0.0.1" to my /etc/resolv.conf in order to ask the local name server first? Or is that kind of automatic?
per the man pages, no you don't need to set it.
nameserver - Name server IP address Internet address of a name server that the resolver should query, either an IPv4 address (in dot notation), or an IPv6 address in colon (and possibly dot) notation as per RFC 2373. Up to MAXNS (currently 3, see ) name servers may be listed, one per keyword. If there are multiple servers, the resolver library queries them in the order listed. If no nameserver entries are present, the default is to use the name server on the local machine. (The algorithm used is to try a name server, and if the query times out, try the next, until out of name servers, then repeat trying all the name servers until a maximum number of retries are made.)