INTERMEDIATEFrequently Tested 4 min read 20 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 |
Key Formulas Summary
TCP Effective Sending Window
Note: cwnd = network congestion window; rwnd = receiver advertised flow-control window
TCP Reaction to Packet Loss (Tahoe vs Reno)
Note: TCP Tahoe resets cwnd = 1 MSS on BOTH Timeout and 3 Duplicate ACKs!
#Computer Networks#TCP#Congestion Control#Slow Start#OSPF#Distance Vector
Practice Questions on This Chapter (3)
Q1GATE CS NetworksMCQMEDIUM
+2M • -0.67
A TCP Reno connection currently has congestion window and . If a Retransmission Timeout (RTO) occurs, what become the new values of and ?
⚡ Click an option above to verify instantly
Q2UGC NET / GATE CNMCQEASY
+1M • -0.33
Which routing protocol suffers from the Count-to-Infinity problem when link failures occur?
⚡ Click an option above to verify instantly
Q3GATE CS 2021NATMEDIUM
+2M • 0 Neg
An IPv4 datagram of total length ( standard header + payload) crosses a link with . Into how many fragments is it split, and what is the Fragment Offset field value of the last fragment? (Enter ONLY the Fragment Offset of the last fragment)