What are well-known port numbers?

Why Interviewers Ask This

Foundational questions like this help interviewers calibrate the rest of the interview. A confident, accurate answer signals that you have solid Networking basics — a prerequisite for any developer role.

Answer

Port numbers identify specific applications or services on a device (0–65535). Well-known ports (0–1023) are assigned by IANA to common services: 20/21 — FTP (data/control), 22 — SSH, 23 — Telnet (insecure, avoid), 25 — SMTP (email sending), 53 — DNS, 67/68 — DHCP (server/client), 80 — HTTP, 110 — POP3, 143 — IMAP, 443 — HTTPS, 3389 — RDP, 3306 — MySQL, 5432 — PostgreSQL, 6379 — Redis, 27017 — MongoDB. Registered ports (1024–49151) are assigned to applications. Dynamic/ephemeral ports (49152–65535) are assigned by the OS to client-side connections. A socket is a combination of IP address and port number (e.g., 192.168.1.1:443).

Common Mistake

Candidates often give textbook answers here. Interviewers are more impressed when you relate the concept to a specific problem you solved in a real Networking project.