The apartment number on every IP
If an IP address is the building's street address, a port is the apartment number. Ports let one machine run many network services on the same IP simultaneously — web server on 80, SSH on 22, Postgres on 5432, your dev server on 5173. When you connect to 192.168.1.100:22, you're reaching apartment 22 in that building.
Ports are 16-bit unsigned integers (0 – 65,535) and split into three official ranges:
| Range | Name | What it means |
|---|---|---|
| 0 – 1023 | Well-known / system | Reserved for common services. Binding requires root/admin. |
| 1024 – 49151 | Registered | Assigned by IANA for specific apps. |
| 49152 – 65535 | Ephemeral | Auto-allocated to client connections. |
The ports you'll touch every day
| Port | Service | Notes |
|---|---|---|
| 22 | SSH | Encrypted remote shell — every lesson after Track 2 |
| 53 | DNS | UDP (mostly), name resolution |
| 80 | HTTP | Plaintext web — increasingly rare on the public internet |
| 443 | HTTPS | TLS-encrypted web — the default everywhere now |
| 3000 | Dev server | Common for Node/React |
| 5173 | Vite | Vite dev server default |
| 5432 | PostgreSQL | Database |
| 8000 | Dev server | FastAPI / Django default |
| 8080 | Alt HTTP | Common alternative for proxies |
Ephemeral ports, briefly
When your browser opens a connection to example.com:443, the server side is :443 but the browser side is some random port like :52847. That's an ephemeral port — your OS picks a free one in the 49152–65535 range, uses it for the lifetime of the connection, then releases it.