Skip to content
uencoder

Port

A port is a transport-layer 16-bit address (0-65535) that distinguishes multiple network applications on one host; combined with the IP address it forms a socket.

Purpose

It lets one host run many network services at once, told apart by port number.

Mechanism

Ports 0-1023 are well-known (HTTP 80, HTTPS 443, SSH 22), 1024-49151 are registered, and 49152-65535 are dynamic/private. IANA maintains the assignments. A socket = (IP, port).

Use cases

  • Web servers listening on 80/443
  • Databases on 3306/5432
  • SSH on 22
  • Custom service ports

Examples

  • Input
    TCP 443
    Output
    The well-known port for HTTPS

    IANA-assigned

Common errors

Port conflicts (two services on the same port)
Move to another port or put a reverse proxy in front

Related terms

Related tools

References