Previous Page Next Page

A.4.2 Transmission Control Protocol (TCP) and User Datagram Protocol (UDP)

IP simply provides a transport service, shuttling packets between hosts and networks. The protocols that provide the transport-layer services for IP are the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP). Very few applications speak to IP directly.

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. 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. This process is illustrated in Figure A.13 below:

Figure A.13 TCP uses a "handshake" format to synchronize, monitor, and close sessions, providing very high reliability.

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 data, and makes no pretense towards guaranteed delivery or anything else, as illustrated in Figure A.14 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.

Figure A.14 UDP doesn't do anything to verify that data has been received. It is commonly used for applications that issue broadcasts frequently.

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.

For more information on this subject, refer to section B.5.1 Port Numbers and Sockets. For more information on the IP protocol, refer to section A.4.1 Internet Protocol (IP) and Address Resolution Protocol (ARP). For more information on IP routing, refer to section A.4.4 Routing Information Protocol (RIP) and Open Shortest Path First (OSPF). For more information on name resolution services, refer to section A.4.5 HOSTS Files and the Domain Name Service (DNS). For more information on TCP/IP's mail protocols, refer to Appendix D: SMTP and POP3 Mail.

Previous Page Next Page

Copyright © 1997, Unoverica Corporation. All rights reserved. Unauthorized use prohibited.

Send comments to docs@unoverica.com