Module 5: Transport Layer
The Transport Layer (Layer 4) provides end-to-end communication services for applications.5.1 TCP vs UDP
| Feature | TCP (Transmission Control Protocol) | UDP (User Datagram Protocol) |
|---|---|---|
| Connection | Connection-oriented (Handshake) | Connectionless (Fire & Forget) |
| Reliability | Reliable (ACKs, Retransmission) | Unreliable (No ACKs) |
| Ordering | Ordered delivery | Unordered |
| Speed | Slower (Overhead) | Faster (Low overhead) |
| Use Cases | Web (HTTP), Email (SMTP), File Transfer | Streaming, VoIP, Gaming, DNS |
5.2 TCP Three-Way Handshake
To establish a connection, TCP uses a 3-step process:- SYN: Client sends SYN (Synchronize) packet.
- SYN-ACK: Server responds with SYN-ACK.
- ACK: Client sends ACK (Acknowledge).
5.3 Flow & Congestion Control
- Flow Control: Prevents sender from overwhelming the receiver (Windowing).
- Congestion Control: Prevents sender from overwhelming the network (Slow Start, Congestion Avoidance).
Next Module
Module 6: Application Layer
HTTP, DNS, and more.