The original DNS definitions
didn’t provide the ability to look up network names based on a
network number—a 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 184.108.40.206 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 10.0.0.0, look up PTR data for 0.0.0.10.in-addr.arpa. You’d get back an answer like ARPANET.ARPA.
If the ARPANET were subnetted, you’d also find an address record at 0.0.0.10.in-addr.arpa. The address would be the subnet mask (255.255.0.0, 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 ...