TCP and UDP can send data from several upperlayer
applications on the same datagram. Port
numbers (also called socket numbers) are used to
keep track of different conversations crossing the
network at any given time. Some of the more wellknown
port numbers are controlled by the Internet
Assigned Numbers Authority (IANA). For example,
Telnet is always defined by port 23.
Applications that do not use well-known port
numbers have numbers randomly assigned from a
specific range.
The use of port numbers is what allows you to
watch streaming video on your computer while
checking e-mails and downloading documents
from a web page all at the same time. All three
may use TCP/IP, but use of a port number allows
the applications to distinguish which are video and
which are e-mail packets.