Kamran Mushtaq
Back to Networking
Networking

PORT

Added: June 14, 2026Nurtured: June 18, 2026

Definition

A logical communication endpoint used in network protocols (like TCP/UDP) to identify a specific process or service running on a computer.

What Problem It Solves

Ports solve the resource limitation of having a single IP address. By dividing an IP address into thousands of logical channels, a single physical machine can run multiple independent networking services (like web servers, databases, and mail servers) simultaneously.

What Happens If Not Used

Without ports, a machine could host only a single network service per IP address, requiring separate physical machines or virtual network interfaces for every database or API running in the infrastructure.

Easy Wording

An address extension or "apartment number" on a computer that directs incoming internet traffic to the correct software program.

Layman Example

If a computer is a large apartment building with a single street address, ports are the individual apartment numbers. The mail goes to the building, but the apartment number decides which resident gets it.

Technical Example

When a server receives packets at its IP address, the OS routing table forwards them based on the destination port:

  • Traffic on port 80 is sent to the web server (Nginx/Apache) for HTTP.
  • Traffic on port 443 is sent to the web server for HTTPS.
  • Traffic on port 5432 is sent to the PostgreSQL database service.