A caching only name server has no local zones; all the queries it receives are forwarded to the root servers and the replies are accumulated in the local cache. The next time the query is performed the answer will be faster because the data is already in the server's cache. Since this type of server doesn't handle local zones, to resolve the names of the local hosts it will still be necessary to use the already known /etc/hosts file.
Since NetBSD supplies defaults for all the files needed by a caching only server, it only needs to be enabled and started and is immediately ready for use! To enable named, put named=yes into /etc/rc.conf, and tell the system to use it adding the following line to the /etc/resolv.conf file:
代码: 全选
# cat /etc/resolv.conf
nameserver 127.0.0.1
Now we can start named:
代码: 全选
# sh /etc/rc.d/named restart