Transport Layer Ports and Connections
- protocols at Layer 4 (Transport) are concerned with delivery of multiplexed application data
- headers instruct a host what to do with the data in a packet
- optionally, how to verify it is complete
- headers instruct a host what to do with the data in a packet
Ports
- each application protocol is assigned a unique identification number called a port
- host can operate multiple ports simultaneously
- port ranges:
- ports 0-1023
- preassigned by the Internet Assigned Numbers Authority (IANA) to well-known server applications
- port range 1024-49151
- registered for other server applications
- remaining ports up to 65,535
- designated for private or dynamic use
- ports 0-1023
- in addition to the server application needing a port,
- each client application must assign its own port number to track its requests
- client ports are called ephemeral ports or source ports
Info
- port number assignment guidelines are not always used
- early versions of Windows and UNIX/Linux used 1,024-5,000 for client ports
- modern linux kernels often use 32,768-60,999
Sockets & Connections
- a socket is a port number used in conjunction with a source IP address
- each socket is bound to a software process
- only one process can operate a socket at any one time
- a connection is formed when a client socket requests a service from the server socket
- uniquely identified by the combination of server port + IP address and client port + IP address
- server socket can support multiple connections from a number of client sockets
