Ports, sockets and UDP
Socket
An address plus a port; a connection is named by both ends' sockets.
A socket is one end of a network conversation: an IP address plus a port. A server listens on one: 0.0.0.0:80
is port 80 on every address, 127.0.0.1:8080 on loopback only. A connection is named by the sockets at both ends,
four numbers: source address and port, destination address and port. ss -tln lists the listening TCP sockets.
Read next
- Port A 16-bit number that picks the program on a device: web 80 and 443, DNS 53, SSH 22.
- Ephemeral port The temporary port a client's kernel picks for each outgoing connection.
- Private addresses Address ranges any organisation may use inside, never routed on the internet: 10/8, 172.16/12, 192.168/16.