Module 1 · Layers, Addresses and DNS · Lesson 2 of 28
IP addresses and ports
1.2 IP addresses and ports
An IP address identifies a machine (or more precisely, a network interface) — 20.51.88.12. But one machine runs many programs that all want to use the network.
A port is a 16-bit number (0–65535) that identifies which program on that machine a message is for. The OS keeps a table: "port 443 → the Kestrel process", "port 1433 → SQL Server".
Well-known ports (0–1023): 80 = HTTP, 443 = HTTPS, 53 = DNS. Servers listen on these.
Ephemeral ports (~32768–65535 on Linux, ~49152–65535 on Windows): when your Core API makes an outgoing call, the OS picks a random free port from this range as the source. This is the finite resource behind socket exhaustion — roughly 16k–28k usable outgoing ports per destination.