Transport Layer - Connection Oriented & Connectionless-Protocols
Connection Oriented Protocols
- Definition: A connection oriented protocol establishes a connection before transmitting data and uses this connection to ensure reliable delivery of data segments.
- Importance: Ensures that both sender and receiver are aware of which bits of data have been transmitted successfully. This is crucial on the Internet where data could face numerous failure points.
- Example: Transmission Control Protocol (TCP) is the prime example of a connection oriented protocol.
Acknowledgment Mechanism
- Process: Each segment of data sent over TCP requires an acknowledgment (ACK) from the receiving end. This process helps identify lost data segments and mandates retransmission if necessary.
- Why it Matters: If a single bit is lost, the resulting data could be corrupted, making it incomprehensible. Each bit is an electrical signal, thus any disruption changes the signal's integrity.
Factors Affecting Data Transmission
- Issues: Various factors can hinder data reaching its destination, including:
- Line errors or congestion may lead to dropping packets.
- Physical disruptions (e.g., a construction company cutting fiber cables).
- Role of TCP: It mitigates these issues through its connection establishment and acknowledgment processes.
Lower Layer Protocols
- IP and Ethernet: These protocols use checksums to verify data integrity but do not resend lost data. When a checksum fails, the data is discarded.
- Responsibility of TCP: TCP is responsible for determining data retransmission based on ACKs. If segments are not acknowledged, TCP can resend these segments.
Sequence Numbers
- Purpose: Sequence numbers are critical as they allow TCP to reorder data segments that may arrive out of order. This means even if segments are resent due to errors, they can still be correctly assembled without disruption.
Overhead of Connection Oriented Protocols
- Characteristics: Creating a TCP connection introduces significant overhead:
- Establishing the connection.
- Sending frequent acknowledgments.
- Properly terminating the connection.
- Trade-Off: This overhead is acceptable when data integrity is paramount.
Connectionless Protocols: UDP
- Comparison: User Datagram Protocol (UDP) operates without establishing a connection or requiring acknowledgments, focusing instead on sending packets directly to the destination port.
- Applications: Useful for applications where timely delivery matters more than reliability, such as video streaming.
- Example: In video streaming, each frame can be sent as a separate UDP datagram. While losing some frames alters quality, if only a few are lost, the video remains watchable because of the streaming format's tolerance to packet loss.
- Efficiency: UDP’s lower overhead allows more bandwidth to be used for actual data transfer as opposed to connection management, potentially improving quality in bandwidth-intensive applications.