14.6 Network Names and Numbers


DNS on Windows 2000, 2nd Edition
By Matt Larson, Cricket Liu
Table of Contents
Chapter 14.  Miscellaneous

14.6 Network Names and Numbers

The original DNS definitions didn't provide the ability to look up network names based on a network numbera feature that was provided by the original HOSTS.TXT file. More recently, a procedure for storing network names has been defined; this procedure also works for subnets and subnet masks, so it goes significantly beyond HOSTS.TXT . Moreover, it doesn't require any modification to the DNS server software at all; it's based entirely on the clever use of pointer and address records.

If you remember, to map an IP address to a name in DNS, you reverse the IP address, append in-addr.arpa , and look up the PTR data. This same technique is used to map a network number to a network name; for example, to map network to "HP Internet." To look up the network number, include the trailing zeros to make it four bytes and look up PTR data just as you would with a host's IP address. For example, to find the network name for the old ARPANET, network, look up PTR data for . You'd get back an answer like ARPANET.ARPA .

If the ARPANET were subnetted , you'd also find an address record at . The address would be the subnet mask (, for instance). If you were interested in the subnet name instead of the network name, you'd apply the mask to the IP address and look up the subnet number.

This technique allows you to map the network number to a name. To provide a complete solution, there must be a way to map a network name to its network number. This, again, is accomplished with PTR records. The network name has PTR data that points to the network number ( reversed , with in-addr.arpa appended).

Let's see what the data might look like in HP's zone data files (the HP Internet has network number and step through mapping a network number to a network name.

Here are the partial contents of the hp.com.dns file:

 ;  ; Map HP's network name to  ;  hp-net.hp.com.            IN  PTR 

Following are the partial contents of the corp.hp.com.dns file:

 ;  ; Map corp's subnet name to  ;  corp-subnet.corp.hp.com.  IN  PTR 

Here are the partial contents of the 15.in-addr.arpa.dns file:

 ;  ; Map to hp-net.hp.com.  ; HP's subnet mask is  ;    IN  PTR hp-net.hp.com.                            IN  A 

And here are the partial contents of the 1.15.in-addr.arpa.dns file:

 ;  ; Map the back to its subnet name.  ;    IN  PTR corp-subnet.corp.hp.com. 

Here's the procedure to look up the subnet name for the IP address

  1. Apply the default network mask for the address's class. Address is a Class A address, so the mask is Applying the mask to the IP address makes the network number 15.

  2. Send a query ( type=a or type=any ) for .

    The query response contains address data. Since address data is at (the subnet mask?, apply the subnet mask to the IP address. This yields

  3. Send a query ( type=a or type=any ) for .

    The query response does not contain address data, so is not further subnetted.

  4. Send a PTR query for .

    The query response contains the network name for corp-subnet.corp.hp.com .

In addition to mapping between network names and numbers, you can also list all the networks for your domain with PTR records:

 movie.edu.  IN  PTR              IN  PTR 

Now for the bad news: despite the fact that RFC 1101 contains everything you need to know to set this up, we know of only one software package that actually uses this type of network name encoding, and very few administrators go to the trouble of adding this information. Until software actually makes use of DNS-encoded network names, about the only reason for setting this up is to show off. But that's a good enough reason for many of us.


DNS on Windows 2000
DNS on Windows 2000
ISBN: 0596002300
EAN: 2147483647
Year: 2001
Pages: 154

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net