Understanding Port Number in TCP
For Complete YouTube Video: Click Here
This class will try to understand Understanding Port Number in TCP.
We have already discussed the concepts of TCP Header in our previous class.
Table of Contents
Understanding Port Number in TCP
We will discuss the first row of the TCP Header as shown below.
The first row has two columns.
One is for the source port, and another is for the destination port number.
Port number is of 16-bit size.
With 16-bits, we can generate 65536 unique port numbers.
The range of the port number is from 0-65535.
The entire range of port numbers is classified into three.
- Well Known (0 – 1023)
- Registered (1024 – 49151)
- Private (49152 – 65535)
Well-Kown Port numbers (0 – 1023)
Port numbers from 0 to 1023 are reserved for typical TCP/IP applications and are called well-known ports.
Well-known ports allow client applications to locate the corresponding server application processes on other hosts easily.
The regularly used server applications are allocated with these well-known port numbers.
For example, HTTP, SMTP, and DHCP have well-port numbers 80, 25, and 67.
Registered Port Numbers (1024 – 49151)
The registered port numbers are the port numbers that companies and other users register with the Internet Assigned Number Authority IANA.
Dynamic Port Numbers (49152 – 65535)
The client applications use these port numbers.
The clients dynamically generate these, and the range of these numbers is 49152 – 65535.