`
`DNS: The Domain Name
`
`System
`
`Introduction
`
`The Domain Name System, or DNS, is a distributed database that is used by TCP/IP
`applications to map between hostnames and IP addresses, and to provide electronic
`mail routing information. We use the term distributed because no single site on the Inter-
`net knows all the information. Each site (university department, campus, company, or
`department within a company, for example) maintains its own database of information
`and runs a server program that other systems across the Internet (clients) can query.
`The DNS provides the protocol that allows clients and servers to communicate with
`each other.
`From an application's point of view, access to the DNS is through a resolver. On
`Unix hosts
`the resolver
`is accessed primarily through two library functions,
`gethostbyname(3) and gethostbyaddr(3), which are linked with the application
`when the application is built. The first takes a hostname and returns an IP address, and
`the second takes an IP address and looks up a hostname. The resolver contacts one or
`more name servers to do the mapping.
`In Figure 4.2 (p. 55) we showed that the resolver is normally part of the application.
`It is not part of the operating system kernel as are the TCP/IP protocols. Another fun-
`damental point from this figure is that an application must convert a hostname to an IP
`address before it can ask TCP to open a connection or send a datagram using UDP. The
`TCP/ IP protocols within the kernel know nothing about the DNS.
`In this chapter we'll take a look at how resolvers communicate with name servers
`using the TCP/IP protocols (mainly UDP). We do not cover all the administrative
`details of running a name server or all the options available with resolvers and servers.
`These details can fill an entire book.
`(See [Albitz and Liu 1992] for all the details on the
`care and feeding of the standard Unix resolver and name server.)
`
`187
`
`New Bay Capital, LLC-EX.1004
`Page 187