Network Names and Numbers
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 15.0.0.0 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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access