IP provides a network-layer protocol, shuttling packets between hosts and networks. Application protocols such as HTTP, SMTP, or FTP do not speak to IP directly. Instead, these applications speak to protocols that provide transport-layer services for IP. The two transport- layer protocols most commonly used are the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP).
TCP provides error-correction through the use of a connection-oriented transaction. A "start" packet is built and sent to the destination node (via IP), and when an "okay I'm ready" packet comes back, a monitored conversation between the hosts and/or applications begins. If a packet is lost or corrupted, TCP resends the data. This process is illustrated in Figure B.6 below. The size, timeout interval, and other critical factors are determined by judging the strength of the media that the node is connected to, the number of retries necessary to successfully deliver data, and other aspects of the connection. Because of this, TCP can dynamically change the nature of a session so that it will work even if the state of the physical link changes.
|
Applications such as the Internet's Simple Message Transport Protocol (SMTP) and HyperText Transfer Protocol (HTTP) both require the reliable connection services that TCP provides. Otherwise, mail messages sent over SMTP could get lost, or the graphic images and HTML documents sent over HTTP might get corrupted. TCP provides the reliability services so that the applications do not have to provide this within their internal application code.
UDP on the other hand simply sends the data, and makes no pretense towards guaranteed delivery or anything else, as illustrated in Figure B.7 below. However, like TCP, UDP does make decisions about packet sizes based on the strength of the underlying media, and passes the fully contained parcel to IP for delivery.
|
Applications such as the Trivial File Transfer Protocol (TFTP), a lightweight off-shoot of the larger and more interactive FTP application, use UDP because they do not need the extensive error correction that TCP provides. They simply send the data, and the receiving system then uses checksums to make sure that all of the data arrived safely.
Regardless of the transport protocol in use, all TCP/IP applications follow the same basic model: client applications send data to a related server application. In order for the client and server to function, they must be able to communicate. In almost all IP applications, the client will establish a connection to the server as needed. Once established, the two will then "talk" to each other using IP addresses and port numbers as destinations for sending and receiving data.
For more information on ports and sockets, refer to section B.5.1 Port Numbers and Sockets. For more information on application servers, refer to section B.5.2 Servers Listen for Connections. For more information on the application clients, refer to section B.5.3 Clients Initiate the Connection. For more information on how clients and servers communicate with each other, refer to section B.5.4 Application Linguistics.
Copyright © 1997, Unoverica Corporation. All rights reserved. Unauthorized use prohibited.
Send comments to docs@unoverica.com