Networking Fundamentals
What Is a Port Number? Common Ports Explained
If an IP address is like a building's street address, a port number is like the specific apartment or office inside it.
Why ports exist
A single device runs many network programs at once — a web browser, an email client, a video call, background updates. They all share one IP address. Port numbers are how the device keeps their traffic separate: each connection is tagged with a port, so incoming data reaches the right program.
A port is a 16-bit number, so there are 65,536 of them (0–65535). A connection is fully identified by the combination of source IP, source port, destination IP, and destination port.
Well-known ports
Certain services use standard port numbers by convention, so clients know where to knock:
- 80 — HTTP (unencrypted web)
- 443 — HTTPS (encrypted web)
- 53 — DNS (name lookups)
- 25, 587, 465 — email sending (SMTP)
- 143, 993 — email retrieval (IMAP)
- 22 — SSH (secure remote login)
- 123 — NTP (time synchronization)
Ports 0–1023 are the "well-known" range reserved for common services; higher ports are used for everything else, including the temporary source ports your device picks for outgoing connections.
Ports and your router
Because a home router shares one public IP among many devices, it uses port numbers to keep replies straight (part of how NAT works). Port forwarding is when you tell the router to send traffic arriving on a specific external port to a specific internal device — essential for hosting a game or server at home.
Ports and security
Open ports are doors into a system. A firewall's main job is deciding which ports may be reached and from where. Closing unused ports and exposing only what is necessary is a foundation of network security. Knowing the common port numbers makes firewall rules and troubleshooting far less mysterious.