Whole document tree Chapter 3. Nameserver Configuration
In this section we provide some suggested configurations along with guidelines for their use. We also address the topic of reasonable option setting. 3.1. Sample Configurations3.1.1. A Caching-only NameserverThe following sample configuration is appropriate for a caching-only name server for use by clients internal to a corporation. All queries from outside clients are refused. // Two corporate subnets we wish to allow queries from. acl "corpnets" { 192.168.4.0/24; 192.168.7.0/24; }; options { directory "/etc/namedb"; // Working directory pid-file "named.pid"; // Put pid file in working dir allow-query { "corpnets"; }; }; // Root server hints zone "." { type hint; file "root.hint"; }; // Provide a reverse mapping for the loopback address 127.0.0.1 zone "0.0.127.in-addr.arpa" { type master; file "localhost.rev"; notify no; }; 3.1.2. An Authoritative-only NameserverThis sample configuration is for an authoritative-only server that is the master server for "example.com" and a slave for the subdomain "eng.example.com". options { directory "/etc/namedb"; // Working directory pid-file "named.pid"; // Put pid file in working dir allow-query { any; }; // This is the default recursion no; // Do not provide recursive service }; // Root server hints zone "." { type hint; file "root.hint"; }; // Provide a reverse mapping for the loopback address 127.0.0.1 zone "0.0.127.in-addr.arpa" { type master; file "localhost.rev"; notify no; }; // We are the master server for example.com zone "example.com" { type master; file "example.com.db"; // IP addresses of slave servers allowed to transfer example.com allow-transfer { 192.168.4.14; 192.168.5.53; }; }; // We are a slave server for eng.example.com zone "eng.example.com" { type slave; file "eng.example.com.bk"; // IP address of eng.example.com master server masters { 192.168.4.12; }; }; 3.2. Load BalancingPrimitive load balancing can be achieved in DNS using multiple A records for one name. For example, if you have three WWW servers with network addresses of 10.0.0.1, 10.0.0.2 and 10.0.0.3, a set of records such as the following means that clients will connect to each machine one third of the time: When a resolver queries for these records, BIND will rotate them and respond to the query with the records in a different order. In the example above, clients will randomly receive records in the order 1, 2, 3; 2, 3, 1; and 3, 1, 2. Most clients will use the first record returned and discard the rest. For more detail on ordering responses, check the rrset-order substatement in the options statement, see RRset Ordering. This substatement is not supported in BIND 9, and only the ordering scheme described above is available. 3.3. NotifyDNS Notify is a mechanism that allows master nameservers to notify their slave servers of changes to a zone's data. In response to a NOTIFY from a master server, the slave will check to see that its version of the zone is the current version and, if not, initiate a transfer. DNS Notify is fully documented in RFC 1996. See also the description of the zone option also-notify, see Section 6.2.14.6. For more information about notify, see Section 6.2.14.1. 3.4. Nameserver Operations3.4.1. Tools for Use With the Nameserver DaemonThere are several indispensable diagnostic, administrative and monitoring tools available to the system administrator for controlling and debugging the nameserver daemon. We describe several in this section 3.4.1.1. Diagnostic Tools
3.4.1.2. Administrative ToolsAdministrative tools play an integral part in the management of a server.
3.4.2. SignalsCertain UNIX signals cause the name server to take specific actions, as described in the following table. These signals can be sent using the kill command. |