1's complement checksum covering ONLY the IP header (recomputed at every hop).
Source & Dest IP
32 Bits each
Origin and final destination IPv4 logical addresses.
🏛️ Step-by-Step Solved Problem 1: IPv4 Fragmentation Calculation
An IPv4 packet with Total Length = $4020\text{ bytes}$ (20 bytes IP header + 4000 bytes data) travels across an Ethernet link with $\text{MTU} = 1500\text{ bytes}$. Calculate the fields for all resulting fragments.
Solution: Max payload per fragment = $1500 - 20 = 1480\text{ bytes}$ (divisible by 8: $1480 / 8 = 185$).
HPACK header compression, Server Push; TCP-level packet drop still stalls all streams.
HTTP/3 (QUIC)
Port 443 (UDP)
Replaces TCP with QUIC over UDP: combines TLS 1.3 handshake and transport in single round-trip!
Zero Head-of-Line Blocking: Packet loss in one stream never stalls other streams!
🧠 M5 Active Recall & 10-Question University Exam Master Bank
Q1. Draw the complete IPv4 Header format and explain the function of TTL, Header Checksum, and Fragmentation fields. (10 Marks)
• TTL (8 bits): Hop counter decremented at each router. Prevents undeliverable packets from looping infinitely.
• Header Checksum (16 bits): 1's complement sum covering header only. Verified at every hop.
• Identification (16 bits): Tags fragments of same datagram.
• Flags (3 bits): DF (Don't Fragment), MF (More Fragments).
• Fragment Offset (13 bits): Measures data offset in 8-byte blocks relative to unfragmented payload.
Q2. Explain TCP 3-Way Handshake Connection Establishment and 4-Way Connection Termination with sequence diagrams. (10 Marks)
Q3. Explain TCP Congestion Control mechanisms: Slow Start, Congestion Avoidance, Fast Retransmit, and Fast Recovery. (10 Marks)
• Slow Start: Exponential growth: $\text{cwnd} \leftarrow \text{cwnd} \times 2$ per RTT until reaching $\text{ssthresh}$.
• Congestion Avoidance: Additive linear growth: $\text{cwnd} \leftarrow \text{cwnd} + 1\text{ MSS}$ per RTT.
• Fast Retransmit: 3 duplicate ACKs trigger immediate retransmission without waiting for RTO timeout.
• Fast Recovery: Multiplicative decrease: $\text{ssthresh} = \text{cwnd}/2$, sets $\text{cwnd} = \text{ssthresh} + 3\text{ MSS}$, continues congestion avoidance.
Q4. Compare Distance Vector (Bellman-Ford) and Link State (Dijkstra) routing algorithms. How is Count-to-Infinity solved? (8 Marks)
• Distance Vector: Periodic routing table exchange with neighbors only; slow convergence; suffers Count-to-Infinity. Solved by Split Horizon (do not advertise route back to neighbor who supplied it) and Poison Reverse (advertise cost as $\infty$).
• Link State: Floods Link State Advertisements (LSAs) to all routers; builds global topology map; runs Dijkstra's algorithm; zero routing loops!
Q5. Compare HTTP/1.1, HTTP/2, and HTTP/3 QUIC across multiplexing, transport layer, and Head-of-Line blocking. (8 Marks)
• HTTP/1.1 (TCP): Sequential requests per socket; application Head-of-Line (HoL) blocking.
• HTTP/2 (TCP): Binary multiplexed streams over single TCP connection; single packet drop stalls all streams (TCP HoL blocking).
• HTTP/3 (QUIC/UDP): Native multiplexed streams over UDP; packet drop in stream 1 never delays stream 2 (Zero HoL blocking!).
Topic 52.2: Comprehensive Network Layer & Transport Layer Solved Numericals
🏛️ Solved Numerical 1: Dijkstra's Link State Shortest Path Algorithm Trace
Find the shortest paths from source router $A$ to all nodes in network graph:
Shortest Paths from $A$: to $B = 2$, to $C = 4$ ($A \rightarrow B \rightarrow C$), to $D = 5$ ($A \rightarrow B \rightarrow C \rightarrow D$), to $E = 6$ ($A \rightarrow B \rightarrow C \rightarrow D \rightarrow E$).
A TCP Reno connection has $\text{ssthresh} = 16\text{ MSS}$. It starts in Slow Start ($\text{cwnd} = 1$). Trace $\text{cwnd}$ over successive RTTs until a timeout occurs at $\text{cwnd} = 20$, followed by 3 duplicate ACKs at $\text{cwnd} = 12$:
3 Duplicate ACKs at $\text{cwnd} = 12$: Fast Retransmit! Sets $\text{ssthresh} \leftarrow 12/2 = 6\text{ MSS}$, sets $\text{cwnd} \leftarrow 6 + 3 = 9\text{ MSS}$ in Fast Recovery!
Topic 52.3: Comprehensive Internetworking, BGP & Transport Internals
In global autonomous internetworking, routing is divided into **Intra-Domain Interior Gateway Protocols (IGP: OSPF, IS-IS)** and **Inter-Domain Exterior Gateway Protocols (EGP: BGP-4)**:
Routing Protocol
Algorithm Family
Underlying Transport Protocol
Routing Metric & Domain
RIPv2
Distance Vector (Bellman-Ford)
UDP (Port 520)
Hop Count (Max = 15 hops; 16 = $\infty$); Small LANs.
OSPFv2 / OSPFv3
Link State (Dijkstra)
Raw IP (Protocol 89)
Cost = $\frac{10^8}{\text{Bandwidth (bps)}}$; Large Enterprise / Campus.
BGP-4
Path Vector
TCP (Port 179)
AS-Path list, Policy-based routing, Local Preference; Global Internet Core.
Remedies: (1) Split Horizon: $A$ never advertises its route to $C$ back to $B$. (2) Poison Reverse: $A$ advertises $D_A(C) = \infty$ to $B$.
🏛️ Step-by-Step Silly Window Syndrome Prevention: Nagle vs. Clark Algorithms
Silly Window Syndrome occurs when data is exchanged in tiny 1-byte segments (e.g. typing single characters in Telnet), causing a 40-byte TCP/IP header overhead for every single byte of payload:
Sender-Side Solution (Nagle's Algorithm): The sender transmits the first small packet immediately. While waiting for ACK, the sender buffers all subsequent outgoing data into a full Maximum Segment Size (MSS) block before transmitting the next segment.
Receiver-Side Solution (Clark's Solution): The receiver prevents sending tiny window update advertisements. It advertises a window size of 0 until its internal buffer has space for either a full MSS or half the receiver buffer capacity!
Topic 52.4: Master University Solved Examination Numerical Bank
Comparing the 3rd octets in binary: `00000000`, `00000001`, `00000010`, `00000011`. All 4 blocks share the identical first 22 bits (`11001000.00010000.000000xx`).
Benefit: Replaces 4 independent routing table entries with 1 consolidated entry, reducing router BGP memory table size by $75\%$!
🏛️ Solved Numerical 4: TCP Maximum Throughput & Mathis Equation
A cross-continental $10\text{ Gbps}$ TCP link has an RTT of $100\text{ ms}$ and standard MSS of $1460\text{ bytes}$. If the packet loss rate is $p = 0.0001$ ($0.01\%$), calculate the maximum achievable TCP throughput according to the Mathis Formula.
Critical Engineering Insight: Even on a $10\text{ Gbps}$ physical pipe, a tiny $0.01\%$ packet drop throttles standard TCP Reno throughput down to $14.25\text{ Mbps}$ due to aggressive AIMD window halving!
Topic 52.5: Comprehensive Transport State Machines & Variable Length Subnetting (VLSM)
Given 4 routers $A, B, C, D$. Router $B$ has direct neighbor costs: $c(B, A) = 3, c(B, C) = 1, c(B, D) = 6$. $B$ receives distance vectors from $A$ and $C$:
From $A$: $D_A = (A: 0, B: 3, C: 4, D: 2)$
From $C$: $D_C = (A: 4, B: 1, C: 0, D: 3)$
Update $B$'s routing table for destination $D$ using Bellman-Ford: $D_B(D) = \min \{ c(B, A) + D_A(D), \ c(B, C) + D_C(D), \ c(B, D) \}$.
Q6. Compare IPv4 and IPv6 across address space, header size, fragmentation, checksum, and security. (10 Marks)
• Address Space: IPv4 has 32-bit addresses ($4.3 \times 10^9$); IPv6 has 128-bit addresses ($3.4 \times 10^{38}$).
• Header Size: IPv4 is variable ($20\text{--}60\text{ B}$); IPv6 has a fixed $40\text{-byte}$ base header with chained Extension Headers.
• Fragmentation: IPv4 routers perform fragmentation; in IPv6, ONLY the source host fragments packets (Path MTU Discovery).
• Header Checksum: IPv4 recomputes checksum at every hop; IPv6 eliminates header checksum to maximize router forwarding speed.
• Security: IPsec is optional add-on in IPv4; IPsec support is built natively into the core IPv6 protocol specification!
• ARP: Maps a known Layer 3 logical IP address to an unknown Layer 2 physical MAC address on the local subnet.
• ARP Request: Broadcast frame (`FF:FF:FF:FF:FF:FF`) asking: *"Who has IP X.X.X.X? Tell MAC Y."*
• ARP Reply: Unicast frame from the target host stating: *"I have IP X.X.X.X, my MAC is Z."*
• ARP Poisoning (Spoofing): An attacker sends gratuitous fake ARP replies associating the gateway's IP with the attacker's MAC, enabling Man-in-the-Middle (MitM) packet sniffing!
Topic 52.6: Advanced TCP State Transition Machine & Congestion Control Math
Figure 5.2: The Classical TCP Client Connection Lifetime State Machine