Cryptography Reference
In-Depth Information
of these databases are replicated for load-balancing and redundancy purposes,
there are many more slave copies of this same database distributed throughout
the world. If you access the Internet through an ISP, for instance, your ISP almost
certainly maintains a local cache of at least a subset of the master DNS data.
You get the IP addresses of these local name servers when you get your own IP
address at DHCP time. On a Linux system, you can see the IP addresses of the
local copies under /etc/resolv.conf. On a Windows system, you can see them
by going to Control Panel Connection Status Details and look under DNS
Server. (Although I must warn you that this seems to change with every release
of Windows, so you may have to hunt around a bit if you're on such a system.)
root
authority
.org
authority
.com
authority
.gov
authority
ietf.org
authority
travelocity.com
authority
whitehouse.gov
authority
has IP information on
www.ietf.org
has IP information on
www.travelocity.com
has IP information on
www.whitehouse.gov
Figure 10-2: DNS hierarchy
So, when it comes time to resolve a human-readable, string host name to a
machine-readable IP address, you typically call an operating system function,
such as gethostbyname as illustrated in Listing 1-4. This function looks at /etc/
resolv.conf (or wherever Windows hides it in its system registry), fi nds a name
server, and asks it for the corresponding IP address. If the name server doesn't
have the name/IP address pair cached already, it works backward through the
domain name, fi rst determining the authoritative name server for the top-level
 
Search WWH ::




Custom Search