background image
TCP/IP and the DoD Model
121
delivery--and it does so using far fewer network resources. (Please note that
UDP is covered thoroughly in Request for Comments 768.)
The Requests for Comments (RFCs) form a series of notes, started in 1969,
about the Internet (originally the ARPAnet). The notes discuss many aspects
of computer communication, focusing on networking protocols, procedures,
programs, and concepts but also including meeting notes, opinion, and
sometimes humor.
There are some situations where it would definitely be wise for developers
to opt for UDP rather than TCP. Remember the watchdog SNMP up there
at the Process/Application layer? SNMP monitors the network, sending
intermittent messages and a fairly steady flow of status updates and alerts,
especially when running on a large network. The cost in overhead to estab-
lish, maintain, and close a TCP connection for each one of those little mes-
sages would reduce what would be an otherwise healthy, efficient network
to a dammed-up bog in no time!
Another circumstance calling for UDP over TCP is when reliability is
already handled at the Process/Application layer. Network File System (NFS)
handles its own reliability issues, making the use of TCP both impractical and
redundant. But ultimately, it's up to the application developer who decides
whether to use UDP or TCP, not the user who wants to transfer data faster.
UDP does not sequence the segments and does not care in which order the
segments arrive at the destination. But after that, UDP sends the segments off
and forgets about them. It doesn't follow through, check up on them, or even
allow for an acknowledgment of safe arrival--complete abandonment.
Because of this, it's referred to as an unreliable protocol. This does not mean
that UDP is ineffective, only that it doesn't handle issues of reliability.
Further, UDP doesn't create a virtual circuit, nor does it contact the des-
tination before delivering information to it. Because of this, it's also consid-
ered a connectionless protocol. Since UDP assumes that the application will
use its own reliability method, it doesn't use any. This gives an application
developer a choice when running the Internet Protocol stack: TCP for reli-
ability or UDP for faster transfers.
UDP Segment Format
Figure 3.4 clearly illustrates UDP's markedly low overhead as compared to
TCP's hungry usage. Look at the figure carefully--can you see the fact that
Copyright ©2002 SYBEX, Inc., Alameda, CA
www.sybex.com