background image
124
Chapter 3
Internet Protocols
death, you don't need an acknowledgment of its receipt. Similarly, UDP does
not involve acknowledgments.
Port Numbers
TCP and UDP must use port numbers to communicate with the upper layers,
because they're what keeps track of different conversations crossing the net-
work simultaneously. Originating-source port numbers are dynamically
assigned by the source host and will equal some number starting at 1024.
1023 and below are defined in RFC 1700, which discusses what are called
well-known port numbers.
Virtual circuits that don't use an application with a well-known port num-
ber are assigned port numbers randomly from a specific range instead. These
port numbers identify the source and destination host in the TCP segment.
Figure 3.5 illustrates how both TCP and UDP use port numbers.
F I G U R E 3 . 5
Port numbers for TCP and UDP
The different port numbers that can be used are explained next:
Numbers below 1024 are considered well-known port numbers and
are defined in RFC 1700.
Numbers 1024 and above are used by the upper layers to set up ses-
sions with other hosts, and by TCP to use as source and destination
addresses in the TCP segment.
TCP Session: Source Port
The following listing shows a TCP session captured with Etherpeek analyzer
software. Notice that the source host makes up the source port and, in this
case, is 5973. The destination port is 23, which is used to tell the receiving
host the purpose of the intended connection (Telnet).
TCP - Transport Control Protocol
Source Port: 5973
FTP
Telnet
Doom
TFTP
POP3
DNS
TCP
Transport
layer
Application
layer
Port
numbers
UDP
News
119
110
69
53
666
23
21
Copyright ©2002 SYBEX, Inc., Alameda, CA
www.sybex.com