-->
Page 266
Because TXT records are free form, they do not force you to place contact information there. As a result, the RP record was created, which explicitly states who is the responsible person for the specified hostfor example,
domain.com. IN RP heidis.domain.com. domain.com.
The first column states which host the responsible party is set for. The second column, IN, defines this record to use the Internet class. RP designates this to be a responsible party record. In the fourth column is the e-mail address of the person who is actually responsible. Notice that the @ symbol has been replaced by a period in this address, much like in the SOA record. The last column specifies a TXT record that gives additional information. In this example, it points back to the TXT record for domain.com.
In order to get a caching nameserver running, you need two files in place. The first is the /etc/named.boot file, which should look like this:
directory /etc/dns cache . root-servers
This configuration communicates that the data files are kept in the /etc/dns directory and the root-servers file (kept in /etc/dns) contains the IP addresses of the root DNS servers for priming the cache. You can obtain the most recent list of root servers from ftp://rs.internic.net/domain/named.cache.
Note that this configuration does not forward any queries it cannot answer to another server. If you have a primary server at your site, you might want to add a forwarders line to your/etc/named.boot file.
When you have the necessary files in place, all you need to do is restart the nameserver with the following command:/usr/sbin/named.restart
In this example, you will configure a primary DNS server for domain.com. Your sample domain has a handful of hosts in it and does secondary DNS for an ally company. For this configuration, it will need four files in addition to the /etc/named.boot file.
The /etc/named.boot file for this server is
directory /etc/dns cache . root-servers primary domain.com domain.hosts primary 42.168.192.IN-ADDR.ARPA domain.reverse primary 0.0.127.IN-ADDR.ARPA local.reverse secondary ally.com 172.16.1.1 ally.hosts.cache secondary 16.172.IN-ADDR.ARPA 172.16.1.1 ally.reverse.cache
Page 267
The first two lines are straight from your caching server. This was done so that it would perform the caching functions necessary for better performance. The third line specifies the domain for which you are primary and the file containing the corresponding DNS records.
The fourth line is related to the PTR record mentioned earlier. So far, your /etc/named.boot file has only specified the DNS records that enable the translation of names into IP addresses. However, it is a good practice to allow for the reverse translation to take place. In fact, some sites on the Internet will not allow you to connect with them unless they can make that reverse resolution.
The second column in the fourth line specifies the network for which you are providing reverse resolution. All reverse mappings exist in the IN-ADDR.ARPA domain, thereby eliminating any possible confusion regarding the number's purpose. The network and subnetwork parts of the IP address are placed in reverse order to follow the standard way domain names are written. (Domain names describe the hostname, then the subnetwork, and then the network, whereas IP addresses describe the network, subnetwork, and finally hostname.) By placing the IP address in reverse, it follows the convention established by the actual host and network names.
The last column in the fourth line simply tells you which file contains the reverse mapping information. Because reverse mappings require their own SOA record, they need to be kept in a separate file than the forward mappings.
The fifth line of the /etc/named.boot file is the reverse mapping information for the localhost.
The sixth and seventh lines specify that your server does secondary DNS for ally.com. The third column makes these entries a little different because they specify the primary DNS server for ally.com. It is this specified server from which your secondary server will fill its cache. The last column specifies where the cache files for ally.com will stay on the system.
TIP |
It is common for sites to pick a naming scheme for all their hosts. This tends to make remembering their names easier, especially as the site grows in size. For example, the east wing of the office might use famous music bands to name their machines while the west wing uses names of musical instruments. This makes locating a machine by its name easier. |
Listing 13.1 contains the domain.hosts file.
Listing 13.1. The domain.hosts file.
; forward mappings for the domain.com. hosts file ; update history: ; August 6, 1997 - sshah@domain.com ; Setup primary DNS for domain.com. continues
Page 268
Listing 13.1. continued
@ IN SOA domain.com. hostmaster.domain.com. ( 1997080600 ; serial number 10800 ; refresh rate (3 hours) 1800 ; retry (30 minutes) 1209600 ; expire (2 weeks) 604800 ) ; minimum (1 week) IN NS ns1.domain.com IN NS ns2.domain.com IN MX 10 mailhub.domain.com numark IN A 192.168.42.1 ns1 IN CNAME numark domain.com. IN CNAME numark mtx IN A 192.168.42.2 ns2 IN CNAME mtx pioneer IN A 192.168.42.3 denon IN A 192.168.42.4 atus IN A 192.168.42.5 technics IN A 192.168.42.6 vestax IN A 192.168.42.7 www IN CNAME vestax rane IN A 192.168.42.8 mailhub IN CNAME rane
Notice the use of the @ symbol instead of the domain name? This is a shortcut you can use because the domain name is specified in the /etc/named.boot file.
An additional note regarding names. As mentioned in the preceding tip, using themes in naming machines is helpful from a management perspective. Listing 13.1 uses the names of companies that make professional audio gear. In keeping with this sort of theme, however, you might run into the instance where outsiders expect certain names for your systems such as your Web server. By default, most people expect Web servers to begin with www, as in www.domain.com. While you can name the machine www, two issues arise: First, the naming theme is broken. If your site is large enough, this can become a problem. Second, if you want to start using a new Web server, you have to change all the machines' configurations accordingly. It is much easier to change the CNAME entry in your DNS to point to a new Web server instead.
Listing 13.2 contains the domain.reverse file.
Listing 13.2. The domain.reverse file.
; reverse mappings for domain.com ; revision history: sshah@domain.com, Aug. 6, 1997 @ IN SOA domain.com. hostmaster.domain.com. ( 1997080600 ; serial number 10800 ; refresh rate (3 hours) 1800 ; retry (30 minutes) 1209600 ; expire (2 weeks) 604800 ) ; minimum (1 week) IN NS ns1.domain.com IN NS ns2.domain.com