INTERMEDIATE🔥 High-Yield Exam Topic 4 min read 2 views
TCP 3-Way Handshake, AIMD Congestion Control & Routing (Distance Vector vs OSPF)
TCP SYN/FIN sequence number consumption, Slow Start exponential growth vs Congestion Avoidance additive increase, 3-Dup-ACK vs Timeout cwnd transitions, and Count-to-Infinity.
1. TCP Connection Management & Sequence Numbers
- SYN flag consumes 1 sequence number even if it carries 0 payload bytes!
- Client Server:
SYN=1, Seq = x - Server Client:
SYN=1, ACK=1, Seq = y, Ack = x + 1 - Client Server:
ACK=1, Seq = x + 1, Ack = y + 1(can carry data!)
- Client Server:
- FIN flag also consumes 1 sequence number; pure ACK segments (with 0 data bytes) consume 0 sequence numbers.
- After sending the final
ACKin 4-way teardown, the active closer waits inTIME_WAITto absorb delayed duplicate segments and prevent port reuse collisions.
2. TCP Slow Start & AIMD Congestion Control
- Slow Start (): Every ACK received increases by DOUBLES every 1 RTT ().
- Congestion Avoidance (): increases by per entire RTT (linear / additive increase).
- Loss Detection:
- RTO Timeout (Severe congestion): , (re-enters Slow Start).
- 3 Duplicate ACKs (Mild loss in TCP Reno): , (Fast Retransmit + Fast Recovery — skips reset to 1 MSS!).
3. Routing Protocols Comparison
| Protocol | Algorithm | Metric | Key Exam Fact |
|---|---|---|---|
| RIP (Intra-AS) | Distance Vector (Bellman-Ford) | Hop Count () | Suffers Count-to-Infinity; partially mitigated by Split Horizon with Poison Reverse |
| OSPF (Intra-AS) | Link State (Dijkstra) | Bandwidth / Admin Cost | Floods Link-State Advertisements (LSAs) to all routers in area; loop-free convergence |
| BGP (Inter-AS) | Path Vector | Policy + AS-PATH | Runs over TCP Port 179; prevents inter-domain routing loops via full AS-PATH list |
📐 Quick Revision Formula Sheet
TCP Effective Sending Window
💡 cwnd = network congestion window; rwnd = receiver advertised flow-control window
TCP Reaction to Packet Loss (Tahoe vs Reno)
💡 TCP Tahoe resets cwnd = 1 MSS on BOTH Timeout and 3 Duplicate ACKs!
#Computer Networks#TCP#Congestion Control#Slow Start#OSPF#Distance Vector
🎯 Practice PYQs on This Topic (2)
Q1.GATE CS NetworksMCQMEDIUM
+2 Marks • -0.67 NegA TCP Reno connection currently has congestion window and . If a Retransmission Timeout (RTO) occurs, what become the new values of and ?
Q2.UGC NET / GATE CNMCQEASY
+1 Marks • -0.33 NegWhich routing protocol suffers from the Count-to-Infinity problem when link failures occur?