What Are Ports in Networking and Types

What Are Ports in Networking

In the world of computer networking, ports play a crucial role in facilitating communication between devices. Whether it’s sending an email, browsing the web, or transferring files, understanding ports is essential for anyone involved in the field of networking. This article will provide a comprehensive overview of what ports are and delve into the different types of ports used in networking.

Introduction

In computer networking, ports act as communication endpoints between different devices, allowing them to send and receive data over a network. Each device participating in a network can have multiple ports, and these ports are assigned unique numbers to enable efficient and organized communication.

What are Ports?

A port is a logical construct within an operating system that enables network applications to establish connections and exchange data. It functions as an identifier that specifies a particular process or service running on a device. Ports are essential for distinguishing between different network services and ensuring that data reaches the intended destination.

What are TCP and UDP ports? How do they work?

Types of Ports

TCP Ports

TCP (Transmission Control Protocol) is a connection-oriented protocol that guarantees reliable and ordered data delivery. TCP ports are associated with TCP-based applications that require reliable and error-free data transmission. Examples of TCP-based services include HTTP (port 80), FTP (port 21), and SSH (port 22).

UDP Ports

UDP (User Datagram Protocol) is a connectionless protocol that provides fast and lightweight data transmission. Unlike TCP, UDP does not guarantee data delivery or order. UDP ports are associated with applications that prioritize speed over reliability. Such as DNS (port 53), DHCP (port 67), and TFTP (port 69).

Well-Known Ports

Well-known ports, also known as system ports, are predefined ports ranging from 0 to 1023. These ports are reserved for commonly used services and protocols. For instance, port 80 is reserved for HTTP, port 443 for HTTPS, and port 25 for SMTP (Simple Mail Transfer Protocol).

Registered Ports

Registered ports range from 1024 to 49151 and are assigned by the Internet Assigned Numbers Authority (IANA) to specific services or applications. These ports are typically used by lesser-known or customized applications. Examples include port 3306 for MySQL and port 5432 for PostgreSQL.

Dynamic or Private Ports

Dynamic or private ports range from 49152 to 65535. These ports are not assigned to any specific application or service and are commonly used for ephemeral connections. When a device initiates a connection, it can use a dynamic port as its source port.

How Ports Work

When data is sent from one device to another, it is encapsulated in packets. Each packet contains both the IP address and the port number of the source and destination devices. This information helps routers and switches route the packets correctly, ensuring they reach the appropriate application or service running on the destination device.

Port Numbers

Port Number     Service name Transport protocolDescription
7EchoTCP, UDPEcho service
20FTP-data TCP, SCTPFile Transfer Protocol data transfer
21FTP TCP, UDP, SCTPFile Transfer Protocol (FTP) control connection
22SSH-SCPTCP, UDP, SCTP  Secure Shell, secure logins, file transfers (scp, sftp), and port forwarding
23TelnetTCPTelnet protocol—unencrypted text communications
25SMTPTCP Simple Mail Transfer Protocol, used for email routing between mail servers
53DNSTCP, UDP Domain Name System name resolver
69TFTPUDPTrivial File Transfer Protocol
80HTTPTCP, UDP, SCTPHypertext Transfer Protocol (HTTP) uses TCP in versions 1.x and 2. HTTP/3 uses QUIC, a transport protocol on top of UDP
88KerberosTCP, UDPNetwork authentication system
102Iso-tsapTCPISO Transport Service Access Point (TSAP) Class 0 protocol
110POP3TCPPost Office Protocol, version 3 (POP3)
135Microsoft EPMAPTCP, UDPMicrosoft EPMAP (End Point Mapper), also known as DCE/RPC Locator service, used to remotely manage services including DHCP server, DNS server, and WINS. Also used by DCOM
137NetBIOS-nsTCP, UDP NetBIOS Name Service, used for name registration and resolution
139NetBIOS-ssnTCP, UDPNetBIOS Session Service
143IMAP4TCP, UDP Internet Message Access Protocol (IMAP), management of electronic mail messages on a server
381HP OpenviewTCP, UDPHP data alarm manager
383HP OpenviewTCP, UDPHP performance data collector.
443HTTP over SSLTCP, UDP, SCTPHypertext Transfer Protocol Secure (HTTPS) uses TCP in versions 1.x and 2. HTTP/3 uses QUIC, a transport protocol on top of UDP.
464KerberosTCP, UDPKerberos Change/Set password
465SMTP over TLS/SSL, SSMTCPAuthenticated SMTP over TLS/SSL (SMTPS), URL Rendezvous Directory for SSM (Cisco protocol)
587SMTPTCPEmail message submission
593Microsoft DCOMTCP, UDPHTTP RPC Ep Map, Remote procedure call over Hypertext Transfer Protocol, often used by Distributed Component Object Model services and Microsoft Exchange Server
636LDAP over TLS/SSLTCP, UDPLightweight Directory Access Protocol over TLS/SSL
691MS ExchangeTCPMS Exchange Routing
902VMware ServerunofficialVMware ESXi
989FTP over SSLTCP, UDPFTPS Protocol (data), FTP over TLS/SSL
990FTP over SSLTCP, UDP FTPS Protocol (control), FTP over TLS/SSL
993IMAP4 over SSLTCPInternet Message Access Protocol over TLS/SSL (IMAPS)
995POP3 over SSLTCP, UDPPost Office Protocol 3 over TLS/SSL
1025Microsoft RPCTCPMicrosoft operating systems tend to allocate one or more unsuspected, publicly exposed services (probably DCOM, but who knows) among the first handful of ports immediately above the end of the service port range (1024+).
1194OpenVPNTCP, UDPOpenVPN
1337WASTEunofficialWASTE Encrypted File Sharing Program
1589Cisco VQPTCP, UDPCisco VLAN Query Protocol (VQP)
1725SteamUDPValve Steam Client uses port 1725 
2082cPanelunofficialcPanel default
2083radsec, cPanelTCP, UDP Secure RADIUS Service (radsec), cPanel default SSL
2483Oracle DBTCP, UDPOracle database listening for insecure client connections to the listener, replaces port 1521
2484Oracle DBTCP, UDPOracle database listening for SSL client connections to the listener
2967Symantec AVTCP, UDPSymantec System Center agent (SSC-AGENT)
3074XBOX LiveTCP, UDPXbox LIVE and Games for Windows – Live
3306MySQLTCP MySQL database system
3724World of WarcraftTCP, UDPSome Blizzard games, Unofficial Club Penguin Disney online game for kids
4664Google DesktopunofficialGoogle Desktop Search
5432PostgreSQLTCPPostgreSQL database system
5900RFB/VNC ServerTCP, UDPvirtual Network Computing (VNC) Remote Frame Buffer RFB protocol
6665-6669IRCTCPInternet Relay Chat .
6881BitTorrentunofficialBitTorrent is part of the full range of ports used most often
6999BitTorrentunofficialBitTorrent is part of the full range of ports used most often
6970QuicktimeunofficialQuickTime Streaming Server
8086Kaspersky AVTCPKaspersky AV Control Center
8087Kaspersky AVUDPKaspersky AV Control Center
8222VMware ServerTCP, UDPVMware Server Management User Interface (insecure Web interface).
9100PDLTCPPDL Data Stream, used for printing to certain network printers.
10000BackupExecunofficialWebmin, Web-based Unix/Linux system administration tool (default port)
12345NetBusunofficialNetBus remote administration tool (often Trojan horse).
27374Sub7unofficialSub7 default
31337Back OrificeunofficialBack Orifice 2000 remote administration tools

Port numbers are 16-bit unsigned integers, allowing a maximum of 65,535 unique ports. These numbers are divided into three ranges: well-known ports, registered ports, and dynamic or private ports. By using port numbers, devices can establish communication by specifying the appropriate port numbers for the source and destination.

Commonly Used Ports

Certain ports are commonly used by popular applications and services. Understanding these ports can help identify network traffic and troubleshoot issues. Some examples include:

  • Port 80: Used for HTTP traffic
  • Port 443: Used for HTTPS traffic
  • Port 25: Used for SMTP traffic
  • Port 21: Used for FTP traffic
  • Port 22: Used for SSH traffic

Port Scanning

Port scanning is the process of actively probing a device or network to discover open ports. It helps identify potential vulnerabilities and security weaknesses. However, it’s important to note that port scanning without proper authorization is considered unethical and may be illegal.

Port Forwarding

Port forwarding, also known as port mapping, is a technique used to redirect incoming network traffic from one port to another. It is commonly used to enable remote access to devices behind a router or firewall. Port forwarding allows specific ports on the external IP address to be forwarded to internal IP addresses and ports.

Network Security and Ports

Understanding ports is crucial for network security. Open ports can serve as potential entry points for unauthorized access or attacks. It is important to monitor and manage open ports, ensuring that only necessary ports are accessible and that proper security measures are in place to protect against potential threats.

Conclusion

Ports are an integral part of networking that enable devices to communicate and exchange data. TCP and UDP ports serve different purposes, and well-known, registered, and dynamic ports provide flexibility in assigning port numbers. Understanding ports, their types, and their role in networking is essential for effective network management and security.

FAQs

  1. What is the difference between TCP and UDP ports?
    TCP ports are associated with connection-oriented protocols that provide reliable data delivery, while UDP ports are associated with connectionless protocols that prioritize speed over reliability.
  2. How are port numbers assigned?
    Port numbers are assigned by various entities, including the Internet Assigned Numbers Authority (IANA) for well-known and registered ports. Dynamic or private ports are not assigned to any specific application.
  3. Can I change the port number of an application?
    In some cases, it is possible to change the port number of an application. However, it may require modifying the application’s settings or configuration files.
  4. Why is port scanning considered unethical?
    Port scanning without proper authorization is considered unethical because it involves probing a network or device for potential vulnerabilities without permission, which can be a security risk.
  5. How can I secure open ports on my network?
    Securing open ports involves implementing proper network security measures such as firewalls, access control lists, and intrusion detection systems. Regular monitoring and patching of systems are also important.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply