Info

How TCP and UDP Use Port Numbers

Both TCP and UDP use port numbers to pass information to the upper layers. Port numbers keep track of different conversations crossing the network at the same time. Figure 1-47 defines some of the port numbers as used by TCP and UDP.

Figure 1-47 Port Numbers

Application Layer

Transport Layer

Application Layer

Transport Layer

Port Numbers

Application software developers agree to use well-known port numbers that are controlled by the IANA. For example, any conversation bound for the FTP application uses the standard port number 21. Conversations that do not involve an application with a well-known port number are assigned port numbers randomly chosen from within a specific range instead. These port numbers are used as source and destination addresses in the TCP segment.

Some ports are reserved in both TCP and UDP, but applications might not be written to support them. Port numbers have the following assigned ranges:

■ Numbers below 1024 are considered well-known or assigned ports.

■ Numbers 1024 and above are dynamically assigned ports.

■ Registered ports are those registered for vendor-specific applications. Most are above 1024.

NOTE Some applications, such as DNS, use both transport layer protocols. DNS uses UDP for name resolution and TCP for server zone transfers.

Figure 1-48 shows how well-known port numbers are used by hosts to connect to the application on the end station. It also illustrates the selection of a source port so that the end station knows how to communicate with the client application.

RFC 1700, "Assigned Numbers," defines all the well-known port numbers for TCP/IP. For a listing of current port numbers, refer to the IANA website at http://www.iana.org.

End systems use port numbers to select the proper application. Originating source port numbers are dynamically assigned by the source host, some number greater than 1023.

Figure 1-48 Port Number Example

Source

Dest.

Was this article helpful?

0 0
The Ultimate Computer Repair Guide

The Ultimate Computer Repair Guide

Read how to maintain and repair any desktop and laptop computer. This Ebook has articles with photos and videos that show detailed step by step pc repair and maintenance procedures. There are many links to online videos that explain how you can build, maintain, speed up, clean, and repair your computer yourself. Put the money that you were going to pay the PC Tech in your own pocket.

Get My Free Ebook


Post a comment