Port numbers serve as identifiers for protocols and applications, enabling efficient data routing, service identification, and security management in computer networks. The combination of IP addresses and port numbers allows for end-to-end communication between applications across devices.
This article explains the concept of port numbers, their types, and their importance in computer networking. It also provides a list of 25 common network port numbers that you should know.
Furthermore, if you are interested in building a career in IT networking, enrolling in our Cisco training will help you train with Cisco technologies and prepare for Cisco certifications.
A computer port number is a 16-bit integer that serves as a unique identifier for a specific process or service on a networked device. It allows multiple applications to communicate simultaneously over the same IP address by directing incoming data to the appropriate application.
Port numbers range from 0 to 65535. While port 0 is reserved and not used for direct communication, the remaining ports are utilized for various protocols and services in networking.
There are 3 types of port numbers based on the port number ranges:
1. Well-Known Ports (0-1023): Reserved for widely used services and protocols. Examples include: HTTP (Port 80), HTTPS (Port 443), FTP (Port 21), etc.
2. Registered Ports (1024-49151): Assigned to specific applications by organizations. These ports are not as universally recognized but are commonly used.
3. Dynamic/Private Ports (49152-65535): Typically used for temporary connections and can be utilized by any process.
Network ports are the most important component that manages data traffic between devices over a network. Each port is associated with specific services or applications.
Computers use network port numbers during data delivery to ensure it reaches the correct destination and application. For example, web traffic typically uses port 80 (HTTP) or 443 (HTTPS), meaning every time you visit a website, your computer is using this port to communicate with the website server.
Sometimes, you might be using different applications on your device, so the network ports help computers run multiple services simultaneously.
Port numbers are essential in the working of TCP and UDP communication. Different port numbers serve different functions, enabling the proper functioning of internet services and communication. TCP/IP protocol utilizes port numbers 0 to 65535 for all its functions.
In TCP communication, when a client wants to communicate with a server, it uses a combination of the server's IP address and the designated port number (e.g., port 80 for HTTP) to establish a connection.
Once the connection is established, data packets are sent back and forth between the client and server using their respective port numbers, ensuring reliable delivery through acknowledgments and retransmissions.
Unlike TCP, UDP does not establish a connection before sending data, so the client sends packets to the server's IP address and port number directly.
Each packet includes the source and destination port numbers, allowing the server to differentiate between various types of data (e.g., video streams or control messages) without ensuring delivery reliability.
To learn more about networking courses, enroll in our networking courses or contact learner advisors.
Here is a table containing 25 common port numbers used by TCP and UDP protocols with their associated service and usage.
Port Number | Service | Used For | Protocol |
---|---|---|---|
20 | FTP-DATA | File Transfer | TCP |
21 | FTP | File Transfer Control | TCP |
22 | SSH | Secure Remote Login | TCP |
23 | Telnet | Unencrypted Remote Access | TCP |
25 | SMTP | Email Routing | TCP |
53 | DNS | Domain Name Resolution | UDP/TCP |
67 | DHCP-S | DHCP Server | UDP |
68 | DHCP-C | DHCP Client | UDP |
69 | TFTP | Trivial File Transfer | UDP |
80 | HTTP | Web Traffic | TCP |
110 | POP3 | Email Retrieval | TCP |
123 | NTP | Time Synchronization | UDP |
143 | IMAP | Email Management | TCP |
443 | HTTPS | Secure Web Traffic | TCP |
3306 | MySQL | Database Service | TCP |
3389 | RDP | Remote Desktop Access | TCP |
5432 | PostgreSQL | Database Service | TCP |
5060 | SIP | VoIP Communication | UDP/TCP |
5900 | VNC | Remote Desktop Sharing | TCP |
8080 | HTTP-ALT | Alternative Web Traffic | TCP |
2049 | NFS | Network File System | TCP/UDP |
161 | SNMP | Network Management | UDP |
162 | SNMP-TRAP | SNMP Trap Messages | UDP |
445 | SMB | File Sharing | TCP |
27017 | MongoDB | Database Service | TCP |
5000 | UPnP | Universal Plug and Play | UDP/TCP |
As we discussed above, the role of Port numbers is very crucial in networking. It facilitates effective communication and data exchange between different devices and applications within a network.
Here are the 6 reasons why port numbers are needed:
In a single device, multiple applications may be sending and receiving data over the network simultaneously. Port numbers allow the operating system to route incoming data to the correct application through a process called demultiplexing.
Conversely, when sending data, port numbers allow multiplexing, ensuring that data from various applications is transmitted through the appropriate ports. This mechanism is crucial for efficient communication in networking, as it helps distinguish between different services and applications using the same network interface.
As the name suggests, Port numbers help establish end-to-end communication between devices across a network. When a device initiates a connection, it specifies both its IP address and a source port number, and the destination device responds with its IP address and a destination port number.
This combination allows data to be routed accurately to the intended application on the receiving device.
Port numbers are used to identify the specific protocol or service that an application is using. Well-known port numbers are associated with common services such as HTTP (port 80), HTTPS (port 443), FTP (port 21), and more.
By using these standard port numbers, devices can quickly recognize the type of communication being established and handle data accordingly.
When we talk about security, Port numbers are very important for implementing network security measures such as firewalls. Firewalls can filter and control network traffic based on port numbers.
For example, a firewall might be configured to allow web traffic (HTTP) on port 80 while blocking other ports to prevent unauthorized access or potential threats.
In scenarios where multiple servers are serving the same application, load balancing distributes incoming network traffic across these servers to optimize performance and prevent overload. Port numbers are often used to route traffic to different servers based on load-balancing algorithms.
Developers can use custom port numbers to establish communication channels for their specific applications or services. This enables the creation of unique network services tailored to specific needs.
Sometimes while surfing the internet, you might have faced the issue where certain applications like video conferencing tools, online games, or file-sharing services fail to connect or function properly. A common cause of this problem is port blocking.
Port blocking means that there is a restriction on network traffic through specific ports. Since ports are necessary for internet communication, if a port is blocked, users can not access that particular application.
Port blocking can occur when a firewall, antivirus software, router settings, or even your Internet Service Provider (ISP) prevents data from flowing through specific network ports. You will get the following errors when a network port is blocked:
● “Connection timed out”
● “Unable to reach server”
● “Application failed to connect”
Since there can be various factors causing port blocking, there are multiple solutions to check for port blocking. Some common solutions to resolve port blocking are:
1. Check Firewall Settings
On Windows, use Windows Defender Firewall to see if inbound or outbound rules are blocking the port.
On Linux, use iptables or ufw to inspect firewall rules.
2. Use Netstat or PowerShell
Run netstat -ano | findstr :
You can also use Get-NetTCPConnection -LocalPort
3. Some antivirus programs have built-in firewalls that may block ports.
4. You can also use tools like Nmap, CurrPorts, or TCPView can help identify open, closed, or filtered ports.
Computer port numbers are vital for network communication, allowing multiple applications to run simultaneously on a device. Ranging from 0 to 65535, they are categorized into well-known ports (0-1023), registered ports (1024-49151), and dynamic/private ports (49152-65535).
Well-known ports are reserved for standard services like HTTP (port 80) and FTP (port 21). Understanding port numbers is essential for effective data routing, multiplexing, and demultiplexing, ensuring that incoming data reaches the correct application or service on a device efficiently.
To learn about more such networking concepts, check out our IT infrastructure courses.
Gautam Kumar is a senior network engineer having more than 7 years of experience in different companies in India. His work experience in network support and operation and maintaining of any network makes him one of the most valuable IT professional in industry. He has been involving in planning, supporting the physical and wireless networks, ...
More... | Author`s Bog | Book a Meeting