25.02.2013 Views

TCP/IP Tutorial and Technical Overview - IBM Redbooks

TCP/IP Tutorial and Technical Overview - IBM Redbooks

TCP/IP Tutorial and Technical Overview - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Note: Although domains within the namespace will frequently map in a logical<br />

fashion to networks <strong>and</strong> subnets within the <strong>IP</strong> addressing scheme, this is not a<br />

requirement of the Domain Name System. Consider a router between two<br />

subnets. It has two <strong>IP</strong> addresses, one for each network adapter, but it would<br />

not normally have two symbolic names.<br />

12.1.8 Domain name resolution<br />

The domain name resolution process can be summarized in the following steps:<br />

1. A user program issues a request such as the gethostbyname() system call<br />

(this particular call asks for the <strong>IP</strong> address of a host by passing the host<br />

name) or the gethostname() system call (which asks for a host name of a host<br />

by passing the <strong>IP</strong> address).<br />

2. The resolver formulates a query to the name server. (Full resolvers have a<br />

local name cache to consult first; stub resolvers do not. See “Domain name<br />

full resolver” <strong>and</strong> “Domain name stub resolver” on page 434.)<br />

3. The name server checks to see if the answer is in its local authoritative<br />

database or cache, <strong>and</strong> if so, returns it to the client. Otherwise, it queries<br />

other available name servers, starting down from the root of the DNS tree or<br />

as high up the tree as possible.<br />

4. The user program is finally given a corresponding <strong>IP</strong> address (or host name,<br />

depending on the query) or an error if the query could not be answered.<br />

Normally, the program will not be given a list of all the name servers that have<br />

been consulted to process the query.<br />

Domain name resolution is a client/server process (see 11.1.1, “The client/server<br />

model” on page 408). The client function (called the resolver or name resolver) is<br />

transparent to the user <strong>and</strong> is called by an application to resolve symbolic<br />

high-level names into real <strong>IP</strong> addresses or vice versa. The name server (also<br />

called a domain name server) is the server application providing the translation<br />

between high-level machine names <strong>and</strong> the <strong>IP</strong> addresses. The query/reply<br />

messages can be transported by either UDP or <strong>TCP</strong>.<br />

432 <strong>TCP</strong>/<strong>IP</strong> <strong>Tutorial</strong> <strong>and</strong> <strong>Technical</strong> <strong>Overview</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!