Ports & Multiplexing
Read this concept as one more decision made about a packet in flight. The widget below lets you change the inputs and watch the consequence instead of memorising the rule.
Why it matters
An IP address identifies a host, but several applications share that host at once. Port numbers in the transport header let the network deliver each segment to the right socket.
On the wire
TCP and UDP headers each carry a 16-bit source port and destination port, with well-known values such as 80, 443, and 53 reserved for common services. A connection is identified by the 4-tuple of source and destination addresses and ports, and NAT often rewrites the source port.
When it breaks
A port already bound by another process prevents a server from listening, so the connection attempt fails before any data flows. An inbound packet to a closed port draws a TCP RST or an ICMP port unreachable, which an application may report as a generic connection refusal.
Header inspector
Click a field to read what it controls, then change the values that a router or receiver would see.