Open In App

What is Ports in Networking?

Whenever any application in one computer sends data to another application of a different computer then it sends using IP Address and MAC Address but how does our computer know that this data is for a specific application and this data is sent by any specific application? There comes the concept of Port.

For instance, imagine your MAC Address or IP Address as the PIN code of the nearest Post Office and your house address as a Port. Whenever any parcel is sent to you it gets received by the nearest post office and then it is identified by your address where to deliver that parcel. Similarly in a computer data is first received using their IP or MAC address then it is delivered to the application whose port number is with the data packets.



Port is a logical address of a 16-bit unsigned integer that is allotted to every application on the computer that uses the internet to send or receive data.

Now every time any application sends any data, it is identified by the port that which the application sent that data and the data is to be transferred to the receiver application according to its port. We often call port as port number.



In the OSI Model ports are used in the Transport layer. In the headers of Transport layer protocols like TCP and UDP, we have a section to define port(port number). The network layer has to do nothing with ports, their protocols only care about IP Addresses.

Ports are assigned by computer i.e. operating system to different applications. Ports help computer to differentiate between incoming and outgoing traffic. Since the port is a 16-bit unsigned number it ranges from 0 to 65535.

Types of Ports

Ports are further divided into three categories:

Well Known Port

Registered Port

Dynamic Port

Importance of Ports

Ports have many significance. Some of them are-

Some Popular Port Numbers

Some common/Popular port numbers that are used by those applications/services which are frequently used by us-

Port Number Used By
80 HTTP(Hyper Text Transfer Protocol)
23 Telnet
25 SMTP(Simple Mail Transfer Protocol)
53 DNS(Domain Name System)
7 Echo
20/21 FTP(File Transfer Protocol)
69 TFTP(Trivial File Transfer Protocol)
443 HTTPS(Hyper Text Transfer Protocol Secure)
22 SSH(Secure Shell)
110 POP3(Post Office Protocol version 3)
67/68 DHCP(Dynamic Host Configuration Protocol0
123 NTP(Network Time Protocol)
143 IMAP(Internet Messaging Access Protocol)
1433 Microsoft SQL
3306 MySQL
5432 PostgreSQL
27017 MongoDB

FAQs on Ports in Networking

Q.1: What is Port?

Answer:

Port is a logical address of a 16-bit unsigned integer that is allotted to every application on the computer that uses the internet to send or receive data. It ranges from 0 to 65535.

Q.2: What is the Socket Address?

Answer:

Socket Address is the combination of IP Address and Port Number. It is used in communication between two differnt applications/services.

Q. 3: Why Port Number is used?

Answer:

Port Number or Port is used to uniquely identify any appication/services running on the same device.


Article Tags :