demultiplexing
Sorting incoming traffic to the right program, which the kernel does by looking at the protocol, destination address and port of each packet.
In more detail
Many programs share one network interface; ports are what let the kernel hand each packet to the right socket. For TCP, the remote address and port are used too, so many clients can connect to one listening port at once.
Related terms
- port — A number from 1 to 65535 that picks out one service on a machine, such as 22 for SSH or 80 for plain web traffic.
- network socket — One end of a two-way network connection between programs, identified by an IP address and a port number.
- transport layer — The layer that carries data between programs on two machines, identified by port numbers, using TCP or UDP.
Taught in
- Ports, Sockets And What Listening Means — Linux Fundamentals & Systems Administration