14.9 Another Example

14.9 Another Example

Let's look at another example that ties together many of the DNS features that we've described. We start an Rlogin client, connecting to an Rlogin server in some other domain. Figure 14.16 shows the exchange of packets that takes place. The following 11 steps take place, assuming none of the information is already cached by the client or server:

Figure 14.16. Summary of packets exchanged to start up Rlogin client and server.
graphics/14fig16.gif
  1. The client starts and calls its resolver function to convert the hostname that we typed into an IP address. A query of type A is sent to a root server.

  2. The root server's response contains the name servers for the server's domain.

  3. The client's resolver reissues the query of type A to the server's name server. This query normally has the recursion-desired flag set.

  4. The response comes back with the IP address of the server host.

  5. The Rlogin client establishes a TCP connection with the Rlogin server. (Chapter 18 provides all the details of this step.) Three packets are exchanged between the client and server TCP modules.

  6. The Rlogin server receives the connection from the client and calls its resolver to obtain the name of the client host, given the IP address that the server receives from its TCP. This is a PTR query issued to a root name server. This root server can be different from the root server used by the client in step 1.

  7. The root server's response contains the name servers for the client's in-addr.arpa domain.

  8. The server's resolver reissues the PTR query to the client's name server.

  9. The PTR response contains the FQDN of the client host.

  10. The server's resolver issues a query of type A to the client's name server, asking for the IP addresses corresponding to the name returned in the previous step. This may be done automatically by the server's gethostbyaddr function, as we described in Section 14.5, otherwise the Rlogin server does this step explicitly. Also, the client's name server is often the same as the client's in-addr.arpa name server, but this isn't required.

  11. The response from the client's name server contains the A records for the client host. The Rlogin server compares the A records with the IP address from the client's TCP connection request.

Caching can reduce the number of packets exchanged in this figure.



TCP.IP Illustrated, Volume 1. The Protocols
TCP/IP Illustrated, Vol. 1: The Protocols (Addison-Wesley Professional Computing Series)
ISBN: 0201633469
EAN: 2147483647
Year: 1993
Pages: 378

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net