Configuring and Managing MPE/iX Internet Services (August 2002)

Chapter 8
DNS BIND/iX
Data Files
128
Address-to-Name Mapping
Also called reverse mapping, the zone.ADDR db file allows resolvers to post queries armed with only the IP
address of a host. This reverse mapping is used, for example, by Internet server software that prefers to log
host names rather than less informative IP addresses.
Address-to-name mapping data will be provided for a DNS server by PTR entries in its zone.ADDR files, one
for every network served by this DNS server, and its zone.LOCAL file.
Each entry will indicate the IP address in reverse order, then the host name. For example, for host
littledog.maxx.net, whose IP address is 204.251.17.249, in the zone.ADDR file its PTR entry would look like:
249.17.251.204. IN PTR littledog.maxx.net.
Why is it backwards? Recall that DNS does its parsing from right to left, from most inclusive to most specific.
For IP addresses, it needs to parse in the same direction. But IP addresses, from right to left, go from most
specific to most inclusive. So the simple answer is to reverse the IP address in the NDS PTR records. Now
DNS can parse in the same direction, and resolve in the same order from most inclusive to most specific.
A shortcut in PTR records is often used. It looks like this:
249 IN PTR littledog.maxx.net.
If the dot is left off the IP address in the PTR record, DNS will complete the IP address with the IP address of
the domain, specified in the files SOA record. This is also true for A records in name-to-address mapping db
files. If the dot is left off, DNS will automatically try to complete the name with the full domain name in this
zone. Paying attention to the terminating dot is important.
For the zone.LOCAL file we describe the loopback address just as you would expect it, now that we know we
have to reverse it. The PTR entry in the zone.LOCAL file would look like:
1.0.0.127. IN PTR localhost.
or, using the shortcut:
1 IN PTR localhost.
Only one line from named.conf remains to be discussed, the cache entry. This is a bit of a misnomer as it
doesnt have anything to do with local caching. Instead, it defines the master root domain name servers for
the Internet. You can retrieve this list from ftp://nic.ddn.mil/netinfo/root-servers.txt. You will need
to check this site periodically to ensure you have the latest list.
This file lists the root domain servers in human-readable format. Youll need to reformat it for consumption
by named. Heres what the cache file looks like:
; Servers from the root domain
; ftp://nic.ddn.mil/netinfo/root-servers.txt
;
. 99999999 IN NS A.ROOT-SERVERS.NET
. 99999999 IN NS B.ROOT-SERVERS.NET
. 99999999 IN NS C.ROOT-SERVERS.NET
. 99999999 IN NS D.ROOT-SERVERS.NET
. 99999999 IN NS E.ROOT-SERVERS.NET
. 99999999 IN NS F.ROOT-SERVERS.NET
. 99999999 IN NS G.ROOT-SERVERS.NET
. 99999999 IN NS H.ROOT-SERVERS.NET
. 99999999 IN NS I.ROOT-SERVERS.NET
; Root servers by address
A.ROOT-SERVERS.NET 99999999 IN A 198.41.0.4
B.ROOT-SERVERS.NET 99999999 IN A 128.9.0.107
C.ROOT-SERVERS.NET 99999999 IN A 192.33.4.12
D.ROOT-SERVERS.NET 99999999 IN A 128.8.10.90
E.ROOT-SERVERS.NET 99999999 IN A 192.203.230.10
F.ROOT-SERVERS.NET 99999999 IN A 192.5.5.241