Transport Layer
Transport Layer is responsible for process-to-process delivery. It ensures reliable transmission, multiplexing, managing connection-oriented streams, flow control etc. To identify a process in an end-to-end communication, it needs an address. Each process is given an identity, or process-specific address in the network. This address is known as the service point address in OSI model, and port number or port address in TCP/IP transport layer.
Transport Layer Protocols
The transport layer consists of various protocols for flow and stream control, reliable connection etc. Some Transport Layer protocols include UDP, a connectionless protocol, TCP and SCTP, connection oriented protocols. Transmission Control Protocol and User Datagram Protocol are the two most important protocols in the transport layer. Other protocols include DCCP (Datagram Congestion Control Protocol), SCTP (Stream Control Transmission Protocol) and RSVP (Resource Reservation Protocol).
Process-to-process delivery
Client-Server paradigm - The transport layer follows the client-server model to achieve process-to-process communication. The process on local host is called a client, while the process on remote host is called a server.
Addressing in Internet Model
A port number identifies a process on a host. At a time, there may be many processes running on a host machine. To distinguish among these processes, the transport layer uses an address known as port number. A port number is usually a 16 bit integer between 0 and 65,535. There are two types of port numbers:
Ephemeral port number : port number for client program randomly chosen by transport layer software.
Well known port number : Universal port number assigned to server program, not random.
IANA ranges
The IANA, or Internet Assigned Number Authority divides port numbers into 3 different ranges:
- Well known ports: (0-1023)- assigned and controlled by IANA.
- Registered ports: (1024-49151)- not assigned or controlled by IANA. Can be registered to prevent duplication.
- Dynamic ports/ephemeral ports: (49152-65535)- not controlled or registered. Can be used by any process.
Socket Addresses - A socket address is a combination of IP address and port number. The IP header contains IP address, while the UDP or TCP header contains port numbers.
Multiplexing - Multiplexing is used to map several processes with one transport layer protocol. It defines a many-to-one relationship.
Demultiplexing - At receiver's site, one-to-many relationship is defined between one transport layer protocol and more than one processes.
Get the book here.