37.1. Objective 1: Basic DNS Server ConfigurationThe main configuration file for BIND 8.x is /etc/named.conf. In it you can specify options such as the default directory for named files and specify the zones for the named entries you are hosting. You generally host two types of named files. The first is the database (db) entry for each domain you host. These db entries are typically named either db.domain.com or domain.com.db, depending on the naming scheme you use. The db entries are the forward DNS entries for your domain. The second type of named file you host is the reverse DNS file, denoted typically by db.x.x.x.in-addr.arpa, where x.x.x is the subnet you are hosting with its elements reversed. For example , if you host the 208.201.239 subnet, you would have a db.239.201.208.in-addr.arpa reverse DNS file. It is common for your ISP to manage the reverse DNS on the IP addresses that they have assigned to you, so in-addr.arpa entries may not always be necessary. 37.1.1. named.confThe /etc/named.conf file is the main configuration file for named. Within the named.conf file, you will specify options such as the default directory for named entries and zone entries for individual named files. The following is a sample /etc/named.conf file: options { directory "/var/named"; }; zone "." { type hint; file "named.ca"' }; zone "1.168.192.in-addr.arpa" { type master; file "db.1.168.192.in-addr.arpa"; }; zone "example.com" { type master; file "db.example.com"; }; zone "example.net" { type slave; file "db.example.net"; masters { 192.168.0.100; }; }; The preceding sample /etc/named.conf has five different types of entries. The first two entries are mandatory configuration options for BIND. The first entry specifies BIND options. In this example, the directory option sets where all named files will be placed. By default, this option is set to /var/named. Many DNS administrators are accustomed to keeping named files under /etc/named and therefore change this directory option. The second entry is a default zone entry to specify what file can be used as a "hint" for where to find root name servers. By default, BIND 8 uses /var/named/named.ca. This second entry is required, and it is not recommended to edit this entry or file unless necessary. The third entry in the example is a reverse DNS zone entry. The zone specified is 1.168.192.in-addr.arpa. The reverse DNS is a primary DNS record, so the type entry is set to master. The file with the reverse DNS information is in /var/named/db.1.168.192.in-addr.arpa, so the file option is set to db.1.168.192.in-addr.arpa. The fourth entry in the example is a primary DNS zone entry. The zone specified is example.com. Because the entry is a primary DNS entry, the type is set to master. The file for the entry is found in /var/named/db.example.com, so the file option is set to db.example.com. The fifth entry in the example is a sample secondary DNS zone entry. The zone specified in the example is example.net. Because the entry is a secondary DNS entry, the type is set to slave. The file for this secondary entry is found in /var/named/db.example.net, so the file option is set to db.example.net. Because this entry is a secondary DNS entry, you must provide the primary DNS server information where the DNS information is retrieved from. In this entry's case, the primary DNS server is 192.168.0.100, so the masters option is set to 192.168.0.100. 37.1.2. Primary DNSAfter you have a domain registered with the DNS server you specify as the primary DNS server, you will need to set up your named files by following these steps:
37.1.3. Secondary and Tertiary DNSWhen a domain is registered, it must be registered with not only a primary DNS server, but also a secondary DNS server. If the primary server is down, the secondary server will take over. For even more failover support, a tertiary DNS server can be set up. Setting up secondary DNS for a domain is even simpler than setting up primary DNS. Essentially, you have to do only Steps 1 and 5 from the previous list that describes setting up primary DNS. There is a difference, however, from Step 1 for primary DNS. The following steps explain how to set up secondary DNS.
|