Transport Layer and Protocols(TCP & UDP)
The transport layer is responsible for providing communication services directly to the application processes running on different hosts. Its primary responsibilities include:
1)End to end connection between hosts: Depending on the protocol (TCP or UDP), the transport layer may establish, maintain, and terminate connections between hosts. TCP provides connection-oriented communication, ensuring reliability through features like acknowledgment, retransmission, and flow control. UDP, on the other hand, is connectionless and doesn't provide these features.
2)Congestion Control: It is a situation in which too many sources over a network attempt to send data and router buffers start overflowing due to which loss of packets occurs . As a results retransmission of packets from the sources increases the congestion further. TCP dynamically adjusts the transmission rate based on network congestion to prevent packet loss and ensure efficient network utilization.
3)Flow Control: It manages the flow of data between sender and receiver, ensuring that a fast sender does not overwhelm a slow receiver. TCP uses flow control mechanisms like windowing to regulate the flow of data.
4)Data Integrity and Error Connection: Transport layer checks for errors in the messages coming from application layer by using error detection codes and computing check sums, it checks received data is not corrupted and uses the ACK services to inform the sender if data has arrived or not.
5)Multiplexing and Demultiplexing: Multiplexing enables multiple applications to use the network simultaneously by assigning unique identifiers (port numbers) to each communication stream. Demultiplexing ensures that the received data is correctly routed to the appropriate application.
PROTOCOLS:
1)TCP:TCP is a connection-oriented protocol that provides reliable, ordered, and error-checked delivery of data packets between applications. It ensures that data packets are delivered without errors, in sequence, and with congestion control mechanisms to avoid network congestion. TCP establishes a connection between two hosts before data exchange and ensures data integrity through acknowledgment and retransmission mechanisms. It is done by Three Way Handshake.
TCP SEGMENT:
A TCP segment is a unit of data used in the Transmission Control Protocol (TCP), which operates at the transport layer of the TCP/IP model. TCP segments are encapsulated within IP datagrams (or packets) for transmission over IP networks. Here are the key components of a TCP segment:
1.Header: The TCP header contains information necessary for the delivery of the segment. It typically includes fields such as:
2.Data: The payload of the TCP segment contains the actual application data being transmitted. This can range from a few bytes to the maximum segment size (MSS) negotiated during connection establishment.
UDP Datagram: UDP (User Datagram Protocol) does not technically use "segments" like TCP; instead, it utilizes UDP datagrams. A UDP datagram is a self-contained unit of data that consists of two main parts: the UDP header and the data payload. Here's an overview of what constitutes a UDP datagram:
1.UDP Header: The UDP header is a minimalistic structure that contains essential information for delivering the datagram. It consists of four fields
2.Data Payload: The data payload carries the actual application data being transmitted. UDP does not impose any restrictions on the size of the payload.