background image
TCP/IP Protocols 225
Table 5-4 contrasts typical transport layer functions as performed (or not performed) by UDP
or TCP.
Figure 5-9 shows TCP and UDP header formats. Note the existence of both source and
destination port number fields in the TCP and UDP headers, but the absence of sequence
acknowledgment fields in the UDP header, as shown in Figure 5-9. UDP does not need these
fields because it makes no attempt to number the data for acknowledgments or resequencing.
Figure 5-9
TCP and UDP Headers
Table 5-4
TCP and UDP Functional Comparison
Function
Description (TCP)
Description (UDP)
Data transfer
Continuous stream of ordered
data
Message (datagram) delivery
Multiplexing
Receiving hosts decide the
correct application for which the
data is destined, based on port
number
Receiving hosts decide the
correct application for which the
data is destined, based on port
number
Reliable transfer
Acknowledgment of data
using the sequence and
acknowledgment fields in the
TCP header
Not a feature of UDP
Flow control
Process used to protect buffer
space and routing devices
Not a feature of UDP
Connections
Process used to initialize port
numbers and other TCP header
fields
UDP is connectionless
Source
Port
Dest.
Port
Sequence
Number
Ack.
Number
Offset
Reserved
Flags
Window
size
Checksum
Urgent Options
PAD
2
2
2
2
2
TCP Header
Source
Port
Dest.
Port
Length
Checksum
UDP Header
*
Unless specified, lengths shown
are the numbers of bytes
2
4
4
4 bits
6 bits
6 bits
2
2
2
3
1
ch05.fm Page 225 Monday, March 20, 2000 5:06 PM