[Day 3] 5. Transport Layer
Primary Functions:
- Reliability: Ensures data is transmitted accurately.
- Windowing (Sliding Window Protocol): Controls the flow of data by allowing multiple segments to be sent before receiving an acknowledgment.
- Error Correction: Detects and corrects errors in transmitted data.
- Connection-Oriented Communication: Establishes a connection before data transmission (used by TCP).
- Sequencing: Ensures data segments are delivered in the correct order.
- Segment Numbers: Range from 0 to 65535.
Traditional Method:
- PC1 sends a segment to PC2.
- PC2 acknowledges the receipt of the segment before PC1 sends the next one.
- If an acknowledgment is corrupted or lost, communication halts.
New Approach (Sliding Window Protocol):
- PC1 sends multiple segments (e.g., 3) without waiting for individual acknowledgments.
- Each segment has its own timer.
- Acknowledgment (ACK) is sent when all segments are received successfully. If an acknowledgment is dropped, the packets are resent after a timeout.
- Negative Acknowledgment (NACK): If any segment is corrupted or lost, PC2 sends a NACK to request a retransmission of that specific segment.
Flow Control
Why Flow Control Is Important?
- Prevents Data Loss: Without flow control, if Device A sends data faster than Device B can process, data might overflow B’s buffer and result in packet loss.
- Efficient Data Transmission: It allows for efficient use of the network bandwidth by dynamically adjusting the transmission rate based on the receiver’s capacity.
| TCP (Transmission Control Protocol) | UDP (User Datagram Protocol) | | ------------------------------------------ | ------------------------------------ | | Reliable | Non-reliable | | Implements Flow Control | No Flow Control | | Slow | Fast | | Sequencing of segments | No Sequencing | | Large header (due to more functionalities) | Small header (fewer functionalities) |
- TCP: Used when reliability and accuracy are more important than speed (e.g., file transfer, email).
- UDP: Used when speed is the primary concern, and packet loss is tolerable (e.g., live streaming, video calls, Instagram Reels).
Read Next
[Day 4] 1. Transport Layer
- The **Transport Layer** in the OSI model ensures **reliability** of data transmission and is composed of mechanisms like **flow control** and **erro...
[Day 4] 2. Cabling
#### **Coaxial Cables** - **Thinnet Coaxial (10Base2):** Standard with 185 meters and 110V. - **Thicknet Coaxial (10Base5):** Bigger coating, exte...