Transport Layer Flashcards
Transport Layer:
Provides logical communication between application processes running on different hosts
Multiplexing:
Handles data from multiple sockets, and add them to the transport layer
Connectionless multiplexing/demultiplexing:
Involves handling multiple data streams from different applications without establishing a dedicated, continuous connection between the endpoints
Transmission in UDP:
When data is sent, each piece of data is treated independently of others. Datagrams are sent directly to the destination without establishing a connection. Each datagram contains enough information in its header (such as source and destination port numbers) to be routed and delivered to the correct application.
Demultiplexing:
At the receiving side, the transport layer examines the destination port number in each UDP datagram’s header. It uses this port number to deliver the datagram to the correct application.
Port Numbers:
UDP uses port numbers to direct traffic to the correct receiving application. Each application binds to a specific port number, and the transport layer uses this number to identify where the incoming and outgoing data should go.
When creating datagram to send into UDP socket, it must be specified the following:
Destination IP address
Destination Port
Ports
Ports are numerical identifiers used by the transport layer to specify not just the host, but the particular process or service within the host that should receive the data. Think of a port as an apartment number in a large building: the street address gets you to the building, and the apartment number ensures you reach the right unit inside
Sockets
A socket, on the other hand, is an endpoint in a network communication. Sockets are created and used in software to send and receive data across a network. They combine an IP address and a port number so that a unique connection is established between one specific process on a device and another on a different device. Essentially, a socket is what allows a network to establish a connection through which data can be sent and received between processes.
Reliability Mechanisms in TCP
TCP is designed to offer reliable communication that ensures data is delivered accurately and in order, regardless of network conditions.
Here are some of the key mechanisms it uses: Error Detection and Recovery
Error Detection and Recovery
TCP uses a variety of techniques for error detection and recovery:
- Checksums to detect errors in data that is transmitted over the network. If a segment’s data is changed during transit, the calculated checksum at the receiver will not match the checksum in the segment header, indicating a problem.
- Sequence numbers to keep track of the order of segments and ensure they are assembled in the correct sequence at the destination.
Acknowledgments and Retransmissions
TCP uses acknowledgments to confirm the receipt of packets. When a sender transmits data, it starts a timer expecting to receive an acknowledgment of receipt from the receiver. If the acknowledgment is not received before the timer expires, TCP assumes the packet was lost or corrupted and retransmits it. This ensures that no data is lost in transit.
Flow Control
Flow control is managed using the window size, which controls how much data can be in transit before needing an acknowledgment. This prevents a fast sender from overwhelming a slow receiver, which might not be able to process all incoming data promptly
Congestion Control
Congestion control mechanisms like Slow Start, Congestion Avoidance, Fast Retransmit, and Fast Recovery are implemented to manage data flow in the network based on current network conditions, helping to minimize network congestion and ensure data delivery even under heavy load conditions.
Multiplexing at sender
handle data from multiple
sockets, add transport header
(later used for demultiplexing)