Addressing Services on a Host
While an IP address directs traffic to a specific physical or virtual machine, network ports direct packets to the correct application process running on that machine. A port is a 16-bit unsigned integer, ranging from 0 to 65535.
Well-Known Ports
The Internet Assigned Numbers Authority (IANA) divides ports into ranges. Well-Known ports (0-1023) are reserved for system services. Common examples include:
- Port 80: HTTP web traffic
- Port 443: HTTPS secure web traffic
- Port 53: DNS name resolution
- Port 22: SSH remote management
Sockets: IP + Port
A network socket is the combination of an IP address, a transport protocol (TCP/UDP), and a port number. When a browser requests a page, it binds to a random dynamic outbound port (e.g. 54932) and opens a connection to the server's listening socket (IP:443).
