Ultimate Cheatsheet: Common Ports and Protocols for Network Communication

This article provides an overview of network port numbers and their importance in computer networking. It explains what port numbers are and how they work, as well as the different types of port numbers and their uses. The article also covers the most commonly used port numbers and why they are important, as well as some frequently asked questions about port numbers. By reading this article, readers can gain a better understanding of how port numbers are used in networking, and how they can be used to improve network security and efficiency.

The Basics: What are Ports and Protocols

Ports and protocols are essential elements of network communication. Let’s take a closer look at what they are and how they work.

Ports

In computer networking, a port is a logical address that identifies a specific process or service running on a computer. Ports are numbered between 0 and 65535, with some numbers reserved for specific protocols or services. For example, port 80 is commonly used for HTTP traffic, while port 443 is used for HTTPS traffic.

Ports allow computers to establish connections with other devices, exchange data, and communicate with specific services or applications. For example, when you open a web browser and navigate to a website, your computer uses port 80 (or 443 for HTTPS) to connect to the web server hosting the site.

Protocols

A protocol is a set of rules and standards that govern how data is transmitted between devices on a network. Protocols define the format and structure of messages, how data is encoded and decoded, and how errors and other issues are handled.

There are many different protocols used in computer networking, each designed for a specific purpose or application. Some common protocols include HTTP (HyperText Transfer Protocol) for web traffic, SMTP (Simple Mail Transfer Protocol) for email, and FTP (File Transfer Protocol) for file transfers.

Protocols ensure that data is transmitted correctly and reliably, and help to ensure that devices from different manufacturers and vendors can communicate with each other. Without protocols, it would be difficult to establish and maintain connections between devices on a network.

Ports 1 to 1,023 (Well Known Ports)

These are reserved ports in the range of 1 to 1,023 and have been registered with IANA for a specific service.

Ports 1,024 to 49,151 (Registered Ports)

This range is also registered with IANA but is not as commonly used.

Ports 49152 to 65535 (Dynmaic and/or private ports)

IANA reserves this port range for dynamic use for proprietary services or private use.

What are the Most Commonly Used Ports?

Port NumberProtocolDescription
20TCPFTP Data Transfer
21TCPFTP Control
22TCPSSH (Secure Shell)
23TCPTelnet
25TCPSMTP (Simple Mail Transfer Protocol)
53TCP/UDPDNS (Domain Name System)
67UDPDHCP (Dynamic Host Configuration Protocol)
68UDPDHCP (Dynamic Host Configuration Protocol)
80TCPHTTP (Hypertext Transfer Protocol)
88TCP/UDPKerberos Authentication System
110TCPPOP3 (Post Office Protocol v3)
119TCPNNTP (Network News Transfer Protocol)
123UDPNTP (Network Time Protocol)
135TCPMicrosoft RPC (Remote Procedure Call)
137UDPNetBIOS Name Service
138UDPNetBIOS Datagram Service
139TCPNetBIOS Session Service
143TCPIMAP (Internet Message Access Protocol)
161UDPSNMP (Simple Network Management Protocol)
389TCP/UDPLDAP (Lightweight Directory Access Protocol)
443TCPHTTPS (HTTP Secure)
445TCPMicrosoft SMB (Server Message Block) over TCP/IP
514UDPSyslog
636TCPLDAPS (LDAP Secure)
993TCPIMAPS (IMAP Secure)
995TCPPOP3S (POP3 Secure)
1433TCPMicrosoft SQL Server
1521TCPOracle SQL
3306TCPMySQL
3389TCPMicrosoft Remote Desktop Protocol (RDP)
5432TCPPostgreSQL

Note that this list is not exhaustive and there may be other ports in use in different contexts. Also, some protocols may use multiple ports depending on the configuration.

The most commonly used ports depend on the context of use. Here are some of the most commonly used ports in various applications and protocols:

These are just a few examples of commonly used ports. The use of specific ports can vary depending on the application or protocol being used, and different organizations may use different ports for the same applications or protocols.

Common Ports and Protocols for Web Traffic

Web traffic is one of the most common types of network traffic, and there are several ports and protocols that are commonly used to transmit web data. Let’s take a closer look at some of these:

HTTP (Hypertext Transfer Protocol)

HTTP is the primary protocol used for transferring data between web servers and clients. It is used to request and transmit HTML pages, images, videos, and other web content. HTTP operates over port 80 by default, but can also operate over other ports such as 8080 or 8000.

HTTPS (Hypertext Transfer Protocol Secure)

HTTPS is a secure version of HTTP that uses SSL/TLS encryption to protect data transmitted between web servers and clients. It operates over port 443 by default, but can also use other ports such as 8443.

FTP (File Transfer Protocol)

FTP is a protocol used for transferring files between computers over a network. It operates over port 21 by default, but can also use other ports such as 2121.

FTPS (FTP over SSL/TLS)

FTPS is a secure version of FTP that uses SSL/TLS encryption to protect data transmitted between computers. It operates over port 990 by default.

SMTP (Simple Mail Transfer Protocol)

SMTP is a protocol used for sending email messages between computers. It operates over port 25 by default, but can also use other ports such as 587.

POP3 (Post Office Protocol version 3)

POP3 is a protocol used for retrieving email messages from a mail server. It operates over port 110 by default.

IMAP (Internet Message Access Protocol)

IMAP is a protocol used for retrieving and managing email messages on a mail server. It operates over port 143 by default.

Frequently Asked Questions

A port number is a 16-bit unsigned integer that identifies a specific process or service running on a computer in a network. It is used to help route network traffic to the correct application or service.

There are 65,536 possible port numbers, ranging from 0 to 65,535.

Well-known ports are port numbers in the range of 0 to 1023 that are assigned to specific services or applications by the Internet Assigned Numbers Authority (IANA). These ports are reserved for standard services, such as HTTP, FTP, and SMTP.

Registered ports are port numbers in the range of 1024 to 49,151 that are assigned to applications or services by the IANA. These ports can be used by applications that are not considered standard, but still need a reserved port.

Dynamic or private ports are port numbers in the range of 49,152 to 65,535 that are used by client applications to initiate a connection with a server. These ports are assigned by the operating system on the client side and are not reserved.

Port numbers are important because they help identify the specific application or service that network traffic is intended for. This allows network traffic to be correctly routed to the appropriate destination, ensuring that applications and services can communicate effectively over a network.

Port numbers can be changed by configuring the application or service that is using the port. However, it is important to ensure that the new port number is not already in use by another application or service to avoid conflicts.

Conclusion

In conclusion, port numbers are an important aspect of computer networking as they help identify the specific application or service that network traffic is intended for. Understanding port numbers can help troubleshoot network issues, configure firewalls and routers, and secure networks by ensuring that traffic is routed to the appropriate destination. By knowing which port numbers are commonly used for specific applications and protocols, network administrators can better manage their network and ensure efficient and secure communication.