{"edition":"cn-2026-10-10-tee-v2","routes":{"m2":{"read":[{"id":"start","title":"Start here","scope":"CN M2 · confirmed by your portion message","sections":[{"id":"plan","title":"Your CN M2 reading order","html":"<p><strong>Portion: Pure ALOHA onward in Unit 3, followed by complete Unit 4.</strong> You first learn only the vocabulary and mathematics needed for this portion. Each numerical is fully solved; the question stays above its answer.</p><table><thead><tr><th scope=\"col\">Question</th><th scope=\"col\">Marks</th><th scope=\"col\">Rule</th></tr></thead><tbody><tr><td>Q1(a)</td><td>2</td><td>Compulsory</td></tr><tr><td>Q1(b)</td><td>2</td><td>Compulsory</td></tr><tr><td>Q2, Q3, Q4</td><td>3 each</td><td>Attempt any two</td></tr></tbody></table><p><strong>Attempted total = 2 + 2 + 3 + 3 = 10 marks.</strong> The mock papers follow this pattern. No CN-specific time limit was supplied, so the guide does not invent one.</p><h2>Read in this order</h2><ol><li>Essential vocabulary and maths: bits, binary, powers, units, graphs.</li><li>Shared-channel access: Pure ALOHA, Slotted ALOHA, CSMA, CSMA/CD and CSMA/CA.</li><li>Switching → IPv4 → masks and subnetting → CIDR and VLSM.</li><li>IPv6 → ARP, RARP, DHCP → shortest paths → RIP and OSPF.</li><li>Matched actual PYQs → three M2 mocks → last-day revision.</li></ol><div class=\"note\"><p>The full CN answer-book is a secondary reference, not the definition of your M2 portion. CRC, Hamming codes and ARQ occur before ALOHA; transport and application protocols occur after Unit 4. They are excluded here. IP packet-format material is included because it directly appears in the supplied network-layer PYQs. Fragmentation is labelled an extension.</p></div><p>The current course code is <strong>702AI0C023</strong>. The two supplied older papers use <strong>702AI0C007</strong>; only questions matching the current M2 topics are included. This is an M2 course, not a claim that the entire CN TEE syllabus is covered.</p>"},{"id":"map","title":"Exactly what this M2 guide covers","html":"<table><thead><tr><th scope=\"col\">Current syllabus topic</th><th scope=\"col\">Where to study</th></tr></thead><tbody><tr><td>Pure ALOHA and Slotted ALOHA</td><td><a href=\"#m2/read/aloha/pure\">ALOHA</a></td></tr><tr><td>CSMA/CD and collision avoidance</td><td><a href=\"#m2/read/csma/sense\">CSMA and its variants</a></td></tr><tr><td>Switching techniques</td><td><a href=\"#m2/read/switching/types\">Switching</a></td></tr><tr><td>IPv4 addressing, subnet mask and CIDR</td><td><a href=\"#m2/read/ipv4/structure\">IPv4 and subnetting</a></td></tr><tr><td>IPv6</td><td><a href=\"#m2/read/ipv6/structure\">IPv6</a></td></tr><tr><td>ARP, RARP and DHCP</td><td><a href=\"#m2/read/mapping/arp\">Address mapping</a></td></tr><tr><td>Shortest paths, Bellman–Ford, distance vector</td><td><a href=\"#m2/read/routing/vocabulary\">Routing foundations</a></td></tr><tr><td>Link state, Dijkstra and OSPF</td><td><a href=\"#m2/read/protocols/link-state\">Routing protocols</a></td></tr><tr><td>RIP</td><td><a href=\"#m2/read/protocols/rip\">RIP</a></td></tr></tbody></table><div class=\"note\"><p>The syllabus prints “CDMA/CA” in the random-access list. The standard collision-avoidance protocol corresponding to CSMA/CD is <strong>CSMA/CA</strong>, taught here. Code-division multiple access (CDMA) is a different channelization method; do not expand CSMA/CA as CDMA.</p></div><p>Foundations are support lessons, not extra units. The PYQ tab contains 14 matching parts from two actual TEE papers, with original marks retained. M2 mocks use the confirmed 2/2/3/3/3 structure.</p>"}]},{"id":"basics","title":"Only the basics you need","scope":"Prerequisites for CN M2","sections":[{"id":"network","title":"Device, link, frame, packet and router","html":"<p><strong>Definition.</strong> A computer network is a collection of interconnected devices that exchange data using agreed communication rules called protocols.</p><p><strong>Simple meaning.</strong> Device number bhejta hai; link usko carry karta hai; protocol batata hai kaise bhejna hai.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/journey.a5c52083fd.svg\" width=\"820\" height=\"540\" alt=\"One packet travels through several local links\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Device, link, frame, packet and router</figcaption></figure><h2>Understand it step by step</h2><ol><li>A <strong>host</strong> is an end device such as a laptop. A <strong>link</strong> is the wired or wireless connection over which data travels.</li><li>A <strong>bit</strong> is 0 or 1. A <strong>frame</strong> is the data-link unit carried over one link. A <strong>packet</strong> is the network-layer unit, such as an IP packet. A packet is normally carried inside a frame.</li><li>A <strong>switch</strong> forwards Ethernet frames within a local network using MAC addresses. A <strong>router</strong> forwards IP packets between networks using destination IP addresses.</li><li>An IP address identifies an interface logically. An Ethernet MAC address is used for delivery on the current local link. The local next-hop MAC can change at each routed hop.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Your laptop sends an IP packet toward a website. On your Wi-Fi link it is carried in a frame addressed toward the local access infrastructure. Your router then forwards that IP packet toward another network.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Distinguish a frame, a packet and the role of a router. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A frame is a data-link-layer unit for one-link delivery; an IP packet is a network-layer unit for delivery across interconnected networks. A router examines the destination IP address, selects a next hop and forwards the packet in a new link-layer frame.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Your laptop sends an IP packet toward a website. On your Wi-Fi link it is carried in a frame addressed toward the local access infrastructure. Your router then forwards that IP packet toward another network.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Frame = ek link; packet = networks ke paar.</p>"},{"id":"bits","title":"Bits, bytes and rate: read the units first","html":"<p><strong>Definition.</strong> A bit is one binary digit. A byte contains eight bits. A data rate measures the number of bits transmitted per second.</p><p><strong>Simple meaning.</strong> Capital B = byte; small b = bit. Size aur speed ki units same karo.</p><h2>Understand it step by step</h2><ol><li>1 byte = 8 bits. Therefore 100 bytes = 800 bits.</li><li>Networking rates normally use decimal prefixes: 1 kbps = 1,000 bps and 1 Mbps = 1,000,000 bps. Storage-style KiB means 1,024 bytes and is a different notation.</li><li>1 second = 1,000 ms = 1,000,000 μs. A millisecond is 0.001 s; a microsecond is 0.000001 s.</li><li>Transmission time counts how long it takes to put the frame bits onto the link. Propagation time counts how long a signal takes to travel to the other end.</li></ol><div class=\"math-display\"><img src=\"math/045768b5f250c7fa.svg\" alt=\"T_{\\mathrm{frame}}=\\frac{L}{R}\" style=\"width:11.198ex;height:4.674ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/b9c12990b79f75b6.svg\" alt=\"T_p=\\frac{d}{v}\" style=\"width:7.503ex;height:4.676ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>A 1,000-byte frame contains 8,000 bits. At 2 Mbps, placing those bits onto the link takes 8,000/2,000,000 = 0.004 s = 4 ms.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain the difference between transmission delay and propagation delay. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Transmission delay is L/R, where L is the number of bits and R is the bit rate. Propagation delay is d/v, where d is link length and v is propagation speed. Larger frames increase transmission delay; a longer link increases propagation delay.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A 1,000-byte frame contains 8,000 bits. At 2 Mbps, placing those bits onto the link takes 8,000/2,000,000 = 0.004 s = 4 ms.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Bits / bits-per-second = seconds; metres / metres-per-second = seconds.</p>"},{"id":"delay-1","title":"Delay example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A frame contains 1000 bytes. The link rate is 2 Mbps; its length is 2,000 m and propagation speed is 200,000,000 m/s. Find transmission and one-way propagation delays. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Quantity</th><th scope=\"col\">Value</th></tr></thead><tbody><tr><td>Frame length</td><td>1000 bytes</td></tr><tr><td>Rate</td><td>2 Mbps</td></tr><tr><td>Link length</td><td>2,000 m</td></tr><tr><td>Signal speed</td><td>200,000,000 m/s</td></tr></tbody></table><h2>To find</h2><p>The two separate delays, in seconds and microseconds.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4bcb5bb2e87de6c2.svg\" alt=\"T_{\\mathrm{frame}}=L/R\" style=\"width:12.875ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/9c2209baf93e272e.svg\" alt=\"T_p=d/v\" style=\"width:8.736ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>L must be in bits and R in bits/s. Link length and signal speed must use the same distance unit.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Convert bytes to bits</h4><p>1000 × 8 = 8,000 bits.</p></div><div class=\"step\"><h4>Step 2. Convert the rate</h4><p>2 × 1,000,000 = 2,000,000 bits/s.</p></div><div class=\"step\"><h4>Step 3. Divide for transmission time</h4><p>8,000 ÷ 2,000,000 = 0.004000 s = 4000 μs.</p></div><div class=\"step\"><h4>Step 4. Divide for propagation time</h4><p>2,000 ÷ 200,000,000 = 0.000010 s = 10 μs.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Transmission = 4000 μs; propagation = 10 μs.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>These are different physical delays. Do not add a round-trip factor unless the question asks for a round trip.</p></aside></div></section>"},{"id":"delay-2","title":"Delay example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A frame contains 500 bytes. The link rate is 10 Mbps; its length is 10,000 m and propagation speed is 200,000,000 m/s. Find transmission and one-way propagation delays. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Quantity</th><th scope=\"col\">Value</th></tr></thead><tbody><tr><td>Frame length</td><td>500 bytes</td></tr><tr><td>Rate</td><td>10 Mbps</td></tr><tr><td>Link length</td><td>10,000 m</td></tr><tr><td>Signal speed</td><td>200,000,000 m/s</td></tr></tbody></table><h2>To find</h2><p>The two separate delays, in seconds and microseconds.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4bcb5bb2e87de6c2.svg\" alt=\"T_{\\mathrm{frame}}=L/R\" style=\"width:12.875ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/9c2209baf93e272e.svg\" alt=\"T_p=d/v\" style=\"width:8.736ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>L must be in bits and R in bits/s. Link length and signal speed must use the same distance unit.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Convert bytes to bits</h4><p>500 × 8 = 4,000 bits.</p></div><div class=\"step\"><h4>Step 2. Convert the rate</h4><p>10 × 1,000,000 = 10,000,000 bits/s.</p></div><div class=\"step\"><h4>Step 3. Divide for transmission time</h4><p>4,000 ÷ 10,000,000 = 0.000400 s = 400 μs.</p></div><div class=\"step\"><h4>Step 4. Divide for propagation time</h4><p>10,000 ÷ 200,000,000 = 0.000050 s = 50 μs.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Transmission = 400 μs; propagation = 50 μs.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>These are different physical delays. Do not add a round-trip factor unless the question asks for a round trip.</p></aside></div></section>"},{"id":"delay-3","title":"Delay example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A frame contains 1500 bytes. The link rate is 100 Mbps; its length is 100,000 m and propagation speed is 250,000,000 m/s. Find transmission and one-way propagation delays. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Quantity</th><th scope=\"col\">Value</th></tr></thead><tbody><tr><td>Frame length</td><td>1500 bytes</td></tr><tr><td>Rate</td><td>100 Mbps</td></tr><tr><td>Link length</td><td>100,000 m</td></tr><tr><td>Signal speed</td><td>250,000,000 m/s</td></tr></tbody></table><h2>To find</h2><p>The two separate delays, in seconds and microseconds.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4bcb5bb2e87de6c2.svg\" alt=\"T_{\\mathrm{frame}}=L/R\" style=\"width:12.875ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/9c2209baf93e272e.svg\" alt=\"T_p=d/v\" style=\"width:8.736ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>L must be in bits and R in bits/s. Link length and signal speed must use the same distance unit.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Convert bytes to bits</h4><p>1500 × 8 = 12,000 bits.</p></div><div class=\"step\"><h4>Step 2. Convert the rate</h4><p>100 × 1,000,000 = 100,000,000 bits/s.</p></div><div class=\"step\"><h4>Step 3. Divide for transmission time</h4><p>12,000 ÷ 100,000,000 = 0.000120 s = 120 μs.</p></div><div class=\"step\"><h4>Step 4. Divide for propagation time</h4><p>100,000 ÷ 250,000,000 = 0.000400 s = 400 μs.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Transmission = 120 μs; propagation = 400 μs.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>These are different physical delays. Do not add a round-trip factor unless the question asks for a round trip.</p></aside></div></section>"},{"id":"binary","title":"Binary place values: why the rightmost place is 1","html":"<p><strong>Definition.</strong> Binary is a base-two number system. Each position represents a power of 2; its digit says whether that value is present (1) or absent (0).</p><p><strong>Simple meaning.</strong> Right se 1 shuru karo; left jaate hi har box double: 1, 2, 4, 8…</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/binary.f629a09a71.svg\" width=\"820\" height=\"380\" alt=\"Binary positions: each move left doubles the value\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Binary place values: why the rightmost place is 1</figcaption></figure><h2>Understand it step by step</h2><ol><li>Decimal 352 means 3×100 + 5×10 + 2×1. The position supplies the value; the digit supplies the multiplier.</li><li>Binary follows the same idea, but the place values are 1, 2, 4, 8, 16, 32, 64, 128 instead of 1, 10, 100.</li><li>The rightmost position is numbered 0 because its value is 2⁰ = 1. The next is position 1 with value 2¹ = 2. Position 7 has value 2⁷ = 128.</li><li>For an 8-bit octet, write the values left to right as 128, 64, 32, 16, 8, 4, 2, 1. Add only the columns containing a 1. Leading zeroes keep the width but add nothing.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>In 00000101, the 1s sit above 4 and 1, so the value is 4+1 = 5. The 0 above 2 contributes 0, not 2.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain how a binary octet is converted to decimal. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Assign weights 128,64,32,16,8,4,2,1 from left to right. Multiply each weight by the bit in that position and add the eight products. For 11000000, the result is 128+64 = 192.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>In 00000101, the 1s sit above 4 and 1, so the value is 4+1 = 5. The 0 above 2 contributes 0, not 2.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Position ka weight likho; jahan 1 hai bas woh add karo.</p>"},{"id":"binary-1","title":"Binary to decimal · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Convert the 8-bit binary number 00000101 to decimal. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Binary octet = <code>00000101</code>.</p><h2>To find</h2><p>Its decimal value.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/2d0b01052ad0f77f.svg\" alt=\"\\text{Decimal value}=\\sum_{k=0}^{7} b_k2^k\" style=\"width:24.6ex;height:6.773ex\" loading=\"lazy\" decoding=\"async\"></div><p>The symbol Σ means add all the terms. bₖ is the bit at position k; the rightmost position is k=0. The table expands the entire sum.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Write all eight place values</h4><table><thead><tr><th scope=\"col\">Position from right</th><th scope=\"col\">7</th><th scope=\"col\">6</th><th scope=\"col\">5</th><th scope=\"col\">4</th><th scope=\"col\">3</th><th scope=\"col\">2</th><th scope=\"col\">1</th><th scope=\"col\">0</th></tr></thead><tbody><tr><td>Place value</td><td>128</td><td>64</td><td>32</td><td>16</td><td>8</td><td>4</td><td>2</td><td>1</td></tr><tr><td>Bit</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>1</td><td>0</td><td>1</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Multiply each bit by its place value</h4><table><thead><tr><th scope=\"col\">Place value</th><th scope=\"col\">Bit</th><th scope=\"col\">Product</th></tr></thead><tbody><tr><td>128</td><td>0</td><td>128 × 0 = 0</td></tr><tr><td>64</td><td>0</td><td>64 × 0 = 0</td></tr><tr><td>32</td><td>0</td><td>32 × 0 = 0</td></tr><tr><td>16</td><td>0</td><td>16 × 0 = 0</td></tr><tr><td>8</td><td>0</td><td>8 × 0 = 0</td></tr><tr><td>4</td><td>1</td><td>4 × 1 = 4</td></tr><tr><td>2</td><td>0</td><td>2 × 0 = 0</td></tr><tr><td>1</td><td>1</td><td>1 × 1 = 1</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Add the products</h4><p>0 + 0 + 0 + 0 + 0 + 4 + 0 + 1 = 5.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 5</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The eight boxes encode one value: 5. Leading zeroes do not change it.</p></aside></div></section>"},{"id":"binary-2","title":"Binary to decimal · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Convert the 8-bit binary number 10100110 to decimal. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Binary octet = <code>10100110</code>.</p><h2>To find</h2><p>Its decimal value.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/2d0b01052ad0f77f.svg\" alt=\"\\text{Decimal value}=\\sum_{k=0}^{7} b_k2^k\" style=\"width:24.6ex;height:6.773ex\" loading=\"lazy\" decoding=\"async\"></div><p>The symbol Σ means add all the terms. bₖ is the bit at position k; the rightmost position is k=0. The table expands the entire sum.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Write all eight place values</h4><table><thead><tr><th scope=\"col\">Position from right</th><th scope=\"col\">7</th><th scope=\"col\">6</th><th scope=\"col\">5</th><th scope=\"col\">4</th><th scope=\"col\">3</th><th scope=\"col\">2</th><th scope=\"col\">1</th><th scope=\"col\">0</th></tr></thead><tbody><tr><td>Place value</td><td>128</td><td>64</td><td>32</td><td>16</td><td>8</td><td>4</td><td>2</td><td>1</td></tr><tr><td>Bit</td><td>1</td><td>0</td><td>1</td><td>0</td><td>0</td><td>1</td><td>1</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Multiply each bit by its place value</h4><table><thead><tr><th scope=\"col\">Place value</th><th scope=\"col\">Bit</th><th scope=\"col\">Product</th></tr></thead><tbody><tr><td>128</td><td>1</td><td>128 × 1 = 128</td></tr><tr><td>64</td><td>0</td><td>64 × 0 = 0</td></tr><tr><td>32</td><td>1</td><td>32 × 1 = 32</td></tr><tr><td>16</td><td>0</td><td>16 × 0 = 0</td></tr><tr><td>8</td><td>0</td><td>8 × 0 = 0</td></tr><tr><td>4</td><td>1</td><td>4 × 1 = 4</td></tr><tr><td>2</td><td>1</td><td>2 × 1 = 2</td></tr><tr><td>1</td><td>0</td><td>1 × 0 = 0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Add the products</h4><p>128 + 0 + 32 + 0 + 0 + 4 + 2 + 0 = 166.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 166</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The eight boxes encode one value: 166. Leading zeroes do not change it.</p></aside></div></section>"},{"id":"binary-3","title":"Binary to decimal · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Convert the 8-bit binary number 11100000 to decimal. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Binary octet = <code>11100000</code>.</p><h2>To find</h2><p>Its decimal value.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/2d0b01052ad0f77f.svg\" alt=\"\\text{Decimal value}=\\sum_{k=0}^{7} b_k2^k\" style=\"width:24.6ex;height:6.773ex\" loading=\"lazy\" decoding=\"async\"></div><p>The symbol Σ means add all the terms. bₖ is the bit at position k; the rightmost position is k=0. The table expands the entire sum.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Write all eight place values</h4><table><thead><tr><th scope=\"col\">Position from right</th><th scope=\"col\">7</th><th scope=\"col\">6</th><th scope=\"col\">5</th><th scope=\"col\">4</th><th scope=\"col\">3</th><th scope=\"col\">2</th><th scope=\"col\">1</th><th scope=\"col\">0</th></tr></thead><tbody><tr><td>Place value</td><td>128</td><td>64</td><td>32</td><td>16</td><td>8</td><td>4</td><td>2</td><td>1</td></tr><tr><td>Bit</td><td>1</td><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Multiply each bit by its place value</h4><table><thead><tr><th scope=\"col\">Place value</th><th scope=\"col\">Bit</th><th scope=\"col\">Product</th></tr></thead><tbody><tr><td>128</td><td>1</td><td>128 × 1 = 128</td></tr><tr><td>64</td><td>1</td><td>64 × 1 = 64</td></tr><tr><td>32</td><td>1</td><td>32 × 1 = 32</td></tr><tr><td>16</td><td>0</td><td>16 × 0 = 0</td></tr><tr><td>8</td><td>0</td><td>8 × 0 = 0</td></tr><tr><td>4</td><td>0</td><td>4 × 0 = 0</td></tr><tr><td>2</td><td>0</td><td>2 × 0 = 0</td></tr><tr><td>1</td><td>0</td><td>1 × 0 = 0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Add the products</h4><p>128 + 64 + 32 + 0 + 0 + 0 + 0 + 0 = 224.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 224</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The eight boxes encode one value: 224. Leading zeroes do not change it.</p></aside></div></section>"},{"id":"binary-4","title":"Binary to decimal · example 4","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Convert the 8-bit binary number 11000000 to decimal. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Binary octet = <code>11000000</code>.</p><h2>To find</h2><p>Its decimal value.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/2d0b01052ad0f77f.svg\" alt=\"\\text{Decimal value}=\\sum_{k=0}^{7} b_k2^k\" style=\"width:24.6ex;height:6.773ex\" loading=\"lazy\" decoding=\"async\"></div><p>The symbol Σ means add all the terms. bₖ is the bit at position k; the rightmost position is k=0. The table expands the entire sum.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Write all eight place values</h4><table><thead><tr><th scope=\"col\">Position from right</th><th scope=\"col\">7</th><th scope=\"col\">6</th><th scope=\"col\">5</th><th scope=\"col\">4</th><th scope=\"col\">3</th><th scope=\"col\">2</th><th scope=\"col\">1</th><th scope=\"col\">0</th></tr></thead><tbody><tr><td>Place value</td><td>128</td><td>64</td><td>32</td><td>16</td><td>8</td><td>4</td><td>2</td><td>1</td></tr><tr><td>Bit</td><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Multiply each bit by its place value</h4><table><thead><tr><th scope=\"col\">Place value</th><th scope=\"col\">Bit</th><th scope=\"col\">Product</th></tr></thead><tbody><tr><td>128</td><td>1</td><td>128 × 1 = 128</td></tr><tr><td>64</td><td>1</td><td>64 × 1 = 64</td></tr><tr><td>32</td><td>0</td><td>32 × 0 = 0</td></tr><tr><td>16</td><td>0</td><td>16 × 0 = 0</td></tr><tr><td>8</td><td>0</td><td>8 × 0 = 0</td></tr><tr><td>4</td><td>0</td><td>4 × 0 = 0</td></tr><tr><td>2</td><td>0</td><td>2 × 0 = 0</td></tr><tr><td>1</td><td>0</td><td>1 × 0 = 0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Add the products</h4><p>128 + 64 + 0 + 0 + 0 + 0 + 0 + 0 = 192.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 192</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The eight boxes encode one value: 192. Leading zeroes do not change it.</p></aside></div></section>"},{"id":"decimal-1","title":"Decimal to binary · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Write decimal 13 as an 8-bit binary octet. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Decimal value = 13.</p><h2>To find</h2><p>Eight bits, including leading zeroes.</p><h2>Formula and why</h2><p>Use the weights 128,64,32,16,8,4,2,1.</p><p>At each weight, write 1 and subtract if the remaining value is at least that weight; otherwise write 0.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Choose each bit</h4><table><thead><tr><th scope=\"col\">Weight</th><th scope=\"col\">Remaining before</th><th scope=\"col\">Bit decision</th><th scope=\"col\">Remaining after</th></tr></thead><tbody><tr><td>128</td><td>13</td><td>0: too large</td><td>13</td></tr><tr><td>64</td><td>13</td><td>0: too large</td><td>13</td></tr><tr><td>32</td><td>13</td><td>0: too large</td><td>13</td></tr><tr><td>16</td><td>13</td><td>0: too large</td><td>13</td></tr><tr><td>8</td><td>13</td><td>1: subtract</td><td>5</td></tr><tr><td>4</td><td>5</td><td>1: subtract</td><td>1</td></tr><tr><td>2</td><td>1</td><td>0: too large</td><td>1</td></tr><tr><td>1</td><td>1</td><td>1: subtract</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Read bits in the same order</h4><p><code>00001101</code>.</p></div><div class=\"step\"><h4>Step 3. Reconstruct the decimal value</h4><p>8 + 4 + 1 = 13.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>00001101</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>Keep exactly eight positions when writing an IPv4 octet.</p></aside></div></section>"},{"id":"decimal-2","title":"Decimal to binary · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Write decimal 192 as an 8-bit binary octet. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Decimal value = 192.</p><h2>To find</h2><p>Eight bits, including leading zeroes.</p><h2>Formula and why</h2><p>Use the weights 128,64,32,16,8,4,2,1.</p><p>At each weight, write 1 and subtract if the remaining value is at least that weight; otherwise write 0.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Choose each bit</h4><table><thead><tr><th scope=\"col\">Weight</th><th scope=\"col\">Remaining before</th><th scope=\"col\">Bit decision</th><th scope=\"col\">Remaining after</th></tr></thead><tbody><tr><td>128</td><td>192</td><td>1: subtract</td><td>64</td></tr><tr><td>64</td><td>64</td><td>1: subtract</td><td>0</td></tr><tr><td>32</td><td>0</td><td>0: too large</td><td>0</td></tr><tr><td>16</td><td>0</td><td>0: too large</td><td>0</td></tr><tr><td>8</td><td>0</td><td>0: too large</td><td>0</td></tr><tr><td>4</td><td>0</td><td>0: too large</td><td>0</td></tr><tr><td>2</td><td>0</td><td>0: too large</td><td>0</td></tr><tr><td>1</td><td>0</td><td>0: too large</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Read bits in the same order</h4><p><code>11000000</code>.</p></div><div class=\"step\"><h4>Step 3. Reconstruct the decimal value</h4><p>128 + 64 = 192.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>11000000</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>Keep exactly eight positions when writing an IPv4 octet.</p></aside></div></section>"},{"id":"decimal-3","title":"Decimal to binary · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Write decimal 224 as an 8-bit binary octet. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Decimal value = 224.</p><h2>To find</h2><p>Eight bits, including leading zeroes.</p><h2>Formula and why</h2><p>Use the weights 128,64,32,16,8,4,2,1.</p><p>At each weight, write 1 and subtract if the remaining value is at least that weight; otherwise write 0.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Choose each bit</h4><table><thead><tr><th scope=\"col\">Weight</th><th scope=\"col\">Remaining before</th><th scope=\"col\">Bit decision</th><th scope=\"col\">Remaining after</th></tr></thead><tbody><tr><td>128</td><td>224</td><td>1: subtract</td><td>96</td></tr><tr><td>64</td><td>96</td><td>1: subtract</td><td>32</td></tr><tr><td>32</td><td>32</td><td>1: subtract</td><td>0</td></tr><tr><td>16</td><td>0</td><td>0: too large</td><td>0</td></tr><tr><td>8</td><td>0</td><td>0: too large</td><td>0</td></tr><tr><td>4</td><td>0</td><td>0: too large</td><td>0</td></tr><tr><td>2</td><td>0</td><td>0: too large</td><td>0</td></tr><tr><td>1</td><td>0</td><td>0: too large</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Read bits in the same order</h4><p><code>11100000</code>.</p></div><div class=\"step\"><h4>Step 3. Reconstruct the decimal value</h4><p>128 + 64 + 32 = 224.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>11100000</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>Keep exactly eight positions when writing an IPv4 octet.</p></aside></div></section>"},{"id":"powers","title":"Powers of two, percentages and the meaning of e","html":"<p><strong>Definition.</strong> A power describes repeated multiplication. The number e is approximately 2.718281828; e raised to a negative power is a positive number below 1.</p><p><strong>Simple meaning.</strong> 2 ki power bits ke combinations batati hai; e ki negative power ALOHA ki collision probability mein aati hai.</p><h2>Understand it step by step</h2><ol><li>2⁰ = 1; 2¹ = 2; 2² = 4; 2³ = 8. Each additional binary bit doubles the number of combinations. Six host bits give 2⁶ = 64 addresses.</li><li>A negative exponent means reciprocal: e⁻¹ = 1/e ≈ 0.367879. It does not mean −e.</li><li>A fraction 0.2 corresponds to 20%: multiply by 100. To convert 20% to a fraction, divide by 100.</li><li>For ALOHA, calculate the exponent first, then e raised to that exponent, then multiply by G. Keep at least six significant figures during working.</li></ol><table><thead><tr><th scope=\"col\">Power</th><th scope=\"col\">Value</th></tr></thead><tbody><tr><td>2<sup>0</sup></td><td>1</td></tr><tr><td>2<sup>1</sup></td><td>2</td></tr><tr><td>2<sup>2</sup></td><td>4</td></tr><tr><td>2<sup>3</sup></td><td>8</td></tr><tr><td>2<sup>4</sup></td><td>16</td></tr><tr><td>2<sup>5</sup></td><td>32</td></tr><tr><td>2<sup>6</sup></td><td>64</td></tr><tr><td>2<sup>7</sup></td><td>128</td></tr><tr><td>2<sup>8</sup></td><td>256</td></tr><tr><td>2<sup>9</sup></td><td>512</td></tr><tr><td>2<sup>10</sup></td><td>1024</td></tr><tr><td>2<sup>11</sup></td><td>2048</td></tr><tr><td>2<sup>12</sup></td><td>4096</td></tr><tr><td>2<sup>13</sup></td><td>8192</td></tr><tr><td>2<sup>14</sup></td><td>16384</td></tr><tr><td>2<sup>15</sup></td><td>32768</td></tr><tr><td>2<sup>16</sup></td><td>65536</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>At G=0.5 in Pure ALOHA, −2G = −1. Hence e⁻²ᴳ = e⁻¹ = 0.367879 and 0.5×0.367879 = 0.183940, or 18.394%.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain why 2⁶ gives 64 combinations and express 0.18394 as a percentage. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Each bit has two choices; six independent bit positions provide 2×2×2×2×2×2 = 64 combinations. A fraction is converted to percent by multiplying by 100, so 0.18394 corresponds to 18.394%.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>At G=0.5 in Pure ALOHA, −2G = −1. Hence e⁻²ᴳ = e⁻¹ = 0.367879 and 0.5×0.367879 = 0.183940, or 18.394%.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Minus exponent andar hai; final exponential positive rehta hai.</p>"},{"id":"calculator","title":"Calculator steps for ALOHA and subnetting","html":"<p>Use the normal calculation mode. Exact menu names vary across fx-991ES-family models; the mathematics below is the same. The <strong>eˣ</strong> function is usually the shifted function of <strong>ln</strong>. The <strong>EXP/×10ˣ</strong> key enters scientific notation and is not eˣ.</p><h2>Example 1 · e to a negative power</h2><ol><li>Enter eˣ with exponent (−1). Use the negative-number key or a clear parenthesised negative exponent.</li><li>Evaluate: e⁻¹ ≈ 0.3678794412.</li><li>Multiply by 0.5: 0.1839397206. Multiply by 100 only if a percentage is requested.</li></ol><h2>Example 2 · host combinations</h2><ol><li>For /26, subtract: 32−26 = 6 host bits.</li><li>Enter 2 raised to 6: 64 total addresses.</li><li>If ordinary usable host addresses are asked, subtract 2: 62.</li></ol><h2>Example 3 · frame time</h2><ol><li>A 200-bit frame at 200 kbps means 200/(200×10³).</li><li>Use parentheses around the denominator. Result: 0.001 seconds.</li><li>Multiply by 1,000 to express milliseconds: 1 ms.</li></ol><p class=\"memory\"><strong>Yaad rakho:</strong> eˣ aur ×10ˣ alag keys/functions hain. Brackets se denominator safe rakho.</p>"},{"id":"graphs","title":"How to read a routing graph","html":"<p><strong>Definition.</strong> A weighted graph represents routers as vertices and links as edges labelled with costs. A directed edge may be used only in the arrow direction.</p><p><strong>Simple meaning.</strong> Circle router hai, line link hai, number us link ka cost. Arrow ulta mat chalna.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/graph-basics.ebd9ed3bc9.svg\" width=\"820\" height=\"340\" alt=\"Directed path cost: arrows determine permitted travel\" loading=\"lazy\" decoding=\"async\"></div><figcaption>How to read a routing graph</figcaption></figure><h2>Understand it step by step</h2><ol><li>A vertex/node is one router, such as A. An edge A→B of weight 4 means going from A to B adds cost 4. It does not automatically permit B→A.</li><li>The cost of a path is the sum of its edge costs. A→B→C with costs 4 and 3 has total 7.</li><li>A tentative distance is the best route found so far; it can still improve. A predecessor records the previous vertex on that route.</li><li>∞ means no route has been discovered yet. For arithmetic in the table, ∞ plus a finite number stays ∞.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A direct A→C edge may cost 10, while A→B→C costs 4+3=7. The route with more links can still be cheaper.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. What is the difference between hop count and a weighted path cost? <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Hop count counts links or router transitions according to the protocol. A weighted path cost adds the numerical metric assigned to each edge. The fewest-hop path need not have the lowest weighted cost; an indirect route costing 7 is cheaper than a direct link costing 10.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A direct A→C edge may cost 10, while A→B→C costs 4+3=7. The route with more links can still be cheaper.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Shortest = smallest cost, zaroori nahi fewest arrows.</p>"}]},{"id":"aloha","title":"ALOHA: access, collisions and throughput","scope":"Unit 3 · confirmed M2 starting point","sections":[{"id":"pure","title":"Pure ALOHA: transmit first, retry if necessary","html":"<p><strong>Definition.</strong> Pure ALOHA is a random-access protocol in which a station transmits whenever a frame is ready and retransmits after a random delay if the transmission is unsuccessful.</p><p><strong>Simple meaning.</strong> Frame ready → bhej do. Collision hua → random wait karke retry.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/pure-aloha.8aa7732ee2.svg\" width=\"820\" height=\"345\" alt=\"Pure ALOHA: arbitrary start times can overlap\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Pure ALOHA: transmit first, retry if necessary</figcaption></figure><h2>Understand it step by step</h2><ol><li>Several stations share the same channel. Pure ALOHA does not first check whether the channel is idle.</li><li>A station transmits immediately. In the basic collision-channel model, any overlapping frame makes the involved frames unsuccessful.</li><li>An acknowledgement indicates successful reception. If it is not received before timeout, the station treats the attempt as unsuccessful. An absent ACK alone cannot distinguish a collision from another loss.</li><li>The station waits a random backoff time and retries. If every station used the same fixed delay, they could collide again together.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Two remote sensors may both transmit a reading immediately after it becomes ready. A random retry delay reduces the chance that their next attempts overlap again.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain Pure ALOHA and state its main limitation. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>In Pure ALOHA, a station transmits a ready frame without carrier sensing. If a successful acknowledgement is not received, it waits for a random interval and retransmits. Overlapping transmissions cause collisions in the basic model. Its maximum normalized throughput is 1/(2e) ≈ 18.4%, so it is inefficient at high offered load.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Two remote sensors may both transmit a reading immediately after it becomes ready. A random retry delay reduces the chance that their next attempts overlap again.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Pure = kisi bhi time start; retry ka wait random.</p>"},{"id":"vulnerable","title":"Why Pure ALOHA has a 2T vulnerable period","html":"<p><strong>Definition.</strong> The vulnerable period is the interval of start times of other frames that would cause a collision with a chosen frame.</p><p><strong>Simple meaning.</strong> Apne frame se ek frame-time pehle start hua frame bhi takra sakta hai, aur baad mein bhi.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/vulnerable.e2a01a5ab7.svg\" width=\"820\" height=\"360\" alt=\"Pure ALOHA: interfering starts from −T to +T\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Why Pure ALOHA has a 2T vulnerable period</figcaption></figure><h2>Understand it step by step</h2><ol><li>Let your frame start at time 0 and finish at T. All frames have the same transmission duration T.</li><li>Another frame starting between −T and 0 is still being transmitted when your frame begins.</li><li>Another frame starting between 0 and T begins before your frame ends.</li><li>Therefore interfering start times occupy an interval of length 2T. Exact boundary contact is treated as non-overlap in this idealized timing model.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>If a frame takes 2 ms, another frame starting 1 ms before yours overlaps its beginning; a frame starting 1 ms after yours overlaps its end. The vulnerable interval is 4 ms long.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Why is the vulnerable time of Pure ALOHA twice the frame transmission time? <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A frame lasting T can collide with an equal-length frame that began less than T earlier, or one that begins less than T later. The two intervals together have length T+T=2T.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>If a frame takes 2 ms, another frame starting 1 ms before yours overlaps its beginning; a frame starting 1 ms after yours overlaps its end. The vulnerable interval is 4 ms long.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Pure: before T + after T = 2T.</p>"},{"id":"slotted","title":"Slotted ALOHA: starts only at slot boundaries","html":"<p><strong>Definition.</strong> Slotted ALOHA is a random-access protocol that divides time into slots of one frame duration and permits transmissions only at the beginning of a slot.</p><p><strong>Simple meaning.</strong> Frame ready hai tab bhi next slot ki start-line ka wait karo.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/slotted-aloha.fbfbef9647.svg\" width=\"820\" height=\"390\" alt=\"Slotted ALOHA: one frame duration per slot\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Slotted ALOHA: starts only at slot boundaries</figcaption></figure><h2>Understand it step by step</h2><ol><li>All stations agree on slot boundaries; time synchronization is required.</li><li>A station with a frame waits for a slot boundary before starting. A slot can be idle, successful or a collision.</li><li>Exactly one station transmitting in a slot produces success in the ideal model. Two or more simultaneous attempts collide.</li><li>Frames cannot partially overlap adjacent slots under the assumptions. The vulnerable interval is T instead of 2T. Randomized retries are still needed.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>If the slot duration is 1 ms and a frame becomes ready at 2.4 ms, the next permitted start is 3 ms. Another station choosing the same slot can still collide.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Compare Pure ALOHA and Slotted ALOHA. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">Pure</th><th scope=\"col\">Slotted</th></tr></thead><tbody><tr><td>Start time</td><td>Any time</td><td>Slot boundary only</td></tr><tr><td>Synchronization</td><td>No common slots required</td><td>Required</td></tr><tr><td>Vulnerable period</td><td>2T</td><td>T</td></tr><tr><td>Maximum S</td><td>1/(2e) ≈ 0.184</td><td>1/e ≈ 0.368</td></tr><tr><td>G at maximum</td><td>0.5</td><td>1</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>If the slot duration is 1 ms and a frame becomes ready at 2.4 ms, the next permitted start is 3 ms. Another station choosing the same slot can still collide.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Slotted = aligned starts; collision risk half-window, not zero.</p>"},{"id":"formulas","title":"G, S and throughput: which number are you finding?","html":"<p><strong>Definition.</strong> Offered load G is the average number of transmission attempts per frame time. Normalized throughput S is the average number of successful frames per frame time.</p><p><strong>Simple meaning.</strong> G = kitne attempts; S = unmein successful output per frame-time. Dono same nahi.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/aloha-curve.58889b65f2.svg\" width=\"820\" height=\"430\" alt=\"ALOHA: too many attempts eventually reduce successful output\" loading=\"lazy\" decoding=\"async\"></div><figcaption>G, S and throughput: which number are you finding?</figcaption></figure><h2>Understand it step by step</h2><ol><li>Let L be frame length in bits, R the channel rate in bits/s, and λ the total attempt rate of all stations in frames/s. Then T=L/R seconds and G=λT.</li><li>For the standard model, attempts are modelled as Poisson, frames have equal duration, there is no capture, and overlapping transmissions fail. G includes retransmissions when they are part of the offered traffic.</li><li>Pure ALOHA uses S=Ge⁻²ᴳ; Slotted ALOHA uses S=Ge⁻ᴳ. Do not use arrival rate in frames/s directly in the exponent.</li><li>Successful frames/s is S/T. Successful frame bits/s is (S/T)L = SR. If L includes overhead, this is successful frame throughput, not application payload goodput.</li><li>For G>0, the success probability per attempt is S/G. S itself is not generally that probability. Under this fixed-frame ideal model, 100S is the normalized throughput as a percentage of raw bit rate.</li></ol><div class=\"math-display\"><img src=\"math/85fb8d2da8040e20.svg\" alt=\"T=L/R,\\qquad G=\\lambda T\" style=\"width:22.237ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/28ca9624d26f78f7.svg\" alt=\"S_{\\mathrm{pure}}=G e^{-2G}\" style=\"width:14.03ex;height:2.712ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/6d136a965636bb20.svg\" alt=\"S_{\\mathrm{slotted}}=G e^{-G}\" style=\"width:14.834ex;height:2.419ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/751670fd3de42086.svg\" alt=\"\\text{successful frames/s}=S/T\" style=\"width:25.804ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/58e5c110cc978ab9.svg\" alt=\"\\text{successful frame bits/s}=SR\" style=\"width:28.13ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>If G=0.5 and S≈0.18394, about 0.18394 successful frames occur per frame time. The success fraction per attempt is 0.18394/0.5≈0.36788, not 0.18394.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Write the throughput expressions of Pure and Slotted ALOHA, defining G and S. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>G denotes aggregate attempts per frame transmission time and S denotes successful frames per frame transmission time. Pure ALOHA: S=Ge⁻²ᴳ, with maximum 1/(2e) at G=0.5. Slotted ALOHA: S=Ge⁻ᴳ, with maximum 1/e at G=1. These results use the equal-length Poisson collision model.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>If G=0.5 and S≈0.18394, about 0.18394 successful frames occur per frame time. The success fraction per attempt is 0.18394/0.5≈0.36788, not 0.18394.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> P mein pair: −2G; S mein single: −G.</p>\r\n<h2>Important conversion in the faculty examples</h2><p>For 200-bit frames on a 200000-bit/s channel, T = 200/200000 = 0.001 s. If 500 frames/s attempt transmission, G = 0.5 and pure-ALOHA S = 0.5e⁻¹ ≈ 0.1839397. Convert to frames/s by dividing by T: 0.1839397/0.001 ≈ <strong>183.94 frames/s</strong>.</p><p>Do not multiply S by 500: S is successful frames per frame-time, not success probability per attempt. Some slide totals use that incorrect conversion. At 250 attempts/s the correct pure-ALOHA output is <strong>151.63 frames/s</strong>. Use the definitions and units above.</p>"},{"id":"pure-1","title":"Pure ALOHA · load example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. In a Pure ALOHA system, the offered load is G=0.25. Find normalized throughput, percentage throughput, and the theoretical maximum. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Protocol = Pure ALOHA; G = 0.25 attempts/frame time.</p><h2>To find</h2><p>S, 100S and the maximum possible S.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><p>Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate the exponent</h4><p>−2 × 0.25 = -0.5.</p></div><div class=\"step\"><h4>Step 2. Evaluate the exponential</h4><div class=\"math-display\"><img src=\"math/871b71246f6a730f.svg\" alt=\"e^{-0.5} \\approx 0.606530660\" style=\"width:19.49ex;height:2.05ex\" loading=\"lazy\" decoding=\"async\"></div></div><div class=\"step\"><h4>Step 3. Multiply by G</h4><p>S = 0.25 × 0.606530660 ≈ 0.151632665 successful frames/frame time.</p></div><div class=\"step\"><h4>Step 4. Convert to percentage</h4><p>0.151632665 × 100 ≈ 15.1633%.</p></div><div class=\"step\"><h4>Step 5. State the maximum separately</h4><p>The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> S ≈ 0.151633; percentage ≈ 15.1633%; Smax ≈ 0.183940 at G=0.5.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.</p></aside></div></section>"},{"id":"pure-2","title":"Pure ALOHA · load example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. In a Pure ALOHA system, the offered load is G=0.5. Find normalized throughput, percentage throughput, and the theoretical maximum. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Protocol = Pure ALOHA; G = 0.5 attempts/frame time.</p><h2>To find</h2><p>S, 100S and the maximum possible S.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><p>Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate the exponent</h4><p>−2 × 0.5 = -1.</p></div><div class=\"step\"><h4>Step 2. Evaluate the exponential</h4><div class=\"math-display\"><img src=\"math/f3e24ac70fcf4336.svg\" alt=\"e^{-1} \\approx 0.367879441\" style=\"width:18.245ex;height:2.05ex\" loading=\"lazy\" decoding=\"async\"></div></div><div class=\"step\"><h4>Step 3. Multiply by G</h4><p>S = 0.5 × 0.367879441 ≈ 0.183939721 successful frames/frame time.</p></div><div class=\"step\"><h4>Step 4. Convert to percentage</h4><p>0.183939721 × 100 ≈ 18.3940%.</p></div><div class=\"step\"><h4>Step 5. State the maximum separately</h4><p>The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> S ≈ 0.183940; percentage ≈ 18.3940%; Smax ≈ 0.183940 at G=0.5.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.</p></aside></div></section>"},{"id":"pure-3","title":"Pure ALOHA · load example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. In a Pure ALOHA system, the offered load is G=1. Find normalized throughput, percentage throughput, and the theoretical maximum. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Protocol = Pure ALOHA; G = 1 attempts/frame time.</p><h2>To find</h2><p>S, 100S and the maximum possible S.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><p>Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate the exponent</h4><p>−2 × 1 = -2.</p></div><div class=\"step\"><h4>Step 2. Evaluate the exponential</h4><div class=\"math-display\"><img src=\"math/6d4c1915157a6bc5.svg\" alt=\"e^{-2} \\approx 0.135335283\" style=\"width:18.245ex;height:2.05ex\" loading=\"lazy\" decoding=\"async\"></div></div><div class=\"step\"><h4>Step 3. Multiply by G</h4><p>S = 1 × 0.135335283 ≈ 0.135335283 successful frames/frame time.</p></div><div class=\"step\"><h4>Step 4. Convert to percentage</h4><p>0.135335283 × 100 ≈ 13.5335%.</p></div><div class=\"step\"><h4>Step 5. State the maximum separately</h4><p>The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> S ≈ 0.135335; percentage ≈ 13.5335%; Smax ≈ 0.183940 at G=0.5.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.</p></aside></div></section>"},{"id":"slotted-1","title":"Slotted ALOHA · load example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. In a Slotted ALOHA system, the offered load is G=0.25. Find normalized throughput, percentage throughput, and the theoretical maximum. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Protocol = Slotted ALOHA; G = 0.25 attempts/frame time.</p><h2>To find</h2><p>S, 100S and the maximum possible S.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/01e46e63e1b256b9.svg\" alt=\"S=G e^{-G}\" style=\"width:9.999ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><p>Select the formula from the protocol name. The exponent is −G because Slotted ALOHA has a T vulnerable period.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate the exponent</h4><p>−1 × 0.25 = -0.25.</p></div><div class=\"step\"><h4>Step 2. Evaluate the exponential</h4><div class=\"math-display\"><img src=\"math/8ed0d2b7d5ee0b1f.svg\" alt=\"e^{-0.25} \\approx 0.778800783\" style=\"width:20.289ex;height:2.05ex\" loading=\"lazy\" decoding=\"async\"></div></div><div class=\"step\"><h4>Step 3. Multiply by G</h4><p>S = 0.25 × 0.778800783 ≈ 0.194700196 successful frames/frame time.</p></div><div class=\"step\"><h4>Step 4. Convert to percentage</h4><p>0.194700196 × 100 ≈ 19.4700%.</p></div><div class=\"step\"><h4>Step 5. State the maximum separately</h4><p>The maximum is 1/(1e) ≈ 0.367879 = 36.7879%, at G=1.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> S ≈ 0.194700; percentage ≈ 19.4700%; Smax ≈ 0.367879 at G=1.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.</p></aside></div></section>"},{"id":"slotted-2","title":"Slotted ALOHA · load example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. In a Slotted ALOHA system, the offered load is G=1. Find normalized throughput, percentage throughput, and the theoretical maximum. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Protocol = Slotted ALOHA; G = 1 attempts/frame time.</p><h2>To find</h2><p>S, 100S and the maximum possible S.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/01e46e63e1b256b9.svg\" alt=\"S=G e^{-G}\" style=\"width:9.999ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><p>Select the formula from the protocol name. The exponent is −G because Slotted ALOHA has a T vulnerable period.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate the exponent</h4><p>−1 × 1 = -1.</p></div><div class=\"step\"><h4>Step 2. Evaluate the exponential</h4><div class=\"math-display\"><img src=\"math/f3e24ac70fcf4336.svg\" alt=\"e^{-1} \\approx 0.367879441\" style=\"width:18.245ex;height:2.05ex\" loading=\"lazy\" decoding=\"async\"></div></div><div class=\"step\"><h4>Step 3. Multiply by G</h4><p>S = 1 × 0.367879441 ≈ 0.367879441 successful frames/frame time.</p></div><div class=\"step\"><h4>Step 4. Convert to percentage</h4><p>0.367879441 × 100 ≈ 36.7879%.</p></div><div class=\"step\"><h4>Step 5. State the maximum separately</h4><p>The maximum is 1/(1e) ≈ 0.367879 = 36.7879%, at G=1.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> S ≈ 0.367879; percentage ≈ 36.7879%; Smax ≈ 0.367879 at G=1.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.</p></aside></div></section>"},{"id":"slotted-3","title":"Slotted ALOHA · load example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. In a Slotted ALOHA system, the offered load is G=2. Find normalized throughput, percentage throughput, and the theoretical maximum. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Protocol = Slotted ALOHA; G = 2 attempts/frame time.</p><h2>To find</h2><p>S, 100S and the maximum possible S.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/01e46e63e1b256b9.svg\" alt=\"S=G e^{-G}\" style=\"width:9.999ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><p>Select the formula from the protocol name. The exponent is −G because Slotted ALOHA has a T vulnerable period.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate the exponent</h4><p>−1 × 2 = -2.</p></div><div class=\"step\"><h4>Step 2. Evaluate the exponential</h4><div class=\"math-display\"><img src=\"math/6d4c1915157a6bc5.svg\" alt=\"e^{-2} \\approx 0.135335283\" style=\"width:18.245ex;height:2.05ex\" loading=\"lazy\" decoding=\"async\"></div></div><div class=\"step\"><h4>Step 3. Multiply by G</h4><p>S = 2 × 0.135335283 ≈ 0.270670566 successful frames/frame time.</p></div><div class=\"step\"><h4>Step 4. Convert to percentage</h4><p>0.270670566 × 100 ≈ 27.0671%.</p></div><div class=\"step\"><h4>Step 5. State the maximum separately</h4><p>The maximum is 1/(1e) ≈ 0.367879 = 36.7879%, at G=1.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> S ≈ 0.270671; percentage ≈ 27.0671%; Smax ≈ 0.367879 at G=1.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.</p></aside></div></section>"},{"id":"rate-1","title":"Frames/s to throughput · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A Pure ALOHA channel carries 200-bit frames at 200 kbps. The aggregate attempt rate is 1000 frames/s. Find frame time, offered load, normalized throughput, successful frames/s and successful frame bit rate. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>200 bits</td></tr><tr><td>R</td><td>200 kbps = 200,000 bits/s</td></tr><tr><td>λ</td><td>1000 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 200/200,000 = 0.001 s = 1 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 1000 × 0.001 = 1 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−2G = -2; e to that power ≈ 0.135335283.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 1 × 0.135335283 ≈ 0.135335283.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.135335283/0.001 ≈ 135.335283 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.135335283 × 200,000 ≈ 27067.056647 bits/s ≈ 27.067057 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=1, S≈0.135335, successful rate≈135.335 frames/s = 27.067 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 1000 attempts/s; collisions reduce the delivered frame rate to about 135.335/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside></div></section>"},{"id":"rate-2","title":"Frames/s to throughput · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A Pure ALOHA channel carries 200-bit frames at 200 kbps. The aggregate attempt rate is 500 frames/s. Find frame time, offered load, normalized throughput, successful frames/s and successful frame bit rate. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>200 bits</td></tr><tr><td>R</td><td>200 kbps = 200,000 bits/s</td></tr><tr><td>λ</td><td>500 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 200/200,000 = 0.001 s = 1 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 500 × 0.001 = 0.5 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−2G = -1; e to that power ≈ 0.367879441.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 0.5 × 0.367879441 ≈ 0.183939721.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.183939721/0.001 ≈ 183.939721 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.183939721 × 200,000 ≈ 36787.944117 bits/s ≈ 36.787944 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=0.5, S≈0.183940, successful rate≈183.940 frames/s = 36.788 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 500 attempts/s; collisions reduce the delivered frame rate to about 183.940/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside></div></section>"},{"id":"rate-3","title":"Frames/s to throughput · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A Pure ALOHA channel carries 200-bit frames at 200 kbps. The aggregate attempt rate is 250 frames/s. Find frame time, offered load, normalized throughput, successful frames/s and successful frame bit rate. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>200 bits</td></tr><tr><td>R</td><td>200 kbps = 200,000 bits/s</td></tr><tr><td>λ</td><td>250 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 200/200,000 = 0.001 s = 1 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 250 × 0.001 = 0.25 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−2G = -0.5; e to that power ≈ 0.606530660.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 0.25 × 0.606530660 ≈ 0.151632665.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.151632665/0.001 ≈ 151.632665 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.151632665 × 200,000 ≈ 30326.532986 bits/s ≈ 30.326533 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=0.25, S≈0.151633, successful rate≈151.633 frames/s = 30.327 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 250 attempts/s; collisions reduce the delivered frame rate to about 151.633/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside></div></section>"},{"id":"rate-4","title":"Frames/s to throughput · example 4","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A Slotted ALOHA channel carries 400-bit frames at 200 kbps. The aggregate attempt rate is 500 frames/s. Find frame time, offered load, normalized throughput, successful frames/s and successful frame bit rate. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>400 bits</td></tr><tr><td>R</td><td>200 kbps = 200,000 bits/s</td></tr><tr><td>λ</td><td>500 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/01e46e63e1b256b9.svg\" alt=\"S=G e^{-G}\" style=\"width:9.999ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 400/200,000 = 0.002 s = 2 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 500 × 0.002 = 1 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−1G = -1; e to that power ≈ 0.367879441.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 1 × 0.367879441 ≈ 0.367879441.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.367879441/0.002 ≈ 183.939721 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.367879441 × 200,000 ≈ 73575.888234 bits/s ≈ 73.575888 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=1, S≈0.367879, successful rate≈183.940 frames/s = 73.576 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 500 attempts/s; collisions reduce the delivered frame rate to about 183.940/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside></div></section>"},{"id":"rate-5","title":"Frames/s to throughput · example 5","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A Slotted ALOHA channel carries 1600-bit frames at 800 kbps. The aggregate attempt rate is 250 frames/s. Find frame time, offered load, normalized throughput, successful frames/s and successful frame bit rate. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>1600 bits</td></tr><tr><td>R</td><td>800 kbps = 800,000 bits/s</td></tr><tr><td>λ</td><td>250 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/01e46e63e1b256b9.svg\" alt=\"S=G e^{-G}\" style=\"width:9.999ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 1600/800,000 = 0.002 s = 2 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 250 × 0.002 = 0.5 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−1G = -0.5; e to that power ≈ 0.606530660.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 0.5 × 0.606530660 ≈ 0.303265330.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.303265330/0.002 ≈ 151.632665 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.303265330 × 800,000 ≈ 242612.263885 bits/s ≈ 242.612264 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=0.5, S≈0.303265, successful rate≈151.633 frames/s = 242.612 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 250 attempts/s; collisions reduce the delivered frame rate to about 151.633/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside></div></section>"},{"id":"maxima","title":"Why the two maximum throughputs differ","html":"<p>A small offered load leaves many opportunities unused. A very large load creates many collisions. The best point balances those effects.</p><h2>Pure ALOHA</h2><div class=\"math-display\"><img src=\"math/0e9a0d697e50f118.svg\" alt=\"\\frac{dS}{dG}=e^{-2G}(1-2G)\" style=\"width:20.078ex;height:4.726ex\" loading=\"lazy\" decoding=\"async\"></div><ol><li>The exponential is positive. For the slope to be zero, 1−2G must be zero.</li><li>1−2G=0 gives G=0.5.</li><li>Substitute: S=0.5e⁻¹=1/(2e)≈0.18394. The slope is positive before G=0.5 and negative after it.</li></ol><h2>Slotted ALOHA</h2><div class=\"math-display\"><img src=\"math/e448a50c7be7dbba.svg\" alt=\"\\frac{dS}{dG}=e^{-G}(1-G)\" style=\"width:18.147ex;height:4.726ex\" loading=\"lazy\" decoding=\"async\"></div><ol><li>Set 1−G=0, giving G=1.</li><li>Substitute: S=e⁻¹=1/e≈0.367879.</li><li>The slope changes from positive to negative, so this is the maximum.</li></ol><p class=\"memory\"><strong>Yaad rakho:</strong> Pure optimum: G half, maximum half of 1/e. Slotted optimum: G one, maximum 1/e.</p>"}]},{"id":"csma","title":"CSMA, collision detection and avoidance","scope":"Unit 3 · after ALOHA","sections":[{"id":"sense","title":"Carrier sensing: why listening does not remove every collision","html":"<p><strong>Definition.</strong> Carrier Sense Multiple Access (CSMA) requires a station to sense the shared medium before transmitting.</p><p><strong>Simple meaning.</strong> Pehle suno, phir bhejo; lekin door ka signal pahunchne mein time leta hai.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/csma-propagation.df55cdec46.svg\" width=\"820\" height=\"425\" alt=\"An idle observation is only local\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Carrier sensing: why listening does not remove every collision</figcaption></figure><h2>Understand it step by step</h2><ol><li>If the channel is busy, the station follows its waiting/persistence rule. If idle, it may transmit according to that rule.</li><li>The channel state is observed locally. A distant station may have started, but its signal has not arrived yet because propagation takes time.</li><li>Two stations can therefore both observe an idle medium and begin transmitting. CSMA reduces avoidable collisions but does not guarantee zero collisions.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A starts at time 0. B is far away and starts a moment later, before A’s signal reaches it. B heard silence, but the two transmissions can still collide.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Why can collisions occur in CSMA even after a station senses an idle channel? <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Carrier sensing observes the local medium. Because signals have nonzero propagation delay, another station’s new transmission may not yet be detectable. Both stations can then start and their transmissions overlap.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A starts at time 0. B is far away and starts a moment later, before A’s signal reaches it. B heard silence, but the two transmissions can still collide.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Idle yahan hai; remote signal abhi raste mein ho sakta hai.</p>"},{"id":"persistence","title":"1-persistent, non-persistent and p-persistent CSMA","html":"<p><strong>Definition.</strong> Persistence specifies how a station behaves after observing that the medium is busy or becomes idle.</p><p><strong>Simple meaning.</strong> 1 = turant; non = random wait; p = probability ke basis pe start.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/persistence.528dafcd8a.svg\" width=\"820\" height=\"590\" alt=\"CSMA persistence: what happens after carrier sensing?\" loading=\"lazy\" decoding=\"async\"></div><figcaption>1-persistent, non-persistent and p-persistent CSMA</figcaption></figure><h2>Understand it step by step</h2><ol><li>In 1-persistent CSMA, a ready station transmits immediately when idle; when busy it continuously senses. Several waiting stations may all start at the same idle transition.</li><li>In non-persistent CSMA, a busy observation causes a random wait before the next sensing attempt. This reduces simultaneous retries but can waste some idle time.</li><li>In p-persistent CSMA, when an eligible idle slot begins, transmit with probability p. With probability 1−p, defer to a later slot and sense again. The probabilistic decision is repeated, not a one-time discard.</li></ol><table><thead><tr><th scope=\"col\">Rule</th><th scope=\"col\">When idle</th><th scope=\"col\">When busy</th><th scope=\"col\">Trade-off</th></tr></thead><tbody><tr><td>1-persistent</td><td>Transmit immediately</td><td>Keep listening; transmit as soon as idle</td><td>Low idle delay, but waiting stations may start together</td></tr><tr><td>Non-persistent</td><td>Transmit</td><td>Wait a random time, then sense again</td><td>Less synchronized contention; may leave avoidable idle time</td></tr><tr><td>p-persistent (slotted)</td><td>Transmit with probability p; defer a slot with probability 1−p</td><td>Wait until available, then resume the probabilistic slot rule</td><td>Controls contention; needs slots and a choice of p</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>With p=0.25, the station has a 25% chance of transmitting at that idle-slot decision and a 75% chance of deferring. It does not mean it transmits exactly once every four slots.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Compare the three persistence strategies in CSMA. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Rule</th><th scope=\"col\">When idle</th><th scope=\"col\">When busy</th><th scope=\"col\">Trade-off</th></tr></thead><tbody><tr><td>1-persistent</td><td>Transmit immediately</td><td>Keep listening; transmit as soon as idle</td><td>Low idle delay, but waiting stations may start together</td></tr><tr><td>Non-persistent</td><td>Transmit</td><td>Wait a random time, then sense again</td><td>Less synchronized contention; may leave avoidable idle time</td></tr><tr><td>p-persistent (slotted)</td><td>Transmit with probability p; defer a slot with probability 1−p</td><td>Wait until available, then resume the probabilistic slot rule</td><td>Controls contention; needs slots and a choice of p</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>With p=0.25, the station has a 25% chance of transmitting at that idle-slot decision and a 75% chance of deferring. It does not mean it transmits exactly once every four slots.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> 1 = start now; non = wait then listen; p = chance per idle slot.</p>"},{"id":"cd","title":"CSMA/CD: detect a collision while transmitting","html":"<p><strong>Definition.</strong> CSMA with Collision Detection monitors the medium during transmission, aborts a detected collision and retries after a randomized backoff.</p><p><strong>Simple meaning.</strong> CD = takkar detect hui toh transmission rok do.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/collision-roundtrip.42358ec7bf.svg\" width=\"820\" height=\"410\" alt=\"CSMA/CD: sender must still be sending after a round trip\" loading=\"lazy\" decoding=\"async\"></div><figcaption>CSMA/CD: detect a collision while transmitting</figcaption></figure><h2>Understand it step by step</h2><ol><li>Sense the channel. In traditional shared half-duplex Ethernet, begin transmission when permitted by the access rule.</li><li>Continue monitoring while transmitting. If a collision is detected, send the collision/jam indication and abort the current frame.</li><li>Choose a random delay using binary exponential backoff; then attempt again subject to the access rules.</li><li>The sender must still be transmitting when a worst-case collision indication returns. Hence the ideal timing requirement is Tframe ≥ 2Tp.</li><li>Modern switched full-duplex Ethernet links do not use collision-based CSMA/CD access. Keep the historical/shared-medium assumptions explicit.</li></ol><div class=\"math-display\"><img src=\"math/4f522413155daf19.svg\" alt=\"T_{\\mathrm{frame}}\\geq 2T_p\" style=\"width:11.931ex;height:2.181ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/eae5a57f0575ef7d.svg\" alt=\"L_{\\min}\\geq 2RT_p\" style=\"width:12.575ex;height:2.195ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>On a shared half-duplex Ethernet segment, a station that detects a collision stops sending the remaining frame bits, saving time compared with completing a corrupted long frame.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain CSMA/CD and the reason for a minimum frame size. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>CSMA/CD senses before transmission and detects collisions during transmission. A collision causes abort/jam and a random backoff before retry. To detect the most distant collision before the frame finishes, the transmission duration must be at least the worst-case round-trip propagation delay. Thus Lmin/R ≥ 2Tp in the idealized model.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>On a shared half-duplex Ethernet segment, a station that detects a collision stops sending the remaining frame bits, saving time compared with completing a corrupted long frame.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Detect karna hai toh sender tab tak bhej raha hona chahiye.</p>"},{"id":"minframe-1","title":"Collision detection · minimum size 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. For an ideal CSMA/CD link, the data rate is 10 Mbps and the maximum one-way propagation delay is 25.6 μs. Find the minimum theoretical frame length in bits and whole bytes. Ignore additional device delays. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>R=10 Mbps; Tp=25.6 μs.</p><h2>To find</h2><p>Lmin in bits and the minimum whole-byte length.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/dc84d9f4c66a26e3.svg\" alt=\"L_{\\min}=\\lceil 2RT_p\\rceil\" style=\"width:14.584ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>The frame must last at least a round trip. Convert Mbps to bits/s and μs to seconds before multiplying.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Convert the quantities</h4><p>R=10,000,000 bits/s; Tp=0.0000256 s.</p></div><div class=\"step\"><h4>Step 2. Find round-trip delay</h4><p>2Tp=2×25.6=51.2 μs.</p></div><div class=\"step\"><h4>Step 3. Multiply rate by duration</h4><p>Lmin=2×10,000,000×0.0000256=512 bits.</p></div><div class=\"step\"><h4>Step 4. Convert bits to whole bytes</h4><p>512/8=64; round upward if needed → 64 bytes.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 512 bits, or at least 64 whole bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>This is the theoretical timing bound for the stated link. If the question specifically asks for a standardized Ethernet minimum, its format constraints also apply; do not replace the standard by a smaller theoretical result.</p></aside></div></section>"},{"id":"minframe-2","title":"Collision detection · minimum size 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. For an ideal CSMA/CD link, the data rate is 100 Mbps and the maximum one-way propagation delay is 2 μs. Find the minimum theoretical frame length in bits and whole bytes. Ignore additional device delays. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>R=100 Mbps; Tp=2 μs.</p><h2>To find</h2><p>Lmin in bits and the minimum whole-byte length.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/dc84d9f4c66a26e3.svg\" alt=\"L_{\\min}=\\lceil 2RT_p\\rceil\" style=\"width:14.584ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>The frame must last at least a round trip. Convert Mbps to bits/s and μs to seconds before multiplying.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Convert the quantities</h4><p>R=100,000,000 bits/s; Tp=0.000002 s.</p></div><div class=\"step\"><h4>Step 2. Find round-trip delay</h4><p>2Tp=2×2=4 μs.</p></div><div class=\"step\"><h4>Step 3. Multiply rate by duration</h4><p>Lmin=2×100,000,000×0.000002=400 bits.</p></div><div class=\"step\"><h4>Step 4. Convert bits to whole bytes</h4><p>400/8=50; round upward if needed → 50 bytes.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 400 bits, or at least 50 whole bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>This is the theoretical timing bound for the stated link. If the question specifically asks for a standardized Ethernet minimum, its format constraints also apply; do not replace the standard by a smaller theoretical result.</p></aside></div></section>"},{"id":"minframe-3","title":"Collision detection · minimum size 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. For an ideal CSMA/CD link, the data rate is 10 Mbps and the maximum one-way propagation delay is 10 μs. Find the minimum theoretical frame length in bits and whole bytes. Ignore additional device delays. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>R=10 Mbps; Tp=10 μs.</p><h2>To find</h2><p>Lmin in bits and the minimum whole-byte length.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/dc84d9f4c66a26e3.svg\" alt=\"L_{\\min}=\\lceil 2RT_p\\rceil\" style=\"width:14.584ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>The frame must last at least a round trip. Convert Mbps to bits/s and μs to seconds before multiplying.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Convert the quantities</h4><p>R=10,000,000 bits/s; Tp=0.00001 s.</p></div><div class=\"step\"><h4>Step 2. Find round-trip delay</h4><p>2Tp=2×10=20 μs.</p></div><div class=\"step\"><h4>Step 3. Multiply rate by duration</h4><p>Lmin=2×10,000,000×0.00001=200 bits.</p></div><div class=\"step\"><h4>Step 4. Convert bits to whole bytes</h4><p>200/8=25; round upward if needed → 25 bytes.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 200 bits, or at least 25 whole bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>This is the theoretical timing bound for the stated link. If the question specifically asks for a standardized Ethernet minimum, its format constraints also apply; do not replace the standard by a smaller theoretical result.</p></aside></div></section>"},{"id":"backoff","title":"Binary exponential backoff","html":"<p><strong>Definition.</strong> Binary exponential backoff enlarges the range of possible random waiting slots after repeated collisions, reducing the chance of the same stations colliding again.</p><p><strong>Simple meaning.</strong> Collision zyada → random wait ka range bada.</p><h2>Understand it step by step</h2><ol><li>Let n be the collision count for the current frame. In classic Ethernet, use k=min(n,10).</li><li>Choose an integer K uniformly from 0 through 2ᵏ−1. Both endpoints belong to the range.</li><li>Wait K slot times before the permitted retry. A larger range does not force every station to wait longer; K may still be zero.</li><li>For classic 10/100 Mbps half-duplex Ethernet, one slot is 512 bit times. Use the slot duration provided in the question if one is given.</li></ol><div class=\"math-display\"><img src=\"math/0f0e79cc7f4deaac.svg\" alt=\"k=\\min(n,10),\\qquad K\\in\\{0,1,\\ldots,2^k-1\\}\" style=\"width:41.283ex;height:2.61ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/b5a8dc2b6f87ba95.svg\" alt=\"T_{\\mathrm{backoff}}=K T_{\\mathrm{slot}}\" style=\"width:15.673ex;height:1.902ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>After the third collision, k=3 and K may be 0,1,2,3,4,5,6,7. If K=5 and one slot is 51.2 μs, the delay is 256 μs.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Describe binary exponential backoff and give the possible K values after three collisions. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A station selects a random integer K from an expanding window and waits K slot times before retrying. After n collisions, classic Ethernet uses k=min(n,10) and 0≤K≤2ᵏ−1. After three collisions the possible values are 0 through 7.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>After the third collision, k=3 and K may be 0,1,2,3,4,5,6,7. If K=5 and one slot is 51.2 μs, the delay is 256 μs.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> 2ᵏ choices hain, isliye last value 2ᵏ−1.</p>"},{"id":"backoff-1","title":"Backoff · example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A station has experienced 2 collisions for its current frame. It selects K=3; one slot lasts 51.2 μs. Under binary exponential backoff, find the allowed K range and the selected delay. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>n=2; K=3; Tslot=51.2 μs.</p><h2>To find</h2><p>The random range and the delay for the selected K.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/c06068d72176a7c3.svg\" alt=\"k=\\min(n,10),\\quad K_{\\max}=2^k-1\" style=\"width:31.774ex;height:2.61ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/9da1be02953867d3.svg\" alt=\"T=KT_{\\mathrm{slot}}\" style=\"width:10.627ex;height:1.902ex\" loading=\"lazy\" decoding=\"async\"></div><p>Count starts at zero for K. The selected K must fit the allowed range.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Determine exponent</h4><p>k=min(2,10)=2.</p></div><div class=\"step\"><h4>Step 2. Find the range</h4><p>2<sup>2</sup>=4; largest K=4−1=3. Range: 0 to 3.</p></div><div class=\"step\"><h4>Step 3. Validate selected K</h4><p>3 is within 0…3.</p></div><div class=\"step\"><h4>Step 4. Calculate delay</h4><p>3×51.2=153.6 μs.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> K may be 0…3; selected delay=153.6 μs.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The range is not the actual delay. Use the stated selected K to calculate the delay.</p></aside></div></section>"},{"id":"backoff-2","title":"Backoff · example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A station has experienced 3 collisions for its current frame. It selects K=5; one slot lasts 51.2 μs. Under binary exponential backoff, find the allowed K range and the selected delay. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>n=3; K=5; Tslot=51.2 μs.</p><h2>To find</h2><p>The random range and the delay for the selected K.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/c06068d72176a7c3.svg\" alt=\"k=\\min(n,10),\\quad K_{\\max}=2^k-1\" style=\"width:31.774ex;height:2.61ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/9da1be02953867d3.svg\" alt=\"T=KT_{\\mathrm{slot}}\" style=\"width:10.627ex;height:1.902ex\" loading=\"lazy\" decoding=\"async\"></div><p>Count starts at zero for K. The selected K must fit the allowed range.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Determine exponent</h4><p>k=min(3,10)=3.</p></div><div class=\"step\"><h4>Step 2. Find the range</h4><p>2<sup>3</sup>=8; largest K=8−1=7. Range: 0 to 7.</p></div><div class=\"step\"><h4>Step 3. Validate selected K</h4><p>5 is within 0…7.</p></div><div class=\"step\"><h4>Step 4. Calculate delay</h4><p>5×51.2=256 μs.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> K may be 0…7; selected delay=256 μs.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The range is not the actual delay. Use the stated selected K to calculate the delay.</p></aside></div></section>"},{"id":"backoff-3","title":"Backoff · example 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A station has experienced 5 collisions for its current frame. It selects K=17; one slot lasts 5.12 μs. Under binary exponential backoff, find the allowed K range and the selected delay. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>n=5; K=17; Tslot=5.12 μs.</p><h2>To find</h2><p>The random range and the delay for the selected K.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/c06068d72176a7c3.svg\" alt=\"k=\\min(n,10),\\quad K_{\\max}=2^k-1\" style=\"width:31.774ex;height:2.61ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/9da1be02953867d3.svg\" alt=\"T=KT_{\\mathrm{slot}}\" style=\"width:10.627ex;height:1.902ex\" loading=\"lazy\" decoding=\"async\"></div><p>Count starts at zero for K. The selected K must fit the allowed range.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Determine exponent</h4><p>k=min(5,10)=5.</p></div><div class=\"step\"><h4>Step 2. Find the range</h4><p>2<sup>5</sup>=32; largest K=32−1=31. Range: 0 to 31.</p></div><div class=\"step\"><h4>Step 3. Validate selected K</h4><p>17 is within 0…31.</p></div><div class=\"step\"><h4>Step 4. Calculate delay</h4><p>17×5.12=87.04 μs.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> K may be 0…31; selected delay=87.04 μs.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The range is not the actual delay. Use the stated selected K to calculate the delay.</p></aside></div></section>"},{"id":"ca","title":"CSMA/CA: reduce collision risk before sending","html":"<p><strong>Definition.</strong> CSMA with Collision Avoidance uses carrier sensing and randomized access delays, with acknowledgements and optional reservation exchanges, to reduce collisions on a wireless shared medium.</p><p><strong>Simple meaning.</strong> CA = pehle collision avoid karne ki koshish; guarantee nahi.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ca-sequence.566280e50f.svg\" width=\"820\" height=\"490\" alt=\"CSMA/CA: optional reservation, data, acknowledgement\" loading=\"lazy\" decoding=\"async\"></div><figcaption>CSMA/CA: reduce collision risk before sending</figcaption></figure><h2>Understand it step by step</h2><ol><li>A wireless station senses the medium and follows the required interframe waiting and contention rules.</li><li>A random backoff counter counts down in eligible idle slots and freezes while the medium is busy. It resumes when permitted; it is not continuously counted through someone else’s transmission.</li><li>When its counter reaches zero, it transmits. A unicast receiver normally sends an ACK after successful reception. Missing ACK triggers retry logic.</li><li>RTS/CTS is an optional reservation exchange. Stations hearing reservation information defer for the indicated duration. It can reduce hidden-terminal data collisions but adds overhead.</li><li>Wireless stations cannot generally rely on Ethernet-style collision detection while transmitting. Collision avoidance does not eliminate all losses or collisions.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Two laptops using one Wi-Fi channel contend for access. Random backoff reduces simultaneous starts; an ACK lets the sender know a unicast frame was received.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain CSMA/CA and distinguish it from CSMA/CD. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Aspect</th><th scope=\"col\">CSMA/CD</th><th scope=\"col\">CSMA/CA</th></tr></thead><tbody><tr><td>Main action</td><td>Detect and abort a collision during sending</td><td>Reduce collision risk before sending</td></tr><tr><td>Typical teaching context</td><td>Shared half-duplex wired Ethernet</td><td>Wi-Fi contention access</td></tr><tr><td>Mechanisms</td><td>Carrier sensing, detection/jam, backoff</td><td>Carrier sensing, random backoff, ACK; optional RTS/CTS</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>Two laptops using one Wi-Fi channel contend for access. Random backoff reduces simultaneous starts; an ACK lets the sender know a unicast frame was received.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> CD = detect during; CA = avoid before.</p>"},{"id":"hidden","title":"Hidden terminals and RTS/CTS","html":"<p><strong>Definition.</strong> Hidden terminals are stations that cannot sense each other but whose transmissions can interfere at a common receiver.</p><p><strong>Simple meaning.</strong> A aur C ek dusre ko nahi sunte, par dono B ko bhej rahe hain.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/hidden-terminal.1ffcf794d5.svg\" width=\"820\" height=\"330\" alt=\"Hidden terminals: A and C cannot sense each other\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Hidden terminals and RTS/CTS</figcaption></figure><h2>Understand it step by step</h2><ol><li>Suppose A and C are outside each other’s sensing range, but B can receive both.</li><li>A senses no signal from C and may transmit; C may make the same decision. Their frames can collide at B.</li><li>With optional RTS/CTS, A first sends a short RTS to B. B replies CTS, which C can hear. C defers for the reservation duration.</li><li>RTS frames can themselves collide and wireless conditions still matter. Describe RTS/CTS as mitigation, not an absolute guarantee.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Access points can hear devices at opposite ends of a room even when those devices cannot hear one another clearly. The access point’s CTS can inform both sides about a reservation.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain the hidden-terminal problem and how RTS/CTS helps. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A and C may both reach B but be unable to sense one another. Simultaneous transmissions can then collide at B. A short RTS followed by B’s CTS announces a reservation; a station hearing the CTS defers, reducing the risk of a long data-frame collision.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Access points can hear devices at opposite ends of a room even when those devices cannot hear one another clearly. The access point’s CTS can inform both sides about a reservation.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Hidden: senders invisible to each other, receiver common.</p>"}]},{"id":"switching","title":"Switching techniques","scope":"Unit 4 · Network Layer","sections":[{"id":"types","title":"Circuit, message and packet switching","html":"<p><strong>Definition.</strong> Switching selects how data passes through intermediate network nodes from a source to a destination.</p><p><strong>Simple meaning.</strong> Raasta reserve karna, poora message ruk-ruk ke bhejna, ya chhote packets bhejna—yeh teen ideas hain.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/switching.2b51f856d9.svg\" width=\"820\" height=\"425\" alt=\"Three switching techniques: what is forwarded?\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Circuit, message and packet switching</figcaption></figure><h2>Understand it step by step</h2><ol><li><strong>Circuit switching:</strong> establish a circuit, reserve resources, transfer data, then release the circuit. Capacity is dedicated even during a silent period.</li><li><strong>Message switching:</strong> each intermediate node receives the entire message before forwarding it. Large messages require large buffers and can delay later messages.</li><li><strong>Packet switching:</strong> divide data into smaller packets. Nodes forward packets individually; different links can carry successive packets at the same time.</li><li>The Internet uses packet switching. A traditional circuit-switched telephone call illustrates the circuit concept. Many current calls use packet-based networks, so do not label every phone call circuit-switched.</li></ol><table><thead><tr><th scope=\"col\">Aspect</th><th scope=\"col\">Circuit switching</th><th scope=\"col\">Message switching</th><th scope=\"col\">Packet switching</th></tr></thead><tbody><tr><td>Unit handled</td><td>Continuous stream on established circuit</td><td>Whole message</td><td>Small packets</td></tr><tr><td>Resource use</td><td>Capacity reserved along a circuit</td><td>Shared; message stored at each intermediate node</td><td>Shared; each packet stored/forwarded in this model</td></tr><tr><td>Setup</td><td>Required before data transfer</td><td>No circuit setup required</td><td>Datagram: no connection setup; virtual circuit: setup</td></tr><tr><td>Delay</td><td>Setup delay, then relatively predictable service</td><td>Large store-and-forward delay for long messages</td><td>Variable delay; packet pipeline can reduce completion time</td></tr><tr><td>Main limitation</td><td>Reserved capacity can be idle</td><td>Large buffers; unsuitable for tight delay needs</td><td>Headers, possible queueing/loss; datagrams may reorder</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A campus transferring web pages and files has bursty traffic. Packet switching allows multiple users to share link capacity instead of reserving a circuit that remains idle between bursts.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Compare circuit, message and packet switching and recommend a method for bursty office data. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Aspect</th><th scope=\"col\">Circuit switching</th><th scope=\"col\">Message switching</th><th scope=\"col\">Packet switching</th></tr></thead><tbody><tr><td>Unit handled</td><td>Continuous stream on established circuit</td><td>Whole message</td><td>Small packets</td></tr><tr><td>Resource use</td><td>Capacity reserved along a circuit</td><td>Shared; message stored at each intermediate node</td><td>Shared; each packet stored/forwarded in this model</td></tr><tr><td>Setup</td><td>Required before data transfer</td><td>No circuit setup required</td><td>Datagram: no connection setup; virtual circuit: setup</td></tr><tr><td>Delay</td><td>Setup delay, then relatively predictable service</td><td>Large store-and-forward delay for long messages</td><td>Variable delay; packet pipeline can reduce completion time</td></tr><tr><td>Main limitation</td><td>Reserved capacity can be idle</td><td>Large buffers; unsuitable for tight delay needs</td><td>Headers, possible queueing/loss; datagrams may reorder</td></tr></tbody></table><p>For ordinary bursty office data, packet switching is generally appropriate because resources are shared among active transfers. The design must still account for queueing, loss and the required service quality.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A campus transferring web pages and files has bursty traffic. Packet switching allows multiple users to share link capacity instead of reserving a circuit that remains idle between bursts.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Circuit reserves; message waits whole; packets pipeline.</p>"},{"id":"datagram","title":"Datagram versus virtual-circuit packet switching","html":"<p><strong>Definition.</strong> Datagram switching routes each packet independently; virtual-circuit switching first establishes a logical path and forwarding state for a flow.</p><p><strong>Simple meaning.</strong> Datagram mein har packet ka decision; virtual circuit mein pehle logical route set.</p><h2>Understand it step by step</h2><ol><li>In a datagram network, each packet carries enough destination information for independent forwarding. Packets may take different routes as forwarding conditions change.</li><li>In a virtual-circuit network, a setup phase establishes a logical path. Packets normally carry a short connection identifier meaningful to that network.</li><li>A virtual circuit is not automatically a physical dedicated circuit. Capacity can still be shared with other virtual circuits.</li><li>Ordering and service guarantees depend on the actual protocol. Do not assume that merely saying “virtual circuit” guarantees loss-free delivery.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>IP illustrates datagram service: a router forwards each received packet using its forwarding table. A textbook virtual-circuit example is an ATM connection.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Differentiate datagram and virtual-circuit packet switching. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">Datagram</th><th scope=\"col\">Virtual circuit</th></tr></thead><tbody><tr><td>Setup</td><td>Usually none at network layer</td><td>Logical connection setup</td></tr><tr><td>Forwarding information</td><td>Destination address</td><td>Virtual-circuit identifier</td></tr><tr><td>Router state</td><td>No per-connection state required for basic IP forwarding</td><td>Connection/path state maintained</td></tr><tr><td>Path</td><td>May vary</td><td>Established logical path until changed</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>IP illustrates datagram service: a router forwards each received packet using its forwarding table. A textbook virtual-circuit example is an ATM connection.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Virtual circuit bhi packet switching ho sakta hai.</p>"},{"id":"pipeline","title":"Store-and-forward and pipelining","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><p><strong>Definition.</strong> Store-and-forward requires a node to receive the complete forwarding unit before sending it onward; pipelining allows successive units to occupy different links simultaneously.</p><p><strong>Simple meaning.</strong> Pehla packet next link pe jaa raha hai, tab doosra packet first link pe aa sakta hai.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/pipeline.a023f04605.svg\" width=\"820\" height=\"410\" alt=\"Packet pipeline: successive packets use different links\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Store-and-forward and pipelining</figcaption></figure><h2>Understand it step by step</h2><ol><li>With message switching, the whole message is the forwarding unit. On h equal-rate links, a message of M bits needs hM/R seconds of serialization.</li><li>With k equal packets, the first packet needs h packet-transmission times to cross h links. Each later packet then emerges one packet-transmission time later under ideal equal-rate conditions.</li><li>Thus k packets of L bits take (h+k−1)L/R plus all link propagation delays. This assumes no losses, no queueing, negligible processing, equal packet sizes and equal rates.</li><li>Count links, not routers: three intermediate routers between source and destination create four links. Include packet headers in L if the question supplies them.</li></ol><div class=\"math-display\"><img src=\"math/88eb2b8ca0c2e1fd.svg\" alt=\"T_{\\mathrm{message}}=hM/R+h\\tau\" style=\"width:21.908ex;height:2.366ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/209da411e5cae6a2.svg\" alt=\"T_{\\mathrm{packet}}=(h+k-1)L/R+h\\tau\" style=\"width:29.636ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>A three-link path can simultaneously carry packet 1 on the third link, packet 2 on the second, and packet 3 on the first. The frames are not all transmitted on one link at the same instant.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain why packet switching can deliver a large message faster than message switching. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Packet switching can pipeline smaller units across successive links. After the first packet is forwarded, the next packet can use an earlier link while the first uses a later link. Whole-message store-and-forward must receive the entire message at each node, preventing that packet-level pipeline.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A three-link path can simultaneously carry packet 1 on the third link, packet 2 on the second, and packet 3 on the first. The frames are not all transmitted on one link at the same instant.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> First packet h times; remaining packets one time each.</p>"},{"id":"delay-1","title":"Compare completion times · example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A 12,000-bit message crosses 3 links, each 1 Mbps with 2 ms propagation delay. Compare whole-message switching, packet switching using 6 equal packets without headers, and a circuit with 10 ms setup. Ignore processing and queueing. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Given</th><th scope=\"col\">Value</th></tr></thead><tbody><tr><td>M</td><td>12000 bits</td></tr><tr><td>h</td><td>3</td></tr><tr><td>k</td><td>6</td></tr><tr><td>R</td><td>1,000,000 bits/s</td></tr><tr><td>τ</td><td>0.002 s/link</td></tr><tr><td>Circuit setup</td><td>0.01 s</td></tr></tbody></table><h2>To find</h2><p>Time until the final data bit reaches the destination in each method.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/9a18147a7dd3f73d.svg\" alt=\"T_m=hM/R+h\\tau\" style=\"width:17.699ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/2fccb0c108e66b5b.svg\" alt=\"T_p=(h+k-1)L/R+h\\tau\" style=\"width:25.863ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/59666d3c7abd8bb9.svg\" alt=\"T_c=T_{\\mathrm{setup}}+M/R+h\\tau\" style=\"width:23.7ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>Message switching repeats whole-message serialization at every hop. Packet switching pipelines equal packets. A circuit streams bits through the established equal-rate path.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Find packet size</h4><p>L=M/k=12000/6=2000 bits.</p></div><div class=\"step\"><h4>Step 2. Whole-message completion</h4><p>3×12000/1,000,000 + 3×0.002 = 0.042000 s = 42 ms.</p></div><div class=\"step\"><h4>Step 3. One packet transmission time</h4><p>L/R=2000/1,000,000=0.002 s.</p></div><div class=\"step\"><h4>Step 4. Pipelined packet completion</h4><p>(3+6−1)×0.002+3×0.002=0.022000 s = 22 ms.</p></div><div class=\"step\"><h4>Step 5. Circuit completion</h4><p>0.01+12000/1,000,000+3×0.002=0.028000 s = 28 ms.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Message=42 ms; packets=22 ms; circuit=28 ms.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>These values depend on the given setup, rates and ideal pipeline. Do not claim that one technique is always faster in every network.</p></aside></div></section>"},{"id":"delay-2","title":"Compare completion times · example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A 8,000-bit message crosses 2 links, each 1 Mbps with 1 ms propagation delay. Compare whole-message switching, packet switching using 4 equal packets without headers, and a circuit with 5 ms setup. Ignore processing and queueing. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Given</th><th scope=\"col\">Value</th></tr></thead><tbody><tr><td>M</td><td>8000 bits</td></tr><tr><td>h</td><td>2</td></tr><tr><td>k</td><td>4</td></tr><tr><td>R</td><td>1,000,000 bits/s</td></tr><tr><td>τ</td><td>0.001 s/link</td></tr><tr><td>Circuit setup</td><td>0.005 s</td></tr></tbody></table><h2>To find</h2><p>Time until the final data bit reaches the destination in each method.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/9a18147a7dd3f73d.svg\" alt=\"T_m=hM/R+h\\tau\" style=\"width:17.699ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/2fccb0c108e66b5b.svg\" alt=\"T_p=(h+k-1)L/R+h\\tau\" style=\"width:25.863ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/59666d3c7abd8bb9.svg\" alt=\"T_c=T_{\\mathrm{setup}}+M/R+h\\tau\" style=\"width:23.7ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>Message switching repeats whole-message serialization at every hop. Packet switching pipelines equal packets. A circuit streams bits through the established equal-rate path.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Find packet size</h4><p>L=M/k=8000/4=2000 bits.</p></div><div class=\"step\"><h4>Step 2. Whole-message completion</h4><p>2×8000/1,000,000 + 2×0.001 = 0.018000 s = 18 ms.</p></div><div class=\"step\"><h4>Step 3. One packet transmission time</h4><p>L/R=2000/1,000,000=0.002 s.</p></div><div class=\"step\"><h4>Step 4. Pipelined packet completion</h4><p>(2+4−1)×0.002+2×0.001=0.012000 s = 12 ms.</p></div><div class=\"step\"><h4>Step 5. Circuit completion</h4><p>0.005+8000/1,000,000+2×0.001=0.015000 s = 15 ms.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Message=18 ms; packets=12 ms; circuit=15 ms.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>These values depend on the given setup, rates and ideal pipeline. Do not claim that one technique is always faster in every network.</p></aside></div></section>"},{"id":"headers","title":"Packet pipeline with header overhead","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A 12,000-bit message is divided into 1,000-bit payloads. Each packet adds a 100-bit header. Packets cross four store-and-forward links of 1 Mbps, with 1 ms propagation per link. Find packet count, transmitted bits per packet, total bits sent on one link and final completion time. Ignore queueing and processing. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>M=12,000 bits; payload=1,000 bits; header=100 bits; h=4; R=1,000,000 bits/s; τ=0.001 s.</p><h2>To find</h2><p>k, L, total serialized bits on one link and completion time.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/cf2d3cfa77719992.svg\" alt=\"k=M/P,\\quad L=P+H\" style=\"width:23.704ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/a1dee7ec7d280062.svg\" alt=\"T=(h+k-1)L/R+h\\tau\" style=\"width:25.142ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>The payload determines packet count; payload plus header determines packet transmission time.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count packets</h4><p>k=12,000/1,000=12.</p></div><div class=\"step\"><h4>Step 2. Add the header to each packet</h4><p>L=1,000+100=1,100 bits.</p></div><div class=\"step\"><h4>Step 3. Count all bits sent on one link</h4><p>12×1,100=13,200 bits, of which 1,200 are headers.</p></div><div class=\"step\"><h4>Step 4. Find one packet time</h4><p>1,100/1,000,000=0.0011 s.</p></div><div class=\"step\"><h4>Step 5. Apply the pipeline</h4><p>(4+12−1)×0.0011+4×0.001=0.0205 s=20.5 ms.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 12 packets; 1,100 bits each; 13,200 bits on one link; completion=20.5 ms.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Packet headers consume link capacity. Ignoring them gives an unrealistically small completion time for this question.</p></aside></div></section>"}]},{"id":"ipv4","title":"IPv4: understand the address before subnetting","scope":"Unit 4 · IPv4 addressing","sections":[{"id":"structure","title":"IPv4 addresses: four octets, one 32-bit value","html":"<p><strong>Definition.</strong> An IPv4 address is a 32-bit logical address, conventionally written as four decimal octets separated by dots.</p><p><strong>Simple meaning.</strong> IP ke chaar boxes hain; har box 8 bits ka, value 0 se 255.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ipv4-prefix.d99075bfca.svg\" width=\"820\" height=\"315\" alt=\"IPv4 /26: 26 network bits and 6 host bits\" loading=\"lazy\" decoding=\"async\"></div><figcaption>IPv4 addresses: four octets, one 32-bit value</figcaption></figure><h2>Understand it step by step</h2><ol><li>An octet contains eight bits. Its smallest value is 00000000₂=0 and its largest is 11111111₂=255.</li><li>An address such as 192.168.10.77 has four octets. The dots are separators, not decimal points in a single decimal fraction.</li><li>A prefix such as /26 says how many leftmost bits identify the network. The remaining 32−26=6 bits identify positions inside that address block.</li><li>The address alone does not give a classless subnet boundary. 192.168.10.77/24 and 192.168.10.77/26 belong to differently sized blocks.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A college can assign 192.168.10.77/26 to a lab device. The prefix identifies which nearby addresses are considered on the same subnet.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain dotted-decimal IPv4 notation and the meaning of /26. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>IPv4 contains 32 bits, written as four decimal octets of 8 bits each. Each octet ranges from 0 to 255. In /26 notation, 26 leading bits are the network prefix and 6 trailing bits are available within the block, giving 2⁶=64 total addresses.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A college can assign 192.168.10.77/26 to a lab device. The prefix identifies which nearby addresses are considered on the same subnet.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> 4 octets × 8 bits = 32; slash = network bits.</p>"},{"id":"classes","title":"Classful addressing: historical default boundaries","html":"<p><strong>Definition.</strong> Classful addressing divides the IPv4 address space into historical classes with fixed default network boundaries for Classes A, B and C.</p><p><strong>Simple meaning.</strong> Class first octet se; modern subnet given slash se.</p><h2>Understand it step by step</h2><ol><li>Historically, Class A used /8, Class B /16 and Class C /24 by default. These defaults are not used to override an explicitly supplied CIDR prefix.</li><li>Class D addresses identify multicast groups; Class E is reserved/experimental space rather than an ordinary unicast class.</li><li>Not all numerically class-shaped addresses can be assigned to normal hosts. For example, 127/8 is loopback and 0/8 has special meanings.</li><li>In a classless question, use the stated /p. An address that looks Class C can be part of a /26 subnet.</li></ol><table><thead><tr><th scope=\"col\">Class</th><th scope=\"col\">First octet</th><th scope=\"col\">Default / purpose</th></tr></thead><tbody><tr><td>A</td><td>0–127; ordinary historical assignments 1–126</td><td>/8; special ranges exist</td></tr><tr><td>B</td><td>128–191</td><td>/16</td></tr><tr><td>C</td><td>192–223</td><td>/24</td></tr><tr><td>D</td><td>224–239</td><td>Multicast</td></tr><tr><td>E</td><td>240–255</td><td>Reserved/experimental; special addresses exist</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>200.140.64.48 falls in the historical Class C first-octet range. If the question gives /26, use /26, not the Class C default /24.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. State the default prefixes of Classes A, B and C and explain their relation to CIDR. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Historical defaults are /8 for A, /16 for B and /24 for C. CIDR explicitly supplies the prefix length and supports variable-sized blocks. Therefore an explicit CIDR prefix takes precedence over a historical class default.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>200.140.64.48 falls in the historical Class C first-octet range. If the question gives /26, use /26, not the Class C default /24.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Class pehchaan sakte ho; calculation mein given slash follow karo.</p>"},{"id":"special","title":"Private, loopback and special IPv4 addresses","html":"<p><strong>Definition.</strong> Private IPv4 ranges are address blocks reserved for use within private networks rather than ordinary public Internet routing.</p><p><strong>Simple meaning.</strong> Private IP ghar/college ke andar reuse ho sakta hai; globally unique public IP jaisa treat mat karo.</p><h2>Understand it step by step</h2><ol><li>The RFC 1918 private blocks are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. The 172 block ends at 172.31.255.255, not 172.255.255.255.</li><li>127.0.0.0/8 is loopback; 127.0.0.1 commonly refers to the local host itself.</li><li>169.254.0.0/16 is IPv4 link-local space. It is not one of the three RFC 1918 private blocks.</li><li>255.255.255.255 is a limited broadcast address. A subnet-directed broadcast has all its host bits set to 1.</li><li>A network address has all host bits 0. In an ordinary broadcast subnet, the all-zero and all-one host patterns are not assigned to ordinary unicast hosts.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>172.20.1.5 is inside 172.16/12; 172.40.1.5 is outside it. Treating every address beginning with 172 as private would be wrong.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. List the three private IPv4 address ranges and give an example. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Prefix</th><th scope=\"col\">Range</th></tr></thead><tbody><tr><td>10.0.0.0/8</td><td>10.0.0.0–10.255.255.255</td></tr><tr><td>172.16.0.0/12</td><td>172.16.0.0–172.31.255.255</td></tr><tr><td>192.168.0.0/16</td><td>192.168.0.0–192.168.255.255</td></tr></tbody></table><p>For example, 192.168.1.10 can be used in a private LAN.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>172.20.1.5 is inside 172.16/12; 172.40.1.5 is outside it. Treating every address beginning with 172 as private would be wrong.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> 10 full; 172 only 16–31; 192.168 full.</p>"},{"id":"mask","title":"Subnet masks: 1 keeps a network bit; 0 marks a host bit","html":"<p><strong>Definition.</strong> A subnet mask is a 32-bit value with contiguous leading 1s for network-prefix positions and trailing 0s for host positions.</p><p><strong>Simple meaning.</strong> Mask mein 1 = network part rakhna; 0 = host part zero karna.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/mask-and.3b9a8ff9ea.svg\" width=\"820\" height=\"340\" alt=\"Bitwise AND: 77 AND 192 = 64\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Subnet masks: 1 keeps a network bit; 0 marks a host bit</figcaption></figure><h2>Understand it step by step</h2><ol><li>For /26, write 26 ones followed by 6 zeroes: 11111111.11111111.11111111.11000000.</li><li>Convert each octet: 255.255.255.(128+64)=255.255.255.192.</li><li>Bitwise AND operates on matching bit positions. Only 1 AND 1 equals 1; all other combinations equal 0.</li><li>Applying address AND mask keeps the network prefix and clears the host bits. This gives the first/network address of the block.</li></ol><table><thead><tr><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">A AND B</th></tr></thead><tbody><tr><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>1</td><td>0</td></tr><tr><td>1</td><td>0</td><td>0</td></tr><tr><td>1</td><td>1</td><td>1</td></tr></tbody></table><div class=\"math-display\"><img src=\"math/3a94cf83bf5040ba.svg\" alt=\"\\text{Network address}=\\text{IP address AND subnet mask}\" style=\"width:48.047ex;height:1.805ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>Last octet 77 is 01001101. AND with mask octet 192 = 11000000 gives 01000000 = 64. Thus 192.168.10.77/26 has network address 192.168.10.64.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. How does a subnet mask determine the network address? <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>The prefix mask contains 1s in network positions and 0s in host positions. Bitwise AND between the IP address and mask preserves the network bits and clears the host bits. For 192.168.10.77/26, the mask is 255.255.255.192 and the network is 192.168.10.64.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Last octet 77 is 01001101. AND with mask octet 192 = 11000000 gives 01000000 = 64. Thus 192.168.10.77/26 has network address 192.168.10.64.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> AND: dono 1 ho tabhi output 1.</p>"},{"id":"mask-1","title":"Prefix to mask · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Convert /26 into a dotted-decimal subnet mask. State host bits and total address count. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Prefix length p=26.</p><h2>To find</h2><p>Mask, h and N.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>A prefix contains p leading ones; total combinations depend on the remaining host bits.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Write the bits</h4><p>26 ones followed by 6 zeroes: <code>11111111.11111111.11111111.11000000</code>.</p></div><div class=\"step\"><h4>Step 2. Convert every octet</h4><table><thead><tr><th scope=\"col\">Mask bits</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>11111111</td><td>255</td></tr><tr><td>11111111</td><td>255</td></tr><tr><td>11111111</td><td>255</td></tr><tr><td>11000000</td><td>192</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Calculate host positions</h4><p>h=32−26=6.</p></div><div class=\"step\"><h4>Step 4. Count total addresses</h4><p>N=2<sup>6</sup>=64.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Mask=255.255.255.192; host bits=6; total addresses=64.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The mask tells which bits belong to the network; the last mask octet is not the number of hosts.</p></aside></div></section>"},{"id":"mask-2","title":"Prefix to mask · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Convert /20 into a dotted-decimal subnet mask. State host bits and total address count. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Prefix length p=20.</p><h2>To find</h2><p>Mask, h and N.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>A prefix contains p leading ones; total combinations depend on the remaining host bits.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Write the bits</h4><p>20 ones followed by 12 zeroes: <code>11111111.11111111.11110000.00000000</code>.</p></div><div class=\"step\"><h4>Step 2. Convert every octet</h4><table><thead><tr><th scope=\"col\">Mask bits</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>11111111</td><td>255</td></tr><tr><td>11111111</td><td>255</td></tr><tr><td>11110000</td><td>240</td></tr><tr><td>00000000</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Calculate host positions</h4><p>h=32−20=12.</p></div><div class=\"step\"><h4>Step 4. Count total addresses</h4><p>N=2<sup>12</sup>=4,096.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Mask=255.255.240.0; host bits=12; total addresses=4,096.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The mask tells which bits belong to the network; the last mask octet is not the number of hosts.</p></aside></div></section>"},{"id":"mask-3","title":"Prefix to mask · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Convert /27 into a dotted-decimal subnet mask. State host bits and total address count. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Prefix length p=27.</p><h2>To find</h2><p>Mask, h and N.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>A prefix contains p leading ones; total combinations depend on the remaining host bits.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Write the bits</h4><p>27 ones followed by 5 zeroes: <code>11111111.11111111.11111111.11100000</code>.</p></div><div class=\"step\"><h4>Step 2. Convert every octet</h4><table><thead><tr><th scope=\"col\">Mask bits</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>11111111</td><td>255</td></tr><tr><td>11111111</td><td>255</td></tr><tr><td>11111111</td><td>255</td></tr><tr><td>11100000</td><td>224</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Calculate host positions</h4><p>h=32−27=5.</p></div><div class=\"step\"><h4>Step 4. Count total addresses</h4><p>N=2<sup>5</sup>=32.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Mask=255.255.255.224; host bits=5; total addresses=32.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The mask tells which bits belong to the network; the last mask octet is not the number of hosts.</p></aside></div></section>"},{"id":"mask-4","title":"Prefix to mask · example 4","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Convert /23 into a dotted-decimal subnet mask. State host bits and total address count. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Prefix length p=23.</p><h2>To find</h2><p>Mask, h and N.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>A prefix contains p leading ones; total combinations depend on the remaining host bits.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Write the bits</h4><p>23 ones followed by 9 zeroes: <code>11111111.11111111.11111110.00000000</code>.</p></div><div class=\"step\"><h4>Step 2. Convert every octet</h4><table><thead><tr><th scope=\"col\">Mask bits</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>11111111</td><td>255</td></tr><tr><td>11111111</td><td>255</td></tr><tr><td>11111110</td><td>254</td></tr><tr><td>00000000</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Calculate host positions</h4><p>h=32−23=9.</p></div><div class=\"step\"><h4>Step 4. Count total addresses</h4><p>N=2<sup>9</sup>=512.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Mask=255.255.254.0; host bits=9; total addresses=512.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The mask tells which bits belong to the network; the last mask octet is not the number of hosts.</p></aside></div></section>"}]},{"id":"subnets","title":"Subnetting: first address, last address and host range","scope":"Unit 4 · masks, subnetting and CIDR","sections":[{"id":"method","title":"One method for every ordinary IPv4 block question","html":"<p><strong>Definition.</strong> Subnetting divides an address block into smaller prefix-defined blocks. In an ordinary subnet, the network and directed-broadcast addresses bound its usable host range.</p><p><strong>Simple meaning.</strong> Pehle block nikalo; phir first aur last. Uske baad hosts.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/subnet-blocks.67a24f46fc.svg\" width=\"820\" height=\"410\" alt=\"A /24 split into four /26 blocks\" loading=\"lazy\" decoding=\"async\"></div><figcaption>One method for every ordinary IPv4 block question</figcaption></figure><h2>Understand it step by step</h2><ol><li>Read /p. Host bits h=32−p. Total addresses N=2ʰ, not N−2.</li><li>Build the mask. Find the first octet that is not 255; block step there is 256−that mask octet.</li><li>Round that address octet down to a multiple of the step. Preserve preceding octets and set later octets to 0 for the network address.</li><li>For the broadcast address, use the end of the same interval in the changing octet and set later octets to 255. Equivalently, broadcast is network+(N−1) in 32-bit address arithmetic.</li><li>For an ordinary broadcast subnet with at least two host bits: first usable=network+1, last usable=broadcast−1, usable count=N−2. /31 point-to-point and /32 routes are exceptions explained separately.</li></ol><div class=\"math-display\"><img src=\"math/06561cae3cdafd6c.svg\" alt=\"N=2^{32-p}\" style=\"width:9.994ex;height:2.185ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/6d26c03e47eb5b6c.svg\" alt=\"\\text{block step}=256-\\text{changing mask octet}\" style=\"width:38.928ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/0d9d5151a6681f69.svg\" alt=\"\\text{ordinary usable hosts}=2^h-2\" style=\"width:29.885ex;height:2.506ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>For a /26, the changing fourth octet moves in steps of 64: blocks 0–63, 64–127, 128–191 and 192–255. An address ending in 77 is in the 64–127 block.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Distinguish total addresses from usable host addresses in a /26 subnet. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A /26 has 32−26=6 host bits, so it contains 2⁶=64 total addresses. Under ordinary IPv4 subnet rules, one is the network address and one is directed broadcast, leaving 64−2=62 usable host addresses.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>For a /26, the changing fourth octet moves in steps of 64: blocks 0–63, 64–127, 128–191 and 192–255. An address ending in 77 is in the 64–127 block.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Total mein sab count; usable mein boundary ke 2 minus.</p>"},{"id":"block-1","title":"Complete block · 192.168.10.77/26","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the IPv4 address 192.168.10.77/26, determine the mask, network address, broadcast address, total addresses and usable host range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>192.168.10.77/26</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−26=6; N=2<sup>6</sup>=64.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.192</code>; binary=<code>11111111.11111111.11111111.11000000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 77 lies in 64…127.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 64 in octet 4; set any later octets to zero. Network=<strong>192.168.10.64</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>11000000</td><td>11111111</td><td>11000000</td><td>192</td></tr><tr><td>2</td><td>10101000</td><td>11111111</td><td>10101000</td><td>168</td></tr><tr><td>3</td><td>00001010</td><td>11111111</td><td>00001010</td><td>10</td></tr><tr><td>4</td><td>01001101</td><td>11000000</td><td>01000000</td><td>64</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 127 in the changing octet and 255 in any later octets. Broadcast=<strong>192.168.10.127</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=192.168.10.65; last usable=192.168.10.126; count=64−2=62.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 192.168.10.64; broadcast 192.168.10.127; 64 total, 62 ordinary usable; range 192.168.10.65–192.168.10.126.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"block-2","title":"Complete block · 200.140.64.48/26","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the IPv4 address 200.140.64.48/26, determine the mask, network address, broadcast address, total addresses and usable host range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>200.140.64.48/26</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−26=6; N=2<sup>6</sup>=64.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.192</code>; binary=<code>11111111.11111111.11111111.11000000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 48 lies in 0…63.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 0 in octet 4; set any later octets to zero. Network=<strong>200.140.64.0</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>11001000</td><td>11111111</td><td>11001000</td><td>200</td></tr><tr><td>2</td><td>10001100</td><td>11111111</td><td>10001100</td><td>140</td></tr><tr><td>3</td><td>01000000</td><td>11111111</td><td>01000000</td><td>64</td></tr><tr><td>4</td><td>00110000</td><td>11000000</td><td>00000000</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 63 in the changing octet and 255 in any later octets. Broadcast=<strong>200.140.64.63</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=200.140.64.1; last usable=200.140.64.62; count=64−2=62.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 200.140.64.0; broadcast 200.140.64.63; 64 total, 62 ordinary usable; range 200.140.64.1–200.140.64.62.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"block-3","title":"Complete block · 193.20.35.40/26","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the IPv4 address 193.20.35.40/26, determine the mask, network address, broadcast address, total addresses and usable host range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>193.20.35.40/26</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−26=6; N=2<sup>6</sup>=64.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.192</code>; binary=<code>11111111.11111111.11111111.11000000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 40 lies in 0…63.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 0 in octet 4; set any later octets to zero. Network=<strong>193.20.35.0</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>11000001</td><td>11111111</td><td>11000001</td><td>193</td></tr><tr><td>2</td><td>00010100</td><td>11111111</td><td>00010100</td><td>20</td></tr><tr><td>3</td><td>00100011</td><td>11111111</td><td>00100011</td><td>35</td></tr><tr><td>4</td><td>00101000</td><td>11000000</td><td>00000000</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 63 in the changing octet and 255 in any later octets. Broadcast=<strong>193.20.35.63</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=193.20.35.1; last usable=193.20.35.62; count=64−2=62.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 193.20.35.0; broadcast 193.20.35.63; 64 total, 62 ordinary usable; range 193.20.35.1–193.20.35.62.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"block-4","title":"Complete block · 192.168.1.150/27","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the IPv4 address 192.168.1.150/27, determine the mask, network address, broadcast address, total addresses and usable host range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>192.168.1.150/27</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−27=5; N=2<sup>5</sup>=32.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.224</code>; binary=<code>11111111.11111111.11111111.11100000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 224, so step=256−224=32. The IP value 150 lies in 128…159.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 128 in octet 4; set any later octets to zero. Network=<strong>192.168.1.128</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>11000000</td><td>11111111</td><td>11000000</td><td>192</td></tr><tr><td>2</td><td>10101000</td><td>11111111</td><td>10101000</td><td>168</td></tr><tr><td>3</td><td>00000001</td><td>11111111</td><td>00000001</td><td>1</td></tr><tr><td>4</td><td>10010110</td><td>11100000</td><td>10000000</td><td>128</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 159 in the changing octet and 255 in any later octets. Broadcast=<strong>192.168.1.159</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=192.168.1.129; last usable=192.168.1.158; count=32−2=30.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 192.168.1.128; broadcast 192.168.1.159; 32 total, 30 ordinary usable; range 192.168.1.129–192.168.1.158.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"block-5","title":"Complete block · 10.4.9.55/28","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the IPv4 address 10.4.9.55/28, determine the mask, network address, broadcast address, total addresses and usable host range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>10.4.9.55/28</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−28=4; N=2<sup>4</sup>=16.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.240</code>; binary=<code>11111111.11111111.11111111.11110000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 240, so step=256−240=16. The IP value 55 lies in 48…63.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 48 in octet 4; set any later octets to zero. Network=<strong>10.4.9.48</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>00001010</td><td>11111111</td><td>00001010</td><td>10</td></tr><tr><td>2</td><td>00000100</td><td>11111111</td><td>00000100</td><td>4</td></tr><tr><td>3</td><td>00001001</td><td>11111111</td><td>00001001</td><td>9</td></tr><tr><td>4</td><td>00110111</td><td>11110000</td><td>00110000</td><td>48</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 63 in the changing octet and 255 in any later octets. Broadcast=<strong>10.4.9.63</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=10.4.9.49; last usable=10.4.9.62; count=16−2=14.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 10.4.9.48; broadcast 10.4.9.63; 16 total, 14 ordinary usable; range 10.4.9.49–10.4.9.62.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"block-6","title":"Complete block · 172.16.35.123/20","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the IPv4 address 172.16.35.123/20, determine the mask, network address, broadcast address, total addresses and usable host range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>172.16.35.123/20</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−20=12; N=2<sup>12</sup>=4,096.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.240.0</code>; binary=<code>11111111.11111111.11110000.00000000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 3. Its mask value is 240, so step=256−240=16. The IP value 35 lies in 32…47.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 32 in octet 3; set any later octets to zero. Network=<strong>172.16.32.0</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>10101100</td><td>11111111</td><td>10101100</td><td>172</td></tr><tr><td>2</td><td>00010000</td><td>11111111</td><td>00010000</td><td>16</td></tr><tr><td>3</td><td>00100011</td><td>11110000</td><td>00100000</td><td>32</td></tr><tr><td>4</td><td>01111011</td><td>00000000</td><td>00000000</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 47 in the changing octet and 255 in any later octets. Broadcast=<strong>172.16.47.255</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=172.16.32.1; last usable=172.16.47.254; count=4096−2=4094.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 172.16.32.0; broadcast 172.16.47.255; 4,096 total, 4,094 ordinary usable; range 172.16.32.1–172.16.47.254.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"block-7","title":"Complete block · 10.20.5.130/23","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the IPv4 address 10.20.5.130/23, determine the mask, network address, broadcast address, total addresses and usable host range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>10.20.5.130/23</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−23=9; N=2<sup>9</sup>=512.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.254.0</code>; binary=<code>11111111.11111111.11111110.00000000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 3. Its mask value is 254, so step=256−254=2. The IP value 5 lies in 4…5.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 4 in octet 3; set any later octets to zero. Network=<strong>10.20.4.0</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>00001010</td><td>11111111</td><td>00001010</td><td>10</td></tr><tr><td>2</td><td>00010100</td><td>11111111</td><td>00010100</td><td>20</td></tr><tr><td>3</td><td>00000101</td><td>11111110</td><td>00000100</td><td>4</td></tr><tr><td>4</td><td>10000010</td><td>00000000</td><td>00000000</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 5 in the changing octet and 255 in any later octets. Broadcast=<strong>10.20.5.255</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=10.20.4.1; last usable=10.20.5.254; count=512−2=510.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 10.20.4.0; broadcast 10.20.5.255; 512 total, 510 ordinary usable; range 10.20.4.1–10.20.5.254.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"block-8","title":"Complete block · 192.168.2.129/25","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the IPv4 address 192.168.2.129/25, determine the mask, network address, broadcast address, total addresses and usable host range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>192.168.2.129/25</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−25=7; N=2<sup>7</sup>=128.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.128</code>; binary=<code>11111111.11111111.11111111.10000000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 128, so step=256−128=128. The IP value 129 lies in 128…255.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 128 in octet 4; set any later octets to zero. Network=<strong>192.168.2.128</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>11000000</td><td>11111111</td><td>11000000</td><td>192</td></tr><tr><td>2</td><td>10101000</td><td>11111111</td><td>10101000</td><td>168</td></tr><tr><td>3</td><td>00000010</td><td>11111111</td><td>00000010</td><td>2</td></tr><tr><td>4</td><td>10000001</td><td>10000000</td><td>10000000</td><td>128</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 255 in the changing octet and 255 in any later octets. Broadcast=<strong>192.168.2.255</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=192.168.2.129; last usable=192.168.2.254; count=128−2=126.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 192.168.2.128; broadcast 192.168.2.255; 128 total, 126 ordinary usable; range 192.168.2.129–192.168.2.254.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"block-9","title":"Complete block · 192.0.2.6/30","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the IPv4 address 192.0.2.6/30, determine the mask, network address, broadcast address, total addresses and usable host range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>192.0.2.6/30</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−30=2; N=2<sup>2</sup>=4.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.252</code>; binary=<code>11111111.11111111.11111111.11111100</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 252, so step=256−252=4. The IP value 6 lies in 4…7.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 4 in octet 4; set any later octets to zero. Network=<strong>192.0.2.4</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>11000000</td><td>11111111</td><td>11000000</td><td>192</td></tr><tr><td>2</td><td>00000000</td><td>11111111</td><td>00000000</td><td>0</td></tr><tr><td>3</td><td>00000010</td><td>11111111</td><td>00000010</td><td>2</td></tr><tr><td>4</td><td>00000110</td><td>11111100</td><td>00000100</td><td>4</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 7 in the changing octet and 255 in any later octets. Broadcast=<strong>192.0.2.7</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=192.0.2.5; last usable=192.0.2.6; count=4−2=2.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 192.0.2.4; broadcast 192.0.2.7; 4 total, 2 ordinary usable; range 192.0.2.5–192.0.2.6.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"exceptions","title":"Why /31 and /32 do not use the ordinary minus-two rule","html":"<p><strong>Definition.</strong> A /31 prefix can address both endpoints of a point-to-point IPv4 link under RFC 3021; a /32 identifies one IPv4 address, commonly as a host route.</p><p><strong>Simple meaning.</strong> Minus 2 har slash pe blindly mat lagao.</p><h2>Understand it step by step</h2><ol><li>Ordinary subnet questions reserve the all-zero and all-one host patterns, giving 2ʰ−2 usable hosts.</li><li>A /31 on a point-to-point link has two addresses and both can be endpoint addresses. There is no need for a subnet broadcast on that two-endpoint link.</li><li>A /32 contains exactly one address. It is useful for identifying a specific interface/host route; it is not a multi-host broadcast subnet.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>192.0.2.0/31 contains .0 and .1. On a suitable point-to-point link, both may be endpoints. 192.0.2.7/32 describes only .7.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain why subtracting two usable addresses is inappropriate for a /31 point-to-point link. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>RFC 3021 permits both addresses of a /31 to be used by the two endpoints of an IPv4 point-to-point link. Applying the ordinary broadcast-subnet formula would incorrectly claim there are zero usable endpoints.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>192.0.2.0/31 contains .0 and .1. On a suitable point-to-point link, both may be endpoints. 192.0.2.7/32 describes only .7.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> /31 special link; /32 single address.</p>"},{"id":"hosts-1","title":"Hosts to prefix · 25 hosts","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Choose the smallest ordinary IPv4 subnet supporting at least 25 usable hosts. Find prefix, mask and unused usable capacity. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Required usable hosts H=25.</p><h2>To find</h2><p>The smallest sufficient subnet, expressed as /p and mask.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/9d320d9c17125391.svg\" alt=\"2^h-2\\geq H,\\qquad p=32-h\" style=\"width:27.181ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>Host demand excludes network and broadcast, so use the usable-host inequality. Choose the smallest h that satisfies it.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Test the previous smaller power</h4><p>With h=4, usable=2<sup>4</sup>−2=14, which is less than 25.</p></div><div class=\"step\"><h4>Step 2. Test the next power</h4><p>With h=5, usable=2<sup>5</sup>−2=30, which is sufficient.</p></div><div class=\"step\"><h4>Step 3. Convert host bits to prefix</h4><p>p=32−5=27; mask=255.255.255.224.</p></div><div class=\"step\"><h4>Step 4. Count spare usable addresses</h4><p>30−25=5.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> /27, mask 255.255.255.224; 30 usable, 5 spare usable addresses.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A requirement of 64 usable hosts cannot fit into a 64-total-address block: only 62 would be usable.</p></aside></div></section>"},{"id":"hosts-2","title":"Hosts to prefix · 64 hosts","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Choose the smallest ordinary IPv4 subnet supporting at least 64 usable hosts. Find prefix, mask and unused usable capacity. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Required usable hosts H=64.</p><h2>To find</h2><p>The smallest sufficient subnet, expressed as /p and mask.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/9d320d9c17125391.svg\" alt=\"2^h-2\\geq H,\\qquad p=32-h\" style=\"width:27.181ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>Host demand excludes network and broadcast, so use the usable-host inequality. Choose the smallest h that satisfies it.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Test the previous smaller power</h4><p>With h=6, usable=2<sup>6</sup>−2=62, which is less than 64.</p></div><div class=\"step\"><h4>Step 2. Test the next power</h4><p>With h=7, usable=2<sup>7</sup>−2=126, which is sufficient.</p></div><div class=\"step\"><h4>Step 3. Convert host bits to prefix</h4><p>p=32−7=25; mask=255.255.255.128.</p></div><div class=\"step\"><h4>Step 4. Count spare usable addresses</h4><p>126−64=62.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> /25, mask 255.255.255.128; 126 usable, 62 spare usable addresses.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A requirement of 64 usable hosts cannot fit into a 64-total-address block: only 62 would be usable.</p></aside></div></section>"},{"id":"hosts-3","title":"Hosts to prefix · 1000 hosts","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Choose the smallest ordinary IPv4 subnet supporting at least 1000 usable hosts. Find prefix, mask and unused usable capacity. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Required usable hosts H=1000.</p><h2>To find</h2><p>The smallest sufficient subnet, expressed as /p and mask.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/9d320d9c17125391.svg\" alt=\"2^h-2\\geq H,\\qquad p=32-h\" style=\"width:27.181ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>Host demand excludes network and broadcast, so use the usable-host inequality. Choose the smallest h that satisfies it.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Test the previous smaller power</h4><p>With h=9, usable=2<sup>9</sup>−2=510, which is less than 1000.</p></div><div class=\"step\"><h4>Step 2. Test the next power</h4><p>With h=10, usable=2<sup>10</sup>−2=1022, which is sufficient.</p></div><div class=\"step\"><h4>Step 3. Convert host bits to prefix</h4><p>p=32−10=22; mask=255.255.252.0.</p></div><div class=\"step\"><h4>Step 4. Count spare usable addresses</h4><p>1022−1000=22.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> /22, mask 255.255.252.0; 1022 usable, 22 spare usable addresses.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A requirement of 64 usable hosts cannot fit into a 64-total-address block: only 62 would be usable.</p></aside></div></section>"},{"id":"split-1","title":"Equal-size subnet design · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Divide 192.168.8.0/24 into at least 4 equal-size ordinary subnets. Give the new prefix, number of available subnets, usable hosts per subnet, and every resulting address range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Parent=192.168.8.0/24; required equal-size subnets=4.</p><h2>To find</h2><p>Borrowed bits, new mask/prefix and complete subnet ranges.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ca4fab7e8dac4ad7.svg\" alt=\"2^s\\geq N_{\\mathrm{subnets}}\" style=\"width:12.353ex;height:1.998ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/3c981479a80689de.svg\" alt=\"p_{\\mathrm{new}}=p_{\\mathrm{old}}+s\" style=\"width:14.384ex;height:1.758ex\" loading=\"lazy\" decoding=\"async\"></div><p>Borrow the smallest s giving enough subnets. In modern subnetting, zero and all-ones subnets are valid; do not subtract two from the subnet count.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Choose borrowed bits</h4><p>s=2, because 2<sup>2</sup>=4 is the smallest power of two at least 4.</p></div><div class=\"step\"><h4>Step 2. Find the new prefix and size</h4><p>/24+2=/26; mask=255.255.255.192. Each subnet contains 64 total and 62 usable addresses.</p></div><div class=\"step\"><h4>Step 3. List each subnet</h4><table><thead><tr><th scope=\"col\">Subnet</th><th scope=\"col\">First/network</th><th scope=\"col\">Last/broadcast</th><th scope=\"col\">Usable range</th></tr></thead><tbody><tr><td>192.168.8.0/26</td><td>192.168.8.0</td><td>192.168.8.63</td><td>192.168.8.1–192.168.8.62</td></tr><tr><td>192.168.8.64/26</td><td>192.168.8.64</td><td>192.168.8.127</td><td>192.168.8.65–192.168.8.126</td></tr><tr><td>192.168.8.128/26</td><td>192.168.8.128</td><td>192.168.8.191</td><td>192.168.8.129–192.168.8.190</td></tr><tr><td>192.168.8.192/26</td><td>192.168.8.192</td><td>192.168.8.255</td><td>192.168.8.193–192.168.8.254</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. State spare subnet capacity</h4><p>4 available−4 required=0 extra equal-size subnet(s).</p></div><p class=\"final-answer\"><strong>Final answer:</strong> /26; 4 subnets; 62 usable hosts each.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Borrowing more network bits creates more but smaller subnets.</p></aside></div></section>"},{"id":"split-2","title":"Equal-size subnet design · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Divide 172.16.0.0/16 into at least 8 equal-size ordinary subnets. Give the new prefix, number of available subnets, usable hosts per subnet, and every resulting address range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Parent=172.16.0.0/16; required equal-size subnets=8.</p><h2>To find</h2><p>Borrowed bits, new mask/prefix and complete subnet ranges.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ca4fab7e8dac4ad7.svg\" alt=\"2^s\\geq N_{\\mathrm{subnets}}\" style=\"width:12.353ex;height:1.998ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/3c981479a80689de.svg\" alt=\"p_{\\mathrm{new}}=p_{\\mathrm{old}}+s\" style=\"width:14.384ex;height:1.758ex\" loading=\"lazy\" decoding=\"async\"></div><p>Borrow the smallest s giving enough subnets. In modern subnetting, zero and all-ones subnets are valid; do not subtract two from the subnet count.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Choose borrowed bits</h4><p>s=3, because 2<sup>3</sup>=8 is the smallest power of two at least 8.</p></div><div class=\"step\"><h4>Step 2. Find the new prefix and size</h4><p>/16+3=/19; mask=255.255.224.0. Each subnet contains 8192 total and 8190 usable addresses.</p></div><div class=\"step\"><h4>Step 3. List each subnet</h4><table><thead><tr><th scope=\"col\">Subnet</th><th scope=\"col\">First/network</th><th scope=\"col\">Last/broadcast</th><th scope=\"col\">Usable range</th></tr></thead><tbody><tr><td>172.16.0.0/19</td><td>172.16.0.0</td><td>172.16.31.255</td><td>172.16.0.1–172.16.31.254</td></tr><tr><td>172.16.32.0/19</td><td>172.16.32.0</td><td>172.16.63.255</td><td>172.16.32.1–172.16.63.254</td></tr><tr><td>172.16.64.0/19</td><td>172.16.64.0</td><td>172.16.95.255</td><td>172.16.64.1–172.16.95.254</td></tr><tr><td>172.16.96.0/19</td><td>172.16.96.0</td><td>172.16.127.255</td><td>172.16.96.1–172.16.127.254</td></tr><tr><td>172.16.128.0/19</td><td>172.16.128.0</td><td>172.16.159.255</td><td>172.16.128.1–172.16.159.254</td></tr><tr><td>172.16.160.0/19</td><td>172.16.160.0</td><td>172.16.191.255</td><td>172.16.160.1–172.16.191.254</td></tr><tr><td>172.16.192.0/19</td><td>172.16.192.0</td><td>172.16.223.255</td><td>172.16.192.1–172.16.223.254</td></tr><tr><td>172.16.224.0/19</td><td>172.16.224.0</td><td>172.16.255.255</td><td>172.16.224.1–172.16.255.254</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. State spare subnet capacity</h4><p>8 available−8 required=0 extra equal-size subnet(s).</p></div><p class=\"final-answer\"><strong>Final answer:</strong> /19; 8 subnets; 8190 usable hosts each.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Borrowing more network bits creates more but smaller subnets.</p></aside></div></section>"},{"id":"split-3","title":"Equal-size subnet design · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Divide 10.0.0.0/24 into at least 6 equal-size ordinary subnets. Give the new prefix, number of available subnets, usable hosts per subnet, and every resulting address range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Parent=10.0.0.0/24; required equal-size subnets=6.</p><h2>To find</h2><p>Borrowed bits, new mask/prefix and complete subnet ranges.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ca4fab7e8dac4ad7.svg\" alt=\"2^s\\geq N_{\\mathrm{subnets}}\" style=\"width:12.353ex;height:1.998ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/3c981479a80689de.svg\" alt=\"p_{\\mathrm{new}}=p_{\\mathrm{old}}+s\" style=\"width:14.384ex;height:1.758ex\" loading=\"lazy\" decoding=\"async\"></div><p>Borrow the smallest s giving enough subnets. In modern subnetting, zero and all-ones subnets are valid; do not subtract two from the subnet count.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Choose borrowed bits</h4><p>s=3, because 2<sup>3</sup>=8 is the smallest power of two at least 6.</p></div><div class=\"step\"><h4>Step 2. Find the new prefix and size</h4><p>/24+3=/27; mask=255.255.255.224. Each subnet contains 32 total and 30 usable addresses.</p></div><div class=\"step\"><h4>Step 3. List each subnet</h4><table><thead><tr><th scope=\"col\">Subnet</th><th scope=\"col\">First/network</th><th scope=\"col\">Last/broadcast</th><th scope=\"col\">Usable range</th></tr></thead><tbody><tr><td>10.0.0.0/27</td><td>10.0.0.0</td><td>10.0.0.31</td><td>10.0.0.1–10.0.0.30</td></tr><tr><td>10.0.0.32/27</td><td>10.0.0.32</td><td>10.0.0.63</td><td>10.0.0.33–10.0.0.62</td></tr><tr><td>10.0.0.64/27</td><td>10.0.0.64</td><td>10.0.0.95</td><td>10.0.0.65–10.0.0.94</td></tr><tr><td>10.0.0.96/27</td><td>10.0.0.96</td><td>10.0.0.127</td><td>10.0.0.97–10.0.0.126</td></tr><tr><td>10.0.0.128/27</td><td>10.0.0.128</td><td>10.0.0.159</td><td>10.0.0.129–10.0.0.158</td></tr><tr><td>10.0.0.160/27</td><td>10.0.0.160</td><td>10.0.0.191</td><td>10.0.0.161–10.0.0.190</td></tr><tr><td>10.0.0.192/27</td><td>10.0.0.192</td><td>10.0.0.223</td><td>10.0.0.193–10.0.0.222</td></tr><tr><td>10.0.0.224/27</td><td>10.0.0.224</td><td>10.0.0.255</td><td>10.0.0.225–10.0.0.254</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. State spare subnet capacity</h4><p>8 available−6 required=2 extra equal-size subnet(s).</p></div><p class=\"final-answer\"><strong>Final answer:</strong> /27; 8 subnets; 30 usable hosts each.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Borrowing more network bits creates more but smaller subnets.</p></aside></div></section>"}]},{"id":"cidr","title":"CIDR, VLSM and route matching","scope":"Unit 4 · classless addressing","sections":[{"id":"meaning","title":"CIDR and VLSM: two related but different ideas","html":"<p><strong>Definition.</strong> CIDR expresses address blocks using an explicit prefix length; VLSM uses different subnet prefix lengths to match different size requirements within an allocated block.</p><p><strong>Simple meaning.</strong> CIDR = slash se block; VLSM = departments ko need ke hisaab se different block sizes.</p><h2>Understand it step by step</h2><ol><li>A valid CIDR block has a power-of-two address count and begins on the matching boundary. For example, a /26 block has 64 addresses and begins at fourth-octet multiples of 64 within a /24.</li><li>The prefix gives contiguous network bits. A noncontiguous mask such as 255.0.255.0 is not a normal CIDR prefix mask.</li><li>VLSM avoids making every department as large as the largest one. Allocate larger requirements first, then fit smaller aligned blocks into remaining space.</li><li>Distinguish <strong>addresses</strong> from <strong>usable hosts</strong>. A lab requiring 128 total addresses gets /25; a lab requiring 128 ordinary usable hosts needs /24.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A department with 100 hosts can receive /25, while one with 10 hosts can receive /28. Giving both /25 would leave more unused addresses.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain CIDR and the advantage of VLSM. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>CIDR identifies a classless address block with an explicit /p prefix. VLSM permits subnets of different prefix lengths inside a larger block. Matching subnet sizes to requirements reduces waste while maintaining non-overlapping aligned allocations.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A department with 100 hosts can receive /25, while one with 10 hosts can receive /28. Giving both /25 would leave more unused addresses.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Hosts bola toh +2 allowance; addresses bola toh total count directly.</p>"},{"id":"vlsm-1","title":"Complete VLSM allocation · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Allocate non-overlapping VLSM subnets inside 192.168.10.0/24 for A: 100 usable hosts, B: 50 usable hosts, C: 25 usable hosts, D: 10 usable hosts. Allocate largest requirements first. Give all ranges and unallocated addresses. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Department</th><th scope=\"col\">Usable hosts</th></tr></thead><tbody><tr><td>A</td><td>100</td></tr><tr><td>B</td><td>50</td></tr><tr><td>C</td><td>25</td></tr><tr><td>D</td><td>10</td></tr></tbody></table><h2>To find</h2><p>An aligned subnet for each department, usable ranges, broadcasts and remaining addresses.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/0d2799e2eb681b5f.svg\" alt=\"2^h-2\\geq H,\\quad p=32-h\" style=\"width:24.918ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>Choose the smallest sufficient subnet per requirement. Align each start to its block size and never overlap a previously assigned range.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Sort the host requirements</h4><p>A (100) → B (50) → C (25) → D (10)</p></div><div class=\"step\"><h4>Step 2. A · choose and allocate</h4><p>100 hosts require 2<sup>7</sup>−2=126 usable; a smaller /26 would give 62. Choose /25. The next aligned block is 192.168.10.0/25; it ends at 192.168.10.127.</p></div><div class=\"step\"><h4>Step 3. B · choose and allocate</h4><p>50 hosts require 2<sup>6</sup>−2=62 usable; a smaller /27 would give 30. Choose /26. The next aligned block is 192.168.10.128/26; it ends at 192.168.10.191.</p></div><div class=\"step\"><h4>Step 4. C · choose and allocate</h4><p>25 hosts require 2<sup>5</sup>−2=30 usable; a smaller /28 would give 14. Choose /27. The next aligned block is 192.168.10.192/27; it ends at 192.168.10.223.</p></div><div class=\"step\"><h4>Step 5. D · choose and allocate</h4><p>10 hosts require 2<sup>4</sup>−2=14 usable; a smaller /29 would give 6. Choose /28. The next aligned block is 192.168.10.224/28; it ends at 192.168.10.239.</p></div><div class=\"step\"><h4>Step 6. Write the complete allocation</h4><table><thead><tr><th scope=\"col\">Group</th><th scope=\"col\">Hosts</th><th scope=\"col\">Network/prefix</th><th scope=\"col\">Mask</th><th scope=\"col\">Usable range</th><th scope=\"col\">Broadcast</th><th scope=\"col\">Spare usable</th></tr></thead><tbody><tr><td>A</td><td>100</td><td>192.168.10.0/25</td><td>255.255.255.128</td><td>192.168.10.1–192.168.10.126</td><td>192.168.10.127</td><td>26</td></tr><tr><td>B</td><td>50</td><td>192.168.10.128/26</td><td>255.255.255.192</td><td>192.168.10.129–192.168.10.190</td><td>192.168.10.191</td><td>12</td></tr><tr><td>C</td><td>25</td><td>192.168.10.192/27</td><td>255.255.255.224</td><td>192.168.10.193–192.168.10.222</td><td>192.168.10.223</td><td>5</td></tr><tr><td>D</td><td>10</td><td>192.168.10.224/28</td><td>255.255.255.240</td><td>192.168.10.225–192.168.10.238</td><td>192.168.10.239</td><td>4</td></tr></tbody></table></div><div class=\"step\"><h4>Step 7. Count addresses reserved and left</h4><p>Reserved=128+64+32+16=240. Parent total=256. Unallocated=256−240=16.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 240 total addresses reserved; 16 unallocated. The table gives one valid complete allocation.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Unused usable capacity inside assigned subnets is different from unallocated address space outside those subnets.</p></aside></div></section>"},{"id":"vlsm-2","title":"Complete VLSM allocation · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Allocate non-overlapping VLSM subnets inside 10.0.0.0/24 for Research: 60 usable hosts, Admin: 25 usable hosts, IoT: 12 usable hosts. Allocate largest requirements first. Give all ranges and unallocated addresses. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Department</th><th scope=\"col\">Usable hosts</th></tr></thead><tbody><tr><td>Research</td><td>60</td></tr><tr><td>Admin</td><td>25</td></tr><tr><td>IoT</td><td>12</td></tr></tbody></table><h2>To find</h2><p>An aligned subnet for each department, usable ranges, broadcasts and remaining addresses.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/0d2799e2eb681b5f.svg\" alt=\"2^h-2\\geq H,\\quad p=32-h\" style=\"width:24.918ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>Choose the smallest sufficient subnet per requirement. Align each start to its block size and never overlap a previously assigned range.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Sort the host requirements</h4><p>Research (60) → Admin (25) → IoT (12)</p></div><div class=\"step\"><h4>Step 2. Research · choose and allocate</h4><p>60 hosts require 2<sup>6</sup>−2=62 usable; a smaller /27 would give 30. Choose /26. The next aligned block is 10.0.0.0/26; it ends at 10.0.0.63.</p></div><div class=\"step\"><h4>Step 3. Admin · choose and allocate</h4><p>25 hosts require 2<sup>5</sup>−2=30 usable; a smaller /28 would give 14. Choose /27. The next aligned block is 10.0.0.64/27; it ends at 10.0.0.95.</p></div><div class=\"step\"><h4>Step 4. IoT · choose and allocate</h4><p>12 hosts require 2<sup>4</sup>−2=14 usable; a smaller /29 would give 6. Choose /28. The next aligned block is 10.0.0.96/28; it ends at 10.0.0.111.</p></div><div class=\"step\"><h4>Step 5. Write the complete allocation</h4><table><thead><tr><th scope=\"col\">Group</th><th scope=\"col\">Hosts</th><th scope=\"col\">Network/prefix</th><th scope=\"col\">Mask</th><th scope=\"col\">Usable range</th><th scope=\"col\">Broadcast</th><th scope=\"col\">Spare usable</th></tr></thead><tbody><tr><td>Research</td><td>60</td><td>10.0.0.0/26</td><td>255.255.255.192</td><td>10.0.0.1–10.0.0.62</td><td>10.0.0.63</td><td>2</td></tr><tr><td>Admin</td><td>25</td><td>10.0.0.64/27</td><td>255.255.255.224</td><td>10.0.0.65–10.0.0.94</td><td>10.0.0.95</td><td>5</td></tr><tr><td>IoT</td><td>12</td><td>10.0.0.96/28</td><td>255.255.255.240</td><td>10.0.0.97–10.0.0.110</td><td>10.0.0.111</td><td>2</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Count addresses reserved and left</h4><p>Reserved=64+32+16=112. Parent total=256. Unallocated=256−112=144.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 112 total addresses reserved; 144 unallocated. The table gives one valid complete allocation.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Unused usable capacity inside assigned subnets is different from unallocated address space outside those subnets.</p></aside></div></section>"},{"id":"vlsm-3","title":"Complete VLSM allocation · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Allocate non-overlapping VLSM subnets inside 172.16.8.0/23 for Lab: 200 usable hosts, Staff: 100 usable hosts, Guests: 50 usable hosts. Allocate largest requirements first. Give all ranges and unallocated addresses. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Department</th><th scope=\"col\">Usable hosts</th></tr></thead><tbody><tr><td>Lab</td><td>200</td></tr><tr><td>Staff</td><td>100</td></tr><tr><td>Guests</td><td>50</td></tr></tbody></table><h2>To find</h2><p>An aligned subnet for each department, usable ranges, broadcasts and remaining addresses.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/0d2799e2eb681b5f.svg\" alt=\"2^h-2\\geq H,\\quad p=32-h\" style=\"width:24.918ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>Choose the smallest sufficient subnet per requirement. Align each start to its block size and never overlap a previously assigned range.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Sort the host requirements</h4><p>Lab (200) → Staff (100) → Guests (50)</p></div><div class=\"step\"><h4>Step 2. Lab · choose and allocate</h4><p>200 hosts require 2<sup>8</sup>−2=254 usable; a smaller /25 would give 126. Choose /24. The next aligned block is 172.16.8.0/24; it ends at 172.16.8.255.</p></div><div class=\"step\"><h4>Step 3. Staff · choose and allocate</h4><p>100 hosts require 2<sup>7</sup>−2=126 usable; a smaller /26 would give 62. Choose /25. The next aligned block is 172.16.9.0/25; it ends at 172.16.9.127.</p></div><div class=\"step\"><h4>Step 4. Guests · choose and allocate</h4><p>50 hosts require 2<sup>6</sup>−2=62 usable; a smaller /27 would give 30. Choose /26. The next aligned block is 172.16.9.128/26; it ends at 172.16.9.191.</p></div><div class=\"step\"><h4>Step 5. Write the complete allocation</h4><table><thead><tr><th scope=\"col\">Group</th><th scope=\"col\">Hosts</th><th scope=\"col\">Network/prefix</th><th scope=\"col\">Mask</th><th scope=\"col\">Usable range</th><th scope=\"col\">Broadcast</th><th scope=\"col\">Spare usable</th></tr></thead><tbody><tr><td>Lab</td><td>200</td><td>172.16.8.0/24</td><td>255.255.255.0</td><td>172.16.8.1–172.16.8.254</td><td>172.16.8.255</td><td>54</td></tr><tr><td>Staff</td><td>100</td><td>172.16.9.0/25</td><td>255.255.255.128</td><td>172.16.9.1–172.16.9.126</td><td>172.16.9.127</td><td>26</td></tr><tr><td>Guests</td><td>50</td><td>172.16.9.128/26</td><td>255.255.255.192</td><td>172.16.9.129–172.16.9.190</td><td>172.16.9.191</td><td>12</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Count addresses reserved and left</h4><p>Reserved=256+128+64=448. Parent total=512. Unallocated=512−448=64.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 448 total addresses reserved; 64 unallocated. The table gives one valid complete allocation.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Unused usable capacity inside assigned subnets is different from unallocated address space outside those subnets.</p></aside></div></section>"},{"id":"aggregation","title":"Route aggregation: combine only a valid aligned block","html":"<p><strong>Definition.</strong> Route aggregation represents several contiguous networks by a shorter common prefix, reducing the number of advertised routing entries.</p><p><strong>Simple meaning.</strong> Side-by-side blocks ko ek larger boundary mein summarize karo; gap chhupana nahi.</p><h2>Understand it step by step</h2><ol><li>For exact aggregation into one prefix, the component range must fill a correctly aligned power-of-two block.</li><li>If four consecutive /24 networks begin at a third-octet multiple of four, their exact aggregate is /22.</li><li>Find common leading address bits or verify alignment numerically. Consecutive networks do not always form one exact aggregate.</li><li>An aggregate that covers extra addresses is broader than the exact assigned range. State that explicitly instead of pretending every included address was allocated.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>192.168.4.0/24 through 192.168.7.0/24 form 192.168.4.0/22. But 192.168.5.0/24 through .8.0/24 are not aligned as one exact /22.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. State two conditions for exact aggregation of equal-sized IPv4 blocks. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>The blocks must be contiguous with no gaps and together form a power-of-two address count starting on the corresponding larger-block boundary. Their shared leading bits define the aggregate prefix.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>192.168.4.0/24 through 192.168.7.0/24 form 192.168.4.0/22. But 192.168.5.0/24 through .8.0/24 are not aligned as one exact /22.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Consecutive + power of two + aligned start.</p>"},{"id":"aggregate-1","title":"Exact route aggregation · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Find a single exact CIDR aggregate for these networks: 192.168.4.0/24, 192.168.5.0/24, 192.168.6.0/24, 192.168.7.0/24. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><ul><li>192.168.4.0/24</li><li>192.168.5.0/24</li><li>192.168.6.0/24</li><li>192.168.7.0/24</li></ul><h2>To find</h2><p>One prefix covering exactly the same address range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/96879d7c45f4939b.svg\" alt=\"\\text{total addresses}=\\sum_i N_i\" style=\"width:23.652ex;height:4.847ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/796d561e6716df45.svg\" alt=\"p=32-\\log_2(N)\" style=\"width:16.832ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Adding sizes gives the candidate prefix. Contiguity and start-boundary alignment must also be satisfied.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Determine each block size</h4><p>Each input block has 256 addresses.</p></div><div class=\"step\"><h4>Step 2. Add the address counts</h4><p>4×256=1024.</p></div><div class=\"step\"><h4>Step 3. Find host bits and prefix</h4><p>1024=2<sup>10</sup>; prefix=32−10=/22.</p></div><div class=\"step\"><h4>Step 4. Verify the exact range</h4><p>Inputs cover 192.168.4.0–192.168.7.255, without gaps. 192.168.4.0/22 covers the same start and end and is correctly aligned.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 192.168.4.0/22</p><aside class=\"applied-example\"><h4>What this result means</h4><p>An aggregate should not silently advertise an unrelated network.</p></aside></div></section>"},{"id":"aggregate-2","title":"Exact route aggregation · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Find a single exact CIDR aggregate for these networks: 10.20.0.0/25, 10.20.0.128/25. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><ul><li>10.20.0.0/25</li><li>10.20.0.128/25</li></ul><h2>To find</h2><p>One prefix covering exactly the same address range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/96879d7c45f4939b.svg\" alt=\"\\text{total addresses}=\\sum_i N_i\" style=\"width:23.652ex;height:4.847ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/796d561e6716df45.svg\" alt=\"p=32-\\log_2(N)\" style=\"width:16.832ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Adding sizes gives the candidate prefix. Contiguity and start-boundary alignment must also be satisfied.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Determine each block size</h4><p>Each input block has 128 addresses.</p></div><div class=\"step\"><h4>Step 2. Add the address counts</h4><p>2×128=256.</p></div><div class=\"step\"><h4>Step 3. Find host bits and prefix</h4><p>256=2<sup>8</sup>; prefix=32−8=/24.</p></div><div class=\"step\"><h4>Step 4. Verify the exact range</h4><p>Inputs cover 10.20.0.0–10.20.0.255, without gaps. 10.20.0.0/24 covers the same start and end and is correctly aligned.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 10.20.0.0/24</p><aside class=\"applied-example\"><h4>What this result means</h4><p>An aggregate should not silently advertise an unrelated network.</p></aside></div></section>"},{"id":"aggregate-3","title":"Exact route aggregation · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Find a single exact CIDR aggregate for these networks: 172.16.8.0/23, 172.16.10.0/23. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><ul><li>172.16.8.0/23</li><li>172.16.10.0/23</li></ul><h2>To find</h2><p>One prefix covering exactly the same address range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/96879d7c45f4939b.svg\" alt=\"\\text{total addresses}=\\sum_i N_i\" style=\"width:23.652ex;height:4.847ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/796d561e6716df45.svg\" alt=\"p=32-\\log_2(N)\" style=\"width:16.832ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Adding sizes gives the candidate prefix. Contiguity and start-boundary alignment must also be satisfied.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Determine each block size</h4><p>Each input block has 512 addresses.</p></div><div class=\"step\"><h4>Step 2. Add the address counts</h4><p>2×512=1024.</p></div><div class=\"step\"><h4>Step 3. Find host bits and prefix</h4><p>1024=2<sup>10</sup>; prefix=32−10=/22.</p></div><div class=\"step\"><h4>Step 4. Verify the exact range</h4><p>Inputs cover 172.16.8.0–172.16.11.255, without gaps. 172.16.8.0/22 covers the same start and end and is correctly aligned.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 172.16.8.0/22</p><aside class=\"applied-example\"><h4>What this result means</h4><p>An aggregate should not silently advertise an unrelated network.</p></aside></div></section>"},{"id":"forwarding","title":"Longest-prefix match: choose the most specific matching route","html":"<p><strong>Definition.</strong> Longest-prefix matching selects the matching forwarding-table entry with the greatest number of prefix bits.</p><p><strong>Simple meaning.</strong> Pehle match check; matching entries mein sabse bada slash choose.</p><h2>Understand it step by step</h2><ol><li>Compare the destination with each route’s address range. A larger prefix that does not contain the destination is irrelevant.</li><li>Among matching prefixes, choose the longest, such as /24 rather than /16.</li><li>The default route /0 matches every IPv4 destination but loses to any more specific matching entry.</li><li>The result tells the outgoing interface or next hop. It does not change the destination IP address.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>For destination 10.1.2.77, both 10.0.0.0/8 and 10.1.2.0/24 match. Choose /24. A 10.1.3.0/24 entry does not match.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. What is longest-prefix matching? Give an example. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A router selects the most specific route whose prefix contains the destination. For 10.1.2.77, a matching 10.1.2.0/24 route takes precedence over 10.0.0.0/8 and 0.0.0.0/0.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>For destination 10.1.2.77, both 10.0.0.0/8 and 10.1.2.0/24 match. Choose /24. A 10.1.3.0/24 entry does not match.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Bada slash only among matches.</p>"},{"id":"match-1","title":"Forwarding table · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Using the table below, choose the next hop for destination 10.1.2.150 by longest-prefix matching. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Network/prefix</th><th scope=\"col\">Next hop</th></tr></thead><tbody><tr><td>0.0.0.0/0</td><td>R0</td></tr><tr><td>10.0.0.0/8</td><td>R1</td></tr><tr><td>10.1.0.0/16</td><td>R2</td></tr><tr><td>10.1.2.0/24</td><td>R3</td></tr><tr><td>10.1.2.128/25</td><td>R4</td></tr></tbody></table><p>Destination=10.1.2.150</p><h2>To find</h2><p>The matching entries and selected next hop.</p><h2>Formula and why</h2><p>Choose the largest prefix length among entries containing the destination.</p><p>Prefix length is considered only after confirming an address-range match.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Check every route</h4><table><thead><tr><th scope=\"col\">Route</th><th scope=\"col\">Destination inside?</th></tr></thead><tbody><tr><td>0.0.0.0/0</td><td>Yes</td></tr><tr><td>10.0.0.0/8</td><td>Yes</td></tr><tr><td>10.1.0.0/16</td><td>Yes</td></tr><tr><td>10.1.2.0/24</td><td>Yes</td></tr><tr><td>10.1.2.128/25</td><td>Yes</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Compare matching lengths</h4><p>0.0.0.0/0, 10.0.0.0/8, 10.1.0.0/16, 10.1.2.0/24, 10.1.2.128/25. The longest is 10.1.2.128/25.</p></div><div class=\"step\"><h4>Step 3. Read the next hop</h4><p>10.1.2.128/25 uses R4.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Forward via R4 using 10.1.2.128/25.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A default route is used when no more specific entry matches.</p></aside></div></section>"},{"id":"match-2","title":"Forwarding table · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Using the table below, choose the next hop for destination 10.1.2.77 by longest-prefix matching. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Network/prefix</th><th scope=\"col\">Next hop</th></tr></thead><tbody><tr><td>0.0.0.0/0</td><td>R0</td></tr><tr><td>10.0.0.0/8</td><td>R1</td></tr><tr><td>10.1.0.0/16</td><td>R2</td></tr><tr><td>10.1.2.0/24</td><td>R3</td></tr><tr><td>10.1.2.128/25</td><td>R4</td></tr></tbody></table><p>Destination=10.1.2.77</p><h2>To find</h2><p>The matching entries and selected next hop.</p><h2>Formula and why</h2><p>Choose the largest prefix length among entries containing the destination.</p><p>Prefix length is considered only after confirming an address-range match.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Check every route</h4><table><thead><tr><th scope=\"col\">Route</th><th scope=\"col\">Destination inside?</th></tr></thead><tbody><tr><td>0.0.0.0/0</td><td>Yes</td></tr><tr><td>10.0.0.0/8</td><td>Yes</td></tr><tr><td>10.1.0.0/16</td><td>Yes</td></tr><tr><td>10.1.2.0/24</td><td>Yes</td></tr><tr><td>10.1.2.128/25</td><td>No</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Compare matching lengths</h4><p>0.0.0.0/0, 10.0.0.0/8, 10.1.0.0/16, 10.1.2.0/24. The longest is 10.1.2.0/24.</p></div><div class=\"step\"><h4>Step 3. Read the next hop</h4><p>10.1.2.0/24 uses R3.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Forward via R3 using 10.1.2.0/24.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A default route is used when no more specific entry matches.</p></aside></div></section>"},{"id":"match-3","title":"Forwarding table · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Using the table below, choose the next hop for destination 192.0.2.9 by longest-prefix matching. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Network/prefix</th><th scope=\"col\">Next hop</th></tr></thead><tbody><tr><td>0.0.0.0/0</td><td>R0</td></tr><tr><td>10.0.0.0/8</td><td>R1</td></tr><tr><td>10.1.0.0/16</td><td>R2</td></tr><tr><td>10.1.2.0/24</td><td>R3</td></tr><tr><td>10.1.2.128/25</td><td>R4</td></tr></tbody></table><p>Destination=192.0.2.9</p><h2>To find</h2><p>The matching entries and selected next hop.</p><h2>Formula and why</h2><p>Choose the largest prefix length among entries containing the destination.</p><p>Prefix length is considered only after confirming an address-range match.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Check every route</h4><table><thead><tr><th scope=\"col\">Route</th><th scope=\"col\">Destination inside?</th></tr></thead><tbody><tr><td>0.0.0.0/0</td><td>Yes</td></tr><tr><td>10.0.0.0/8</td><td>No</td></tr><tr><td>10.1.0.0/16</td><td>No</td></tr><tr><td>10.1.2.0/24</td><td>No</td></tr><tr><td>10.1.2.128/25</td><td>No</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Compare matching lengths</h4><p>0.0.0.0/0. The longest is 0.0.0.0/0.</p></div><div class=\"step\"><h4>Step 3. Read the next hop</h4><p>0.0.0.0/0 uses R0.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Forward via R0 using 0.0.0.0/0.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A default route is used when no more specific entry matches.</p></aside></div></section>"}]},{"id":"ipv6","title":"IPv6: addresses and packet format","scope":"Unit 4 · IPv6","sections":[{"id":"structure","title":"IPv6: eight hexadecimal groups","html":"<p><strong>Definition.</strong> IPv6 uses 128-bit addresses, conventionally represented by eight groups of four hexadecimal digits separated by colons.</p><p><strong>Simple meaning.</strong> IPv4 mein 4 decimal boxes; IPv6 mein 8 hexadecimal groups.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ipv6-address.25497337ae.svg\" width=\"820\" height=\"330\" alt=\"IPv6: 8 groups × 16 bits = 128 bits\" loading=\"lazy\" decoding=\"async\"></div><figcaption>IPv6: eight hexadecimal groups</figcaption></figure><h2>Understand it step by step</h2><ol><li>Hexadecimal uses sixteen digits: 0–9, then a=10, b=11, c=12, d=13, e=14, f=15. One hex digit represents four bits.</li><li>Four hex digits represent 16 bits, called one hextet/group. Eight groups represent 8×16=128 bits.</li><li>Leading zeroes within a group may be omitted: 00ab becomes ab, but ab00 must not become ab.</li><li>A run of all-zero groups may be abbreviated by :: once in an address. Using :: twice makes the missing group counts ambiguous.</li></ol><table><thead><tr><th scope=\"col\">Hex</th><th scope=\"col\">Decimal</th><th scope=\"col\">Four bits</th></tr></thead><tbody><tr><td>0</td><td>0</td><td>0000</td></tr><tr><td>1</td><td>1</td><td>0001</td></tr><tr><td>2</td><td>2</td><td>0010</td></tr><tr><td>3</td><td>3</td><td>0011</td></tr><tr><td>4</td><td>4</td><td>0100</td></tr><tr><td>5</td><td>5</td><td>0101</td></tr><tr><td>6</td><td>6</td><td>0110</td></tr><tr><td>7</td><td>7</td><td>0111</td></tr><tr><td>8</td><td>8</td><td>1000</td></tr><tr><td>9</td><td>9</td><td>1001</td></tr><tr><td>a</td><td>10</td><td>1010</td></tr><tr><td>b</td><td>11</td><td>1011</td></tr><tr><td>c</td><td>12</td><td>1100</td></tr><tr><td>d</td><td>13</td><td>1101</td></tr><tr><td>e</td><td>14</td><td>1110</td></tr><tr><td>f</td><td>15</td><td>1111</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>2001:0db8:0000:0000:0000:0000:0000:0001 contains eight groups. A compact representation is 2001:db8::1.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Describe the format of an IPv6 address and two abbreviation rules. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>An IPv6 address contains 128 bits, written as eight 16-bit hexadecimal groups. Leading zeros inside a group can be removed. One contiguous run of all-zero groups can be represented with ::, used at most once.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>2001:0db8:0000:0000:0000:0000:0000:0001 contains eight groups. A compact representation is 2001:db8::1.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> 8 groups × 4 hex digits × 4 bits = 128.</p>"},{"id":"expansion","title":"Expand :: by counting visible groups","html":"<p><strong>Definition.</strong> IPv6 expansion restores exactly eight groups, each written with four hexadecimal digits.</p><p><strong>Simple meaning.</strong> Visible groups count karo; 8 mein se minus; utne zero groups :: ki jagah.</p><h2>Understand it step by step</h2><ol><li>Count groups on the left of :: and on its right. The double colon itself is not an additional visible group.</li><li>Missing zero groups = 8−visible groups. Insert them at the location of ::.</li><li>Pad every group on the left with zeroes until it has four digits. Do not pad on the right.</li><li>Count the final result: exactly eight groups must appear. A written group “0” already counts as one visible group.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>In 0:15::1:12:1213, five groups are visible: 0,15,1,12,1213. Therefore :: supplies three groups of 0000, not four.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain how to expand an abbreviated IPv6 address containing ::. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Count all explicitly written groups. Insert 8 minus this count all-zero groups at ::, then left-pad every group to four hexadecimal digits. The result must contain exactly eight groups.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>In 0:15::1:12:1213, five groups are visible: 0,15,1,12,1213. Therefore :: supplies three groups of 0000, not four.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Already-written 0 ko bhi count karna.</p>"},{"id":"expand-1","title":"Expand IPv6 · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Expand the IPv6 address 0:15::1:12:1213 into eight groups of four hexadecimal digits. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Given address: <code>0:15::1:12:1213</code>.</p><h2>To find</h2><p>The full 128-bit address in eight-group hexadecimal notation.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/a013f99fcbb0987c.svg\" alt=\"\\text{missing groups}=8-\\text{visible groups}\" style=\"width:34.708ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>A written 0 is a visible group. :: represents only the omitted all-zero groups.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count groups on both sides</h4><p>Left: 0, 15 (2 group(s)). Right: 1, 12, 1213 (3 group(s)).</p></div><div class=\"step\"><h4>Step 2. Calculate omitted groups</h4><p>Visible=2+3=5. Missing=8−5=3.</p></div><div class=\"step\"><h4>Step 3. Insert the groups</h4><p><code>0:15:0:0:0:1:12:1213</code>.</p></div><div class=\"step\"><h4>Step 4. Pad each group on the left</h4><table><thead><tr><th scope=\"col\">Group number</th><th scope=\"col\">Four-digit group</th></tr></thead><tbody><tr><td>1</td><td>0000</td></tr><tr><td>2</td><td>0015</td></tr><tr><td>3</td><td>0000</td></tr><tr><td>4</td><td>0000</td></tr><tr><td>5</td><td>0000</td></tr><tr><td>6</td><td>0001</td></tr><tr><td>7</td><td>0012</td></tr><tr><td>8</td><td>1213</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Write all eight in order</h4><p><code>0000:0015:0000:0000:0000:0001:0012:1213</code>.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>0000:0015:0000:0000:0000:0001:0012:1213</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>Leading zeros change the spelling, not the address value. The final group count is eight.</p></aside></div></section>"},{"id":"expand-2","title":"Expand IPv6 · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Expand the IPv6 address 2001:db8:0:1::9 into eight groups of four hexadecimal digits. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Given address: <code>2001:db8:0:1::9</code>.</p><h2>To find</h2><p>The full 128-bit address in eight-group hexadecimal notation.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/a013f99fcbb0987c.svg\" alt=\"\\text{missing groups}=8-\\text{visible groups}\" style=\"width:34.708ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>A written 0 is a visible group. :: represents only the omitted all-zero groups.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count groups on both sides</h4><p>Left: 2001, db8, 0, 1 (4 group(s)). Right: 9 (1 group(s)).</p></div><div class=\"step\"><h4>Step 2. Calculate omitted groups</h4><p>Visible=4+1=5. Missing=8−5=3.</p></div><div class=\"step\"><h4>Step 3. Insert the groups</h4><p><code>2001:db8:0:1:0:0:0:9</code>.</p></div><div class=\"step\"><h4>Step 4. Pad each group on the left</h4><table><thead><tr><th scope=\"col\">Group number</th><th scope=\"col\">Four-digit group</th></tr></thead><tbody><tr><td>1</td><td>2001</td></tr><tr><td>2</td><td>0db8</td></tr><tr><td>3</td><td>0000</td></tr><tr><td>4</td><td>0001</td></tr><tr><td>5</td><td>0000</td></tr><tr><td>6</td><td>0000</td></tr><tr><td>7</td><td>0000</td></tr><tr><td>8</td><td>0009</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Write all eight in order</h4><p><code>2001:0db8:0000:0001:0000:0000:0000:0009</code>.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>2001:0db8:0000:0001:0000:0000:0000:0009</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>Leading zeros change the spelling, not the address value. The final group count is eight.</p></aside></div></section>"},{"id":"expand-3","title":"Expand IPv6 · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Expand the IPv6 address ::1 into eight groups of four hexadecimal digits. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Given address: <code>::1</code>.</p><h2>To find</h2><p>The full 128-bit address in eight-group hexadecimal notation.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/a013f99fcbb0987c.svg\" alt=\"\\text{missing groups}=8-\\text{visible groups}\" style=\"width:34.708ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>A written 0 is a visible group. :: represents only the omitted all-zero groups.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count groups on both sides</h4><p>Left: none (0 group(s)). Right: 1 (1 group(s)).</p></div><div class=\"step\"><h4>Step 2. Calculate omitted groups</h4><p>Visible=0+1=1. Missing=8−1=7.</p></div><div class=\"step\"><h4>Step 3. Insert the groups</h4><p><code>0:0:0:0:0:0:0:1</code>.</p></div><div class=\"step\"><h4>Step 4. Pad each group on the left</h4><table><thead><tr><th scope=\"col\">Group number</th><th scope=\"col\">Four-digit group</th></tr></thead><tbody><tr><td>1</td><td>0000</td></tr><tr><td>2</td><td>0000</td></tr><tr><td>3</td><td>0000</td></tr><tr><td>4</td><td>0000</td></tr><tr><td>5</td><td>0000</td></tr><tr><td>6</td><td>0000</td></tr><tr><td>7</td><td>0000</td></tr><tr><td>8</td><td>0001</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Write all eight in order</h4><p><code>0000:0000:0000:0000:0000:0000:0000:0001</code>.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>0000:0000:0000:0000:0000:0000:0000:0001</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>Leading zeros change the spelling, not the address value. The final group count is eight.</p></aside></div></section>"},{"id":"expand-4","title":"Expand IPv6 · example 4","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Expand the IPv6 address fe80::abcd:ef12 into eight groups of four hexadecimal digits. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Given address: <code>fe80::abcd:ef12</code>.</p><h2>To find</h2><p>The full 128-bit address in eight-group hexadecimal notation.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/a013f99fcbb0987c.svg\" alt=\"\\text{missing groups}=8-\\text{visible groups}\" style=\"width:34.708ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>A written 0 is a visible group. :: represents only the omitted all-zero groups.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count groups on both sides</h4><p>Left: fe80 (1 group(s)). Right: abcd, ef12 (2 group(s)).</p></div><div class=\"step\"><h4>Step 2. Calculate omitted groups</h4><p>Visible=1+2=3. Missing=8−3=5.</p></div><div class=\"step\"><h4>Step 3. Insert the groups</h4><p><code>fe80:0:0:0:0:0:abcd:ef12</code>.</p></div><div class=\"step\"><h4>Step 4. Pad each group on the left</h4><table><thead><tr><th scope=\"col\">Group number</th><th scope=\"col\">Four-digit group</th></tr></thead><tbody><tr><td>1</td><td>fe80</td></tr><tr><td>2</td><td>0000</td></tr><tr><td>3</td><td>0000</td></tr><tr><td>4</td><td>0000</td></tr><tr><td>5</td><td>0000</td></tr><tr><td>6</td><td>0000</td></tr><tr><td>7</td><td>abcd</td></tr><tr><td>8</td><td>ef12</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Write all eight in order</h4><p><code>fe80:0000:0000:0000:0000:0000:abcd:ef12</code>.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>fe80:0000:0000:0000:0000:0000:abcd:ef12</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>Leading zeros change the spelling, not the address value. The final group count is eight.</p></aside></div></section>"},{"id":"compression","title":"Write the shortest standard IPv6 representation","html":"<p><strong>Definition.</strong> Canonical IPv6 text formatting removes leading zeros and compresses the longest eligible run of consecutive zero groups.</p><p><strong>Simple meaning.</strong> Group ke left wale zero hatao; sabse lambi zero-chain ko :: banao.</p><h2>Understand it step by step</h2><ol><li>Remove leading zeroes from each group, retaining one zero if the whole group is zero. Use lowercase hex letters for canonical text.</li><li>Select the longest run of consecutive zero groups. If two runs tie, compress the leftmost run.</li><li>For the recommended canonical form, do not use :: to compress just one zero group.</li><li>Use :: only once. Expanding your compressed result should recover the original address.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>2001:0db8:0000:0000:0012:0000:0000:0001 has two equal two-zero runs. Compress the first: 2001:db8::12:0:0:1.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. State the canonical rule when two zero runs have equal length in IPv6. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Compress the leftmost of the equal longest runs. Leading zeros in groups are removed and hexadecimal letters are lowercase. A single zero group is retained as 0 rather than compressed to :: in canonical text.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>2001:0db8:0000:0000:0012:0000:0000:0001 has two equal two-zero runs. Compress the first: 2001:db8::12:0:0:1.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Longest first; tie hua toh leftmost.</p>"},{"id":"compress-1","title":"Compress IPv6 · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Write 2001:0db8:0000:0000:0012:0000:0000:0001 in canonical compressed IPv6 notation. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p><code>2001:0db8:0000:0000:0012:0000:0000:0001</code>.</p><h2>To find</h2><p>A canonical shortened spelling of the same address.</p><h2>Formula and why</h2><p>Remove leading zeroes; compress the longest run of at least two zero groups; choose the leftmost tied run.</p><p>These rules preserve all 128 bits while removing redundant writing.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Shorten individual groups</h4><p><code>2001:db8:0:0:12:0:0:1</code>.</p></div><div class=\"step\"><h4>Step 2. Locate zero runs</h4><p>groups 3–4: 2 zero group(s); groups 6–7: 2 zero group(s).</p></div><div class=\"step\"><h4>Step 3. Select an eligible run</h4><p>Compress groups 3–4.</p></div><div class=\"step\"><h4>Step 4. Write the result</h4><p><code>2001:db8::12:0:0:1</code>.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>2001:db8::12:0:0:1</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>The address remains unchanged; only its representation is shortened.</p></aside></div></section>"},{"id":"compress-2","title":"Compress IPv6 · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Write 2001:0db8:0000:0001:0002:0003:0004:0005 in canonical compressed IPv6 notation. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p><code>2001:0db8:0000:0001:0002:0003:0004:0005</code>.</p><h2>To find</h2><p>A canonical shortened spelling of the same address.</p><h2>Formula and why</h2><p>Remove leading zeroes; compress the longest run of at least two zero groups; choose the leftmost tied run.</p><p>These rules preserve all 128 bits while removing redundant writing.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Shorten individual groups</h4><p><code>2001:db8:0:1:2:3:4:5</code>.</p></div><div class=\"step\"><h4>Step 2. Locate zero runs</h4><p>groups 3–3: 1 zero group(s).</p></div><div class=\"step\"><h4>Step 3. Select an eligible run</h4><p>No run has two or more groups, so do not use ::.</p></div><div class=\"step\"><h4>Step 4. Write the result</h4><p><code>2001:db8:0:1:2:3:4:5</code>.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>2001:db8:0:1:2:3:4:5</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>The address remains unchanged; only its representation is shortened.</p></aside></div></section>"},{"id":"compress-3","title":"Compress IPv6 · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Write 0000:0000:0000:0000:0000:0000:0000:0000 in canonical compressed IPv6 notation. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p><code>0000:0000:0000:0000:0000:0000:0000:0000</code>.</p><h2>To find</h2><p>A canonical shortened spelling of the same address.</p><h2>Formula and why</h2><p>Remove leading zeroes; compress the longest run of at least two zero groups; choose the leftmost tied run.</p><p>These rules preserve all 128 bits while removing redundant writing.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Shorten individual groups</h4><p><code>0:0:0:0:0:0:0:0</code>.</p></div><div class=\"step\"><h4>Step 2. Locate zero runs</h4><p>groups 1–8: 8 zero group(s).</p></div><div class=\"step\"><h4>Step 3. Select an eligible run</h4><p>Compress groups 1–8.</p></div><div class=\"step\"><h4>Step 4. Write the result</h4><p><code>::</code>.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>::</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>The address remains unchanged; only its representation is shortened.</p></aside></div></section>"},{"id":"header","title":"IPv6 base header: every field and its purpose","html":"<p><strong>Definition.</strong> The IPv6 base header is a fixed 40-byte structure containing addressing and forwarding-control fields, followed by optional extension headers and upper-layer data.</p><p><strong>Simple meaning.</strong> Base header fixed 40 bytes; extra information extension headers mein.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ipv6-header.aef1bfbac7.svg\" width=\"820\" height=\"410\" alt=\"IPv6 base header · each horizontal row is 32 bits wide\" loading=\"lazy\" decoding=\"async\"></div><figcaption>IPv6 base header: every field and its purpose</figcaption></figure><h2>Understand it step by step</h2><ol><li>Read the header from its control fields to its two 128-bit addresses. Four plus eight plus twenty bits fills the first 32-bit row.</li><li>The first two rows together contribute 64 bits; source and destination contribute 256 bits. Total=320 bits=40 bytes.</li><li>Payload Length counts bytes after the base header, including extension headers when present. It does not include the base 40 bytes.</li><li>Next Header permits chaining: a base header may point to an extension, which points to another extension or TCP/UDP.</li><li>The Hop Limit is reduced by forwarding nodes to prevent indefinite circulation. IPv6 has no base-header checksum, and routers do not fragment IPv6 packets.</li></ol><table><thead><tr><th scope=\"col\">Field</th><th scope=\"col\">Bits</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Version</td><td>4</td><td>Value 6</td></tr><tr><td>Traffic Class</td><td>8</td><td>Traffic treatment/congestion-related marking</td></tr><tr><td>Flow Label</td><td>20</td><td>Identifies a flow for appropriate handling</td></tr><tr><td>Payload Length</td><td>16</td><td>Bytes after the base header; includes extension headers when present</td></tr><tr><td>Next Header</td><td>8</td><td>Type of the next extension header or upper-layer protocol</td></tr><tr><td>Hop Limit</td><td>8</td><td>Decremented on forwarding; limits packet lifetime in hops</td></tr><tr><td>Source address</td><td>128</td><td>Sending interface address</td></tr><tr><td>Destination address</td><td>128</td><td>Destination address</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>With a 20-byte extension header and 1,000 bytes of upper-layer content, Payload Length is 1,020 bytes and the total IPv6 packet is 1,060 bytes in the ordinary non-jumbo case.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Draw the IPv6 base header and explain its fields. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ipv6-header.aef1bfbac7.svg\" width=\"820\" height=\"410\" alt=\"IPv6 base header · each horizontal row is 32 bits wide\" loading=\"lazy\" decoding=\"async\"></div><figcaption>IPv6 base header: 40 bytes.</figcaption></figure><table><thead><tr><th scope=\"col\">Field</th><th scope=\"col\">Bits</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Version</td><td>4</td><td>Value 6</td></tr><tr><td>Traffic Class</td><td>8</td><td>Traffic treatment/congestion-related marking</td></tr><tr><td>Flow Label</td><td>20</td><td>Identifies a flow for appropriate handling</td></tr><tr><td>Payload Length</td><td>16</td><td>Bytes after the base header; includes extension headers when present</td></tr><tr><td>Next Header</td><td>8</td><td>Type of the next extension header or upper-layer protocol</td></tr><tr><td>Hop Limit</td><td>8</td><td>Decremented on forwarding; limits packet lifetime in hops</td></tr><tr><td>Source address</td><td>128</td><td>Sending interface address</td></tr><tr><td>Destination address</td><td>128</td><td>Destination address</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>With a 20-byte extension header and 1,000 bytes of upper-layer content, Payload Length is 1,020 bytes and the total IPv6 packet is 1,060 bytes in the ordinary non-jumbo case.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> IPv6: 40 fixed; payload field excludes those 40.</p>"},{"id":"compare","title":"IPv4 versus IPv6 headers and address types","html":"<p><strong>Definition.</strong> IPv6 extends address size and reorganizes IP forwarding information into a fixed base header with extension headers.</p><p><strong>Simple meaning.</strong> Sirf address bada nahi; header ka arrangement bhi badla.</p><h2>Understand it step by step</h2><ol><li>IPv6 uses unicast, multicast and anycast addressing; it does not use IPv4-style broadcast addressing.</li><li>Unicast identifies an interface; multicast addresses a group; anycast reaches one appropriate member of a group sharing an address, according to routing.</li><li>::1 is loopback. fe80::/10 is link-local space. ff00::/8 identifies multicast. These serve different purposes.</li><li>IPv6 neighbour discovery replaces IPv4 ARP mechanisms. Do not write that IPv6 uses ARP to map its addresses.</li><li>IPv6 is not automatically encrypted or secure merely because it has a larger address space. Security depends on the mechanisms deployed.</li></ol><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">IPv4</th><th scope=\"col\">IPv6</th></tr></thead><tbody><tr><td>Address width</td><td>32 bits</td><td>128 bits</td></tr><tr><td>Base/header size</td><td>20–60 bytes depending on options</td><td>40-byte fixed base header</td></tr><tr><td>Length field</td><td>Total length includes IPv4 header</td><td>Payload Length excludes 40-byte base header</td></tr><tr><td>Lifetime field</td><td>TTL</td><td>Hop Limit</td></tr><tr><td>Following protocol</td><td>Protocol field</td><td>Next Header; may identify an extension</td></tr><tr><td>Header checksum</td><td>Present</td><td>No base-header checksum</td></tr><tr><td>Options</td><td>Inside IPv4 header</td><td>Typically extension headers</td></tr><tr><td>Fragmentation fields</td><td>In IPv4 header; routers may fragment if permitted</td><td>Fragment extension header; fragmentation by source, not routers</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A router handling an oversized IPv6 packet cannot fragment it on behalf of the source; the source must respond to path-MTU information and use an appropriate packet size or source fragmentation.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Compare the IPv4 and IPv6 packet headers. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">IPv4</th><th scope=\"col\">IPv6</th></tr></thead><tbody><tr><td>Address width</td><td>32 bits</td><td>128 bits</td></tr><tr><td>Base/header size</td><td>20–60 bytes depending on options</td><td>40-byte fixed base header</td></tr><tr><td>Length field</td><td>Total length includes IPv4 header</td><td>Payload Length excludes 40-byte base header</td></tr><tr><td>Lifetime field</td><td>TTL</td><td>Hop Limit</td></tr><tr><td>Following protocol</td><td>Protocol field</td><td>Next Header; may identify an extension</td></tr><tr><td>Header checksum</td><td>Present</td><td>No base-header checksum</td></tr><tr><td>Options</td><td>Inside IPv4 header</td><td>Typically extension headers</td></tr><tr><td>Fragmentation fields</td><td>In IPv4 header; routers may fragment if permitted</td><td>Fragment extension header; fragmentation by source, not routers</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A router handling an oversized IPv6 packet cannot fragment it on behalf of the source; the source must respond to path-MTU information and use an appropriate packet size or source fragmentation.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> v4 total length; v6 payload length.</p>"},{"id":"length-1","title":"IPv6 packet length · example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. An IPv6 packet has a 40-byte base header, 0 bytes of extension headers and 1000 bytes of upper-layer content. Find its Payload Length field value and total packet length. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Base=40 bytes; extensions=0 bytes; upper-layer content=1000 bytes. Ordinary non-jumbo packet.</p><h2>To find</h2><p>Payload Length and total bytes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/30fbafad36710670.svg\" alt=\"P=E+D,\\qquad T=40+P\" style=\"width:27.952ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>Payload begins immediately after the IPv6 base header. Extensions are part of that payload.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate payload</h4><p>P=0+1000=1000 bytes.</p></div><div class=\"step\"><h4>Step 2. Add the base header</h4><p>T=40+1000=1040 bytes.</p></div><div class=\"step\"><h4>Step 3. Identify the stored field</h4><p>The Payload Length field stores 1000, not 1040.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Payload Length=1000; total=1040 bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Do not count the base header twice or leave extension-header bytes out of the payload length.</p></aside></div></section>"},{"id":"length-2","title":"IPv6 packet length · example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. An IPv6 packet has a 40-byte base header, 24 bytes of extension headers and 1200 bytes of upper-layer content. Find its Payload Length field value and total packet length. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Base=40 bytes; extensions=24 bytes; upper-layer content=1200 bytes. Ordinary non-jumbo packet.</p><h2>To find</h2><p>Payload Length and total bytes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/30fbafad36710670.svg\" alt=\"P=E+D,\\qquad T=40+P\" style=\"width:27.952ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>Payload begins immediately after the IPv6 base header. Extensions are part of that payload.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate payload</h4><p>P=24+1200=1224 bytes.</p></div><div class=\"step\"><h4>Step 2. Add the base header</h4><p>T=40+1224=1264 bytes.</p></div><div class=\"step\"><h4>Step 3. Identify the stored field</h4><p>The Payload Length field stores 1224, not 1264.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Payload Length=1224; total=1264 bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Do not count the base header twice or leave extension-header bytes out of the payload length.</p></aside></div></section>"},{"id":"length-3","title":"IPv6 packet length · example 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. An IPv6 packet has a 40-byte base header, 40 bytes of extension headers and 500 bytes of upper-layer content. Find its Payload Length field value and total packet length. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Base=40 bytes; extensions=40 bytes; upper-layer content=500 bytes. Ordinary non-jumbo packet.</p><h2>To find</h2><p>Payload Length and total bytes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/30fbafad36710670.svg\" alt=\"P=E+D,\\qquad T=40+P\" style=\"width:27.952ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>Payload begins immediately after the IPv6 base header. Extensions are part of that payload.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate payload</h4><p>P=40+500=540 bytes.</p></div><div class=\"step\"><h4>Step 2. Add the base header</h4><p>T=40+540=580 bytes.</p></div><div class=\"step\"><h4>Step 3. Identify the stored field</h4><p>The Payload Length field stores 540, not 580.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Payload Length=540; total=580 bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Do not count the base header twice or leave extension-header bytes out of the payload length.</p></aside></div></section>"}]},{"id":"mapping","title":"ARP, RARP and DHCP","scope":"Unit 4 · address mapping and configuration","sections":[{"id":"arp","title":"ARP: find the local next-hop MAC address","html":"<p><strong>Definition.</strong> Address Resolution Protocol (ARP) resolves a known IPv4 address to a link-layer hardware address on the local network.</p><p><strong>Simple meaning.</strong> IP pata hai; local delivery ke liye MAC chahiye.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/arp.c8af39ddb3.svg\" width=\"820\" height=\"540\" alt=\"ARP resolves the selected local next hop\" loading=\"lazy\" decoding=\"async\"></div><figcaption>ARP: find the local next-hop MAC address</figcaption></figure><h2>Understand it step by step</h2><ol><li>First determine whether the destination is on the local subnet. If local, the next hop is the destination itself. If remote, the next hop is a router such as the default gateway.</li><li>Check the ARP cache. If the next-hop mapping is absent, broadcast an ARP request on the local link.</li><li>The owner of the requested IPv4 address normally replies with its hardware address. The sender caches the mapping and constructs its data frame.</li><li>Routers do not normally forward a host’s ARP broadcast across networks. ARP resolves the next hop, not the MAC of a remote Internet server.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Host 192.168.1.10/24 sending to 192.168.1.20 asks for .20’s MAC. Sending to 203.0.113.7 through gateway 192.168.1.1 asks for the gateway’s MAC instead.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain the working of ARP with a suitable example. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>ARP maps a known local next-hop IPv4 address to a hardware address. A sender broadcasts a request when the mapping is missing; the address owner replies, and the mapping is cached. For a remote IP destination, the sender resolves its gateway’s local MAC address, then forwards the packet toward that gateway.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Host 192.168.1.10/24 sending to 192.168.1.20 asks for .20’s MAC. Sending to 203.0.113.7 through gateway 192.168.1.1 asks for the gateway’s MAC instead.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Remote packet ka next-hop MAC gateway ka hota hai.</p>"},{"id":"next-hop-1","title":"ARP decision · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Host H has 192.168.1.10/24, and its gateway is 192.168.1.1. H sends a packet to 192.168.1.20. Decide whether delivery is local and which IPv4 address H resolves using ARP. Assume the mapping is not cached. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>H=192.168.1.10/24; gateway=192.168.1.1; destination=192.168.1.20.</p><h2>To find</h2><p>Local/remote decision and ARP target.</p><h2>Formula and why</h2><p>Compare source and destination network prefixes using the source mask. ARP resolves the selected local next-hop IP.</p><p>The IP destination stays the final destination; the Ethernet next-hop address depends on whether that destination is local.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Determine H’s subnet</h4><p>With /24, H is in 192.168.1.0–192.168.1.255.</p></div><div class=\"step\"><h4>Step 2. Compare the destination</h4><p>192.168.1.20 is inside that block, so delivery is local.</p></div><div class=\"step\"><h4>Step 3. Select ARP target</h4><p>Resolve 192.168.1.20 using ARP.</p></div><div class=\"step\"><h4>Step 4. Separate packet and frame destinations</h4><p>IP destination remains 192.168.1.20; frame destination is that host’s MAC.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> ARP target: 192.168.1.20.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>ARP is a local-link operation. A remote packet is sent to a local router for its next step.</p></aside></div></section>"},{"id":"next-hop-2","title":"ARP decision · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Host H has 192.168.1.10/24, and its gateway is 192.168.1.1. H sends a packet to 203.0.113.7. Decide whether delivery is local and which IPv4 address H resolves using ARP. Assume the mapping is not cached. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>H=192.168.1.10/24; gateway=192.168.1.1; destination=203.0.113.7.</p><h2>To find</h2><p>Local/remote decision and ARP target.</p><h2>Formula and why</h2><p>Compare source and destination network prefixes using the source mask. ARP resolves the selected local next-hop IP.</p><p>The IP destination stays the final destination; the Ethernet next-hop address depends on whether that destination is local.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Determine H’s subnet</h4><p>With /24, H is in 192.168.1.0–192.168.1.255.</p></div><div class=\"step\"><h4>Step 2. Compare the destination</h4><p>203.0.113.7 is outside that block, so use a router.</p></div><div class=\"step\"><h4>Step 3. Select ARP target</h4><p>Resolve 192.168.1.1 using ARP.</p></div><div class=\"step\"><h4>Step 4. Separate packet and frame destinations</h4><p>IP destination remains 203.0.113.7; frame destination is the gateway’s MAC.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> ARP target: 192.168.1.1.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>ARP is a local-link operation. A remote packet is sent to a local router for its next step.</p></aside></div></section>"},{"id":"next-hop-3","title":"ARP decision · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Host H has 192.168.1.10/24, and its gateway is 192.168.1.1. H sends a packet to 192.168.2.20. Decide whether delivery is local and which IPv4 address H resolves using ARP. Assume the mapping is not cached. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>H=192.168.1.10/24; gateway=192.168.1.1; destination=192.168.2.20.</p><h2>To find</h2><p>Local/remote decision and ARP target.</p><h2>Formula and why</h2><p>Compare source and destination network prefixes using the source mask. ARP resolves the selected local next-hop IP.</p><p>The IP destination stays the final destination; the Ethernet next-hop address depends on whether that destination is local.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Determine H’s subnet</h4><p>With /24, H is in 192.168.1.0–192.168.1.255.</p></div><div class=\"step\"><h4>Step 2. Compare the destination</h4><p>192.168.2.20 is outside that block, so use a router.</p></div><div class=\"step\"><h4>Step 3. Select ARP target</h4><p>Resolve 192.168.1.1 using ARP.</p></div><div class=\"step\"><h4>Step 4. Separate packet and frame destinations</h4><p>IP destination remains 192.168.2.20; frame destination is the gateway’s MAC.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> ARP target: 192.168.1.1.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>ARP is a local-link operation. A remote packet is sent to a local router for its next step.</p></aside></div></section>"},{"id":"rarp","title":"RARP: the reverse historical mapping","html":"<p><strong>Definition.</strong> Reverse ARP (RARP) allows a client that knows its hardware address to obtain its IPv4 address from a RARP server.</p><p><strong>Simple meaning.</strong> ARP: IP se MAC. RARP: MAC se IP.</p><h2>Understand it step by step</h2><ol><li>Historically, a diskless machine could know its hardware address but need its configured IP address during boot.</li><li>It broadcasts a RARP request containing its hardware address. A server consults a configured mapping and returns an IP address.</li><li>RARP supplies much less configuration than DHCP and operates at the local link level. It is mainly a historical protocol in this syllabus.</li><li>Do not describe RARP as finding an arbitrary remote host by name; DNS is a different service and outside this M2 portion.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A diskless workstation with a pre-registered hardware address could use RARP to learn its assigned IPv4 address from a local RARP server.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Differentiate ARP and RARP. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Protocol</th><th scope=\"col\">Known</th><th scope=\"col\">Needed</th><th scope=\"col\">Use</th></tr></thead><tbody><tr><td>ARP</td><td>Local next-hop IPv4</td><td>MAC/hardware address</td><td>Local frame delivery</td></tr><tr><td>RARP</td><td>Client hardware address</td><td>Client IPv4</td><td>Historical boot-time assignment</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A diskless workstation with a pre-registered hardware address could use RARP to learn its assigned IPv4 address from a local RARP server.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> RARP reverse karta hai; DHCP configuration badhata hai.</p>"},{"id":"dhcp","title":"DHCP: automatic configuration through DORA","html":"<p><strong>Definition.</strong> Dynamic Host Configuration Protocol (DHCP) provides IP configuration parameters to clients and can lease reusable addresses for limited periods.</p><p><strong>Simple meaning.</strong> DORA = Discover, Offer, Request, Acknowledge.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/dhcp.510e8eca42.svg\" width=\"820\" height=\"470\" alt=\"DHCP initial allocation: DORA\" loading=\"lazy\" decoding=\"async\"></div><figcaption>DHCP: automatic configuration through DORA</figcaption></figure><h2>Understand it step by step</h2><ol><li><strong>Discover:</strong> a new client looks for DHCP servers. With no configured IPv4 address, it commonly starts from 0.0.0.0 and uses broadcast discovery.</li><li><strong>Offer:</strong> a server offers an address and configuration, such as subnet mask, lease information and other options.</li><li><strong>Request:</strong> the client indicates the selected offer and requested address. In initial allocation this also informs other servers of its choice.</li><li><strong>Acknowledge:</strong> the selected server confirms the lease/configuration. The client can then use the address after the required checks.</li><li>DHCPv4 uses UDP server port 67 and client port 68. A DHCP relay can carry requests between a client subnet and a server elsewhere; ordinary routers do not simply forward local broadcasts by default.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>When a laptop joins a campus network, DHCP can supply its address, mask, gateway and DNS-server option. It does not itself resolve website names; it can tell the laptop which DNS server to use.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain the four initial DHCP messages and state its purpose. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><ol><li>DHCPDISCOVER: client searches for a server.</li><li>DHCPOFFER: server proposes an address/configuration.</li><li>DHCPREQUEST: client requests the chosen allocation.</li><li>DHCPACK: server confirms the lease.</li></ol><p>DHCP reduces manual configuration and supports controlled address reuse through leases.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>When a laptop joins a campus network, DHCP can supply its address, mask, gateway and DNS-server option. It does not itself resolve website names; it can tell the laptop which DNS server to use.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Discover–Offer–Request–ACK; pehle D, phir O, phir R, phir A.</p>"},{"id":"lease","title":"DHCP leases, renewal and a relay","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><p><strong>Definition.</strong> A DHCP lease grants use of an address for a specified lifetime; renewal extends that permission, while a relay supports communication across subnets.</p><p><strong>Simple meaning.</strong> Address permanent gift nahi: time-limited lease, phir renew.</p><h2>Understand it step by step</h2><ol><li>In ordinary DHCPv4 defaults, renewal begins at T1=50% of the lease and rebinding at T2=87.5%, unless the server supplies different values.</li><li>At T1 a client attempts renewal with its original server. At T2 it can seek renewal from any suitable server.</li><li>If the lease expires without extension, the client must stop using the leased address. Successful renewal restarts the relevant lease timing.</li><li>A relay forwards DHCP messages between subnets. It is not the same as a router forwarding every broadcast indiscriminately.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>For an 8-hour lease with default timers, T1 is 4 hours and T2 is 7 hours after lease acquisition. These defaults must not override explicit timers in the question.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. What is a DHCP lease? Why is a DHCP relay used? <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A lease permits a client to use its assigned address for a limited period and may be renewed. A relay conveys DHCP messages between a client subnet and a remote DHCP server, allowing centralized configuration without placing a server on every subnet.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>For an 8-hour lease with default timers, T1 is 4 hours and T2 is 7 hours after lease acquisition. These defaults must not override explicit timers in the question.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Lease = limited time; relay = subnet ke paar DHCP support.</p>"},{"id":"lease-1","title":"DHCP timer example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A DHCPv4 lease lasts 8 hours. No different T1 or T2 values are supplied. Find the default renewal and rebinding times after lease acquisition. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Lease duration L=8 h; use default fractional timers.</p><h2>To find</h2><p>T1 and T2 as elapsed times.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ca97cfd9b6235ae7.svg\" alt=\"T_1=0.5L,\\qquad T_2=0.875L\" style=\"width:27.31ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use these defaults only when the server/question has not specified other timer values.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Renewal timer</h4><p>T1=0.5×8=4 h.</p></div><div class=\"step\"><h4>Step 2. Rebinding timer</h4><p>T2=0.875×8=7 h.</p></div><div class=\"step\"><h4>Step 3. Place them before expiry</h4><p>4 h &lt; 7 h &lt; 8 h.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> T1=4 h; T2=7 h.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>These are elapsed times, not wall-clock times. Add them to the stated acquisition time only when a clock time is requested.</p></aside></div></section>"},{"id":"lease-2","title":"DHCP timer example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A DHCPv4 lease lasts 16 hours. No different T1 or T2 values are supplied. Find the default renewal and rebinding times after lease acquisition. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Lease duration L=16 h; use default fractional timers.</p><h2>To find</h2><p>T1 and T2 as elapsed times.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ca97cfd9b6235ae7.svg\" alt=\"T_1=0.5L,\\qquad T_2=0.875L\" style=\"width:27.31ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use these defaults only when the server/question has not specified other timer values.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Renewal timer</h4><p>T1=0.5×16=8 h.</p></div><div class=\"step\"><h4>Step 2. Rebinding timer</h4><p>T2=0.875×16=14 h.</p></div><div class=\"step\"><h4>Step 3. Place them before expiry</h4><p>8 h &lt; 14 h &lt; 16 h.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> T1=8 h; T2=14 h.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>These are elapsed times, not wall-clock times. Add them to the stated acquisition time only when a clock time is requested.</p></aside></div></section>"},{"id":"lease-3","title":"DHCP timer example 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A DHCPv4 lease lasts 24 hours. No different T1 or T2 values are supplied. Find the default renewal and rebinding times after lease acquisition. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Lease duration L=24 h; use default fractional timers.</p><h2>To find</h2><p>T1 and T2 as elapsed times.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ca97cfd9b6235ae7.svg\" alt=\"T_1=0.5L,\\qquad T_2=0.875L\" style=\"width:27.31ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use these defaults only when the server/question has not specified other timer values.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Renewal timer</h4><p>T1=0.5×24=12 h.</p></div><div class=\"step\"><h4>Step 2. Rebinding timer</h4><p>T2=0.875×24=21 h.</p></div><div class=\"step\"><h4>Step 3. Place them before expiry</h4><p>12 h &lt; 21 h &lt; 24 h.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> T1=12 h; T2=21 h.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>These are elapsed times, not wall-clock times. Add them to the stated acquisition time only when a clock time is requested.</p></aside></div></section>"}]},{"id":"routing","title":"Routing: build the shortest path one step at a time","scope":"Unit 4 · shortest paths and routing tables","sections":[{"id":"vocabulary","title":"Routing, forwarding, distance and next hop","html":"<p><strong>Definition.</strong> Routing discovers or computes paths through a network; forwarding uses a table to send an individual packet toward the selected next hop.</p><p><strong>Simple meaning.</strong> Routing table banata hai; forwarding us table ko use karta hai.</p><h2>Understand it step by step</h2><ol><li>A route contains a destination prefix and an outgoing interface or next hop. A metric measures the desirability/cost of that route.</li><li>A path is a sequence of permitted edges. Its weighted cost is the sum of the edge weights, not merely the number of vertices drawn.</li><li>A shortest-path algorithm maintains a tentative distance from the source to each vertex. Start the source at 0 and all others at ∞.</li><li>A predecessor records the vertex just before a destination on the chosen path. Trace predecessors backward, then reverse the list to obtain the path in forward order.</li><li>A next hop is the first router after the source on that path. It is different from a final destination’s immediate predecessor.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>For path A→C→D→G, G’s predecessor is D, but A’s next hop toward G is C.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Differentiate routing and forwarding, with an example. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Routing determines suitable network paths and produces routing/forwarding information. Forwarding applies that information to a particular packet. If A has learned that network X is reached through B, computing that choice is routing and sending a packet to B is forwarding.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>For path A→C→D→G, G’s predecessor is D, but A’s next hop toward G is C.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Predecessor = pichhla node; next hop = source ke baad pehla node.</p>"},{"id":"relaxation","title":"Relaxation: replace an old route only when the candidate is cheaper","html":"<p><strong>Definition.</strong> Relaxing an edge u→v compares the existing distance to v with a candidate path that reaches u first and then crosses the edge to v.</p><p><strong>Simple meaning.</strong> Purana cost versus u tak ka cost + u→v edge. Jo chhota, woh rakho.</p><h2>Understand it step by step</h2><ol><li>Suppose d[u]=4, edge cost w(u,v)=3, and current d[v]=10. The candidate via u is 4+3=7.</li><li>Because 7&lt;10, replace d[v] with 7 and set predecessor[v]=u.</li><li>If the current d[v] were 6, keep 6 because candidate 7 is worse. Equal costs need a stated tie rule; keeping the existing predecessor is valid.</li><li>If u is unreachable (d[u]=∞), it cannot yet provide a finite route to v.</li></ol><div class=\"math-display\"><img src=\"math/96f918d5ce249dc4.svg\" alt=\"d[v]\\leftarrow\\min\\bigl(d[v],d[u]+w(u,v)\\bigr)\" style=\"width:30.704ex;height:2.713ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>Current route to D costs 10. A newly discovered route reaches C for 4 and C→D costs 3, so D improves to 7 via C.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. What does edge relaxation mean in a shortest-path algorithm? <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Relaxation evaluates candidate=d[u]+w(u,v). If the candidate is less than d[v], it updates d[v] and records u as predecessor. Otherwise the existing route is retained.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Current route to D costs 10. A newly discovered route reaches C for 4 and C→D costs 3, so D improves to 7 via C.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Add path + edge, compare, then replace only if smaller.</p>"},{"id":"relax-1","title":"One edge relaxation · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For edge U→V, d[U]=4, edge cost=3, and current d[V]=10. Relax this edge and state the new distance and whether the predecessor changes. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>d[U]=4; w(U,V)=3; old d[V]=10.</p><h2>To find</h2><p>New d[V] and predecessor action.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/e662a1e6810b8636.svg\" alt=\"c=d[U]+w(U,V),\\quad d[V]_{\\mathrm{new}}=\\min(d[V]_{\\mathrm{old}},c)\" style=\"width:46.209ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>The candidate contains both the cost to U and the final edge to V.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Compute candidate</h4><p>4+(3)=7.</p></div><div class=\"step\"><h4>Step 2. Compare with old distance</h4><p>min(10,7)=7.</p></div><div class=\"step\"><h4>Step 3. Update the predecessor if improved</h4><p>Set predecessor[V]=U.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> New d[V]=7.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A negative edge weight is allowed in Bellman–Ford exercises, but not in the standard Dijkstra method taught here.</p></aside></div></section>"},{"id":"relax-2","title":"One edge relaxation · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For edge U→V, d[U]=5, edge cost=4, and current d[V]=7. Relax this edge and state the new distance and whether the predecessor changes. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>d[U]=5; w(U,V)=4; old d[V]=7.</p><h2>To find</h2><p>New d[V] and predecessor action.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/e662a1e6810b8636.svg\" alt=\"c=d[U]+w(U,V),\\quad d[V]_{\\mathrm{new}}=\\min(d[V]_{\\mathrm{old}},c)\" style=\"width:46.209ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>The candidate contains both the cost to U and the final edge to V.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Compute candidate</h4><p>5+(4)=9.</p></div><div class=\"step\"><h4>Step 2. Compare with old distance</h4><p>min(7,9)=7.</p></div><div class=\"step\"><h4>Step 3. Update the predecessor if improved</h4><p>Keep the existing predecessor; the candidate does not improve the route.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> New d[V]=7.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A negative edge weight is allowed in Bellman–Ford exercises, but not in the standard Dijkstra method taught here.</p></aside></div></section>"},{"id":"relax-3","title":"One edge relaxation · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For edge U→V, d[U]=6, edge cost=-2, and current d[V]=9. Relax this edge and state the new distance and whether the predecessor changes. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>d[U]=6; w(U,V)=-2; old d[V]=9.</p><h2>To find</h2><p>New d[V] and predecessor action.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/e662a1e6810b8636.svg\" alt=\"c=d[U]+w(U,V),\\quad d[V]_{\\mathrm{new}}=\\min(d[V]_{\\mathrm{old}},c)\" style=\"width:46.209ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>The candidate contains both the cost to U and the final edge to V.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Compute candidate</h4><p>6+(-2)=4.</p></div><div class=\"step\"><h4>Step 2. Compare with old distance</h4><p>min(9,4)=4.</p></div><div class=\"step\"><h4>Step 3. Update the predecessor if improved</h4><p>Set predecessor[V]=U.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> New d[V]=4.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A negative edge weight is allowed in Bellman–Ford exercises, but not in the standard Dijkstra method taught here.</p></aside></div></section>"},{"id":"dijkstra","title":"Dijkstra: settle the closest unfinished vertex","html":"<p><strong>Definition.</strong> Dijkstra’s algorithm finds shortest paths from a source in a graph whose edge weights are nonnegative.</p><p><strong>Simple meaning.</strong> Sabse chhota unfinished distance select karo, phir uske neighbours improve karo.</p><h2>Understand it step by step</h2><ol><li>Initialize source distance 0, all others ∞, and no predecessors. No vertex is settled initially.</li><li>Select an unsettled vertex with minimum tentative distance. With nonnegative edges, its distance can now be finalized.</li><li>Relax each relevant outgoing edge: compare old distance with selected distance plus edge cost.</li><li>Repeat selection and relaxation. If all remaining distances are ∞, the remaining vertices are unreachable from the source.</li><li>Trace predecessors for the required destination. Always preserve arrow direction. Standard Dijkstra is not valid for graphs with negative edge costs.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>If tentative distances are B=4, C=2 and D=∞, settle C next. You choose using total source-to-vertex cost 2, not the smallest individual edge anywhere in the graph.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Describe Dijkstra’s shortest-path algorithm and its restriction. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><ol><li>Set source to 0 and other distances to infinity.</li><li>Repeatedly choose the unsettled vertex with minimum tentative distance.</li><li>Settle it and relax its outgoing edges.</li><li>Recover paths using predecessors.</li></ol><p>The standard algorithm requires nonnegative edge weights.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>If tentative distances are B=4, C=2 and D=∞, settle C next. You choose using total source-to-vertex cost 2, not the smallest individual edge anywhere in the graph.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Minimum tentative total choose; negative edges pe Dijkstra nahi.</p>"},{"id":"dijkstra-1","title":"Dijkstra · complete example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Use Dijkstra’s algorithm to find the shortest path from A to D in the directed graph defined below. Show every selection, relaxation and distance table. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Cost</th></tr></thead><tbody><tr><td>A→B</td><td>4</td></tr><tr><td>A→C</td><td>2</td></tr><tr><td>C→B</td><td>1</td></tr><tr><td>B→D</td><td>3</td></tr><tr><td>C→D</td><td>7</td></tr></tbody></table><p>Source=A; target=D. Edges are directed; do not add reverse edges.</p><h2>To find</h2><p>The path A to D, its total cost and intermediate work.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/dijkstra-1.973d01595e.svg\" width=\"482.00\" height=\"228.00\" alt=\"Dijkstra · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>d[A]=0; every other distance=∞. No predecessors are known.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Tentative</td></tr><tr><td>B</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>C</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Settle A at distance 0</h4><p>Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(4)=4</td><td>Improve to 4; predecessor=A</td></tr><tr><td>A→C</td><td>∞</td><td>0+(2)=2</td><td>Improve to 2; predecessor=A</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>4</td><td>A</td><td>Tentative</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Settle C at distance 2</h4><p>Unsettled candidates before selection: B=4, C=2, D=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>C→B</td><td>4</td><td>2+(1)=3</td><td>Improve to 3; predecessor=C</td></tr><tr><td>C→D</td><td>∞</td><td>2+(7)=9</td><td>Improve to 9; predecessor=C</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>C</td><td>Tentative</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>9</td><td>C</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Settle B at distance 3</h4><p>Unsettled candidates before selection: B=3, D=9. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>B→D</td><td>9</td><td>3+(3)=6</td><td>Improve to 6; predecessor=B</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>C</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>6</td><td>B</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Settle D at distance 6</h4><p>Unsettled candidates before selection: D=6. Select the minimum; ties use alphabetical order.</p><p>No outgoing edges to relax.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>C</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>6</td><td>B</td><td>Settled</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Recover the path</h4><p>Trace backwards: D ← B ← C ← A. Reverse it: A → C → B → D.</p><p>Edge sum: 2 + 1 + 3 = 6.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A → C → B → D; cost=6.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.</p></aside></div></section>"},{"id":"dijkstra-2","title":"Dijkstra · complete example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Use Dijkstra’s algorithm to find the shortest path from A to E in the undirected graph defined below. Show every selection, relaxation and distance table. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Cost</th></tr></thead><tbody><tr><td>A—B</td><td>2</td></tr><tr><td>A—C</td><td>5</td></tr><tr><td>B—C</td><td>1</td></tr><tr><td>B—D</td><td>4</td></tr><tr><td>C—D</td><td>1</td></tr><tr><td>D—E</td><td>3</td></tr><tr><td>C—E</td><td>8</td></tr></tbody></table><p>Source=A; target=E. Each edge can be traversed in either direction.</p><h2>To find</h2><p>The path A to E, its total cost and intermediate work.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/dijkstra-2.170b001531.svg\" width=\"608.00\" height=\"234.00\" alt=\"Dijkstra · given undirected graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>d[A]=0; every other distance=∞. No predecessors are known.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Tentative</td></tr><tr><td>B</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>C</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Settle A at distance 0</h4><p>Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞, E=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(2)=2</td><td>Improve to 2; predecessor=A</td></tr><tr><td>A→C</td><td>∞</td><td>0+(5)=5</td><td>Improve to 5; predecessor=A</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>2</td><td>A</td><td>Tentative</td></tr><tr><td>C</td><td>5</td><td>A</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Settle B at distance 2</h4><p>Unsettled candidates before selection: B=2, C=5, D=∞, E=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>B→C</td><td>5</td><td>2+(1)=3</td><td>Improve to 3; predecessor=B</td></tr><tr><td>B→D</td><td>∞</td><td>2+(4)=6</td><td>Improve to 6; predecessor=B</td></tr><tr><td>B→A</td><td>0</td><td>2+(2)=4</td><td>Already settled; retain</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>3</td><td>B</td><td>Tentative</td></tr><tr><td>D</td><td>6</td><td>B</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Settle C at distance 3</h4><p>Unsettled candidates before selection: C=3, D=6, E=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>C→D</td><td>6</td><td>3+(1)=4</td><td>Improve to 4; predecessor=C</td></tr><tr><td>C→E</td><td>∞</td><td>3+(8)=11</td><td>Improve to 11; predecessor=C</td></tr><tr><td>C→A</td><td>0</td><td>3+(5)=8</td><td>Already settled; retain</td></tr><tr><td>C→B</td><td>2</td><td>3+(1)=4</td><td>Already settled; retain</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>3</td><td>B</td><td>Settled</td></tr><tr><td>D</td><td>4</td><td>C</td><td>Tentative</td></tr><tr><td>E</td><td>11</td><td>C</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Settle D at distance 4</h4><p>Unsettled candidates before selection: D=4, E=11. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>D→E</td><td>11</td><td>4+(3)=7</td><td>Improve to 7; predecessor=D</td></tr><tr><td>D→B</td><td>2</td><td>4+(4)=8</td><td>Already settled; retain</td></tr><tr><td>D→C</td><td>3</td><td>4+(1)=5</td><td>Already settled; retain</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>3</td><td>B</td><td>Settled</td></tr><tr><td>D</td><td>4</td><td>C</td><td>Settled</td></tr><tr><td>E</td><td>7</td><td>D</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Settle E at distance 7</h4><p>Unsettled candidates before selection: E=7. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>E→D</td><td>4</td><td>7+(3)=10</td><td>Already settled; retain</td></tr><tr><td>E→C</td><td>3</td><td>7+(8)=15</td><td>Already settled; retain</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>3</td><td>B</td><td>Settled</td></tr><tr><td>D</td><td>4</td><td>C</td><td>Settled</td></tr><tr><td>E</td><td>7</td><td>D</td><td>Settled</td></tr></tbody></table></div><div class=\"step\"><h4>Step 7. Recover the path</h4><p>Trace backwards: E ← D ← C ← B ← A. Reverse it: A → B → C → D → E.</p><p>Edge sum: 2 + 1 + 1 + 3 = 7.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A → B → C → D → E; cost=7.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.</p></aside></div></section>"},{"id":"dijkstra-3","title":"Dijkstra · complete example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Use Dijkstra’s algorithm to find the shortest path from A to E in the directed graph defined below. Show every selection, relaxation and distance table. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Cost</th></tr></thead><tbody><tr><td>A→B</td><td>3</td></tr><tr><td>A→C</td><td>3</td></tr><tr><td>B→D</td><td>2</td></tr><tr><td>C→D</td><td>2</td></tr></tbody></table><p>Source=A; target=E. Edges are directed; do not add reverse edges.</p><h2>To find</h2><p>The path A to E, its total cost and intermediate work.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/dijkstra-3.312b4c0fd9.svg\" width=\"356.00\" height=\"293.00\" alt=\"Dijkstra · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>d[A]=0; every other distance=∞. No predecessors are known.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Tentative</td></tr><tr><td>B</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>C</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Settle A at distance 0</h4><p>Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞, E=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(3)=3</td><td>Improve to 3; predecessor=A</td></tr><tr><td>A→C</td><td>∞</td><td>0+(3)=3</td><td>Improve to 3; predecessor=A</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>A</td><td>Tentative</td></tr><tr><td>C</td><td>3</td><td>A</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Settle B at distance 3</h4><p>Unsettled candidates before selection: B=3, C=3, D=∞, E=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>B→D</td><td>∞</td><td>3+(2)=5</td><td>Improve to 5; predecessor=B</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>3</td><td>A</td><td>Tentative</td></tr><tr><td>D</td><td>5</td><td>B</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Settle C at distance 3</h4><p>Unsettled candidates before selection: C=3, D=5, E=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>C→D</td><td>5</td><td>3+(2)=5</td><td>Retain 5 (equal cost)</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>3</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>5</td><td>B</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Settle D at distance 5</h4><p>Unsettled candidates before selection: D=5, E=∞. Select the minimum; ties use alphabetical order.</p><p>No outgoing edges to relax.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>3</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>5</td><td>B</td><td>Settled</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Stop at unreachable vertices</h4><p>Every remaining tentative distance is ∞. No path from the source reaches these vertices.</p></div><div class=\"step\"><h4>Step 7. Recover the path</h4><p>There is no finite path to recover.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> E is unreachable from A.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.</p></aside></div></section>"},{"id":"bellman","title":"Bellman–Ford: repeat relaxation across all edges","html":"<p><strong>Definition.</strong> Bellman–Ford computes single-source shortest paths by repeatedly relaxing every edge. It supports negative edge weights and detects reachable negative cycles.</p><p><strong>Simple meaning.</strong> Har edge ko baar-baar relax; negative edge chalega, negative cycle problem hai.</p><h2>Understand it step by step</h2><ol><li>Initialize source 0 and all other distances ∞.</li><li>Relax every directed edge, in a stated order, for at most V−1 full passes, where V is the number of vertices. A shortest simple path uses at most V−1 edges when no relevant negative cycle exists.</li><li>In the in-place convention used here, an update is immediately available to later edges in the same pass. Different edge orders can therefore produce different intermediate tables while converging to the same valid final distances.</li><li>If a full pass makes no change, all distances have stabilized and the algorithm may stop early.</li><li>A further improvement on a reachable edge after V−1 passes signals a reachable negative cycle. Destinations reachable from such a cycle need not have a finite shortest distance.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A→B=4 and B→C=−2 can give A→C cost 2. A negative edge is not itself a negative cycle; a cycle requires a route returning to an earlier vertex.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain Bellman–Ford and how it differs from Dijkstra. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Bellman–Ford repeatedly relaxes all edges and can handle negative weights. It uses up to V−1 passes and an additional improvement check for reachable negative cycles. Dijkstra settles the smallest tentative vertex and requires nonnegative weights for its standard correctness guarantee.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A→B=4 and B→C=−2 can give A→C cost 2. A negative edge is not itself a negative cycle; a cycle requires a route returning to an earlier vertex.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Pass = all edges once. Negative edge ≠ negative cycle.</p>"},{"id":"bellman-1","title":"Bellman–Ford · complete example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Apply Bellman–Ford from A to D in the directed graph below. Show every edge relaxation in each pass, and state whether a finite shortest path exists. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Directed edge</th><th scope=\"col\">Weight</th></tr></thead><tbody><tr><td>A→B</td><td>4</td></tr><tr><td>A→C</td><td>5</td></tr><tr><td>B→C</td><td>-2</td></tr><tr><td>C→D</td><td>3</td></tr></tbody></table><h2>To find</h2><p>The shortest route and cost, with complete passes and a negative-cycle check.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Bellman–Ford permits negative edges. We use the listed order with in-place updates; do not mix this with a table that reads only the previous pass.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/bellman-1.1bf4232fcf.svg\" width=\"489.00\" height=\"194.00\" alt=\"Bellman–Ford · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>4 vertices → at most 3 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.</p></div><div class=\"step\"><h4>Step 2. Pass 1: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(4)=4</td><td>4</td><td>Update; predecessor=A</td></tr><tr><td>A→C</td><td>∞</td><td>0+(5)=5</td><td>5</td><td>Update; predecessor=A</td></tr><tr><td>B→C</td><td>5</td><td>4+(-2)=2</td><td>2</td><td>Update; predecessor=B</td></tr><tr><td>C→D</td><td>∞</td><td>2+(3)=5</td><td>5</td><td>Update; predecessor=C</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>4</td><td>2</td><td>5</td></tr><tr><td>Predecessor</td><td>—</td><td>A</td><td>B</td><td>C</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Pass 2: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>4</td><td>0+(4)=4</td><td>4</td><td>No improvement</td></tr><tr><td>A→C</td><td>2</td><td>0+(5)=5</td><td>2</td><td>No improvement</td></tr><tr><td>B→C</td><td>2</td><td>4+(-2)=2</td><td>2</td><td>No improvement</td></tr><tr><td>C→D</td><td>5</td><td>2+(3)=5</td><td>5</td><td>No improvement</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>4</td><td>2</td><td>5</td></tr><tr><td>Predecessor</td><td>—</td><td>A</td><td>B</td><td>C</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Stop after an unchanged pass</h4><p>This entire pass changed no distance. Further identical relaxation passes will not improve anything.</p></div><div class=\"step\"><h4>Step 5. Recover and total the path</h4><p>Backward predecessors: D ← C ← B ← A. Forward route: A → B → C → D.</p><p>Cost = (4) + (-2) + (3) = 5. No edge can now improve its destination label.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A → B → C → D; shortest cost=5.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Negative weights are a general graph-exercise feature. RIP hop counts and OSPF link costs are not negative in the ordinary routing protocols studied here.</p></aside></div></section>"},{"id":"bellman-2","title":"Bellman–Ford · complete example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Apply Bellman–Ford from A to D in the directed graph below. Show every edge relaxation in each pass, and state whether a finite shortest path exists. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Directed edge</th><th scope=\"col\">Weight</th></tr></thead><tbody><tr><td>C→D</td><td>2</td></tr><tr><td>B→C</td><td>1</td></tr><tr><td>A→B</td><td>3</td></tr><tr><td>A→D</td><td>12</td></tr></tbody></table><h2>To find</h2><p>The shortest route and cost, with complete passes and a negative-cycle check.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Bellman–Ford permits negative edges. We use the listed order with in-place updates; do not mix this with a table that reads only the previous pass.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/bellman-2.9bfc43d501.svg\" width=\"493.00\" height=\"201.00\" alt=\"Bellman–Ford · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>4 vertices → at most 3 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.</p></div><div class=\"step\"><h4>Step 2. Pass 1: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>C→D</td><td>∞</td><td>∞+(2)=∞</td><td>∞</td><td>No improvement</td></tr><tr><td>B→C</td><td>∞</td><td>∞+(1)=∞</td><td>∞</td><td>No improvement</td></tr><tr><td>A→B</td><td>∞</td><td>0+(3)=3</td><td>3</td><td>Update; predecessor=A</td></tr><tr><td>A→D</td><td>∞</td><td>0+(12)=12</td><td>12</td><td>Update; predecessor=A</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>3</td><td>∞</td><td>12</td></tr><tr><td>Predecessor</td><td>—</td><td>A</td><td>—</td><td>A</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Pass 2: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>C→D</td><td>12</td><td>∞+(2)=∞</td><td>12</td><td>No improvement</td></tr><tr><td>B→C</td><td>∞</td><td>3+(1)=4</td><td>4</td><td>Update; predecessor=B</td></tr><tr><td>A→B</td><td>3</td><td>0+(3)=3</td><td>3</td><td>No improvement</td></tr><tr><td>A→D</td><td>12</td><td>0+(12)=12</td><td>12</td><td>No improvement</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>3</td><td>4</td><td>12</td></tr><tr><td>Predecessor</td><td>—</td><td>A</td><td>B</td><td>A</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Pass 3: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>C→D</td><td>12</td><td>4+(2)=6</td><td>6</td><td>Update; predecessor=C</td></tr><tr><td>B→C</td><td>4</td><td>3+(1)=4</td><td>4</td><td>No improvement</td></tr><tr><td>A→B</td><td>3</td><td>0+(3)=3</td><td>3</td><td>No improvement</td></tr><tr><td>A→D</td><td>6</td><td>0+(12)=12</td><td>6</td><td>No improvement</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>3</td><td>4</td><td>6</td></tr><tr><td>Predecessor</td><td>—</td><td>A</td><td>B</td><td>C</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Recover and total the path</h4><p>Backward predecessors: D ← C ← B ← A. Forward route: A → B → C → D.</p><p>Cost = (3) + (1) + (2) = 6. No edge can now improve its destination label.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A → B → C → D; shortest cost=6.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Negative weights are a general graph-exercise feature. RIP hop counts and OSPF link costs are not negative in the ordinary routing protocols studied here.</p></aside></div></section>"},{"id":"bellman-3","title":"Bellman–Ford · negative-cycle example","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Apply Bellman–Ford from A to C in the directed graph below. Show every edge relaxation in each pass, and state whether a finite shortest path exists. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Directed edge</th><th scope=\"col\">Weight</th></tr></thead><tbody><tr><td>A→B</td><td>1</td></tr><tr><td>B→C</td><td>-2</td></tr><tr><td>C→B</td><td>-1</td></tr></tbody></table><h2>To find</h2><p>The shortest route and cost, with complete passes and a negative-cycle check.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Bellman–Ford permits negative edges. We use the listed order with in-place updates; do not mix this with a table that reads only the previous pass.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/bellman-3.b876d89f79.svg\" width=\"407.00\" height=\"153.00\" alt=\"Bellman–Ford · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>3 vertices → at most 2 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.</p></div><div class=\"step\"><h4>Step 2. Pass 1: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(1)=1</td><td>1</td><td>Update; predecessor=A</td></tr><tr><td>B→C</td><td>∞</td><td>1+(-2)=-1</td><td>-1</td><td>Update; predecessor=B</td></tr><tr><td>C→B</td><td>1</td><td>-1+(-1)=-2</td><td>-2</td><td>Update; predecessor=C</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>-2</td><td>-1</td></tr><tr><td>Predecessor</td><td>—</td><td>C</td><td>B</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Pass 2: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>-2</td><td>0+(1)=1</td><td>-2</td><td>No improvement</td></tr><tr><td>B→C</td><td>-1</td><td>-2+(-2)=-4</td><td>-4</td><td>Update; predecessor=B</td></tr><tr><td>C→B</td><td>-2</td><td>-4+(-1)=-5</td><td>-5</td><td>Update; predecessor=C</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>-5</td><td>-4</td></tr><tr><td>Predecessor</td><td>—</td><td>C</td><td>B</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Detect a reachable negative cycle</h4><p>After the allowed main passes, an edge still improves:</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Candidate</th><th scope=\"col\">Current distance</th></tr></thead><tbody><tr><td>B→C</td><td>-7</td><td>-4</td></tr></tbody></table><p>A reachable negative cycle exists. Do not present the changing distance labels as finite shortest-path answers.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A reachable negative cycle prevents a finite shortest distance for vertices reachable from that cycle.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Negative weights are a general graph-exercise feature. RIP hop counts and OSPF link costs are not negative in the ordinary routing protocols studied here.</p></aside></div></section>"}]},{"id":"protocols","title":"Distance vector, RIP, link state and OSPF","scope":"Unit 4 · routing protocols","sections":[{"id":"distance-vector","title":"Distance-vector routing: learn costs through neighbours","html":"<p><strong>Definition.</strong> Distance-vector routing represents each destination by an estimated distance and next hop, updating those estimates using neighbouring routers’ advertised distances.</p><p><strong>Simple meaning.</strong> Neighbour ke destination-cost mein apna neighbour-link cost add karo.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/distance-vector.8f3c90bc87.svg\" width=\"820\" height=\"360\" alt=\"Distance vector: add your local cost to the advertisement\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Distance-vector routing: learn costs through neighbours</figcaption></figure><h2>Understand it step by step</h2><ol><li>Router x knows the cost c(x,v) of reaching each neighbour v. A neighbour advertises Dᵥ(y), its own estimated distance to destination y.</li><li>The route to y through v costs c(x,v)+Dᵥ(y). Compare candidates from neighbours and choose the minimum permitted route.</li><li>The update is the distributed Bellman–Ford idea. Ordinary distance-vector exchanges do not send the full network topology map.</li><li>After changes, routers may temporarily hold inconsistent information. Routing loops and count-to-infinity are possible; mitigation depends on the protocol.</li></ol><div class=\"math-display\"><img src=\"math/16a3dc8e6e4edd60.svg\" alt=\"\\text{candidate via neighbour}=\\text{link cost}+\\text{advertised distance}\" style=\"width:56.181ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>If B is one unit away and advertises destination Z at cost 4, the candidate through B is 1+4=5. If C is two units away and advertises cost 2, candidate via C is 2+2=4, so C is better.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain the distance-vector update rule. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><div class=\"math-display\"><img src=\"math/9703c520036a4b0a.svg\" alt=\"D_x(y)=\\min_{v\\in N(x)}\\{c(x,v)+D_v(y)\\}\" style=\"width:31.156ex;height:3.901ex\" loading=\"lazy\" decoding=\"async\"></div><p>For each neighbour v, add the local link cost to that neighbour’s advertised destination cost. Select the minimum and record that neighbour as next hop. N(x) denotes the neighbours of x.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>If B is one unit away and advertises destination Z at cost 4, the candidate through B is 1+4=5. If C is two units away and advertises cost 2, candidate via C is 2+2=4, so C is better.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Neighbour ka distance + neighbour tak apna distance.</p>"},{"id":"dv-1","title":"Distance-vector update · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Router X receives the following advertised distances to destination Z. Find each candidate route cost and the best next hop. Retain all equal minimum candidates in the answer. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Neighbour</th><th scope=\"col\">X-to-neighbour cost</th><th scope=\"col\">Advertised distance to Z</th></tr></thead><tbody><tr><td>B</td><td>1</td><td>4</td></tr><tr><td>C</td><td>2</td><td>2</td></tr><tr><td>D</td><td>3</td><td>5</td></tr></tbody></table><h2>To find</h2><p>Candidates and the minimum total route cost.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/2bb516a29dc6ed94.svg\" alt=\"C_v=c(X,v)+D_v(Z)\" style=\"width:21.368ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>The advertisement starts from the neighbour, so the local link to that neighbour must be added.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Compute every candidate</h4><table><thead><tr><th scope=\"col\">Via</th><th scope=\"col\">Addition</th><th scope=\"col\">Total</th></tr></thead><tbody><tr><td>B</td><td>1+4</td><td>5</td></tr><tr><td>C</td><td>2+2</td><td>4</td></tr><tr><td>D</td><td>3+5</td><td>8</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Select the minimum</h4><p>min(5, 4, 8)=4.</p></div><div class=\"step\"><h4>Step 3. Read all tied next hops</h4><p>C is the minimum-cost neighbour.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Cost=4; best next hop(s): C.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Do not choose solely by the neighbour’s advertised distance; the link to that neighbour also costs something.</p></aside></div></section>"},{"id":"dv-2","title":"Distance-vector update · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Router X receives the following advertised distances to destination Z. Find each candidate route cost and the best next hop. Retain all equal minimum candidates in the answer. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Neighbour</th><th scope=\"col\">X-to-neighbour cost</th><th scope=\"col\">Advertised distance to Z</th></tr></thead><tbody><tr><td>B</td><td>2</td><td>1</td></tr><tr><td>C</td><td>1</td><td>4</td></tr><tr><td>D</td><td>5</td><td>0</td></tr></tbody></table><h2>To find</h2><p>Candidates and the minimum total route cost.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/2bb516a29dc6ed94.svg\" alt=\"C_v=c(X,v)+D_v(Z)\" style=\"width:21.368ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>The advertisement starts from the neighbour, so the local link to that neighbour must be added.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Compute every candidate</h4><table><thead><tr><th scope=\"col\">Via</th><th scope=\"col\">Addition</th><th scope=\"col\">Total</th></tr></thead><tbody><tr><td>B</td><td>2+1</td><td>3</td></tr><tr><td>C</td><td>1+4</td><td>5</td></tr><tr><td>D</td><td>5+0</td><td>5</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Select the minimum</h4><p>min(3, 5, 5)=3.</p></div><div class=\"step\"><h4>Step 3. Read all tied next hops</h4><p>B is the minimum-cost neighbour.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Cost=3; best next hop(s): B.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Do not choose solely by the neighbour’s advertised distance; the link to that neighbour also costs something.</p></aside></div></section>"},{"id":"dv-3","title":"Distance-vector update · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Router X receives the following advertised distances to destination Z. Find each candidate route cost and the best next hop. Retain all equal minimum candidates in the answer. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Neighbour</th><th scope=\"col\">X-to-neighbour cost</th><th scope=\"col\">Advertised distance to Z</th></tr></thead><tbody><tr><td>B</td><td>3</td><td>2</td></tr><tr><td>C</td><td>2</td><td>3</td></tr><tr><td>D</td><td>4</td><td>4</td></tr></tbody></table><h2>To find</h2><p>Candidates and the minimum total route cost.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/2bb516a29dc6ed94.svg\" alt=\"C_v=c(X,v)+D_v(Z)\" style=\"width:21.368ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>The advertisement starts from the neighbour, so the local link to that neighbour must be added.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Compute every candidate</h4><table><thead><tr><th scope=\"col\">Via</th><th scope=\"col\">Addition</th><th scope=\"col\">Total</th></tr></thead><tbody><tr><td>B</td><td>3+2</td><td>5</td></tr><tr><td>C</td><td>2+3</td><td>5</td></tr><tr><td>D</td><td>4+4</td><td>8</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Select the minimum</h4><p>min(5, 5, 8)=5.</p></div><div class=\"step\"><h4>Step 3. Read all tied next hops</h4><p>B, C are tied; a protocol may use a defined tie rule or equal-cost multipath.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Cost=5; best next hop(s): B, C.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Do not choose solely by the neighbour’s advertised distance; the link to that neighbour also costs something.</p></aside></div></section>"},{"id":"rip","title":"RIP: hop counts, updates and the value 16","html":"<p><strong>Definition.</strong> Routing Information Protocol (RIP) is an interior distance-vector routing protocol that uses a bounded metric, commonly hop count, to select routes.</p><p><strong>Simple meaning.</strong> RIP mein hops count; 15 tak reachable, 16 means unreachable.</p><h2>Understand it step by step</h2><ol><li>RIPv2 uses distance-vector updates and carries subnet-mask information, allowing classless routes.</li><li>The usual hop-count metric admits costs 1–15 for reachable routes; 16 denotes infinity/unreachable. A received advertisement is incremented by the local link cost and capped at 16.</li><li>RIPv2 normally sends periodic updates about every 30 seconds, with implementation/timer behavior and triggered updates affecting the exact timing. RIPv2 uses UDP port 520 and can send updates to multicast 224.0.0.9.</li><li>Hop count does not directly measure bandwidth or delay, so a low-hop route is not always the fastest link path. The 15-hop limit restricts scale.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>If a neighbour advertises a destination at 15 hops and your added cost is 1, the resulting 16 means unreachable, not a valid 16-hop route.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. State the routing method, metric and main limitations of RIP. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>RIP uses distance-vector routing and commonly hop count as its metric. Reachable metrics are at most 15; 16 represents infinity. Its main limitations include limited diameter, a coarse metric and relatively slow convergence with possible temporary loops.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>If a neighbour advertises a destination at 15 hops and your added cost is 1, the resulting 16 means unreachable, not a valid 16-hop route.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> RIP: neighbour distances; 16 is infinity.</p>"},{"id":"loops","title":"Count-to-infinity and loop-mitigation methods","html":"<p><strong>Definition.</strong> Count-to-infinity is a distance-vector failure in which routers repeatedly increase their estimates for an unreachable destination because they believe one another’s stale route advertisements.</p><p><strong>Simple meaning.</strong> Dono neighbour ek dusre ko bol rahe: mere through jao—par actual route gaya.</p><h2>Understand it step by step</h2><ol><li>Before failure, B reaches a destination through A. After A loses the route, B may still advertise an old finite distance.</li><li>Without sufficient protection, A may infer a new route through B even though B’s route depended on A. This creates a loop and rising metrics.</li><li><strong>Split horizon:</strong> do not advertise a learned route back on the interface from which it was learned.</li><li><strong>Poison reverse:</strong> advertise that reverse direction with an unreachable metric. <strong>Route poisoning:</strong> mark a failed destination unreachable. Triggered updates spread changes sooner.</li><li>These methods reduce common failure modes but do not constitute a universal proof that every multi-router loop is impossible.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>In RIP, a poisoned route is sent with metric 16. Receiving routers treat it as unreachable rather than a new usable longer route.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain split horizon and poison reverse. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Split horizon suppresses advertising a route back in the direction from which it was learned. Poison reverse explicitly advertises that route back with an infinite/unreachable metric. Both reduce two-router distance-vector loops caused by stale information.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>In RIP, a poisoned route is sent with metric 16. Receiving routers treat it as unreachable rather than a new usable longer route.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Split: wapas mat bolo. Poison reverse: wapas bolo, par unreachable.</p>"},{"id":"link-state","title":"Link-state routing: share a map, calculate locally","html":"<p><strong>Definition.</strong> Link-state routing distributes information about routers’ local links so that routers can build a topology database and compute shortest paths independently.</p><p><strong>Simple meaning.</strong> Distance vector mein neighbour ka answer; link state mein topology map.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/link-state.bbee3173ec.svg\" width=\"820\" height=\"540\" alt=\"Link-state routing: from local links to a shortest-path tree\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Link-state routing: share a map, calculate locally</figcaption></figure><h2>Understand it step by step</h2><ol><li>Discover neighbours and determine local link costs.</li><li>Create link-state information and flood it through the appropriate routing scope. Sequence/age mechanisms keep newer information identifiable.</li><li>Routers in the same area build a consistent link-state database after convergence.</li><li>Each router runs a shortest-path computation, commonly Dijkstra, rooted at itself and installs resulting routes.</li><li>Compared with basic distance vector, this needs more topology storage and computation but provides a detailed basis for routing and usually supports faster convergence in well-designed networks.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Routers A and B can share the same topology database while calculating different next hops because their shortest-path trees have different roots.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain the steps of link-state routing. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><ol><li>Discover neighbours and link costs.</li><li>Generate and flood link-state information.</li><li>Maintain a topology database.</li><li>Run a shortest-path algorithm from the local router.</li><li>Install next hops and update after changes.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Routers A and B can share the same topology database while calculating different next hops because their shortest-path trees have different roots.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Same map, different root, different tree.</p>"},{"id":"ospf","title":"OSPF: link-state shortest paths within an autonomous system","html":"<p><strong>Definition.</strong> Open Shortest Path First (OSPF) is an interior link-state routing protocol that selects routes using shortest-path calculations and additive link costs.</p><p><strong>Simple meaning.</strong> OSPF = link-state map + Dijkstra + summed costs.</p><h2>Understand it step by step</h2><ol><li>Routers discover and maintain neighbour relationships using Hello packets and exchange link-state information.</li><li>Routers calculate shortest paths from their own position in the topology. A path cost is the sum of its outgoing-link costs, not necessarily the fewest hops.</li><li>The network can be divided into areas. In normal OSPF hierarchy, Area 0 is the backbone used to interconnect other areas via area border routers.</li><li>OSPFv2 is the IPv4 protocol in the supplied paper; it is carried directly in IP protocol number 89, not TCP/UDP port 89.</li><li>A common vendor default derives interface cost from reference bandwidth/interface bandwidth, but actual configured costs and reference bandwidth matter. Use the given costs in an exam graph.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Route A→B→D costs 10+10=20 while A→C→D costs 5+8=13. OSPF’s cost comparison prefers the latter even though both have two links.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Summarize how OSPF determines the best route. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>OSPF exchanges and maintains link-state information, builds a topology database and runs Dijkstra’s shortest-path computation rooted at the local router. It chooses a path with the lowest sum of link costs and installs the corresponding next hop. Equal-cost paths may be supported.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Route A→B→D costs 10+10=20 while A→C→D costs 5+8=13. OSPF’s cost comparison prefers the latter even though both have two links.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> OSPF cost add karo; sirf hops nahi.</p>"},{"id":"ospf-packets","title":"The five OSPF packet types","html":"<p><strong>Definition.</strong> OSPFv2 uses five packet types for neighbour maintenance and reliable exchange of link-state database information.</p><p><strong>Simple meaning.</strong> Hello → database summary → request → update → acknowledgement; har packet ka kaam alag.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ospf-packets.6093f0d178.svg\" width=\"820\" height=\"655\" alt=\"OSPFv2: five distinct packet types\" loading=\"lazy\" decoding=\"async\"></div><figcaption>The five OSPF packet types</figcaption></figure><h2>Understand it step by step</h2><ol><li>Hello packets establish/maintain neighbour relationships; they are not the complete topology database.</li><li>Database Description packets list summaries, allowing neighbours to identify differences.</li><li>Link State Request asks for required LSAs; Link State Update transports LSAs. An LSU packet may contain more than one LSA.</li><li>Link State Acknowledgment acknowledges LSAs. An LSA is a topology-information item, not a sixth OSPF packet type.</li></ol><table><thead><tr><th scope=\"col\">Packet type</th><th scope=\"col\">What it does</th><th scope=\"col\">Simple example</th></tr></thead><tbody><tr><td>Hello</td><td>Discover/maintain neighbours and exchange relationship parameters</td><td>Are we still neighbours?</td></tr><tr><td>Database Description (DD/DBD)</td><td>Summarize link-state database contents during synchronization</td><td>Here are the LSA headers I have</td></tr><tr><td>Link State Request (LSR)</td><td>Ask for specific missing/newer link-state information</td><td>Please send this LSA</td></tr><tr><td>Link State Update (LSU)</td><td>Carry one or more LSAs</td><td>Here is the requested or newly flooded link-state information</td></tr><tr><td>Link State Acknowledgment (LSAck)</td><td>Acknowledge receipt of LSAs</td><td>I received these LSAs</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A router sees a newer LSA listed in a neighbour’s database summary. It requests that LSA, receives it in an LSU, and acknowledges receipt.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. List and explain the five types of OSPF packets. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Packet type</th><th scope=\"col\">What it does</th><th scope=\"col\">Simple example</th></tr></thead><tbody><tr><td>Hello</td><td>Discover/maintain neighbours and exchange relationship parameters</td><td>Are we still neighbours?</td></tr><tr><td>Database Description (DD/DBD)</td><td>Summarize link-state database contents during synchronization</td><td>Here are the LSA headers I have</td></tr><tr><td>Link State Request (LSR)</td><td>Ask for specific missing/newer link-state information</td><td>Please send this LSA</td></tr><tr><td>Link State Update (LSU)</td><td>Carry one or more LSAs</td><td>Here is the requested or newly flooded link-state information</td></tr><tr><td>Link State Acknowledgment (LSAck)</td><td>Acknowledge receipt of LSAs</td><td>I received these LSAs</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A router sees a newer LSA listed in a neighbour’s database summary. It requests that LSA, receives it in an LSU, and acknowledges receipt.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> H–D–R–U–A: Hello, Description, Request, Update, Ack.</p>"},{"id":"comparison","title":"RIP versus OSPF; Bellman–Ford versus Dijkstra","html":"<p><strong>Definition.</strong> RIP and OSPF are routing protocols; Bellman–Ford and Dijkstra are algorithms underlying different route-computation approaches.</p><p><strong>Simple meaning.</strong> Protocol message bhejta hai; algorithm route calculate karta hai.</p><h2>Understand it step by step</h2><ol><li>RIP uses distance-vector information and a bounded hop metric. OSPF distributes link-state information and computes paths using additive costs.</li><li>A generic Bellman–Ford graph exercise can contain negative weights; RIP’s ordinary hop-count metric does not.</li><li>Dijkstra assumes nonnegative edge weights. Do not select it for the negative-weight re-exam graph simply because the question says “routing”.</li><li>State whether a drawn graph is directed or undirected before solving. Both algorithms can be applied to appropriate directed graphs.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>The December paper explicitly gives positive directed edges and asks for Dijkstra. The February paper includes negative directed edges and asks for Bellman–Ford.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Compare RIP and OSPF on three points. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">RIP</th><th scope=\"col\">OSPF</th></tr></thead><tbody><tr><td>Family</td><td>Distance vector</td><td>Link state</td></tr><tr><td>Typical metric</td><td>Hop count; 16 unreachable</td><td>Sum of configured link costs</td></tr><tr><td>Knowledge exchanged</td><td>Destination distances via neighbours</td><td>Link-state information</td></tr><tr><td>Algorithm connection</td><td>Distributed Bellman–Ford idea</td><td>Dijkstra shortest paths</td></tr><tr><td>Scale design</td><td>Small/simple networks; limited diameter</td><td>Area-based scalable design</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>The December paper explicitly gives positive directed edges and asks for Dijkstra. The February paper includes negative directed edges and asks for Bellman–Ford.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Distance vector → RIP; link state → OSPF.</p>"}]},{"id":"packet-support","title":"IP packet details · supporting practice","scope":"Unit 4 support · header comparison; fragmentation is additional practice","sections":[{"id":"ipv4-header","title":"IPv4 header fields needed for the IPv6 comparison","html":"<p><strong>Definition.</strong> An IPv4 datagram contains a variable-length header followed by payload. The header supplies addressing, forwarding and fragmentation information.</p><p><strong>Simple meaning.</strong> Header delivery instructions hai; payload actual carried content.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ipv4-header.5d41e2a297.svg\" width=\"820\" height=\"560\" alt=\"IPv4 header · field widths in bits\" loading=\"lazy\" decoding=\"async\"></div><figcaption>IPv4 header fields needed for the IPv6 comparison</figcaption></figure><h2>Understand it step by step</h2><ol><li>Version identifies IPv4. IHL gives header length in 32-bit words; IHL=5 therefore means 20 bytes. Options can enlarge the header up to 60 bytes.</li><li>Total Length includes both the IPv4 header and its payload. Identification, flags and fragment offset support fragmentation/reassembly.</li><li>TTL limits lifetime; Protocol identifies the upper-layer protocol. Header Checksum protects the IPv4 header, not the entire payload.</li><li>Source and destination are 32-bit IPv4 addresses. IPv6 changes their width and reorganizes several of these fields.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>An IPv4 packet with Total Length=1,000 bytes and IHL=5 has a 20-byte header and 980-byte payload.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Distinguish IPv4 Total Length, IHL and Protocol. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Total Length measures the whole IPv4 packet in bytes. IHL measures the header in 32-bit words, so header bytes=4×IHL. Protocol identifies the payload’s upper-layer protocol, such as TCP or UDP.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>An IPv4 packet with Total Length=1,000 bytes and IHL=5 has a 20-byte header and 980-byte payload.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> IHL words ×4 = bytes; total minus header = payload.</p>"},{"id":"ihl-1","title":"IPv4 header-length example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. An IPv4 packet has IHL=5 and Total Length=1000 bytes. Find header and payload sizes. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IHL=5; Total Length=1000 bytes.</p><h2>To find</h2><p>Header bytes and payload bytes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/830ed738bb3329f8.svg\" alt=\"H=4\\,\\mathrm{IHL},\\qquad P=T-H\" style=\"width:27.077ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>IHL counts 32-bit words; each word is 4 bytes.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Convert IHL to bytes</h4><p>H=4×5=20 bytes.</p></div><div class=\"step\"><h4>Step 2. Subtract the header</h4><p>P=1000−20=980 bytes.</p></div><div class=\"step\"><h4>Step 3. Add back the parts</h4><p>20+980=1000 bytes.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Header=20 bytes; payload=980 bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>IPv4 Total Length includes its own header. IPv6 Payload Length uses a different convention.</p></aside></div></section>"},{"id":"ihl-2","title":"IPv4 header-length example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. An IPv4 packet has IHL=6 and Total Length=1200 bytes. Find header and payload sizes. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IHL=6; Total Length=1200 bytes.</p><h2>To find</h2><p>Header bytes and payload bytes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/830ed738bb3329f8.svg\" alt=\"H=4\\,\\mathrm{IHL},\\qquad P=T-H\" style=\"width:27.077ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>IHL counts 32-bit words; each word is 4 bytes.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Convert IHL to bytes</h4><p>H=4×6=24 bytes.</p></div><div class=\"step\"><h4>Step 2. Subtract the header</h4><p>P=1200−24=1176 bytes.</p></div><div class=\"step\"><h4>Step 3. Add back the parts</h4><p>24+1176=1200 bytes.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Header=24 bytes; payload=1176 bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>IPv4 Total Length includes its own header. IPv6 Payload Length uses a different convention.</p></aside></div></section>"},{"id":"ihl-3","title":"IPv4 header-length example 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. An IPv4 packet has IHL=8 and Total Length=800 bytes. Find header and payload sizes. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IHL=8; Total Length=800 bytes.</p><h2>To find</h2><p>Header bytes and payload bytes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/830ed738bb3329f8.svg\" alt=\"H=4\\,\\mathrm{IHL},\\qquad P=T-H\" style=\"width:27.077ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>IHL counts 32-bit words; each word is 4 bytes.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Convert IHL to bytes</h4><p>H=4×8=32 bytes.</p></div><div class=\"step\"><h4>Step 2. Subtract the header</h4><p>P=800−32=768 bytes.</p></div><div class=\"step\"><h4>Step 3. Add back the parts</h4><p>32+768=800 bytes.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Header=32 bytes; payload=768 bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>IPv4 Total Length includes its own header. IPv6 Payload Length uses a different convention.</p></aside></div></section>"},{"id":"fragmentation","title":"IPv4 fragmentation · optional extension","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><p><strong>Definition.</strong> IPv4 fragmentation divides a packet that exceeds an outgoing link’s MTU into smaller fragments, when fragmentation is permitted.</p><p><strong>Simple meaning.</strong> MTU se packet bada hai toh allowed case mein fragments; offset original payload mein position batata hai.</p><h2>Understand it step by step</h2><ol><li>This is supporting practice, not an explicitly listed numerical in the supplied current syllabus or these two papers. Finish the confirmed core first.</li><li>Assume an originally unfragmented packet and a fixed header H repeated per fragment. The link MTU is the largest whole IP packet it can carry.</li><li>Every non-final fragment’s payload must be a multiple of 8 bytes. Its payload capacity is 8×floor((MTU−H)/8).</li><li>Fragment Offset is the number of preceding original payload bytes divided by 8; it is not a byte count directly. MF=1 means more fragments follow, while the final fragment has MF=0.</li><li>If DF is set, a router cannot fragment the IPv4 packet; IPv6 routers do not fragment packets either. Reassembly is at the destination.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A fragment with offset 185 starts at byte 185×8=1,480 of the original payload, counting from byte zero.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. What is the unit of IPv4 fragment offset and what does MF indicate? <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Fragment Offset is measured in units of 8 payload bytes. MF=1 says more fragments of the original packet follow; MF=0 marks the last fragment. Each fragment carries its own IP header.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A fragment with offset 185 starts at byte 185×8=1,480 of the original payload, counting from byte zero.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Offset ×8 = starting payload byte.</p>"},{"id":"fragment-1","title":"Optional fragmentation · example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. An unfragmented IPv4 packet is 4000 bytes including a 20-byte header. It crosses a link of MTU 1500 bytes. DF=0 and every fragment repeats the same header. Find each fragment’s payload length, total length, offset and MF flag. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Total=4000; H=20; MTU=1500 bytes; DF=0.</p><h2>To find</h2><p>All fragments and their header-related values.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/00cfb5dffef469d2.svg\" alt=\"P=T-H\" style=\"width:11.084ex;height:1.731ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/fd129cf4e0fe3540.svg\" alt=\"P_{\\max}=8\\left\\lfloor\\frac{\\mathrm{MTU}-H}{8}\\right\\rfloor\" style=\"width:22.956ex;height:5.428ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/76b072d173a1b0cc.svg\" alt=\"\\mathrm{offset}=\\mathrm{preceding\\ payload\\ bytes}/8\" style=\"width:34.099ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Subtract the header before splitting the original payload. Round non-final fragment payload capacity down to a multiple of eight.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Original payload</h4><p>4000−20=3980 bytes.</p></div><div class=\"step\"><h4>Step 2. Non-final payload capacity</h4><p>MTU−H=1500−20=1480. Floor((1480)/8)×8=1480 bytes.</p></div><div class=\"step\"><h4>Step 3. Allocate each fragment</h4><table><thead><tr><th scope=\"col\">Fragment</th><th scope=\"col\">Payload bytes</th><th scope=\"col\">Total bytes</th><th scope=\"col\">Starting byte</th><th scope=\"col\">Offset /8</th><th scope=\"col\">MF</th></tr></thead><tbody><tr><td>1</td><td>1480</td><td>1500</td><td>0</td><td>0</td><td>1</td></tr><tr><td>2</td><td>1480</td><td>1500</td><td>1480</td><td>185</td><td>1</td></tr><tr><td>3</td><td>1020</td><td>1040</td><td>2960</td><td>370</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Verify no payload is lost</h4><p>1480+1480+1020=3980 bytes. Every total length is at most 1500.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 3 fragments; lengths, offsets and MF are listed in the table.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Only payload positions determine offsets; repeating a header does not move the offset of later original data.</p></aside></div></section>"},{"id":"fragment-2","title":"Optional fragmentation · example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. An unfragmented IPv4 packet is 2000 bytes including a 20-byte header. It crosses a link of MTU 620 bytes. DF=0 and every fragment repeats the same header. Find each fragment’s payload length, total length, offset and MF flag. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Total=2000; H=20; MTU=620 bytes; DF=0.</p><h2>To find</h2><p>All fragments and their header-related values.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/00cfb5dffef469d2.svg\" alt=\"P=T-H\" style=\"width:11.084ex;height:1.731ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/fd129cf4e0fe3540.svg\" alt=\"P_{\\max}=8\\left\\lfloor\\frac{\\mathrm{MTU}-H}{8}\\right\\rfloor\" style=\"width:22.956ex;height:5.428ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/76b072d173a1b0cc.svg\" alt=\"\\mathrm{offset}=\\mathrm{preceding\\ payload\\ bytes}/8\" style=\"width:34.099ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Subtract the header before splitting the original payload. Round non-final fragment payload capacity down to a multiple of eight.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Original payload</h4><p>2000−20=1980 bytes.</p></div><div class=\"step\"><h4>Step 2. Non-final payload capacity</h4><p>MTU−H=620−20=600. Floor((600)/8)×8=600 bytes.</p></div><div class=\"step\"><h4>Step 3. Allocate each fragment</h4><table><thead><tr><th scope=\"col\">Fragment</th><th scope=\"col\">Payload bytes</th><th scope=\"col\">Total bytes</th><th scope=\"col\">Starting byte</th><th scope=\"col\">Offset /8</th><th scope=\"col\">MF</th></tr></thead><tbody><tr><td>1</td><td>600</td><td>620</td><td>0</td><td>0</td><td>1</td></tr><tr><td>2</td><td>600</td><td>620</td><td>600</td><td>75</td><td>1</td></tr><tr><td>3</td><td>600</td><td>620</td><td>1200</td><td>150</td><td>1</td></tr><tr><td>4</td><td>180</td><td>200</td><td>1800</td><td>225</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Verify no payload is lost</h4><p>600+600+600+180=1980 bytes. Every total length is at most 620.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 4 fragments; lengths, offsets and MF are listed in the table.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Only payload positions determine offsets; repeating a header does not move the offset of later original data.</p></aside></div></section>"},{"id":"fragment-3","title":"Optional fragmentation · example 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. An unfragmented IPv4 packet is 1500 bytes including a 20-byte header. It crosses a link of MTU 600 bytes. DF=0 and every fragment repeats the same header. Find each fragment’s payload length, total length, offset and MF flag. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Total=1500; H=20; MTU=600 bytes; DF=0.</p><h2>To find</h2><p>All fragments and their header-related values.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/00cfb5dffef469d2.svg\" alt=\"P=T-H\" style=\"width:11.084ex;height:1.731ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/fd129cf4e0fe3540.svg\" alt=\"P_{\\max}=8\\left\\lfloor\\frac{\\mathrm{MTU}-H}{8}\\right\\rfloor\" style=\"width:22.956ex;height:5.428ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/76b072d173a1b0cc.svg\" alt=\"\\mathrm{offset}=\\mathrm{preceding\\ payload\\ bytes}/8\" style=\"width:34.099ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Subtract the header before splitting the original payload. Round non-final fragment payload capacity down to a multiple of eight.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Original payload</h4><p>1500−20=1480 bytes.</p></div><div class=\"step\"><h4>Step 2. Non-final payload capacity</h4><p>MTU−H=600−20=580. Floor((580)/8)×8=576 bytes.</p></div><div class=\"step\"><h4>Step 3. Allocate each fragment</h4><table><thead><tr><th scope=\"col\">Fragment</th><th scope=\"col\">Payload bytes</th><th scope=\"col\">Total bytes</th><th scope=\"col\">Starting byte</th><th scope=\"col\">Offset /8</th><th scope=\"col\">MF</th></tr></thead><tbody><tr><td>1</td><td>576</td><td>596</td><td>0</td><td>0</td><td>1</td></tr><tr><td>2</td><td>576</td><td>596</td><td>576</td><td>72</td><td>1</td></tr><tr><td>3</td><td>328</td><td>348</td><td>1152</td><td>144</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Verify no payload is lost</h4><p>576+576+328=1480 bytes. Every total length is at most 600.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 3 fragments; lengths, offsets and MF are listed in the table.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Only payload positions determine offsets; repeating a header does not move the offset of later original data.</p></aside></div></section>"}]}],"formulas":[{"id":"formulas","title":"All formulas and rules in one place","scope":"M2 · symbols explained; worked examples linked below","sections":[{"id":"units","title":"Delays, units and packet pipeline","html":"<div class=\"note\"><p>Supporting formula collection. Use the compact TEE formula sheet first; the full calculation set below is not an observed-paper requirement.</p></div><div class=\"math-display\"><img src=\"math/9e384aa108fc34e3.svg\" alt=\"T_f=L/R\" style=\"width:9.795ex;height:2.364ex\" loading=\"lazy\" decoding=\"async\"></div><p>L=bits, R=bits/s, Tf=seconds. Use for serialization.</p><div class=\"math-display\"><img src=\"math/9c2209baf93e272e.svg\" alt=\"T_p=d/v\" style=\"width:8.736ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>d=distance, v=propagation speed. Use consistent distance units.</p><div class=\"math-display\"><img src=\"math/a1dee7ec7d280062.svg\" alt=\"T=(h+k-1)L/R+h\\tau\" style=\"width:25.142ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>h equal-rate store-and-forward links, k equal packets, L total bits/packet; τ per-link propagation. No queueing or processing.</p><h2>Learn it with complete solutions</h2><p><a href=\"#m2/read/basics/delay-1\">Three worked delay examples</a></p>"},{"id":"aloha","title":"ALOHA formulas and maximum values","html":"<div class=\"math-display\"><img src=\"math/777410ed8c9656d0.svg\" alt=\"G=\\lambda T_f\" style=\"width:8.503ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>λ=aggregate attempts/s; G=attempts/frame time.</p><div class=\"math-display\"><img src=\"math/7b496d33240552f3.svg\" alt=\"S_{\\mathrm{pure}}=Ge^{-2G}\" style=\"width:14.03ex;height:2.712ex\" loading=\"lazy\" decoding=\"async\"></div><p>Maximum 1/(2e)≈0.18394 at G=0.5.</p><div class=\"math-display\"><img src=\"math/679e9767406c13ac.svg\" alt=\"S_{\\mathrm{slotted}}=Ge^{-G}\" style=\"width:14.834ex;height:2.419ex\" loading=\"lazy\" decoding=\"async\"></div><p>Maximum 1/e≈0.367879 at G=1.</p><div class=\"math-display\"><img src=\"math/2656297b585ffbee.svg\" alt=\"F_{\\mathrm{success}}=S/T_f\" style=\"width:14.55ex;height:2.364ex\" loading=\"lazy\" decoding=\"async\"></div><p>Convert normalized S into successful frames/s.</p><div class=\"math-display\"><img src=\"math/4164452cf4f984f6.svg\" alt=\"B_{\\mathrm{success}}=SR\" style=\"width:13.01ex;height:1.952ex\" loading=\"lazy\" decoding=\"async\"></div><p>Successful full-frame bits/s; not necessarily application payload goodput.</p><div class=\"math-display\"><img src=\"math/a1083530dd6239fa.svg\" alt=\"P(\\mathrm{success\\ per\\ attempt})=S/G\" style=\"width:29.99ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>For G>0. Do not confuse this probability with normalized throughput S.</p><h2>Learn it with complete solutions</h2><p><a href=\"#m2/read/aloha/rate-1\">Five fully worked rate questions</a></p>"},{"id":"csma","title":"Collision timing and backoff","html":"<div class=\"math-display\"><img src=\"math/eae5a57f0575ef7d.svg\" alt=\"L_{\\min}\\geq 2RT_p\" style=\"width:12.575ex;height:2.195ex\" loading=\"lazy\" decoding=\"async\"></div><p>R=bits/s; Tp=one-way seconds. Theoretical collision-detection bound.</p><div class=\"math-display\"><img src=\"math/f340420d788785f5.svg\" alt=\"k=\\min(n,10),\\quad 0\\leq K\\leq 2^k-1\" style=\"width:32.848ex;height:2.61ex\" loading=\"lazy\" decoding=\"async\"></div><p>n collisions; K selected integer for classic Ethernet backoff.</p><div class=\"math-display\"><img src=\"math/c833ce43529e0206.svg\" alt=\"T_{\\mathrm{backoff}}=KT_{\\mathrm{slot}}\" style=\"width:15.673ex;height:1.902ex\" loading=\"lazy\" decoding=\"async\"></div><p>Multiply selected K by slot duration, retaining units.</p><h2>Learn it with complete solutions</h2><p><a href=\"#m2/read/csma/minframe-1\">Minimum-frame examples</a></p>"},{"id":"ipv4","title":"Masks and address blocks","html":"<div class=\"math-display\"><img src=\"math/1b1ff40e2008c7a0.svg\" alt=\"h=32-p,\\quad N=2^h\" style=\"width:21.022ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>p=prefix bits, h=host bits, N=total addresses.</p><div class=\"math-display\"><img src=\"math/92ad06adcbf23a21.svg\" alt=\"U=2^h-2\" style=\"width:10.89ex;height:2.23ex\" loading=\"lazy\" decoding=\"async\"></div><p>Ordinary usable-host count. /31 point-to-point and /32 are exceptions.</p><div class=\"math-display\"><img src=\"math/9f548fe5bbbe07ef.svg\" alt=\"\\text{step}=256-M\" style=\"width:15.588ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>M is the first mask octet not equal to 255.</p><div class=\"math-display\"><img src=\"math/75b831766f4f99cd.svg\" alt=\"\\text{network}=\\text{address AND mask}\" style=\"width:29.682ex;height:1.805ex\" loading=\"lazy\" decoding=\"async\"></div><p>Bitwise AND keeps network bits and clears host bits.</p><div class=\"math-display\"><img src=\"math/e5e4b592ee8fd45e.svg\" alt=\"\\text{broadcast}=\\text{network}+(N-1)\" style=\"width:31.01ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use full address arithmetic, not an overflowing final octet.</p><h2>Learn it with complete solutions</h2><p><a href=\"#m2/read/subnets/block-1\">Nine complete address-block examples</a></p>"},{"id":"design","title":"Host sizing, VLSM and aggregation","html":"<div class=\"math-display\"><img src=\"math/ab881b9b5531cc3b.svg\" alt=\"2^h-2\\geq H\" style=\"width:11.164ex;height:2.357ex\" loading=\"lazy\" decoding=\"async\"></div><p>H requested usable hosts. Smallest sufficient h gives smallest ordinary subnet.</p><div class=\"math-display\"><img src=\"math/20f9f1a5957fbd76.svg\" alt=\"2^s\\geq K,\\quad p_{new}=p_{old}+s\" style=\"width:24.797ex;height:2.08ex\" loading=\"lazy\" decoding=\"async\"></div><p>K equal subnets required; s borrowed bits. Do not subtract two from modern subnet count.</p><div class=\"math-display\"><img src=\"math/796d561e6716df45.svg\" alt=\"p=32-\\log_2(N)\" style=\"width:16.832ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>For a power-of-two total address requirement, subject to boundary alignment.</p><h2>Learn it with complete solutions</h2><p><a href=\"#m2/read/cidr/vlsm-1\">Three full VLSM designs</a></p>"},{"id":"ipv6","title":"IPv6 and packet lengths","html":"<div class=\"note\"><p>Supporting formula collection. Use the compact TEE formula sheet first; the full calculation set below is not an observed-paper requirement.</p></div><div class=\"math-display\"><img src=\"math/38a8a52c7013e253.svg\" alt=\"\\text{omitted groups}=8-\\text{visible groups}\" style=\"width:35.061ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Count every written group, including a written 0.</p><div class=\"math-display\"><img src=\"math/a05ef7dd84fc645e.svg\" alt=\"\\mathrm{IPv6\\ total}=40+\\mathrm{payload\\ length}\" style=\"width:32.405ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Payload includes extension headers, excludes the base 40 bytes.</p><div class=\"math-display\"><img src=\"math/0abf62f351ee6ca7.svg\" alt=\"\\mathrm{IPv4\\ header\\ bytes}=4\\,\\mathrm{IHL}\" style=\"width:26.04ex;height:2.032ex\" loading=\"lazy\" decoding=\"async\"></div><p>IHL is in 32-bit words.</p><div class=\"math-display\"><img src=\"math/dfefa084951b704c.svg\" alt=\"\\mathrm{IPv4\\ payload}=\\mathrm{Total\\ Length}-4\\,\\mathrm{IHL}\" style=\"width:37.118ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>IPv4 Total Length includes the IPv4 header.</p><h2>Learn it with complete solutions</h2><p><a href=\"#m2/read/ipv6/expand-1\">Four IPv6 expansions</a></p>"},{"id":"routing","title":"Routing updates and path costs","html":"<div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Old destination distance versus cost to u plus edge u→v.</p><div class=\"math-display\"><img src=\"math/9703c520036a4b0a.svg\" alt=\"D_x(y)=\\min_{v\\in N(x)}\\{c(x,v)+D_v(y)\\}\" style=\"width:31.156ex;height:3.901ex\" loading=\"lazy\" decoding=\"async\"></div><p>Distance vector: local link cost plus neighbour advertisement.</p><div class=\"math-display\"><img src=\"math/6790d72650e66c1e.svg\" alt=\"\\mathrm{RIP\\ metric}=\\min(16,\\mathrm{link\\ cost}+\\mathrm{advertisement})\" style=\"width:47.551ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>16 represents unreachable. Ordinary hop increments commonly equal 1.</p><h2>Learn it with complete solutions</h2><p><a href=\"#m2/read/routing/dijkstra-1\">Full Dijkstra solution</a></p>"}]}],"papers":[{"id":"pyq-guide","title":"Matched actual PYQs","scope":"Two supplied TEE papers · only the current M2 topics","sections":[{"id":"index","title":"Use the actual papers without mixing portions","html":"<p>The supplied ZIPs contain the <strong>5 December 2025 final</strong> and <strong>4 February 2026 re-exam</strong>, each with an answer scheme. This section solves the 14 question parts that match ALOHA onward through Unit 4. The original 5/10-mark values are retained; these are not presented as actual M2 papers.</p><table><thead><tr><th scope=\"col\">Paper</th><th scope=\"col\">Matching questions</th><th scope=\"col\">Recurring work</th></tr></thead><tbody><tr><td>5 Dec 2025</td><td>Q1(c), Q1(d), Q2(b), Q3(b), Q4(a), Q6(b), Q7(a)</td><td>Slotted ALOHA, address block, switching, OSPF packets, IPv6, CSMA, Dijkstra</td></tr><tr><td>4 Feb 2026</td><td>Q1(c), Q1(d), Q2(b), Q3(b), Q4(a), Q6(b), Q7(a)</td><td>Pure ALOHA, address block, allocation, OSPF, IPv6 header, throughput rates, Bellman–Ford</td></tr></tbody></table><p>Questions on introductory models, CRC/ARQ, transport, congestion control and application protocols fall outside this stated M2 cutoff. They are omitted from the M2 question bank. These two papers show question styles; they cannot establish a reliable forecast of the next paper.</p>"}]},{"id":"paper-2025-final","title":"Final · 5 December 2025","scope":"Actual TEE paper · current-M2 matching parts; original marks","sections":[{"id":"q1c","title":"Q1C · Slotted ALOHA throughput","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ. In a Slotted ALOHA system, the average number of frames generated per frame time is G = 1. Calculate the throughput S. What is the maximum throughput in Slotted ALOHA? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Protocol = Slotted ALOHA; G = 1 attempts/frame time.</p><h2>To find</h2><p>S, 100S and the maximum possible S.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/01e46e63e1b256b9.svg\" alt=\"S=G e^{-G}\" style=\"width:9.999ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><p>Select the formula from the protocol name. The exponent is −G because Slotted ALOHA has a T vulnerable period.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate the exponent</h4><p>−1 × 1 = -1.</p></div><div class=\"step\"><h4>Step 2. Evaluate the exponential</h4><div class=\"math-display\"><img src=\"math/f3e24ac70fcf4336.svg\" alt=\"e^{-1} \\approx 0.367879441\" style=\"width:18.245ex;height:2.05ex\" loading=\"lazy\" decoding=\"async\"></div></div><div class=\"step\"><h4>Step 3. Multiply by G</h4><p>S = 1 × 0.367879441 ≈ 0.367879441 successful frames/frame time.</p></div><div class=\"step\"><h4>Step 4. Convert to percentage</h4><p>0.367879441 × 100 ≈ 36.7879%.</p></div><div class=\"step\"><h4>Step 5. State the maximum separately</h4><p>The maximum is 1/(1e) ≈ 0.367879 = 36.7879%, at G=1.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> S ≈ 0.367879; percentage ≈ 36.7879%; Smax ≈ 0.367879 at G=1.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.</p></aside></div></section>"},{"id":"q1d","title":"Q1D · Address block /26","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ. A block of address is granted to a small organization and one of the address is 200.140.64.48/26. Determine the first address and last address in the block. Determine the total number of address in the block. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>200.140.64.48/26</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−26=6; N=2<sup>6</sup>=64.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.192</code>; binary=<code>11111111.11111111.11111111.11000000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 48 lies in 0…63.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 0 in octet 4; set any later octets to zero. Network=<strong>200.140.64.0</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>11001000</td><td>11111111</td><td>11001000</td><td>200</td></tr><tr><td>2</td><td>10001100</td><td>11111111</td><td>10001100</td><td>140</td></tr><tr><td>3</td><td>01000000</td><td>11111111</td><td>01000000</td><td>64</td></tr><tr><td>4</td><td>00110000</td><td>11000000</td><td>00000000</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 63 in the changing octet and 255 in any later octets. Broadcast=<strong>200.140.64.63</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=200.140.64.1; last usable=200.140.64.62; count=64−2=62.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 200.140.64.0; broadcast 200.140.64.63; 64 total, 62 ordinary usable; range 200.140.64.1–200.140.64.62.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"q2b","title":"Q2B · Choose a switching technique","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ. A company wants to set up a network for smooth data transfer between its offices. Based on your understanding, which switching technique—circuit, packet, or message—would you recommend? Explain how each works and compare their pros, cons, and best use cases to support your choice. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/switching.2b51f856d9.svg\" width=\"820\" height=\"425\" alt=\"Three switching techniques: what is forwarded?\" loading=\"lazy\" decoding=\"async\"></div><figcaption>The three forwarding units and resource choices.</figcaption></figure><h2>Circuit switching</h2><p>A setup phase reserves a circuit through intermediate switches. Data then streams through the established path until release. It offers predictable reserved service and low per-unit forwarding overhead, but setup takes time and idle periods waste reserved capacity. A traditional dedicated voice circuit is an appropriate illustration.</p><h2>Message switching</h2><p>Each intermediate node receives and stores the entire message before forwarding it. Links can be shared and no end-to-end circuit is required, but large messages need buffers and cause substantial store-and-forward delay. It illustrates delay-tolerant whole-message delivery, rather than an efficient choice for interactive office traffic.</p><h2>Packet switching</h2><p>A message is segmented into packets, allowing shared links and pipelined forwarding. This suits bursty data and supports flexible routing. Costs include packet headers, variable queueing delay, potential packet loss and possible reordering in datagram networks.</p><table><thead><tr><th scope=\"col\">Aspect</th><th scope=\"col\">Circuit switching</th><th scope=\"col\">Message switching</th><th scope=\"col\">Packet switching</th></tr></thead><tbody><tr><td>Unit handled</td><td>Continuous stream on established circuit</td><td>Whole message</td><td>Small packets</td></tr><tr><td>Resource use</td><td>Capacity reserved along a circuit</td><td>Shared; message stored at each intermediate node</td><td>Shared; each packet stored/forwarded in this model</td></tr><tr><td>Setup</td><td>Required before data transfer</td><td>No circuit setup required</td><td>Datagram: no connection setup; virtual circuit: setup</td></tr><tr><td>Delay</td><td>Setup delay, then relatively predictable service</td><td>Large store-and-forward delay for long messages</td><td>Variable delay; packet pipeline can reduce completion time</td></tr><tr><td>Main limitation</td><td>Reserved capacity can be idle</td><td>Large buffers; unsuitable for tight delay needs</td><td>Headers, possible queueing/loss; datagrams may reorder</td></tr></tbody></table><h2>Recommendation</h2><p>For ordinary office file, web and collaboration traffic, choose packet switching, with adequate capacity and traffic management. Its statistical sharing serves bursty sources efficiently. If strict deterministic service is required, state that requirement and discuss additional service engineering rather than promising that every packet network guarantees timing.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>One office can upload a file while another sends short web requests. Their packets share available link capacity; a permanently reserved circuit would remain idle between bursts.</p></aside></div></section>"},{"id":"q3b","title":"Q3B · Five OSPF packet types","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ. Explain the different types of OSPF packets used for communication between routers. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ospf-packets.6093f0d178.svg\" width=\"820\" height=\"655\" alt=\"OSPFv2: five distinct packet types\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Five OSPFv2 packet types.</figcaption></figure><table><thead><tr><th scope=\"col\">Packet type</th><th scope=\"col\">What it does</th><th scope=\"col\">Simple example</th></tr></thead><tbody><tr><td>Hello</td><td>Discover/maintain neighbours and exchange relationship parameters</td><td>Are we still neighbours?</td></tr><tr><td>Database Description (DD/DBD)</td><td>Summarize link-state database contents during synchronization</td><td>Here are the LSA headers I have</td></tr><tr><td>Link State Request (LSR)</td><td>Ask for specific missing/newer link-state information</td><td>Please send this LSA</td></tr><tr><td>Link State Update (LSU)</td><td>Carry one or more LSAs</td><td>Here is the requested or newly flooded link-state information</td></tr><tr><td>Link State Acknowledgment (LSAck)</td><td>Acknowledge receipt of LSAs</td><td>I received these LSAs</td></tr></tbody></table><p>Database Description packets carry summaries; Link State Update packets carry LSAs themselves. Do not confuse an LSA type with an OSPF packet type.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>After seeing a missing LSA in a database summary, a router sends an LSR, receives an LSU containing it and sends an LSAck.</p></aside></div></section>"},{"id":"q4a","title":"Q4A · IPv6 expansion and headers","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ. Summarize the IPv6 address 0:15::1:12:1213 to its full, original form. Write a comparison between IPv4 and IPv6 packet headers. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Given address: <code>0:15::1:12:1213</code>.</p><h2>To find</h2><p>The full 128-bit address in eight-group hexadecimal notation.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/a013f99fcbb0987c.svg\" alt=\"\\text{missing groups}=8-\\text{visible groups}\" style=\"width:34.708ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>A written 0 is a visible group. :: represents only the omitted all-zero groups.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count groups on both sides</h4><p>Left: 0, 15 (2 group(s)). Right: 1, 12, 1213 (3 group(s)).</p></div><div class=\"step\"><h4>Step 2. Calculate omitted groups</h4><p>Visible=2+3=5. Missing=8−5=3.</p></div><div class=\"step\"><h4>Step 3. Insert the groups</h4><p><code>0:15:0:0:0:1:12:1213</code>.</p></div><div class=\"step\"><h4>Step 4. Pad each group on the left</h4><table><thead><tr><th scope=\"col\">Group number</th><th scope=\"col\">Four-digit group</th></tr></thead><tbody><tr><td>1</td><td>0000</td></tr><tr><td>2</td><td>0015</td></tr><tr><td>3</td><td>0000</td></tr><tr><td>4</td><td>0000</td></tr><tr><td>5</td><td>0000</td></tr><tr><td>6</td><td>0001</td></tr><tr><td>7</td><td>0012</td></tr><tr><td>8</td><td>1213</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Write all eight in order</h4><p><code>0000:0015:0000:0000:0000:0001:0012:1213</code>.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>0000:0015:0000:0000:0000:0001:0012:1213</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>Leading zeros change the spelling, not the address value. The final group count is eight.</p></aside><h2>Header comparison</h2><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">IPv4</th><th scope=\"col\">IPv6</th></tr></thead><tbody><tr><td>Address width</td><td>32 bits</td><td>128 bits</td></tr><tr><td>Base/header size</td><td>20–60 bytes depending on options</td><td>40-byte fixed base header</td></tr><tr><td>Length field</td><td>Total length includes IPv4 header</td><td>Payload Length excludes 40-byte base header</td></tr><tr><td>Lifetime field</td><td>TTL</td><td>Hop Limit</td></tr><tr><td>Following protocol</td><td>Protocol field</td><td>Next Header; may identify an extension</td></tr><tr><td>Header checksum</td><td>Present</td><td>No base-header checksum</td></tr><tr><td>Options</td><td>Inside IPv4 header</td><td>Typically extension headers</td></tr><tr><td>Fragmentation fields</td><td>In IPv4 header; routers may fragment if permitted</td><td>Fragment extension header; fragmentation by source, not routers</td></tr></tbody></table><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ipv6-header.aef1bfbac7.svg\" width=\"820\" height=\"410\" alt=\"IPv6 base header · each horizontal row is 32 bits wide\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Fixed IPv6 base header.</figcaption></figure><div class=\"note\"><p>The supplied scheme’s sentence says four missing groups, but five groups are already visible, so only three are missing. Its printed eight-group expansion is consistent with three. The count shown above is independently verified.</p></div></div></section>"},{"id":"q6b","title":"Q6B · Three CSMA persistence rules","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ. Compare 1-persistent, non-persistent, and p-persistent CSMA strategies with diagrammatic representations. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/persistence.528dafcd8a.svg\" width=\"820\" height=\"590\" alt=\"CSMA persistence: what happens after carrier sensing?\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Different decisions after sensing the channel.</figcaption></figure><table><thead><tr><th scope=\"col\">Rule</th><th scope=\"col\">When idle</th><th scope=\"col\">When busy</th><th scope=\"col\">Trade-off</th></tr></thead><tbody><tr><td>1-persistent</td><td>Transmit immediately</td><td>Keep listening; transmit as soon as idle</td><td>Low idle delay, but waiting stations may start together</td></tr><tr><td>Non-persistent</td><td>Transmit</td><td>Wait a random time, then sense again</td><td>Less synchronized contention; may leave avoidable idle time</td></tr><tr><td>p-persistent (slotted)</td><td>Transmit with probability p; defer a slot with probability 1−p</td><td>Wait until available, then resume the probabilistic slot rule</td><td>Controls contention; needs slots and a choice of p</td></tr></tbody></table><p>All three sense the channel; their persistence rules differ. Propagation delay means carrier sensing cannot guarantee the absence of collisions. In p-persistent CSMA, each eligible idle-slot decision uses the specified probability.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Two stations waiting on a busy channel can start together under 1-persistence. Non-persistence separates repeat sensing through random waits; p-persistence spreads starts using probabilistic decisions.</p></aside></div></section>"},{"id":"q7a","title":"Q7A · Dijkstra · full directed graph","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ. Consider a network topology consisting of nodes A, B, C, D, E, F, and G. The directed edges between these nodes and their corresponding positive weights are given in the table below. Using Dijkstra’s Algorithm: (i) Determine the shortest path from source A to destination G. (ii) Compute the shortest distance. (iii) Show all intermediate steps, including initialization and selection of the minimum-distance node for each iteration. (iv) Illustrate the original topology and final shortest path with edge distances. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Cost</th></tr></thead><tbody><tr><td>A→B</td><td>4</td></tr><tr><td>A→C</td><td>2</td></tr><tr><td>B→C</td><td>5</td></tr><tr><td>B→D</td><td>10</td></tr><tr><td>C→D</td><td>3</td></tr><tr><td>C→E</td><td>4</td></tr><tr><td>D→E</td><td>1</td></tr><tr><td>D→F</td><td>2</td></tr><tr><td>E→F</td><td>3</td></tr><tr><td>F→G</td><td>5</td></tr></tbody></table><p>Source=A; target=G. Edges are directed; do not add reverse edges.</p><h2>To find</h2><p>The path A to G, its total cost and intermediate work.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/dijkstra-pyq.ffe6efac11.svg\" width=\"860.00\" height=\"257.00\" alt=\"Dijkstra · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>d[A]=0; every other distance=∞. No predecessors are known.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Tentative</td></tr><tr><td>B</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>C</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>F</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>G</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Settle A at distance 0</h4><p>Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞, E=∞, F=∞, G=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(4)=4</td><td>Improve to 4; predecessor=A</td></tr><tr><td>A→C</td><td>∞</td><td>0+(2)=2</td><td>Improve to 2; predecessor=A</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>4</td><td>A</td><td>Tentative</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>F</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>G</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Settle C at distance 2</h4><p>Unsettled candidates before selection: B=4, C=2, D=∞, E=∞, F=∞, G=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>C→D</td><td>∞</td><td>2+(3)=5</td><td>Improve to 5; predecessor=C</td></tr><tr><td>C→E</td><td>∞</td><td>2+(4)=6</td><td>Improve to 6; predecessor=C</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>4</td><td>A</td><td>Tentative</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>5</td><td>C</td><td>Tentative</td></tr><tr><td>E</td><td>6</td><td>C</td><td>Tentative</td></tr><tr><td>F</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>G</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Settle B at distance 4</h4><p>Unsettled candidates before selection: B=4, D=5, E=6, F=∞, G=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>B→C</td><td>2</td><td>4+(5)=9</td><td>Already settled; retain</td></tr><tr><td>B→D</td><td>5</td><td>4+(10)=14</td><td>Retain 5</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>4</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>5</td><td>C</td><td>Tentative</td></tr><tr><td>E</td><td>6</td><td>C</td><td>Tentative</td></tr><tr><td>F</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>G</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Settle D at distance 5</h4><p>Unsettled candidates before selection: D=5, E=6, F=∞, G=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>D→E</td><td>6</td><td>5+(1)=6</td><td>Retain 6 (equal cost)</td></tr><tr><td>D→F</td><td>∞</td><td>5+(2)=7</td><td>Improve to 7; predecessor=D</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>4</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>5</td><td>C</td><td>Settled</td></tr><tr><td>E</td><td>6</td><td>C</td><td>Tentative</td></tr><tr><td>F</td><td>7</td><td>D</td><td>Tentative</td></tr><tr><td>G</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Settle E at distance 6</h4><p>Unsettled candidates before selection: E=6, F=7, G=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>E→F</td><td>7</td><td>6+(3)=9</td><td>Retain 7</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>4</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>5</td><td>C</td><td>Settled</td></tr><tr><td>E</td><td>6</td><td>C</td><td>Settled</td></tr><tr><td>F</td><td>7</td><td>D</td><td>Tentative</td></tr><tr><td>G</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 7. Settle F at distance 7</h4><p>Unsettled candidates before selection: F=7, G=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>F→G</td><td>∞</td><td>7+(5)=12</td><td>Improve to 12; predecessor=F</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>4</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>5</td><td>C</td><td>Settled</td></tr><tr><td>E</td><td>6</td><td>C</td><td>Settled</td></tr><tr><td>F</td><td>7</td><td>D</td><td>Settled</td></tr><tr><td>G</td><td>12</td><td>F</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 8. Settle G at distance 12</h4><p>Unsettled candidates before selection: G=12. Select the minimum; ties use alphabetical order.</p><p>No outgoing edges to relax.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>4</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>5</td><td>C</td><td>Settled</td></tr><tr><td>E</td><td>6</td><td>C</td><td>Settled</td></tr><tr><td>F</td><td>7</td><td>D</td><td>Settled</td></tr><tr><td>G</td><td>12</td><td>F</td><td>Settled</td></tr></tbody></table></div><div class=\"step\"><h4>Step 9. Recover the path</h4><p>Trace backwards: G ← F ← D ← C ← A. Reverse it: A → C → D → F → G.</p><p>Edge sum: 2 + 3 + 2 + 5 = 12.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A → C → D → F → G; cost=12.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.</p></aside><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/dijkstra-pyq-solution.d92888ba14.svg\" width=\"1087.00\" height=\"307.00\" alt=\"Dijkstra · final route and distances\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Highlighted final route: A→C→D→F→G; total cost 12.</figcaption></figure></div></section>"}]},{"id":"paper-2026-reexam","title":"Re-exam · 4 February 2026","scope":"Actual TEE paper · current-M2 matching parts; original marks","sections":[{"id":"q1c","title":"Q1C · Pure ALOHA throughput","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ. In a Pure ALOHA system, the average number of frames generated per frame time is G = 0.5. Calculate the throughput S. What is the maximum possible throughput in Pure ALOHA? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Protocol = Pure ALOHA; G = 0.5 attempts/frame time.</p><h2>To find</h2><p>S, 100S and the maximum possible S.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><p>Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate the exponent</h4><p>−2 × 0.5 = -1.</p></div><div class=\"step\"><h4>Step 2. Evaluate the exponential</h4><div class=\"math-display\"><img src=\"math/f3e24ac70fcf4336.svg\" alt=\"e^{-1} \\approx 0.367879441\" style=\"width:18.245ex;height:2.05ex\" loading=\"lazy\" decoding=\"async\"></div></div><div class=\"step\"><h4>Step 3. Multiply by G</h4><p>S = 0.5 × 0.367879441 ≈ 0.183939721 successful frames/frame time.</p></div><div class=\"step\"><h4>Step 4. Convert to percentage</h4><p>0.183939721 × 100 ≈ 18.3940%.</p></div><div class=\"step\"><h4>Step 5. State the maximum separately</h4><p>The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> S ≈ 0.183940; percentage ≈ 18.3940%; Smax ≈ 0.183940 at G=0.5.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.</p></aside></div></section>"},{"id":"q1d","title":"Q1D · Address block /26","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ. A block of address is granted to a small organization and one of the address is 193.20.35.40/26. Determine the first address and last address in the block. Determine the total number of address in the block. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>193.20.35.40/26</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−26=6; N=2<sup>6</sup>=64.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.192</code>; binary=<code>11111111.11111111.11111111.11000000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 40 lies in 0…63.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 0 in octet 4; set any later octets to zero. Network=<strong>193.20.35.0</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>11000001</td><td>11111111</td><td>11000001</td><td>193</td></tr><tr><td>2</td><td>00010100</td><td>11111111</td><td>00010100</td><td>20</td></tr><tr><td>3</td><td>00100011</td><td>11111111</td><td>00100011</td><td>35</td></tr><tr><td>4</td><td>00101000</td><td>11000000</td><td>00000000</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 63 in the changing octet and 255 in any later octets. Broadcast=<strong>193.20.35.63</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=193.20.35.1; last usable=193.20.35.62; count=64−2=62.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 193.20.35.0; broadcast 193.20.35.63; 64 total, 62 ordinary usable; range 193.20.35.1–193.20.35.62.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"q2b","title":"Q2B · Department and lab allocation","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ. A university has been allocated an IP block of 172.16.0.0/16 (65,536 addresses) for its internal network. Department A: 32 labs, each requiring 128 addresses. Department B: 64 labs, each requiring 64 addresses. Department C: 16 labs, each requiring 512 addresses. Design the subnet allocations for each department and calculate how many IP addresses remain unused after the allocation. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Department</th><th scope=\"col\">Labs</th><th scope=\"col\">Total addresses per lab</th></tr></thead><tbody><tr><td>A</td><td>32</td><td>128</td></tr><tr><td>B</td><td>64</td><td>64</td></tr><tr><td>C</td><td>16</td><td>512</td></tr></tbody></table><p>Parent: 172.16.0.0/16 with 65,536 addresses.</p><h2>To find</h2><p>Lab prefixes, department ranges and unused total addresses.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/96f141ad847f8a75.svg\" alt=\"p=32-\\log_2(N_{\\mathrm{addresses\\ per\\ lab}})\" style=\"width:28.506ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/830cf354ee16974f.svg\" alt=\"N_{\\mathrm{department}}=N_{\\mathrm{labs}}N_{\\mathrm{addresses\\ per\\ lab}}\" style=\"width:31.567ex;height:2.195ex\" loading=\"lazy\" decoding=\"async\"></div><p>The question requests addresses, not usable hosts. Therefore do not add two before selecting each lab size.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Department A size</h4><p>128=2⁷ addresses/lab → /25. 32×128=4,096 addresses → department block /20. Allocate 172.16.0.0/20, spanning 172.16.0.0–172.16.15.255.</p></div><div class=\"step\"><h4>Step 2. Department B size</h4><p>64=2⁶ → /26 per lab. 64×64=4,096 → /20 department block. Allocate 172.16.16.0/20, spanning 172.16.16.0–172.16.31.255.</p></div><div class=\"step\"><h4>Step 3. Department C size</h4><p>512=2⁹ → /23 per lab. 16×512=8,192 → /19 department block. Allocate 172.16.32.0/19, spanning 172.16.32.0–172.16.63.255. Its start at third octet 32 is aligned for /19.</p></div><div class=\"step\"><h4>Step 4. List every lab allocation</h4><table><thead><tr><th scope=\"col\">Lab</th><th scope=\"col\">Prefix</th><th scope=\"col\">First address</th><th scope=\"col\">Last address</th></tr></thead><tbody><tr><td>A1</td><td>172.16.0.0/25</td><td>172.16.0.0</td><td>172.16.0.127</td></tr><tr><td>A2</td><td>172.16.0.128/25</td><td>172.16.0.128</td><td>172.16.0.255</td></tr><tr><td>A3</td><td>172.16.1.0/25</td><td>172.16.1.0</td><td>172.16.1.127</td></tr><tr><td>A4</td><td>172.16.1.128/25</td><td>172.16.1.128</td><td>172.16.1.255</td></tr><tr><td>A5</td><td>172.16.2.0/25</td><td>172.16.2.0</td><td>172.16.2.127</td></tr><tr><td>A6</td><td>172.16.2.128/25</td><td>172.16.2.128</td><td>172.16.2.255</td></tr><tr><td>A7</td><td>172.16.3.0/25</td><td>172.16.3.0</td><td>172.16.3.127</td></tr><tr><td>A8</td><td>172.16.3.128/25</td><td>172.16.3.128</td><td>172.16.3.255</td></tr><tr><td>A9</td><td>172.16.4.0/25</td><td>172.16.4.0</td><td>172.16.4.127</td></tr><tr><td>A10</td><td>172.16.4.128/25</td><td>172.16.4.128</td><td>172.16.4.255</td></tr><tr><td>A11</td><td>172.16.5.0/25</td><td>172.16.5.0</td><td>172.16.5.127</td></tr><tr><td>A12</td><td>172.16.5.128/25</td><td>172.16.5.128</td><td>172.16.5.255</td></tr><tr><td>A13</td><td>172.16.6.0/25</td><td>172.16.6.0</td><td>172.16.6.127</td></tr><tr><td>A14</td><td>172.16.6.128/25</td><td>172.16.6.128</td><td>172.16.6.255</td></tr><tr><td>A15</td><td>172.16.7.0/25</td><td>172.16.7.0</td><td>172.16.7.127</td></tr><tr><td>A16</td><td>172.16.7.128/25</td><td>172.16.7.128</td><td>172.16.7.255</td></tr><tr><td>A17</td><td>172.16.8.0/25</td><td>172.16.8.0</td><td>172.16.8.127</td></tr><tr><td>A18</td><td>172.16.8.128/25</td><td>172.16.8.128</td><td>172.16.8.255</td></tr><tr><td>A19</td><td>172.16.9.0/25</td><td>172.16.9.0</td><td>172.16.9.127</td></tr><tr><td>A20</td><td>172.16.9.128/25</td><td>172.16.9.128</td><td>172.16.9.255</td></tr><tr><td>A21</td><td>172.16.10.0/25</td><td>172.16.10.0</td><td>172.16.10.127</td></tr><tr><td>A22</td><td>172.16.10.128/25</td><td>172.16.10.128</td><td>172.16.10.255</td></tr><tr><td>A23</td><td>172.16.11.0/25</td><td>172.16.11.0</td><td>172.16.11.127</td></tr><tr><td>A24</td><td>172.16.11.128/25</td><td>172.16.11.128</td><td>172.16.11.255</td></tr><tr><td>A25</td><td>172.16.12.0/25</td><td>172.16.12.0</td><td>172.16.12.127</td></tr><tr><td>A26</td><td>172.16.12.128/25</td><td>172.16.12.128</td><td>172.16.12.255</td></tr><tr><td>A27</td><td>172.16.13.0/25</td><td>172.16.13.0</td><td>172.16.13.127</td></tr><tr><td>A28</td><td>172.16.13.128/25</td><td>172.16.13.128</td><td>172.16.13.255</td></tr><tr><td>A29</td><td>172.16.14.0/25</td><td>172.16.14.0</td><td>172.16.14.127</td></tr><tr><td>A30</td><td>172.16.14.128/25</td><td>172.16.14.128</td><td>172.16.14.255</td></tr><tr><td>A31</td><td>172.16.15.0/25</td><td>172.16.15.0</td><td>172.16.15.127</td></tr><tr><td>A32</td><td>172.16.15.128/25</td><td>172.16.15.128</td><td>172.16.15.255</td></tr><tr><td>B1</td><td>172.16.16.0/26</td><td>172.16.16.0</td><td>172.16.16.63</td></tr><tr><td>B2</td><td>172.16.16.64/26</td><td>172.16.16.64</td><td>172.16.16.127</td></tr><tr><td>B3</td><td>172.16.16.128/26</td><td>172.16.16.128</td><td>172.16.16.191</td></tr><tr><td>B4</td><td>172.16.16.192/26</td><td>172.16.16.192</td><td>172.16.16.255</td></tr><tr><td>B5</td><td>172.16.17.0/26</td><td>172.16.17.0</td><td>172.16.17.63</td></tr><tr><td>B6</td><td>172.16.17.64/26</td><td>172.16.17.64</td><td>172.16.17.127</td></tr><tr><td>B7</td><td>172.16.17.128/26</td><td>172.16.17.128</td><td>172.16.17.191</td></tr><tr><td>B8</td><td>172.16.17.192/26</td><td>172.16.17.192</td><td>172.16.17.255</td></tr><tr><td>B9</td><td>172.16.18.0/26</td><td>172.16.18.0</td><td>172.16.18.63</td></tr><tr><td>B10</td><td>172.16.18.64/26</td><td>172.16.18.64</td><td>172.16.18.127</td></tr><tr><td>B11</td><td>172.16.18.128/26</td><td>172.16.18.128</td><td>172.16.18.191</td></tr><tr><td>B12</td><td>172.16.18.192/26</td><td>172.16.18.192</td><td>172.16.18.255</td></tr><tr><td>B13</td><td>172.16.19.0/26</td><td>172.16.19.0</td><td>172.16.19.63</td></tr><tr><td>B14</td><td>172.16.19.64/26</td><td>172.16.19.64</td><td>172.16.19.127</td></tr><tr><td>B15</td><td>172.16.19.128/26</td><td>172.16.19.128</td><td>172.16.19.191</td></tr><tr><td>B16</td><td>172.16.19.192/26</td><td>172.16.19.192</td><td>172.16.19.255</td></tr><tr><td>B17</td><td>172.16.20.0/26</td><td>172.16.20.0</td><td>172.16.20.63</td></tr><tr><td>B18</td><td>172.16.20.64/26</td><td>172.16.20.64</td><td>172.16.20.127</td></tr><tr><td>B19</td><td>172.16.20.128/26</td><td>172.16.20.128</td><td>172.16.20.191</td></tr><tr><td>B20</td><td>172.16.20.192/26</td><td>172.16.20.192</td><td>172.16.20.255</td></tr><tr><td>B21</td><td>172.16.21.0/26</td><td>172.16.21.0</td><td>172.16.21.63</td></tr><tr><td>B22</td><td>172.16.21.64/26</td><td>172.16.21.64</td><td>172.16.21.127</td></tr><tr><td>B23</td><td>172.16.21.128/26</td><td>172.16.21.128</td><td>172.16.21.191</td></tr><tr><td>B24</td><td>172.16.21.192/26</td><td>172.16.21.192</td><td>172.16.21.255</td></tr><tr><td>B25</td><td>172.16.22.0/26</td><td>172.16.22.0</td><td>172.16.22.63</td></tr><tr><td>B26</td><td>172.16.22.64/26</td><td>172.16.22.64</td><td>172.16.22.127</td></tr><tr><td>B27</td><td>172.16.22.128/26</td><td>172.16.22.128</td><td>172.16.22.191</td></tr><tr><td>B28</td><td>172.16.22.192/26</td><td>172.16.22.192</td><td>172.16.22.255</td></tr><tr><td>B29</td><td>172.16.23.0/26</td><td>172.16.23.0</td><td>172.16.23.63</td></tr><tr><td>B30</td><td>172.16.23.64/26</td><td>172.16.23.64</td><td>172.16.23.127</td></tr><tr><td>B31</td><td>172.16.23.128/26</td><td>172.16.23.128</td><td>172.16.23.191</td></tr><tr><td>B32</td><td>172.16.23.192/26</td><td>172.16.23.192</td><td>172.16.23.255</td></tr><tr><td>B33</td><td>172.16.24.0/26</td><td>172.16.24.0</td><td>172.16.24.63</td></tr><tr><td>B34</td><td>172.16.24.64/26</td><td>172.16.24.64</td><td>172.16.24.127</td></tr><tr><td>B35</td><td>172.16.24.128/26</td><td>172.16.24.128</td><td>172.16.24.191</td></tr><tr><td>B36</td><td>172.16.24.192/26</td><td>172.16.24.192</td><td>172.16.24.255</td></tr><tr><td>B37</td><td>172.16.25.0/26</td><td>172.16.25.0</td><td>172.16.25.63</td></tr><tr><td>B38</td><td>172.16.25.64/26</td><td>172.16.25.64</td><td>172.16.25.127</td></tr><tr><td>B39</td><td>172.16.25.128/26</td><td>172.16.25.128</td><td>172.16.25.191</td></tr><tr><td>B40</td><td>172.16.25.192/26</td><td>172.16.25.192</td><td>172.16.25.255</td></tr><tr><td>B41</td><td>172.16.26.0/26</td><td>172.16.26.0</td><td>172.16.26.63</td></tr><tr><td>B42</td><td>172.16.26.64/26</td><td>172.16.26.64</td><td>172.16.26.127</td></tr><tr><td>B43</td><td>172.16.26.128/26</td><td>172.16.26.128</td><td>172.16.26.191</td></tr><tr><td>B44</td><td>172.16.26.192/26</td><td>172.16.26.192</td><td>172.16.26.255</td></tr><tr><td>B45</td><td>172.16.27.0/26</td><td>172.16.27.0</td><td>172.16.27.63</td></tr><tr><td>B46</td><td>172.16.27.64/26</td><td>172.16.27.64</td><td>172.16.27.127</td></tr><tr><td>B47</td><td>172.16.27.128/26</td><td>172.16.27.128</td><td>172.16.27.191</td></tr><tr><td>B48</td><td>172.16.27.192/26</td><td>172.16.27.192</td><td>172.16.27.255</td></tr><tr><td>B49</td><td>172.16.28.0/26</td><td>172.16.28.0</td><td>172.16.28.63</td></tr><tr><td>B50</td><td>172.16.28.64/26</td><td>172.16.28.64</td><td>172.16.28.127</td></tr><tr><td>B51</td><td>172.16.28.128/26</td><td>172.16.28.128</td><td>172.16.28.191</td></tr><tr><td>B52</td><td>172.16.28.192/26</td><td>172.16.28.192</td><td>172.16.28.255</td></tr><tr><td>B53</td><td>172.16.29.0/26</td><td>172.16.29.0</td><td>172.16.29.63</td></tr><tr><td>B54</td><td>172.16.29.64/26</td><td>172.16.29.64</td><td>172.16.29.127</td></tr><tr><td>B55</td><td>172.16.29.128/26</td><td>172.16.29.128</td><td>172.16.29.191</td></tr><tr><td>B56</td><td>172.16.29.192/26</td><td>172.16.29.192</td><td>172.16.29.255</td></tr><tr><td>B57</td><td>172.16.30.0/26</td><td>172.16.30.0</td><td>172.16.30.63</td></tr><tr><td>B58</td><td>172.16.30.64/26</td><td>172.16.30.64</td><td>172.16.30.127</td></tr><tr><td>B59</td><td>172.16.30.128/26</td><td>172.16.30.128</td><td>172.16.30.191</td></tr><tr><td>B60</td><td>172.16.30.192/26</td><td>172.16.30.192</td><td>172.16.30.255</td></tr><tr><td>B61</td><td>172.16.31.0/26</td><td>172.16.31.0</td><td>172.16.31.63</td></tr><tr><td>B62</td><td>172.16.31.64/26</td><td>172.16.31.64</td><td>172.16.31.127</td></tr><tr><td>B63</td><td>172.16.31.128/26</td><td>172.16.31.128</td><td>172.16.31.191</td></tr><tr><td>B64</td><td>172.16.31.192/26</td><td>172.16.31.192</td><td>172.16.31.255</td></tr><tr><td>C1</td><td>172.16.32.0/23</td><td>172.16.32.0</td><td>172.16.33.255</td></tr><tr><td>C2</td><td>172.16.34.0/23</td><td>172.16.34.0</td><td>172.16.35.255</td></tr><tr><td>C3</td><td>172.16.36.0/23</td><td>172.16.36.0</td><td>172.16.37.255</td></tr><tr><td>C4</td><td>172.16.38.0/23</td><td>172.16.38.0</td><td>172.16.39.255</td></tr><tr><td>C5</td><td>172.16.40.0/23</td><td>172.16.40.0</td><td>172.16.41.255</td></tr><tr><td>C6</td><td>172.16.42.0/23</td><td>172.16.42.0</td><td>172.16.43.255</td></tr><tr><td>C7</td><td>172.16.44.0/23</td><td>172.16.44.0</td><td>172.16.45.255</td></tr><tr><td>C8</td><td>172.16.46.0/23</td><td>172.16.46.0</td><td>172.16.47.255</td></tr><tr><td>C9</td><td>172.16.48.0/23</td><td>172.16.48.0</td><td>172.16.49.255</td></tr><tr><td>C10</td><td>172.16.50.0/23</td><td>172.16.50.0</td><td>172.16.51.255</td></tr><tr><td>C11</td><td>172.16.52.0/23</td><td>172.16.52.0</td><td>172.16.53.255</td></tr><tr><td>C12</td><td>172.16.54.0/23</td><td>172.16.54.0</td><td>172.16.55.255</td></tr><tr><td>C13</td><td>172.16.56.0/23</td><td>172.16.56.0</td><td>172.16.57.255</td></tr><tr><td>C14</td><td>172.16.58.0/23</td><td>172.16.58.0</td><td>172.16.59.255</td></tr><tr><td>C15</td><td>172.16.60.0/23</td><td>172.16.60.0</td><td>172.16.61.255</td></tr><tr><td>C16</td><td>172.16.62.0/23</td><td>172.16.62.0</td><td>172.16.63.255</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Calculate total allocation</h4><p>4,096+4,096+8,192=16,384 addresses.</p></div><div class=\"step\"><h4>Step 6. Calculate unused space</h4><p>65,536−16,384=49,152 addresses remain unallocated, from 172.16.64.0 through 172.16.255.255.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A: /25 per lab; B: /26 per lab; C: /23 per lab. 49,152 total addresses remain unallocated.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The three department blocks are aligned and non-overlapping. If these had been usable-host requirements, the per-lab prefixes would have been different.</p></aside></div></section>"},{"id":"q3b","title":"Q3B · How OSPF chooses a path","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ. Summarize how OSPF determines the best path to a destination network. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/link-state.bbee3173ec.svg\" width=\"820\" height=\"540\" alt=\"Link-state routing: from local links to a shortest-path tree\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Build the topology, then calculate the route.</figcaption></figure><ol><li>Discover/maintain neighbours and determine local link costs.</li><li>Exchange link-state information and synchronize the database within the appropriate area.</li><li>Run Dijkstra’s shortest-path algorithm with the current router as the root.</li><li>Add outgoing link costs along candidate paths and select minimum-cost routes.</li><li>Install next-hop information; recalculate when relevant topology information changes.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Path A→B→D costs 10+10=20, whereas A→C→D costs 5+8=13. The latter is preferred under those metrics. OSPF can support equal-cost alternatives.</p></aside></div></section>"},{"id":"q4a","title":"Q4A · IPv6 packet format","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ. Construct the IPv6 packet format and explain the purpose of each field. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ipv6-header.aef1bfbac7.svg\" width=\"820\" height=\"410\" alt=\"IPv6 base header · each horizontal row is 32 bits wide\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Eight base-header fields occupy 320 bits = 40 bytes.</figcaption></figure><table><thead><tr><th scope=\"col\">Field</th><th scope=\"col\">Bits</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Version</td><td>4</td><td>Value 6</td></tr><tr><td>Traffic Class</td><td>8</td><td>Traffic treatment/congestion-related marking</td></tr><tr><td>Flow Label</td><td>20</td><td>Identifies a flow for appropriate handling</td></tr><tr><td>Payload Length</td><td>16</td><td>Bytes after the base header; includes extension headers when present</td></tr><tr><td>Next Header</td><td>8</td><td>Type of the next extension header or upper-layer protocol</td></tr><tr><td>Hop Limit</td><td>8</td><td>Decremented on forwarding; limits packet lifetime in hops</td></tr><tr><td>Source address</td><td>128</td><td>Sending interface address</td></tr><tr><td>Destination address</td><td>128</td><td>Destination address</td></tr></tbody></table><p>The first two 32-bit rows contain 64 bits and the two addresses contain 256 bits, giving a 320-bit base header. Payload Length excludes these 40 bytes. Next Header can identify an extension header or upper-layer protocol. IPv6 has no base-header checksum; optional information is carried through extension headers.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A packet with 24 extension-header bytes and 1,200 upper-layer bytes has Payload Length=1,224 and total length=1,264 bytes. This illustrates why the two length values differ.</p></aside></div></section>"},{"id":"q6b","title":"Q6B · ALOHA at three attempt rates","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ. A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps. What is the throughput if the system (all stations together) produces (a) 1000 frames per second, (b) 500 frames per second, (c) 250 frames per second? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Interpret the stated aggregate production rates as offered attempt rates in the standard textbook model. The following working includes normalized throughput, successful frames/s and successful frame bits/s for each case.</p><h2>Case a · 1000 frames/s</h2><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>200 bits</td></tr><tr><td>R</td><td>200 kbps = 200,000 bits/s</td></tr><tr><td>λ</td><td>1000 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 200/200,000 = 0.001 s = 1 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 1000 × 0.001 = 1 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−2G = -2; e to that power ≈ 0.135335283.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 1 × 0.135335283 ≈ 0.135335283.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.135335283/0.001 ≈ 135.335283 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.135335283 × 200,000 ≈ 27067.056647 bits/s ≈ 27.067057 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=1, S≈0.135335, successful rate≈135.335 frames/s = 27.067 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 1000 attempts/s; collisions reduce the delivered frame rate to about 135.335/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside><h2>Case b · 500 frames/s</h2><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>200 bits</td></tr><tr><td>R</td><td>200 kbps = 200,000 bits/s</td></tr><tr><td>λ</td><td>500 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 200/200,000 = 0.001 s = 1 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 500 × 0.001 = 0.5 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−2G = -1; e to that power ≈ 0.367879441.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 0.5 × 0.367879441 ≈ 0.183939721.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.183939721/0.001 ≈ 183.939721 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.183939721 × 200,000 ≈ 36787.944117 bits/s ≈ 36.787944 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=0.5, S≈0.183940, successful rate≈183.940 frames/s = 36.788 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 500 attempts/s; collisions reduce the delivered frame rate to about 183.940/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside><h2>Case c · 250 frames/s</h2><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>200 bits</td></tr><tr><td>R</td><td>200 kbps = 200,000 bits/s</td></tr><tr><td>λ</td><td>250 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 200/200,000 = 0.001 s = 1 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 250 × 0.001 = 0.25 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−2G = -0.5; e to that power ≈ 0.606530660.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 0.25 × 0.606530660 ≈ 0.151632665.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.151632665/0.001 ≈ 151.632665 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.151632665 × 200,000 ≈ 30326.532986 bits/s ≈ 30.326533 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=0.25, S≈0.151633, successful rate≈151.633 frames/s = 30.327 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 250 attempts/s; collisions reduce the delivered frame rate to about 151.633/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside></div></section>"},{"id":"q7a","title":"Q7A · Bellman–Ford · full directed graph","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ. Consider a network topology consisting of nodes A, B, C, D, E, F, and G. The directed edges and weights are given below. Using Bellman–Ford: (i) Determine the shortest path from A to G. (ii) Compute its shortest distance. (iii) Show all intermediate steps, including edge relaxation at each iteration. (iv) Illustrate the original topology and the final shortest path with edge distances clearly marked. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Directed edge</th><th scope=\"col\">Weight</th></tr></thead><tbody><tr><td>A→B</td><td>7</td></tr><tr><td>A→C</td><td>6</td></tr><tr><td>A→D</td><td>5</td></tr><tr><td>B→E</td><td>-2</td></tr><tr><td>D→C</td><td>-2</td></tr><tr><td>C→B</td><td>-2</td></tr><tr><td>C→E</td><td>1</td></tr><tr><td>E→G</td><td>5</td></tr><tr><td>D→F</td><td>3</td></tr><tr><td>F→G</td><td>4</td></tr></tbody></table><h2>To find</h2><p>The shortest route and cost, with complete passes and a negative-cycle check.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Bellman–Ford permits negative edges. We use the listed order with in-place updates; do not mix this with a table that reads only the previous pass.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/bellman-pyq.8245b97635.svg\" width=\"772.00\" height=\"370.00\" alt=\"Bellman–Ford · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>7 vertices → at most 6 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.</p></div><div class=\"step\"><h4>Step 2. Pass 1: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(7)=7</td><td>7</td><td>Update; predecessor=A</td></tr><tr><td>A→C</td><td>∞</td><td>0+(6)=6</td><td>6</td><td>Update; predecessor=A</td></tr><tr><td>A→D</td><td>∞</td><td>0+(5)=5</td><td>5</td><td>Update; predecessor=A</td></tr><tr><td>B→E</td><td>∞</td><td>7+(-2)=5</td><td>5</td><td>Update; predecessor=B</td></tr><tr><td>D→C</td><td>6</td><td>5+(-2)=3</td><td>3</td><td>Update; predecessor=D</td></tr><tr><td>C→B</td><td>7</td><td>3+(-2)=1</td><td>1</td><td>Update; predecessor=C</td></tr><tr><td>C→E</td><td>5</td><td>3+(1)=4</td><td>4</td><td>Update; predecessor=C</td></tr><tr><td>E→G</td><td>∞</td><td>4+(5)=9</td><td>9</td><td>Update; predecessor=E</td></tr><tr><td>D→F</td><td>∞</td><td>5+(3)=8</td><td>8</td><td>Update; predecessor=D</td></tr><tr><td>F→G</td><td>9</td><td>8+(4)=12</td><td>9</td><td>No improvement</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th><th scope=\"col\">E</th><th scope=\"col\">F</th><th scope=\"col\">G</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>1</td><td>3</td><td>5</td><td>4</td><td>8</td><td>9</td></tr><tr><td>Predecessor</td><td>—</td><td>C</td><td>D</td><td>A</td><td>C</td><td>D</td><td>E</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Pass 2: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>1</td><td>0+(7)=7</td><td>1</td><td>No improvement</td></tr><tr><td>A→C</td><td>3</td><td>0+(6)=6</td><td>3</td><td>No improvement</td></tr><tr><td>A→D</td><td>5</td><td>0+(5)=5</td><td>5</td><td>No improvement</td></tr><tr><td>B→E</td><td>4</td><td>1+(-2)=-1</td><td>-1</td><td>Update; predecessor=B</td></tr><tr><td>D→C</td><td>3</td><td>5+(-2)=3</td><td>3</td><td>No improvement</td></tr><tr><td>C→B</td><td>1</td><td>3+(-2)=1</td><td>1</td><td>No improvement</td></tr><tr><td>C→E</td><td>-1</td><td>3+(1)=4</td><td>-1</td><td>No improvement</td></tr><tr><td>E→G</td><td>9</td><td>-1+(5)=4</td><td>4</td><td>Update; predecessor=E</td></tr><tr><td>D→F</td><td>8</td><td>5+(3)=8</td><td>8</td><td>No improvement</td></tr><tr><td>F→G</td><td>4</td><td>8+(4)=12</td><td>4</td><td>No improvement</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th><th scope=\"col\">E</th><th scope=\"col\">F</th><th scope=\"col\">G</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>1</td><td>3</td><td>5</td><td>-1</td><td>8</td><td>4</td></tr><tr><td>Predecessor</td><td>—</td><td>C</td><td>D</td><td>A</td><td>B</td><td>D</td><td>E</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Pass 3: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>1</td><td>0+(7)=7</td><td>1</td><td>No improvement</td></tr><tr><td>A→C</td><td>3</td><td>0+(6)=6</td><td>3</td><td>No improvement</td></tr><tr><td>A→D</td><td>5</td><td>0+(5)=5</td><td>5</td><td>No improvement</td></tr><tr><td>B→E</td><td>-1</td><td>1+(-2)=-1</td><td>-1</td><td>No improvement</td></tr><tr><td>D→C</td><td>3</td><td>5+(-2)=3</td><td>3</td><td>No improvement</td></tr><tr><td>C→B</td><td>1</td><td>3+(-2)=1</td><td>1</td><td>No improvement</td></tr><tr><td>C→E</td><td>-1</td><td>3+(1)=4</td><td>-1</td><td>No improvement</td></tr><tr><td>E→G</td><td>4</td><td>-1+(5)=4</td><td>4</td><td>No improvement</td></tr><tr><td>D→F</td><td>8</td><td>5+(3)=8</td><td>8</td><td>No improvement</td></tr><tr><td>F→G</td><td>4</td><td>8+(4)=12</td><td>4</td><td>No improvement</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th><th scope=\"col\">E</th><th scope=\"col\">F</th><th scope=\"col\">G</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>1</td><td>3</td><td>5</td><td>-1</td><td>8</td><td>4</td></tr><tr><td>Predecessor</td><td>—</td><td>C</td><td>D</td><td>A</td><td>B</td><td>D</td><td>E</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Stop after an unchanged pass</h4><p>This entire pass changed no distance. Further identical relaxation passes will not improve anything.</p></div><div class=\"step\"><h4>Step 6. Recover and total the path</h4><p>Backward predecessors: G ← E ← B ← C ← D ← A. Forward route: A → D → C → B → E → G.</p><p>Cost = (5) + (-2) + (-2) + (-2) + (5) = 4. No edge can now improve its destination label.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A → D → C → B → E → G; shortest cost=4.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Negative weights are a general graph-exercise feature. RIP hop counts and OSPF link costs are not negative in the ordinary routing protocols studied here.</p></aside><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/bellman-pyq-solution.9ae8451e95.svg\" width=\"999.00\" height=\"428.00\" alt=\"Bellman–Ford · final route and distances\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Highlighted route A→D→C→B→E→G, cost 5−2−2−2+5=4.</figcaption></figure></div></section>"}]}],"mocks":[{"id":"mock-start","title":"M2 mock instructions","scope":"10 marks attempted · 2+2 compulsory and any two 3-mark questions","sections":[{"id":"pattern","title":"Three complete practice papers","html":"<p>Each paper contains five question parts. <strong>Q1(a) and Q1(b) are compulsory, 2 marks each. Choose any two of Q2, Q3 and Q4, 3 marks each.</strong> All five answers are supplied immediately below their questions so you can also learn the optional question you did not attempt.</p><p>These are authored M2 practice papers, not leaked or predicted questions. Choose an exam-length timer only after confirming the actual CN duration; no CN time limit was supplied.</p><ol><li>Write the question number and list the given quantities with units.</li><li>State the formula or rule and why it fits this question.</li><li>Show each conversion, substitution, comparison and update separately.</li><li>End with the answer and its unit/address prefix/path.</li></ol><p>Paper A emphasizes ALOHA, blocks and Dijkstra. Paper B includes IPv6, VLSM and Bellman–Ford. Paper C emphasizes access protocols, DHCP and route decisions.</p>"}]},{"id":"mock-a","title":"M2 mock A","scope":"Q1(a)+Q1(b) compulsory; choose any two of Q2/Q3/Q4 · 10 marks attempted","sections":[{"id":"q1a","title":"Q1A · Carrier sensing and collisions","html":"<section class=\"example\"><h3 class=\"exam-question\">Question. Why does carrier sensing reduce but not eliminate collisions? <span class=\"marks\">[2 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Carrier sensing observes the local medium. Because signals have nonzero propagation delay, another station’s new transmission may not yet be detectable. Both stations can then start and their transmissions overlap.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A starts at time 0. B is far away and starts a moment later, before A’s signal reaches it. B heard silence, but the two transmissions can still collide.</p></aside></div></section>"},{"id":"q1b","title":"Q1B · Host bits and address counts","html":"<section class=\"example\"><h3 class=\"exam-question\">Question. For IPv4 /27, find the number of host bits, total addresses and ordinary usable host addresses. <span class=\"marks\">[2 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>p=27; ordinary IPv4 broadcast subnet.</p><h2>To find</h2><p>h, total and usable counts.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/391b44ac8c0c63db.svg\" alt=\"h=32-p,\\quad N=2^h,\\quad U=N-2\" style=\"width:34.948ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>Two boundary addresses are reserved under these ordinary rules.</p><h2>Step-by-step solution</h2><ol><li>Host bits: 32−27=5.</li><li>Total addresses: 2⁵=32.</li><li>Usable hosts: 32−2=30.</li></ol><p><strong>Final answer:</strong> 5 host bits, 32 total, 30 usable.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A request for 32 usable devices would need a larger subnet.</p></aside></div></section>"},{"id":"q2","title":"Q2 · Pure ALOHA throughput","html":"<section class=\"example\"><h3 class=\"exam-question\">Question. A Pure ALOHA channel sends 500-bit frames at 500 kbps. The aggregate attempt rate is 500 frames/s. Find G, normalized throughput and successful frames/s. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>500 bits</td></tr><tr><td>R</td><td>500 kbps = 500,000 bits/s</td></tr><tr><td>λ</td><td>500 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 500/500,000 = 0.001 s = 1 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 500 × 0.001 = 0.5 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−2G = -1; e to that power ≈ 0.367879441.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 0.5 × 0.367879441 ≈ 0.183939721.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.183939721/0.001 ≈ 183.939721 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.183939721 × 500,000 ≈ 91969.860293 bits/s ≈ 91.969860 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=0.5, S≈0.183940, successful rate≈183.940 frames/s = 91.970 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 500 attempts/s; collisions reduce the delivered frame rate to about 183.940/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside></div></section>"},{"id":"q3","title":"Q3 · Find the complete /27 block","html":"<section class=\"example\"><h3 class=\"exam-question\">Question. Find the network address, broadcast address and usable host range of 192.168.5.197/27. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>192.168.5.197/27</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−27=5; N=2<sup>5</sup>=32.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.224</code>; binary=<code>11111111.11111111.11111111.11100000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 224, so step=256−224=32. The IP value 197 lies in 192…223.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 192 in octet 4; set any later octets to zero. Network=<strong>192.168.5.192</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>11000000</td><td>11111111</td><td>11000000</td><td>192</td></tr><tr><td>2</td><td>10101000</td><td>11111111</td><td>10101000</td><td>168</td></tr><tr><td>3</td><td>00000101</td><td>11111111</td><td>00000101</td><td>5</td></tr><tr><td>4</td><td>11000101</td><td>11100000</td><td>11000000</td><td>192</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 223 in the changing octet and 255 in any later octets. Broadcast=<strong>192.168.5.223</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=192.168.5.193; last usable=192.168.5.222; count=32−2=30.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 192.168.5.192; broadcast 192.168.5.223; 32 total, 30 ordinary usable; range 192.168.5.193–192.168.5.222.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"q4","title":"Q4 · Dijkstra shortest path","html":"<section class=\"example\"><h3 class=\"exam-question\">Question. Use Dijkstra from A to D for directed edges A→B=2, A→C=6, B→C=1, B→D=7, C→D=2. Show each selected vertex and relaxation. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Cost</th></tr></thead><tbody><tr><td>A→B</td><td>2</td></tr><tr><td>A→C</td><td>6</td></tr><tr><td>B→C</td><td>1</td></tr><tr><td>B→D</td><td>7</td></tr><tr><td>C→D</td><td>2</td></tr></tbody></table><p>Source=A; target=D. Edges are directed; do not add reverse edges.</p><h2>To find</h2><p>The path A to D, its total cost and intermediate work.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/dijkstra-mock.f988abf338.svg\" width=\"482.00\" height=\"228.00\" alt=\"Dijkstra · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>d[A]=0; every other distance=∞. No predecessors are known.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Tentative</td></tr><tr><td>B</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>C</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Settle A at distance 0</h4><p>Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(2)=2</td><td>Improve to 2; predecessor=A</td></tr><tr><td>A→C</td><td>∞</td><td>0+(6)=6</td><td>Improve to 6; predecessor=A</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>2</td><td>A</td><td>Tentative</td></tr><tr><td>C</td><td>6</td><td>A</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Settle B at distance 2</h4><p>Unsettled candidates before selection: B=2, C=6, D=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>B→C</td><td>6</td><td>2+(1)=3</td><td>Improve to 3; predecessor=B</td></tr><tr><td>B→D</td><td>∞</td><td>2+(7)=9</td><td>Improve to 9; predecessor=B</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>3</td><td>B</td><td>Tentative</td></tr><tr><td>D</td><td>9</td><td>B</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Settle C at distance 3</h4><p>Unsettled candidates before selection: C=3, D=9. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>C→D</td><td>9</td><td>3+(2)=5</td><td>Improve to 5; predecessor=C</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>3</td><td>B</td><td>Settled</td></tr><tr><td>D</td><td>5</td><td>C</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Settle D at distance 5</h4><p>Unsettled candidates before selection: D=5. Select the minimum; ties use alphabetical order.</p><p>No outgoing edges to relax.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>3</td><td>B</td><td>Settled</td></tr><tr><td>D</td><td>5</td><td>C</td><td>Settled</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Recover the path</h4><p>Trace backwards: D ← C ← B ← A. Reverse it: A → B → C → D.</p><p>Edge sum: 2 + 1 + 2 = 5.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A → B → C → D; cost=5.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.</p></aside></div></section>"}]},{"id":"mock-b","title":"M2 mock B","scope":"Q1(a)+Q1(b) compulsory; choose any two of Q2/Q3/Q4 · 10 marks attempted","sections":[{"id":"q1a","title":"Q1A · ARP versus RARP","html":"<section class=\"example\"><h3 class=\"exam-question\">Question. Distinguish ARP and RARP with one use of each. <span class=\"marks\">[2 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Protocol</th><th scope=\"col\">Known</th><th scope=\"col\">Needed</th><th scope=\"col\">Use</th></tr></thead><tbody><tr><td>ARP</td><td>Local next-hop IPv4</td><td>MAC/hardware address</td><td>Local frame delivery</td></tr><tr><td>RARP</td><td>Client hardware address</td><td>Client IPv4</td><td>Historical boot-time assignment</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A diskless workstation with a pre-registered hardware address could use RARP to learn its assigned IPv4 address from a local RARP server.</p></aside></div></section>"},{"id":"q1b","title":"Q1B · Expand an IPv6 address","html":"<section class=\"example\"><h3 class=\"exam-question\">Question. Expand 2001:db8::10 into full IPv6 notation and state the number of groups replaced by ::. <span class=\"marks\">[2 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Given address: <code>2001:db8::10</code>.</p><h2>To find</h2><p>The full 128-bit address in eight-group hexadecimal notation.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/a013f99fcbb0987c.svg\" alt=\"\\text{missing groups}=8-\\text{visible groups}\" style=\"width:34.708ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>A written 0 is a visible group. :: represents only the omitted all-zero groups.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count groups on both sides</h4><p>Left: 2001, db8 (2 group(s)). Right: 10 (1 group(s)).</p></div><div class=\"step\"><h4>Step 2. Calculate omitted groups</h4><p>Visible=2+1=3. Missing=8−3=5.</p></div><div class=\"step\"><h4>Step 3. Insert the groups</h4><p><code>2001:db8:0:0:0:0:0:10</code>.</p></div><div class=\"step\"><h4>Step 4. Pad each group on the left</h4><table><thead><tr><th scope=\"col\">Group number</th><th scope=\"col\">Four-digit group</th></tr></thead><tbody><tr><td>1</td><td>2001</td></tr><tr><td>2</td><td>0db8</td></tr><tr><td>3</td><td>0000</td></tr><tr><td>4</td><td>0000</td></tr><tr><td>5</td><td>0000</td></tr><tr><td>6</td><td>0000</td></tr><tr><td>7</td><td>0000</td></tr><tr><td>8</td><td>0010</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Write all eight in order</h4><p><code>2001:0db8:0000:0000:0000:0000:0000:0010</code>.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>2001:0db8:0000:0000:0000:0000:0000:0010</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>Leading zeros change the spelling, not the address value. The final group count is eight.</p></aside></div></section>"},{"id":"q2","title":"Q2 · Allocate three VLSM blocks","html":"<section class=\"example\"><h3 class=\"exam-question\">Question. Allocate non-overlapping VLSM subnets inside 192.168.40.0/24 for A: 60 usable hosts, B: 30 usable hosts, C: 12 usable hosts. Allocate largest requirements first. Give all ranges and unallocated addresses. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Department</th><th scope=\"col\">Usable hosts</th></tr></thead><tbody><tr><td>A</td><td>60</td></tr><tr><td>B</td><td>30</td></tr><tr><td>C</td><td>12</td></tr></tbody></table><h2>To find</h2><p>An aligned subnet for each department, usable ranges, broadcasts and remaining addresses.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/0d2799e2eb681b5f.svg\" alt=\"2^h-2\\geq H,\\quad p=32-h\" style=\"width:24.918ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>Choose the smallest sufficient subnet per requirement. Align each start to its block size and never overlap a previously assigned range.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Sort the host requirements</h4><p>A (60) → B (30) → C (12)</p></div><div class=\"step\"><h4>Step 2. A · choose and allocate</h4><p>60 hosts require 2<sup>6</sup>−2=62 usable; a smaller /27 would give 30. Choose /26. The next aligned block is 192.168.40.0/26; it ends at 192.168.40.63.</p></div><div class=\"step\"><h4>Step 3. B · choose and allocate</h4><p>30 hosts require 2<sup>5</sup>−2=30 usable; a smaller /28 would give 14. Choose /27. The next aligned block is 192.168.40.64/27; it ends at 192.168.40.95.</p></div><div class=\"step\"><h4>Step 4. C · choose and allocate</h4><p>12 hosts require 2<sup>4</sup>−2=14 usable; a smaller /29 would give 6. Choose /28. The next aligned block is 192.168.40.96/28; it ends at 192.168.40.111.</p></div><div class=\"step\"><h4>Step 5. Write the complete allocation</h4><table><thead><tr><th scope=\"col\">Group</th><th scope=\"col\">Hosts</th><th scope=\"col\">Network/prefix</th><th scope=\"col\">Mask</th><th scope=\"col\">Usable range</th><th scope=\"col\">Broadcast</th><th scope=\"col\">Spare usable</th></tr></thead><tbody><tr><td>A</td><td>60</td><td>192.168.40.0/26</td><td>255.255.255.192</td><td>192.168.40.1–192.168.40.62</td><td>192.168.40.63</td><td>2</td></tr><tr><td>B</td><td>30</td><td>192.168.40.64/27</td><td>255.255.255.224</td><td>192.168.40.65–192.168.40.94</td><td>192.168.40.95</td><td>0</td></tr><tr><td>C</td><td>12</td><td>192.168.40.96/28</td><td>255.255.255.240</td><td>192.168.40.97–192.168.40.110</td><td>192.168.40.111</td><td>2</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Count addresses reserved and left</h4><p>Reserved=64+32+16=112. Parent total=256. Unallocated=256−112=144.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 112 total addresses reserved; 144 unallocated. The table gives one valid complete allocation.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Unused usable capacity inside assigned subnets is different from unallocated address space outside those subnets.</p></aside></div></section>"},{"id":"q3","title":"Q3 · Bellman–Ford shortest path","html":"<section class=\"example\"><h3 class=\"exam-question\">Question. Apply Bellman–Ford from A to D for directed edges A→B=5, A→C=8, B→C=−3, C→D=4, B→D=7. Show all passes using this edge order. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Directed edge</th><th scope=\"col\">Weight</th></tr></thead><tbody><tr><td>A→B</td><td>5</td></tr><tr><td>A→C</td><td>8</td></tr><tr><td>B→C</td><td>-3</td></tr><tr><td>C→D</td><td>4</td></tr><tr><td>B→D</td><td>7</td></tr></tbody></table><h2>To find</h2><p>The shortest route and cost, with complete passes and a negative-cycle check.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Bellman–Ford permits negative edges. We use the listed order with in-place updates; do not mix this with a table that reads only the previous pass.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/bellman-mock.47d822ce76.svg\" width=\"489.00\" height=\"228.00\" alt=\"Bellman–Ford · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>4 vertices → at most 3 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.</p></div><div class=\"step\"><h4>Step 2. Pass 1: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(5)=5</td><td>5</td><td>Update; predecessor=A</td></tr><tr><td>A→C</td><td>∞</td><td>0+(8)=8</td><td>8</td><td>Update; predecessor=A</td></tr><tr><td>B→C</td><td>8</td><td>5+(-3)=2</td><td>2</td><td>Update; predecessor=B</td></tr><tr><td>C→D</td><td>∞</td><td>2+(4)=6</td><td>6</td><td>Update; predecessor=C</td></tr><tr><td>B→D</td><td>6</td><td>5+(7)=12</td><td>6</td><td>No improvement</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>5</td><td>2</td><td>6</td></tr><tr><td>Predecessor</td><td>—</td><td>A</td><td>B</td><td>C</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Pass 2: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>5</td><td>0+(5)=5</td><td>5</td><td>No improvement</td></tr><tr><td>A→C</td><td>2</td><td>0+(8)=8</td><td>2</td><td>No improvement</td></tr><tr><td>B→C</td><td>2</td><td>5+(-3)=2</td><td>2</td><td>No improvement</td></tr><tr><td>C→D</td><td>6</td><td>2+(4)=6</td><td>6</td><td>No improvement</td></tr><tr><td>B→D</td><td>6</td><td>5+(7)=12</td><td>6</td><td>No improvement</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>5</td><td>2</td><td>6</td></tr><tr><td>Predecessor</td><td>—</td><td>A</td><td>B</td><td>C</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Stop after an unchanged pass</h4><p>This entire pass changed no distance. Further identical relaxation passes will not improve anything.</p></div><div class=\"step\"><h4>Step 5. Recover and total the path</h4><p>Backward predecessors: D ← C ← B ← A. Forward route: A → B → C → D.</p><p>Cost = (5) + (-3) + (4) = 6. No edge can now improve its destination label.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A → B → C → D; shortest cost=6.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Negative weights are a general graph-exercise feature. RIP hop counts and OSPF link costs are not negative in the ordinary routing protocols studied here.</p></aside></div></section>"},{"id":"q4","title":"Q4 · OSPF operation and packets","html":"<section class=\"example\"><h3 class=\"exam-question\">Question. Explain how OSPF learns the topology and selects a route. Name its five packet types. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>OSPF exchanges and maintains link-state information, builds a topology database and runs Dijkstra’s shortest-path computation rooted at the local router. It chooses a path with the lowest sum of link costs and installs the corresponding next hop. Equal-cost paths may be supported.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Route A→B→D costs 10+10=20 while A→C→D costs 5+8=13. OSPF’s cost comparison prefers the latter even though both have two links.</p></aside><p>Five packet types: Hello, Database Description, Link State Request, Link State Update and Link State Acknowledgment.</p></div></section>"}]},{"id":"mock-c","title":"M2 mock C","scope":"Q1(a)+Q1(b) compulsory; choose any two of Q2/Q3/Q4 · 10 marks attempted","sections":[{"id":"q1a","title":"Q1A · Pure versus Slotted ALOHA","html":"<section class=\"example\"><h3 class=\"exam-question\">Question. Compare Pure ALOHA and Slotted ALOHA in terms of start time, vulnerable period and maximum throughput. <span class=\"marks\">[2 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">Pure</th><th scope=\"col\">Slotted</th></tr></thead><tbody><tr><td>Start time</td><td>Any time</td><td>Slot boundary only</td></tr><tr><td>Synchronization</td><td>No common slots required</td><td>Required</td></tr><tr><td>Vulnerable period</td><td>2T</td><td>T</td></tr><tr><td>Maximum S</td><td>1/(2e) ≈ 0.184</td><td>1/e ≈ 0.368</td></tr><tr><td>G at maximum</td><td>0.5</td><td>1</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>If the slot duration is 1 ms and a frame becomes ready at 2.4 ms, the next permitted start is 3 ms. Another station choosing the same slot can still collide.</p></aside></div></section>"},{"id":"q1b","title":"Q1B · DHCP purpose and messages","html":"<section class=\"example\"><h3 class=\"exam-question\">Question. State the purpose of DHCP and list its four initial allocation messages in order. <span class=\"marks\">[2 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><ol><li>DHCPDISCOVER: client searches for a server.</li><li>DHCPOFFER: server proposes an address/configuration.</li><li>DHCPREQUEST: client requests the chosen allocation.</li><li>DHCPACK: server confirms the lease.</li></ol><p>DHCP reduces manual configuration and supports controlled address reuse through leases.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>When a laptop joins a campus network, DHCP can supply its address, mask, gateway and DNS-server option. It does not itself resolve website names; it can tell the laptop which DNS server to use.</p></aside></div></section>"},{"id":"q2","title":"Q2 · CSMA/CD minimum frame","html":"<section class=\"example\"><h3 class=\"exam-question\">Question. A CSMA/CD link runs at 100 Mbps with 2 μs one-way propagation delay. Ignoring extra device delays, calculate its minimum theoretical frame size. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>R=100 Mbps; Tp=2 μs.</p><h2>To find</h2><p>Lmin in bits and the minimum whole-byte length.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/dc84d9f4c66a26e3.svg\" alt=\"L_{\\min}=\\lceil 2RT_p\\rceil\" style=\"width:14.584ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>The frame must last at least a round trip. Convert Mbps to bits/s and μs to seconds before multiplying.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Convert the quantities</h4><p>R=100,000,000 bits/s; Tp=0.000002 s.</p></div><div class=\"step\"><h4>Step 2. Find round-trip delay</h4><p>2Tp=2×2=4 μs.</p></div><div class=\"step\"><h4>Step 3. Multiply rate by duration</h4><p>Lmin=2×100,000,000×0.000002=400 bits.</p></div><div class=\"step\"><h4>Step 4. Convert bits to whole bytes</h4><p>400/8=50; round upward if needed → 50 bytes.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 400 bits, or at least 50 whole bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>This is the theoretical timing bound for the stated link. If the question specifically asks for a standardized Ethernet minimum, its format constraints also apply; do not replace the standard by a smaller theoretical result.</p></aside></div></section>"},{"id":"q3","title":"Q3 · Longest-prefix matching","html":"<section class=\"example\"><h3 class=\"exam-question\">Question. A router has routes 0.0.0.0/0 via A, 172.16.0.0/16 via B and 172.16.8.0/21 via C. Which route is used for destination 172.16.10.45? Show the range checks. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Prefix</th><th scope=\"col\">Next hop</th></tr></thead><tbody><tr><td>0.0.0.0/0</td><td>A</td></tr><tr><td>172.16.0.0/16</td><td>B</td></tr><tr><td>172.16.8.0/21</td><td>C</td></tr></tbody></table><p>Destination=172.16.10.45.</p><h2>To find</h2><p>Most specific matching next hop.</p><h2>Formula and why</h2><p>Choose the largest matching prefix length; an entry that does not contain the destination is ineligible.</p><h2>Step-by-step solution</h2><ol><li>/0 matches all destinations.</li><li>/16 covers 172.16.0.0–172.16.255.255, so it matches.</li><li>/21 mask is 255.255.248.0; third-octet step=8. The block is 172.16.8.0–172.16.15.255, containing third octet 10.</li><li>Of /0, /16 and /21, /21 is longest.</li></ol><p><strong>Final answer:</strong> next hop C via 172.16.8.0/21.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>The longest match gives the more specific destination region.</p></aside></div></section>"},{"id":"q4","title":"Q4 · RIP metric and next hop","html":"<section class=\"example\"><h3 class=\"exam-question\">Question. For a destination Z, RIP neighbour B advertises metric 15 and neighbour C advertises metric 4. Each local link adds one hop. Compute both candidate metrics and the selected route. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>B advertises 15; C advertises 4; each local cost=1. RIP infinity=16.</p><h2>To find</h2><p>Candidate metrics and usable next hop.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/2010d425a3ad7305.svg\" alt=\"\\text{candidate}=\\min(16,1+\\text{advertised metric})\" style=\"width:42.262ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>RIP caps its metric at 16, representing unreachable.</p><h2>Step-by-step solution</h2><ol><li>Via B: min(16,1+15)=16 → unreachable.</li><li>Via C: min(16,1+4)=5 → reachable.</li><li>Select C, the finite lower-metric route.</li></ol><p><strong>Final answer:</strong> route via C at metric 5; B’s route is unreachable.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Metric 16 is not a valid 16-hop route.</p></aside></div></section>"}]}],"revision":[{"id":"revision","title":"Last-day revision","scope":"M2 · use after the lessons and worked examples","sections":[{"id":"order","title":"What to revise before the paper","html":"<p>Revise the methods in this sequence; keep every answer tied to its question and units.</p><ol><li>ALOHA: identify Pure/Slotted → L/R → λT → exponential → S → requested rate units.</li><li>CSMA: listening does not eliminate propagation-window collisions. CD detects; CA reduces risk.</li><li>Subnet: prefix → host bits → mask → changing-octet block → network/broadcast → usable hosts.</li><li>Allocation: addresses or hosts? Equal subnets or VLSM? Largest first, aligned start, no overlap.</li><li>IPv6: count visible groups → insert to reach eight → pad. Header is 40 bytes; payload excludes those 40.</li><li>Routing: direction and weights → select Dijkstra or Bellman–Ford → record updates → recover path.</li><li>Theory: switching comparison, ARP/RARP/DHCP, RIP, OSPF and five OSPF packets.</li></ol><p class=\"memory\"><strong>Yaad rakho:</strong> Numerical mein units, prefix, arrow aur requested quantity pehle circle karo.</p>"},{"id":"traps","title":"The mistakes that change a correct method into a wrong answer","html":"<table><thead><tr><th scope=\"col\">Trap</th><th scope=\"col\">Correct action</th></tr></thead><tbody><tr><td>Use 500 frames/s directly as G</td><td>First multiply by frame time</td></tr><tr><td>S and success probability treated as identical</td><td>Success probability per attempt is S/G</td></tr><tr><td>kbps converted using 1024</td><td>Use decimal network rates unless explicitly specified otherwise</td></tr><tr><td>All subnet blocks assumed to change only last octet</td><td>Locate changing mask octet; /20 changes the third</td></tr><tr><td>First address means first usable</td><td>First address is network; first usable is network+1</td></tr><tr><td>Subtract two from requested total addresses</td><td>Only ordinary usable-host count excludes the boundary two</td></tr><tr><td>Any consecutive networks aggregated blindly</td><td>Check power-of-two size and alignment</td></tr><tr><td>Two :: compressions in one IPv6 address</td><td>Use :: at most once</td></tr><tr><td>Dijkstra used on negative edges</td><td>Use Bellman–Ford when appropriate</td></tr><tr><td>Undirected reverse edges added to directed PYQ</td><td>Follow printed arrows only</td></tr><tr><td>All Bellman–Ford passes treated as identical conventions</td><td>State in-place or previous-pass method; do not mix</td></tr><tr><td>RIP metric 16 described as reachable</td><td>16 means unreachable</td></tr><tr><td>ARP asked for remote server MAC</td><td>Resolve local gateway/next-hop MAC</td></tr></tbody></table>"},{"id":"theory","title":"Short theory answer frames","html":"<table><thead><tr><th scope=\"col\">Question type</th><th scope=\"col\">Answer structure</th></tr></thead><tbody><tr><td>Define protocol</td><td>One precise definition → central mechanism → one correct example</td></tr><tr><td>Compare two protocols</td><td>Two-column table with distinct comparable points → application</td></tr><tr><td>Explain ARP or DHCP</td><td>Purpose → actors → ordered messages → result</td></tr><tr><td>Explain routing algorithm</td><td>Initialization → update/selection rule → repeat/stop → path extraction</td></tr><tr><td>Draw a header</td><td>Label fields and widths → explain field meanings → length convention</td></tr></tbody></table><p>For a 2-mark answer, keep the explanation focused on the requested points. For a 3-mark algorithm/numerical, show the essential sequence, not just a memorized final number. Original 10-mark PYQs here intentionally contain longer working.</p>"}]}],"about":[{"id":"about","title":"Portion and references","scope":"CN M2 · source mapping","sections":[{"id":"sources","title":"Sources, exclusions and corrections","html":"<p>Primary scope: your message, “From ALOHA to Unit 4 complete,” and the current AY 2026–27 Computer Networks syllabus, code 702AI0C023. Pattern: the confirmed 2+2 compulsory and any two 3-mark questions. No separate CN course-policy document was supplied.</p><p>Supplied materials reviewed: the CN English AnswerBook PDF/DOCX as a secondary reference; the December 2025 and February 2026 question papers and associated answer schemes extracted from the two Computer Networks ZIPs. The large answer-book contains substantial material outside this M2 cutoff; its broad predictions and extra topics do not redefine the confirmed portion.</p><h2>Corrections and conventions</h2><ul><li>The syllabus’s “CDMA/CA” is treated as the standard CSMA/CA collision-avoidance topic, consistent with the surrounding random-access list.</li><li>The final-paper IPv6 scheme incorrectly describes four omitted groups in 0:15::1:12:1213. Five groups are visible, so :: inserts three. Its displayed expanded address already has the correct eight groups.</li><li>ALOHA results are explicitly tied to the equal-frame Poisson collision model. Offered traffic, normalized throughput, successful frames/s and success probability are distinguished.</li><li>Bellman–Ford solutions declare an in-place edge order; intermediate tables can differ under another valid convention.</li><li>Subnet host-count exceptions /31 and /32 are kept separate from ordinary broadcast-subnet calculations.</li><li>Fragmentation and DHCP timer arithmetic are supporting extensions; prioritize the explicitly named core topics first.</li></ul><h2>Primary technical references</h2><ul><li><a href=\"https://ocw.mit.edu/courses/16-36-communication-systems-engineering-spring-2009/bd06e398d455db074059d50f6abc953e_MIT16_36s09_lec21_22.pdf\" target=\"_blank\" rel=\"noopener\">MIT OpenCourseWare · random access</a></li><li><a href=\"https://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1904.html\" target=\"_blank\" rel=\"noopener\">Cisco · Ethernet collision and duplex mechanisms</a></li><li><a href=\"https://www.rfc-editor.org/rfc/rfc4632\" target=\"_blank\" rel=\"noopener\">RFC 4632 · CIDR</a></li><li><a href=\"https://www.rfc-editor.org/rfc/rfc5952\" target=\"_blank\" rel=\"noopener\">RFC 5952 · canonical IPv6 representation</a></li><li><a href=\"https://www.rfc-editor.org/rfc/rfc8200\" target=\"_blank\" rel=\"noopener\">RFC 8200 · IPv6 packet format</a></li><li><a href=\"https://www.rfc-editor.org/rfc/rfc3021\" target=\"_blank\" rel=\"noopener\">RFC 3021 · /31 point-to-point addressing</a></li><li><a href=\"https://www.rfc-editor.org/rfc/rfc826\" target=\"_blank\" rel=\"noopener\">RFC 826 · ARP</a></li><li><a href=\"https://www.rfc-editor.org/rfc/rfc903\" target=\"_blank\" rel=\"noopener\">RFC 903 · RARP</a></li><li><a href=\"https://www.rfc-editor.org/rfc/rfc2131\" target=\"_blank\" rel=\"noopener\">RFC 2131 · DHCP</a></li><li><a href=\"https://www.rfc-editor.org/rfc/rfc2453\" target=\"_blank\" rel=\"noopener\">RFC 2453 · RIPv2</a></li><li><a href=\"https://www.rfc-editor.org/rfc/rfc2328\" target=\"_blank\" rel=\"noopener\">RFC 2328 · OSPFv2</a></li></ul><p>This release covers CN M2, not Units 1–6 as a complete TEE course. The matched TEE questions are included because they test this M2 material. No video is claimed as generated or reviewed in this CN release.</p>"}]}]},"tee":{"read":[{"id":"tee-start","title":"Start here · CN TEE","scope":"TEE · Units 1–6 · current syllabus 702AI0C023","sections":[{"id":"plan","title":"Full CN TEE reading order","html":"<h2>Prepare the question forms that the available papers actually use</h2><table><thead><tr><th scope=\"col\">Part / actual marks</th><th scope=\"col\">Observed family</th><th scope=\"col\">What to practise</th></tr></thead><tbody><tr><td>Q1(a–b) · 5+5</td><td>Network design and reference models</td><td>Concepts, comparison and labelled diagram</td></tr><tr><td>Q1(c–d) · 5+5</td><td>ALOHA and IPv4 address block</td><td>Formula, substitution, throughput; network/last address/count</td></tr><tr><td>Q2(a) · 10</td><td>Block coding/Hamming distance or CRC</td><td>Explanation plus complete bit-level calculation</td></tr><tr><td>Q2(b) · 10</td><td>Switching recommendation or subnet allocation</td><td>Compare mechanisms or show aligned allocation</td></tr><tr><td>Q3 · 5+5+10</td><td>Network classification/topologies, OSPF, HTTP/DNS</td><td>Theory, stages and diagrams</td></tr><tr><td>Q4 · 10+10</td><td>IPv6 and UDP/TCP</td><td>Address expansion/header diagram; protocol working</td></tr><tr><td>Q5 · 10+10</td><td>SR/GBN and SMTP/FTP</td><td>Window/ACK diagrams; ordered application flow</td></tr><tr><td>Q6 · 5+5+10</td><td>Media, random access, transport/congestion</td><td>Media theory; CSMA comparison or ALOHA rates; theory comparison</td></tr><tr><td>Q7 · 10+10</td><td>Dijkstra/Bellman–Ford and buckets</td><td>Full graph iterations; bucket diagram/working/limitations</td></tr></tbody></table><p>Basis: 5 December 2025 final and 4 February 2026 re-exam, all six original pages. This is an observed pattern, not confirmation of the next paper. Required syllabus topics stay in the main course even where these two papers did not ask them.</p><p><strong>Study all six units of the AY 2026–27 syllabus, course 702AI0C023.</strong> Begin with the small maths and vocabulary lessons; then read the layers in order. The M2 tab remains restricted to ALOHA onward through Unit 4.</p><table><thead><tr><th scope=\"col\">Unit</th><th scope=\"col\">Scope</th><th scope=\"col\">Syllabus hours</th></tr></thead><tbody><tr><td>1</td><td>Networks, peer-to-peer/client-server, classifications, topologies</td><td>2</td></tr><tr><td>2</td><td>OSI/TCP-IP models and transmission media</td><td>2</td></tr><tr><td>3</td><td>Error detection/correction, block coding, Hamming distance, CRC, ARQ, random access</td><td>7</td></tr><tr><td>4</td><td>Switching, IPv4/subnetting/CIDR, IPv6, ARP/RARP/DHCP, RIP/Bellman–Ford/link state/Dijkstra/OSPF</td><td>9</td></tr><tr><td>5</td><td>Process communication, UDP/TCP/SCTP, congestion control, QoS and buckets</td><td>6</td></tr><tr><td>6</td><td>HTTP, DNS, FTP and SMTP</td><td>4</td></tr></tbody></table><h2>What the supplied papers establish</h2><p>The final paper dated <strong>5 December 2025</strong> and re-exam dated <strong>4 February 2026</strong>, course 702AI0C007, both allow <strong>3 hours for 100 marks</strong>. Q1 is compulsory; attempt any four of Q2–Q7. Each whole question is 20 marks. Q1 has four 5-mark parts. These are historical source facts, not confirmation of a future paper.</p><p>The current syllabus specifies TEE 100 marks scaled to 50. A separate current CN exam-policy document was not supplied. The three TEE mocks follow the supplied historical structure and have solutions for every choice.</p><h2>Use the course in three passes</h2><ol><li>Read the core syllabus lessons, including diagrams and reasons behind each formula. The optional practice tab is outside this first pass. Write one worked example yourself before reading its steps.</li><li>Solve both actual papers. Their original marks and complete question wording/data are kept with answers immediately below.</li><li>Attempt a complete mock: Q1 plus four whole questions. Then revise formula conditions, protocol sequences and common mistakes.</li></ol><div class=\"note\"><p>Coverage means every named syllabus topic has an explicit teaching location. It cannot guarantee which questions will appear or how marks will be awarded. Optional supporting numericals are labelled so they do not hide the core syllabus.</p></div>"}]},{"id":"basics","title":"Essential vocabulary and maths","scope":"TEE prerequisites","sections":[{"id":"network","title":"Device, link, frame, packet and router","html":"<p><strong>Definition.</strong> A computer network is a collection of interconnected devices that exchange data using agreed communication rules called protocols.</p><p><strong>Simple meaning.</strong> Device number bhejta hai; link usko carry karta hai; protocol batata hai kaise bhejna hai.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/journey.a5c52083fd.svg\" width=\"820\" height=\"540\" alt=\"One packet travels through several local links\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Device, link, frame, packet and router</figcaption></figure><h2>Understand it step by step</h2><ol><li>A <strong>host</strong> is an end device such as a laptop. A <strong>link</strong> is the wired or wireless connection over which data travels.</li><li>A <strong>bit</strong> is 0 or 1. A <strong>frame</strong> is the data-link unit carried over one link. A <strong>packet</strong> is the network-layer unit, such as an IP packet. A packet is normally carried inside a frame.</li><li>A <strong>switch</strong> forwards Ethernet frames within a local network using MAC addresses. A <strong>router</strong> forwards IP packets between networks using destination IP addresses.</li><li>An IP address identifies an interface logically. An Ethernet MAC address is used for delivery on the current local link. The local next-hop MAC can change at each routed hop.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Your laptop sends an IP packet toward a website. On your Wi-Fi link it is carried in a frame addressed toward the local access infrastructure. Your router then forwards that IP packet toward another network.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Distinguish a frame, a packet and the role of a router. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A frame is a data-link-layer unit for one-link delivery; an IP packet is a network-layer unit for delivery across interconnected networks. A router examines the destination IP address, selects a next hop and forwards the packet in a new link-layer frame.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Your laptop sends an IP packet toward a website. On your Wi-Fi link it is carried in a frame addressed toward the local access infrastructure. Your router then forwards that IP packet toward another network.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Frame = ek link; packet = networks ke paar.</p>"},{"id":"bits","title":"Bits, bytes and rate: read the units first","html":"<p><strong>Definition.</strong> A bit is one binary digit. A byte contains eight bits. A data rate measures the number of bits transmitted per second.</p><p><strong>Simple meaning.</strong> Capital B = byte; small b = bit. Size aur speed ki units same karo.</p><h2>Understand it step by step</h2><ol><li>1 byte = 8 bits. Therefore 100 bytes = 800 bits.</li><li>Networking rates normally use decimal prefixes: 1 kbps = 1,000 bps and 1 Mbps = 1,000,000 bps. Storage-style KiB means 1,024 bytes and is a different notation.</li><li>1 second = 1,000 ms = 1,000,000 μs. A millisecond is 0.001 s; a microsecond is 0.000001 s.</li><li>Transmission time counts how long it takes to put the frame bits onto the link. Propagation time counts how long a signal takes to travel to the other end.</li></ol><div class=\"math-display\"><img src=\"math/045768b5f250c7fa.svg\" alt=\"T_{\\mathrm{frame}}=\\frac{L}{R}\" style=\"width:11.198ex;height:4.674ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/b9c12990b79f75b6.svg\" alt=\"T_p=\\frac{d}{v}\" style=\"width:7.503ex;height:4.676ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>A 1,000-byte frame contains 8,000 bits. At 2 Mbps, placing those bits onto the link takes 8,000/2,000,000 = 0.004 s = 4 ms.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain the difference between transmission delay and propagation delay. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Transmission delay is L/R, where L is the number of bits and R is the bit rate. Propagation delay is d/v, where d is link length and v is propagation speed. Larger frames increase transmission delay; a longer link increases propagation delay.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A 1,000-byte frame contains 8,000 bits. At 2 Mbps, placing those bits onto the link takes 8,000/2,000,000 = 0.004 s = 4 ms.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Bits / bits-per-second = seconds; metres / metres-per-second = seconds.</p>"},{"id":"delay-1","title":"Delay example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A frame contains 1000 bytes. The link rate is 2 Mbps; its length is 2,000 m and propagation speed is 200,000,000 m/s. Find transmission and one-way propagation delays. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Quantity</th><th scope=\"col\">Value</th></tr></thead><tbody><tr><td>Frame length</td><td>1000 bytes</td></tr><tr><td>Rate</td><td>2 Mbps</td></tr><tr><td>Link length</td><td>2,000 m</td></tr><tr><td>Signal speed</td><td>200,000,000 m/s</td></tr></tbody></table><h2>To find</h2><p>The two separate delays, in seconds and microseconds.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4bcb5bb2e87de6c2.svg\" alt=\"T_{\\mathrm{frame}}=L/R\" style=\"width:12.875ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/9c2209baf93e272e.svg\" alt=\"T_p=d/v\" style=\"width:8.736ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>L must be in bits and R in bits/s. Link length and signal speed must use the same distance unit.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Convert bytes to bits</h4><p>1000 × 8 = 8,000 bits.</p></div><div class=\"step\"><h4>Step 2. Convert the rate</h4><p>2 × 1,000,000 = 2,000,000 bits/s.</p></div><div class=\"step\"><h4>Step 3. Divide for transmission time</h4><p>8,000 ÷ 2,000,000 = 0.004000 s = 4000 μs.</p></div><div class=\"step\"><h4>Step 4. Divide for propagation time</h4><p>2,000 ÷ 200,000,000 = 0.000010 s = 10 μs.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Transmission = 4000 μs; propagation = 10 μs.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>These are different physical delays. Do not add a round-trip factor unless the question asks for a round trip.</p></aside></div></section>"},{"id":"delay-2","title":"Delay example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A frame contains 500 bytes. The link rate is 10 Mbps; its length is 10,000 m and propagation speed is 200,000,000 m/s. Find transmission and one-way propagation delays. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Quantity</th><th scope=\"col\">Value</th></tr></thead><tbody><tr><td>Frame length</td><td>500 bytes</td></tr><tr><td>Rate</td><td>10 Mbps</td></tr><tr><td>Link length</td><td>10,000 m</td></tr><tr><td>Signal speed</td><td>200,000,000 m/s</td></tr></tbody></table><h2>To find</h2><p>The two separate delays, in seconds and microseconds.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4bcb5bb2e87de6c2.svg\" alt=\"T_{\\mathrm{frame}}=L/R\" style=\"width:12.875ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/9c2209baf93e272e.svg\" alt=\"T_p=d/v\" style=\"width:8.736ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>L must be in bits and R in bits/s. Link length and signal speed must use the same distance unit.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Convert bytes to bits</h4><p>500 × 8 = 4,000 bits.</p></div><div class=\"step\"><h4>Step 2. Convert the rate</h4><p>10 × 1,000,000 = 10,000,000 bits/s.</p></div><div class=\"step\"><h4>Step 3. Divide for transmission time</h4><p>4,000 ÷ 10,000,000 = 0.000400 s = 400 μs.</p></div><div class=\"step\"><h4>Step 4. Divide for propagation time</h4><p>10,000 ÷ 200,000,000 = 0.000050 s = 50 μs.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Transmission = 400 μs; propagation = 50 μs.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>These are different physical delays. Do not add a round-trip factor unless the question asks for a round trip.</p></aside></div></section>"},{"id":"delay-3","title":"Delay example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A frame contains 1500 bytes. The link rate is 100 Mbps; its length is 100,000 m and propagation speed is 250,000,000 m/s. Find transmission and one-way propagation delays. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Quantity</th><th scope=\"col\">Value</th></tr></thead><tbody><tr><td>Frame length</td><td>1500 bytes</td></tr><tr><td>Rate</td><td>100 Mbps</td></tr><tr><td>Link length</td><td>100,000 m</td></tr><tr><td>Signal speed</td><td>250,000,000 m/s</td></tr></tbody></table><h2>To find</h2><p>The two separate delays, in seconds and microseconds.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4bcb5bb2e87de6c2.svg\" alt=\"T_{\\mathrm{frame}}=L/R\" style=\"width:12.875ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/9c2209baf93e272e.svg\" alt=\"T_p=d/v\" style=\"width:8.736ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>L must be in bits and R in bits/s. Link length and signal speed must use the same distance unit.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Convert bytes to bits</h4><p>1500 × 8 = 12,000 bits.</p></div><div class=\"step\"><h4>Step 2. Convert the rate</h4><p>100 × 1,000,000 = 100,000,000 bits/s.</p></div><div class=\"step\"><h4>Step 3. Divide for transmission time</h4><p>12,000 ÷ 100,000,000 = 0.000120 s = 120 μs.</p></div><div class=\"step\"><h4>Step 4. Divide for propagation time</h4><p>100,000 ÷ 250,000,000 = 0.000400 s = 400 μs.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Transmission = 120 μs; propagation = 400 μs.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>These are different physical delays. Do not add a round-trip factor unless the question asks for a round trip.</p></aside></div></section>"},{"id":"binary","title":"Binary place values: why the rightmost place is 1","html":"<p><strong>Definition.</strong> Binary is a base-two number system. Each position represents a power of 2; its digit says whether that value is present (1) or absent (0).</p><p><strong>Simple meaning.</strong> Right se 1 shuru karo; left jaate hi har box double: 1, 2, 4, 8…</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/binary.f629a09a71.svg\" width=\"820\" height=\"380\" alt=\"Binary positions: each move left doubles the value\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Binary place values: why the rightmost place is 1</figcaption></figure><h2>Understand it step by step</h2><ol><li>Decimal 352 means 3×100 + 5×10 + 2×1. The position supplies the value; the digit supplies the multiplier.</li><li>Binary follows the same idea, but the place values are 1, 2, 4, 8, 16, 32, 64, 128 instead of 1, 10, 100.</li><li>The rightmost position is numbered 0 because its value is 2⁰ = 1. The next is position 1 with value 2¹ = 2. Position 7 has value 2⁷ = 128.</li><li>For an 8-bit octet, write the values left to right as 128, 64, 32, 16, 8, 4, 2, 1. Add only the columns containing a 1. Leading zeroes keep the width but add nothing.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>In 00000101, the 1s sit above 4 and 1, so the value is 4+1 = 5. The 0 above 2 contributes 0, not 2.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain how a binary octet is converted to decimal. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Assign weights 128,64,32,16,8,4,2,1 from left to right. Multiply each weight by the bit in that position and add the eight products. For 11000000, the result is 128+64 = 192.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>In 00000101, the 1s sit above 4 and 1, so the value is 4+1 = 5. The 0 above 2 contributes 0, not 2.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Position ka weight likho; jahan 1 hai bas woh add karo.</p>"},{"id":"binary-1","title":"Binary to decimal · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Convert the 8-bit binary number 00000101 to decimal. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Binary octet = <code>00000101</code>.</p><h2>To find</h2><p>Its decimal value.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/2d0b01052ad0f77f.svg\" alt=\"\\text{Decimal value}=\\sum_{k=0}^{7} b_k2^k\" style=\"width:24.6ex;height:6.773ex\" loading=\"lazy\" decoding=\"async\"></div><p>The symbol Σ means add all the terms. bₖ is the bit at position k; the rightmost position is k=0. The table expands the entire sum.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Write all eight place values</h4><table><thead><tr><th scope=\"col\">Position from right</th><th scope=\"col\">7</th><th scope=\"col\">6</th><th scope=\"col\">5</th><th scope=\"col\">4</th><th scope=\"col\">3</th><th scope=\"col\">2</th><th scope=\"col\">1</th><th scope=\"col\">0</th></tr></thead><tbody><tr><td>Place value</td><td>128</td><td>64</td><td>32</td><td>16</td><td>8</td><td>4</td><td>2</td><td>1</td></tr><tr><td>Bit</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>1</td><td>0</td><td>1</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Multiply each bit by its place value</h4><table><thead><tr><th scope=\"col\">Place value</th><th scope=\"col\">Bit</th><th scope=\"col\">Product</th></tr></thead><tbody><tr><td>128</td><td>0</td><td>128 × 0 = 0</td></tr><tr><td>64</td><td>0</td><td>64 × 0 = 0</td></tr><tr><td>32</td><td>0</td><td>32 × 0 = 0</td></tr><tr><td>16</td><td>0</td><td>16 × 0 = 0</td></tr><tr><td>8</td><td>0</td><td>8 × 0 = 0</td></tr><tr><td>4</td><td>1</td><td>4 × 1 = 4</td></tr><tr><td>2</td><td>0</td><td>2 × 0 = 0</td></tr><tr><td>1</td><td>1</td><td>1 × 1 = 1</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Add the products</h4><p>0 + 0 + 0 + 0 + 0 + 4 + 0 + 1 = 5.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 5</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The eight boxes encode one value: 5. Leading zeroes do not change it.</p></aside></div></section>"},{"id":"binary-2","title":"Binary to decimal · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Convert the 8-bit binary number 10100110 to decimal. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Binary octet = <code>10100110</code>.</p><h2>To find</h2><p>Its decimal value.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/2d0b01052ad0f77f.svg\" alt=\"\\text{Decimal value}=\\sum_{k=0}^{7} b_k2^k\" style=\"width:24.6ex;height:6.773ex\" loading=\"lazy\" decoding=\"async\"></div><p>The symbol Σ means add all the terms. bₖ is the bit at position k; the rightmost position is k=0. The table expands the entire sum.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Write all eight place values</h4><table><thead><tr><th scope=\"col\">Position from right</th><th scope=\"col\">7</th><th scope=\"col\">6</th><th scope=\"col\">5</th><th scope=\"col\">4</th><th scope=\"col\">3</th><th scope=\"col\">2</th><th scope=\"col\">1</th><th scope=\"col\">0</th></tr></thead><tbody><tr><td>Place value</td><td>128</td><td>64</td><td>32</td><td>16</td><td>8</td><td>4</td><td>2</td><td>1</td></tr><tr><td>Bit</td><td>1</td><td>0</td><td>1</td><td>0</td><td>0</td><td>1</td><td>1</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Multiply each bit by its place value</h4><table><thead><tr><th scope=\"col\">Place value</th><th scope=\"col\">Bit</th><th scope=\"col\">Product</th></tr></thead><tbody><tr><td>128</td><td>1</td><td>128 × 1 = 128</td></tr><tr><td>64</td><td>0</td><td>64 × 0 = 0</td></tr><tr><td>32</td><td>1</td><td>32 × 1 = 32</td></tr><tr><td>16</td><td>0</td><td>16 × 0 = 0</td></tr><tr><td>8</td><td>0</td><td>8 × 0 = 0</td></tr><tr><td>4</td><td>1</td><td>4 × 1 = 4</td></tr><tr><td>2</td><td>1</td><td>2 × 1 = 2</td></tr><tr><td>1</td><td>0</td><td>1 × 0 = 0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Add the products</h4><p>128 + 0 + 32 + 0 + 0 + 4 + 2 + 0 = 166.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 166</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The eight boxes encode one value: 166. Leading zeroes do not change it.</p></aside></div></section>"},{"id":"binary-3","title":"Binary to decimal · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Convert the 8-bit binary number 11100000 to decimal. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Binary octet = <code>11100000</code>.</p><h2>To find</h2><p>Its decimal value.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/2d0b01052ad0f77f.svg\" alt=\"\\text{Decimal value}=\\sum_{k=0}^{7} b_k2^k\" style=\"width:24.6ex;height:6.773ex\" loading=\"lazy\" decoding=\"async\"></div><p>The symbol Σ means add all the terms. bₖ is the bit at position k; the rightmost position is k=0. The table expands the entire sum.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Write all eight place values</h4><table><thead><tr><th scope=\"col\">Position from right</th><th scope=\"col\">7</th><th scope=\"col\">6</th><th scope=\"col\">5</th><th scope=\"col\">4</th><th scope=\"col\">3</th><th scope=\"col\">2</th><th scope=\"col\">1</th><th scope=\"col\">0</th></tr></thead><tbody><tr><td>Place value</td><td>128</td><td>64</td><td>32</td><td>16</td><td>8</td><td>4</td><td>2</td><td>1</td></tr><tr><td>Bit</td><td>1</td><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Multiply each bit by its place value</h4><table><thead><tr><th scope=\"col\">Place value</th><th scope=\"col\">Bit</th><th scope=\"col\">Product</th></tr></thead><tbody><tr><td>128</td><td>1</td><td>128 × 1 = 128</td></tr><tr><td>64</td><td>1</td><td>64 × 1 = 64</td></tr><tr><td>32</td><td>1</td><td>32 × 1 = 32</td></tr><tr><td>16</td><td>0</td><td>16 × 0 = 0</td></tr><tr><td>8</td><td>0</td><td>8 × 0 = 0</td></tr><tr><td>4</td><td>0</td><td>4 × 0 = 0</td></tr><tr><td>2</td><td>0</td><td>2 × 0 = 0</td></tr><tr><td>1</td><td>0</td><td>1 × 0 = 0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Add the products</h4><p>128 + 64 + 32 + 0 + 0 + 0 + 0 + 0 = 224.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 224</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The eight boxes encode one value: 224. Leading zeroes do not change it.</p></aside></div></section>"},{"id":"binary-4","title":"Binary to decimal · example 4","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Convert the 8-bit binary number 11000000 to decimal. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Binary octet = <code>11000000</code>.</p><h2>To find</h2><p>Its decimal value.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/2d0b01052ad0f77f.svg\" alt=\"\\text{Decimal value}=\\sum_{k=0}^{7} b_k2^k\" style=\"width:24.6ex;height:6.773ex\" loading=\"lazy\" decoding=\"async\"></div><p>The symbol Σ means add all the terms. bₖ is the bit at position k; the rightmost position is k=0. The table expands the entire sum.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Write all eight place values</h4><table><thead><tr><th scope=\"col\">Position from right</th><th scope=\"col\">7</th><th scope=\"col\">6</th><th scope=\"col\">5</th><th scope=\"col\">4</th><th scope=\"col\">3</th><th scope=\"col\">2</th><th scope=\"col\">1</th><th scope=\"col\">0</th></tr></thead><tbody><tr><td>Place value</td><td>128</td><td>64</td><td>32</td><td>16</td><td>8</td><td>4</td><td>2</td><td>1</td></tr><tr><td>Bit</td><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Multiply each bit by its place value</h4><table><thead><tr><th scope=\"col\">Place value</th><th scope=\"col\">Bit</th><th scope=\"col\">Product</th></tr></thead><tbody><tr><td>128</td><td>1</td><td>128 × 1 = 128</td></tr><tr><td>64</td><td>1</td><td>64 × 1 = 64</td></tr><tr><td>32</td><td>0</td><td>32 × 0 = 0</td></tr><tr><td>16</td><td>0</td><td>16 × 0 = 0</td></tr><tr><td>8</td><td>0</td><td>8 × 0 = 0</td></tr><tr><td>4</td><td>0</td><td>4 × 0 = 0</td></tr><tr><td>2</td><td>0</td><td>2 × 0 = 0</td></tr><tr><td>1</td><td>0</td><td>1 × 0 = 0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Add the products</h4><p>128 + 64 + 0 + 0 + 0 + 0 + 0 + 0 = 192.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 192</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The eight boxes encode one value: 192. Leading zeroes do not change it.</p></aside></div></section>"},{"id":"decimal-1","title":"Decimal to binary · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Write decimal 13 as an 8-bit binary octet. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Decimal value = 13.</p><h2>To find</h2><p>Eight bits, including leading zeroes.</p><h2>Formula and why</h2><p>Use the weights 128,64,32,16,8,4,2,1.</p><p>At each weight, write 1 and subtract if the remaining value is at least that weight; otherwise write 0.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Choose each bit</h4><table><thead><tr><th scope=\"col\">Weight</th><th scope=\"col\">Remaining before</th><th scope=\"col\">Bit decision</th><th scope=\"col\">Remaining after</th></tr></thead><tbody><tr><td>128</td><td>13</td><td>0: too large</td><td>13</td></tr><tr><td>64</td><td>13</td><td>0: too large</td><td>13</td></tr><tr><td>32</td><td>13</td><td>0: too large</td><td>13</td></tr><tr><td>16</td><td>13</td><td>0: too large</td><td>13</td></tr><tr><td>8</td><td>13</td><td>1: subtract</td><td>5</td></tr><tr><td>4</td><td>5</td><td>1: subtract</td><td>1</td></tr><tr><td>2</td><td>1</td><td>0: too large</td><td>1</td></tr><tr><td>1</td><td>1</td><td>1: subtract</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Read bits in the same order</h4><p><code>00001101</code>.</p></div><div class=\"step\"><h4>Step 3. Reconstruct the decimal value</h4><p>8 + 4 + 1 = 13.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>00001101</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>Keep exactly eight positions when writing an IPv4 octet.</p></aside></div></section>"},{"id":"decimal-2","title":"Decimal to binary · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Write decimal 192 as an 8-bit binary octet. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Decimal value = 192.</p><h2>To find</h2><p>Eight bits, including leading zeroes.</p><h2>Formula and why</h2><p>Use the weights 128,64,32,16,8,4,2,1.</p><p>At each weight, write 1 and subtract if the remaining value is at least that weight; otherwise write 0.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Choose each bit</h4><table><thead><tr><th scope=\"col\">Weight</th><th scope=\"col\">Remaining before</th><th scope=\"col\">Bit decision</th><th scope=\"col\">Remaining after</th></tr></thead><tbody><tr><td>128</td><td>192</td><td>1: subtract</td><td>64</td></tr><tr><td>64</td><td>64</td><td>1: subtract</td><td>0</td></tr><tr><td>32</td><td>0</td><td>0: too large</td><td>0</td></tr><tr><td>16</td><td>0</td><td>0: too large</td><td>0</td></tr><tr><td>8</td><td>0</td><td>0: too large</td><td>0</td></tr><tr><td>4</td><td>0</td><td>0: too large</td><td>0</td></tr><tr><td>2</td><td>0</td><td>0: too large</td><td>0</td></tr><tr><td>1</td><td>0</td><td>0: too large</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Read bits in the same order</h4><p><code>11000000</code>.</p></div><div class=\"step\"><h4>Step 3. Reconstruct the decimal value</h4><p>128 + 64 = 192.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>11000000</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>Keep exactly eight positions when writing an IPv4 octet.</p></aside></div></section>"},{"id":"decimal-3","title":"Decimal to binary · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Write decimal 224 as an 8-bit binary octet. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Decimal value = 224.</p><h2>To find</h2><p>Eight bits, including leading zeroes.</p><h2>Formula and why</h2><p>Use the weights 128,64,32,16,8,4,2,1.</p><p>At each weight, write 1 and subtract if the remaining value is at least that weight; otherwise write 0.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Choose each bit</h4><table><thead><tr><th scope=\"col\">Weight</th><th scope=\"col\">Remaining before</th><th scope=\"col\">Bit decision</th><th scope=\"col\">Remaining after</th></tr></thead><tbody><tr><td>128</td><td>224</td><td>1: subtract</td><td>96</td></tr><tr><td>64</td><td>96</td><td>1: subtract</td><td>32</td></tr><tr><td>32</td><td>32</td><td>1: subtract</td><td>0</td></tr><tr><td>16</td><td>0</td><td>0: too large</td><td>0</td></tr><tr><td>8</td><td>0</td><td>0: too large</td><td>0</td></tr><tr><td>4</td><td>0</td><td>0: too large</td><td>0</td></tr><tr><td>2</td><td>0</td><td>0: too large</td><td>0</td></tr><tr><td>1</td><td>0</td><td>0: too large</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Read bits in the same order</h4><p><code>11100000</code>.</p></div><div class=\"step\"><h4>Step 3. Reconstruct the decimal value</h4><p>128 + 64 + 32 = 224.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>11100000</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>Keep exactly eight positions when writing an IPv4 octet.</p></aside></div></section>"},{"id":"powers","title":"Powers of two, percentages and the meaning of e","html":"<p><strong>Definition.</strong> A power describes repeated multiplication. The number e is approximately 2.718281828; e raised to a negative power is a positive number below 1.</p><p><strong>Simple meaning.</strong> 2 ki power bits ke combinations batati hai; e ki negative power ALOHA ki collision probability mein aati hai.</p><h2>Understand it step by step</h2><ol><li>2⁰ = 1; 2¹ = 2; 2² = 4; 2³ = 8. Each additional binary bit doubles the number of combinations. Six host bits give 2⁶ = 64 addresses.</li><li>A negative exponent means reciprocal: e⁻¹ = 1/e ≈ 0.367879. It does not mean −e.</li><li>A fraction 0.2 corresponds to 20%: multiply by 100. To convert 20% to a fraction, divide by 100.</li><li>For ALOHA, calculate the exponent first, then e raised to that exponent, then multiply by G. Keep at least six significant figures during working.</li></ol><table><thead><tr><th scope=\"col\">Power</th><th scope=\"col\">Value</th></tr></thead><tbody><tr><td>2<sup>0</sup></td><td>1</td></tr><tr><td>2<sup>1</sup></td><td>2</td></tr><tr><td>2<sup>2</sup></td><td>4</td></tr><tr><td>2<sup>3</sup></td><td>8</td></tr><tr><td>2<sup>4</sup></td><td>16</td></tr><tr><td>2<sup>5</sup></td><td>32</td></tr><tr><td>2<sup>6</sup></td><td>64</td></tr><tr><td>2<sup>7</sup></td><td>128</td></tr><tr><td>2<sup>8</sup></td><td>256</td></tr><tr><td>2<sup>9</sup></td><td>512</td></tr><tr><td>2<sup>10</sup></td><td>1024</td></tr><tr><td>2<sup>11</sup></td><td>2048</td></tr><tr><td>2<sup>12</sup></td><td>4096</td></tr><tr><td>2<sup>13</sup></td><td>8192</td></tr><tr><td>2<sup>14</sup></td><td>16384</td></tr><tr><td>2<sup>15</sup></td><td>32768</td></tr><tr><td>2<sup>16</sup></td><td>65536</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>At G=0.5 in Pure ALOHA, −2G = −1. Hence e⁻²ᴳ = e⁻¹ = 0.367879 and 0.5×0.367879 = 0.183940, or 18.394%.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain why 2⁶ gives 64 combinations and express 0.18394 as a percentage. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Each bit has two choices; six independent bit positions provide 2×2×2×2×2×2 = 64 combinations. A fraction is converted to percent by multiplying by 100, so 0.18394 corresponds to 18.394%.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>At G=0.5 in Pure ALOHA, −2G = −1. Hence e⁻²ᴳ = e⁻¹ = 0.367879 and 0.5×0.367879 = 0.183940, or 18.394%.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Minus exponent andar hai; final exponential positive rehta hai.</p>"},{"id":"calculator","title":"Calculator steps for ALOHA and subnetting","html":"<p>Use the normal calculation mode. Exact menu names vary across fx-991ES-family models; the mathematics below is the same. The <strong>eˣ</strong> function is usually the shifted function of <strong>ln</strong>. The <strong>EXP/×10ˣ</strong> key enters scientific notation and is not eˣ.</p><h2>Example 1 · e to a negative power</h2><ol><li>Enter eˣ with exponent (−1). Use the negative-number key or a clear parenthesised negative exponent.</li><li>Evaluate: e⁻¹ ≈ 0.3678794412.</li><li>Multiply by 0.5: 0.1839397206. Multiply by 100 only if a percentage is requested.</li></ol><h2>Example 2 · host combinations</h2><ol><li>For /26, subtract: 32−26 = 6 host bits.</li><li>Enter 2 raised to 6: 64 total addresses.</li><li>If ordinary usable host addresses are asked, subtract 2: 62.</li></ol><h2>Example 3 · frame time</h2><ol><li>A 200-bit frame at 200 kbps means 200/(200×10³).</li><li>Use parentheses around the denominator. Result: 0.001 seconds.</li><li>Multiply by 1,000 to express milliseconds: 1 ms.</li></ol><p class=\"memory\"><strong>Yaad rakho:</strong> eˣ aur ×10ˣ alag keys/functions hain. Brackets se denominator safe rakho.</p>"},{"id":"graphs","title":"How to read a routing graph","html":"<p><strong>Definition.</strong> A weighted graph represents routers as vertices and links as edges labelled with costs. A directed edge may be used only in the arrow direction.</p><p><strong>Simple meaning.</strong> Circle router hai, line link hai, number us link ka cost. Arrow ulta mat chalna.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/graph-basics.ebd9ed3bc9.svg\" width=\"820\" height=\"340\" alt=\"Directed path cost: arrows determine permitted travel\" loading=\"lazy\" decoding=\"async\"></div><figcaption>How to read a routing graph</figcaption></figure><h2>Understand it step by step</h2><ol><li>A vertex/node is one router, such as A. An edge A→B of weight 4 means going from A to B adds cost 4. It does not automatically permit B→A.</li><li>The cost of a path is the sum of its edge costs. A→B→C with costs 4 and 3 has total 7.</li><li>A tentative distance is the best route found so far; it can still improve. A predecessor records the previous vertex on that route.</li><li>∞ means no route has been discovered yet. For arithmetic in the table, ∞ plus a finite number stays ∞.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A direct A→C edge may cost 10, while A→B→C costs 4+3=7. The route with more links can still be cheaper.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. What is the difference between hop count and a weighted path cost? <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Hop count counts links or router transitions according to the protocol. A weighted path cost adds the numerical metric assigned to each edge. The fewest-hop path need not have the lowest weighted cost; an indirect route costing 7 is cheaper than a direct link costing 10.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A direct A→C edge may cost 10, while A→B→C costs 4+3=7. The route with more links can still be cheaper.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Shortest = smallest cost, zaroori nahi fewest arrows.</p>"}]},{"id":"introduction","title":"Unit 1 · Networks and topology","scope":"TEE · Unit 1 · current syllabus 702AI0C023","sections":[{"id":"network-types","title":"What a network is and how networks are classified","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Define a computer network. Explain LAN, MAN, PAN, WAN and ARPANET with examples. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A <strong>computer network</strong> is a set of interconnected devices that exchange data and share resources using communication protocols. A link carries signals; a protocol defines message format, meaning and timing. Hosts run applications, switches forward local frames and routers connect IP networks.</p><table><thead><tr><th scope=\"col\">Type</th><th scope=\"col\">Meaning and scope</th><th scope=\"col\">Example</th></tr></thead><tbody><tr><td>PAN</td><td>Personal Area Network: a person’s nearby devices</td><td>Phone linked to earbuds</td></tr><tr><td>LAN</td><td>Local Area Network: a building or local campus network under local administration</td><td>Laboratory Ethernet/Wi-Fi</td></tr><tr><td>MAN</td><td>Metropolitan Area Network: interconnects sites across a town/city</td><td>City-wide institutional network</td></tr><tr><td>WAN</td><td>Wide Area Network: connects geographically separated networks over regional/global links</td><td>Branches in different cities</td></tr><tr><td>ARPANET</td><td>Historical packet-switched research network; a major predecessor of the Internet</td><td>Early interconnected research institutions; not a modern geographic size category</td></tr></tbody></table><p>Classification by geographical scope is descriptive: a fixed kilometre boundary or a guaranteed speed is not part of every definition. Networks can also be classified by wired/wireless medium or by client-server/peer-to-peer organization.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A student uses a PAN for earbuds, a LAN in the lab and a WAN when accessing a distant university service.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> PAN personal, LAN local, MAN city, WAN wide.</p>"},{"id":"models","title":"Client-server and peer-to-peer","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. An organization plans an online collaboration platform. Explain how client-server and peer-to-peer designs affect performance, scalability and reliability. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>In a <strong>client-server</strong> design, users’ clients contact designated service processes. In <strong>peer-to-peer (P2P)</strong>, participating hosts can supply and consume resources. These are application organizations, not different physical cable types.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-client-peer.a7c6f1b535.svg\" width=\"820\" height=\"430\" alt=\"Client-server and peer-to-peer organization\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Central service versus cooperating peers.</figcaption></figure><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">Client-server</th><th scope=\"col\">Peer-to-peer</th></tr></thead><tbody><tr><td>Roles</td><td>Clients request; designated servers provide services</td><td>Peers can both request and provide resources</td></tr><tr><td>Control</td><td>Central policies, accounts and backups are easier to coordinate</td><td>Control and copies distributed among peers</td></tr><tr><td>Performance</td><td>Predictable with adequate server capacity; server may bottleneck</td><td>Resources grow with peers, but peer capacity/availability vary</td></tr><tr><td>Scalability</td><td>Scale servers, replicas, caching and load distribution</td><td>More peers can contribute capacity; coordination becomes harder</td></tr><tr><td>Reliability</td><td>One unreplicated server is a failure point; replication helps</td><td>Loss of one peer need not stop system if useful replicas remain</td></tr><tr><td>Security</td><td>Central access control and monitoring</td><td>Trust and consistent access policy are harder</td></tr><tr><td>Best fit</td><td>Managed collaboration, databases, login services</td><td>Distributed content sharing among participating peers</td></tr></tbody></table><h2>Apply to the platform</h2><p>Central servers can authenticate users, maintain the authoritative shared document and control versions. The organization must provision capacity, replicate data and avoid a single server failure. P2P can exchange large files or local edits among peers and distribute load, but needs discovery, conflict resolution, trust and availability strategies. A hybrid can keep account control centralized while distributing selected content.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>When three teammates edit one document, a replicated central service can order updates. A peer file swarm can speed distribution only while peers with the needed pieces are available.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Server mein service central; peers dono roles karte hain.</p>"},{"id":"topologies","title":"Network topologies and choosing a layout","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Define network topology. Explain star and bus topologies with diagrams, advantages and disadvantages; compare ring and mesh. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Topology</strong> is the arrangement of nodes and links. Physical topology describes actual links; logical topology describes how data flows. A switch-centred physical star is different from a shared collision-domain bus.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-topologies.d9e18f041b.svg\" width=\"820\" height=\"665\" alt=\"Four physical network topologies\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Star, bus, ring and full mesh; edges depict physical connections.</figcaption></figure><table><thead><tr><th scope=\"col\">Topology</th><th scope=\"col\">Structure</th><th scope=\"col\">Benefit</th><th scope=\"col\">Limitation</th></tr></thead><tbody><tr><td>Bus</td><td>Devices share a common backbone</td><td>Simple small shared-medium layout</td><td>Backbone fault affects segment; collisions possible on classic shared bus</td></tr><tr><td>Star</td><td>Each device connects to a central switch/hub</td><td>Easy expansion and fault isolation</td><td>Central-device failure affects star; more cabling</td></tr><tr><td>Ring</td><td>Each node connected to two neighbours in a ring</td><td>Structured traversal; token-based variants coordinate access</td><td>Simple single-ring break can disrupt operation unless protected</td></tr><tr><td>Full mesh</td><td>Every pair has a direct link</td><td>Redundant paths and direct connectivity</td><td>Expensive ports/cabling: n(n−1)/2 undirected links</td></tr><tr><td>Tree/hybrid</td><td>Hierarchical stars or combined topologies</td><td>Scales into buildings/floors</td><td>Upper-level faults affect dependent branches</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A lab normally uses a switch-centred star: unplugging one workstation cable isolates that workstation. A failed central switch can stop the whole lab unless redundancy is provided.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Layout draw karo, then one strength and one failure case.</p>"}]},{"id":"physical","title":"Unit 2 · Models and transmission media","scope":"TEE · Unit 2 · current syllabus 702AI0C023","sections":[{"id":"osi","title":"OSI layers and encapsulation","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Draw the OSI reference model and explain the function of each layer. <span class=\"marks\">[7 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>The <strong>Open Systems Interconnection (OSI)</strong> model separates network functions into seven layers. A layer offers services upward and uses services below. Peer layers communicate logically through protocol rules; actual data moves down the sender’s stack, across links and up the receiver’s stack.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-models.5bff0518c8.svg\" width=\"820\" height=\"670\" alt=\"OSI layers mapped to the four-layer TCP/IP model\" loading=\"lazy\" decoding=\"async\"></div><figcaption>OSI seven-layer model mapped to the four-layer TCP/IP model.</figcaption></figure><table><thead><tr><th scope=\"col\">Layer</th><th scope=\"col\">Task</th><th scope=\"col\">Example</th></tr></thead><tbody><tr><td>7 Application</td><td>Services used by network applications</td><td>HTTP, DNS, FTP, SMTP</td></tr><tr><td>6 Presentation</td><td>Representation, encoding and application data transformations</td><td>Character encoding, serialization; encryption as a conceptual function</td></tr><tr><td>5 Session</td><td>Manage dialogue and synchronization/checkpoints</td><td>Session establishment and resumption concepts</td></tr><tr><td>4 Transport</td><td>Process delivery; reliability/flow control where supplied</td><td>TCP, UDP, SCTP; ports</td></tr><tr><td>3 Network</td><td>Logical addressing and routing across networks</td><td>IP; routers</td></tr><tr><td>2 Data link</td><td>Framing, local link addressing, medium access and error detection</td><td>Ethernet/Wi-Fi; MAC addresses</td></tr><tr><td>1 Physical</td><td>Transmit signal symbols/bits through a medium</td><td>Electrical, optical or radio signals</td></tr></tbody></table><h2>Encapsulation and delivery</h2><ol><li>Application creates data. Transport adds a transport header: TCP segment or UDP datagram.</li><li>IP adds its header to form a packet. The link adds a header and usually a trailer to form a frame.</li><li>The physical layer carries signals. The destination reverses the process and sends the data to the receiving process.</li><li>At a router, local framing changes for the next link. A transit router primarily forwards at Layer 3; it need not run the end application.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A browser request becomes TCP data, an IP packet and then an Ethernet frame. An IP address selects the host/interface, while a TCP port selects the service.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Application se physical tak wrap; receiver par unwrap.</p>"},{"id":"tcpip","title":"TCP/IP layers and comparison with OSI","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Draw the TCP/IP reference model, explain all layers and compare it with OSI on five points. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>The <strong>TCP/IP model</strong> describes the Internet protocol suite in four layers. Many teaching books split the link layer into data link and physical, making a five-layer teaching model; identify the convention before drawing.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-models.5bff0518c8.svg\" width=\"820\" height=\"670\" alt=\"OSI layers mapped to the four-layer TCP/IP model\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Four TCP/IP layers; the link layer includes the physical medium.</figcaption></figure><table><thead><tr><th scope=\"col\">TCP/IP layer</th><th scope=\"col\">Function</th><th scope=\"col\">Examples</th></tr></thead><tbody><tr><td>Application</td><td>Defines application message formats and exchanges for Web access, naming, email and file transfer; includes presentation/session functions as needed</td><td>HTTP, DNS, SMTP, FTP</td></tr><tr><td>Transport</td><td>End-to-end process communication</td><td>TCP, UDP, SCTP</td></tr><tr><td>Internet</td><td>IP addressing, routing and best-effort datagrams</td><td>IPv4/IPv6</td></tr><tr><td>Link/network access</td><td>Local delivery and physical access</td><td>Ethernet/Wi-Fi and their medium</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">OSI</th><th scope=\"col\">TCP/IP</th></tr></thead><tbody><tr><td>Layer count</td><td>Seven</td><td>Four here; five-layer teaching variant splits link</td></tr><tr><td>Upper functions</td><td>Application, presentation, session separated</td><td>Grouped under application</td></tr><tr><td>Lower functions</td><td>Data link and physical separated</td><td>Grouped under link/network access</td></tr><tr><td>Purpose</td><td>General reference architecture</td><td>Architecture of deployed Internet protocol family</td></tr><tr><td>Network service</td><td>Reference model can describe different services</td><td>Internet layer uses connectionless IP</td></tr><tr><td>Transport</td><td>Conceptual transport service</td><td>TCP reliable byte stream; UDP datagrams; SCTP messages</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>An application can use UDP without changing the IP or Ethernet layers. Layering lets one protocol vary without redesigning every network function.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> OSI 7; TCP/IP four mein upper three merge, lower two merge.</p>"},{"id":"media","title":"Guided and unguided transmission media","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Classify transmission media. Explain the main wired and wireless media and give two characteristics of each unguided type. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Guided media</strong> constrain signals to a physical path: twisted pair, coaxial cable and optical fiber. <strong>Unguided media</strong> carry electromagnetic waves through free space: radio, microwave and infrared. Wireless bandwidth and reach depend on frequency, power, antenna, obstacles and regulations; media names alone do not fix a speed.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-media.aff26cd0b5.svg\" width=\"820\" height=\"515\" alt=\"Transmission media: guided and unguided\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Transmission media classification.</figcaption></figure><table><thead><tr><th scope=\"col\">Medium</th><th scope=\"col\">Two key characteristics</th><th scope=\"col\">Limitations / use</th></tr></thead><tbody><tr><td>Twisted pair</td><td>Electrical signal; pairs twisted to reduce interference</td><td>Low-cost LAN access; distance/noise limits depend on category and design</td></tr><tr><td>Coaxial cable</td><td>Shielded central conductor; greater shielding than basic unshielded pair</td><td>Bulkier; cable broadband and legacy shared LANs</td></tr><tr><td>Optical fiber</td><td>Light in glass/plastic; high capacity with immunity to electromagnetic interference</td><td>Transceivers and careful splicing/bend control needed; backbone links</td></tr><tr><td>Radio waves</td><td>Wireless propagation; many bands support broad/non-line-of-sight coverage</td><td>Interference, shared spectrum and security configuration matter; Wi-Fi/mobile</td></tr><tr><td>Terrestrial microwave</td><td>Directional antennas; typically line of sight</td><td>Alignment and obstructions matter; point-to-point backhaul</td></tr><tr><td>Satellite microwave</td><td>Wide coverage through relay in space</td><td>Cost and latency depend strongly on orbit/system; remote connectivity</td></tr><tr><td>Infrared</td><td>Short-range light; usually blocked by walls</td><td>Limited coverage; short-range indoor/remote-control links</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A university can connect buildings with fiber, desktops with twisted pair and mobile students with managed Wi-Fi. Satellite access is an option where suitable terrestrial links are unavailable.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Guided = cable path; unguided = free-space waves.</p>"},{"id":"fiber","title":"Optical fiber: advantages and limits","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. How is transmission media classified? List the advantages and disadvantages of optical fiber. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Transmission media are classified into guided media (twisted pair, coaxial cable, optical fiber) and unguided media (radio, microwave, infrared).</p><p>Optical fiber carries data as light in a core surrounded by cladding. It is a guided medium. Single-mode fiber supports one main propagation mode and is used for long/high-capacity links; multimode supports multiple modes and is often used over shorter distances.</p><table><thead><tr><th scope=\"col\">Advantages</th><th scope=\"col\">Disadvantages / design costs</th></tr></thead><tbody><tr><td>High data capacity and low attenuation over suitable links</td><td>Optical transceivers, connectors and splicing add cost/skill requirements</td></tr><tr><td>Immune to electromagnetic interference; no electrical crosstalk</td><td>Tight bends, dirty connectors and poor installation increase loss</td></tr><tr><td>Electrical isolation between buildings</td><td>Fiber is mechanically sensitive and requires appropriate protection</td></tr><tr><td>Harder to tap casually than an unprotected radio channel</td><td>It is not automatically confidential; encryption/access control remain necessary</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A campus backbone can use fiber between buildings to avoid electrical interference and achieve high capacity. Installers still need to respect bend radius and test connectors.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Fiber light carry karta hai; immunity means no EMI, not no security risk.</p>"},{"id":"campus","title":"Apply wired and wireless concepts to a campus","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A university plans a campus network. Explain how wired and wireless communication can be used with respect to speed, reliability and security. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Criterion</th><th scope=\"col\">Wired campus links</th><th scope=\"col\">Wireless campus access</th></tr></thead><tbody><tr><td>Speed/capacity</td><td>Dedicated switch ports and fiber backbones can provide high, predictable capacity</td><td>Capacity shared over radio; performance depends on contention, coverage and interference</td></tr><tr><td>Reliability</td><td>Stable when cables/ports and redundant uplinks are healthy</td><td>Mobility and flexible access; radio interference and coverage holes can cause variability</td></tr><tr><td>Security</td><td>Physical access control helps, but ports still need authentication/segmentation</td><td>Use authenticated encryption and managed access; radio extends beyond rooms</td></tr><tr><td>Deployment</td><td>Cabling cost and fixed access points</td><td>Supports mobile users and faster coverage changes</td></tr><tr><td>Recommended role</td><td>Servers, laboratories, inter-building backbone</td><td>Students’ phones/laptops, roaming and guest access</td></tr></tbody></table><p>Choose a hybrid: wired core/backbone and critical endpoints, with managed access points providing wireless mobility. Separate guest traffic, authenticate users and plan redundant infrastructure. Neither medium alone guarantees security or availability.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A lecture hall uses Wi-Fi for students, while each access point connects by cable to a switch and fiber links the building to campus servers.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Backbone stable cable; mobile users radio; security dono mein configure karo.</p>"}]},{"id":"error-control","title":"Unit 3 · Errors, block coding and CRC","scope":"TEE · Unit 3 before ALOHA · current syllabus 702AI0C023","sections":[{"id":"principles","title":"Error detection, correction and block coding","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain error detection and error correction. How does block coding add redundancy? <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A transmission error changes one or more bits. A <strong>single-bit error</strong> flips one bit. A <strong>burst error</strong> affects a span from the first corrupted bit to the last; the bits in between need not all change. Detection identifies an invalid received pattern; correction identifies the intended pattern within the code’s guaranteed capability.</p><h2>Block coding</h2><ol><li>Divide data into fixed k-bit datawords. Map each one to an n-bit codeword, with n greater than k.</li><li>The n−k redundant bits create separation between valid codewords. There are 2<sup>k</sup> valid codewords, a subset of the 2<sup>n</sup> possible n-bit patterns, for an injective binary block code.</li><li>A receiver can reject patterns that are not valid codewords. Nearest-codeword decoding can correct errors only if the received pattern has an unambiguous nearest intended codeword under the error bound.</li><li>Error-control protocols may combine detection with retransmission (ARQ), or use sufficient coding redundancy for forward error correction (FEC).</li></ol><div class=\"math-display\"><img src=\"math/d973fda532c4ffe6.svg\" alt=\"R_c=k/n,\\quad r=n-k\" style=\"width:21.89ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>A simple even-parity code maps 101 to 1010. The redundant parity bit permits detection of any single-bit flip, but cannot identify which bit changed.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Detection asks error hua? Correction asks kaunsa correct word?</p>"},{"id":"parity","title":"Parity and the limits of redundancy","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain even parity and why it can detect a single-bit error but cannot detect every error. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>With <strong>even parity</strong>, append a bit so the total number of 1s is even. The receiver repeats the parity test. A single-bit flip toggles parity and is detected. Two flips preserve parity and can pass the test. Odd parity uses an odd total; its limitations are analogous.</p><table><thead><tr><th scope=\"col\">Data</th><th scope=\"col\">Number of 1s</th><th scope=\"col\">Even-parity bit</th><th scope=\"col\">Codeword</th></tr></thead><tbody><tr><td>1011</td><td>3</td><td>1</td><td>10111</td></tr><tr><td>1100</td><td>2</td><td>0</td><td>11000</td></tr><tr><td>0000</td><td>0</td><td>0</td><td>00000</td></tr></tbody></table><p>Parity detects every odd number of bit flips, not every burst or every nonzero error. Detection also does not reveal the error position. The unused patterns, and the minimum distance between valid patterns, determine the guaranteed capability.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Codeword 11000 can change to 10100 by two flips. Both have two 1s, so the parity test misses this corruption.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Odd flips parity badalta; even flips bach sakte hain.</p>"},{"id":"hamming-distance","title":"Hamming distance and guaranteed capability","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Define Hamming distance and minimum distance. Derive the guaranteed detection and correction capability of a block code. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Hamming distance</strong> d(a,b) is the number of positions where two equal-length bit strings differ. XOR the strings and count the 1s. <strong>Minimum distance</strong> d<sub>min</sub> is the smallest distance between distinct valid codewords; do not use the largest pairwise distance.</p><div class=\"math-display\"><img src=\"math/08c67b82aac87a74.svg\" alt=\"d(a,b)=\\mathrm{weight}(a\\oplus b)\" style=\"width:22.357ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/bd55e600f9b980f0.svg\" alt=\"s_{\\max}=d_{\\min}-1,\\qquad t_{\\max}=\\left\\lfloor\\frac{d_{\\min}-1}{2}\\right\\rfloor\" style=\"width:39.262ex;height:5.428ex\" loading=\"lazy\" decoding=\"async\"></div><ol><li>Detection: fewer than dmin flips cannot transform one valid codeword into another, so all such errors are detected.</li><li>Correction: radius-t error regions around different codewords must not overlap. Therefore 2t &lt; dmin, or dmin ≥ 2t+1.</li><li>These are separate maximum guaranteed capabilities. A code with dmin=3 detects up to two errors in detection mode and corrects one in correction mode; that statement does not promise simultaneous correction of one and reliable identification of every two-error event under the same nearest-codeword decoder.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>The repetition code {000,111} has distance 3. If 001 arrives and at most one flip occurred, 000 is the unique nearest codeword.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> XOR ones count; minimum minus one detect, half floor correct.</p>"},{"id":"distance-1","title":"Hamming-distance working · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the binary codewords C1=1001101, C2=1110001, C3=1010101, find every pairwise Hamming distance, the minimum distance, and the guaranteed error detection/correction limits. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Codeword</th><th scope=\"col\">Bits</th></tr></thead><tbody><tr><td>C1</td><td>1001101</td></tr><tr><td>C2</td><td>1110001</td></tr><tr><td>C3</td><td>1010101</td></tr></tbody></table><h2>To find</h2><p>All pair distances, dmin and the maximum guaranteed numbers of errors.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/08c67b82aac87a74.svg\" alt=\"d(a,b)=\\mathrm{weight}(a\\oplus b)\" style=\"width:22.357ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/b0c374242e18e388.svg\" alt=\"s=d_{\\min}-1,\\quad t=\\lfloor(d_{\\min}-1)/2\\rfloor\" style=\"width:33.068ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>XOR exposes differing positions. Use the closest codeword pair, because it is the weakest separation in the code.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. XOR every distinct pair</h4><table><thead><tr><th scope=\"col\">Pair</th><th scope=\"col\">First</th><th scope=\"col\">Second</th><th scope=\"col\">XOR</th><th scope=\"col\">Distance</th></tr></thead><tbody><tr><td>C1 vs C2</td><td>1001101</td><td>1110001</td><td>0111100</td><td>4</td></tr><tr><td>C1 vs C3</td><td>1001101</td><td>1010101</td><td>0011000</td><td>2</td></tr><tr><td>C2 vs C3</td><td>1110001</td><td>1010101</td><td>0100100</td><td>2</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Take the minimum</h4><p>dmin = min(4, 2, 2) = 2.</p></div><div class=\"step\"><h4>Step 3. Calculate the guarantees</h4><p>Detect = 2−1 = 1; correct = floor((2−1)/2) = 0.</p></div><div class=\"step\"><h4>Step 4. Justify geometrically</h4><p>2 bit changes can reach another valid codeword, so only 1 are guaranteed detectable. Correction regions require 2t &lt; 2.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> dmin=2; detect up to 1 errors; correct up to 0 errors.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A distance of one particular pair does not set the whole-code capability unless it is the minimum.</p></aside></div></section>"},{"id":"distance-2","title":"Hamming-distance working · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the binary codewords C1=000, C2=111, find every pairwise Hamming distance, the minimum distance, and the guaranteed error detection/correction limits. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Codeword</th><th scope=\"col\">Bits</th></tr></thead><tbody><tr><td>C1</td><td>000</td></tr><tr><td>C2</td><td>111</td></tr></tbody></table><h2>To find</h2><p>All pair distances, dmin and the maximum guaranteed numbers of errors.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/08c67b82aac87a74.svg\" alt=\"d(a,b)=\\mathrm{weight}(a\\oplus b)\" style=\"width:22.357ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/b0c374242e18e388.svg\" alt=\"s=d_{\\min}-1,\\quad t=\\lfloor(d_{\\min}-1)/2\\rfloor\" style=\"width:33.068ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>XOR exposes differing positions. Use the closest codeword pair, because it is the weakest separation in the code.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. XOR every distinct pair</h4><table><thead><tr><th scope=\"col\">Pair</th><th scope=\"col\">First</th><th scope=\"col\">Second</th><th scope=\"col\">XOR</th><th scope=\"col\">Distance</th></tr></thead><tbody><tr><td>C1 vs C2</td><td>000</td><td>111</td><td>111</td><td>3</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Take the minimum</h4><p>dmin = min(3) = 3.</p></div><div class=\"step\"><h4>Step 3. Calculate the guarantees</h4><p>Detect = 3−1 = 2; correct = floor((3−1)/2) = 1.</p></div><div class=\"step\"><h4>Step 4. Justify geometrically</h4><p>3 bit changes can reach another valid codeword, so only 2 are guaranteed detectable. Correction regions require 2t &lt; 3.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> dmin=3; detect up to 2 errors; correct up to 1 errors.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A distance of one particular pair does not set the whole-code capability unless it is the minimum.</p></aside></div></section>"},{"id":"distance-3","title":"Hamming-distance working · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the binary codewords C1=00000, C2=11110, C3=00111, find every pairwise Hamming distance, the minimum distance, and the guaranteed error detection/correction limits. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Codeword</th><th scope=\"col\">Bits</th></tr></thead><tbody><tr><td>C1</td><td>00000</td></tr><tr><td>C2</td><td>11110</td></tr><tr><td>C3</td><td>00111</td></tr></tbody></table><h2>To find</h2><p>All pair distances, dmin and the maximum guaranteed numbers of errors.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/08c67b82aac87a74.svg\" alt=\"d(a,b)=\\mathrm{weight}(a\\oplus b)\" style=\"width:22.357ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/b0c374242e18e388.svg\" alt=\"s=d_{\\min}-1,\\quad t=\\lfloor(d_{\\min}-1)/2\\rfloor\" style=\"width:33.068ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>XOR exposes differing positions. Use the closest codeword pair, because it is the weakest separation in the code.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. XOR every distinct pair</h4><table><thead><tr><th scope=\"col\">Pair</th><th scope=\"col\">First</th><th scope=\"col\">Second</th><th scope=\"col\">XOR</th><th scope=\"col\">Distance</th></tr></thead><tbody><tr><td>C1 vs C2</td><td>00000</td><td>11110</td><td>11110</td><td>4</td></tr><tr><td>C1 vs C3</td><td>00000</td><td>00111</td><td>00111</td><td>3</td></tr><tr><td>C2 vs C3</td><td>11110</td><td>00111</td><td>11001</td><td>3</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Take the minimum</h4><p>dmin = min(4, 3, 3) = 3.</p></div><div class=\"step\"><h4>Step 3. Calculate the guarantees</h4><p>Detect = 3−1 = 2; correct = floor((3−1)/2) = 1.</p></div><div class=\"step\"><h4>Step 4. Justify geometrically</h4><p>3 bit changes can reach another valid codeword, so only 2 are guaranteed detectable. Correction regions require 2t &lt; 3.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> dmin=3; detect up to 2 errors; correct up to 1 errors.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A distance of one particular pair does not set the whole-code capability unless it is the minimum.</p></aside></div></section>"},{"id":"crc","title":"CRC: polynomial division without carries","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain CRC generation and checking. What does a zero remainder prove? <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A <strong>Cyclic Redundancy Check (CRC)</strong> treats a binary message as a polynomial over GF(2). Addition and subtraction are XOR: 0⊕0=0, 1⊕0=1, 0⊕1=1, 1⊕1=0. There are no carries or borrows. A degree-r generator contains r+1 bits, with leading and constant coefficients 1.</p><div class=\"math-display\"><img src=\"math/5edc4316a910e4aa.svg\" alt=\"T(x)=x^rM(x)\\oplus R(x),\\quad R(x)=x^rM(x)\\bmod G(x)\" style=\"width:51.893ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><ol><li>Convert each polynomial coefficient into a bit, including zero coefficients for missing powers.</li><li>Append r zero bits to the message, because multiplying by x^r shifts it left r places.</li><li>Align the generator’s leading 1 with the current leading 1; XOR and repeat until fewer than r+1 significant bits remain. Pad the remainder to exactly r bits.</li><li>Replace the appended zeros with the remainder. The resulting transmitted frame is divisible by the generator.</li><li>The receiver divides the entire received frame by the same generator without appending more zeros. A nonzero remainder proves a detected error. Zero means no error detected; a nonzero error polynomial divisible by the generator can pass.</li></ol><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-crc.24705171b3.svg\" width=\"820\" height=\"660\" alt=\"CRC sender and receiver\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Sender appends remainder; receiver checks divisibility.</figcaption></figure><p>A degree-r generator with nonzero constant term detects every burst of length at most r. Generators containing factor (x+1) detect every odd number of bit errors. Longer-error guarantees depend on the polynomial and frame length; CRC is not a general correction method.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Generator 1101 has degree 3, so append three zeros, not four. A 3-bit remainder such as 001 must keep its leading zeros.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> CRC mein subtract bhi XOR; receiver par full frame divide.</p>"},{"id":"crc-1","title":"CRC worked division · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For message bits 110010 and generator 1101, calculate the CRC and transmitted frame. Check the frame at the receiver and show a detected one-bit error. <span class=\"marks\">[7 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Message=110010; generator=1101; generator degree r=3. This is textbook systematic CRC with zero initial remainder and no reflection/final XOR.</p><h2>To find</h2><p>Exactly r CRC bits, the transmitted frame and receiver syndromes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/3db4ba7cff91f15a.svg\" alt=\"R=(M\\,2^r)\\bmod_2 G,\\qquad T=(M\\,2^r)\\oplus R\" style=\"width:40.767ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Modulo-2 division uses aligned XOR, not ordinary decimal division.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Preserve all polynomial coefficients</h4><p>Message bits=110010; generator bits=1101. Leading exponent is 3, so CRC length is 3.</p></div><div class=\"step\"><h4>Step 2. Append zeros</h4><p>110010 followed by 3 zeros = 110010000.</p></div><div class=\"step\"><h4>Step 3. Perform each nonzero XOR subtraction</h4><table><thead><tr><th scope=\"col\">Before</th><th scope=\"col\">Aligned generator</th><th scope=\"col\">After XOR</th></tr></thead><tbody><tr><td>110010000</td><td>110100000</td><td>000110000</td></tr><tr><td>000110000</td><td>000110100</td><td>000000100</td></tr></tbody></table><p>Remainder padded to 3 bits = <strong>100</strong>. Leading zero columns need no subtraction.</p></div><div class=\"step\"><h4>Step 4. Construct the transmitted frame</h4><p>Message + CRC = 110010 + 100 = <strong>110010100</strong>.</p></div><div class=\"step\"><h4>Step 5. Check the full frame</h4><table><thead><tr><th scope=\"col\">Before</th><th scope=\"col\">Aligned generator</th><th scope=\"col\">After XOR</th></tr></thead><tbody><tr><td>110010100</td><td>110100000</td><td>000110100</td></tr><tr><td>000110100</td><td>000110100</td><td>000000000</td></tr></tbody></table><p>Receiver remainder = 000; the uncorrupted frame passes.</p></div><div class=\"step\"><h4>Step 6. Demonstrate detection</h4><p>Flip the last bit: 110010101. Dividing by 1101 leaves 001, which is nonzero, so this error is detected. A zero syndrome would mean no detected error, not proof of no corruption.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> CRC=100; transmitted frame=110010100; uncorrupted receiver remainder=000.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Some software CRCs use different initial/reflection/final conventions; this answer follows the polynomial-division question’s stated textbook model.</p></aside></div></section>"},{"id":"crc-2","title":"CRC worked division · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For message bits 1001 and generator 1011, calculate the CRC and transmitted frame. Check the frame at the receiver and show a detected one-bit error. <span class=\"marks\">[7 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Message=1001; generator=1011; generator degree r=3. This is textbook systematic CRC with zero initial remainder and no reflection/final XOR.</p><h2>To find</h2><p>Exactly r CRC bits, the transmitted frame and receiver syndromes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/3db4ba7cff91f15a.svg\" alt=\"R=(M\\,2^r)\\bmod_2 G,\\qquad T=(M\\,2^r)\\oplus R\" style=\"width:40.767ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Modulo-2 division uses aligned XOR, not ordinary decimal division.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Preserve all polynomial coefficients</h4><p>Message bits=1001; generator bits=1011. Leading exponent is 3, so CRC length is 3.</p></div><div class=\"step\"><h4>Step 2. Append zeros</h4><p>1001 followed by 3 zeros = 1001000.</p></div><div class=\"step\"><h4>Step 3. Perform each nonzero XOR subtraction</h4><table><thead><tr><th scope=\"col\">Before</th><th scope=\"col\">Aligned generator</th><th scope=\"col\">After XOR</th></tr></thead><tbody><tr><td>1001000</td><td>1011000</td><td>0010000</td></tr><tr><td>0010000</td><td>0010110</td><td>0000110</td></tr></tbody></table><p>Remainder padded to 3 bits = <strong>110</strong>. Leading zero columns need no subtraction.</p></div><div class=\"step\"><h4>Step 4. Construct the transmitted frame</h4><p>Message + CRC = 1001 + 110 = <strong>1001110</strong>.</p></div><div class=\"step\"><h4>Step 5. Check the full frame</h4><table><thead><tr><th scope=\"col\">Before</th><th scope=\"col\">Aligned generator</th><th scope=\"col\">After XOR</th></tr></thead><tbody><tr><td>1001110</td><td>1011000</td><td>0010110</td></tr><tr><td>0010110</td><td>0010110</td><td>0000000</td></tr></tbody></table><p>Receiver remainder = 000; the uncorrupted frame passes.</p></div><div class=\"step\"><h4>Step 6. Demonstrate detection</h4><p>Flip the last bit: 1001111. Dividing by 1011 leaves 001, which is nonzero, so this error is detected. A zero syndrome would mean no detected error, not proof of no corruption.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> CRC=110; transmitted frame=1001110; uncorrupted receiver remainder=000.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Some software CRCs use different initial/reflection/final conventions; this answer follows the polynomial-division question’s stated textbook model.</p></aside></div></section>"},{"id":"crc-3","title":"CRC worked division · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For message bits 101101 and generator 10011, calculate the CRC and transmitted frame. Check the frame at the receiver and show a detected one-bit error. <span class=\"marks\">[7 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Message=101101; generator=10011; generator degree r=4. This is textbook systematic CRC with zero initial remainder and no reflection/final XOR.</p><h2>To find</h2><p>Exactly r CRC bits, the transmitted frame and receiver syndromes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/3db4ba7cff91f15a.svg\" alt=\"R=(M\\,2^r)\\bmod_2 G,\\qquad T=(M\\,2^r)\\oplus R\" style=\"width:40.767ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Modulo-2 division uses aligned XOR, not ordinary decimal division.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Preserve all polynomial coefficients</h4><p>Message bits=101101; generator bits=10011. Leading exponent is 4, so CRC length is 4.</p></div><div class=\"step\"><h4>Step 2. Append zeros</h4><p>101101 followed by 4 zeros = 1011010000.</p></div><div class=\"step\"><h4>Step 3. Perform each nonzero XOR subtraction</h4><table><thead><tr><th scope=\"col\">Before</th><th scope=\"col\">Aligned generator</th><th scope=\"col\">After XOR</th></tr></thead><tbody><tr><td>1011010000</td><td>1001100000</td><td>0010110000</td></tr><tr><td>0010110000</td><td>0010011000</td><td>0000101000</td></tr><tr><td>0000101000</td><td>0000100110</td><td>0000001110</td></tr></tbody></table><p>Remainder padded to 4 bits = <strong>1110</strong>. Leading zero columns need no subtraction.</p></div><div class=\"step\"><h4>Step 4. Construct the transmitted frame</h4><p>Message + CRC = 101101 + 1110 = <strong>1011011110</strong>.</p></div><div class=\"step\"><h4>Step 5. Check the full frame</h4><table><thead><tr><th scope=\"col\">Before</th><th scope=\"col\">Aligned generator</th><th scope=\"col\">After XOR</th></tr></thead><tbody><tr><td>1011011110</td><td>1001100000</td><td>0010111110</td></tr><tr><td>0010111110</td><td>0010011000</td><td>0000100110</td></tr><tr><td>0000100110</td><td>0000100110</td><td>0000000000</td></tr></tbody></table><p>Receiver remainder = 0000; the uncorrupted frame passes.</p></div><div class=\"step\"><h4>Step 6. Demonstrate detection</h4><p>Flip the last bit: 1011011111. Dividing by 10011 leaves 0001, which is nonzero, so this error is detected. A zero syndrome would mean no detected error, not proof of no corruption.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> CRC=1110; transmitted frame=1011011110; uncorrupted receiver remainder=0000.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Some software CRCs use different initial/reflection/final conventions; this answer follows the polynomial-division question’s stated textbook model.</p></aside></div></section>"},{"id":"crc-4","title":"CRC worked division · example 4","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For message bits 1010 and generator 1011, calculate the CRC and transmitted frame. Check the frame at the receiver and show a detected one-bit error. <span class=\"marks\">[7 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Message=1010; generator=1011; generator degree r=3. This is textbook systematic CRC with zero initial remainder and no reflection/final XOR.</p><h2>To find</h2><p>Exactly r CRC bits, the transmitted frame and receiver syndromes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/3db4ba7cff91f15a.svg\" alt=\"R=(M\\,2^r)\\bmod_2 G,\\qquad T=(M\\,2^r)\\oplus R\" style=\"width:40.767ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Modulo-2 division uses aligned XOR, not ordinary decimal division.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Preserve all polynomial coefficients</h4><p>Message bits=1010; generator bits=1011. Leading exponent is 3, so CRC length is 3.</p></div><div class=\"step\"><h4>Step 2. Append zeros</h4><p>1010 followed by 3 zeros = 1010000.</p></div><div class=\"step\"><h4>Step 3. Perform each nonzero XOR subtraction</h4><table><thead><tr><th scope=\"col\">Before</th><th scope=\"col\">Aligned generator</th><th scope=\"col\">After XOR</th></tr></thead><tbody><tr><td>1010000</td><td>1011000</td><td>0001000</td></tr><tr><td>0001000</td><td>0001011</td><td>0000011</td></tr></tbody></table><p>Remainder padded to 3 bits = <strong>011</strong>. Leading zero columns need no subtraction.</p></div><div class=\"step\"><h4>Step 4. Construct the transmitted frame</h4><p>Message + CRC = 1010 + 011 = <strong>1010011</strong>.</p></div><div class=\"step\"><h4>Step 5. Check the full frame</h4><table><thead><tr><th scope=\"col\">Before</th><th scope=\"col\">Aligned generator</th><th scope=\"col\">After XOR</th></tr></thead><tbody><tr><td>1010011</td><td>1011000</td><td>0001011</td></tr><tr><td>0001011</td><td>0001011</td><td>0000000</td></tr></tbody></table><p>Receiver remainder = 000; the uncorrupted frame passes.</p></div><div class=\"step\"><h4>Step 6. Demonstrate detection</h4><p>Flip the last bit: 1010010. Dividing by 1011 leaves 001, which is nonzero, so this error is detected. A zero syndrome would mean no detected error, not proof of no corruption.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> CRC=011; transmitted frame=1010011; uncorrupted receiver remainder=000.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Some software CRCs use different initial/reflection/final conventions; this answer follows the polynomial-division question’s stated textbook model.</p></aside></div></section>"}]},{"id":"arq","title":"Unit 3 · Flow control and ARQ","scope":"TEE · Unit 3 before ALOHA · current syllabus 702AI0C023","sections":[{"id":"flow-error","title":"Flow control is different from error control","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Distinguish flow control from error control. Explain the building blocks of ARQ. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Flow control</strong> prevents a fast sender from overwhelming receiver buffers. <strong>Error control</strong> handles damaged, lost and duplicate frames so that the intended data can be delivered reliably. <strong>ARQ</strong> means Automatic Repeat reQuest: retransmission is triggered by feedback or a timer.</p><table><thead><tr><th scope=\"col\">Mechanism</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>CRC/checksum</td><td>Detect corrupted frames; alone does not recover them</td></tr><tr><td>Sequence number</td><td>Identify data and reject duplicates</td></tr><tr><td>ACK</td><td>Confirm accepted data; state cumulative or individual convention</td></tr><tr><td>Timer</td><td>Recover when either data or its ACK disappears</td></tr><tr><td>Window</td><td>Bound the outstanding unacknowledged data</td></tr><tr><td>Buffer</td><td>Hold unacknowledged sender copies; receiver buffers depend on protocol</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A receiver may ask a sender to slow down even on an error-free link. Conversely, a lost frame needs recovery even when the receiver has plenty of buffer space.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Flow receiver speed; error lost/corrupt/duplicate recovery.</p>"},{"id":"stopwait","title":"Stop-and-Wait ARQ and lost ACKs","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain Stop-and-Wait ARQ with normal transmission, lost data and lost ACK cases. <span class=\"marks\">[7 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Stop-and-Wait ARQ</strong> permits only one outstanding frame. The sender stores its frame, transmits it and starts a timer. A valid matching ACK advances the sender; a timeout retransmits the stored frame.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-stopwait.a99281ab96.svg\" width=\"820\" height=\"569\" alt=\"Stop-and-Wait: lost ACK and duplicate rejection\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Lost ACK causes a duplicate transmission, not duplicate delivery.</figcaption></figure><ol><li>Use alternating sequence numbers 0 and 1. The receiver remembers the next expected number. Here ACK k means the next sequence expected.</li><li>Normal: send frame 0, receiver accepts it and sends ACK 1; sender then sends frame 1.</li><li>Damaged/lost data: receiver cannot accept the missing valid frame. The sender eventually times out and retransmits.</li><li>Lost ACK: the receiver already accepted the frame, but the sender times out and retransmits it. The receiver detects the duplicate by sequence number, does not deliver it twice, and repeats the ACK.</li><li>A damaged ACK must not advance the sender. The timer provides eventual recovery. Waiting each round trip limits utilization on high-delay links.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>After frame 0 is delivered, ACK 1 is lost. A retransmitted frame 0 is discarded as a duplicate; another ACK 1 tells the sender it may proceed.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> One frame outstanding; duplicate ko acknowledge karo, deliver dobara nahi.</p>"},{"id":"gbn","title":"Go-Back-N with window 7: three complete cases","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Apply Go-Back-N ARQ for window size 7. Explain normal transmission, a lost data frame and a lost ACK, including window shifting and retransmission. <span class=\"marks\">[10 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Go-Back-N (GBN) ARQ</strong> pipelines up to W outstanding frames. For m-bit sequence numbers, textbook GBN uses W ≤ 2<sup>m</sup>−1 and receiver window 1. The receiver accepts only the next in-order frame; out-of-order frames are discarded. ACK k here cumulatively acknowledges all frames before k and means “next expected is k”.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-gbn.5f577a6979.svg\" width=\"820\" height=\"750\" alt=\"GBN W=7: loss and cumulative ACKs\" loading=\"lazy\" decoding=\"async\"></div><figcaption>GBN example: frame 2 lost; frames 3–6 discarded; timeout resends 2–6.</figcaption></figure><ol><li>For W=7 with m=3, the sequence space is 0…7. Initially the sender can transmit 0…6. It stores every unacknowledged frame; a timer tracks the oldest one.</li><li>Normal: after receiving 0 and 1, cumulative ACK 2 advances the sender base to 2. The sender can fill newly opened window slots.</li><li>Lost data: if frame 2 is lost, frames 3…6 arrive out of order and are discarded. Repeated ACK 2 says frame 2 is still expected. On timeout the sender retransmits all outstanding frames starting at 2, here 2…6.</li><li>Lost ACK: if ACK 2 is lost but ACK 3 arrives, the later cumulative ACK confirms frames 0…2 and avoids unnecessary retransmission. If no later useful ACK arrives before timeout, the sender retransmits from its oldest outstanding frame; the receiver rejects duplicates and sends its current ACK.</li><li>After sequence 7, numbers wrap to 0. The bound W ≤ 7 leaves one sequence value outside the sender’s current window, preventing the all-ACKs-lost ambiguity of a full eight-frame window in the textbook model.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>With W=7, loss of frame 2 can waste successful receptions of 3…6. GBN trades simple receiver buffering for extra retransmission after loss.</p></aside><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-gbn-normal.144a24ea80.svg\" width=\"820\" height=\"522\" alt=\"GBN W=7: normal window movement\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Normal transmission: both windows advance as frames are cumulatively acknowledged.</figcaption></figure><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-gbn-ack.713dc9972e.svg\" width=\"820\" height=\"598\" alt=\"GBN: a later cumulative ACK covers a lost ACK\" loading=\"lazy\" decoding=\"async\"></div><figcaption>A later cumulative ACK can cover an earlier lost ACK.</figcaption></figure></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> GBN receiver one; gap ke baad discard; timeout pe outstanding suffix repeat.</p>"},{"id":"sr","title":"Selective Repeat: window bound and buffering","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For a 3-bit sequence field, find the maximum sender and receiver windows for Selective Repeat ARQ. Explain transmission, ACKs, buffering and the ambiguity of an oversized window. <span class=\"marks\">[10 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Selective Repeat (SR) ARQ</strong> accepts and buffers valid out-of-order frames inside the receiver window, acknowledges them individually and retransmits only missing/timed-out frames. In this answer ACK i means “frame i received”, unlike the next-expected cumulative ACK convention used for GBN.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-sr.5ae2b52b45.svg\" width=\"820\" height=\"674\" alt=\"SR W=4: individual ACKs and buffering\" loading=\"lazy\" decoding=\"async\"></div><figcaption>SR buffers 3 while waiting for 2; only 2 is retransmitted.</figcaption></figure><ol><li>For m=3 there are eight sequence numbers, 0…7. With equal sender and receiver windows, maximum W=2<sup>3−1</sup>=4. Both windows begin at 0 and span 0…3.</li><li>Sender sends 0,1,2,3. Receiver accepts 0 and 1, delivers them and advances its left edge to 2. Frame 2 is lost; frame 3 is stored and ACK 3 is sent.</li><li>Although 3 is acknowledged, the sender’s base cannot jump over missing 2. A timer for 2 expires; only frame 2 is retransmitted.</li><li>When 2 arrives, the receiver can deliver 2 and the buffered 3 in order, moving its window forward. Individual ACKs let the sender release the relevant stored copies.</li><li>Why half the space: with an incorrectly chosen W=5 in an eight-number space, receiving old 0…4 moves the receive window to {5,6,7,0,1}. If ACKs are lost, retransmitted old 0 or 1 could fall in the new window and be mistaken for new data. W=4 prevents these two consecutive windows from overlapping.</li><li>A repeated old frame can be acknowledged again without delivering it twice. SR needs more receiver storage and per-frame tracking than GBN.</li></ol><div class=\"math-display\"><img src=\"math/454034d348f17623.svg\" alt=\"W_s=W_r\\le 2^{m-1}\" style=\"width:16.921ex;height:2.357ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>A noisy long-delay link benefits from retransmitting only the missing frame, but the receiver must retain later frames and track which sequence numbers belong to its current window.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> SR selective resend; half sequence space keeps old and new separate.</p>"},{"id":"comparison","title":"Compare all three ARQ protocols","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Compare Stop-and-Wait, Go-Back-N and Selective Repeat ARQ. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Property</th><th scope=\"col\">Stop-and-Wait</th><th scope=\"col\">Go-Back-N</th><th scope=\"col\">Selective Repeat</th></tr></thead><tbody><tr><td>Outstanding sender frames</td><td>1</td><td>Up to 2^m−1</td><td>Up to 2^(m−1), equal windows</td></tr><tr><td>Receiver window</td><td>1</td><td>1</td><td>Same maximum as sender in standard equal-window SR</td></tr><tr><td>ACK convention used here</td><td>Next expected</td><td>Cumulative, next expected</td><td>Individual frame accepted</td></tr><tr><td>Out-of-order data</td><td>Not delivered</td><td>Discarded</td><td>Buffered within valid window</td></tr><tr><td>After timeout</td><td>Repeat the one frame</td><td>Repeat outstanding frames from base</td><td>Repeat only timed-out frame</td></tr><tr><td>Buffer/tracking cost</td><td>Low</td><td>Sender window; simple receiver</td><td>Sender and receiver windows; per-frame tracking</td></tr><tr><td>Tradeoff</td><td>Simple but idle during RTT</td><td>Good pipelining, waste after loss</td><td>Efficient loss recovery, greater complexity</td></tr></tbody></table><p>Every comparison assumes finite sequence numbers, correct duplicate handling and the textbook protocol models. The same text “ACK 3” can mean different things under different ACK conventions; state its meaning before explaining a trace.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>If one frame out of a seven-frame burst is lost, GBN may retransmit several frames, whereas SR can retain later frames and resend the missing one.</p></aside></div></section>"},{"id":"windows-1","title":"ARQ sequence/window arithmetic · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A link uses 3-bit frame sequence numbers. Find the sequence-space size, maximum textbook GBN sender/receiver windows and equal SR windows. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>m=3; standard GBN and equal sender/receiver SR windows.</p><h2>To find</h2><p>Sequence count and allowed windows.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/c9f05985613df1dc.svg\" alt=\"N=2^m,\\quad W_{GBN}\\le 2^m-1,\\quad W_{SR}\\le 2^{m-1}\" style=\"width:42.495ex;height:2.439ex\" loading=\"lazy\" decoding=\"async\"></div><p>GBN needs one unused sequence value; SR keeps old and new receive windows disjoint.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count sequence numbers</h4><p>2<sup>3</sup>=8, numbered 0…7.</p></div><div class=\"step\"><h4>Step 2. Apply GBN rule</h4><p>Sender maximum=8−1=7; receiver window=1.</p></div><div class=\"step\"><h4>Step 3. Apply SR rule</h4><p>Equal sender and receiver maxima=8/2=4.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 8 sequence numbers; GBN sender 7, receiver 1; SR sender/receiver 4 each.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The largest sequence number is one less than the sequence-space size. Do not confuse these quantities.</p></aside></div></section>"},{"id":"windows-2","title":"ARQ sequence/window arithmetic · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A link uses 4-bit frame sequence numbers. Find the sequence-space size, maximum textbook GBN sender/receiver windows and equal SR windows. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>m=4; standard GBN and equal sender/receiver SR windows.</p><h2>To find</h2><p>Sequence count and allowed windows.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/c9f05985613df1dc.svg\" alt=\"N=2^m,\\quad W_{GBN}\\le 2^m-1,\\quad W_{SR}\\le 2^{m-1}\" style=\"width:42.495ex;height:2.439ex\" loading=\"lazy\" decoding=\"async\"></div><p>GBN needs one unused sequence value; SR keeps old and new receive windows disjoint.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count sequence numbers</h4><p>2<sup>4</sup>=16, numbered 0…15.</p></div><div class=\"step\"><h4>Step 2. Apply GBN rule</h4><p>Sender maximum=16−1=15; receiver window=1.</p></div><div class=\"step\"><h4>Step 3. Apply SR rule</h4><p>Equal sender and receiver maxima=16/2=8.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 16 sequence numbers; GBN sender 15, receiver 1; SR sender/receiver 8 each.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The largest sequence number is one less than the sequence-space size. Do not confuse these quantities.</p></aside></div></section>"},{"id":"windows-3","title":"ARQ sequence/window arithmetic · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A link uses 5-bit frame sequence numbers. Find the sequence-space size, maximum textbook GBN sender/receiver windows and equal SR windows. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>m=5; standard GBN and equal sender/receiver SR windows.</p><h2>To find</h2><p>Sequence count and allowed windows.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/c9f05985613df1dc.svg\" alt=\"N=2^m,\\quad W_{GBN}\\le 2^m-1,\\quad W_{SR}\\le 2^{m-1}\" style=\"width:42.495ex;height:2.439ex\" loading=\"lazy\" decoding=\"async\"></div><p>GBN needs one unused sequence value; SR keeps old and new receive windows disjoint.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count sequence numbers</h4><p>2<sup>5</sup>=32, numbered 0…31.</p></div><div class=\"step\"><h4>Step 2. Apply GBN rule</h4><p>Sender maximum=32−1=31; receiver window=1.</p></div><div class=\"step\"><h4>Step 3. Apply SR rule</h4><p>Equal sender and receiver maxima=32/2=16.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 32 sequence numbers; GBN sender 31, receiver 1; SR sender/receiver 16 each.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The largest sequence number is one less than the sequence-space size. Do not confuse these quantities.</p></aside></div></section>"}]},{"id":"aloha","title":"ALOHA: access, collisions and throughput","scope":"TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023","sections":[{"id":"pure","title":"Pure ALOHA: transmit first, retry if necessary","html":"<p><strong>Definition.</strong> Pure ALOHA is a random-access protocol in which a station transmits whenever a frame is ready and retransmits after a random delay if the transmission is unsuccessful.</p><p><strong>Simple meaning.</strong> Frame ready → bhej do. Collision hua → random wait karke retry.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/pure-aloha.8aa7732ee2.svg\" width=\"820\" height=\"345\" alt=\"Pure ALOHA: arbitrary start times can overlap\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Pure ALOHA: transmit first, retry if necessary</figcaption></figure><h2>Understand it step by step</h2><ol><li>Several stations share the same channel. Pure ALOHA does not first check whether the channel is idle.</li><li>A station transmits immediately. In the basic collision-channel model, any overlapping frame makes the involved frames unsuccessful.</li><li>An acknowledgement indicates successful reception. If it is not received before timeout, the station treats the attempt as unsuccessful. An absent ACK alone cannot distinguish a collision from another loss.</li><li>The station waits a random backoff time and retries. If every station used the same fixed delay, they could collide again together.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Two remote sensors may both transmit a reading immediately after it becomes ready. A random retry delay reduces the chance that their next attempts overlap again.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain Pure ALOHA and state its main limitation. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>In Pure ALOHA, a station transmits a ready frame without carrier sensing. If a successful acknowledgement is not received, it waits for a random interval and retransmits. Overlapping transmissions cause collisions in the basic model. Its maximum normalized throughput is 1/(2e) ≈ 18.4%, so it is inefficient at high offered load.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Two remote sensors may both transmit a reading immediately after it becomes ready. A random retry delay reduces the chance that their next attempts overlap again.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Pure = kisi bhi time start; retry ka wait random.</p>"},{"id":"vulnerable","title":"Why Pure ALOHA has a 2T vulnerable period","html":"<p><strong>Definition.</strong> The vulnerable period is the interval of start times of other frames that would cause a collision with a chosen frame.</p><p><strong>Simple meaning.</strong> Apne frame se ek frame-time pehle start hua frame bhi takra sakta hai, aur baad mein bhi.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/vulnerable.e2a01a5ab7.svg\" width=\"820\" height=\"360\" alt=\"Pure ALOHA: interfering starts from −T to +T\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Why Pure ALOHA has a 2T vulnerable period</figcaption></figure><h2>Understand it step by step</h2><ol><li>Let your frame start at time 0 and finish at T. All frames have the same transmission duration T.</li><li>Another frame starting between −T and 0 is still being transmitted when your frame begins.</li><li>Another frame starting between 0 and T begins before your frame ends.</li><li>Therefore interfering start times occupy an interval of length 2T. Exact boundary contact is treated as non-overlap in this idealized timing model.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>If a frame takes 2 ms, another frame starting 1 ms before yours overlaps its beginning; a frame starting 1 ms after yours overlaps its end. The vulnerable interval is 4 ms long.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Why is the vulnerable time of Pure ALOHA twice the frame transmission time? <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A frame lasting T can collide with an equal-length frame that began less than T earlier, or one that begins less than T later. The two intervals together have length T+T=2T.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>If a frame takes 2 ms, another frame starting 1 ms before yours overlaps its beginning; a frame starting 1 ms after yours overlaps its end. The vulnerable interval is 4 ms long.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Pure: before T + after T = 2T.</p>"},{"id":"slotted","title":"Slotted ALOHA: starts only at slot boundaries","html":"<p><strong>Definition.</strong> Slotted ALOHA is a random-access protocol that divides time into slots of one frame duration and permits transmissions only at the beginning of a slot.</p><p><strong>Simple meaning.</strong> Frame ready hai tab bhi next slot ki start-line ka wait karo.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/slotted-aloha.fbfbef9647.svg\" width=\"820\" height=\"390\" alt=\"Slotted ALOHA: one frame duration per slot\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Slotted ALOHA: starts only at slot boundaries</figcaption></figure><h2>Understand it step by step</h2><ol><li>All stations agree on slot boundaries; time synchronization is required.</li><li>A station with a frame waits for a slot boundary before starting. A slot can be idle, successful or a collision.</li><li>Exactly one station transmitting in a slot produces success in the ideal model. Two or more simultaneous attempts collide.</li><li>Frames cannot partially overlap adjacent slots under the assumptions. The vulnerable interval is T instead of 2T. Randomized retries are still needed.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>If the slot duration is 1 ms and a frame becomes ready at 2.4 ms, the next permitted start is 3 ms. Another station choosing the same slot can still collide.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Compare Pure ALOHA and Slotted ALOHA. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">Pure</th><th scope=\"col\">Slotted</th></tr></thead><tbody><tr><td>Start time</td><td>Any time</td><td>Slot boundary only</td></tr><tr><td>Synchronization</td><td>No common slots required</td><td>Required</td></tr><tr><td>Vulnerable period</td><td>2T</td><td>T</td></tr><tr><td>Maximum S</td><td>1/(2e) ≈ 0.184</td><td>1/e ≈ 0.368</td></tr><tr><td>G at maximum</td><td>0.5</td><td>1</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>If the slot duration is 1 ms and a frame becomes ready at 2.4 ms, the next permitted start is 3 ms. Another station choosing the same slot can still collide.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Slotted = aligned starts; collision risk half-window, not zero.</p>"},{"id":"formulas","title":"G, S and throughput: which number are you finding?","html":"<p><strong>Definition.</strong> Offered load G is the average number of transmission attempts per frame time. Normalized throughput S is the average number of successful frames per frame time.</p><p><strong>Simple meaning.</strong> G = kitne attempts; S = unmein successful output per frame-time. Dono same nahi.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/aloha-curve.58889b65f2.svg\" width=\"820\" height=\"430\" alt=\"ALOHA: too many attempts eventually reduce successful output\" loading=\"lazy\" decoding=\"async\"></div><figcaption>G, S and throughput: which number are you finding?</figcaption></figure><h2>Understand it step by step</h2><ol><li>Let L be frame length in bits, R the channel rate in bits/s, and λ the total attempt rate of all stations in frames/s. Then T=L/R seconds and G=λT.</li><li>For the standard model, attempts are modelled as Poisson, frames have equal duration, there is no capture, and overlapping transmissions fail. G includes retransmissions when they are part of the offered traffic.</li><li>Pure ALOHA uses S=Ge⁻²ᴳ; Slotted ALOHA uses S=Ge⁻ᴳ. Do not use arrival rate in frames/s directly in the exponent.</li><li>Successful frames/s is S/T. Successful frame bits/s is (S/T)L = SR. If L includes overhead, this is successful frame throughput, not application payload goodput.</li><li>For G>0, the success probability per attempt is S/G. S itself is not generally that probability. Under this fixed-frame ideal model, 100S is the normalized throughput as a percentage of raw bit rate.</li></ol><div class=\"math-display\"><img src=\"math/85fb8d2da8040e20.svg\" alt=\"T=L/R,\\qquad G=\\lambda T\" style=\"width:22.237ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/28ca9624d26f78f7.svg\" alt=\"S_{\\mathrm{pure}}=G e^{-2G}\" style=\"width:14.03ex;height:2.712ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/6d136a965636bb20.svg\" alt=\"S_{\\mathrm{slotted}}=G e^{-G}\" style=\"width:14.834ex;height:2.419ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/751670fd3de42086.svg\" alt=\"\\text{successful frames/s}=S/T\" style=\"width:25.804ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/58e5c110cc978ab9.svg\" alt=\"\\text{successful frame bits/s}=SR\" style=\"width:28.13ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>If G=0.5 and S≈0.18394, about 0.18394 successful frames occur per frame time. The success fraction per attempt is 0.18394/0.5≈0.36788, not 0.18394.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Write the throughput expressions of Pure and Slotted ALOHA, defining G and S. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>G denotes aggregate attempts per frame transmission time and S denotes successful frames per frame transmission time. Pure ALOHA: S=Ge⁻²ᴳ, with maximum 1/(2e) at G=0.5. Slotted ALOHA: S=Ge⁻ᴳ, with maximum 1/e at G=1. These results use the equal-length Poisson collision model.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>If G=0.5 and S≈0.18394, about 0.18394 successful frames occur per frame time. The success fraction per attempt is 0.18394/0.5≈0.36788, not 0.18394.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> P mein pair: −2G; S mein single: −G.</p>\r\n<h2>Important conversion in the faculty examples</h2><p>For 200-bit frames on a 200000-bit/s channel, T = 200/200000 = 0.001 s. If 500 frames/s attempt transmission, G = 0.5 and pure-ALOHA S = 0.5e⁻¹ ≈ 0.1839397. Convert to frames/s by dividing by T: 0.1839397/0.001 ≈ <strong>183.94 frames/s</strong>.</p><p>Do not multiply S by 500: S is successful frames per frame-time, not success probability per attempt. Some slide totals use that incorrect conversion. At 250 attempts/s the correct pure-ALOHA output is <strong>151.63 frames/s</strong>. Use the definitions and units above.</p>"},{"id":"pure-1","title":"Pure ALOHA · load example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. In a Pure ALOHA system, the offered load is G=0.25. Find normalized throughput, percentage throughput, and the theoretical maximum. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Protocol = Pure ALOHA; G = 0.25 attempts/frame time.</p><h2>To find</h2><p>S, 100S and the maximum possible S.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><p>Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate the exponent</h4><p>−2 × 0.25 = -0.5.</p></div><div class=\"step\"><h4>Step 2. Evaluate the exponential</h4><div class=\"math-display\"><img src=\"math/871b71246f6a730f.svg\" alt=\"e^{-0.5} \\approx 0.606530660\" style=\"width:19.49ex;height:2.05ex\" loading=\"lazy\" decoding=\"async\"></div></div><div class=\"step\"><h4>Step 3. Multiply by G</h4><p>S = 0.25 × 0.606530660 ≈ 0.151632665 successful frames/frame time.</p></div><div class=\"step\"><h4>Step 4. Convert to percentage</h4><p>0.151632665 × 100 ≈ 15.1633%.</p></div><div class=\"step\"><h4>Step 5. State the maximum separately</h4><p>The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> S ≈ 0.151633; percentage ≈ 15.1633%; Smax ≈ 0.183940 at G=0.5.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.</p></aside></div></section>"},{"id":"pure-2","title":"Pure ALOHA · load example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. In a Pure ALOHA system, the offered load is G=0.5. Find normalized throughput, percentage throughput, and the theoretical maximum. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Protocol = Pure ALOHA; G = 0.5 attempts/frame time.</p><h2>To find</h2><p>S, 100S and the maximum possible S.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><p>Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate the exponent</h4><p>−2 × 0.5 = -1.</p></div><div class=\"step\"><h4>Step 2. Evaluate the exponential</h4><div class=\"math-display\"><img src=\"math/f3e24ac70fcf4336.svg\" alt=\"e^{-1} \\approx 0.367879441\" style=\"width:18.245ex;height:2.05ex\" loading=\"lazy\" decoding=\"async\"></div></div><div class=\"step\"><h4>Step 3. Multiply by G</h4><p>S = 0.5 × 0.367879441 ≈ 0.183939721 successful frames/frame time.</p></div><div class=\"step\"><h4>Step 4. Convert to percentage</h4><p>0.183939721 × 100 ≈ 18.3940%.</p></div><div class=\"step\"><h4>Step 5. State the maximum separately</h4><p>The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> S ≈ 0.183940; percentage ≈ 18.3940%; Smax ≈ 0.183940 at G=0.5.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.</p></aside></div></section>"},{"id":"pure-3","title":"Pure ALOHA · load example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. In a Pure ALOHA system, the offered load is G=1. Find normalized throughput, percentage throughput, and the theoretical maximum. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Protocol = Pure ALOHA; G = 1 attempts/frame time.</p><h2>To find</h2><p>S, 100S and the maximum possible S.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><p>Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate the exponent</h4><p>−2 × 1 = -2.</p></div><div class=\"step\"><h4>Step 2. Evaluate the exponential</h4><div class=\"math-display\"><img src=\"math/6d4c1915157a6bc5.svg\" alt=\"e^{-2} \\approx 0.135335283\" style=\"width:18.245ex;height:2.05ex\" loading=\"lazy\" decoding=\"async\"></div></div><div class=\"step\"><h4>Step 3. Multiply by G</h4><p>S = 1 × 0.135335283 ≈ 0.135335283 successful frames/frame time.</p></div><div class=\"step\"><h4>Step 4. Convert to percentage</h4><p>0.135335283 × 100 ≈ 13.5335%.</p></div><div class=\"step\"><h4>Step 5. State the maximum separately</h4><p>The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> S ≈ 0.135335; percentage ≈ 13.5335%; Smax ≈ 0.183940 at G=0.5.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.</p></aside></div></section>"},{"id":"slotted-1","title":"Slotted ALOHA · load example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. In a Slotted ALOHA system, the offered load is G=0.25. Find normalized throughput, percentage throughput, and the theoretical maximum. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Protocol = Slotted ALOHA; G = 0.25 attempts/frame time.</p><h2>To find</h2><p>S, 100S and the maximum possible S.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/01e46e63e1b256b9.svg\" alt=\"S=G e^{-G}\" style=\"width:9.999ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><p>Select the formula from the protocol name. The exponent is −G because Slotted ALOHA has a T vulnerable period.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate the exponent</h4><p>−1 × 0.25 = -0.25.</p></div><div class=\"step\"><h4>Step 2. Evaluate the exponential</h4><div class=\"math-display\"><img src=\"math/8ed0d2b7d5ee0b1f.svg\" alt=\"e^{-0.25} \\approx 0.778800783\" style=\"width:20.289ex;height:2.05ex\" loading=\"lazy\" decoding=\"async\"></div></div><div class=\"step\"><h4>Step 3. Multiply by G</h4><p>S = 0.25 × 0.778800783 ≈ 0.194700196 successful frames/frame time.</p></div><div class=\"step\"><h4>Step 4. Convert to percentage</h4><p>0.194700196 × 100 ≈ 19.4700%.</p></div><div class=\"step\"><h4>Step 5. State the maximum separately</h4><p>The maximum is 1/(1e) ≈ 0.367879 = 36.7879%, at G=1.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> S ≈ 0.194700; percentage ≈ 19.4700%; Smax ≈ 0.367879 at G=1.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.</p></aside></div></section>"},{"id":"slotted-2","title":"Slotted ALOHA · load example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. In a Slotted ALOHA system, the offered load is G=1. Find normalized throughput, percentage throughput, and the theoretical maximum. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Protocol = Slotted ALOHA; G = 1 attempts/frame time.</p><h2>To find</h2><p>S, 100S and the maximum possible S.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/01e46e63e1b256b9.svg\" alt=\"S=G e^{-G}\" style=\"width:9.999ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><p>Select the formula from the protocol name. The exponent is −G because Slotted ALOHA has a T vulnerable period.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate the exponent</h4><p>−1 × 1 = -1.</p></div><div class=\"step\"><h4>Step 2. Evaluate the exponential</h4><div class=\"math-display\"><img src=\"math/f3e24ac70fcf4336.svg\" alt=\"e^{-1} \\approx 0.367879441\" style=\"width:18.245ex;height:2.05ex\" loading=\"lazy\" decoding=\"async\"></div></div><div class=\"step\"><h4>Step 3. Multiply by G</h4><p>S = 1 × 0.367879441 ≈ 0.367879441 successful frames/frame time.</p></div><div class=\"step\"><h4>Step 4. Convert to percentage</h4><p>0.367879441 × 100 ≈ 36.7879%.</p></div><div class=\"step\"><h4>Step 5. State the maximum separately</h4><p>The maximum is 1/(1e) ≈ 0.367879 = 36.7879%, at G=1.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> S ≈ 0.367879; percentage ≈ 36.7879%; Smax ≈ 0.367879 at G=1.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.</p></aside></div></section>"},{"id":"slotted-3","title":"Slotted ALOHA · load example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. In a Slotted ALOHA system, the offered load is G=2. Find normalized throughput, percentage throughput, and the theoretical maximum. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Protocol = Slotted ALOHA; G = 2 attempts/frame time.</p><h2>To find</h2><p>S, 100S and the maximum possible S.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/01e46e63e1b256b9.svg\" alt=\"S=G e^{-G}\" style=\"width:9.999ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><p>Select the formula from the protocol name. The exponent is −G because Slotted ALOHA has a T vulnerable period.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate the exponent</h4><p>−1 × 2 = -2.</p></div><div class=\"step\"><h4>Step 2. Evaluate the exponential</h4><div class=\"math-display\"><img src=\"math/6d4c1915157a6bc5.svg\" alt=\"e^{-2} \\approx 0.135335283\" style=\"width:18.245ex;height:2.05ex\" loading=\"lazy\" decoding=\"async\"></div></div><div class=\"step\"><h4>Step 3. Multiply by G</h4><p>S = 2 × 0.135335283 ≈ 0.270670566 successful frames/frame time.</p></div><div class=\"step\"><h4>Step 4. Convert to percentage</h4><p>0.270670566 × 100 ≈ 27.0671%.</p></div><div class=\"step\"><h4>Step 5. State the maximum separately</h4><p>The maximum is 1/(1e) ≈ 0.367879 = 36.7879%, at G=1.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> S ≈ 0.270671; percentage ≈ 27.0671%; Smax ≈ 0.367879 at G=1.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.</p></aside></div></section>"},{"id":"rate-1","title":"Frames/s to throughput · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A Pure ALOHA channel carries 200-bit frames at 200 kbps. The aggregate attempt rate is 1000 frames/s. Find frame time, offered load, normalized throughput, successful frames/s and successful frame bit rate. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>200 bits</td></tr><tr><td>R</td><td>200 kbps = 200,000 bits/s</td></tr><tr><td>λ</td><td>1000 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 200/200,000 = 0.001 s = 1 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 1000 × 0.001 = 1 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−2G = -2; e to that power ≈ 0.135335283.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 1 × 0.135335283 ≈ 0.135335283.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.135335283/0.001 ≈ 135.335283 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.135335283 × 200,000 ≈ 27067.056647 bits/s ≈ 27.067057 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=1, S≈0.135335, successful rate≈135.335 frames/s = 27.067 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 1000 attempts/s; collisions reduce the delivered frame rate to about 135.335/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside></div></section>"},{"id":"rate-2","title":"Frames/s to throughput · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A Pure ALOHA channel carries 200-bit frames at 200 kbps. The aggregate attempt rate is 500 frames/s. Find frame time, offered load, normalized throughput, successful frames/s and successful frame bit rate. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>200 bits</td></tr><tr><td>R</td><td>200 kbps = 200,000 bits/s</td></tr><tr><td>λ</td><td>500 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 200/200,000 = 0.001 s = 1 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 500 × 0.001 = 0.5 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−2G = -1; e to that power ≈ 0.367879441.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 0.5 × 0.367879441 ≈ 0.183939721.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.183939721/0.001 ≈ 183.939721 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.183939721 × 200,000 ≈ 36787.944117 bits/s ≈ 36.787944 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=0.5, S≈0.183940, successful rate≈183.940 frames/s = 36.788 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 500 attempts/s; collisions reduce the delivered frame rate to about 183.940/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside></div></section>"},{"id":"rate-3","title":"Frames/s to throughput · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A Pure ALOHA channel carries 200-bit frames at 200 kbps. The aggregate attempt rate is 250 frames/s. Find frame time, offered load, normalized throughput, successful frames/s and successful frame bit rate. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>200 bits</td></tr><tr><td>R</td><td>200 kbps = 200,000 bits/s</td></tr><tr><td>λ</td><td>250 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 200/200,000 = 0.001 s = 1 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 250 × 0.001 = 0.25 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−2G = -0.5; e to that power ≈ 0.606530660.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 0.25 × 0.606530660 ≈ 0.151632665.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.151632665/0.001 ≈ 151.632665 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.151632665 × 200,000 ≈ 30326.532986 bits/s ≈ 30.326533 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=0.25, S≈0.151633, successful rate≈151.633 frames/s = 30.327 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 250 attempts/s; collisions reduce the delivered frame rate to about 151.633/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside></div></section>"},{"id":"rate-4","title":"Frames/s to throughput · example 4","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A Slotted ALOHA channel carries 400-bit frames at 200 kbps. The aggregate attempt rate is 500 frames/s. Find frame time, offered load, normalized throughput, successful frames/s and successful frame bit rate. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>400 bits</td></tr><tr><td>R</td><td>200 kbps = 200,000 bits/s</td></tr><tr><td>λ</td><td>500 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/01e46e63e1b256b9.svg\" alt=\"S=G e^{-G}\" style=\"width:9.999ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 400/200,000 = 0.002 s = 2 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 500 × 0.002 = 1 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−1G = -1; e to that power ≈ 0.367879441.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 1 × 0.367879441 ≈ 0.367879441.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.367879441/0.002 ≈ 183.939721 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.367879441 × 200,000 ≈ 73575.888234 bits/s ≈ 73.575888 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=1, S≈0.367879, successful rate≈183.940 frames/s = 73.576 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 500 attempts/s; collisions reduce the delivered frame rate to about 183.940/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside></div></section>"},{"id":"rate-5","title":"Frames/s to throughput · example 5","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. A Slotted ALOHA channel carries 1600-bit frames at 800 kbps. The aggregate attempt rate is 250 frames/s. Find frame time, offered load, normalized throughput, successful frames/s and successful frame bit rate. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>1600 bits</td></tr><tr><td>R</td><td>800 kbps = 800,000 bits/s</td></tr><tr><td>λ</td><td>250 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/01e46e63e1b256b9.svg\" alt=\"S=G e^{-G}\" style=\"width:9.999ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 1600/800,000 = 0.002 s = 2 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 250 × 0.002 = 0.5 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−1G = -0.5; e to that power ≈ 0.606530660.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 0.5 × 0.606530660 ≈ 0.303265330.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.303265330/0.002 ≈ 151.632665 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.303265330 × 800,000 ≈ 242612.263885 bits/s ≈ 242.612264 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=0.5, S≈0.303265, successful rate≈151.633 frames/s = 242.612 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 250 attempts/s; collisions reduce the delivered frame rate to about 151.633/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside></div></section>"},{"id":"maxima","title":"Why the two maximum throughputs differ","html":"<p>A small offered load leaves many opportunities unused. A very large load creates many collisions. The best point balances those effects.</p><h2>Pure ALOHA</h2><div class=\"math-display\"><img src=\"math/0e9a0d697e50f118.svg\" alt=\"\\frac{dS}{dG}=e^{-2G}(1-2G)\" style=\"width:20.078ex;height:4.726ex\" loading=\"lazy\" decoding=\"async\"></div><ol><li>The exponential is positive. For the slope to be zero, 1−2G must be zero.</li><li>1−2G=0 gives G=0.5.</li><li>Substitute: S=0.5e⁻¹=1/(2e)≈0.18394. The slope is positive before G=0.5 and negative after it.</li></ol><h2>Slotted ALOHA</h2><div class=\"math-display\"><img src=\"math/e448a50c7be7dbba.svg\" alt=\"\\frac{dS}{dG}=e^{-G}(1-G)\" style=\"width:18.147ex;height:4.726ex\" loading=\"lazy\" decoding=\"async\"></div><ol><li>Set 1−G=0, giving G=1.</li><li>Substitute: S=e⁻¹=1/e≈0.367879.</li><li>The slope changes from positive to negative, so this is the maximum.</li></ol><p class=\"memory\"><strong>Yaad rakho:</strong> Pure optimum: G half, maximum half of 1/e. Slotted optimum: G one, maximum 1/e.</p>"}]},{"id":"csma","title":"CSMA, collision detection and avoidance","scope":"TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023","sections":[{"id":"sense","title":"Carrier sensing: why listening does not remove every collision","html":"<p><strong>Definition.</strong> Carrier Sense Multiple Access (CSMA) requires a station to sense the shared medium before transmitting.</p><p><strong>Simple meaning.</strong> Pehle suno, phir bhejo; lekin door ka signal pahunchne mein time leta hai.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/csma-propagation.df55cdec46.svg\" width=\"820\" height=\"425\" alt=\"An idle observation is only local\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Carrier sensing: why listening does not remove every collision</figcaption></figure><h2>Understand it step by step</h2><ol><li>If the channel is busy, the station follows its waiting/persistence rule. If idle, it may transmit according to that rule.</li><li>The channel state is observed locally. A distant station may have started, but its signal has not arrived yet because propagation takes time.</li><li>Two stations can therefore both observe an idle medium and begin transmitting. CSMA reduces avoidable collisions but does not guarantee zero collisions.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A starts at time 0. B is far away and starts a moment later, before A’s signal reaches it. B heard silence, but the two transmissions can still collide.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Why can collisions occur in CSMA even after a station senses an idle channel? <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Carrier sensing observes the local medium. Because signals have nonzero propagation delay, another station’s new transmission may not yet be detectable. Both stations can then start and their transmissions overlap.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A starts at time 0. B is far away and starts a moment later, before A’s signal reaches it. B heard silence, but the two transmissions can still collide.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Idle yahan hai; remote signal abhi raste mein ho sakta hai.</p>"},{"id":"persistence","title":"1-persistent, non-persistent and p-persistent CSMA","html":"<p><strong>Definition.</strong> Persistence specifies how a station behaves after observing that the medium is busy or becomes idle.</p><p><strong>Simple meaning.</strong> 1 = turant; non = random wait; p = probability ke basis pe start.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/persistence.528dafcd8a.svg\" width=\"820\" height=\"590\" alt=\"CSMA persistence: what happens after carrier sensing?\" loading=\"lazy\" decoding=\"async\"></div><figcaption>1-persistent, non-persistent and p-persistent CSMA</figcaption></figure><h2>Understand it step by step</h2><ol><li>In 1-persistent CSMA, a ready station transmits immediately when idle; when busy it continuously senses. Several waiting stations may all start at the same idle transition.</li><li>In non-persistent CSMA, a busy observation causes a random wait before the next sensing attempt. This reduces simultaneous retries but can waste some idle time.</li><li>In p-persistent CSMA, when an eligible idle slot begins, transmit with probability p. With probability 1−p, defer to a later slot and sense again. The probabilistic decision is repeated, not a one-time discard.</li></ol><table><thead><tr><th scope=\"col\">Rule</th><th scope=\"col\">When idle</th><th scope=\"col\">When busy</th><th scope=\"col\">Trade-off</th></tr></thead><tbody><tr><td>1-persistent</td><td>Transmit immediately</td><td>Keep listening; transmit as soon as idle</td><td>Low idle delay, but waiting stations may start together</td></tr><tr><td>Non-persistent</td><td>Transmit</td><td>Wait a random time, then sense again</td><td>Less synchronized contention; may leave avoidable idle time</td></tr><tr><td>p-persistent (slotted)</td><td>Transmit with probability p; defer a slot with probability 1−p</td><td>Wait until available, then resume the probabilistic slot rule</td><td>Controls contention; needs slots and a choice of p</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>With p=0.25, the station has a 25% chance of transmitting at that idle-slot decision and a 75% chance of deferring. It does not mean it transmits exactly once every four slots.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Compare the three persistence strategies in CSMA. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Rule</th><th scope=\"col\">When idle</th><th scope=\"col\">When busy</th><th scope=\"col\">Trade-off</th></tr></thead><tbody><tr><td>1-persistent</td><td>Transmit immediately</td><td>Keep listening; transmit as soon as idle</td><td>Low idle delay, but waiting stations may start together</td></tr><tr><td>Non-persistent</td><td>Transmit</td><td>Wait a random time, then sense again</td><td>Less synchronized contention; may leave avoidable idle time</td></tr><tr><td>p-persistent (slotted)</td><td>Transmit with probability p; defer a slot with probability 1−p</td><td>Wait until available, then resume the probabilistic slot rule</td><td>Controls contention; needs slots and a choice of p</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>With p=0.25, the station has a 25% chance of transmitting at that idle-slot decision and a 75% chance of deferring. It does not mean it transmits exactly once every four slots.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> 1 = start now; non = wait then listen; p = chance per idle slot.</p>"},{"id":"cd","title":"CSMA/CD: detect a collision while transmitting","html":"<p><strong>Definition.</strong> CSMA with Collision Detection monitors the medium during transmission, aborts a detected collision and retries after a randomized backoff.</p><p><strong>Simple meaning.</strong> CD = takkar detect hui toh transmission rok do.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/collision-roundtrip.42358ec7bf.svg\" width=\"820\" height=\"410\" alt=\"CSMA/CD: sender must still be sending after a round trip\" loading=\"lazy\" decoding=\"async\"></div><figcaption>CSMA/CD: detect a collision while transmitting</figcaption></figure><h2>Understand it step by step</h2><ol><li>Sense the channel. In traditional shared half-duplex Ethernet, begin transmission when permitted by the access rule.</li><li>Continue monitoring while transmitting. If a collision is detected, send the collision/jam indication and abort the current frame.</li><li>Choose a random delay using binary exponential backoff; then attempt again subject to the access rules.</li><li>The sender must still be transmitting when a worst-case collision indication returns. Hence the ideal timing requirement is Tframe ≥ 2Tp.</li><li>Modern switched full-duplex Ethernet links do not use collision-based CSMA/CD access. Keep the historical/shared-medium assumptions explicit.</li></ol><div class=\"math-display\"><img src=\"math/4f522413155daf19.svg\" alt=\"T_{\\mathrm{frame}}\\geq 2T_p\" style=\"width:11.931ex;height:2.181ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/eae5a57f0575ef7d.svg\" alt=\"L_{\\min}\\geq 2RT_p\" style=\"width:12.575ex;height:2.195ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>On a shared half-duplex Ethernet segment, a station that detects a collision stops sending the remaining frame bits, saving time compared with completing a corrupted long frame.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain CSMA/CD and the reason for a minimum frame size. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>CSMA/CD senses before transmission and detects collisions during transmission. A collision causes abort/jam and a random backoff before retry. To detect the most distant collision before the frame finishes, the transmission duration must be at least the worst-case round-trip propagation delay. Thus Lmin/R ≥ 2Tp in the idealized model.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>On a shared half-duplex Ethernet segment, a station that detects a collision stops sending the remaining frame bits, saving time compared with completing a corrupted long frame.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Detect karna hai toh sender tab tak bhej raha hona chahiye.</p>"},{"id":"backoff","title":"Binary exponential backoff","html":"<p><strong>Definition.</strong> Binary exponential backoff enlarges the range of possible random waiting slots after repeated collisions, reducing the chance of the same stations colliding again.</p><p><strong>Simple meaning.</strong> Collision zyada → random wait ka range bada.</p><h2>Understand it step by step</h2><ol><li>Let n be the collision count for the current frame. In classic Ethernet, use k=min(n,10).</li><li>Choose an integer K uniformly from 0 through 2ᵏ−1. Both endpoints belong to the range.</li><li>Wait K slot times before the permitted retry. A larger range does not force every station to wait longer; K may still be zero.</li><li>For classic 10/100 Mbps half-duplex Ethernet, one slot is 512 bit times. Use the slot duration provided in the question if one is given.</li></ol><div class=\"math-display\"><img src=\"math/0f0e79cc7f4deaac.svg\" alt=\"k=\\min(n,10),\\qquad K\\in\\{0,1,\\ldots,2^k-1\\}\" style=\"width:41.283ex;height:2.61ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/b5a8dc2b6f87ba95.svg\" alt=\"T_{\\mathrm{backoff}}=K T_{\\mathrm{slot}}\" style=\"width:15.673ex;height:1.902ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>After the third collision, k=3 and K may be 0,1,2,3,4,5,6,7. If K=5 and one slot is 51.2 μs, the delay is 256 μs.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Describe binary exponential backoff and give the possible K values after three collisions. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A station selects a random integer K from an expanding window and waits K slot times before retrying. After n collisions, classic Ethernet uses k=min(n,10) and 0≤K≤2ᵏ−1. After three collisions the possible values are 0 through 7.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>After the third collision, k=3 and K may be 0,1,2,3,4,5,6,7. If K=5 and one slot is 51.2 μs, the delay is 256 μs.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> 2ᵏ choices hain, isliye last value 2ᵏ−1.</p>"},{"id":"ca","title":"CSMA/CA: reduce collision risk before sending","html":"<p><strong>Definition.</strong> CSMA with Collision Avoidance uses carrier sensing and randomized access delays, with acknowledgements and optional reservation exchanges, to reduce collisions on a wireless shared medium.</p><p><strong>Simple meaning.</strong> CA = pehle collision avoid karne ki koshish; guarantee nahi.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ca-sequence.566280e50f.svg\" width=\"820\" height=\"490\" alt=\"CSMA/CA: optional reservation, data, acknowledgement\" loading=\"lazy\" decoding=\"async\"></div><figcaption>CSMA/CA: reduce collision risk before sending</figcaption></figure><h2>Understand it step by step</h2><ol><li>A wireless station senses the medium and follows the required interframe waiting and contention rules.</li><li>A random backoff counter counts down in eligible idle slots and freezes while the medium is busy. It resumes when permitted; it is not continuously counted through someone else’s transmission.</li><li>When its counter reaches zero, it transmits. A unicast receiver normally sends an ACK after successful reception. Missing ACK triggers retry logic.</li><li>RTS/CTS is an optional reservation exchange. Stations hearing reservation information defer for the indicated duration. It can reduce hidden-terminal data collisions but adds overhead.</li><li>Wireless stations cannot generally rely on Ethernet-style collision detection while transmitting. Collision avoidance does not eliminate all losses or collisions.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Two laptops using one Wi-Fi channel contend for access. Random backoff reduces simultaneous starts; an ACK lets the sender know a unicast frame was received.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain CSMA/CA and distinguish it from CSMA/CD. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Aspect</th><th scope=\"col\">CSMA/CD</th><th scope=\"col\">CSMA/CA</th></tr></thead><tbody><tr><td>Main action</td><td>Detect and abort a collision during sending</td><td>Reduce collision risk before sending</td></tr><tr><td>Typical teaching context</td><td>Shared half-duplex wired Ethernet</td><td>Wi-Fi contention access</td></tr><tr><td>Mechanisms</td><td>Carrier sensing, detection/jam, backoff</td><td>Carrier sensing, random backoff, ACK; optional RTS/CTS</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>Two laptops using one Wi-Fi channel contend for access. Random backoff reduces simultaneous starts; an ACK lets the sender know a unicast frame was received.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> CD = detect during; CA = avoid before.</p>"},{"id":"hidden","title":"Hidden terminals and RTS/CTS","html":"<p><strong>Definition.</strong> Hidden terminals are stations that cannot sense each other but whose transmissions can interfere at a common receiver.</p><p><strong>Simple meaning.</strong> A aur C ek dusre ko nahi sunte, par dono B ko bhej rahe hain.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/hidden-terminal.1ffcf794d5.svg\" width=\"820\" height=\"330\" alt=\"Hidden terminals: A and C cannot sense each other\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Hidden terminals and RTS/CTS</figcaption></figure><h2>Understand it step by step</h2><ol><li>Suppose A and C are outside each other’s sensing range, but B can receive both.</li><li>A senses no signal from C and may transmit; C may make the same decision. Their frames can collide at B.</li><li>With optional RTS/CTS, A first sends a short RTS to B. B replies CTS, which C can hear. C defers for the reservation duration.</li><li>RTS frames can themselves collide and wireless conditions still matter. Describe RTS/CTS as mitigation, not an absolute guarantee.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Access points can hear devices at opposite ends of a room even when those devices cannot hear one another clearly. The access point’s CTS can inform both sides about a reservation.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain the hidden-terminal problem and how RTS/CTS helps. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A and C may both reach B but be unable to sense one another. Simultaneous transmissions can then collide at B. A short RTS followed by B’s CTS announces a reservation; a station hearing the CTS defers, reducing the risk of a long data-frame collision.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Access points can hear devices at opposite ends of a room even when those devices cannot hear one another clearly. The access point’s CTS can inform both sides about a reservation.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Hidden: senders invisible to each other, receiver common.</p>"}]},{"id":"switching","title":"Switching techniques","scope":"TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023","sections":[{"id":"types","title":"Circuit, message and packet switching","html":"<p><strong>Definition.</strong> Switching selects how data passes through intermediate network nodes from a source to a destination.</p><p><strong>Simple meaning.</strong> Raasta reserve karna, poora message ruk-ruk ke bhejna, ya chhote packets bhejna—yeh teen ideas hain.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/switching.2b51f856d9.svg\" width=\"820\" height=\"425\" alt=\"Three switching techniques: what is forwarded?\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Circuit, message and packet switching</figcaption></figure><h2>Understand it step by step</h2><ol><li><strong>Circuit switching:</strong> establish a circuit, reserve resources, transfer data, then release the circuit. Capacity is dedicated even during a silent period.</li><li><strong>Message switching:</strong> each intermediate node receives the entire message before forwarding it. Large messages require large buffers and can delay later messages.</li><li><strong>Packet switching:</strong> divide data into smaller packets. Nodes forward packets individually; different links can carry successive packets at the same time.</li><li>The Internet uses packet switching. A traditional circuit-switched telephone call illustrates the circuit concept. Many current calls use packet-based networks, so do not label every phone call circuit-switched.</li></ol><table><thead><tr><th scope=\"col\">Aspect</th><th scope=\"col\">Circuit switching</th><th scope=\"col\">Message switching</th><th scope=\"col\">Packet switching</th></tr></thead><tbody><tr><td>Unit handled</td><td>Continuous stream on established circuit</td><td>Whole message</td><td>Small packets</td></tr><tr><td>Resource use</td><td>Capacity reserved along a circuit</td><td>Shared; message stored at each intermediate node</td><td>Shared; each packet stored/forwarded in this model</td></tr><tr><td>Setup</td><td>Required before data transfer</td><td>No circuit setup required</td><td>Datagram: no connection setup; virtual circuit: setup</td></tr><tr><td>Delay</td><td>Setup delay, then relatively predictable service</td><td>Large store-and-forward delay for long messages</td><td>Variable delay; packet pipeline can reduce completion time</td></tr><tr><td>Main limitation</td><td>Reserved capacity can be idle</td><td>Large buffers; unsuitable for tight delay needs</td><td>Headers, possible queueing/loss; datagrams may reorder</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A campus transferring web pages and files has bursty traffic. Packet switching allows multiple users to share link capacity instead of reserving a circuit that remains idle between bursts.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Compare circuit, message and packet switching and recommend a method for bursty office data. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Aspect</th><th scope=\"col\">Circuit switching</th><th scope=\"col\">Message switching</th><th scope=\"col\">Packet switching</th></tr></thead><tbody><tr><td>Unit handled</td><td>Continuous stream on established circuit</td><td>Whole message</td><td>Small packets</td></tr><tr><td>Resource use</td><td>Capacity reserved along a circuit</td><td>Shared; message stored at each intermediate node</td><td>Shared; each packet stored/forwarded in this model</td></tr><tr><td>Setup</td><td>Required before data transfer</td><td>No circuit setup required</td><td>Datagram: no connection setup; virtual circuit: setup</td></tr><tr><td>Delay</td><td>Setup delay, then relatively predictable service</td><td>Large store-and-forward delay for long messages</td><td>Variable delay; packet pipeline can reduce completion time</td></tr><tr><td>Main limitation</td><td>Reserved capacity can be idle</td><td>Large buffers; unsuitable for tight delay needs</td><td>Headers, possible queueing/loss; datagrams may reorder</td></tr></tbody></table><p>For ordinary bursty office data, packet switching is generally appropriate because resources are shared among active transfers. The design must still account for queueing, loss and the required service quality.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A campus transferring web pages and files has bursty traffic. Packet switching allows multiple users to share link capacity instead of reserving a circuit that remains idle between bursts.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Circuit reserves; message waits whole; packets pipeline.</p>"},{"id":"datagram","title":"Datagram versus virtual-circuit packet switching","html":"<p><strong>Definition.</strong> Datagram switching routes each packet independently; virtual-circuit switching first establishes a logical path and forwarding state for a flow.</p><p><strong>Simple meaning.</strong> Datagram mein har packet ka decision; virtual circuit mein pehle logical route set.</p><h2>Understand it step by step</h2><ol><li>In a datagram network, each packet carries enough destination information for independent forwarding. Packets may take different routes as forwarding conditions change.</li><li>In a virtual-circuit network, a setup phase establishes a logical path. Packets normally carry a short connection identifier meaningful to that network.</li><li>A virtual circuit is not automatically a physical dedicated circuit. Capacity can still be shared with other virtual circuits.</li><li>Ordering and service guarantees depend on the actual protocol. Do not assume that merely saying “virtual circuit” guarantees loss-free delivery.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>IP illustrates datagram service: a router forwards each received packet using its forwarding table. A textbook virtual-circuit example is an ATM connection.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Differentiate datagram and virtual-circuit packet switching. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">Datagram</th><th scope=\"col\">Virtual circuit</th></tr></thead><tbody><tr><td>Setup</td><td>Usually none at network layer</td><td>Logical connection setup</td></tr><tr><td>Forwarding information</td><td>Destination address</td><td>Virtual-circuit identifier</td></tr><tr><td>Router state</td><td>No per-connection state required for basic IP forwarding</td><td>Connection/path state maintained</td></tr><tr><td>Path</td><td>May vary</td><td>Established logical path until changed</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>IP illustrates datagram service: a router forwards each received packet using its forwarding table. A textbook virtual-circuit example is an ATM connection.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Virtual circuit bhi packet switching ho sakta hai.</p>"}]},{"id":"ipv4","title":"IPv4: understand the address before subnetting","scope":"TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023","sections":[{"id":"structure","title":"IPv4 addresses: four octets, one 32-bit value","html":"<p><strong>Definition.</strong> An IPv4 address is a 32-bit logical address, conventionally written as four decimal octets separated by dots.</p><p><strong>Simple meaning.</strong> IP ke chaar boxes hain; har box 8 bits ka, value 0 se 255.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ipv4-prefix.d99075bfca.svg\" width=\"820\" height=\"315\" alt=\"IPv4 /26: 26 network bits and 6 host bits\" loading=\"lazy\" decoding=\"async\"></div><figcaption>IPv4 addresses: four octets, one 32-bit value</figcaption></figure><h2>Understand it step by step</h2><ol><li>An octet contains eight bits. Its smallest value is 00000000₂=0 and its largest is 11111111₂=255.</li><li>An address such as 192.168.10.77 has four octets. The dots are separators, not decimal points in a single decimal fraction.</li><li>A prefix such as /26 says how many leftmost bits identify the network. The remaining 32−26=6 bits identify positions inside that address block.</li><li>The address alone does not give a classless subnet boundary. 192.168.10.77/24 and 192.168.10.77/26 belong to differently sized blocks.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A college can assign 192.168.10.77/26 to a lab device. The prefix identifies which nearby addresses are considered on the same subnet.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain dotted-decimal IPv4 notation and the meaning of /26. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>IPv4 contains 32 bits, written as four decimal octets of 8 bits each. Each octet ranges from 0 to 255. In /26 notation, 26 leading bits are the network prefix and 6 trailing bits are available within the block, giving 2⁶=64 total addresses.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A college can assign 192.168.10.77/26 to a lab device. The prefix identifies which nearby addresses are considered on the same subnet.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> 4 octets × 8 bits = 32; slash = network bits.</p>"},{"id":"classes","title":"Classful addressing: historical default boundaries","html":"<p><strong>Definition.</strong> Classful addressing divides the IPv4 address space into historical classes with fixed default network boundaries for Classes A, B and C.</p><p><strong>Simple meaning.</strong> Class first octet se; modern subnet given slash se.</p><h2>Understand it step by step</h2><ol><li>Historically, Class A used /8, Class B /16 and Class C /24 by default. These defaults are not used to override an explicitly supplied CIDR prefix.</li><li>Class D addresses identify multicast groups; Class E is reserved/experimental space rather than an ordinary unicast class.</li><li>Not all numerically class-shaped addresses can be assigned to normal hosts. For example, 127/8 is loopback and 0/8 has special meanings.</li><li>In a classless question, use the stated /p. An address that looks Class C can be part of a /26 subnet.</li></ol><table><thead><tr><th scope=\"col\">Class</th><th scope=\"col\">First octet</th><th scope=\"col\">Default / purpose</th></tr></thead><tbody><tr><td>A</td><td>0–127; ordinary historical assignments 1–126</td><td>/8; special ranges exist</td></tr><tr><td>B</td><td>128–191</td><td>/16</td></tr><tr><td>C</td><td>192–223</td><td>/24</td></tr><tr><td>D</td><td>224–239</td><td>Multicast</td></tr><tr><td>E</td><td>240–255</td><td>Reserved/experimental; special addresses exist</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>200.140.64.48 falls in the historical Class C first-octet range. If the question gives /26, use /26, not the Class C default /24.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. State the default prefixes of Classes A, B and C and explain their relation to CIDR. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Historical defaults are /8 for A, /16 for B and /24 for C. CIDR explicitly supplies the prefix length and supports variable-sized blocks. Therefore an explicit CIDR prefix takes precedence over a historical class default.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>200.140.64.48 falls in the historical Class C first-octet range. If the question gives /26, use /26, not the Class C default /24.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Class pehchaan sakte ho; calculation mein given slash follow karo.</p>"},{"id":"special","title":"Private, loopback and special IPv4 addresses","html":"<p><strong>Definition.</strong> Private IPv4 ranges are address blocks reserved for use within private networks rather than ordinary public Internet routing.</p><p><strong>Simple meaning.</strong> Private IP ghar/college ke andar reuse ho sakta hai; globally unique public IP jaisa treat mat karo.</p><h2>Understand it step by step</h2><ol><li>The RFC 1918 private blocks are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. The 172 block ends at 172.31.255.255, not 172.255.255.255.</li><li>127.0.0.0/8 is loopback; 127.0.0.1 commonly refers to the local host itself.</li><li>169.254.0.0/16 is IPv4 link-local space. It is not one of the three RFC 1918 private blocks.</li><li>255.255.255.255 is a limited broadcast address. A subnet-directed broadcast has all its host bits set to 1.</li><li>A network address has all host bits 0. In an ordinary broadcast subnet, the all-zero and all-one host patterns are not assigned to ordinary unicast hosts.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>172.20.1.5 is inside 172.16/12; 172.40.1.5 is outside it. Treating every address beginning with 172 as private would be wrong.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. List the three private IPv4 address ranges and give an example. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Prefix</th><th scope=\"col\">Range</th></tr></thead><tbody><tr><td>10.0.0.0/8</td><td>10.0.0.0–10.255.255.255</td></tr><tr><td>172.16.0.0/12</td><td>172.16.0.0–172.31.255.255</td></tr><tr><td>192.168.0.0/16</td><td>192.168.0.0–192.168.255.255</td></tr></tbody></table><p>For example, 192.168.1.10 can be used in a private LAN.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>172.20.1.5 is inside 172.16/12; 172.40.1.5 is outside it. Treating every address beginning with 172 as private would be wrong.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> 10 full; 172 only 16–31; 192.168 full.</p>"},{"id":"mask","title":"Subnet masks: 1 keeps a network bit; 0 marks a host bit","html":"<p><strong>Definition.</strong> A subnet mask is a 32-bit value with contiguous leading 1s for network-prefix positions and trailing 0s for host positions.</p><p><strong>Simple meaning.</strong> Mask mein 1 = network part rakhna; 0 = host part zero karna.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/mask-and.3b9a8ff9ea.svg\" width=\"820\" height=\"340\" alt=\"Bitwise AND: 77 AND 192 = 64\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Subnet masks: 1 keeps a network bit; 0 marks a host bit</figcaption></figure><h2>Understand it step by step</h2><ol><li>For /26, write 26 ones followed by 6 zeroes: 11111111.11111111.11111111.11000000.</li><li>Convert each octet: 255.255.255.(128+64)=255.255.255.192.</li><li>Bitwise AND operates on matching bit positions. Only 1 AND 1 equals 1; all other combinations equal 0.</li><li>Applying address AND mask keeps the network prefix and clears the host bits. This gives the first/network address of the block.</li></ol><table><thead><tr><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">A AND B</th></tr></thead><tbody><tr><td>0</td><td>0</td><td>0</td></tr><tr><td>0</td><td>1</td><td>0</td></tr><tr><td>1</td><td>0</td><td>0</td></tr><tr><td>1</td><td>1</td><td>1</td></tr></tbody></table><div class=\"math-display\"><img src=\"math/3a94cf83bf5040ba.svg\" alt=\"\\text{Network address}=\\text{IP address AND subnet mask}\" style=\"width:48.047ex;height:1.805ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>Last octet 77 is 01001101. AND with mask octet 192 = 11000000 gives 01000000 = 64. Thus 192.168.10.77/26 has network address 192.168.10.64.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. How does a subnet mask determine the network address? <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>The prefix mask contains 1s in network positions and 0s in host positions. Bitwise AND between the IP address and mask preserves the network bits and clears the host bits. For 192.168.10.77/26, the mask is 255.255.255.192 and the network is 192.168.10.64.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Last octet 77 is 01001101. AND with mask octet 192 = 11000000 gives 01000000 = 64. Thus 192.168.10.77/26 has network address 192.168.10.64.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> AND: dono 1 ho tabhi output 1.</p>"},{"id":"mask-1","title":"Prefix to mask · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Convert /26 into a dotted-decimal subnet mask. State host bits and total address count. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Prefix length p=26.</p><h2>To find</h2><p>Mask, h and N.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>A prefix contains p leading ones; total combinations depend on the remaining host bits.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Write the bits</h4><p>26 ones followed by 6 zeroes: <code>11111111.11111111.11111111.11000000</code>.</p></div><div class=\"step\"><h4>Step 2. Convert every octet</h4><table><thead><tr><th scope=\"col\">Mask bits</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>11111111</td><td>255</td></tr><tr><td>11111111</td><td>255</td></tr><tr><td>11111111</td><td>255</td></tr><tr><td>11000000</td><td>192</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Calculate host positions</h4><p>h=32−26=6.</p></div><div class=\"step\"><h4>Step 4. Count total addresses</h4><p>N=2<sup>6</sup>=64.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Mask=255.255.255.192; host bits=6; total addresses=64.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The mask tells which bits belong to the network; the last mask octet is not the number of hosts.</p></aside></div></section>"},{"id":"mask-2","title":"Prefix to mask · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Convert /20 into a dotted-decimal subnet mask. State host bits and total address count. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Prefix length p=20.</p><h2>To find</h2><p>Mask, h and N.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>A prefix contains p leading ones; total combinations depend on the remaining host bits.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Write the bits</h4><p>20 ones followed by 12 zeroes: <code>11111111.11111111.11110000.00000000</code>.</p></div><div class=\"step\"><h4>Step 2. Convert every octet</h4><table><thead><tr><th scope=\"col\">Mask bits</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>11111111</td><td>255</td></tr><tr><td>11111111</td><td>255</td></tr><tr><td>11110000</td><td>240</td></tr><tr><td>00000000</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Calculate host positions</h4><p>h=32−20=12.</p></div><div class=\"step\"><h4>Step 4. Count total addresses</h4><p>N=2<sup>12</sup>=4,096.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Mask=255.255.240.0; host bits=12; total addresses=4,096.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The mask tells which bits belong to the network; the last mask octet is not the number of hosts.</p></aside></div></section>"},{"id":"mask-3","title":"Prefix to mask · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Convert /27 into a dotted-decimal subnet mask. State host bits and total address count. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Prefix length p=27.</p><h2>To find</h2><p>Mask, h and N.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>A prefix contains p leading ones; total combinations depend on the remaining host bits.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Write the bits</h4><p>27 ones followed by 5 zeroes: <code>11111111.11111111.11111111.11100000</code>.</p></div><div class=\"step\"><h4>Step 2. Convert every octet</h4><table><thead><tr><th scope=\"col\">Mask bits</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>11111111</td><td>255</td></tr><tr><td>11111111</td><td>255</td></tr><tr><td>11111111</td><td>255</td></tr><tr><td>11100000</td><td>224</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Calculate host positions</h4><p>h=32−27=5.</p></div><div class=\"step\"><h4>Step 4. Count total addresses</h4><p>N=2<sup>5</sup>=32.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Mask=255.255.255.224; host bits=5; total addresses=32.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The mask tells which bits belong to the network; the last mask octet is not the number of hosts.</p></aside></div></section>"},{"id":"mask-4","title":"Prefix to mask · example 4","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Convert /23 into a dotted-decimal subnet mask. State host bits and total address count. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Prefix length p=23.</p><h2>To find</h2><p>Mask, h and N.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>A prefix contains p leading ones; total combinations depend on the remaining host bits.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Write the bits</h4><p>23 ones followed by 9 zeroes: <code>11111111.11111111.11111110.00000000</code>.</p></div><div class=\"step\"><h4>Step 2. Convert every octet</h4><table><thead><tr><th scope=\"col\">Mask bits</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>11111111</td><td>255</td></tr><tr><td>11111111</td><td>255</td></tr><tr><td>11111110</td><td>254</td></tr><tr><td>00000000</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Calculate host positions</h4><p>h=32−23=9.</p></div><div class=\"step\"><h4>Step 4. Count total addresses</h4><p>N=2<sup>9</sup>=512.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Mask=255.255.254.0; host bits=9; total addresses=512.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The mask tells which bits belong to the network; the last mask octet is not the number of hosts.</p></aside></div></section>"}]},{"id":"subnets","title":"Subnetting: first address, last address and host range","scope":"TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023","sections":[{"id":"method","title":"One method for every ordinary IPv4 block question","html":"<p><strong>Definition.</strong> Subnetting divides an address block into smaller prefix-defined blocks. In an ordinary subnet, the network and directed-broadcast addresses bound its usable host range.</p><p><strong>Simple meaning.</strong> Pehle block nikalo; phir first aur last. Uske baad hosts.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/subnet-blocks.67a24f46fc.svg\" width=\"820\" height=\"410\" alt=\"A /24 split into four /26 blocks\" loading=\"lazy\" decoding=\"async\"></div><figcaption>One method for every ordinary IPv4 block question</figcaption></figure><h2>Understand it step by step</h2><ol><li>Read /p. Host bits h=32−p. Total addresses N=2ʰ, not N−2.</li><li>Build the mask. Find the first octet that is not 255; block step there is 256−that mask octet.</li><li>Round that address octet down to a multiple of the step. Preserve preceding octets and set later octets to 0 for the network address.</li><li>For the broadcast address, use the end of the same interval in the changing octet and set later octets to 255. Equivalently, broadcast is network+(N−1) in 32-bit address arithmetic.</li><li>For an ordinary broadcast subnet with at least two host bits: first usable=network+1, last usable=broadcast−1, usable count=N−2. /31 point-to-point and /32 routes are exceptions explained separately.</li></ol><div class=\"math-display\"><img src=\"math/06561cae3cdafd6c.svg\" alt=\"N=2^{32-p}\" style=\"width:9.994ex;height:2.185ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/6d26c03e47eb5b6c.svg\" alt=\"\\text{block step}=256-\\text{changing mask octet}\" style=\"width:38.928ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/0d9d5151a6681f69.svg\" alt=\"\\text{ordinary usable hosts}=2^h-2\" style=\"width:29.885ex;height:2.506ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>For a /26, the changing fourth octet moves in steps of 64: blocks 0–63, 64–127, 128–191 and 192–255. An address ending in 77 is in the 64–127 block.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Distinguish total addresses from usable host addresses in a /26 subnet. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A /26 has 32−26=6 host bits, so it contains 2⁶=64 total addresses. Under ordinary IPv4 subnet rules, one is the network address and one is directed broadcast, leaving 64−2=62 usable host addresses.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>For a /26, the changing fourth octet moves in steps of 64: blocks 0–63, 64–127, 128–191 and 192–255. An address ending in 77 is in the 64–127 block.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Total mein sab count; usable mein boundary ke 2 minus.</p>"},{"id":"block-1","title":"Complete block · 192.168.10.77/26","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the IPv4 address 192.168.10.77/26, determine the mask, network address, broadcast address, total addresses and usable host range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>192.168.10.77/26</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−26=6; N=2<sup>6</sup>=64.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.192</code>; binary=<code>11111111.11111111.11111111.11000000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 77 lies in 64…127.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 64 in octet 4; set any later octets to zero. Network=<strong>192.168.10.64</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>11000000</td><td>11111111</td><td>11000000</td><td>192</td></tr><tr><td>2</td><td>10101000</td><td>11111111</td><td>10101000</td><td>168</td></tr><tr><td>3</td><td>00001010</td><td>11111111</td><td>00001010</td><td>10</td></tr><tr><td>4</td><td>01001101</td><td>11000000</td><td>01000000</td><td>64</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 127 in the changing octet and 255 in any later octets. Broadcast=<strong>192.168.10.127</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=192.168.10.65; last usable=192.168.10.126; count=64−2=62.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 192.168.10.64; broadcast 192.168.10.127; 64 total, 62 ordinary usable; range 192.168.10.65–192.168.10.126.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"block-2","title":"Complete block · 200.140.64.48/26","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the IPv4 address 200.140.64.48/26, determine the mask, network address, broadcast address, total addresses and usable host range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>200.140.64.48/26</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−26=6; N=2<sup>6</sup>=64.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.192</code>; binary=<code>11111111.11111111.11111111.11000000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 48 lies in 0…63.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 0 in octet 4; set any later octets to zero. Network=<strong>200.140.64.0</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>11001000</td><td>11111111</td><td>11001000</td><td>200</td></tr><tr><td>2</td><td>10001100</td><td>11111111</td><td>10001100</td><td>140</td></tr><tr><td>3</td><td>01000000</td><td>11111111</td><td>01000000</td><td>64</td></tr><tr><td>4</td><td>00110000</td><td>11000000</td><td>00000000</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 63 in the changing octet and 255 in any later octets. Broadcast=<strong>200.140.64.63</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=200.140.64.1; last usable=200.140.64.62; count=64−2=62.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 200.140.64.0; broadcast 200.140.64.63; 64 total, 62 ordinary usable; range 200.140.64.1–200.140.64.62.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"block-3","title":"Complete block · 193.20.35.40/26","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the IPv4 address 193.20.35.40/26, determine the mask, network address, broadcast address, total addresses and usable host range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>193.20.35.40/26</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−26=6; N=2<sup>6</sup>=64.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.192</code>; binary=<code>11111111.11111111.11111111.11000000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 40 lies in 0…63.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 0 in octet 4; set any later octets to zero. Network=<strong>193.20.35.0</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>11000001</td><td>11111111</td><td>11000001</td><td>193</td></tr><tr><td>2</td><td>00010100</td><td>11111111</td><td>00010100</td><td>20</td></tr><tr><td>3</td><td>00100011</td><td>11111111</td><td>00100011</td><td>35</td></tr><tr><td>4</td><td>00101000</td><td>11000000</td><td>00000000</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 63 in the changing octet and 255 in any later octets. Broadcast=<strong>193.20.35.63</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=193.20.35.1; last usable=193.20.35.62; count=64−2=62.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 193.20.35.0; broadcast 193.20.35.63; 64 total, 62 ordinary usable; range 193.20.35.1–193.20.35.62.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"block-4","title":"Complete block · 192.168.1.150/27","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the IPv4 address 192.168.1.150/27, determine the mask, network address, broadcast address, total addresses and usable host range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>192.168.1.150/27</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−27=5; N=2<sup>5</sup>=32.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.224</code>; binary=<code>11111111.11111111.11111111.11100000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 224, so step=256−224=32. The IP value 150 lies in 128…159.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 128 in octet 4; set any later octets to zero. Network=<strong>192.168.1.128</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>11000000</td><td>11111111</td><td>11000000</td><td>192</td></tr><tr><td>2</td><td>10101000</td><td>11111111</td><td>10101000</td><td>168</td></tr><tr><td>3</td><td>00000001</td><td>11111111</td><td>00000001</td><td>1</td></tr><tr><td>4</td><td>10010110</td><td>11100000</td><td>10000000</td><td>128</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 159 in the changing octet and 255 in any later octets. Broadcast=<strong>192.168.1.159</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=192.168.1.129; last usable=192.168.1.158; count=32−2=30.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 192.168.1.128; broadcast 192.168.1.159; 32 total, 30 ordinary usable; range 192.168.1.129–192.168.1.158.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"block-5","title":"Complete block · 10.4.9.55/28","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the IPv4 address 10.4.9.55/28, determine the mask, network address, broadcast address, total addresses and usable host range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>10.4.9.55/28</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−28=4; N=2<sup>4</sup>=16.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.240</code>; binary=<code>11111111.11111111.11111111.11110000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 240, so step=256−240=16. The IP value 55 lies in 48…63.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 48 in octet 4; set any later octets to zero. Network=<strong>10.4.9.48</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>00001010</td><td>11111111</td><td>00001010</td><td>10</td></tr><tr><td>2</td><td>00000100</td><td>11111111</td><td>00000100</td><td>4</td></tr><tr><td>3</td><td>00001001</td><td>11111111</td><td>00001001</td><td>9</td></tr><tr><td>4</td><td>00110111</td><td>11110000</td><td>00110000</td><td>48</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 63 in the changing octet and 255 in any later octets. Broadcast=<strong>10.4.9.63</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=10.4.9.49; last usable=10.4.9.62; count=16−2=14.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 10.4.9.48; broadcast 10.4.9.63; 16 total, 14 ordinary usable; range 10.4.9.49–10.4.9.62.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"block-6","title":"Complete block · 172.16.35.123/20","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the IPv4 address 172.16.35.123/20, determine the mask, network address, broadcast address, total addresses and usable host range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>172.16.35.123/20</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−20=12; N=2<sup>12</sup>=4,096.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.240.0</code>; binary=<code>11111111.11111111.11110000.00000000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 3. Its mask value is 240, so step=256−240=16. The IP value 35 lies in 32…47.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 32 in octet 3; set any later octets to zero. Network=<strong>172.16.32.0</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>10101100</td><td>11111111</td><td>10101100</td><td>172</td></tr><tr><td>2</td><td>00010000</td><td>11111111</td><td>00010000</td><td>16</td></tr><tr><td>3</td><td>00100011</td><td>11110000</td><td>00100000</td><td>32</td></tr><tr><td>4</td><td>01111011</td><td>00000000</td><td>00000000</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 47 in the changing octet and 255 in any later octets. Broadcast=<strong>172.16.47.255</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=172.16.32.1; last usable=172.16.47.254; count=4096−2=4094.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 172.16.32.0; broadcast 172.16.47.255; 4,096 total, 4,094 ordinary usable; range 172.16.32.1–172.16.47.254.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"block-7","title":"Complete block · 10.20.5.130/23","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the IPv4 address 10.20.5.130/23, determine the mask, network address, broadcast address, total addresses and usable host range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>10.20.5.130/23</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−23=9; N=2<sup>9</sup>=512.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.254.0</code>; binary=<code>11111111.11111111.11111110.00000000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 3. Its mask value is 254, so step=256−254=2. The IP value 5 lies in 4…5.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 4 in octet 3; set any later octets to zero. Network=<strong>10.20.4.0</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>00001010</td><td>11111111</td><td>00001010</td><td>10</td></tr><tr><td>2</td><td>00010100</td><td>11111111</td><td>00010100</td><td>20</td></tr><tr><td>3</td><td>00000101</td><td>11111110</td><td>00000100</td><td>4</td></tr><tr><td>4</td><td>10000010</td><td>00000000</td><td>00000000</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 5 in the changing octet and 255 in any later octets. Broadcast=<strong>10.20.5.255</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=10.20.4.1; last usable=10.20.5.254; count=512−2=510.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 10.20.4.0; broadcast 10.20.5.255; 512 total, 510 ordinary usable; range 10.20.4.1–10.20.5.254.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"block-8","title":"Complete block · 192.168.2.129/25","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the IPv4 address 192.168.2.129/25, determine the mask, network address, broadcast address, total addresses and usable host range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>192.168.2.129/25</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−25=7; N=2<sup>7</sup>=128.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.128</code>; binary=<code>11111111.11111111.11111111.10000000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 128, so step=256−128=128. The IP value 129 lies in 128…255.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 128 in octet 4; set any later octets to zero. Network=<strong>192.168.2.128</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>11000000</td><td>11111111</td><td>11000000</td><td>192</td></tr><tr><td>2</td><td>10101000</td><td>11111111</td><td>10101000</td><td>168</td></tr><tr><td>3</td><td>00000010</td><td>11111111</td><td>00000010</td><td>2</td></tr><tr><td>4</td><td>10000001</td><td>10000000</td><td>10000000</td><td>128</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 255 in the changing octet and 255 in any later octets. Broadcast=<strong>192.168.2.255</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=192.168.2.129; last usable=192.168.2.254; count=128−2=126.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 192.168.2.128; broadcast 192.168.2.255; 128 total, 126 ordinary usable; range 192.168.2.129–192.168.2.254.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"block-9","title":"Complete block · 192.0.2.6/30","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For the IPv4 address 192.0.2.6/30, determine the mask, network address, broadcast address, total addresses and usable host range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>192.0.2.6/30</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−30=2; N=2<sup>2</sup>=4.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.252</code>; binary=<code>11111111.11111111.11111111.11111100</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 252, so step=256−252=4. The IP value 6 lies in 4…7.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 4 in octet 4; set any later octets to zero. Network=<strong>192.0.2.4</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>11000000</td><td>11111111</td><td>11000000</td><td>192</td></tr><tr><td>2</td><td>00000000</td><td>11111111</td><td>00000000</td><td>0</td></tr><tr><td>3</td><td>00000010</td><td>11111111</td><td>00000010</td><td>2</td></tr><tr><td>4</td><td>00000110</td><td>11111100</td><td>00000100</td><td>4</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 7 in the changing octet and 255 in any later octets. Broadcast=<strong>192.0.2.7</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=192.0.2.5; last usable=192.0.2.6; count=4−2=2.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 192.0.2.4; broadcast 192.0.2.7; 4 total, 2 ordinary usable; range 192.0.2.5–192.0.2.6.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"exceptions","title":"Why /31 and /32 do not use the ordinary minus-two rule","html":"<p><strong>Definition.</strong> A /31 prefix can address both endpoints of a point-to-point IPv4 link under RFC 3021; a /32 identifies one IPv4 address, commonly as a host route.</p><p><strong>Simple meaning.</strong> Minus 2 har slash pe blindly mat lagao.</p><h2>Understand it step by step</h2><ol><li>Ordinary subnet questions reserve the all-zero and all-one host patterns, giving 2ʰ−2 usable hosts.</li><li>A /31 on a point-to-point link has two addresses and both can be endpoint addresses. There is no need for a subnet broadcast on that two-endpoint link.</li><li>A /32 contains exactly one address. It is useful for identifying a specific interface/host route; it is not a multi-host broadcast subnet.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>192.0.2.0/31 contains .0 and .1. On a suitable point-to-point link, both may be endpoints. 192.0.2.7/32 describes only .7.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain why subtracting two usable addresses is inappropriate for a /31 point-to-point link. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>RFC 3021 permits both addresses of a /31 to be used by the two endpoints of an IPv4 point-to-point link. Applying the ordinary broadcast-subnet formula would incorrectly claim there are zero usable endpoints.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>192.0.2.0/31 contains .0 and .1. On a suitable point-to-point link, both may be endpoints. 192.0.2.7/32 describes only .7.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> /31 special link; /32 single address.</p>"},{"id":"hosts-1","title":"Hosts to prefix · 25 hosts","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Choose the smallest ordinary IPv4 subnet supporting at least 25 usable hosts. Find prefix, mask and unused usable capacity. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Required usable hosts H=25.</p><h2>To find</h2><p>The smallest sufficient subnet, expressed as /p and mask.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/9d320d9c17125391.svg\" alt=\"2^h-2\\geq H,\\qquad p=32-h\" style=\"width:27.181ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>Host demand excludes network and broadcast, so use the usable-host inequality. Choose the smallest h that satisfies it.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Test the previous smaller power</h4><p>With h=4, usable=2<sup>4</sup>−2=14, which is less than 25.</p></div><div class=\"step\"><h4>Step 2. Test the next power</h4><p>With h=5, usable=2<sup>5</sup>−2=30, which is sufficient.</p></div><div class=\"step\"><h4>Step 3. Convert host bits to prefix</h4><p>p=32−5=27; mask=255.255.255.224.</p></div><div class=\"step\"><h4>Step 4. Count spare usable addresses</h4><p>30−25=5.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> /27, mask 255.255.255.224; 30 usable, 5 spare usable addresses.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A requirement of 64 usable hosts cannot fit into a 64-total-address block: only 62 would be usable.</p></aside></div></section>"},{"id":"hosts-2","title":"Hosts to prefix · 64 hosts","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Choose the smallest ordinary IPv4 subnet supporting at least 64 usable hosts. Find prefix, mask and unused usable capacity. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Required usable hosts H=64.</p><h2>To find</h2><p>The smallest sufficient subnet, expressed as /p and mask.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/9d320d9c17125391.svg\" alt=\"2^h-2\\geq H,\\qquad p=32-h\" style=\"width:27.181ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>Host demand excludes network and broadcast, so use the usable-host inequality. Choose the smallest h that satisfies it.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Test the previous smaller power</h4><p>With h=6, usable=2<sup>6</sup>−2=62, which is less than 64.</p></div><div class=\"step\"><h4>Step 2. Test the next power</h4><p>With h=7, usable=2<sup>7</sup>−2=126, which is sufficient.</p></div><div class=\"step\"><h4>Step 3. Convert host bits to prefix</h4><p>p=32−7=25; mask=255.255.255.128.</p></div><div class=\"step\"><h4>Step 4. Count spare usable addresses</h4><p>126−64=62.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> /25, mask 255.255.255.128; 126 usable, 62 spare usable addresses.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A requirement of 64 usable hosts cannot fit into a 64-total-address block: only 62 would be usable.</p></aside></div></section>"},{"id":"hosts-3","title":"Hosts to prefix · 1000 hosts","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Choose the smallest ordinary IPv4 subnet supporting at least 1000 usable hosts. Find prefix, mask and unused usable capacity. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Required usable hosts H=1000.</p><h2>To find</h2><p>The smallest sufficient subnet, expressed as /p and mask.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/9d320d9c17125391.svg\" alt=\"2^h-2\\geq H,\\qquad p=32-h\" style=\"width:27.181ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>Host demand excludes network and broadcast, so use the usable-host inequality. Choose the smallest h that satisfies it.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Test the previous smaller power</h4><p>With h=9, usable=2<sup>9</sup>−2=510, which is less than 1000.</p></div><div class=\"step\"><h4>Step 2. Test the next power</h4><p>With h=10, usable=2<sup>10</sup>−2=1022, which is sufficient.</p></div><div class=\"step\"><h4>Step 3. Convert host bits to prefix</h4><p>p=32−10=22; mask=255.255.252.0.</p></div><div class=\"step\"><h4>Step 4. Count spare usable addresses</h4><p>1022−1000=22.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> /22, mask 255.255.252.0; 1022 usable, 22 spare usable addresses.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A requirement of 64 usable hosts cannot fit into a 64-total-address block: only 62 would be usable.</p></aside></div></section>"},{"id":"split-1","title":"Equal-size subnet design · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Divide 192.168.8.0/24 into at least 4 equal-size ordinary subnets. Give the new prefix, number of available subnets, usable hosts per subnet, and every resulting address range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Parent=192.168.8.0/24; required equal-size subnets=4.</p><h2>To find</h2><p>Borrowed bits, new mask/prefix and complete subnet ranges.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ca4fab7e8dac4ad7.svg\" alt=\"2^s\\geq N_{\\mathrm{subnets}}\" style=\"width:12.353ex;height:1.998ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/3c981479a80689de.svg\" alt=\"p_{\\mathrm{new}}=p_{\\mathrm{old}}+s\" style=\"width:14.384ex;height:1.758ex\" loading=\"lazy\" decoding=\"async\"></div><p>Borrow the smallest s giving enough subnets. In modern subnetting, zero and all-ones subnets are valid; do not subtract two from the subnet count.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Choose borrowed bits</h4><p>s=2, because 2<sup>2</sup>=4 is the smallest power of two at least 4.</p></div><div class=\"step\"><h4>Step 2. Find the new prefix and size</h4><p>/24+2=/26; mask=255.255.255.192. Each subnet contains 64 total and 62 usable addresses.</p></div><div class=\"step\"><h4>Step 3. List each subnet</h4><table><thead><tr><th scope=\"col\">Subnet</th><th scope=\"col\">First/network</th><th scope=\"col\">Last/broadcast</th><th scope=\"col\">Usable range</th></tr></thead><tbody><tr><td>192.168.8.0/26</td><td>192.168.8.0</td><td>192.168.8.63</td><td>192.168.8.1–192.168.8.62</td></tr><tr><td>192.168.8.64/26</td><td>192.168.8.64</td><td>192.168.8.127</td><td>192.168.8.65–192.168.8.126</td></tr><tr><td>192.168.8.128/26</td><td>192.168.8.128</td><td>192.168.8.191</td><td>192.168.8.129–192.168.8.190</td></tr><tr><td>192.168.8.192/26</td><td>192.168.8.192</td><td>192.168.8.255</td><td>192.168.8.193–192.168.8.254</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. State spare subnet capacity</h4><p>4 available−4 required=0 extra equal-size subnet(s).</p></div><p class=\"final-answer\"><strong>Final answer:</strong> /26; 4 subnets; 62 usable hosts each.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Borrowing more network bits creates more but smaller subnets.</p></aside></div></section>"},{"id":"split-2","title":"Equal-size subnet design · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Divide 172.16.0.0/16 into at least 8 equal-size ordinary subnets. Give the new prefix, number of available subnets, usable hosts per subnet, and every resulting address range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Parent=172.16.0.0/16; required equal-size subnets=8.</p><h2>To find</h2><p>Borrowed bits, new mask/prefix and complete subnet ranges.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ca4fab7e8dac4ad7.svg\" alt=\"2^s\\geq N_{\\mathrm{subnets}}\" style=\"width:12.353ex;height:1.998ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/3c981479a80689de.svg\" alt=\"p_{\\mathrm{new}}=p_{\\mathrm{old}}+s\" style=\"width:14.384ex;height:1.758ex\" loading=\"lazy\" decoding=\"async\"></div><p>Borrow the smallest s giving enough subnets. In modern subnetting, zero and all-ones subnets are valid; do not subtract two from the subnet count.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Choose borrowed bits</h4><p>s=3, because 2<sup>3</sup>=8 is the smallest power of two at least 8.</p></div><div class=\"step\"><h4>Step 2. Find the new prefix and size</h4><p>/16+3=/19; mask=255.255.224.0. Each subnet contains 8192 total and 8190 usable addresses.</p></div><div class=\"step\"><h4>Step 3. List each subnet</h4><table><thead><tr><th scope=\"col\">Subnet</th><th scope=\"col\">First/network</th><th scope=\"col\">Last/broadcast</th><th scope=\"col\">Usable range</th></tr></thead><tbody><tr><td>172.16.0.0/19</td><td>172.16.0.0</td><td>172.16.31.255</td><td>172.16.0.1–172.16.31.254</td></tr><tr><td>172.16.32.0/19</td><td>172.16.32.0</td><td>172.16.63.255</td><td>172.16.32.1–172.16.63.254</td></tr><tr><td>172.16.64.0/19</td><td>172.16.64.0</td><td>172.16.95.255</td><td>172.16.64.1–172.16.95.254</td></tr><tr><td>172.16.96.0/19</td><td>172.16.96.0</td><td>172.16.127.255</td><td>172.16.96.1–172.16.127.254</td></tr><tr><td>172.16.128.0/19</td><td>172.16.128.0</td><td>172.16.159.255</td><td>172.16.128.1–172.16.159.254</td></tr><tr><td>172.16.160.0/19</td><td>172.16.160.0</td><td>172.16.191.255</td><td>172.16.160.1–172.16.191.254</td></tr><tr><td>172.16.192.0/19</td><td>172.16.192.0</td><td>172.16.223.255</td><td>172.16.192.1–172.16.223.254</td></tr><tr><td>172.16.224.0/19</td><td>172.16.224.0</td><td>172.16.255.255</td><td>172.16.224.1–172.16.255.254</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. State spare subnet capacity</h4><p>8 available−8 required=0 extra equal-size subnet(s).</p></div><p class=\"final-answer\"><strong>Final answer:</strong> /19; 8 subnets; 8190 usable hosts each.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Borrowing more network bits creates more but smaller subnets.</p></aside></div></section>"},{"id":"split-3","title":"Equal-size subnet design · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Divide 10.0.0.0/24 into at least 6 equal-size ordinary subnets. Give the new prefix, number of available subnets, usable hosts per subnet, and every resulting address range. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Parent=10.0.0.0/24; required equal-size subnets=6.</p><h2>To find</h2><p>Borrowed bits, new mask/prefix and complete subnet ranges.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ca4fab7e8dac4ad7.svg\" alt=\"2^s\\geq N_{\\mathrm{subnets}}\" style=\"width:12.353ex;height:1.998ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/3c981479a80689de.svg\" alt=\"p_{\\mathrm{new}}=p_{\\mathrm{old}}+s\" style=\"width:14.384ex;height:1.758ex\" loading=\"lazy\" decoding=\"async\"></div><p>Borrow the smallest s giving enough subnets. In modern subnetting, zero and all-ones subnets are valid; do not subtract two from the subnet count.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Choose borrowed bits</h4><p>s=3, because 2<sup>3</sup>=8 is the smallest power of two at least 6.</p></div><div class=\"step\"><h4>Step 2. Find the new prefix and size</h4><p>/24+3=/27; mask=255.255.255.224. Each subnet contains 32 total and 30 usable addresses.</p></div><div class=\"step\"><h4>Step 3. List each subnet</h4><table><thead><tr><th scope=\"col\">Subnet</th><th scope=\"col\">First/network</th><th scope=\"col\">Last/broadcast</th><th scope=\"col\">Usable range</th></tr></thead><tbody><tr><td>10.0.0.0/27</td><td>10.0.0.0</td><td>10.0.0.31</td><td>10.0.0.1–10.0.0.30</td></tr><tr><td>10.0.0.32/27</td><td>10.0.0.32</td><td>10.0.0.63</td><td>10.0.0.33–10.0.0.62</td></tr><tr><td>10.0.0.64/27</td><td>10.0.0.64</td><td>10.0.0.95</td><td>10.0.0.65–10.0.0.94</td></tr><tr><td>10.0.0.96/27</td><td>10.0.0.96</td><td>10.0.0.127</td><td>10.0.0.97–10.0.0.126</td></tr><tr><td>10.0.0.128/27</td><td>10.0.0.128</td><td>10.0.0.159</td><td>10.0.0.129–10.0.0.158</td></tr><tr><td>10.0.0.160/27</td><td>10.0.0.160</td><td>10.0.0.191</td><td>10.0.0.161–10.0.0.190</td></tr><tr><td>10.0.0.192/27</td><td>10.0.0.192</td><td>10.0.0.223</td><td>10.0.0.193–10.0.0.222</td></tr><tr><td>10.0.0.224/27</td><td>10.0.0.224</td><td>10.0.0.255</td><td>10.0.0.225–10.0.0.254</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. State spare subnet capacity</h4><p>8 available−6 required=2 extra equal-size subnet(s).</p></div><p class=\"final-answer\"><strong>Final answer:</strong> /27; 8 subnets; 30 usable hosts each.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Borrowing more network bits creates more but smaller subnets.</p></aside></div></section>"}]},{"id":"cidr","title":"CIDR, VLSM and route matching","scope":"TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023","sections":[{"id":"meaning","title":"CIDR and VLSM: two related but different ideas","html":"<p><strong>Definition.</strong> CIDR expresses address blocks using an explicit prefix length; VLSM uses different subnet prefix lengths to match different size requirements within an allocated block.</p><p><strong>Simple meaning.</strong> CIDR = slash se block; VLSM = departments ko need ke hisaab se different block sizes.</p><h2>Understand it step by step</h2><ol><li>A valid CIDR block has a power-of-two address count and begins on the matching boundary. For example, a /26 block has 64 addresses and begins at fourth-octet multiples of 64 within a /24.</li><li>The prefix gives contiguous network bits. A noncontiguous mask such as 255.0.255.0 is not a normal CIDR prefix mask.</li><li>VLSM avoids making every department as large as the largest one. Allocate larger requirements first, then fit smaller aligned blocks into remaining space.</li><li>Distinguish <strong>addresses</strong> from <strong>usable hosts</strong>. A lab requiring 128 total addresses gets /25; a lab requiring 128 ordinary usable hosts needs /24.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A department with 100 hosts can receive /25, while one with 10 hosts can receive /28. Giving both /25 would leave more unused addresses.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain CIDR and the advantage of VLSM. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>CIDR identifies a classless address block with an explicit /p prefix. VLSM permits subnets of different prefix lengths inside a larger block. Matching subnet sizes to requirements reduces waste while maintaining non-overlapping aligned allocations.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A department with 100 hosts can receive /25, while one with 10 hosts can receive /28. Giving both /25 would leave more unused addresses.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Hosts bola toh +2 allowance; addresses bola toh total count directly.</p>"},{"id":"vlsm-1","title":"Complete VLSM allocation · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Allocate non-overlapping VLSM subnets inside 192.168.10.0/24 for A: 100 usable hosts, B: 50 usable hosts, C: 25 usable hosts, D: 10 usable hosts. Allocate largest requirements first. Give all ranges and unallocated addresses. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Department</th><th scope=\"col\">Usable hosts</th></tr></thead><tbody><tr><td>A</td><td>100</td></tr><tr><td>B</td><td>50</td></tr><tr><td>C</td><td>25</td></tr><tr><td>D</td><td>10</td></tr></tbody></table><h2>To find</h2><p>An aligned subnet for each department, usable ranges, broadcasts and remaining addresses.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/0d2799e2eb681b5f.svg\" alt=\"2^h-2\\geq H,\\quad p=32-h\" style=\"width:24.918ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>Choose the smallest sufficient subnet per requirement. Align each start to its block size and never overlap a previously assigned range.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Sort the host requirements</h4><p>A (100) → B (50) → C (25) → D (10)</p></div><div class=\"step\"><h4>Step 2. A · choose and allocate</h4><p>100 hosts require 2<sup>7</sup>−2=126 usable; a smaller /26 would give 62. Choose /25. The next aligned block is 192.168.10.0/25; it ends at 192.168.10.127.</p></div><div class=\"step\"><h4>Step 3. B · choose and allocate</h4><p>50 hosts require 2<sup>6</sup>−2=62 usable; a smaller /27 would give 30. Choose /26. The next aligned block is 192.168.10.128/26; it ends at 192.168.10.191.</p></div><div class=\"step\"><h4>Step 4. C · choose and allocate</h4><p>25 hosts require 2<sup>5</sup>−2=30 usable; a smaller /28 would give 14. Choose /27. The next aligned block is 192.168.10.192/27; it ends at 192.168.10.223.</p></div><div class=\"step\"><h4>Step 5. D · choose and allocate</h4><p>10 hosts require 2<sup>4</sup>−2=14 usable; a smaller /29 would give 6. Choose /28. The next aligned block is 192.168.10.224/28; it ends at 192.168.10.239.</p></div><div class=\"step\"><h4>Step 6. Write the complete allocation</h4><table><thead><tr><th scope=\"col\">Group</th><th scope=\"col\">Hosts</th><th scope=\"col\">Network/prefix</th><th scope=\"col\">Mask</th><th scope=\"col\">Usable range</th><th scope=\"col\">Broadcast</th><th scope=\"col\">Spare usable</th></tr></thead><tbody><tr><td>A</td><td>100</td><td>192.168.10.0/25</td><td>255.255.255.128</td><td>192.168.10.1–192.168.10.126</td><td>192.168.10.127</td><td>26</td></tr><tr><td>B</td><td>50</td><td>192.168.10.128/26</td><td>255.255.255.192</td><td>192.168.10.129–192.168.10.190</td><td>192.168.10.191</td><td>12</td></tr><tr><td>C</td><td>25</td><td>192.168.10.192/27</td><td>255.255.255.224</td><td>192.168.10.193–192.168.10.222</td><td>192.168.10.223</td><td>5</td></tr><tr><td>D</td><td>10</td><td>192.168.10.224/28</td><td>255.255.255.240</td><td>192.168.10.225–192.168.10.238</td><td>192.168.10.239</td><td>4</td></tr></tbody></table></div><div class=\"step\"><h4>Step 7. Count addresses reserved and left</h4><p>Reserved=128+64+32+16=240. Parent total=256. Unallocated=256−240=16.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 240 total addresses reserved; 16 unallocated. The table gives one valid complete allocation.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Unused usable capacity inside assigned subnets is different from unallocated address space outside those subnets.</p></aside></div></section>"},{"id":"vlsm-2","title":"Complete VLSM allocation · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Allocate non-overlapping VLSM subnets inside 10.0.0.0/24 for Research: 60 usable hosts, Admin: 25 usable hosts, IoT: 12 usable hosts. Allocate largest requirements first. Give all ranges and unallocated addresses. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Department</th><th scope=\"col\">Usable hosts</th></tr></thead><tbody><tr><td>Research</td><td>60</td></tr><tr><td>Admin</td><td>25</td></tr><tr><td>IoT</td><td>12</td></tr></tbody></table><h2>To find</h2><p>An aligned subnet for each department, usable ranges, broadcasts and remaining addresses.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/0d2799e2eb681b5f.svg\" alt=\"2^h-2\\geq H,\\quad p=32-h\" style=\"width:24.918ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>Choose the smallest sufficient subnet per requirement. Align each start to its block size and never overlap a previously assigned range.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Sort the host requirements</h4><p>Research (60) → Admin (25) → IoT (12)</p></div><div class=\"step\"><h4>Step 2. Research · choose and allocate</h4><p>60 hosts require 2<sup>6</sup>−2=62 usable; a smaller /27 would give 30. Choose /26. The next aligned block is 10.0.0.0/26; it ends at 10.0.0.63.</p></div><div class=\"step\"><h4>Step 3. Admin · choose and allocate</h4><p>25 hosts require 2<sup>5</sup>−2=30 usable; a smaller /28 would give 14. Choose /27. The next aligned block is 10.0.0.64/27; it ends at 10.0.0.95.</p></div><div class=\"step\"><h4>Step 4. IoT · choose and allocate</h4><p>12 hosts require 2<sup>4</sup>−2=14 usable; a smaller /29 would give 6. Choose /28. The next aligned block is 10.0.0.96/28; it ends at 10.0.0.111.</p></div><div class=\"step\"><h4>Step 5. Write the complete allocation</h4><table><thead><tr><th scope=\"col\">Group</th><th scope=\"col\">Hosts</th><th scope=\"col\">Network/prefix</th><th scope=\"col\">Mask</th><th scope=\"col\">Usable range</th><th scope=\"col\">Broadcast</th><th scope=\"col\">Spare usable</th></tr></thead><tbody><tr><td>Research</td><td>60</td><td>10.0.0.0/26</td><td>255.255.255.192</td><td>10.0.0.1–10.0.0.62</td><td>10.0.0.63</td><td>2</td></tr><tr><td>Admin</td><td>25</td><td>10.0.0.64/27</td><td>255.255.255.224</td><td>10.0.0.65–10.0.0.94</td><td>10.0.0.95</td><td>5</td></tr><tr><td>IoT</td><td>12</td><td>10.0.0.96/28</td><td>255.255.255.240</td><td>10.0.0.97–10.0.0.110</td><td>10.0.0.111</td><td>2</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Count addresses reserved and left</h4><p>Reserved=64+32+16=112. Parent total=256. Unallocated=256−112=144.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 112 total addresses reserved; 144 unallocated. The table gives one valid complete allocation.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Unused usable capacity inside assigned subnets is different from unallocated address space outside those subnets.</p></aside></div></section>"},{"id":"vlsm-3","title":"Complete VLSM allocation · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Allocate non-overlapping VLSM subnets inside 172.16.8.0/23 for Lab: 200 usable hosts, Staff: 100 usable hosts, Guests: 50 usable hosts. Allocate largest requirements first. Give all ranges and unallocated addresses. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Department</th><th scope=\"col\">Usable hosts</th></tr></thead><tbody><tr><td>Lab</td><td>200</td></tr><tr><td>Staff</td><td>100</td></tr><tr><td>Guests</td><td>50</td></tr></tbody></table><h2>To find</h2><p>An aligned subnet for each department, usable ranges, broadcasts and remaining addresses.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/0d2799e2eb681b5f.svg\" alt=\"2^h-2\\geq H,\\quad p=32-h\" style=\"width:24.918ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>Choose the smallest sufficient subnet per requirement. Align each start to its block size and never overlap a previously assigned range.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Sort the host requirements</h4><p>Lab (200) → Staff (100) → Guests (50)</p></div><div class=\"step\"><h4>Step 2. Lab · choose and allocate</h4><p>200 hosts require 2<sup>8</sup>−2=254 usable; a smaller /25 would give 126. Choose /24. The next aligned block is 172.16.8.0/24; it ends at 172.16.8.255.</p></div><div class=\"step\"><h4>Step 3. Staff · choose and allocate</h4><p>100 hosts require 2<sup>7</sup>−2=126 usable; a smaller /26 would give 62. Choose /25. The next aligned block is 172.16.9.0/25; it ends at 172.16.9.127.</p></div><div class=\"step\"><h4>Step 4. Guests · choose and allocate</h4><p>50 hosts require 2<sup>6</sup>−2=62 usable; a smaller /27 would give 30. Choose /26. The next aligned block is 172.16.9.128/26; it ends at 172.16.9.191.</p></div><div class=\"step\"><h4>Step 5. Write the complete allocation</h4><table><thead><tr><th scope=\"col\">Group</th><th scope=\"col\">Hosts</th><th scope=\"col\">Network/prefix</th><th scope=\"col\">Mask</th><th scope=\"col\">Usable range</th><th scope=\"col\">Broadcast</th><th scope=\"col\">Spare usable</th></tr></thead><tbody><tr><td>Lab</td><td>200</td><td>172.16.8.0/24</td><td>255.255.255.0</td><td>172.16.8.1–172.16.8.254</td><td>172.16.8.255</td><td>54</td></tr><tr><td>Staff</td><td>100</td><td>172.16.9.0/25</td><td>255.255.255.128</td><td>172.16.9.1–172.16.9.126</td><td>172.16.9.127</td><td>26</td></tr><tr><td>Guests</td><td>50</td><td>172.16.9.128/26</td><td>255.255.255.192</td><td>172.16.9.129–172.16.9.190</td><td>172.16.9.191</td><td>12</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Count addresses reserved and left</h4><p>Reserved=256+128+64=448. Parent total=512. Unallocated=512−448=64.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 448 total addresses reserved; 64 unallocated. The table gives one valid complete allocation.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Unused usable capacity inside assigned subnets is different from unallocated address space outside those subnets.</p></aside></div></section>"},{"id":"aggregation","title":"Route aggregation: combine only a valid aligned block","html":"<p><strong>Definition.</strong> Route aggregation represents several contiguous networks by a shorter common prefix, reducing the number of advertised routing entries.</p><p><strong>Simple meaning.</strong> Side-by-side blocks ko ek larger boundary mein summarize karo; gap chhupana nahi.</p><h2>Understand it step by step</h2><ol><li>For exact aggregation into one prefix, the component range must fill a correctly aligned power-of-two block.</li><li>If four consecutive /24 networks begin at a third-octet multiple of four, their exact aggregate is /22.</li><li>Find common leading address bits or verify alignment numerically. Consecutive networks do not always form one exact aggregate.</li><li>An aggregate that covers extra addresses is broader than the exact assigned range. State that explicitly instead of pretending every included address was allocated.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>192.168.4.0/24 through 192.168.7.0/24 form 192.168.4.0/22. But 192.168.5.0/24 through .8.0/24 are not aligned as one exact /22.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. State two conditions for exact aggregation of equal-sized IPv4 blocks. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>The blocks must be contiguous with no gaps and together form a power-of-two address count starting on the corresponding larger-block boundary. Their shared leading bits define the aggregate prefix.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>192.168.4.0/24 through 192.168.7.0/24 form 192.168.4.0/22. But 192.168.5.0/24 through .8.0/24 are not aligned as one exact /22.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Consecutive + power of two + aligned start.</p>"},{"id":"aggregate-1","title":"Exact route aggregation · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Find a single exact CIDR aggregate for these networks: 192.168.4.0/24, 192.168.5.0/24, 192.168.6.0/24, 192.168.7.0/24. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><ul><li>192.168.4.0/24</li><li>192.168.5.0/24</li><li>192.168.6.0/24</li><li>192.168.7.0/24</li></ul><h2>To find</h2><p>One prefix covering exactly the same address range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/96879d7c45f4939b.svg\" alt=\"\\text{total addresses}=\\sum_i N_i\" style=\"width:23.652ex;height:4.847ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/796d561e6716df45.svg\" alt=\"p=32-\\log_2(N)\" style=\"width:16.832ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Adding sizes gives the candidate prefix. Contiguity and start-boundary alignment must also be satisfied.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Determine each block size</h4><p>Each input block has 256 addresses.</p></div><div class=\"step\"><h4>Step 2. Add the address counts</h4><p>4×256=1024.</p></div><div class=\"step\"><h4>Step 3. Find host bits and prefix</h4><p>1024=2<sup>10</sup>; prefix=32−10=/22.</p></div><div class=\"step\"><h4>Step 4. Verify the exact range</h4><p>Inputs cover 192.168.4.0–192.168.7.255, without gaps. 192.168.4.0/22 covers the same start and end and is correctly aligned.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 192.168.4.0/22</p><aside class=\"applied-example\"><h4>What this result means</h4><p>An aggregate should not silently advertise an unrelated network.</p></aside></div></section>"},{"id":"aggregate-2","title":"Exact route aggregation · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Find a single exact CIDR aggregate for these networks: 10.20.0.0/25, 10.20.0.128/25. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><ul><li>10.20.0.0/25</li><li>10.20.0.128/25</li></ul><h2>To find</h2><p>One prefix covering exactly the same address range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/96879d7c45f4939b.svg\" alt=\"\\text{total addresses}=\\sum_i N_i\" style=\"width:23.652ex;height:4.847ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/796d561e6716df45.svg\" alt=\"p=32-\\log_2(N)\" style=\"width:16.832ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Adding sizes gives the candidate prefix. Contiguity and start-boundary alignment must also be satisfied.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Determine each block size</h4><p>Each input block has 128 addresses.</p></div><div class=\"step\"><h4>Step 2. Add the address counts</h4><p>2×128=256.</p></div><div class=\"step\"><h4>Step 3. Find host bits and prefix</h4><p>256=2<sup>8</sup>; prefix=32−8=/24.</p></div><div class=\"step\"><h4>Step 4. Verify the exact range</h4><p>Inputs cover 10.20.0.0–10.20.0.255, without gaps. 10.20.0.0/24 covers the same start and end and is correctly aligned.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 10.20.0.0/24</p><aside class=\"applied-example\"><h4>What this result means</h4><p>An aggregate should not silently advertise an unrelated network.</p></aside></div></section>"},{"id":"aggregate-3","title":"Exact route aggregation · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Find a single exact CIDR aggregate for these networks: 172.16.8.0/23, 172.16.10.0/23. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><ul><li>172.16.8.0/23</li><li>172.16.10.0/23</li></ul><h2>To find</h2><p>One prefix covering exactly the same address range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/96879d7c45f4939b.svg\" alt=\"\\text{total addresses}=\\sum_i N_i\" style=\"width:23.652ex;height:4.847ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/796d561e6716df45.svg\" alt=\"p=32-\\log_2(N)\" style=\"width:16.832ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Adding sizes gives the candidate prefix. Contiguity and start-boundary alignment must also be satisfied.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Determine each block size</h4><p>Each input block has 512 addresses.</p></div><div class=\"step\"><h4>Step 2. Add the address counts</h4><p>2×512=1024.</p></div><div class=\"step\"><h4>Step 3. Find host bits and prefix</h4><p>1024=2<sup>10</sup>; prefix=32−10=/22.</p></div><div class=\"step\"><h4>Step 4. Verify the exact range</h4><p>Inputs cover 172.16.8.0–172.16.11.255, without gaps. 172.16.8.0/22 covers the same start and end and is correctly aligned.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 172.16.8.0/22</p><aside class=\"applied-example\"><h4>What this result means</h4><p>An aggregate should not silently advertise an unrelated network.</p></aside></div></section>"},{"id":"forwarding","title":"Longest-prefix match: choose the most specific matching route","html":"<p><strong>Definition.</strong> Longest-prefix matching selects the matching forwarding-table entry with the greatest number of prefix bits.</p><p><strong>Simple meaning.</strong> Pehle match check; matching entries mein sabse bada slash choose.</p><h2>Understand it step by step</h2><ol><li>Compare the destination with each route’s address range. A larger prefix that does not contain the destination is irrelevant.</li><li>Among matching prefixes, choose the longest, such as /24 rather than /16.</li><li>The default route /0 matches every IPv4 destination but loses to any more specific matching entry.</li><li>The result tells the outgoing interface or next hop. It does not change the destination IP address.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>For destination 10.1.2.77, both 10.0.0.0/8 and 10.1.2.0/24 match. Choose /24. A 10.1.3.0/24 entry does not match.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. What is longest-prefix matching? Give an example. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A router selects the most specific route whose prefix contains the destination. For 10.1.2.77, a matching 10.1.2.0/24 route takes precedence over 10.0.0.0/8 and 0.0.0.0/0.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>For destination 10.1.2.77, both 10.0.0.0/8 and 10.1.2.0/24 match. Choose /24. A 10.1.3.0/24 entry does not match.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Bada slash only among matches.</p>"},{"id":"match-1","title":"Forwarding table · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Using the table below, choose the next hop for destination 10.1.2.150 by longest-prefix matching. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Network/prefix</th><th scope=\"col\">Next hop</th></tr></thead><tbody><tr><td>0.0.0.0/0</td><td>R0</td></tr><tr><td>10.0.0.0/8</td><td>R1</td></tr><tr><td>10.1.0.0/16</td><td>R2</td></tr><tr><td>10.1.2.0/24</td><td>R3</td></tr><tr><td>10.1.2.128/25</td><td>R4</td></tr></tbody></table><p>Destination=10.1.2.150</p><h2>To find</h2><p>The matching entries and selected next hop.</p><h2>Formula and why</h2><p>Choose the largest prefix length among entries containing the destination.</p><p>Prefix length is considered only after confirming an address-range match.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Check every route</h4><table><thead><tr><th scope=\"col\">Route</th><th scope=\"col\">Destination inside?</th></tr></thead><tbody><tr><td>0.0.0.0/0</td><td>Yes</td></tr><tr><td>10.0.0.0/8</td><td>Yes</td></tr><tr><td>10.1.0.0/16</td><td>Yes</td></tr><tr><td>10.1.2.0/24</td><td>Yes</td></tr><tr><td>10.1.2.128/25</td><td>Yes</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Compare matching lengths</h4><p>0.0.0.0/0, 10.0.0.0/8, 10.1.0.0/16, 10.1.2.0/24, 10.1.2.128/25. The longest is 10.1.2.128/25.</p></div><div class=\"step\"><h4>Step 3. Read the next hop</h4><p>10.1.2.128/25 uses R4.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Forward via R4 using 10.1.2.128/25.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A default route is used when no more specific entry matches.</p></aside></div></section>"},{"id":"match-2","title":"Forwarding table · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Using the table below, choose the next hop for destination 10.1.2.77 by longest-prefix matching. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Network/prefix</th><th scope=\"col\">Next hop</th></tr></thead><tbody><tr><td>0.0.0.0/0</td><td>R0</td></tr><tr><td>10.0.0.0/8</td><td>R1</td></tr><tr><td>10.1.0.0/16</td><td>R2</td></tr><tr><td>10.1.2.0/24</td><td>R3</td></tr><tr><td>10.1.2.128/25</td><td>R4</td></tr></tbody></table><p>Destination=10.1.2.77</p><h2>To find</h2><p>The matching entries and selected next hop.</p><h2>Formula and why</h2><p>Choose the largest prefix length among entries containing the destination.</p><p>Prefix length is considered only after confirming an address-range match.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Check every route</h4><table><thead><tr><th scope=\"col\">Route</th><th scope=\"col\">Destination inside?</th></tr></thead><tbody><tr><td>0.0.0.0/0</td><td>Yes</td></tr><tr><td>10.0.0.0/8</td><td>Yes</td></tr><tr><td>10.1.0.0/16</td><td>Yes</td></tr><tr><td>10.1.2.0/24</td><td>Yes</td></tr><tr><td>10.1.2.128/25</td><td>No</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Compare matching lengths</h4><p>0.0.0.0/0, 10.0.0.0/8, 10.1.0.0/16, 10.1.2.0/24. The longest is 10.1.2.0/24.</p></div><div class=\"step\"><h4>Step 3. Read the next hop</h4><p>10.1.2.0/24 uses R3.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Forward via R3 using 10.1.2.0/24.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A default route is used when no more specific entry matches.</p></aside></div></section>"},{"id":"match-3","title":"Forwarding table · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Using the table below, choose the next hop for destination 192.0.2.9 by longest-prefix matching. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Network/prefix</th><th scope=\"col\">Next hop</th></tr></thead><tbody><tr><td>0.0.0.0/0</td><td>R0</td></tr><tr><td>10.0.0.0/8</td><td>R1</td></tr><tr><td>10.1.0.0/16</td><td>R2</td></tr><tr><td>10.1.2.0/24</td><td>R3</td></tr><tr><td>10.1.2.128/25</td><td>R4</td></tr></tbody></table><p>Destination=192.0.2.9</p><h2>To find</h2><p>The matching entries and selected next hop.</p><h2>Formula and why</h2><p>Choose the largest prefix length among entries containing the destination.</p><p>Prefix length is considered only after confirming an address-range match.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Check every route</h4><table><thead><tr><th scope=\"col\">Route</th><th scope=\"col\">Destination inside?</th></tr></thead><tbody><tr><td>0.0.0.0/0</td><td>Yes</td></tr><tr><td>10.0.0.0/8</td><td>No</td></tr><tr><td>10.1.0.0/16</td><td>No</td></tr><tr><td>10.1.2.0/24</td><td>No</td></tr><tr><td>10.1.2.128/25</td><td>No</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Compare matching lengths</h4><p>0.0.0.0/0. The longest is 0.0.0.0/0.</p></div><div class=\"step\"><h4>Step 3. Read the next hop</h4><p>0.0.0.0/0 uses R0.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Forward via R0 using 0.0.0.0/0.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A default route is used when no more specific entry matches.</p></aside></div></section>"}]},{"id":"ipv6","title":"IPv6: addresses and packet format","scope":"TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023","sections":[{"id":"structure","title":"IPv6: eight hexadecimal groups","html":"<p><strong>Definition.</strong> IPv6 uses 128-bit addresses, conventionally represented by eight groups of four hexadecimal digits separated by colons.</p><p><strong>Simple meaning.</strong> IPv4 mein 4 decimal boxes; IPv6 mein 8 hexadecimal groups.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ipv6-address.25497337ae.svg\" width=\"820\" height=\"330\" alt=\"IPv6: 8 groups × 16 bits = 128 bits\" loading=\"lazy\" decoding=\"async\"></div><figcaption>IPv6: eight hexadecimal groups</figcaption></figure><h2>Understand it step by step</h2><ol><li>Hexadecimal uses sixteen digits: 0–9, then a=10, b=11, c=12, d=13, e=14, f=15. One hex digit represents four bits.</li><li>Four hex digits represent 16 bits, called one hextet/group. Eight groups represent 8×16=128 bits.</li><li>Leading zeroes within a group may be omitted: 00ab becomes ab, but ab00 must not become ab.</li><li>A run of all-zero groups may be abbreviated by :: once in an address. Using :: twice makes the missing group counts ambiguous.</li></ol><table><thead><tr><th scope=\"col\">Hex</th><th scope=\"col\">Decimal</th><th scope=\"col\">Four bits</th></tr></thead><tbody><tr><td>0</td><td>0</td><td>0000</td></tr><tr><td>1</td><td>1</td><td>0001</td></tr><tr><td>2</td><td>2</td><td>0010</td></tr><tr><td>3</td><td>3</td><td>0011</td></tr><tr><td>4</td><td>4</td><td>0100</td></tr><tr><td>5</td><td>5</td><td>0101</td></tr><tr><td>6</td><td>6</td><td>0110</td></tr><tr><td>7</td><td>7</td><td>0111</td></tr><tr><td>8</td><td>8</td><td>1000</td></tr><tr><td>9</td><td>9</td><td>1001</td></tr><tr><td>a</td><td>10</td><td>1010</td></tr><tr><td>b</td><td>11</td><td>1011</td></tr><tr><td>c</td><td>12</td><td>1100</td></tr><tr><td>d</td><td>13</td><td>1101</td></tr><tr><td>e</td><td>14</td><td>1110</td></tr><tr><td>f</td><td>15</td><td>1111</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>2001:0db8:0000:0000:0000:0000:0000:0001 contains eight groups. A compact representation is 2001:db8::1.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Describe the format of an IPv6 address and two abbreviation rules. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>An IPv6 address contains 128 bits, written as eight 16-bit hexadecimal groups. Leading zeros inside a group can be removed. One contiguous run of all-zero groups can be represented with ::, used at most once.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>2001:0db8:0000:0000:0000:0000:0000:0001 contains eight groups. A compact representation is 2001:db8::1.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> 8 groups × 4 hex digits × 4 bits = 128.</p>"},{"id":"expansion","title":"Expand :: by counting visible groups","html":"<p><strong>Definition.</strong> IPv6 expansion restores exactly eight groups, each written with four hexadecimal digits.</p><p><strong>Simple meaning.</strong> Visible groups count karo; 8 mein se minus; utne zero groups :: ki jagah.</p><h2>Understand it step by step</h2><ol><li>Count groups on the left of :: and on its right. The double colon itself is not an additional visible group.</li><li>Missing zero groups = 8−visible groups. Insert them at the location of ::.</li><li>Pad every group on the left with zeroes until it has four digits. Do not pad on the right.</li><li>Count the final result: exactly eight groups must appear. A written group “0” already counts as one visible group.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>In 0:15::1:12:1213, five groups are visible: 0,15,1,12,1213. Therefore :: supplies three groups of 0000, not four.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain how to expand an abbreviated IPv6 address containing ::. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Count all explicitly written groups. Insert 8 minus this count all-zero groups at ::, then left-pad every group to four hexadecimal digits. The result must contain exactly eight groups.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>In 0:15::1:12:1213, five groups are visible: 0,15,1,12,1213. Therefore :: supplies three groups of 0000, not four.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Already-written 0 ko bhi count karna.</p>"},{"id":"expand-1","title":"Expand IPv6 · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Expand the IPv6 address 0:15::1:12:1213 into eight groups of four hexadecimal digits. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Given address: <code>0:15::1:12:1213</code>.</p><h2>To find</h2><p>The full 128-bit address in eight-group hexadecimal notation.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/a013f99fcbb0987c.svg\" alt=\"\\text{missing groups}=8-\\text{visible groups}\" style=\"width:34.708ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>A written 0 is a visible group. :: represents only the omitted all-zero groups.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count groups on both sides</h4><p>Left: 0, 15 (2 group(s)). Right: 1, 12, 1213 (3 group(s)).</p></div><div class=\"step\"><h4>Step 2. Calculate omitted groups</h4><p>Visible=2+3=5. Missing=8−5=3.</p></div><div class=\"step\"><h4>Step 3. Insert the groups</h4><p><code>0:15:0:0:0:1:12:1213</code>.</p></div><div class=\"step\"><h4>Step 4. Pad each group on the left</h4><table><thead><tr><th scope=\"col\">Group number</th><th scope=\"col\">Four-digit group</th></tr></thead><tbody><tr><td>1</td><td>0000</td></tr><tr><td>2</td><td>0015</td></tr><tr><td>3</td><td>0000</td></tr><tr><td>4</td><td>0000</td></tr><tr><td>5</td><td>0000</td></tr><tr><td>6</td><td>0001</td></tr><tr><td>7</td><td>0012</td></tr><tr><td>8</td><td>1213</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Write all eight in order</h4><p><code>0000:0015:0000:0000:0000:0001:0012:1213</code>.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>0000:0015:0000:0000:0000:0001:0012:1213</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>Leading zeros change the spelling, not the address value. The final group count is eight.</p></aside></div></section>"},{"id":"expand-2","title":"Expand IPv6 · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Expand the IPv6 address 2001:db8:0:1::9 into eight groups of four hexadecimal digits. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Given address: <code>2001:db8:0:1::9</code>.</p><h2>To find</h2><p>The full 128-bit address in eight-group hexadecimal notation.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/a013f99fcbb0987c.svg\" alt=\"\\text{missing groups}=8-\\text{visible groups}\" style=\"width:34.708ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>A written 0 is a visible group. :: represents only the omitted all-zero groups.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count groups on both sides</h4><p>Left: 2001, db8, 0, 1 (4 group(s)). Right: 9 (1 group(s)).</p></div><div class=\"step\"><h4>Step 2. Calculate omitted groups</h4><p>Visible=4+1=5. Missing=8−5=3.</p></div><div class=\"step\"><h4>Step 3. Insert the groups</h4><p><code>2001:db8:0:1:0:0:0:9</code>.</p></div><div class=\"step\"><h4>Step 4. Pad each group on the left</h4><table><thead><tr><th scope=\"col\">Group number</th><th scope=\"col\">Four-digit group</th></tr></thead><tbody><tr><td>1</td><td>2001</td></tr><tr><td>2</td><td>0db8</td></tr><tr><td>3</td><td>0000</td></tr><tr><td>4</td><td>0001</td></tr><tr><td>5</td><td>0000</td></tr><tr><td>6</td><td>0000</td></tr><tr><td>7</td><td>0000</td></tr><tr><td>8</td><td>0009</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Write all eight in order</h4><p><code>2001:0db8:0000:0001:0000:0000:0000:0009</code>.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>2001:0db8:0000:0001:0000:0000:0000:0009</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>Leading zeros change the spelling, not the address value. The final group count is eight.</p></aside></div></section>"},{"id":"expand-3","title":"Expand IPv6 · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Expand the IPv6 address ::1 into eight groups of four hexadecimal digits. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Given address: <code>::1</code>.</p><h2>To find</h2><p>The full 128-bit address in eight-group hexadecimal notation.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/a013f99fcbb0987c.svg\" alt=\"\\text{missing groups}=8-\\text{visible groups}\" style=\"width:34.708ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>A written 0 is a visible group. :: represents only the omitted all-zero groups.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count groups on both sides</h4><p>Left: none (0 group(s)). Right: 1 (1 group(s)).</p></div><div class=\"step\"><h4>Step 2. Calculate omitted groups</h4><p>Visible=0+1=1. Missing=8−1=7.</p></div><div class=\"step\"><h4>Step 3. Insert the groups</h4><p><code>0:0:0:0:0:0:0:1</code>.</p></div><div class=\"step\"><h4>Step 4. Pad each group on the left</h4><table><thead><tr><th scope=\"col\">Group number</th><th scope=\"col\">Four-digit group</th></tr></thead><tbody><tr><td>1</td><td>0000</td></tr><tr><td>2</td><td>0000</td></tr><tr><td>3</td><td>0000</td></tr><tr><td>4</td><td>0000</td></tr><tr><td>5</td><td>0000</td></tr><tr><td>6</td><td>0000</td></tr><tr><td>7</td><td>0000</td></tr><tr><td>8</td><td>0001</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Write all eight in order</h4><p><code>0000:0000:0000:0000:0000:0000:0000:0001</code>.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>0000:0000:0000:0000:0000:0000:0000:0001</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>Leading zeros change the spelling, not the address value. The final group count is eight.</p></aside></div></section>"},{"id":"expand-4","title":"Expand IPv6 · example 4","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Expand the IPv6 address fe80::abcd:ef12 into eight groups of four hexadecimal digits. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Given address: <code>fe80::abcd:ef12</code>.</p><h2>To find</h2><p>The full 128-bit address in eight-group hexadecimal notation.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/a013f99fcbb0987c.svg\" alt=\"\\text{missing groups}=8-\\text{visible groups}\" style=\"width:34.708ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>A written 0 is a visible group. :: represents only the omitted all-zero groups.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count groups on both sides</h4><p>Left: fe80 (1 group(s)). Right: abcd, ef12 (2 group(s)).</p></div><div class=\"step\"><h4>Step 2. Calculate omitted groups</h4><p>Visible=1+2=3. Missing=8−3=5.</p></div><div class=\"step\"><h4>Step 3. Insert the groups</h4><p><code>fe80:0:0:0:0:0:abcd:ef12</code>.</p></div><div class=\"step\"><h4>Step 4. Pad each group on the left</h4><table><thead><tr><th scope=\"col\">Group number</th><th scope=\"col\">Four-digit group</th></tr></thead><tbody><tr><td>1</td><td>fe80</td></tr><tr><td>2</td><td>0000</td></tr><tr><td>3</td><td>0000</td></tr><tr><td>4</td><td>0000</td></tr><tr><td>5</td><td>0000</td></tr><tr><td>6</td><td>0000</td></tr><tr><td>7</td><td>abcd</td></tr><tr><td>8</td><td>ef12</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Write all eight in order</h4><p><code>fe80:0000:0000:0000:0000:0000:abcd:ef12</code>.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>fe80:0000:0000:0000:0000:0000:abcd:ef12</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>Leading zeros change the spelling, not the address value. The final group count is eight.</p></aside></div></section>"},{"id":"compression","title":"Write the shortest standard IPv6 representation","html":"<p><strong>Definition.</strong> Canonical IPv6 text formatting removes leading zeros and compresses the longest eligible run of consecutive zero groups.</p><p><strong>Simple meaning.</strong> Group ke left wale zero hatao; sabse lambi zero-chain ko :: banao.</p><h2>Understand it step by step</h2><ol><li>Remove leading zeroes from each group, retaining one zero if the whole group is zero. Use lowercase hex letters for canonical text.</li><li>Select the longest run of consecutive zero groups. If two runs tie, compress the leftmost run.</li><li>For the recommended canonical form, do not use :: to compress just one zero group.</li><li>Use :: only once. Expanding your compressed result should recover the original address.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>2001:0db8:0000:0000:0012:0000:0000:0001 has two equal two-zero runs. Compress the first: 2001:db8::12:0:0:1.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. State the canonical rule when two zero runs have equal length in IPv6. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Compress the leftmost of the equal longest runs. Leading zeros in groups are removed and hexadecimal letters are lowercase. A single zero group is retained as 0 rather than compressed to :: in canonical text.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>2001:0db8:0000:0000:0012:0000:0000:0001 has two equal two-zero runs. Compress the first: 2001:db8::12:0:0:1.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Longest first; tie hua toh leftmost.</p>"},{"id":"compress-1","title":"Compress IPv6 · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Write 2001:0db8:0000:0000:0012:0000:0000:0001 in canonical compressed IPv6 notation. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p><code>2001:0db8:0000:0000:0012:0000:0000:0001</code>.</p><h2>To find</h2><p>A canonical shortened spelling of the same address.</p><h2>Formula and why</h2><p>Remove leading zeroes; compress the longest run of at least two zero groups; choose the leftmost tied run.</p><p>These rules preserve all 128 bits while removing redundant writing.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Shorten individual groups</h4><p><code>2001:db8:0:0:12:0:0:1</code>.</p></div><div class=\"step\"><h4>Step 2. Locate zero runs</h4><p>groups 3–4: 2 zero group(s); groups 6–7: 2 zero group(s).</p></div><div class=\"step\"><h4>Step 3. Select an eligible run</h4><p>Compress groups 3–4.</p></div><div class=\"step\"><h4>Step 4. Write the result</h4><p><code>2001:db8::12:0:0:1</code>.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>2001:db8::12:0:0:1</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>The address remains unchanged; only its representation is shortened.</p></aside></div></section>"},{"id":"compress-2","title":"Compress IPv6 · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Write 2001:0db8:0000:0001:0002:0003:0004:0005 in canonical compressed IPv6 notation. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p><code>2001:0db8:0000:0001:0002:0003:0004:0005</code>.</p><h2>To find</h2><p>A canonical shortened spelling of the same address.</p><h2>Formula and why</h2><p>Remove leading zeroes; compress the longest run of at least two zero groups; choose the leftmost tied run.</p><p>These rules preserve all 128 bits while removing redundant writing.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Shorten individual groups</h4><p><code>2001:db8:0:1:2:3:4:5</code>.</p></div><div class=\"step\"><h4>Step 2. Locate zero runs</h4><p>groups 3–3: 1 zero group(s).</p></div><div class=\"step\"><h4>Step 3. Select an eligible run</h4><p>No run has two or more groups, so do not use ::.</p></div><div class=\"step\"><h4>Step 4. Write the result</h4><p><code>2001:db8:0:1:2:3:4:5</code>.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>2001:db8:0:1:2:3:4:5</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>The address remains unchanged; only its representation is shortened.</p></aside></div></section>"},{"id":"compress-3","title":"Compress IPv6 · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Write 0000:0000:0000:0000:0000:0000:0000:0000 in canonical compressed IPv6 notation. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p><code>0000:0000:0000:0000:0000:0000:0000:0000</code>.</p><h2>To find</h2><p>A canonical shortened spelling of the same address.</p><h2>Formula and why</h2><p>Remove leading zeroes; compress the longest run of at least two zero groups; choose the leftmost tied run.</p><p>These rules preserve all 128 bits while removing redundant writing.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Shorten individual groups</h4><p><code>0:0:0:0:0:0:0:0</code>.</p></div><div class=\"step\"><h4>Step 2. Locate zero runs</h4><p>groups 1–8: 8 zero group(s).</p></div><div class=\"step\"><h4>Step 3. Select an eligible run</h4><p>Compress groups 1–8.</p></div><div class=\"step\"><h4>Step 4. Write the result</h4><p><code>::</code>.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>::</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>The address remains unchanged; only its representation is shortened.</p></aside></div></section>"},{"id":"header","title":"IPv6 base header: every field and its purpose","html":"<p><strong>Definition.</strong> The IPv6 base header is a fixed 40-byte structure containing addressing and forwarding-control fields, followed by optional extension headers and upper-layer data.</p><p><strong>Simple meaning.</strong> Base header fixed 40 bytes; extra information extension headers mein.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ipv6-header.aef1bfbac7.svg\" width=\"820\" height=\"410\" alt=\"IPv6 base header · each horizontal row is 32 bits wide\" loading=\"lazy\" decoding=\"async\"></div><figcaption>IPv6 base header: every field and its purpose</figcaption></figure><h2>Understand it step by step</h2><ol><li>Read the header from its control fields to its two 128-bit addresses. Four plus eight plus twenty bits fills the first 32-bit row.</li><li>The first two rows together contribute 64 bits; source and destination contribute 256 bits. Total=320 bits=40 bytes.</li><li>Payload Length counts bytes after the base header, including extension headers when present. It does not include the base 40 bytes.</li><li>Next Header permits chaining: a base header may point to an extension, which points to another extension or TCP/UDP.</li><li>The Hop Limit is reduced by forwarding nodes to prevent indefinite circulation. IPv6 has no base-header checksum, and routers do not fragment IPv6 packets.</li></ol><table><thead><tr><th scope=\"col\">Field</th><th scope=\"col\">Bits</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Version</td><td>4</td><td>Value 6</td></tr><tr><td>Traffic Class</td><td>8</td><td>Traffic treatment/congestion-related marking</td></tr><tr><td>Flow Label</td><td>20</td><td>Identifies a flow for appropriate handling</td></tr><tr><td>Payload Length</td><td>16</td><td>Bytes after the base header; includes extension headers when present</td></tr><tr><td>Next Header</td><td>8</td><td>Type of the next extension header or upper-layer protocol</td></tr><tr><td>Hop Limit</td><td>8</td><td>Decremented on forwarding; limits packet lifetime in hops</td></tr><tr><td>Source address</td><td>128</td><td>Sending interface address</td></tr><tr><td>Destination address</td><td>128</td><td>Destination address</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>With a 20-byte extension header and 1,000 bytes of upper-layer content, Payload Length is 1,020 bytes and the total IPv6 packet is 1,060 bytes in the ordinary non-jumbo case.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Draw the IPv6 base header and explain its fields. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ipv6-header.aef1bfbac7.svg\" width=\"820\" height=\"410\" alt=\"IPv6 base header · each horizontal row is 32 bits wide\" loading=\"lazy\" decoding=\"async\"></div><figcaption>IPv6 base header: 40 bytes.</figcaption></figure><table><thead><tr><th scope=\"col\">Field</th><th scope=\"col\">Bits</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Version</td><td>4</td><td>Value 6</td></tr><tr><td>Traffic Class</td><td>8</td><td>Traffic treatment/congestion-related marking</td></tr><tr><td>Flow Label</td><td>20</td><td>Identifies a flow for appropriate handling</td></tr><tr><td>Payload Length</td><td>16</td><td>Bytes after the base header; includes extension headers when present</td></tr><tr><td>Next Header</td><td>8</td><td>Type of the next extension header or upper-layer protocol</td></tr><tr><td>Hop Limit</td><td>8</td><td>Decremented on forwarding; limits packet lifetime in hops</td></tr><tr><td>Source address</td><td>128</td><td>Sending interface address</td></tr><tr><td>Destination address</td><td>128</td><td>Destination address</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>With a 20-byte extension header and 1,000 bytes of upper-layer content, Payload Length is 1,020 bytes and the total IPv6 packet is 1,060 bytes in the ordinary non-jumbo case.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> IPv6: 40 fixed; payload field excludes those 40.</p>"},{"id":"compare","title":"IPv4 versus IPv6 headers and address types","html":"<p><strong>Definition.</strong> IPv6 extends address size and reorganizes IP forwarding information into a fixed base header with extension headers.</p><p><strong>Simple meaning.</strong> Sirf address bada nahi; header ka arrangement bhi badla.</p><h2>Understand it step by step</h2><ol><li>IPv6 uses unicast, multicast and anycast addressing; it does not use IPv4-style broadcast addressing.</li><li>Unicast identifies an interface; multicast addresses a group; anycast reaches one appropriate member of a group sharing an address, according to routing.</li><li>::1 is loopback. fe80::/10 is link-local space. ff00::/8 identifies multicast. These serve different purposes.</li><li>IPv6 neighbour discovery replaces IPv4 ARP mechanisms. Do not write that IPv6 uses ARP to map its addresses.</li><li>IPv6 is not automatically encrypted or secure merely because it has a larger address space. Security depends on the mechanisms deployed.</li></ol><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">IPv4</th><th scope=\"col\">IPv6</th></tr></thead><tbody><tr><td>Address width</td><td>32 bits</td><td>128 bits</td></tr><tr><td>Base/header size</td><td>20–60 bytes depending on options</td><td>40-byte fixed base header</td></tr><tr><td>Length field</td><td>Total length includes IPv4 header</td><td>Payload Length excludes 40-byte base header</td></tr><tr><td>Lifetime field</td><td>TTL</td><td>Hop Limit</td></tr><tr><td>Following protocol</td><td>Protocol field</td><td>Next Header; may identify an extension</td></tr><tr><td>Header checksum</td><td>Present</td><td>No base-header checksum</td></tr><tr><td>Options</td><td>Inside IPv4 header</td><td>Typically extension headers</td></tr><tr><td>Fragmentation fields</td><td>In IPv4 header; routers may fragment if permitted</td><td>Fragment extension header; fragmentation by source, not routers</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A router handling an oversized IPv6 packet cannot fragment it on behalf of the source; the source must respond to path-MTU information and use an appropriate packet size or source fragmentation.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Compare the IPv4 and IPv6 packet headers. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">IPv4</th><th scope=\"col\">IPv6</th></tr></thead><tbody><tr><td>Address width</td><td>32 bits</td><td>128 bits</td></tr><tr><td>Base/header size</td><td>20–60 bytes depending on options</td><td>40-byte fixed base header</td></tr><tr><td>Length field</td><td>Total length includes IPv4 header</td><td>Payload Length excludes 40-byte base header</td></tr><tr><td>Lifetime field</td><td>TTL</td><td>Hop Limit</td></tr><tr><td>Following protocol</td><td>Protocol field</td><td>Next Header; may identify an extension</td></tr><tr><td>Header checksum</td><td>Present</td><td>No base-header checksum</td></tr><tr><td>Options</td><td>Inside IPv4 header</td><td>Typically extension headers</td></tr><tr><td>Fragmentation fields</td><td>In IPv4 header; routers may fragment if permitted</td><td>Fragment extension header; fragmentation by source, not routers</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A router handling an oversized IPv6 packet cannot fragment it on behalf of the source; the source must respond to path-MTU information and use an appropriate packet size or source fragmentation.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> v4 total length; v6 payload length.</p>"}]},{"id":"mapping","title":"ARP, RARP and DHCP","scope":"TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023","sections":[{"id":"arp","title":"ARP: find the local next-hop MAC address","html":"<p><strong>Definition.</strong> Address Resolution Protocol (ARP) resolves a known IPv4 address to a link-layer hardware address on the local network.</p><p><strong>Simple meaning.</strong> IP pata hai; local delivery ke liye MAC chahiye.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/arp.c8af39ddb3.svg\" width=\"820\" height=\"540\" alt=\"ARP resolves the selected local next hop\" loading=\"lazy\" decoding=\"async\"></div><figcaption>ARP: find the local next-hop MAC address</figcaption></figure><h2>Understand it step by step</h2><ol><li>First determine whether the destination is on the local subnet. If local, the next hop is the destination itself. If remote, the next hop is a router such as the default gateway.</li><li>Check the ARP cache. If the next-hop mapping is absent, broadcast an ARP request on the local link.</li><li>The owner of the requested IPv4 address normally replies with its hardware address. The sender caches the mapping and constructs its data frame.</li><li>Routers do not normally forward a host’s ARP broadcast across networks. ARP resolves the next hop, not the MAC of a remote Internet server.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Host 192.168.1.10/24 sending to 192.168.1.20 asks for .20’s MAC. Sending to 203.0.113.7 through gateway 192.168.1.1 asks for the gateway’s MAC instead.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain the working of ARP with a suitable example. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>ARP maps a known local next-hop IPv4 address to a hardware address. A sender broadcasts a request when the mapping is missing; the address owner replies, and the mapping is cached. For a remote IP destination, the sender resolves its gateway’s local MAC address, then forwards the packet toward that gateway.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Host 192.168.1.10/24 sending to 192.168.1.20 asks for .20’s MAC. Sending to 203.0.113.7 through gateway 192.168.1.1 asks for the gateway’s MAC instead.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Remote packet ka next-hop MAC gateway ka hota hai.</p>"},{"id":"next-hop-1","title":"ARP decision · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Host H has 192.168.1.10/24, and its gateway is 192.168.1.1. H sends a packet to 192.168.1.20. Decide whether delivery is local and which IPv4 address H resolves using ARP. Assume the mapping is not cached. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>H=192.168.1.10/24; gateway=192.168.1.1; destination=192.168.1.20.</p><h2>To find</h2><p>Local/remote decision and ARP target.</p><h2>Formula and why</h2><p>Compare source and destination network prefixes using the source mask. ARP resolves the selected local next-hop IP.</p><p>The IP destination stays the final destination; the Ethernet next-hop address depends on whether that destination is local.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Determine H’s subnet</h4><p>With /24, H is in 192.168.1.0–192.168.1.255.</p></div><div class=\"step\"><h4>Step 2. Compare the destination</h4><p>192.168.1.20 is inside that block, so delivery is local.</p></div><div class=\"step\"><h4>Step 3. Select ARP target</h4><p>Resolve 192.168.1.20 using ARP.</p></div><div class=\"step\"><h4>Step 4. Separate packet and frame destinations</h4><p>IP destination remains 192.168.1.20; frame destination is that host’s MAC.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> ARP target: 192.168.1.20.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>ARP is a local-link operation. A remote packet is sent to a local router for its next step.</p></aside></div></section>"},{"id":"next-hop-2","title":"ARP decision · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Host H has 192.168.1.10/24, and its gateway is 192.168.1.1. H sends a packet to 203.0.113.7. Decide whether delivery is local and which IPv4 address H resolves using ARP. Assume the mapping is not cached. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>H=192.168.1.10/24; gateway=192.168.1.1; destination=203.0.113.7.</p><h2>To find</h2><p>Local/remote decision and ARP target.</p><h2>Formula and why</h2><p>Compare source and destination network prefixes using the source mask. ARP resolves the selected local next-hop IP.</p><p>The IP destination stays the final destination; the Ethernet next-hop address depends on whether that destination is local.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Determine H’s subnet</h4><p>With /24, H is in 192.168.1.0–192.168.1.255.</p></div><div class=\"step\"><h4>Step 2. Compare the destination</h4><p>203.0.113.7 is outside that block, so use a router.</p></div><div class=\"step\"><h4>Step 3. Select ARP target</h4><p>Resolve 192.168.1.1 using ARP.</p></div><div class=\"step\"><h4>Step 4. Separate packet and frame destinations</h4><p>IP destination remains 203.0.113.7; frame destination is the gateway’s MAC.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> ARP target: 192.168.1.1.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>ARP is a local-link operation. A remote packet is sent to a local router for its next step.</p></aside></div></section>"},{"id":"next-hop-3","title":"ARP decision · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Host H has 192.168.1.10/24, and its gateway is 192.168.1.1. H sends a packet to 192.168.2.20. Decide whether delivery is local and which IPv4 address H resolves using ARP. Assume the mapping is not cached. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>H=192.168.1.10/24; gateway=192.168.1.1; destination=192.168.2.20.</p><h2>To find</h2><p>Local/remote decision and ARP target.</p><h2>Formula and why</h2><p>Compare source and destination network prefixes using the source mask. ARP resolves the selected local next-hop IP.</p><p>The IP destination stays the final destination; the Ethernet next-hop address depends on whether that destination is local.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Determine H’s subnet</h4><p>With /24, H is in 192.168.1.0–192.168.1.255.</p></div><div class=\"step\"><h4>Step 2. Compare the destination</h4><p>192.168.2.20 is outside that block, so use a router.</p></div><div class=\"step\"><h4>Step 3. Select ARP target</h4><p>Resolve 192.168.1.1 using ARP.</p></div><div class=\"step\"><h4>Step 4. Separate packet and frame destinations</h4><p>IP destination remains 192.168.2.20; frame destination is the gateway’s MAC.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> ARP target: 192.168.1.1.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>ARP is a local-link operation. A remote packet is sent to a local router for its next step.</p></aside></div></section>"},{"id":"rarp","title":"RARP: the reverse historical mapping","html":"<p><strong>Definition.</strong> Reverse ARP (RARP) allows a client that knows its hardware address to obtain its IPv4 address from a RARP server.</p><p><strong>Simple meaning.</strong> ARP: IP se MAC. RARP: MAC se IP.</p><h2>Understand it step by step</h2><ol><li>Historically, a diskless machine could know its hardware address but need its configured IP address during boot.</li><li>It broadcasts a RARP request containing its hardware address. A server consults a configured mapping and returns an IP address.</li><li>RARP supplies much less configuration than DHCP and operates at the local link level. It is mainly a historical protocol in this syllabus.</li><li>Do not describe RARP as finding an arbitrary remote host by name; DNS is a different service and outside this M2 portion.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A diskless workstation with a pre-registered hardware address could use RARP to learn its assigned IPv4 address from a local RARP server.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Differentiate ARP and RARP. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Protocol</th><th scope=\"col\">Known</th><th scope=\"col\">Needed</th><th scope=\"col\">Use</th></tr></thead><tbody><tr><td>ARP</td><td>Local next-hop IPv4</td><td>MAC/hardware address</td><td>Local frame delivery</td></tr><tr><td>RARP</td><td>Client hardware address</td><td>Client IPv4</td><td>Historical boot-time assignment</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A diskless workstation with a pre-registered hardware address could use RARP to learn its assigned IPv4 address from a local RARP server.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> RARP reverse karta hai; DHCP configuration badhata hai.</p>"},{"id":"dhcp","title":"DHCP: automatic configuration through DORA","html":"<p><strong>Definition.</strong> Dynamic Host Configuration Protocol (DHCP) provides IP configuration parameters to clients and can lease reusable addresses for limited periods.</p><p><strong>Simple meaning.</strong> DORA = Discover, Offer, Request, Acknowledge.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/dhcp.510e8eca42.svg\" width=\"820\" height=\"470\" alt=\"DHCP initial allocation: DORA\" loading=\"lazy\" decoding=\"async\"></div><figcaption>DHCP: automatic configuration through DORA</figcaption></figure><h2>Understand it step by step</h2><ol><li><strong>Discover:</strong> a new client looks for DHCP servers. With no configured IPv4 address, it commonly starts from 0.0.0.0 and uses broadcast discovery.</li><li><strong>Offer:</strong> a server offers an address and configuration, such as subnet mask, lease information and other options.</li><li><strong>Request:</strong> the client indicates the selected offer and requested address. In initial allocation this also informs other servers of its choice.</li><li><strong>Acknowledge:</strong> the selected server confirms the lease/configuration. The client can then use the address after the required checks.</li><li>DHCPv4 uses UDP server port 67 and client port 68. A DHCP relay can carry requests between a client subnet and a server elsewhere; ordinary routers do not simply forward local broadcasts by default.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>When a laptop joins a campus network, DHCP can supply its address, mask, gateway and DNS-server option. It does not itself resolve website names; it can tell the laptop which DNS server to use.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain the four initial DHCP messages and state its purpose. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><ol><li>DHCPDISCOVER: client searches for a server.</li><li>DHCPOFFER: server proposes an address/configuration.</li><li>DHCPREQUEST: client requests the chosen allocation.</li><li>DHCPACK: server confirms the lease.</li></ol><p>DHCP reduces manual configuration and supports controlled address reuse through leases.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>When a laptop joins a campus network, DHCP can supply its address, mask, gateway and DNS-server option. It does not itself resolve website names; it can tell the laptop which DNS server to use.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Discover–Offer–Request–ACK; pehle D, phir O, phir R, phir A.</p>"}]},{"id":"routing","title":"Routing: build the shortest path one step at a time","scope":"TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023","sections":[{"id":"vocabulary","title":"Routing, forwarding, distance and next hop","html":"<p><strong>Definition.</strong> Routing discovers or computes paths through a network; forwarding uses a table to send an individual packet toward the selected next hop.</p><p><strong>Simple meaning.</strong> Routing table banata hai; forwarding us table ko use karta hai.</p><h2>Understand it step by step</h2><ol><li>A route contains a destination prefix and an outgoing interface or next hop. A metric measures the desirability/cost of that route.</li><li>A path is a sequence of permitted edges. Its weighted cost is the sum of the edge weights, not merely the number of vertices drawn.</li><li>A shortest-path algorithm maintains a tentative distance from the source to each vertex. Start the source at 0 and all others at ∞.</li><li>A predecessor records the vertex just before a destination on the chosen path. Trace predecessors backward, then reverse the list to obtain the path in forward order.</li><li>A next hop is the first router after the source on that path. It is different from a final destination’s immediate predecessor.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>For path A→C→D→G, G’s predecessor is D, but A’s next hop toward G is C.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Differentiate routing and forwarding, with an example. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Routing determines suitable network paths and produces routing/forwarding information. Forwarding applies that information to a particular packet. If A has learned that network X is reached through B, computing that choice is routing and sending a packet to B is forwarding.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>For path A→C→D→G, G’s predecessor is D, but A’s next hop toward G is C.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Predecessor = pichhla node; next hop = source ke baad pehla node.</p>"},{"id":"relaxation","title":"Relaxation: replace an old route only when the candidate is cheaper","html":"<p><strong>Definition.</strong> Relaxing an edge u→v compares the existing distance to v with a candidate path that reaches u first and then crosses the edge to v.</p><p><strong>Simple meaning.</strong> Purana cost versus u tak ka cost + u→v edge. Jo chhota, woh rakho.</p><h2>Understand it step by step</h2><ol><li>Suppose d[u]=4, edge cost w(u,v)=3, and current d[v]=10. The candidate via u is 4+3=7.</li><li>Because 7&lt;10, replace d[v] with 7 and set predecessor[v]=u.</li><li>If the current d[v] were 6, keep 6 because candidate 7 is worse. Equal costs need a stated tie rule; keeping the existing predecessor is valid.</li><li>If u is unreachable (d[u]=∞), it cannot yet provide a finite route to v.</li></ol><div class=\"math-display\"><img src=\"math/96f918d5ce249dc4.svg\" alt=\"d[v]\\leftarrow\\min\\bigl(d[v],d[u]+w(u,v)\\bigr)\" style=\"width:30.704ex;height:2.713ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>Current route to D costs 10. A newly discovered route reaches C for 4 and C→D costs 3, so D improves to 7 via C.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. What does edge relaxation mean in a shortest-path algorithm? <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Relaxation evaluates candidate=d[u]+w(u,v). If the candidate is less than d[v], it updates d[v] and records u as predecessor. Otherwise the existing route is retained.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Current route to D costs 10. A newly discovered route reaches C for 4 and C→D costs 3, so D improves to 7 via C.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Add path + edge, compare, then replace only if smaller.</p>"},{"id":"relax-1","title":"One edge relaxation · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For edge U→V, d[U]=4, edge cost=3, and current d[V]=10. Relax this edge and state the new distance and whether the predecessor changes. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>d[U]=4; w(U,V)=3; old d[V]=10.</p><h2>To find</h2><p>New d[V] and predecessor action.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/e662a1e6810b8636.svg\" alt=\"c=d[U]+w(U,V),\\quad d[V]_{\\mathrm{new}}=\\min(d[V]_{\\mathrm{old}},c)\" style=\"width:46.209ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>The candidate contains both the cost to U and the final edge to V.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Compute candidate</h4><p>4+(3)=7.</p></div><div class=\"step\"><h4>Step 2. Compare with old distance</h4><p>min(10,7)=7.</p></div><div class=\"step\"><h4>Step 3. Update the predecessor if improved</h4><p>Set predecessor[V]=U.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> New d[V]=7.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A negative edge weight is allowed in Bellman–Ford exercises, but not in the standard Dijkstra method taught here.</p></aside></div></section>"},{"id":"relax-2","title":"One edge relaxation · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For edge U→V, d[U]=5, edge cost=4, and current d[V]=7. Relax this edge and state the new distance and whether the predecessor changes. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>d[U]=5; w(U,V)=4; old d[V]=7.</p><h2>To find</h2><p>New d[V] and predecessor action.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/e662a1e6810b8636.svg\" alt=\"c=d[U]+w(U,V),\\quad d[V]_{\\mathrm{new}}=\\min(d[V]_{\\mathrm{old}},c)\" style=\"width:46.209ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>The candidate contains both the cost to U and the final edge to V.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Compute candidate</h4><p>5+(4)=9.</p></div><div class=\"step\"><h4>Step 2. Compare with old distance</h4><p>min(7,9)=7.</p></div><div class=\"step\"><h4>Step 3. Update the predecessor if improved</h4><p>Keep the existing predecessor; the candidate does not improve the route.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> New d[V]=7.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A negative edge weight is allowed in Bellman–Ford exercises, but not in the standard Dijkstra method taught here.</p></aside></div></section>"},{"id":"relax-3","title":"One edge relaxation · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. For edge U→V, d[U]=6, edge cost=-2, and current d[V]=9. Relax this edge and state the new distance and whether the predecessor changes. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>d[U]=6; w(U,V)=-2; old d[V]=9.</p><h2>To find</h2><p>New d[V] and predecessor action.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/e662a1e6810b8636.svg\" alt=\"c=d[U]+w(U,V),\\quad d[V]_{\\mathrm{new}}=\\min(d[V]_{\\mathrm{old}},c)\" style=\"width:46.209ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>The candidate contains both the cost to U and the final edge to V.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Compute candidate</h4><p>6+(-2)=4.</p></div><div class=\"step\"><h4>Step 2. Compare with old distance</h4><p>min(9,4)=4.</p></div><div class=\"step\"><h4>Step 3. Update the predecessor if improved</h4><p>Set predecessor[V]=U.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> New d[V]=4.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A negative edge weight is allowed in Bellman–Ford exercises, but not in the standard Dijkstra method taught here.</p></aside></div></section>"},{"id":"dijkstra","title":"Dijkstra: settle the closest unfinished vertex","html":"<p><strong>Definition.</strong> Dijkstra’s algorithm finds shortest paths from a source in a graph whose edge weights are nonnegative.</p><p><strong>Simple meaning.</strong> Sabse chhota unfinished distance select karo, phir uske neighbours improve karo.</p><h2>Understand it step by step</h2><ol><li>Initialize source distance 0, all others ∞, and no predecessors. No vertex is settled initially.</li><li>Select an unsettled vertex with minimum tentative distance. With nonnegative edges, its distance can now be finalized.</li><li>Relax each relevant outgoing edge: compare old distance with selected distance plus edge cost.</li><li>Repeat selection and relaxation. If all remaining distances are ∞, the remaining vertices are unreachable from the source.</li><li>Trace predecessors for the required destination. Always preserve arrow direction. Standard Dijkstra is not valid for graphs with negative edge costs.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>If tentative distances are B=4, C=2 and D=∞, settle C next. You choose using total source-to-vertex cost 2, not the smallest individual edge anywhere in the graph.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Describe Dijkstra’s shortest-path algorithm and its restriction. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><ol><li>Set source to 0 and other distances to infinity.</li><li>Repeatedly choose the unsettled vertex with minimum tentative distance.</li><li>Settle it and relax its outgoing edges.</li><li>Recover paths using predecessors.</li></ol><p>The standard algorithm requires nonnegative edge weights.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>If tentative distances are B=4, C=2 and D=∞, settle C next. You choose using total source-to-vertex cost 2, not the smallest individual edge anywhere in the graph.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Minimum tentative total choose; negative edges pe Dijkstra nahi.</p>"},{"id":"dijkstra-1","title":"Dijkstra · complete example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Use Dijkstra’s algorithm to find the shortest path from A to D in the directed graph defined below. Show every selection, relaxation and distance table. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Cost</th></tr></thead><tbody><tr><td>A→B</td><td>4</td></tr><tr><td>A→C</td><td>2</td></tr><tr><td>C→B</td><td>1</td></tr><tr><td>B→D</td><td>3</td></tr><tr><td>C→D</td><td>7</td></tr></tbody></table><p>Source=A; target=D. Edges are directed; do not add reverse edges.</p><h2>To find</h2><p>The path A to D, its total cost and intermediate work.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/dijkstra-1.973d01595e.svg\" width=\"482.00\" height=\"228.00\" alt=\"Dijkstra · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>d[A]=0; every other distance=∞. No predecessors are known.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Tentative</td></tr><tr><td>B</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>C</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Settle A at distance 0</h4><p>Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(4)=4</td><td>Improve to 4; predecessor=A</td></tr><tr><td>A→C</td><td>∞</td><td>0+(2)=2</td><td>Improve to 2; predecessor=A</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>4</td><td>A</td><td>Tentative</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Settle C at distance 2</h4><p>Unsettled candidates before selection: B=4, C=2, D=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>C→B</td><td>4</td><td>2+(1)=3</td><td>Improve to 3; predecessor=C</td></tr><tr><td>C→D</td><td>∞</td><td>2+(7)=9</td><td>Improve to 9; predecessor=C</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>C</td><td>Tentative</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>9</td><td>C</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Settle B at distance 3</h4><p>Unsettled candidates before selection: B=3, D=9. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>B→D</td><td>9</td><td>3+(3)=6</td><td>Improve to 6; predecessor=B</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>C</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>6</td><td>B</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Settle D at distance 6</h4><p>Unsettled candidates before selection: D=6. Select the minimum; ties use alphabetical order.</p><p>No outgoing edges to relax.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>C</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>6</td><td>B</td><td>Settled</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Recover the path</h4><p>Trace backwards: D ← B ← C ← A. Reverse it: A → C → B → D.</p><p>Edge sum: 2 + 1 + 3 = 6.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A → C → B → D; cost=6.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.</p></aside></div></section>"},{"id":"dijkstra-2","title":"Dijkstra · complete example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Use Dijkstra’s algorithm to find the shortest path from A to E in the undirected graph defined below. Show every selection, relaxation and distance table. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Cost</th></tr></thead><tbody><tr><td>A—B</td><td>2</td></tr><tr><td>A—C</td><td>5</td></tr><tr><td>B—C</td><td>1</td></tr><tr><td>B—D</td><td>4</td></tr><tr><td>C—D</td><td>1</td></tr><tr><td>D—E</td><td>3</td></tr><tr><td>C—E</td><td>8</td></tr></tbody></table><p>Source=A; target=E. Each edge can be traversed in either direction.</p><h2>To find</h2><p>The path A to E, its total cost and intermediate work.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/dijkstra-2.170b001531.svg\" width=\"608.00\" height=\"234.00\" alt=\"Dijkstra · given undirected graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>d[A]=0; every other distance=∞. No predecessors are known.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Tentative</td></tr><tr><td>B</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>C</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Settle A at distance 0</h4><p>Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞, E=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(2)=2</td><td>Improve to 2; predecessor=A</td></tr><tr><td>A→C</td><td>∞</td><td>0+(5)=5</td><td>Improve to 5; predecessor=A</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>2</td><td>A</td><td>Tentative</td></tr><tr><td>C</td><td>5</td><td>A</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Settle B at distance 2</h4><p>Unsettled candidates before selection: B=2, C=5, D=∞, E=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>B→C</td><td>5</td><td>2+(1)=3</td><td>Improve to 3; predecessor=B</td></tr><tr><td>B→D</td><td>∞</td><td>2+(4)=6</td><td>Improve to 6; predecessor=B</td></tr><tr><td>B→A</td><td>0</td><td>2+(2)=4</td><td>Already settled; retain</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>3</td><td>B</td><td>Tentative</td></tr><tr><td>D</td><td>6</td><td>B</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Settle C at distance 3</h4><p>Unsettled candidates before selection: C=3, D=6, E=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>C→D</td><td>6</td><td>3+(1)=4</td><td>Improve to 4; predecessor=C</td></tr><tr><td>C→E</td><td>∞</td><td>3+(8)=11</td><td>Improve to 11; predecessor=C</td></tr><tr><td>C→A</td><td>0</td><td>3+(5)=8</td><td>Already settled; retain</td></tr><tr><td>C→B</td><td>2</td><td>3+(1)=4</td><td>Already settled; retain</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>3</td><td>B</td><td>Settled</td></tr><tr><td>D</td><td>4</td><td>C</td><td>Tentative</td></tr><tr><td>E</td><td>11</td><td>C</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Settle D at distance 4</h4><p>Unsettled candidates before selection: D=4, E=11. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>D→E</td><td>11</td><td>4+(3)=7</td><td>Improve to 7; predecessor=D</td></tr><tr><td>D→B</td><td>2</td><td>4+(4)=8</td><td>Already settled; retain</td></tr><tr><td>D→C</td><td>3</td><td>4+(1)=5</td><td>Already settled; retain</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>3</td><td>B</td><td>Settled</td></tr><tr><td>D</td><td>4</td><td>C</td><td>Settled</td></tr><tr><td>E</td><td>7</td><td>D</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Settle E at distance 7</h4><p>Unsettled candidates before selection: E=7. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>E→D</td><td>4</td><td>7+(3)=10</td><td>Already settled; retain</td></tr><tr><td>E→C</td><td>3</td><td>7+(8)=15</td><td>Already settled; retain</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>3</td><td>B</td><td>Settled</td></tr><tr><td>D</td><td>4</td><td>C</td><td>Settled</td></tr><tr><td>E</td><td>7</td><td>D</td><td>Settled</td></tr></tbody></table></div><div class=\"step\"><h4>Step 7. Recover the path</h4><p>Trace backwards: E ← D ← C ← B ← A. Reverse it: A → B → C → D → E.</p><p>Edge sum: 2 + 1 + 1 + 3 = 7.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A → B → C → D → E; cost=7.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.</p></aside></div></section>"},{"id":"dijkstra-3","title":"Dijkstra · complete example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Use Dijkstra’s algorithm to find the shortest path from A to E in the directed graph defined below. Show every selection, relaxation and distance table. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Cost</th></tr></thead><tbody><tr><td>A→B</td><td>3</td></tr><tr><td>A→C</td><td>3</td></tr><tr><td>B→D</td><td>2</td></tr><tr><td>C→D</td><td>2</td></tr></tbody></table><p>Source=A; target=E. Edges are directed; do not add reverse edges.</p><h2>To find</h2><p>The path A to E, its total cost and intermediate work.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/dijkstra-3.312b4c0fd9.svg\" width=\"356.00\" height=\"293.00\" alt=\"Dijkstra · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>d[A]=0; every other distance=∞. No predecessors are known.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Tentative</td></tr><tr><td>B</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>C</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Settle A at distance 0</h4><p>Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞, E=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(3)=3</td><td>Improve to 3; predecessor=A</td></tr><tr><td>A→C</td><td>∞</td><td>0+(3)=3</td><td>Improve to 3; predecessor=A</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>A</td><td>Tentative</td></tr><tr><td>C</td><td>3</td><td>A</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Settle B at distance 3</h4><p>Unsettled candidates before selection: B=3, C=3, D=∞, E=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>B→D</td><td>∞</td><td>3+(2)=5</td><td>Improve to 5; predecessor=B</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>3</td><td>A</td><td>Tentative</td></tr><tr><td>D</td><td>5</td><td>B</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Settle C at distance 3</h4><p>Unsettled candidates before selection: C=3, D=5, E=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>C→D</td><td>5</td><td>3+(2)=5</td><td>Retain 5 (equal cost)</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>3</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>5</td><td>B</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Settle D at distance 5</h4><p>Unsettled candidates before selection: D=5, E=∞. Select the minimum; ties use alphabetical order.</p><p>No outgoing edges to relax.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>3</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>5</td><td>B</td><td>Settled</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Stop at unreachable vertices</h4><p>Every remaining tentative distance is ∞. No path from the source reaches these vertices.</p></div><div class=\"step\"><h4>Step 7. Recover the path</h4><p>There is no finite path to recover.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> E is unreachable from A.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.</p></aside></div></section>"},{"id":"bellman","title":"Bellman–Ford: repeat relaxation across all edges","html":"<p><strong>Definition.</strong> Bellman–Ford computes single-source shortest paths by repeatedly relaxing every edge. It supports negative edge weights and detects reachable negative cycles.</p><p><strong>Simple meaning.</strong> Har edge ko baar-baar relax; negative edge chalega, negative cycle problem hai.</p><h2>Understand it step by step</h2><ol><li>Initialize source 0 and all other distances ∞.</li><li>Relax every directed edge, in a stated order, for at most V−1 full passes, where V is the number of vertices. A shortest simple path uses at most V−1 edges when no relevant negative cycle exists.</li><li>In the in-place convention used here, an update is immediately available to later edges in the same pass. Different edge orders can therefore produce different intermediate tables while converging to the same valid final distances.</li><li>If a full pass makes no change, all distances have stabilized and the algorithm may stop early.</li><li>A further improvement on a reachable edge after V−1 passes signals a reachable negative cycle. Destinations reachable from such a cycle need not have a finite shortest distance.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A→B=4 and B→C=−2 can give A→C cost 2. A negative edge is not itself a negative cycle; a cycle requires a route returning to an earlier vertex.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain Bellman–Ford and how it differs from Dijkstra. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Bellman–Ford repeatedly relaxes all edges and can handle negative weights. It uses up to V−1 passes and an additional improvement check for reachable negative cycles. Dijkstra settles the smallest tentative vertex and requires nonnegative weights for its standard correctness guarantee.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A→B=4 and B→C=−2 can give A→C cost 2. A negative edge is not itself a negative cycle; a cycle requires a route returning to an earlier vertex.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Pass = all edges once. Negative edge ≠ negative cycle.</p>"},{"id":"bellman-1","title":"Bellman–Ford · complete example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Apply Bellman–Ford from A to D in the directed graph below. Show every edge relaxation in each pass, and state whether a finite shortest path exists. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Directed edge</th><th scope=\"col\">Weight</th></tr></thead><tbody><tr><td>A→B</td><td>4</td></tr><tr><td>A→C</td><td>5</td></tr><tr><td>B→C</td><td>-2</td></tr><tr><td>C→D</td><td>3</td></tr></tbody></table><h2>To find</h2><p>The shortest route and cost, with complete passes and a negative-cycle check.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Bellman–Ford permits negative edges. We use the listed order with in-place updates; do not mix this with a table that reads only the previous pass.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/bellman-1.1bf4232fcf.svg\" width=\"489.00\" height=\"194.00\" alt=\"Bellman–Ford · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>4 vertices → at most 3 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.</p></div><div class=\"step\"><h4>Step 2. Pass 1: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(4)=4</td><td>4</td><td>Update; predecessor=A</td></tr><tr><td>A→C</td><td>∞</td><td>0+(5)=5</td><td>5</td><td>Update; predecessor=A</td></tr><tr><td>B→C</td><td>5</td><td>4+(-2)=2</td><td>2</td><td>Update; predecessor=B</td></tr><tr><td>C→D</td><td>∞</td><td>2+(3)=5</td><td>5</td><td>Update; predecessor=C</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>4</td><td>2</td><td>5</td></tr><tr><td>Predecessor</td><td>—</td><td>A</td><td>B</td><td>C</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Pass 2: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>4</td><td>0+(4)=4</td><td>4</td><td>No improvement</td></tr><tr><td>A→C</td><td>2</td><td>0+(5)=5</td><td>2</td><td>No improvement</td></tr><tr><td>B→C</td><td>2</td><td>4+(-2)=2</td><td>2</td><td>No improvement</td></tr><tr><td>C→D</td><td>5</td><td>2+(3)=5</td><td>5</td><td>No improvement</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>4</td><td>2</td><td>5</td></tr><tr><td>Predecessor</td><td>—</td><td>A</td><td>B</td><td>C</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Stop after an unchanged pass</h4><p>This entire pass changed no distance. Further identical relaxation passes will not improve anything.</p></div><div class=\"step\"><h4>Step 5. Recover and total the path</h4><p>Backward predecessors: D ← C ← B ← A. Forward route: A → B → C → D.</p><p>Cost = (4) + (-2) + (3) = 5. No edge can now improve its destination label.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A → B → C → D; shortest cost=5.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Negative weights are a general graph-exercise feature. RIP hop counts and OSPF link costs are not negative in the ordinary routing protocols studied here.</p></aside></div></section>"},{"id":"bellman-2","title":"Bellman–Ford · complete example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Apply Bellman–Ford from A to D in the directed graph below. Show every edge relaxation in each pass, and state whether a finite shortest path exists. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Directed edge</th><th scope=\"col\">Weight</th></tr></thead><tbody><tr><td>C→D</td><td>2</td></tr><tr><td>B→C</td><td>1</td></tr><tr><td>A→B</td><td>3</td></tr><tr><td>A→D</td><td>12</td></tr></tbody></table><h2>To find</h2><p>The shortest route and cost, with complete passes and a negative-cycle check.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Bellman–Ford permits negative edges. We use the listed order with in-place updates; do not mix this with a table that reads only the previous pass.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/bellman-2.9bfc43d501.svg\" width=\"493.00\" height=\"201.00\" alt=\"Bellman–Ford · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>4 vertices → at most 3 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.</p></div><div class=\"step\"><h4>Step 2. Pass 1: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>C→D</td><td>∞</td><td>∞+(2)=∞</td><td>∞</td><td>No improvement</td></tr><tr><td>B→C</td><td>∞</td><td>∞+(1)=∞</td><td>∞</td><td>No improvement</td></tr><tr><td>A→B</td><td>∞</td><td>0+(3)=3</td><td>3</td><td>Update; predecessor=A</td></tr><tr><td>A→D</td><td>∞</td><td>0+(12)=12</td><td>12</td><td>Update; predecessor=A</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>3</td><td>∞</td><td>12</td></tr><tr><td>Predecessor</td><td>—</td><td>A</td><td>—</td><td>A</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Pass 2: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>C→D</td><td>12</td><td>∞+(2)=∞</td><td>12</td><td>No improvement</td></tr><tr><td>B→C</td><td>∞</td><td>3+(1)=4</td><td>4</td><td>Update; predecessor=B</td></tr><tr><td>A→B</td><td>3</td><td>0+(3)=3</td><td>3</td><td>No improvement</td></tr><tr><td>A→D</td><td>12</td><td>0+(12)=12</td><td>12</td><td>No improvement</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>3</td><td>4</td><td>12</td></tr><tr><td>Predecessor</td><td>—</td><td>A</td><td>B</td><td>A</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Pass 3: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>C→D</td><td>12</td><td>4+(2)=6</td><td>6</td><td>Update; predecessor=C</td></tr><tr><td>B→C</td><td>4</td><td>3+(1)=4</td><td>4</td><td>No improvement</td></tr><tr><td>A→B</td><td>3</td><td>0+(3)=3</td><td>3</td><td>No improvement</td></tr><tr><td>A→D</td><td>6</td><td>0+(12)=12</td><td>6</td><td>No improvement</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>3</td><td>4</td><td>6</td></tr><tr><td>Predecessor</td><td>—</td><td>A</td><td>B</td><td>C</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Recover and total the path</h4><p>Backward predecessors: D ← C ← B ← A. Forward route: A → B → C → D.</p><p>Cost = (3) + (1) + (2) = 6. No edge can now improve its destination label.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A → B → C → D; shortest cost=6.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Negative weights are a general graph-exercise feature. RIP hop counts and OSPF link costs are not negative in the ordinary routing protocols studied here.</p></aside></div></section>"},{"id":"bellman-3","title":"Bellman–Ford · negative-cycle example","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Apply Bellman–Ford from A to C in the directed graph below. Show every edge relaxation in each pass, and state whether a finite shortest path exists. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Directed edge</th><th scope=\"col\">Weight</th></tr></thead><tbody><tr><td>A→B</td><td>1</td></tr><tr><td>B→C</td><td>-2</td></tr><tr><td>C→B</td><td>-1</td></tr></tbody></table><h2>To find</h2><p>The shortest route and cost, with complete passes and a negative-cycle check.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Bellman–Ford permits negative edges. We use the listed order with in-place updates; do not mix this with a table that reads only the previous pass.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/bellman-3.b876d89f79.svg\" width=\"407.00\" height=\"153.00\" alt=\"Bellman–Ford · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>3 vertices → at most 2 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.</p></div><div class=\"step\"><h4>Step 2. Pass 1: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(1)=1</td><td>1</td><td>Update; predecessor=A</td></tr><tr><td>B→C</td><td>∞</td><td>1+(-2)=-1</td><td>-1</td><td>Update; predecessor=B</td></tr><tr><td>C→B</td><td>1</td><td>-1+(-1)=-2</td><td>-2</td><td>Update; predecessor=C</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>-2</td><td>-1</td></tr><tr><td>Predecessor</td><td>—</td><td>C</td><td>B</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Pass 2: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>-2</td><td>0+(1)=1</td><td>-2</td><td>No improvement</td></tr><tr><td>B→C</td><td>-1</td><td>-2+(-2)=-4</td><td>-4</td><td>Update; predecessor=B</td></tr><tr><td>C→B</td><td>-2</td><td>-4+(-1)=-5</td><td>-5</td><td>Update; predecessor=C</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>-5</td><td>-4</td></tr><tr><td>Predecessor</td><td>—</td><td>C</td><td>B</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Detect a reachable negative cycle</h4><p>After the allowed main passes, an edge still improves:</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Candidate</th><th scope=\"col\">Current distance</th></tr></thead><tbody><tr><td>B→C</td><td>-7</td><td>-4</td></tr></tbody></table><p>A reachable negative cycle exists. Do not present the changing distance labels as finite shortest-path answers.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A reachable negative cycle prevents a finite shortest distance for vertices reachable from that cycle.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Negative weights are a general graph-exercise feature. RIP hop counts and OSPF link costs are not negative in the ordinary routing protocols studied here.</p></aside></div></section>"}]},{"id":"protocols","title":"Distance vector, RIP, link state and OSPF","scope":"TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023","sections":[{"id":"distance-vector","title":"Distance-vector routing: learn costs through neighbours","html":"<p><strong>Definition.</strong> Distance-vector routing represents each destination by an estimated distance and next hop, updating those estimates using neighbouring routers’ advertised distances.</p><p><strong>Simple meaning.</strong> Neighbour ke destination-cost mein apna neighbour-link cost add karo.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/distance-vector.8f3c90bc87.svg\" width=\"820\" height=\"360\" alt=\"Distance vector: add your local cost to the advertisement\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Distance-vector routing: learn costs through neighbours</figcaption></figure><h2>Understand it step by step</h2><ol><li>Router x knows the cost c(x,v) of reaching each neighbour v. A neighbour advertises Dᵥ(y), its own estimated distance to destination y.</li><li>The route to y through v costs c(x,v)+Dᵥ(y). Compare candidates from neighbours and choose the minimum permitted route.</li><li>The update is the distributed Bellman–Ford idea. Ordinary distance-vector exchanges do not send the full network topology map.</li><li>After changes, routers may temporarily hold inconsistent information. Routing loops and count-to-infinity are possible; mitigation depends on the protocol.</li></ol><div class=\"math-display\"><img src=\"math/16a3dc8e6e4edd60.svg\" alt=\"\\text{candidate via neighbour}=\\text{link cost}+\\text{advertised distance}\" style=\"width:56.181ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>If B is one unit away and advertises destination Z at cost 4, the candidate through B is 1+4=5. If C is two units away and advertises cost 2, candidate via C is 2+2=4, so C is better.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain the distance-vector update rule. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><div class=\"math-display\"><img src=\"math/9703c520036a4b0a.svg\" alt=\"D_x(y)=\\min_{v\\in N(x)}\\{c(x,v)+D_v(y)\\}\" style=\"width:31.156ex;height:3.901ex\" loading=\"lazy\" decoding=\"async\"></div><p>For each neighbour v, add the local link cost to that neighbour’s advertised destination cost. Select the minimum and record that neighbour as next hop. N(x) denotes the neighbours of x.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>If B is one unit away and advertises destination Z at cost 4, the candidate through B is 1+4=5. If C is two units away and advertises cost 2, candidate via C is 2+2=4, so C is better.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Neighbour ka distance + neighbour tak apna distance.</p>"},{"id":"dv-1","title":"Distance-vector update · example 1","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Router X receives the following advertised distances to destination Z. Find each candidate route cost and the best next hop. Retain all equal minimum candidates in the answer. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Neighbour</th><th scope=\"col\">X-to-neighbour cost</th><th scope=\"col\">Advertised distance to Z</th></tr></thead><tbody><tr><td>B</td><td>1</td><td>4</td></tr><tr><td>C</td><td>2</td><td>2</td></tr><tr><td>D</td><td>3</td><td>5</td></tr></tbody></table><h2>To find</h2><p>Candidates and the minimum total route cost.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/2bb516a29dc6ed94.svg\" alt=\"C_v=c(X,v)+D_v(Z)\" style=\"width:21.368ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>The advertisement starts from the neighbour, so the local link to that neighbour must be added.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Compute every candidate</h4><table><thead><tr><th scope=\"col\">Via</th><th scope=\"col\">Addition</th><th scope=\"col\">Total</th></tr></thead><tbody><tr><td>B</td><td>1+4</td><td>5</td></tr><tr><td>C</td><td>2+2</td><td>4</td></tr><tr><td>D</td><td>3+5</td><td>8</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Select the minimum</h4><p>min(5, 4, 8)=4.</p></div><div class=\"step\"><h4>Step 3. Read all tied next hops</h4><p>C is the minimum-cost neighbour.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Cost=4; best next hop(s): C.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Do not choose solely by the neighbour’s advertised distance; the link to that neighbour also costs something.</p></aside></div></section>"},{"id":"dv-2","title":"Distance-vector update · example 2","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Router X receives the following advertised distances to destination Z. Find each candidate route cost and the best next hop. Retain all equal minimum candidates in the answer. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Neighbour</th><th scope=\"col\">X-to-neighbour cost</th><th scope=\"col\">Advertised distance to Z</th></tr></thead><tbody><tr><td>B</td><td>2</td><td>1</td></tr><tr><td>C</td><td>1</td><td>4</td></tr><tr><td>D</td><td>5</td><td>0</td></tr></tbody></table><h2>To find</h2><p>Candidates and the minimum total route cost.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/2bb516a29dc6ed94.svg\" alt=\"C_v=c(X,v)+D_v(Z)\" style=\"width:21.368ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>The advertisement starts from the neighbour, so the local link to that neighbour must be added.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Compute every candidate</h4><table><thead><tr><th scope=\"col\">Via</th><th scope=\"col\">Addition</th><th scope=\"col\">Total</th></tr></thead><tbody><tr><td>B</td><td>2+1</td><td>3</td></tr><tr><td>C</td><td>1+4</td><td>5</td></tr><tr><td>D</td><td>5+0</td><td>5</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Select the minimum</h4><p>min(3, 5, 5)=3.</p></div><div class=\"step\"><h4>Step 3. Read all tied next hops</h4><p>B is the minimum-cost neighbour.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Cost=3; best next hop(s): B.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Do not choose solely by the neighbour’s advertised distance; the link to that neighbour also costs something.</p></aside></div></section>"},{"id":"dv-3","title":"Distance-vector update · example 3","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Router X receives the following advertised distances to destination Z. Find each candidate route cost and the best next hop. Retain all equal minimum candidates in the answer. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Neighbour</th><th scope=\"col\">X-to-neighbour cost</th><th scope=\"col\">Advertised distance to Z</th></tr></thead><tbody><tr><td>B</td><td>3</td><td>2</td></tr><tr><td>C</td><td>2</td><td>3</td></tr><tr><td>D</td><td>4</td><td>4</td></tr></tbody></table><h2>To find</h2><p>Candidates and the minimum total route cost.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/2bb516a29dc6ed94.svg\" alt=\"C_v=c(X,v)+D_v(Z)\" style=\"width:21.368ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>The advertisement starts from the neighbour, so the local link to that neighbour must be added.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Compute every candidate</h4><table><thead><tr><th scope=\"col\">Via</th><th scope=\"col\">Addition</th><th scope=\"col\">Total</th></tr></thead><tbody><tr><td>B</td><td>3+2</td><td>5</td></tr><tr><td>C</td><td>2+3</td><td>5</td></tr><tr><td>D</td><td>4+4</td><td>8</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Select the minimum</h4><p>min(5, 5, 8)=5.</p></div><div class=\"step\"><h4>Step 3. Read all tied next hops</h4><p>B, C are tied; a protocol may use a defined tie rule or equal-cost multipath.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Cost=5; best next hop(s): B, C.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Do not choose solely by the neighbour’s advertised distance; the link to that neighbour also costs something.</p></aside></div></section>"},{"id":"rip","title":"RIP: hop counts, updates and the value 16","html":"<p><strong>Definition.</strong> Routing Information Protocol (RIP) is an interior distance-vector routing protocol that uses a bounded metric, commonly hop count, to select routes.</p><p><strong>Simple meaning.</strong> RIP mein hops count; 15 tak reachable, 16 means unreachable.</p><h2>Understand it step by step</h2><ol><li>RIPv2 uses distance-vector updates and carries subnet-mask information, allowing classless routes.</li><li>The usual hop-count metric admits costs 1–15 for reachable routes; 16 denotes infinity/unreachable. A received advertisement is incremented by the local link cost and capped at 16.</li><li>RIPv2 normally sends periodic updates about every 30 seconds, with implementation/timer behavior and triggered updates affecting the exact timing. RIPv2 uses UDP port 520 and can send updates to multicast 224.0.0.9.</li><li>Hop count does not directly measure bandwidth or delay, so a low-hop route is not always the fastest link path. The 15-hop limit restricts scale.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>If a neighbour advertises a destination at 15 hops and your added cost is 1, the resulting 16 means unreachable, not a valid 16-hop route.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. State the routing method, metric and main limitations of RIP. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>RIP uses distance-vector routing and commonly hop count as its metric. Reachable metrics are at most 15; 16 represents infinity. Its main limitations include limited diameter, a coarse metric and relatively slow convergence with possible temporary loops.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>If a neighbour advertises a destination at 15 hops and your added cost is 1, the resulting 16 means unreachable, not a valid 16-hop route.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> RIP: neighbour distances; 16 is infinity.</p>"},{"id":"loops","title":"Count-to-infinity and loop-mitigation methods","html":"<p><strong>Definition.</strong> Count-to-infinity is a distance-vector failure in which routers repeatedly increase their estimates for an unreachable destination because they believe one another’s stale route advertisements.</p><p><strong>Simple meaning.</strong> Dono neighbour ek dusre ko bol rahe: mere through jao—par actual route gaya.</p><h2>Understand it step by step</h2><ol><li>Before failure, B reaches a destination through A. After A loses the route, B may still advertise an old finite distance.</li><li>Without sufficient protection, A may infer a new route through B even though B’s route depended on A. This creates a loop and rising metrics.</li><li><strong>Split horizon:</strong> do not advertise a learned route back on the interface from which it was learned.</li><li><strong>Poison reverse:</strong> advertise that reverse direction with an unreachable metric. <strong>Route poisoning:</strong> mark a failed destination unreachable. Triggered updates spread changes sooner.</li><li>These methods reduce common failure modes but do not constitute a universal proof that every multi-router loop is impossible.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>In RIP, a poisoned route is sent with metric 16. Receiving routers treat it as unreachable rather than a new usable longer route.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain split horizon and poison reverse. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Split horizon suppresses advertising a route back in the direction from which it was learned. Poison reverse explicitly advertises that route back with an infinite/unreachable metric. Both reduce two-router distance-vector loops caused by stale information.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>In RIP, a poisoned route is sent with metric 16. Receiving routers treat it as unreachable rather than a new usable longer route.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Split: wapas mat bolo. Poison reverse: wapas bolo, par unreachable.</p>"},{"id":"link-state","title":"Link-state routing: share a map, calculate locally","html":"<p><strong>Definition.</strong> Link-state routing distributes information about routers’ local links so that routers can build a topology database and compute shortest paths independently.</p><p><strong>Simple meaning.</strong> Distance vector mein neighbour ka answer; link state mein topology map.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/link-state.bbee3173ec.svg\" width=\"820\" height=\"540\" alt=\"Link-state routing: from local links to a shortest-path tree\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Link-state routing: share a map, calculate locally</figcaption></figure><h2>Understand it step by step</h2><ol><li>Discover neighbours and determine local link costs.</li><li>Create link-state information and flood it through the appropriate routing scope. Sequence/age mechanisms keep newer information identifiable.</li><li>Routers in the same area build a consistent link-state database after convergence.</li><li>Each router runs a shortest-path computation, commonly Dijkstra, rooted at itself and installs resulting routes.</li><li>Compared with basic distance vector, this needs more topology storage and computation but provides a detailed basis for routing and usually supports faster convergence in well-designed networks.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Routers A and B can share the same topology database while calculating different next hops because their shortest-path trees have different roots.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain the steps of link-state routing. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><ol><li>Discover neighbours and link costs.</li><li>Generate and flood link-state information.</li><li>Maintain a topology database.</li><li>Run a shortest-path algorithm from the local router.</li><li>Install next hops and update after changes.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Routers A and B can share the same topology database while calculating different next hops because their shortest-path trees have different roots.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Same map, different root, different tree.</p>"},{"id":"ospf","title":"OSPF: link-state shortest paths within an autonomous system","html":"<p><strong>Definition.</strong> Open Shortest Path First (OSPF) is an interior link-state routing protocol that selects routes using shortest-path calculations and additive link costs.</p><p><strong>Simple meaning.</strong> OSPF = link-state map + Dijkstra + summed costs.</p><h2>Understand it step by step</h2><ol><li>Routers discover and maintain neighbour relationships using Hello packets and exchange link-state information.</li><li>Routers calculate shortest paths from their own position in the topology. A path cost is the sum of its outgoing-link costs, not necessarily the fewest hops.</li><li>The network can be divided into areas. In normal OSPF hierarchy, Area 0 is the backbone used to interconnect other areas via area border routers.</li><li>OSPFv2 is the IPv4 protocol in the supplied paper; it is carried directly in IP protocol number 89, not TCP/UDP port 89.</li><li>A common vendor default derives interface cost from reference bandwidth/interface bandwidth, but actual configured costs and reference bandwidth matter. Use the given costs in an exam graph.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Route A→B→D costs 10+10=20 while A→C→D costs 5+8=13. OSPF’s cost comparison prefers the latter even though both have two links.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Summarize how OSPF determines the best route. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>OSPF exchanges and maintains link-state information, builds a topology database and runs Dijkstra’s shortest-path computation rooted at the local router. It chooses a path with the lowest sum of link costs and installs the corresponding next hop. Equal-cost paths may be supported.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Route A→B→D costs 10+10=20 while A→C→D costs 5+8=13. OSPF’s cost comparison prefers the latter even though both have two links.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> OSPF cost add karo; sirf hops nahi.</p>"},{"id":"ospf-packets","title":"The five OSPF packet types","html":"<p><strong>Definition.</strong> OSPFv2 uses five packet types for neighbour maintenance and reliable exchange of link-state database information.</p><p><strong>Simple meaning.</strong> Hello → database summary → request → update → acknowledgement; har packet ka kaam alag.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ospf-packets.6093f0d178.svg\" width=\"820\" height=\"655\" alt=\"OSPFv2: five distinct packet types\" loading=\"lazy\" decoding=\"async\"></div><figcaption>The five OSPF packet types</figcaption></figure><h2>Understand it step by step</h2><ol><li>Hello packets establish/maintain neighbour relationships; they are not the complete topology database.</li><li>Database Description packets list summaries, allowing neighbours to identify differences.</li><li>Link State Request asks for required LSAs; Link State Update transports LSAs. An LSU packet may contain more than one LSA.</li><li>Link State Acknowledgment acknowledges LSAs. An LSA is a topology-information item, not a sixth OSPF packet type.</li></ol><table><thead><tr><th scope=\"col\">Packet type</th><th scope=\"col\">What it does</th><th scope=\"col\">Simple example</th></tr></thead><tbody><tr><td>Hello</td><td>Discover/maintain neighbours and exchange relationship parameters</td><td>Are we still neighbours?</td></tr><tr><td>Database Description (DD/DBD)</td><td>Summarize link-state database contents during synchronization</td><td>Here are the LSA headers I have</td></tr><tr><td>Link State Request (LSR)</td><td>Ask for specific missing/newer link-state information</td><td>Please send this LSA</td></tr><tr><td>Link State Update (LSU)</td><td>Carry one or more LSAs</td><td>Here is the requested or newly flooded link-state information</td></tr><tr><td>Link State Acknowledgment (LSAck)</td><td>Acknowledge receipt of LSAs</td><td>I received these LSAs</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A router sees a newer LSA listed in a neighbour’s database summary. It requests that LSA, receives it in an LSU, and acknowledges receipt.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. List and explain the five types of OSPF packets. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Packet type</th><th scope=\"col\">What it does</th><th scope=\"col\">Simple example</th></tr></thead><tbody><tr><td>Hello</td><td>Discover/maintain neighbours and exchange relationship parameters</td><td>Are we still neighbours?</td></tr><tr><td>Database Description (DD/DBD)</td><td>Summarize link-state database contents during synchronization</td><td>Here are the LSA headers I have</td></tr><tr><td>Link State Request (LSR)</td><td>Ask for specific missing/newer link-state information</td><td>Please send this LSA</td></tr><tr><td>Link State Update (LSU)</td><td>Carry one or more LSAs</td><td>Here is the requested or newly flooded link-state information</td></tr><tr><td>Link State Acknowledgment (LSAck)</td><td>Acknowledge receipt of LSAs</td><td>I received these LSAs</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A router sees a newer LSA listed in a neighbour’s database summary. It requests that LSA, receives it in an LSU, and acknowledges receipt.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> H–D–R–U–A: Hello, Description, Request, Update, Ack.</p>"},{"id":"comparison","title":"RIP versus OSPF; Bellman–Ford versus Dijkstra","html":"<p><strong>Definition.</strong> RIP and OSPF are routing protocols; Bellman–Ford and Dijkstra are algorithms underlying different route-computation approaches.</p><p><strong>Simple meaning.</strong> Protocol message bhejta hai; algorithm route calculate karta hai.</p><h2>Understand it step by step</h2><ol><li>RIP uses distance-vector information and a bounded hop metric. OSPF distributes link-state information and computes paths using additive costs.</li><li>A generic Bellman–Ford graph exercise can contain negative weights; RIP’s ordinary hop-count metric does not.</li><li>Dijkstra assumes nonnegative edge weights. Do not select it for the negative-weight re-exam graph simply because the question says “routing”.</li><li>State whether a drawn graph is directed or undirected before solving. Both algorithms can be applied to appropriate directed graphs.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>The December paper explicitly gives positive directed edges and asks for Dijkstra. The February paper includes negative directed edges and asks for Bellman–Ford.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Compare RIP and OSPF on three points. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">RIP</th><th scope=\"col\">OSPF</th></tr></thead><tbody><tr><td>Family</td><td>Distance vector</td><td>Link state</td></tr><tr><td>Typical metric</td><td>Hop count; 16 unreachable</td><td>Sum of configured link costs</td></tr><tr><td>Knowledge exchanged</td><td>Destination distances via neighbours</td><td>Link-state information</td></tr><tr><td>Algorithm connection</td><td>Distributed Bellman–Ford idea</td><td>Dijkstra shortest paths</td></tr><tr><td>Scale design</td><td>Small/simple networks; limited diameter</td><td>Area-based scalable design</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>The December paper explicitly gives positive directed edges and asks for Dijkstra. The February paper includes negative directed edges and asks for Bellman–Ford.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Distance vector → RIP; link state → OSPF.</p>"}]},{"id":"packet-support","title":"IP packet details · supporting practice","scope":"TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023","sections":[{"id":"ipv4-header","title":"IPv4 header fields needed for the IPv6 comparison","html":"<p><strong>Definition.</strong> An IPv4 datagram contains a variable-length header followed by payload. The header supplies addressing, forwarding and fragmentation information.</p><p><strong>Simple meaning.</strong> Header delivery instructions hai; payload actual carried content.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ipv4-header.5d41e2a297.svg\" width=\"820\" height=\"560\" alt=\"IPv4 header · field widths in bits\" loading=\"lazy\" decoding=\"async\"></div><figcaption>IPv4 header fields needed for the IPv6 comparison</figcaption></figure><h2>Understand it step by step</h2><ol><li>Version identifies IPv4. IHL gives header length in 32-bit words; IHL=5 therefore means 20 bytes. Options can enlarge the header up to 60 bytes.</li><li>Total Length includes both the IPv4 header and its payload. Identification, flags and fragment offset support fragmentation/reassembly.</li><li>TTL limits lifetime; Protocol identifies the upper-layer protocol. Header Checksum protects the IPv4 header, not the entire payload.</li><li>Source and destination are 32-bit IPv4 addresses. IPv6 changes their width and reorganizes several of these fields.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>An IPv4 packet with Total Length=1,000 bytes and IHL=5 has a 20-byte header and 980-byte payload.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Distinguish IPv4 Total Length, IHL and Protocol. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Total Length measures the whole IPv4 packet in bytes. IHL measures the header in 32-bit words, so header bytes=4×IHL. Protocol identifies the payload’s upper-layer protocol, such as TCP or UDP.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>An IPv4 packet with Total Length=1,000 bytes and IHL=5 has a 20-byte header and 980-byte payload.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> IHL words ×4 = bytes; total minus header = payload.</p>"}]},{"id":"transport","title":"Unit 5 · Process delivery, UDP, TCP and SCTP","scope":"TEE · Unit 5 · current syllabus 702AI0C023","sections":[{"id":"process","title":"Process-to-process communication, ports and sockets","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain process-to-process communication and transport-layer multiplexing/demultiplexing. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>IP delivers a packet toward a host interface. The transport layer delivers application data to a <strong>process endpoint</strong>, identified using a port. A socket endpoint is commonly described by IP address and port; the protocol also matters. TCP distinguishes connections by source IP/port and destination IP/port.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-ports.f496c69028.svg\" width=\"820\" height=\"515\" alt=\"Transport: from hosts to application processes\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Several applications share IP connectivity; ports separate their transport endpoints.</figcaption></figure><ol><li>At the sender, transport multiplexing accepts data from several application sockets and adds the appropriate header.</li><li>A server normally listens on a known service port; a client commonly chooses a temporary local port.</li><li>At the receiver, demultiplexing uses protocol/header information to deliver data to the appropriate socket.</li><li>A TCP connection is bidirectional and maintains state. Two clients can contact the same server port because their connection tuples differ. UDP demultiplexing is connectionless at the protocol level; applications can still keep their own state.</li></ol><table><thead><tr><th scope=\"col\">Identifier</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>MAC address</td><td>Delivery on a local link</td></tr><tr><td>IP address</td><td>Network-layer interface/addressing</td></tr><tr><td>Port number</td><td>Transport-layer application endpoint</td></tr><tr><td>Domain name</td><td>Application-level naming resolved through DNS</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>Laptop 192.0.2.10:51000 contacts server 198.51.100.20:443. Another browser connection uses local port 51001, so the server can distinguish both TCP connections.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> IP host tak; port process tak.</p>"},{"id":"udp","title":"UDP services, operation and header","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Describe UDP in detail with a labelled header diagram. Explain its services and operation. <span class=\"marks\">[10 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>User Datagram Protocol (UDP)</strong> provides connectionless, message-oriented process delivery. One send creates a datagram; message boundaries are retained. UDP has an <strong>8-byte header</strong>, carries ports and length, and offers checksum-based corruption detection. It does not itself guarantee delivery, ordering, duplicate suppression, retransmission, flow control or congestion control.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-udp.b14cba3c28.svg\" width=\"820\" height=\"289\" alt=\"UDP header: each row contains 32 bits\" loading=\"lazy\" decoding=\"async\"></div><figcaption>UDP fixed header: four 16-bit fields, eight bytes total.</figcaption></figure><table><thead><tr><th scope=\"col\">UDP field</th><th scope=\"col\">Width</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Source port</td><td>16 bits</td><td>Sending endpoint; a zero value can indicate no reply port when unused</td></tr><tr><td>Destination port</td><td>16 bits</td><td>Receiving application endpoint</td></tr><tr><td>Length</td><td>16 bits</td><td>UDP header plus UDP payload; minimum 8 bytes</td></tr><tr><td>Checksum</td><td>16 bits</td><td>Error detection over UDP and an IP pseudo-header; not retransmission</td></tr></tbody></table><h2>Operation and services</h2><ol><li>The application chooses the destination IP/port and supplies a message. UDP adds its header and passes the datagram to IP without a connection handshake.</li><li>The receiving UDP layer validates the length/checksum as applicable and uses the destination endpoint to deliver the datagram.</li><li>A corrupt or undeliverable datagram may be discarded; UDP does not recover it. Any reliability or rate-control policy must come from the application or a protocol above UDP.</li><li>UDP checksum zero can mean checksum omitted in IPv4. IPv6 ordinarily requires the UDP checksum; specialized exceptions are outside this syllabus.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A DNS query often uses UDP because a small request/reply can avoid a transport handshake. DNS also uses TCP, so “DNS always UDP” is incorrect.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> UDP datagram preserve; reliability automatic nahi.</p>"},{"id":"tcp","title":"TCP features and segment structure","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain TCP features and draw its segment header. <span class=\"marks\">[10 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Transmission Control Protocol (TCP)</strong> provides reliable ordered byte-stream communication between two endpoints over an unreliable IP service. It repairs many network losses while the connection remains viable; a failed connection still must be handled by the application.</p><ul><li>Connection-oriented: state is established between endpoints before ordinary data transfer.</li><li>Reliable, ordered <strong>byte stream</strong>: sequence numbers, acknowledgements and retransmission handle loss; application message boundaries are not preserved.</li><li>Full duplex: each direction has its own byte sequence and ACK information.</li><li>Receiver flow control: advertised receive window limits data the receiver can accept.</li><li>Congestion control: the sender also limits sending based on network conditions.</li><li>Checksum detects corruption; ports multiplex connections. Reliability does not equal encryption.</li><li>Segmentation divides stream bytes into transport segments; buffering and retransmission reconstruct the ordered stream.</li></ul><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-tcp.81a8dfb693.svg\" width=\"820\" height=\"569\" alt=\"TCP header: minimum 20 bytes\" loading=\"lazy\" decoding=\"async\"></div><figcaption>TCP base header; optional fields follow the minimum 20 bytes.</figcaption></figure><table><thead><tr><th scope=\"col\">Field</th><th scope=\"col\">Meaning</th></tr></thead><tbody><tr><td>Source/destination ports (16 each)</td><td>Identify process endpoints</td></tr><tr><td>Sequence number (32)</td><td>First data-byte number in this segment; SYN/FIN also occupy sequence space</td></tr><tr><td>Acknowledgement number (32)</td><td>Next sequence number expected when ACK flag is set</td></tr><tr><td>Data offset (4)</td><td>TCP header length in 32-bit words; minimum 5 → 20 bytes</td></tr><tr><td>Flags</td><td>SYN establishes; ACK validates acknowledgement; FIN closes a sending direction; RST aborts; others have defined purposes</td></tr><tr><td>Window (16 base field)</td><td>Advertised receive window; scaling can be negotiated</td></tr><tr><td>Checksum (16)</td><td>Covers TCP header/data and pseudo-header</td></tr><tr><td>Urgent pointer (16)</td><td>Used with URG for the urgent indication</td></tr><tr><td>Options/padding</td><td>Optional features such as MSS; align header to 32-bit words</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>If a file-transfer application writes 100 bytes twice, the peer may read 200 bytes together or in smaller chunks. TCP preserves byte order, not the boundaries of those two writes.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> TCP bytes count karta hai; writes ke borders preserve nahi.</p>"},{"id":"handshake","title":"TCP connection, data and termination","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. What is TCP three-way handshaking? Explain establishment, data transfer and termination with labelled diagrams. <span class=\"marks\">[10 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A TCP connection establishes each endpoint’s initial sequence number and confirms that both can receive. Use client initial sequence x=1000 and server initial sequence y=5000; assume no payload in the handshake.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-handshake.e053246177.svg\" width=\"820\" height=\"873\" alt=\"TCP: handshake, data and orderly close\" loading=\"lazy\" decoding=\"async\"></div><figcaption>SYN and FIN each consume one sequence number; pure ACK consumes none.</figcaption></figure><table><thead><tr><th scope=\"col\">Step</th><th scope=\"col\">Segment</th><th scope=\"col\">Meaning</th></tr></thead><tbody><tr><td>1 Client → server</td><td>SYN, Seq=1000</td><td>Client proposes its starting sequence</td></tr><tr><td>2 Server → client</td><td>SYN+ACK, Seq=5000, Ack=1001</td><td>Server acknowledges client SYN and supplies its own start</td></tr><tr><td>3 Client → server</td><td>ACK, Seq=1001, Ack=5001</td><td>Client acknowledges server SYN; connection is established</td></tr></tbody></table><h2>Data transfer</h2><p>Client sends 200 bytes beginning at Seq=1001, so byte numbers are 1001…1200. The receiver acknowledges Ack=1201, the next byte expected. If bytes starting at 1201 are missing but later bytes arrive, the cumulative ACK remains 1201 until the gap is repaired. TCP may buffer out-of-order bytes; it delivers the byte stream in order. Each direction counts independently.</p><h2>Orderly termination</h2><ol><li>Assume client’s next data sequence is 1201. It sends FIN with Seq=1201, meaning it has finished sending.</li><li>Server sends ACK=1202. The connection is half closed: the server can still send data until its application finishes.</li><li>Assume server has sent no data since the handshake. It sends FIN with Seq=5001.</li><li>Client responds with ACK=5002. In a common active-close path the client enters TIME-WAIT so delayed segments and retransmitted FINs can be handled before the tuple is reused.</li><li>These are commonly four segments, but ACK and FIN can be combined and simultaneous close is possible. RST is an abort, not the same as the orderly FIN exchange.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A client can finish uploading a request and close its sending direction while still receiving the server’s response. Full-duplex directions do not have to end at the same instant.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> SYN plus one, FIN plus one; ACK next expected byte.</p>"},{"id":"comparison","title":"UDP versus TCP versus SCTP","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Compare UDP, TCP and SCTP on at least eight points. <span class=\"marks\">[10 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">UDP</th><th scope=\"col\">TCP</th><th scope=\"col\">SCTP</th></tr></thead><tbody><tr><td>Service unit</td><td>Datagram; preserves messages</td><td>Byte stream; no message boundaries</td><td>Messages carried in chunks; preserves boundaries</td></tr><tr><td>Connection setup</td><td>No protocol handshake</td><td>Connection; usual three-way SYN exchange</td><td>Association; four-message cookie exchange</td></tr><tr><td>Reliability</td><td>No delivery/order guarantee</td><td>Reliable ordered stream</td><td>Reliable messages; ordered per stream by default, unordered option</td></tr><tr><td>Ordering scope</td><td>None supplied</td><td>One ordered byte stream per direction</td><td>Multiple streams; per-stream order avoids blocking every stream on one stream’s ordering gap</td></tr><tr><td>Flow control</td><td>Not supplied by UDP</td><td>Receiver-advertised window</td><td>Receiver flow control</td></tr><tr><td>Congestion control</td><td>Not supplied by UDP</td><td>Yes</td><td>Yes</td></tr><tr><td>Multihoming</td><td>No built-in association failover</td><td>Classic TCP uses one address pair</td><td>Association can bind multiple addresses; built-in path failover</td></tr><tr><td>Header</td><td>8 bytes</td><td>Minimum 20 bytes</td><td>12-byte common header plus chunks</td></tr><tr><td>Typical use</td><td>DNS, real-time applications with their own controls</td><td>Web over HTTP/1.1 or HTTP/2, reliable byte transfers</td><td>Telecom signalling and multi-stream message applications</td></tr><tr><td>Performance claim</td><td>Low protocol overhead, not automatically fastest overall</td><td>Recovery/ordering have costs and benefits</td><td>Extra capabilities; no universal speed ranking</td></tr></tbody></table><p>The correct protocol depends on application semantics and network conditions. “UDP is always faster” and “SCTP is always slower than TCP” are not defensible general rules. All three normally run above IP; security/encryption is a separate requirement.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A game can prefer fresh updates over retransmitting stale state, while a document download needs every byte. An application with separate message streams can benefit from SCTP’s stream separation.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> UDP messages simple; TCP byte stream; SCTP reliable message streams.</p>"},{"id":"sctp","title":"SCTP association, chunks and multiple streams","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain SCTP, its association setup, multistreaming and multihoming. <span class=\"marks\">[7 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Stream Control Transmission Protocol (SCTP)</strong> is a reliable message-oriented transport. A relationship between endpoints is an <strong>association</strong>. Its packets contain a common header followed by chunks, which carry data or control information.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-sctp.55048562bb.svg\" width=\"820\" height=\"522\" alt=\"SCTP association setup\" loading=\"lazy\" decoding=\"async\"></div><figcaption>SCTP four-message association setup and independent ordered streams.</figcaption></figure><ol><li>INIT → INIT ACK → COOKIE ECHO → COOKIE ACK is the normal setup. The state cookie helps avoid committing full association resources solely on an initial request.</li><li>Data is organized into messages on streams. Transmission Sequence Numbers track reliable chunk delivery across the association; ordering information identifies order within an ordered stream.</li><li>Multiple streams allow a missing message in one stream to avoid forcing every other stream to wait for that stream’s ordering. They still share association/network resources, so this does not guarantee total independence.</li><li>Multihoming lets endpoints advertise multiple addresses, supporting alternate paths and failover. Standard multihoming does not automatically mean all paths’ bandwidth is aggregated.</li><li>SCTP supplies retransmission, selective acknowledgements, receiver flow control and congestion control. Its common header is 12 bytes; chunks add their own headers and data.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A signalling application can use separate streams for independent dialogues. If a primary network path fails, an available alternate address/path can maintain the association.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> SCTP association: streams separate order, addresses provide failover.</p>"}]},{"id":"congestion","title":"Unit 5 · Congestion control and QoS","scope":"TEE · Unit 5 · current syllabus 702AI0C023","sections":[{"id":"policies","title":"Open-loop and closed-loop congestion control","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain open-loop and closed-loop congestion control. Describe at least two policies from each and distinguish congestion from flow control. <span class=\"marks\">[10 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Congestion</strong> occurs when offered traffic overloads network resources such as link capacity, router buffers or processing. Queueing delay grows, packets may be dropped, and excessive retransmission can make the overload worse. <strong>Flow control</strong> protects a receiver; congestion control protects the network.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-congestion.c27c2303bb.svg\" width=\"820\" height=\"515\" alt=\"Two congestion-control approaches\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Open-loop prevention and closed-loop feedback.</figcaption></figure><table><thead><tr><th scope=\"col\">Approach</th><th scope=\"col\">Policy / mechanism</th><th scope=\"col\">How it helps</th></tr></thead><tbody><tr><td>Open loop: prevent congestion without runtime congestion feedback</td><td>Retransmission policy</td><td>Carefully chosen timers/selective retransmission avoid needless extra traffic</td></tr><tr><td>Open loop</td><td>Window policy</td><td>Limit outstanding data and avoid excessive retransmission after loss</td></tr><tr><td>Open loop</td><td>Acknowledgement policy</td><td>Avoid unnecessarily frequent ACK traffic while retaining correct recovery</td></tr><tr><td>Open loop</td><td>Admission policy</td><td>Refuse new load when reserved capacity is insufficient</td></tr><tr><td>Closed loop: measure and react to congestion</td><td>Backpressure</td><td>A congested node tells upstream nodes to reduce/stop sending, possibly propagating hop by hop</td></tr><tr><td>Closed loop</td><td>Choke/control signalling</td><td>A congested node sends explicit feedback to the source</td></tr><tr><td>Closed loop</td><td>Implicit signalling</td><td>A sender infers congestion from loss/delay and changes its sending behaviour</td></tr><tr><td>Closed loop</td><td>Explicit marking</td><td>Network marks congestion (for example ECN); endpoints react to returned information</td></tr></tbody></table><p>For an answer asking for two of each: explain retransmission and admission policies under open loop, then backpressure and explicit signalling under closed loop, with the mechanism and its effect. These are general congestion-control classifications used in the course; they are not all mandatory algorithms implemented inside TCP. TCP commonly uses end-to-end feedback such as loss or ECN.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A router’s output link can be overloaded even while the destination application reads quickly. Increasing receiver memory alone will not remove that network bottleneck.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Open loop pehle prevent; closed loop feedback se react.</p>"},{"id":"tcp-control","title":"TCP congestion window and classic control phases","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain the congestion window and the basic slow-start/congestion-avoidance idea in TCP. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A TCP sender is limited by receiver capacity and network capacity. The <strong>receive window rwnd</strong> comes from the receiver; the <strong>congestion window cwnd</strong> is maintained by the sender. Roughly, allowed outstanding data is min(rwnd,cwnd), with the existing bytes in flight subtracted before sending new bytes.</p><div class=\"math-display\"><img src=\"math/e04fbf2fea600eab.svg\" alt=\"\\mathrm{new\\ allowance}=\\max(0,\\min(rwnd,cwnd)-\\mathrm{bytes\\ in\\ flight})\" style=\"width:58.216ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><ol><li>In classic slow start, cwnd grows rapidly as ACKs arrive; under a simplified round-based model it approximately doubles each RTT.</li><li>At the slow-start threshold, congestion avoidance grows more cautiously; classic additive increase is approximately one MSS per RTT.</li><li>Loss/timeout or an explicit congestion signal causes the sender to reduce its sending allowance. Exact recovery behaviour depends on the TCP congestion-control algorithm.</li><li>Fast retransmit can infer a missing segment from duplicate ACK evidence. It is distinct from waiting for a retransmission timeout.</li><li>The simplified Reno-style outline is supporting detail for the syllabus’s congestion-control topic, not a claim that all modern TCP stacks use an identical curve.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>If rwnd=32 KB and cwnd=12 KB, the network estimate limits outstanding bytes to about 12 KB. With 8 KB already in flight, only 4 KB of new data fits.</p></aside></div></section>"},{"id":"qos","title":"QoS metrics and improving techniques","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Define QoS, explain its parameters and describe techniques used to improve it. <span class=\"marks\">[7 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Quality of Service (QoS)</strong> describes delivery characteristics important to an application: throughput/bandwidth, delay, delay variation (jitter) and loss/reliability. Different applications value them differently; a voice call is sensitive to delay/jitter, while a file transfer strongly needs complete data.</p><table><thead><tr><th scope=\"col\">Technique</th><th scope=\"col\">Mechanism</th><th scope=\"col\">Tradeoff</th></tr></thead><tbody><tr><td>Scheduling</td><td>FIFO, priority or fair/weighted queues choose which packet transmits next</td><td>Strict priority may starve lower classes; fair scheduling balances shares</td></tr><tr><td>Traffic shaping</td><td>Delay departures to match a profile</td><td>Smooths load but adds queueing delay</td></tr><tr><td>Policing</td><td>Measure compliance; mark/drop nonconforming packets according to policy</td><td>Controls excess traffic but can lose packets</td></tr><tr><td>Admission control</td><td>Accept new flows only when resources can support them</td><td>Protects existing service by refusing excess demand</td></tr><tr><td>Resource allocation/reservation</td><td>Assign bandwidth/buffer/service resources</td><td>Requires capacity planning and coordination</td></tr><tr><td>Classification/marking</td><td>Identify traffic classes and carry service markings</td><td>Marking alone does not create capacity or guarantees</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A campus link can prioritize interactive audio while fairly serving file downloads. Token-bucket shaping bounds a burst source; admission control avoids promising more reserved capacity than the link has.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Bandwidth, delay, jitter, loss; requirement ke hisaab se policy.</p>"},{"id":"leaky","title":"Leaky-bucket operation and tradeoffs","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Draw and explain the leaky-bucket algorithm. Is it always better than a token bucket? <span class=\"marks\">[10 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>In the textbook <strong>leaky-bucket queue/shaper</strong> model, arriving packets enter a finite buffer. The output sends at a configured rate whenever data is queued. When the queue empties, it cannot send nonexistent packets; when the buffer is full, excess arrivals are dropped in this finite-buffer model.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-leaky.77bdbcf957.svg\" width=\"820\" height=\"515\" alt=\"Leaky-bucket data queue\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Finite data buffer smooths a burst into a bounded departure rate.</figcaption></figure><ol><li>Choose buffer capacity B and output service rate r in consistent units.</li><li>Admit arrivals that fit. Drop/mark overflow according to the stated implementation; this queue example drops the excess.</li><li>Drain at rate r while the queue is nonempty. Idle time does not accumulate permission for a later faster burst.</li><li>The result is smoothed output. Larger buffers accommodate larger bursts but can increase waiting delay.</li></ol><table><thead><tr><th scope=\"col\">Advantage</th><th scope=\"col\">Limitation</th></tr></thead><tbody><tr><td>Simple bound on output rate</td><td>Bursts may overflow or suffer delay</td></tr><tr><td>Reduces short-term output variation</td><td>Unused idle service cannot be saved</td></tr><tr><td>Useful for predictable traffic shaping</td><td>No end-to-end delay/loss guarantee by itself</td></tr></tbody></table><p>The term “leaky bucket” can also describe a conformance meter in standards. This course’s diagrams and numerical questions explicitly use the finite data-queue model, so its state is queued data rather than tokens.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A queue of 20 packets drained at 5 packets/s needs 4 seconds to empty without new arrivals. If it is already full, an instantaneous extra burst cannot all be stored.</p></aside><p>No algorithm is universally better. The leaky data-queue model is useful for a smooth output profile; token bucket is preferable when controlled bursts should be allowed. State the application’s delay, burst and rate needs before recommending one.</p></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Leaky bucket stores data; idle service save nahi hota.</p>"},{"id":"token","title":"Token-bucket operation and limitations","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Draw and explain the token-bucket algorithm. State at least two limitations. <span class=\"marks\">[10 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A <strong>token bucket</strong> generates tokens at rate r up to capacity B. Sending one unit of data consumes the corresponding tokens. Tokens accumulate during idle periods only until the bucket is full. Data can therefore burst when saved tokens exist, subject to the physical link rate.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-token.c3ff1dbf76.svg\" width=\"820\" height=\"660\" alt=\"Token bucket: permission is separate from data\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Tokens store permission; the separate data queue stores packets.</figcaption></figure><ol><li>Initialize a stated token count, often B for a full bucket. Add rΔt tokens over elapsed time, capped at B.</li><li>A packet of length L needs L byte-tokens (or one packet-token in a fixed-packet model). If enough tokens exist, deduct them and permit transmission.</li><li>If tokens are insufficient, a <strong>shaper</strong> waits/buffers until enough are available. A <strong>policer</strong> marks or drops nonconforming traffic according to policy. Token shortage does not universally mean drop.</li><li>Over interval t, a full token bucket bounds admitted data by B+rt. Actual output is also limited by link capacity and packet scheduling.</li><li>Unlike the queue-style leaky bucket, token storage allows limited bursts after idle time. It bounds average rate and burst size separately.</li></ol><div class=\"math-display\"><img src=\"math/750b0148fd39654a.svg\" alt=\"\\mathrm{admitted\\ data}(t)\\le B+rt\" style=\"width:25.805ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><table><thead><tr><th scope=\"col\">Limitation</th><th scope=\"col\">Reason</th></tr></thead><tbody><tr><td>Bursts can still congest downstream queues</td><td>Local conformance does not ensure every later link has capacity</td></tr><tr><td>Parameters must match traffic and link requirements</td><td>A small B delays/drops legitimate packets; a large B permits disruptive bursts</td></tr><tr><td>No complete QoS guarantee alone</td><td>Admission, scheduling and end-to-end capacity may still be needed</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>With B=10 KB and r=2 KB/s, an idle sender can immediately use up to 10 KB of saved tokens; additional sustained traffic must respect the refill rate, and physical serialization still takes time.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Token permission store hota hai; actual packet alag queue mein.</p>"},{"id":"bucket-compare","title":"Leaky bucket versus token bucket","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Compare the leaky-bucket queue model and token bucket and recommend a use for each. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">Leaky data queue</th><th scope=\"col\">Token bucket</th></tr></thead><tbody><tr><td>Stored state</td><td>Queued data</td><td>Tokens representing permission</td></tr><tr><td>Idle period</td><td>Empty queue; unused service lost</td><td>Tokens accumulate up to B</td></tr><tr><td>Output burst</td><td>Smoothed by configured service rate</td><td>Allowed if enough tokens and physical capacity exist</td></tr><tr><td>Overflow/shortage</td><td>Finite queue can overflow</td><td>Shaper waits; policer may mark/drop</td></tr><tr><td>Main parameters</td><td>Queue capacity and drain rate</td><td>Token capacity and generation rate</td></tr><tr><td>Useful when</td><td>A smoother output profile is required</td><td>Average rate plus burst allowance is required</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A steady-rate interface may use leaky shaping. A bursty file application can use token shaping to send short bursts while limiting its sustained rate.</p></aside></div></section>"}]},{"id":"applications","title":"Unit 6 · HTTP, DNS, FTP and SMTP","scope":"TEE · Unit 6 · current syllabus 702AI0C023","sections":[{"id":"http","title":"WWW and the complete HTTP request journey","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain with a diagram how the WWW uses HTTP when a user enters http://www.example.com. Describe components and the client-server mechanism. <span class=\"marks\">[10 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>The <strong>World Wide Web (WWW)</strong> is an information system of linked resources identified by URLs and accessed using Web clients and servers. A browser is a client; a Web server hosts or generates representations such as HTML, images or JSON. <strong>HTTP</strong> defines request/response semantics between these components. The Web is one application of the Internet, not a synonym for the entire Internet.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-http.de65bc75dd.svg\" width=\"820\" height=\"805\" alt=\"Opening a plain HTTP/1.1 URL\" loading=\"lazy\" decoding=\"async\"></div><figcaption>URL → DNS → connection → HTTP request/response → displayed document.</figcaption></figure><ol><li>Interpret the URL <strong>http://www.example.com/</strong>: scheme=http; host=www.example.com; path=/; absent explicit port, plain HTTP uses default port 80. A fragment identifier, if present, is handled by the client and is not sent as part of an HTTP target.</li><li>Resolve the hostname using DNS, often via cached results and a recursive resolver. DNS finds an address; it does not download the Web page.</li><li>For this plain HTTP/1.1 example, establish a TCP connection to the server on port 80. HTTPS additionally protects HTTP using TLS; do not add TLS to an explicitly plain-http example without stating a redirect or change of scheme.</li><li>Send a request such as GET / HTTP/1.1 with Host: www.example.com. The server identifies the target resource, processes the request and prepares a response.</li><li>Receive a status line such as HTTP/1.1 200 OK, response headers such as Content-Type, and the response body. A 404 response indicates no matching resource was found; redirects instruct the client to another target.</li><li>The browser parses HTML, retrieves referenced objects as needed and renders the page. Caching may avoid transfers; persistent connections can serve multiple requests.</li></ol><table><thead><tr><th scope=\"col\">Message component</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Request method / target</td><td>Requested action and resource; GET retrieves a representation, POST submits data for processing</td></tr><tr><td>Headers</td><td>Metadata, routing context, representation preferences and cache/connection information</td></tr><tr><td>Status code</td><td>Result class: 2xx success, 3xx redirection, 4xx client error, 5xx server error</td></tr><tr><td>Body</td><td>Representation or submitted content when present</td></tr></tbody></table><p>HTTP semantics are stateless: each request has its own meaning. Cookies/tokens can let an application maintain a login session; stateless does not mean “users cannot log in”. HTTP/1.1 and HTTP/2 commonly use TCP; HTTP/3 uses QUIC over UDP, so “HTTP always uses TCP” is not a universal statement.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A browser can receive the HTML successfully and still need separate requests for its stylesheet and image. One URL entry can therefore cause several HTTP exchanges.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> DNS address dhoondta; HTTP resource mangta; browser render karta.</p>"},{"id":"http-state","title":"HTTP methods, status, persistence and HTTPS","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain HTTP request/response structure, persistent connections, status codes and the role of HTTPS. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Concept</th><th scope=\"col\">Explanation</th><th scope=\"col\">Example</th></tr></thead><tbody><tr><td>GET</td><td>Retrieve the selected representation</td><td>Read a page</td></tr><tr><td>POST</td><td>Ask the resource to process submitted content</td><td>Submit a form</td></tr><tr><td>PUT / DELETE</td><td>Replace target representation / request removal according to server semantics</td><td>Update/delete an API resource</td></tr><tr><td>200 / 301 / 404 / 500</td><td>Success / permanent redirect / not found / server error</td><td>Read status before interpreting body</td></tr><tr><td>Persistent connection</td><td>Reuse a connection for multiple exchanges</td><td>Avoid repeated TCP setup for each image</td></tr><tr><td>Cookie/session token</td><td>Carry an identifier so the application can relate requests</td><td>Remain signed in</td></tr><tr><td>HTTPS</td><td>HTTP protected by authenticated encryption through TLS in common deployments</td><td>Protect credentials and content in transit</td></tr></tbody></table><p>A secure transport protects the connection; it does not prove that every server’s content is truthful. HTTP method semantics and application authorization still matter. For exam comparisons, separate HTTP semantics, connection lifetime and application session state.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A login page may send a session cookie after successful authentication. Later requests include it even though each HTTP request remains a separate protocol exchange.</p></aside></div></section>"},{"id":"dns","title":"DNS hierarchy, delegation and uniqueness","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. With a neat diagram, explain the hierarchical domain namespace in DNS and how it ensures unique domain names. <span class=\"marks\">[10 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>The <strong>Domain Name System (DNS)</strong> is a distributed hierarchical naming system. Its namespace is a tree with the root at the top. A complete name is the ordered path of labels from a node back to the root. An absolute name may be written with a trailing dot, for example www.example.com.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-dns.f5345fe9fb.svg\" width=\"820\" height=\"520\" alt=\"DNS namespace: full label paths are unique\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Root, top-level domains, delegated domain and host labels.</figcaption></figure><table><thead><tr><th scope=\"col\">Level</th><th scope=\"col\">Example</th><th scope=\"col\">Meaning</th></tr></thead><tbody><tr><td>Root</td><td>.</td><td>Top of the namespace</td></tr><tr><td>Top-level domain (TLD)</td><td>com, org, in</td><td>A child zone below the root</td></tr><tr><td>Registered/delegated domain</td><td>example.com</td><td>Name under a parent such as com</td></tr><tr><td>Subdomain/host label</td><td>www.example.com</td><td>A label below example.com; a name may own different record types</td></tr></tbody></table><h2>Why names remain unique</h2><ol><li>A parent manages the labels immediately beneath it and does not assign the same child label to two different nodes in that parent’s namespace.</li><li>The full sequence of labels identifies the node. The local label www can appear below many domains without conflict: www.example.com and www.example.org are different complete names.</li><li>Administration is delegated: the parent publishes information identifying authoritative servers for a child zone. A domain is a namespace subtree; a zone is the portion administered together, excluding subtrees delegated onward.</li><li>Multiple names may resolve to one IP address, and one name can return several addresses. Uniqueness of names does not imply a one-name/one-IP rule.</li></ol><h2>Resolution</h2><ol><li>A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.</li><li>Otherwise the resolver can query a root server, receive a referral to the relevant TLD, then receive a referral to the authoritative server for the domain.</li><li>The authoritative server supplies the requested record or a relevant negative response. The recursive resolver returns the result and may cache it according to TTL.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>The labels “mail” under two organizations do not collide because mail.example.com and mail.example.org have different ancestors. DNS delegation distributes administration while preserving a unique full path.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Full path unique; www label akela unique nahi.</p>"},{"id":"dns-records","title":"DNS records, recursive/iterative queries and caching","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain common DNS resource records, recursive versus iterative queries and caching. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Record</th><th scope=\"col\">Purpose</th><th scope=\"col\">Example meaning</th></tr></thead><tbody><tr><td>A</td><td>IPv4 address</td><td>Name → IPv4 address</td></tr><tr><td>AAAA</td><td>IPv6 address</td><td>Name → IPv6 address</td></tr><tr><td>NS</td><td>Authoritative server names for a zone/delegation</td><td>Which nameservers serve the zone</td></tr><tr><td>CNAME</td><td>Alias to another canonical name</td><td>Alias → target name; not an IP address</td></tr><tr><td>MX</td><td>Mail exchanger preference and hostname</td><td>Where email for a domain should be routed</td></tr><tr><td>PTR</td><td>Reverse-mapping pointer</td><td>Address-related reverse name → domain name</td></tr><tr><td>SOA</td><td>Zone administrative/version/timing information</td><td>Start of authority for zone data</td></tr></tbody></table><h2>TTL is a record field, not a record type</h2><p>The <strong>time to live (TTL)</strong> is a field attached to resource-record data. It states how many seconds the data may normally remain cached. A, AAAA and MX are record types; TTL is not another type alongside them.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>If an A record is cached with TTL 300 seconds, a copy that is 120 seconds old has 180 seconds of its original cache lifetime remaining. TTL controls caching; it does not change that record from type A.</p></aside><p>In a <strong>recursive query</strong>, the queried resolver is asked to obtain a final answer or error for the client. With <strong>iterative resolution</strong>, a server may return the best information it has, often a referral, and the querying resolver follows it. A caching resolver reduces delay/load but may return an older still-valid record until its TTL expires.</p><p>DNS commonly uses UDP port 53 for small exchanges and TCP port 53 for situations such as zone transfers or responses requiring TCP. TCP is supported beyond zone transfer, so do not say DNS is UDP-only. Encrypted DNS transports exist but are outside the named core topic.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>An MX record points to a mail-server hostname. A resolver then obtains that hostname’s A/AAAA records; MX is not itself a Web-page location.</p></aside></div></section>"},{"id":"ftp","title":"FTP control/data connections and active/passive modes","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain FTP and the functions of its control and data connections. Illustrate the transfer process. <span class=\"marks\">[10 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>File Transfer Protocol (FTP)</strong> transfers files between a client and server using TCP and separates commands from file data. This separation is its central design feature. Its control connection remains available across multiple operations, while data connections carry file bytes or directory listings.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-ftp.1b305fa997.svg\" width=\"820\" height=\"660\" alt=\"FTP: separate control and data connections\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Control connection on server port 21; active/passive data connection roles differ.</figcaption></figure><table><thead><tr><th scope=\"col\">Connection</th><th scope=\"col\">Function</th><th scope=\"col\">Lifetime / ports</th></tr></thead><tbody><tr><td>Control</td><td>Commands and replies: USER, PASS, CWD, TYPE, LIST, RETR, STOR, QUIT</td><td>Client connects to server TCP port 21; normally kept for the session</td></tr><tr><td>Data</td><td>File contents and directory listing data</td><td>Opened as needed; separate from command channel</td></tr></tbody></table><h2>How a transfer works</h2><ol><li>Client opens the control connection and exchanges server greeting, login commands and replies. Plain FTP sends credentials/data without encryption.</li><li>Client chooses transfer settings such as binary/image mode for arbitrary bytes, and requests the needed working directory/operation.</li><li>In <strong>active FTP</strong>, the client provides a listening endpoint and the server initiates the data connection, traditionally from server port 20.</li><li>In <strong>passive FTP</strong>, the server returns a listening endpoint and the client initiates the data connection to that chosen server port. Therefore “FTP data always uses server port 20” is wrong.</li><li>RETR downloads a file; STOR uploads a file; LIST returns a directory listing over the data connection. Control replies report progress/completion. The session can continue for another transfer.</li><li>QUIT ends the control session.</li></ol><p>FTP over TLS (FTPS) protects FTP connections. SFTP is a separate SSH-based file-transfer protocol, not “FTP using an SSH port”. These names should not be treated as interchangeable.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A passive client behind a firewall can initiate both its control connection and data connection. The file bytes travel on the negotiated data connection, while the command RETR stays on the control connection.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Control commands, data file; passive mein client dono connect karta.</p>"},{"id":"smtp","title":"SMTP phases, commands and email flow","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain SMTP and its role in email. Describe communication phases and typical commands with a labelled client-server diagram. <span class=\"marks\">[10 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Simple Mail Transfer Protocol (SMTP)</strong> transfers email from a sending client/server to a receiving mail server using a reliable transport, normally TCP. It is a push/store-and-forward transfer protocol. User agents compose/read mail; mail-transfer agents relay it, consulting DNS MX records to find recipient-domain mail servers.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-smtp.c6f99877c4.svg\" width=\"820\" height=\"902\" alt=\"SMTP: envelope, message and completion\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Submission/relay use SMTP; reading an inbox uses a separate access protocol.</figcaption></figure><table><thead><tr><th scope=\"col\">Phase</th><th scope=\"col\">Typical exchange</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Connection and greeting</td><td>Server 220; client EHLO (HELO for basic SMTP); server 250 capabilities</td><td>Identify peers and learn supported extensions</td></tr><tr><td>Envelope transfer</td><td>MAIL FROM:&lt;sender&gt;; RCPT TO:&lt;recipient&gt;; 250 replies</td><td>Declare return path and one or more delivery recipients</td></tr><tr><td>Message transfer</td><td>DATA; server 354; headers + blank line + body; single dot line; server 250</td><td>Transmit the message after server permission; completion reply accepts responsibility</td></tr><tr><td>Termination</td><td>QUIT; server 221</td><td>Close the SMTP session cleanly</td></tr></tbody></table><h2>Message flow and important details</h2><ol><li>The sender’s user agent submits mail to its configured submission service. Server-to-server SMTP relay commonly uses TCP port 25; message submission commonly uses 587, often with authentication and TLS policy.</li><li>The sending server resolves the recipient domain’s MX records, connects to an appropriate mail server and carries out the SMTP exchange.</li><li>MAIL FROM and RCPT TO are the <strong>envelope</strong>; visible From/To headers inside DATA are message content and can differ. Multiple RCPT TO commands can name several recipients.</li><li>A line containing only a dot ends DATA. A content line beginning with a dot is dot-stuffed for transparency and unstuffed by the receiver.</li><li>A temporary 4xx failure can lead the sending server to queue and retry; a permanent 5xx failure normally rejects that operation. One successful handoff is not proof that a human read the message.</li><li>The recipient reads stored mail using an access protocol such as IMAP/POP3 or webmail. SMTP is not the mailbox-retrieval protocol.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A message addressed to two recipients can send two RCPT TO commands before one DATA body. The SMTP envelope controls delivery even if the visible header lists a mailing-list name.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> SMTP send/relay; inbox read IMAP/POP/webmail.</p>"},{"id":"protocol-summary","title":"Compare the four application protocols","html":"<section class=\"example\"><h3 class=\"exam-question\">Practice question. Compare HTTP, DNS, FTP and SMTP in terms of purpose, operation and common ports. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Protocol</th><th scope=\"col\">Purpose</th><th scope=\"col\">Communication pattern</th><th scope=\"col\">Common transport/port</th></tr></thead><tbody><tr><td>HTTP</td><td>Transfer Web resource representations</td><td>Client requests; server responds</td><td>Plain HTTP/1.1 TCP 80; HTTPS commonly 443; version/transport matters</td></tr><tr><td>DNS</td><td>Resolve names and other naming records</td><td>Queries, referrals, answers and caching</td><td>UDP/TCP 53 in classic DNS</td></tr><tr><td>FTP</td><td>Transfer files and listings</td><td>Persistent command channel plus separate data connection</td><td>TCP control 21; active data traditionally 20, passive chosen port</td></tr><tr><td>SMTP</td><td>Submit/relay email</td><td>Greeting, envelope, DATA, termination; queued relay</td><td>TCP 25 relay; 587 submission</td></tr></tbody></table><p>Ports are conventional defaults, not a guarantee that every service runs only on that number. A port can be explicitly configured. For exam questions, identify the protocol’s purpose and message flow before memorizing a port.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Opening a university mailbox in a browser uses HTTP/HTTPS between browser and webmail service; sending mail onward between mail servers can still use SMTP.</p></aside></div></section>"}]}],"formulas":[{"id":"formulas","title":"All formulas and rules in one place","scope":"Core units, ALOHA, address and routing rules; illustrative values are practice","sections":[{"id":"aloha","title":"ALOHA formulas and maximum values","html":"<div class=\"math-display\"><img src=\"math/777410ed8c9656d0.svg\" alt=\"G=\\lambda T_f\" style=\"width:8.503ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>λ=aggregate attempts/s; G=attempts/frame time.</p><div class=\"math-display\"><img src=\"math/7b496d33240552f3.svg\" alt=\"S_{\\mathrm{pure}}=Ge^{-2G}\" style=\"width:14.03ex;height:2.712ex\" loading=\"lazy\" decoding=\"async\"></div><p>Maximum 1/(2e)≈0.18394 at G=0.5.</p><div class=\"math-display\"><img src=\"math/679e9767406c13ac.svg\" alt=\"S_{\\mathrm{slotted}}=Ge^{-G}\" style=\"width:14.834ex;height:2.419ex\" loading=\"lazy\" decoding=\"async\"></div><p>Maximum 1/e≈0.367879 at G=1.</p><div class=\"math-display\"><img src=\"math/2656297b585ffbee.svg\" alt=\"F_{\\mathrm{success}}=S/T_f\" style=\"width:14.55ex;height:2.364ex\" loading=\"lazy\" decoding=\"async\"></div><p>Convert normalized S into successful frames/s.</p><div class=\"math-display\"><img src=\"math/4164452cf4f984f6.svg\" alt=\"B_{\\mathrm{success}}=SR\" style=\"width:13.01ex;height:1.952ex\" loading=\"lazy\" decoding=\"async\"></div><p>Successful full-frame bits/s; not necessarily application payload goodput.</p><div class=\"math-display\"><img src=\"math/a1083530dd6239fa.svg\" alt=\"P(\\mathrm{success\\ per\\ attempt})=S/G\" style=\"width:29.99ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>For G>0. Do not confuse this probability with normalized throughput S.</p><h2>Learn it with complete solutions</h2><p><a href=\"#tee/read/aloha/rate-1\">Five fully worked rate questions</a></p>"},{"id":"ipv4","title":"Masks and address blocks","html":"<div class=\"math-display\"><img src=\"math/1b1ff40e2008c7a0.svg\" alt=\"h=32-p,\\quad N=2^h\" style=\"width:21.022ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><p>p=prefix bits, h=host bits, N=total addresses.</p><div class=\"math-display\"><img src=\"math/92ad06adcbf23a21.svg\" alt=\"U=2^h-2\" style=\"width:10.89ex;height:2.23ex\" loading=\"lazy\" decoding=\"async\"></div><p>Ordinary usable-host count. /31 point-to-point and /32 are exceptions.</p><div class=\"math-display\"><img src=\"math/9f548fe5bbbe07ef.svg\" alt=\"\\text{step}=256-M\" style=\"width:15.588ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>M is the first mask octet not equal to 255.</p><div class=\"math-display\"><img src=\"math/75b831766f4f99cd.svg\" alt=\"\\text{network}=\\text{address AND mask}\" style=\"width:29.682ex;height:1.805ex\" loading=\"lazy\" decoding=\"async\"></div><p>Bitwise AND keeps network bits and clears host bits.</p><div class=\"math-display\"><img src=\"math/e5e4b592ee8fd45e.svg\" alt=\"\\text{broadcast}=\\text{network}+(N-1)\" style=\"width:31.01ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use full address arithmetic, not an overflowing final octet.</p><h2>Learn it with complete solutions</h2><p><a href=\"#tee/read/subnets/block-1\">Nine complete address-block examples</a></p>"},{"id":"design","title":"Host sizing, VLSM and aggregation","html":"<div class=\"math-display\"><img src=\"math/ab881b9b5531cc3b.svg\" alt=\"2^h-2\\geq H\" style=\"width:11.164ex;height:2.357ex\" loading=\"lazy\" decoding=\"async\"></div><p>H requested usable hosts. Smallest sufficient h gives smallest ordinary subnet.</p><div class=\"math-display\"><img src=\"math/20f9f1a5957fbd76.svg\" alt=\"2^s\\geq K,\\quad p_{new}=p_{old}+s\" style=\"width:24.797ex;height:2.08ex\" loading=\"lazy\" decoding=\"async\"></div><p>K equal subnets required; s borrowed bits. Do not subtract two from modern subnet count.</p><div class=\"math-display\"><img src=\"math/796d561e6716df45.svg\" alt=\"p=32-\\log_2(N)\" style=\"width:16.832ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>For a power-of-two total address requirement, subject to boundary alignment.</p><h2>Learn it with complete solutions</h2><p><a href=\"#tee/read/cidr/vlsm-1\">Three full VLSM designs</a></p>"},{"id":"routing","title":"Routing updates and path costs","html":"<div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Old destination distance versus cost to u plus edge u→v.</p><div class=\"math-display\"><img src=\"math/9703c520036a4b0a.svg\" alt=\"D_x(y)=\\min_{v\\in N(x)}\\{c(x,v)+D_v(y)\\}\" style=\"width:31.156ex;height:3.901ex\" loading=\"lazy\" decoding=\"async\"></div><p>Distance vector: local link cost plus neighbour advertisement.</p><div class=\"math-display\"><img src=\"math/6790d72650e66c1e.svg\" alt=\"\\mathrm{RIP\\ metric}=\\min(16,\\mathrm{link\\ cost}+\\mathrm{advertisement})\" style=\"width:47.551ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>16 represents unreachable. Ordinary hop increments commonly equal 1.</p><h2>Learn it with complete solutions</h2><p><a href=\"#tee/read/routing/dijkstra-1\">Full Dijkstra solution</a></p>"}]},{"id":"tee-formulas","title":"TEE formulas, definitions and full forms","scope":"TEE · Complete six-unit quick reference · current syllabus 702AI0C023","sections":[{"id":"full-forms","title":"Full forms and one-line meanings","html":"<table><thead><tr><th scope=\"col\">Term</th><th scope=\"col\">Full form</th><th scope=\"col\">Meaning</th></tr></thead><tbody><tr><td>OSI</td><td>Open Systems Interconnection</td><td>Seven-layer reference model</td></tr><tr><td>TCP/IP</td><td>Transmission Control Protocol / Internet Protocol</td><td>Internet protocol suite</td></tr><tr><td>LAN / MAN / PAN / WAN</td><td>Local / Metropolitan / Personal / Wide Area Network</td><td>Network-scope classifications</td></tr><tr><td>ARPANET</td><td>Advanced Research Projects Agency Network</td><td>Historical packet network</td></tr><tr><td>CRC</td><td>Cyclic Redundancy Check</td><td>Polynomial error detection</td></tr><tr><td>ARQ</td><td>Automatic Repeat reQuest</td><td>Feedback/timer-based retransmission</td></tr><tr><td>GBN / SR</td><td>Go-Back-N / Selective Repeat</td><td>Sliding-window ARQ strategies</td></tr><tr><td>FEC</td><td>Forward Error Correction</td><td>Recover using coding redundancy</td></tr><tr><td>CSMA</td><td>Carrier Sense Multiple Access</td><td>Sense medium before access</td></tr><tr><td>CD / CA</td><td>Collision Detection / Collision Avoidance</td><td>Two different medium-access strategies</td></tr><tr><td>CIDR</td><td>Classless Inter-Domain Routing</td><td>Prefix-based allocation and aggregation</td></tr><tr><td>VLSM</td><td>Variable Length Subnet Mask</td><td>Different subnet sizes within a block</td></tr><tr><td>ARP / RARP</td><td>Address Resolution Protocol / Reverse ARP</td><td>Local IPv4-to-hardware mapping / historical reverse mapping</td></tr><tr><td>DHCP</td><td>Dynamic Host Configuration Protocol</td><td>Leased network configuration</td></tr><tr><td>RIP</td><td>Routing Information Protocol</td><td>Distance-vector protocol using hop metric</td></tr><tr><td>OSPF</td><td>Open Shortest Path First</td><td>Link-state interior routing protocol</td></tr><tr><td>LSA</td><td>Link State Advertisement</td><td>Topology information advertised in link-state routing</td></tr><tr><td>UDP</td><td>User Datagram Protocol</td><td>Connectionless datagram transport</td></tr><tr><td>SCTP</td><td>Stream Control Transmission Protocol</td><td>Reliable message-oriented multi-stream transport</td></tr><tr><td>QoS</td><td>Quality of Service</td><td>Bandwidth, delay, jitter, loss properties</td></tr><tr><td>RTT / MSS</td><td>Round-Trip Time / Maximum Segment Size</td><td>Round-trip delay / TCP data-size parameter</td></tr><tr><td>HTTP / WWW</td><td>Hypertext Transfer Protocol / World Wide Web</td><td>Web request-response protocol / linked-resource system</td></tr><tr><td>DNS</td><td>Domain Name System</td><td>Distributed hierarchical naming</td></tr><tr><td>FTP</td><td>File Transfer Protocol</td><td>Separate file-control and data connections</td></tr><tr><td>SMTP</td><td>Simple Mail Transfer Protocol</td><td>Mail submission/relay</td></tr><tr><td>TTL</td><td>Time To Live</td><td>Meaning depends on context: IP lifetime field or DNS cache duration</td></tr><tr><td>ACK / SYN / FIN</td><td>Acknowledgement / Synchronize / Finish</td><td>TCP control concepts; SYN and FIN consume sequence space</td></tr></tbody></table><div class=\"note\"><p>Do not mix uses of the same acronym: DNS TTL is a cache time; IPv4 TTL is decremented at routers. ALOHA is a protocol name, not an acronym that requires an invented expansion.</p></div>"},{"id":"protocol-facts","title":"Protocol facts worth writing accurately","html":"<table><thead><tr><th scope=\"col\">Topic</th><th scope=\"col\">Exact fact</th></tr></thead><tbody><tr><td>OSI / TCP-IP</td><td>Seven OSI layers; four TCP/IP layers here; five-layer teaching model splits link</td></tr><tr><td>CRC</td><td>Zero syndrome means no error detected, not certainty of no errors</td></tr><tr><td>GBN / SR ACK</td><td>This course: GBN ACK k=next expected; SR ACK k=individual frame accepted</td></tr><tr><td>IPv4 / IPv6</td><td>32-/128-bit addresses; IPv6 base header 40 bytes; no IPv6 broadcast</td></tr><tr><td>UDP / TCP / SCTP</td><td>UDP 8-byte header; TCP minimum 20; SCTP common 12 plus chunks</td></tr><tr><td>TCP data</td><td>Bytes counted; ACK next expected; SYN and FIN each consume one; pure ACK none</td></tr><tr><td>RIP</td><td>Metric 16 means unreachable; 15 is highest reachable hop metric</td></tr><tr><td>OSPF</td><td>Hello, Database Description, Link State Request, Link State Update, Link State Acknowledgment</td></tr><tr><td>HTTP</td><td>Default plain HTTP port 80; HTTPS commonly 443; HTTP/3 uses QUIC/UDP</td></tr><tr><td>DNS</td><td>Classic DNS uses UDP and TCP 53, not UDP only</td></tr><tr><td>FTP</td><td>Control TCP 21; active data traditionally server 20; passive port negotiated</td></tr><tr><td>SMTP</td><td>Server relay TCP 25; submission commonly 587; SMTP does not retrieve inboxes</td></tr><tr><td>Token shortage</td><td>Shaper delays; policer applies mark/drop policy; behaviour must be specified</td></tr></tbody></table>"},{"id":"exam-coding","title":"Paper-backed coding formulas","html":"<div class=\"note\"><p>Question families present in the supplied papers: final Q2(a), re-exam Q2(a).</p></div><div class=\"math-display\"><img src=\"math/beca5466928acbfc.svg\" alt=\"r=n-k,\\quad R_c=k/n\" style=\"width:21.89ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>k data bits, n codeword bits, r redundant bits; coding rate is dimensionless.</p><div class=\"math-display\"><img src=\"math/15901a0538322dc0.svg\" alt=\"d(a,b)=\\operatorname{weight}(a\\oplus b)\" style=\"width:22.357ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Count differing bit positions in equal-length words.</p><div class=\"math-display\"><img src=\"math/b0c374242e18e388.svg\" alt=\"s=d_{\\min}-1,\\quad t=\\lfloor(d_{\\min}-1)/2\\rfloor\" style=\"width:33.068ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Separate maximum guaranteed detection and correction counts; all distinct pairs define dmin.</p><div class=\"math-display\"><img src=\"math/08451acce5e9e980.svg\" alt=\"R(x)=x^rM(x)\\bmod G(x),\\quad T=x^rM\\oplus R\" style=\"width:42.73ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Generator degree r; append r zeros and use modulo-2 XOR division. Receiver divides T directly.</p>"},{"id":"exam-arq","title":"Paper-backed ARQ window formulas","html":"<div class=\"note\"><p>Question families present in the supplied papers: final Q5(a); re-exam Q5(a) explains GBN.</p></div><div class=\"math-display\"><img src=\"math/17ff91ae191f528e.svg\" alt=\"N=2^m,\\quad W_{GBN}\\le N-1,\\quad W_{R,GBN}=1\" style=\"width:41.449ex;height:2.291ex\" loading=\"lazy\" decoding=\"async\"></div><p>m sequence bits; sequence numbers 0…N−1. GBN receiver accepts only next in order.</p><div class=\"math-display\"><img src=\"math/413c503dfd6c2a68.svg\" alt=\"W_{S,SR}=W_{R,SR}\\le N/2\" style=\"width:22.581ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>Standard equal-window SR bound; prevent successive windows overlapping.</p>"},{"id":"exam-units","title":"Frame time for ALOHA","html":"<div class=\"math-display\"><img src=\"math/9e384aa108fc34e3.svg\" alt=\"T_f=L/R\" style=\"width:9.795ex;height:2.364ex\" loading=\"lazy\" decoding=\"async\"></div><p>L is frame length in bits and R is channel rate in bits/s. Divide to obtain seconds per frame. This conversion is used in re-exam Q6(b); then G=attempts per second × frame time.</p><p><a href=\"#tee/read/aloha/rate-1\">Worked ALOHA rate example</a></p>"},{"id":"exam-headers","title":"IPv6 expansion and header facts","html":"<div class=\"math-display\"><img src=\"math/e61302b7dd479191.svg\" alt=\"\\mathrm{omitted\\ groups}=8-\\mathrm{visible\\ groups}\" style=\"width:35.061ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Count every written hexadecimal group, including a written 0. Expand :: once and pad every group to four hexadecimal digits. Final Q4(a) asks expansion and header comparison; re-exam Q4(a) asks the IPv6 packet format.</p><p>For diagrams: IPv6 has a fixed 40-byte base header; its payload-length field excludes that base header. IPv4 uses IHL in 32-bit words. Extra packet-length calculations are in optional practice.</p><p><a href=\"#tee/read/ipv6/expand-1\">Worked IPv6 expansion</a></p>"}]}],"papers":[{"id":"tee-pyq-guide","title":"Past papers: questions, marks and full solutions","scope":"TEE · Latest papers first; older variants mapped to current syllabus","sections":[{"id":"pattern","title":"Read the original TEE instructions first","html":"<h2>The two latest 2025–26 papers</h2>\r\n<p>Both supplied original question papers contain three pages, are for 100 marks and allow three hours. <strong>Q1 is compulsory; attempt any four of Q2–Q7. Every whole question is 20 marks.</strong> All 18 parts of each paper are solved here, including the choices you would not attempt in one sitting.</p><table><thead><tr><th scope=\"col\">Whole question</th><th scope=\"col\">Part marks</th><th scope=\"col\">Total</th></tr></thead><tbody><tr><td>Q1</td><td>5+5+5+5</td><td>20</td></tr><tr><td>Q2</td><td>10+10</td><td>20</td></tr><tr><td>Q3</td><td>5+5+10</td><td>20</td></tr><tr><td>Q4</td><td>10+10</td><td>20</td></tr><tr><td>Q5</td><td>10+10</td><td>20</td></tr><tr><td>Q6</td><td>5+5+10</td><td>20</td></tr><tr><td>Q7</td><td>10+10</td><td>20</td></tr></tbody></table><p>The original instructions also say to start each new question on a fresh page, that right-side figures indicate marks and that suitable data may be assumed if necessary. Assume only what is genuinely missing and state it. Do not replace supplied values or directed edges.</p><div class=\"note\"><p>These papers use the older course code 702AI0C007. They are aligned topic by topic to the current 702AI0C023 syllabus; they are evidence for practice, not a promise of the next examination’s pattern. The current syllabus independently confirms 100 TEE marks scaled to 50.</p></div>\r\n\r\n<h2>Older papers and distinct variants</h2><p>The question map also includes recovered older AI-only and combined-programme variants. Do not apply the latest part-split table to every older paper: use its own printed marks. One AI-only November2023 scan is missing page6 and its incomplete question is explicitly flagged. Same-date variants are different question sets.</p>"},{"id":"corrections","title":"Source answer-key corrections that affect exam working","html":"<table><thead><tr><th scope=\"col\">Source</th><th scope=\"col\">Problem</th><th scope=\"col\">Verified treatment</th></tr></thead><tbody><tr><td>Final Q4(a), IPv6</td><td>Scheme prose says four omitted groups although five groups are visible</td><td>:: inserts three groups; full address 0000:0015:0000:0000:0000:0001:0012:1213</td></tr><tr><td>Re-exam Q2(a), CRC</td><td>Scheme gives CRC 100 but once prints transmitted frame 110010111</td><td>CRC is 100 and frame is 110010100; receiver division is zero</td></tr><tr><td>Re-exam Q6(b), ALOHA</td><td>Scheme multiplies offered frames/s by normalized S for the 500 and 250 cases</td><td>Successful frames/s = S/T = offered rate × e^(−2G); results approximately 183.94 and 151.63 frames/s</td></tr><tr><td>Re-exam Q6(c), transport comparison</td><td>Scheme implies a universal UDP/TCP/SCTP speed ranking</td><td>Explain overhead/features; real performance depends on workload and network</td></tr><tr><td>Bucket descriptions</td><td>Output described as constant regardless of whether data exists</td><td>A data queue drains at configured rate only while nonempty; no packets are created</td></tr><tr><td>Current syllabus Unit 3</td><td>Printed CDMA/CA in the random-access list</td><td>Teach standard CSMA/CA and disclose the apparent typo; CDMA is a separate method</td></tr></tbody></table><p>The question paper fixes the question. An inconsistent scheme is not copied into a solved answer. Arithmetic checks and protocol references support the corrections.</p>"},{"id":"question-map","title":"Every paper: question, unit, marks and solved answer","html":"<h2>Use this map with the solved papers</h2><p>Each row links directly to the full question and its answer. <strong>Offered marks</strong> count all printed choices; <strong>attempted marks</strong> are the marks you are allowed to answer. Unit totals below describe what appeared on that paper, not a prediction or a compulsory unit-wise distribution.</p>\r\n<p><strong>Types:</strong> Numerical = calculations; Theory = explain/compare; Mixed = calculations with explanation; Case = apply or design a system. A case can contain substantial calculation.</p>\r\n<h2>2026-02-04 · Re-examination · current 2025–26 paper</h2>\r\n<p><strong>100 marks to attempt; 140 marks offered.</strong> Q1 compulsory; choose any four complete questions from Q2–Q7. Each whole question carries 20 marks.</p>\r\n<p><strong>Offered marks by current unit:</strong> Unit 1: 10, Unit 2: 10, Unit 3: 30, Unit 4: 40, Unit 5: 30, Unit 6: 20. Unspecified internal task marks are not split or guessed.</p>\r\n<div class=\"table-wrap\"><table><thead><tr><th>Question</th><th>Marks</th><th>Current unit and topic</th><th>Type</th><th>Answer</th></tr></thead><tbody>\r\n<tr><td><strong>Q1(a)</strong></td><td>5</td><td>Unit 1 · Client-server and peer-to-peer models</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-reexam/q1a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(b)</strong></td><td>5</td><td>Unit 2 · TCP/IP reference model</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-reexam/q1b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(c)</strong></td><td>5</td><td>Unit 3 · Pure ALOHA throughput</td><td>Mixed</td><td><a href=\"#tee/papers/tee-paper-reexam/q1c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(d)</strong></td><td>5</td><td>Unit 4 · IPv4 CIDR address block</td><td>Numerical</td><td><a href=\"#tee/papers/tee-paper-reexam/q1d\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(a)</strong></td><td>10</td><td>Unit 3 · CRC polynomial division</td><td>Numerical</td><td><a href=\"#tee/papers/tee-paper-reexam/q2a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(b)</strong></td><td>10</td><td>Unit 4 · VLSM subnet allocation</td><td>Numerical</td><td><a href=\"#tee/papers/tee-paper-reexam/q2b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(a)</strong></td><td>5</td><td>Unit 1 · Network definition and topology</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-reexam/q3a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(b)</strong></td><td>5</td><td>Unit 4 · OSPF shortest-path calculation</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-reexam/q3b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(c)</strong></td><td>10</td><td>Unit 6 · DNS namespace and resolution</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-reexam/q3c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(a)</strong></td><td>10</td><td>Unit 4 · IPv6 packet header</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-reexam/q4a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(b)</strong></td><td>10</td><td>Unit 5 · TCP connection lifecycle</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-reexam/q4b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(a)</strong></td><td>10</td><td>Unit 3 · Go-Back-N normal, loss and ACK cases</td><td>Mixed</td><td><a href=\"#tee/papers/tee-paper-reexam/q5a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(b)</strong></td><td>10</td><td>Unit 6 · FTP control/data connections</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-reexam/q5b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(a)</strong></td><td>5</td><td>Unit 2 · Guided/unguided media and optical fibre</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-reexam/q6a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(b)</strong></td><td>5</td><td>Unit 3 · Pure ALOHA at three offered loads</td><td>Numerical</td><td><a href=\"#tee/papers/tee-paper-reexam/q6b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(c)</strong></td><td>10</td><td>Unit 5 · UDP, TCP and SCTP comparison</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-reexam/q6c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(a)</strong></td><td>10</td><td>Unit 4 · Bellman-Ford shortest path</td><td>Numerical</td><td><a href=\"#tee/papers/tee-paper-reexam/q7a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(b)</strong></td><td>10</td><td>Unit 5 · Leaky bucket versus token bucket</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-reexam/q7b\">Full solution</a></td></tr>\r\n</tbody></table></div>\r\n<h2>2025-12-05 · Final examination · current 2025–26 paper</h2>\r\n<p><strong>100 marks to attempt; 140 marks offered.</strong> Q1 compulsory; choose any four complete questions from Q2–Q7. Each whole question carries 20 marks.</p>\r\n<p><strong>Offered marks by current unit:</strong> Unit 1: 5, Unit 2: 15, Unit 3: 30, Unit 4: 40, Unit 5: 30, Unit 6: 20. Unspecified internal task marks are not split or guessed.</p>\r\n<div class=\"table-wrap\"><table><thead><tr><th>Question</th><th>Marks</th><th>Current unit and topic</th><th>Type</th><th>Answer</th></tr></thead><tbody>\r\n<tr><td><strong>Q1(a)</strong></td><td>5</td><td>Unit 2 · Wired and wireless media</td><td>Case</td><td><a href=\"#tee/papers/tee-paper-final/q1a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(b)</strong></td><td>5</td><td>Unit 2 · OSI and TCP/IP models</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-final/q1b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(c)</strong></td><td>5</td><td>Unit 3 · Slotted ALOHA throughput</td><td>Mixed</td><td><a href=\"#tee/papers/tee-paper-final/q1c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(d)</strong></td><td>5</td><td>Unit 4 · IPv4 CIDR address block</td><td>Numerical</td><td><a href=\"#tee/papers/tee-paper-final/q1d\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(a)</strong></td><td>10<br><small>i: 2; ii: 2; iii: 2; iv: 4</small></td><td>Unit 3 · Block coding and Hamming distance</td><td>Mixed</td><td><a href=\"#tee/papers/tee-paper-final/q2a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(b)</strong></td><td>10</td><td>Unit 4 · Circuit, message and packet switching</td><td>Case</td><td><a href=\"#tee/papers/tee-paper-final/q2b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(a)</strong></td><td>5</td><td>Unit 1 · Network classifications and ARPANET</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-final/q3a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(b)</strong></td><td>5</td><td>Unit 4 · OSPF packet types</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-final/q3b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(c)</strong></td><td>10</td><td>Unit 6 · WWW and HTTP</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-final/q3c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(a)</strong></td><td>10</td><td>Unit 4 · IPv6 expansion and header</td><td>Mixed</td><td><a href=\"#tee/papers/tee-paper-final/q4a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(b)</strong></td><td>10</td><td>Unit 5 · UDP and TCP</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-final/q4b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(a)</strong></td><td>10</td><td>Unit 3 · Selective Repeat sequence space and windows</td><td>Mixed</td><td><a href=\"#tee/papers/tee-paper-final/q5a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(b)</strong></td><td>10</td><td>Unit 6 · SMTP phases</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-final/q5b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(a)</strong></td><td>5</td><td>Unit 2 · Unguided transmission media</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-final/q6a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(b)</strong></td><td>5</td><td>Unit 3 · CSMA persistence</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-final/q6b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(c)</strong></td><td>10</td><td>Unit 5 · Open-loop and closed-loop congestion control</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-final/q6c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(a)</strong></td><td>10</td><td>Unit 4 · Dijkstra shortest path</td><td>Numerical</td><td><a href=\"#tee/papers/tee-paper-final/q7a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(b)</strong></td><td>10</td><td>Unit 5 · Token bucket</td><td>Theory</td><td><a href=\"#tee/papers/tee-paper-final/q7b\">Full solution</a></td></tr>\r\n</tbody></table></div>\r\n<h2>2025-12-05 · Re-examination · 2022-23</h2>\r\n<p><strong>100 marks to attempt; 140 marks offered.</strong> Q1 compulsory; attempt any four of Q2–Q7. All whole questions carry 20 marks. 2022-23</p>\r\n<p><strong>Offered marks by current unit:</strong> Unit 1: 20, Unit 3: 30, Unit 4: 40, Unit 5: 25, Unit 6: 10. Unspecified internal task marks are not split or guessed.</p>\r\n<div class=\"table-wrap\"><table><thead><tr><th>Question</th><th>Marks</th><th>Current unit and topic</th><th>Type</th><th>Answer</th></tr></thead><tbody>\r\n<tr><td><strong>Q1(a)</strong></td><td>5</td><td>Unit 1 · Network definition</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-legacy-reexam/q1a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(b)</strong></td><td>5</td><td>Unit 3 · Error control</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-legacy-reexam/q1b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(c)</strong></td><td>5</td><td>Unit 4 · Classful IPv4</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-legacy-reexam/q1c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(d)</strong></td><td>5</td><td>Unit 5 · UDP features</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-legacy-reexam/q1d\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(a)</strong></td><td>10</td><td>Unit 1 · Network topologies</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-legacy-reexam/q2a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(b)</strong></td><td>10</td><td>Unit 3 · Stop-and-Wait versus Go-Back-N</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-legacy-reexam/q2b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(a)</strong></td><td>10</td><td>FDMA and TDMA<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q3(b)</strong></td><td>10<br><small>i: 5; ii: 5</small></td><td>Unit 4 · Classful net/host IDs and /26 host</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2025-legacy-reexam/q3b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(a)</strong></td><td>10</td><td>Unit 3 · CSMA persistence and CSMA/CD</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-legacy-reexam/q4a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(b)</strong></td><td>10</td><td>Unit 4 · OSPF and link types</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-legacy-reexam/q4b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(a)</strong></td><td>10</td><td>Unit 4 · Dijkstra algorithm</td><td>Mixed</td><td><a href=\"#tee/papers/paper-2025-legacy-reexam/q5a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(b)</strong></td><td>10</td><td>Unit 5 · Congestion control</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-legacy-reexam/q5b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(a)</strong></td><td>10</td><td>Unit 5 · TCP phases</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-legacy-reexam/q6a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(b)</strong></td><td>10</td><td>Unit 6 · DNS hierarchy and resolution</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-legacy-reexam/q6b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(a)</strong></td><td>5</td><td>Unit 1 · Network classifications</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-legacy-reexam/q7a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(b)</strong></td><td>5</td><td>Unit 3 · Block coding</td><td>Mixed</td><td><a href=\"#tee/papers/paper-2025-legacy-reexam/q7b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(c)</strong></td><td>5</td><td>Unit 4 · ARP</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-legacy-reexam/q7c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(d)</strong></td><td>5</td><td>Unit 6 · SMTP and SNMP<br><small>partly current syllabus</small></td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-legacy-reexam/q7d\">Full solution</a></td></tr>\r\n</tbody></table></div>\r\n<h2>2025-02-19 · Re-examination · 2023-24 / 2024-25</h2>\r\n<p><strong>100 marks to attempt; 140 marks offered.</strong> Q1 compulsory; attempt any four of Q2–Q7. All whole questions carry 20 marks. 2023-24 / 2024-25</p>\r\n<p><strong>Offered marks by current unit:</strong> Unit 1: 10, Unit 2: 10, Unit 3: 35, Unit 4: 40, Unit 5: 25, Unit 6: 20. Unspecified internal task marks are not split or guessed.</p>\r\n<div class=\"table-wrap\"><table><thead><tr><th>Question</th><th>Marks</th><th>Current unit and topic</th><th>Type</th><th>Answer</th></tr></thead><tbody>\r\n<tr><td><strong>Q1(a)</strong></td><td>5</td><td>Unit 2 · TCP/IP network and transport layers</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-feb-reexam/q1a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(b)</strong></td><td>5</td><td>Unit 3 · Stop-and-Wait losses</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-feb-reexam/q1b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(c)</strong></td><td>5</td><td>Unit 5 · SCTP services</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-feb-reexam/q1c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(d)</strong></td><td>5</td><td>Unit 4 · Message versus packet switching</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-feb-reexam/q1d\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(a)</strong></td><td>10</td><td>Unit 1 · Star and mesh</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-feb-reexam/q2a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(b)</strong></td><td>10</td><td>Unit 3 · CSMA/CA and RTS/CTS</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-feb-reexam/q2b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(a)</strong></td><td>10</td><td>Unit 5 · TCP connection lifecycle</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-feb-reexam/q3a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(b)</strong></td><td>10</td><td>Unit 4 · VLSM customer allocation</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2025-feb-reexam/q3b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(a)</strong></td><td>10</td><td>Unit 6 · DNS resolution</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-feb-reexam/q4a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(b)</strong></td><td>10</td><td>Unit 4 · RIP route updates</td><td>Mixed</td><td><a href=\"#tee/papers/paper-2025-feb-reexam/q4b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(a)</strong></td><td>10</td><td>Unit 3 · Pure versus slotted ALOHA</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-feb-reexam/q5a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(b)</strong></td><td>10</td><td>Unit 5 · Congestion policies</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-feb-reexam/q5b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(a)</strong></td><td>10</td><td>Unit 4 · Dijkstra six-node graph</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2025-feb-reexam/q6a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(b)</strong></td><td>10</td><td>Unit 3 · CRC</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2025-feb-reexam/q6b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(a)</strong></td><td>5</td><td>Unit 2 · Guided versus unguided media</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-feb-reexam/q7a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(b)</strong></td><td>5</td><td>Unit 4 · IPv4 /26 block</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2025-feb-reexam/q7b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(c)</strong></td><td>10</td><td>Unit 6 · FTP connections</td><td>Theory</td><td><a href=\"#tee/papers/paper-2025-feb-reexam/q7c\">Full solution</a></td></tr>\r\n</tbody></table></div>\r\n<p><strong>Source qualification:</strong> The PDF has four pages; the fourth is blank. The handwritten date ends in 2025 over a printed 2024 template.</p>\r\n<h2>2024-12-06 · Final / re-examination · Final 2024-25 / Re-exam 2023-24</h2>\r\n<p><strong>100 marks to attempt; 140 marks offered.</strong> Q1 compulsory; attempt any four of Q2–Q7. All whole questions carry 20 marks. Final 2024-25 / Re-exam 2023-24</p>\r\n<p><strong>Offered marks by current unit:</strong> Unit 1: 10, Unit 2: 10, Unit 3: 35, Unit 4: 40, Unit 5: 25, Unit 6: 20. Unspecified internal task marks are not split or guessed.</p>\r\n<div class=\"table-wrap\"><table><thead><tr><th>Question</th><th>Marks</th><th>Current unit and topic</th><th>Type</th><th>Answer</th></tr></thead><tbody>\r\n<tr><td><strong>Q1(a)</strong></td><td>5</td><td>Unit 1 · LAN MAN WAN</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-final/q1a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(b)</strong></td><td>5</td><td>Unit 3 · Selective Repeat versus Go-Back-N</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-final/q1b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(c)</strong></td><td>5</td><td>Unit 5 · TCP versus UDP</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-final/q1c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(d)</strong></td><td>5</td><td>Unit 4 · DHCP</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-final/q1d\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(a)</strong></td><td>10</td><td>Unit 2 · OSI model</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-final/q2a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(b)</strong></td><td>10</td><td>Unit 3 · CSMA/CD</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-final/q2b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(a)</strong></td><td>10</td><td>Unit 6 · SMTP phases</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-final/q3a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(b)</strong></td><td>10</td><td>Unit 4 · OSPF and link types</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-final/q3b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(a)</strong></td><td>10</td><td>Unit 3 · CRC and corrupted frame</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-final/q4a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(b)</strong></td><td>10</td><td>Unit 5 · UDP and applications</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-final/q4b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(a)</strong></td><td>5</td><td>Unit 1 · Network models</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-final/q5a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(b)</strong></td><td>5</td><td>Unit 6 · DNS hierarchy</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-final/q5b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(c)</strong></td><td>10</td><td>Unit 4 · Bellman-Ford example</td><td>Mixed</td><td><a href=\"#tee/papers/paper-2024-final/q5c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(a)</strong></td><td>10</td><td>Unit 3 · Pure ALOHA rates</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-final/q6a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(b)</strong></td><td>10</td><td>Unit 4 · VLSM groups</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-final/q6b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(a)</strong></td><td>10</td><td>Unit 5 · Leaky versus token bucket</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-final/q7a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(b)</strong></td><td>5</td><td>Unit 6 · HTTP</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-final/q7b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(c)</strong></td><td>5</td><td>Unit 4 · Distance vector versus link state</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-final/q7c\">Full solution</a></td></tr>\r\n</tbody></table></div>\r\n<h2>2024-12-06 · Final / re-examination · AI-only Sem V variant</h2>\r\n<p><strong>100 marks to attempt; 140 marks offered.</strong> Q1 compulsory; attempt any four remaining complete questions. AI-only Sem V variant</p>\r\n<p><strong>Offered marks by current unit:</strong> Unit 3: 25, Unit 4: 50, Unit 5: 10, Unit 6: 25. Unspecified internal task marks are not split or guessed.</p>\r\n<div class=\"table-wrap\"><table><thead><tr><th>Question</th><th>Marks</th><th>Current unit and topic</th><th>Type</th><th>Answer</th></tr></thead><tbody>\r\n<tr><td><strong>Q1(a)</strong></td><td>5</td><td>Unit 4 · Mission-critical switching choice</td><td>Case</td><td><a href=\"#tee/papers/paper-2024-ai-final/q1a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(b)</strong></td><td>5</td><td>Unit 4 · Store-and-forward delay</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-ai-final/q1b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(c)</strong></td><td>5</td><td>Unit 4 · Classful versus classless addressing</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-ai-final/q1c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(d)</strong></td><td>5</td><td>BGP AS-PATH<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q2(a)</strong></td><td>10</td><td>Unit 6 · Webmail and POP3 protocol journey</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-ai-final/q2a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(b)</strong></td><td>5</td><td>CDN Bring Home<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q2(c)</strong></td><td>5</td><td>Unit 4 · ARP response destination</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-ai-final/q2c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(a)</strong></td><td>10</td><td>Unit 4 · Store-and-forward caravan</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-ai-final/q3a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(b)</strong></td><td>5</td><td>Unit 4 · Count to infinity</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-ai-final/q3b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(c)</strong></td><td>5</td><td>Unit 5 · Reliable application over UDP</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-ai-final/q3c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(a)</strong></td><td>5</td><td>Unit 3 · CRC codeword</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-ai-final/q4a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(b)</strong></td><td>5</td><td>Unit 5 · Internet checksum</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-ai-final/q4b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(c)</strong></td><td>10</td><td>Unit 3 · Hamming generation and correction</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-ai-final/q4c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(a)</strong></td><td>10</td><td>Unit 6 · Persistent HTTP cache delay</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-ai-final/q5a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(b)</strong></td><td>5</td><td>Unit 6 · Iterative DNS resolution</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-ai-final/q5b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(c)</strong></td><td>5</td><td>Unit 4 · Longest-prefix matching</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-ai-final/q5c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(a)</strong></td><td>5</td><td>Unit 4 · Classful network and host portions</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-ai-final/q6a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(b)</strong></td><td>5</td><td>Unit 3 · CSMA without collision detection</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-ai-final/q6b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(c)</strong></td><td>5</td><td>Unit 4 · Recovering unknown routing weights</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-ai-final/q6c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(d)</strong></td><td>5</td><td>Unit 3 · ALOHA comparison</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-ai-final/q6d\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(a)</strong></td><td>10</td><td>Learning-switch tables, mislabeled ARP<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q7(b)</strong></td><td>10</td><td>NAT four packet stages<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n</tbody></table></div>\r\n<h2>2024-02-06 · Re-examination · 2022-23</h2>\r\n<p><strong>100 marks to attempt; 140 marks offered.</strong> Q1 compulsory; attempt any four of Q2–Q7. All whole questions carry 20 marks. 2022-23</p>\r\n<p><strong>Offered marks by current unit:</strong> Unit 1: 10, Unit 2: 10, Unit 3: 35, Unit 4: 40, Unit 5: 25, Unit 6: 20. Unspecified internal task marks are not split or guessed.</p>\r\n<div class=\"table-wrap\"><table><thead><tr><th>Question</th><th>Marks</th><th>Current unit and topic</th><th>Type</th><th>Answer</th></tr></thead><tbody>\r\n<tr><td><strong>Q1(a)</strong></td><td>5</td><td>Unit 5 · TCP versus UDP</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-reexam/q1a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(b)</strong></td><td>5</td><td>Unit 2 · Guided media</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-reexam/q1b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(c)</strong></td><td>5</td><td>Unit 3 · CSMA persistence</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-reexam/q1c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(d)</strong></td><td>5</td><td>Unit 4 · Circuit versus packet switching</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-reexam/q1d\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(a)</strong></td><td>10</td><td>Unit 5 · QoS and scheduling</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-reexam/q2a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(b)</strong></td><td>10</td><td>Unit 3 · Slotted ALOHA rates</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-feb-reexam/q2b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(a)</strong></td><td>10</td><td>Unit 3 · CSMA/CA</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-reexam/q3a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(b)</strong></td><td>10</td><td>Unit 4 · RIP and timers</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-reexam/q3b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(a)</strong></td><td>10</td><td>Unit 5 · TCP lifecycle</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-reexam/q4a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(b)</strong></td><td>10</td><td>Unit 6 · DNS resolution</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-reexam/q4b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(a)</strong></td><td>10</td><td>Unit 3 · Go-Back-N scenarios</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-reexam/q5a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(b)</strong></td><td>5</td><td>Unit 6 · FTP connections</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-reexam/q5b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(c)</strong></td><td>5</td><td>Unit 4 · DHCP dynamic allocation</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-reexam/q5c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(a)</strong></td><td>10</td><td>Unit 4 · VLSM and noncanonical block address</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-feb-reexam/q6a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(b)</strong></td><td>5</td><td>Unit 6 · SMTP</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-reexam/q6b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(c)</strong></td><td>5</td><td>Unit 2 · TCP/IP layers</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-reexam/q6c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(a)</strong></td><td>10</td><td>Unit 4 · Dijkstra graph</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-feb-reexam/q7a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(b)</strong></td><td>10</td><td>Unit 1 · Four network topologies</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-reexam/q7b\">Full solution</a></td></tr>\r\n</tbody></table></div>\r\n<h2>2024-02-06 · Re-examination · AI-only Sem V variant</h2>\r\n<p><strong>100 marks to attempt; 140 marks offered.</strong> Q1 compulsory; attempt any four remaining complete questions. AI-only Sem V variant</p>\r\n<p><strong>Offered marks by current unit:</strong> Unit 3: 35, Unit 4: 40, Unit 5: 15, Unit 6: 15. Unspecified internal task marks are not split or guessed.</p>\r\n<div class=\"table-wrap\"><table><thead><tr><th>Question</th><th>Marks</th><th>Current unit and topic</th><th>Type</th><th>Answer</th></tr></thead><tbody>\r\n<tr><td><strong>Q1(a)</strong></td><td>5</td><td>Unit 4 · Subnet mask</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-ai-reexam/q1a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(b)</strong></td><td>5</td><td>Unit 5 · Additional shared bottleneck</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-feb-ai-reexam/q1b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(c)</strong></td><td>5</td><td>Unit 6 · HTTP/1.1 delay</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-feb-ai-reexam/q1c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(d)</strong></td><td>5</td><td>Confidentiality versus integrity<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q2(a)</strong></td><td>10</td><td>Unit 4 · Dijkstra from w</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-feb-ai-reexam/q2a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(b)</strong></td><td>5</td><td>Unit 5 · Telnet connection ports</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-ai-reexam/q2b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(c)</strong></td><td>5</td><td>SDN routing application<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q3(a)</strong></td><td>5</td><td>Unit 3 · rdt3.0 error recovery</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-ai-reexam/q3a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(b)</strong></td><td>5</td><td>Unit 6 · DNS cache popularity</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-ai-reexam/q3b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(c)</strong></td><td>5</td><td>TLS impersonation<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q3(d)</strong></td><td>5</td><td>TLS nonces<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q4(a)</strong></td><td>10</td><td>Unit 4 · Distance vector at z</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-feb-ai-reexam/q4a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(b)</strong></td><td>5</td><td>Cryptographic attack models<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q4(c)</strong></td><td>5</td><td>CDN design<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q5(a)</strong></td><td>10</td><td>Unit 3 · Hamming error detection</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-feb-ai-reexam/q5a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(b)</strong></td><td>5</td><td>Unit 3 · CRC and damaged message</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-feb-ai-reexam/q5b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(c)</strong></td><td>5</td><td>Unit 5 · 8-bit checksum</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-feb-ai-reexam/q5c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(a)</strong></td><td>5</td><td>Unit 3 · Pure ALOHA timeline</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-feb-ai-reexam/q6a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(b)</strong></td><td>5</td><td>Unit 4 · Distance-vector link change</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2024-feb-ai-reexam/q6b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(c)</strong></td><td>5</td><td>Polling and token passing<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q6(d)</strong></td><td>5</td><td>Unit 4 · Classful and IPv6 addresses</td><td>Mixed</td><td><a href=\"#tee/papers/paper-2024-feb-ai-reexam/q6d\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(a)</strong></td><td>5</td><td>Unit 4 · Network delay components</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-ai-reexam/q7a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(b)</strong></td><td>5</td><td>Unit 6 · Webmail to IMAP recipient</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-ai-reexam/q7b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(c)</strong></td><td>10</td><td>Unit 3 · Selective Repeat implementation</td><td>Theory</td><td><a href=\"#tee/papers/paper-2024-feb-ai-reexam/q7c\">Full solution</a></td></tr>\r\n</tbody></table></div>\r\n<h2>2023-11-22 · Final / re-examination · Final 2023-24 / Re-exam 2022-23</h2>\r\n<p><strong>100 marks to attempt; 140 marks offered.</strong> Q1 compulsory; attempt any four of Q2–Q7. All whole questions carry 20 marks. Final 2023-24 / Re-exam 2022-23</p>\r\n<p><strong>Offered marks by current unit:</strong> Unit 1: 10, Unit 2: 10, Unit 3: 35, Unit 4: 40, Unit 5: 25, Unit 6: 20. Unspecified internal task marks are not split or guessed.</p>\r\n<div class=\"table-wrap\"><table><thead><tr><th>Question</th><th>Marks</th><th>Current unit and topic</th><th>Type</th><th>Answer</th></tr></thead><tbody>\r\n<tr><td><strong>Q1(a)</strong></td><td>5</td><td>Unit 1 · Network classification</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-final/q1a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(b)</strong></td><td>5</td><td>Unit 3 · ALOHA and vulnerable periods</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-final/q1b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(c)</strong></td><td>5</td><td>Unit 4 · Classful addressing</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-final/q1c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(d)</strong></td><td>5</td><td>Unit 5 · UDP applications</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-final/q1d\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(a)</strong></td><td>10</td><td>Unit 6 · SMTP phases</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-final/q2a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(b)</strong></td><td>10</td><td>Unit 2 · OSI layers</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-final/q2b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(a)</strong></td><td>5</td><td>Unit 1 · Network models</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-final/q3a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(b)</strong></td><td>10</td><td>Unit 3 · CSMA/CD</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-final/q3b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(c)</strong></td><td>5</td><td>Unit 4 · OSPF routing</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-final/q3c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(a)</strong></td><td>10</td><td>Unit 5 · Traffic shaping buckets</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-final/q4a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(b)</strong></td><td>10</td><td>Unit 3 · Selective Repeat scenarios</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-final/q4b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(a)</strong></td><td>10</td><td>Unit 4 · VLSM two groups</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-final/q5a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(b)</strong></td><td>5</td><td>Unit 6 · FTP</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-final/q5b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(c)</strong></td><td>5</td><td>Unit 4 · ARP</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-final/q5c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(a)</strong></td><td>10</td><td>Unit 3 · CRC</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-final/q6a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(b)</strong></td><td>5</td><td>Unit 4 · IPv4 /26 block</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-final/q6b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(c)</strong></td><td>5</td><td>Unit 6 · DNS hierarchy</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-final/q6c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(a)</strong></td><td>10</td><td>Unit 4 · Bellman-Ford directed graph</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-final/q7a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(b)</strong></td><td>10</td><td>Unit 5 · Congestion control</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-final/q7b\">Full solution</a></td></tr>\r\n</tbody></table></div>\r\n<p><strong>Source qualification:</strong> Header says 02 pages, but the paper continues through printed Page 3 of 3; all three are included.</p>\r\n<h2>2023-11-22 · Final / re-examination · AI-only Sem V variant; incomplete recovered scan</h2>\r\n<p><strong>100 marks to attempt; 105 printed marks recovered; complete offered total unknown.</strong> Q1 compulsory; attempt any four remaining complete questions. AI-only Sem V variant; incomplete recovered scan</p>\r\n<p><strong>Offered marks by current unit:</strong> Unit 3: 25, Unit 4: 20, Unit 5: 10, Unit 6: 10. Unspecified internal task marks are not split or guessed.</p>\r\n<div class=\"table-wrap\"><table><thead><tr><th>Question</th><th>Marks</th><th>Current unit and topic</th><th>Type</th><th>Answer</th></tr></thead><tbody>\r\n<tr><td><strong>Q1(a)</strong></td><td>5</td><td>Unit 4 · Subnetting and masks</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-ai-partial/q1a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(b)</strong></td><td>5</td><td>Unit 5 · Shared bottleneck throughput</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-ai-partial/q1b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(c)</strong></td><td>5</td><td>Unit 6 · HTTP/1.0 delay</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-ai-partial/q1c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(d)</strong></td><td>5</td><td>Cryptographic hash versus checksum<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q2(a)</strong></td><td>10</td><td>Unit 3 · Hamming error correction</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-ai-partial/q2a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(b)</strong></td><td>5</td><td>Unit 3 · CRC encoding</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-ai-partial/q2b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(c)</strong></td><td>5</td><td>Unit 3 · Framing</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-ai-partial/q2c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(a)</strong></td><td>5</td><td>Unit 3 · Alternating-bit state transitions</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-ai-partial/q3a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(b)</strong></td><td>5</td><td>Stateful packet filtering<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q3(c)</strong></td><td>5</td><td>Unit 6 · DNS cache inference</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-ai-partial/q3c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(d)</strong></td><td>5</td><td>Unit 4 · IPv4 address classes</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-ai-partial/q3d\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(a)</strong></td><td>10</td><td>Unit 4 · Dijkstra from u</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-ai-partial/q4a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(b)</strong></td><td>5</td><td>Unit 5 · TCP socket port numbers</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-ai-partial/q4b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(c)</strong></td><td>5</td><td>SDN control-plane layers<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q5(a)</strong></td><td>10</td><td>BGP topology views<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q5(b)</strong></td><td>5</td><td>Symmetric and public-key cryptography<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q5(c)</strong></td><td>5</td><td>CDN placement and server selection<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q6(a)</strong></td><td>5</td><td>Unit 3 · Incomplete multiple-access question<br><small>source incomplete</small></td><td>Numerical</td><td>unavailable: missing source continuation</td></tr>\r\n</tbody></table></div>\r\n<p><strong>Source qualification:</strong> Header states six pages, but the recovered PDF has only pages 1–5. Q6(a) stops before the requested protocol/tasks; page 6 and any subsequent questions are unavailable. No missing text or marks have been invented.</p>\r\n<h2>2023-01-27 · Re-examination · AI-only Sem V</h2>\r\n<p><strong>100 marks to attempt; 140 marks offered.</strong> Q1 compulsory; attempt any four remaining complete questions. AI-only Sem V</p>\r\n<p><strong>Offered marks by current unit:</strong> Unit 3: 39, Unit 4: 20, Unit 5: 26, Unit 6: 25. Unspecified internal task marks are not split or guessed.</p>\r\n<div class=\"table-wrap\"><table><thead><tr><th>Question</th><th>Marks</th><th>Current unit and topic</th><th>Type</th><th>Answer</th></tr></thead><tbody>\r\n<tr><td><strong>Q1(a)</strong></td><td>5</td><td>Unit 5 · Shared bottleneck throughput</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-jan-ai-reexam/q1a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(b)</strong></td><td>5</td><td>Unit 3 · Ideal broadcast channel and slotted ALOHA</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-jan-ai-reexam/q1b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(c)</strong></td><td>5</td><td>Unit 5 · Round-robin scheduling</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-jan-ai-reexam/q1c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(d)</strong></td><td>5</td><td>Unit 5 · TCP congestion control</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-jan-ai-reexam/q1d\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(a)</strong></td><td>10</td><td>Unit 6 · Persistent HTTP delay</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-jan-ai-reexam/q2a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(b)(i)</strong></td><td>5</td><td>Unit 3 · Block-code received words</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-jan-ai-reexam/q2bi\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(b)(ii)</strong></td><td>5</td><td>Unit 3 · CRC and syndrome</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-jan-ai-reexam/q2bii\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(a)</strong></td><td>10</td><td>Unit 4 · Dijkstra from u</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-jan-ai-reexam/q3a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(b)(i)</strong></td><td>4</td><td>Unit 3 · Why rdt3.0 needs a timer</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-jan-ai-reexam/q3bi\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(b)(ii)</strong></td><td>6</td><td>Unit 5 · Internet checksum</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-jan-ai-reexam/q3bii\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(a)</strong></td><td>10</td><td>Unit 3 · Alternating-bit data and ACK sequence</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-jan-ai-reexam/q4a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(b)</strong></td><td>10</td><td>Unit 6 · HTTP/2 multiplexing versus HTTP/1.1</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-jan-ai-reexam/q4b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q5(a)</strong></td><td>10</td><td>BGP export policy<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q5(b)(i)</strong></td><td>5</td><td>HFC access<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q5(b)(ii)</strong></td><td>5</td><td>Wireless access technologies<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q6(a)</strong></td><td>10</td><td>Unit 3 · Slotted ALOHA arrival timeline</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-jan-ai-reexam/q6a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(b)</strong></td><td>10</td><td>Unit 4 · ISP VLSM allocation</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2023-jan-ai-reexam/q6b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(a)</strong></td><td>5</td><td>TDM versus FDM<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q7(b)</strong></td><td>5</td><td>Unit 6 · HTTP state</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-jan-ai-reexam/q7b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(c)</strong></td><td>5</td><td>Unit 5 · TCP server sockets</td><td>Theory</td><td><a href=\"#tee/papers/paper-2023-jan-ai-reexam/q7c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(d)</strong></td><td>5</td><td>NAT translated flow<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n</tbody></table></div>\r\n<h2>2022-11-16 · Final examination · AI-only Sem V</h2>\r\n<p><strong>100 marks to attempt; 140 marks offered.</strong> Q1 compulsory; attempt any four remaining complete questions. AI-only Sem V</p>\r\n<p><strong>Offered marks by current unit:</strong> Unit 2: 5, Unit 3: 35, Unit 4: 35, Unit 5: 20, Unit 6: 15. Unspecified internal task marks are not split or guessed.</p>\r\n<div class=\"table-wrap\"><table><thead><tr><th>Question</th><th>Marks</th><th>Current unit and topic</th><th>Type</th><th>Answer</th></tr></thead><tbody>\r\n<tr><td><strong>Q1(a)</strong></td><td>5</td><td>Unit 4 · Store-and-forward delay</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2022-ai-final/q1a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(b)</strong></td><td>5</td><td>Token passing and ideal broadcast access<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q1(c)</strong></td><td>5</td><td>Unit 5 · Priority scheduling</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2022-ai-final/q1c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q1(d)</strong></td><td>5</td><td>Unit 5 · TCP flow control</td><td>Theory</td><td><a href=\"#tee/papers/paper-2022-ai-final/q1d\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(a)</strong></td><td>10</td><td>Unit 6 · HTTP delay comparison</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2022-ai-final/q2a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(b)(i)</strong></td><td>4</td><td>Unit 3 · Block coding capacity</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2022-ai-final/q2bi\">Full solution</a></td></tr>\r\n<tr><td><strong>Q2(b)(ii)</strong></td><td>6</td><td>Unit 3 · CRC encoder and decoder</td><td>Theory</td><td><a href=\"#tee/papers/paper-2022-ai-final/q2bii\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(a)</strong></td><td>10</td><td>Unit 4 · Dijkstra from t</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2022-ai-final/q3a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(b)(i)</strong></td><td>5</td><td>Unit 5 · UDP checksum limitations</td><td>Theory</td><td><a href=\"#tee/papers/paper-2022-ai-final/q3bi\">Full solution</a></td></tr>\r\n<tr><td><strong>Q3(b)(ii)</strong></td><td>5</td><td>Unit 5 · TCP demultiplexing</td><td>Theory</td><td><a href=\"#tee/papers/paper-2022-ai-final/q3bii\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(a)</strong></td><td>10</td><td>Unit 3 · rdt3.0 global transition sequence</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2022-ai-final/q4a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q4(b)(i)</strong></td><td>5</td><td>CDN placement<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q4(b)(ii)</strong></td><td>5</td><td>CDN server selection<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q5(a)</strong></td><td>10</td><td>BGP path views<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q5(b)(i)</strong></td><td>5</td><td>Access technologies<br><small>outside current syllabus</small></td><td>Theory</td><td>excluded: outside current syllabus</td></tr>\r\n<tr><td><strong>Q5(b)(ii)</strong></td><td>5</td><td>Unit 2 · Ethernet physical media</td><td>Theory</td><td><a href=\"#tee/papers/paper-2022-ai-final/q5bii\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(a)</strong></td><td>10</td><td>Unit 3 · CSMA/CD arrival timeline</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2022-ai-final/q6a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(b)(i)</strong></td><td>5</td><td>Unit 4 · Classful addresses and masks</td><td>Theory</td><td><a href=\"#tee/papers/paper-2022-ai-final/q6bi\">Full solution</a></td></tr>\r\n<tr><td><strong>Q6(b)(ii)</strong></td><td>5</td><td>Unit 4 · CIDR block</td><td>Numerical</td><td><a href=\"#tee/papers/paper-2022-ai-final/q6bii\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(a)</strong></td><td>5</td><td>Unit 4 · Circuit switching advantage</td><td>Theory</td><td><a href=\"#tee/papers/paper-2022-ai-final/q7a\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(b)</strong></td><td>5</td><td>Unit 6 · HTTP cookies</td><td>Theory</td><td><a href=\"#tee/papers/paper-2022-ai-final/q7b\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(c)</strong></td><td>5</td><td>Unit 3 · Selective Repeat</td><td>Theory</td><td><a href=\"#tee/papers/paper-2022-ai-final/q7c\">Full solution</a></td></tr>\r\n<tr><td><strong>Q7(d)</strong></td><td>5</td><td>Unit 4 · Destination-based forwarding</td><td>Theory</td><td><a href=\"#tee/papers/paper-2022-ai-final/q7d\">Full solution</a></td></tr>\r\n</tbody></table></div>\r\n<h2>What this evidence does and does not establish</h2><p>Prepare each complete question: choices apply to whole questions, so a strong numerical alone may not cover its paired theory. Repeated topics deserve practice, but the next paper can change the combination. Historical course codes and syllabus changes are kept visible; out-of-syllabus questions are not counted as missing current topics.</p>\r\n<p>Same-date papers can be different programme or batch variants. They are listed separately, so their marks must not be added as if one examination offered all those questions. Duplicate scans are reconciled to one represented paper.</p>"}]},{"id":"tee-paper-final","title":"Final · 5 December 2025","scope":"TEE · Actual TEE paper · all questions · current syllabus 702AI0C023","sections":[{"id":"q1a","title":"Q1A · Wired and wireless campus","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q1A. A university plans to set up a campus network. Apply the concepts of wired and wireless communication to explain how each could be used in this network with respect to speed, reliability and security. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Criterion</th><th scope=\"col\">Wired campus links</th><th scope=\"col\">Wireless campus access</th></tr></thead><tbody><tr><td>Speed/capacity</td><td>Dedicated switch ports and fiber backbones can provide high, predictable capacity</td><td>Capacity shared over radio; performance depends on contention, coverage and interference</td></tr><tr><td>Reliability</td><td>Stable when cables/ports and redundant uplinks are healthy</td><td>Mobility and flexible access; radio interference and coverage holes can cause variability</td></tr><tr><td>Security</td><td>Physical access control helps, but ports still need authentication/segmentation</td><td>Use authenticated encryption and managed access; radio extends beyond rooms</td></tr><tr><td>Deployment</td><td>Cabling cost and fixed access points</td><td>Supports mobile users and faster coverage changes</td></tr><tr><td>Recommended role</td><td>Servers, laboratories, inter-building backbone</td><td>Students’ phones/laptops, roaming and guest access</td></tr></tbody></table><p>Choose a hybrid: wired core/backbone and critical endpoints, with managed access points providing wireless mobility. Separate guest traffic, authenticate users and plan redundant infrastructure. Neither medium alone guarantees security or availability.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A lecture hall uses Wi-Fi for students, while each access point connects by cable to a switch and fiber links the building to campus servers.</p></aside></div></section><p><small>Source: Final · 5 December 2025, original question paper page 1. Original marks retained; solution independently authored.</small></p>"},{"id":"q1b","title":"Q1B · OSI and TCP/IP comparison","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q1B. Compare and contrast the TCP/IP model with the OSI model on any five points. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>The <strong>TCP/IP model</strong> describes the Internet protocol suite in four layers. Many teaching books split the link layer into data link and physical, making a five-layer teaching model; identify the convention before drawing.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-models.5bff0518c8.svg\" width=\"820\" height=\"670\" alt=\"OSI layers mapped to the four-layer TCP/IP model\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Four TCP/IP layers; the link layer includes the physical medium.</figcaption></figure><table><thead><tr><th scope=\"col\">TCP/IP layer</th><th scope=\"col\">Function</th><th scope=\"col\">Examples</th></tr></thead><tbody><tr><td>Application</td><td>Defines application message formats and exchanges for Web access, naming, email and file transfer; includes presentation/session functions as needed</td><td>HTTP, DNS, SMTP, FTP</td></tr><tr><td>Transport</td><td>End-to-end process communication</td><td>TCP, UDP, SCTP</td></tr><tr><td>Internet</td><td>IP addressing, routing and best-effort datagrams</td><td>IPv4/IPv6</td></tr><tr><td>Link/network access</td><td>Local delivery and physical access</td><td>Ethernet/Wi-Fi and their medium</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">OSI</th><th scope=\"col\">TCP/IP</th></tr></thead><tbody><tr><td>Layer count</td><td>Seven</td><td>Four here; five-layer teaching variant splits link</td></tr><tr><td>Upper functions</td><td>Application, presentation, session separated</td><td>Grouped under application</td></tr><tr><td>Lower functions</td><td>Data link and physical separated</td><td>Grouped under link/network access</td></tr><tr><td>Purpose</td><td>General reference architecture</td><td>Architecture of deployed Internet protocol family</td></tr><tr><td>Network service</td><td>Reference model can describe different services</td><td>Internet layer uses connectionless IP</td></tr><tr><td>Transport</td><td>Conceptual transport service</td><td>TCP reliable byte stream; UDP datagrams; SCTP messages</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>An application can use UDP without changing the IP or Ethernet layers. Layering lets one protocol vary without redesigning every network function.</p></aside></div></section><p><small>Source: Final · 5 December 2025, original question paper page 1. Original marks retained; solution independently authored.</small></p>"},{"id":"q1c","title":"Q1C · Slotted ALOHA","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q1C. In a Slotted ALOHA system, the average number of frames generated per frame time is G = 1. Calculate the throughput S. What is the maximum throughput in Slotted ALOHA? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Protocol = Slotted ALOHA; G = 1 attempts/frame time.</p><h2>To find</h2><p>S, 100S and the maximum possible S.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/01e46e63e1b256b9.svg\" alt=\"S=G e^{-G}\" style=\"width:9.999ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><p>Select the formula from the protocol name. The exponent is −G because Slotted ALOHA has a T vulnerable period.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate the exponent</h4><p>−1 × 1 = -1.</p></div><div class=\"step\"><h4>Step 2. Evaluate the exponential</h4><div class=\"math-display\"><img src=\"math/f3e24ac70fcf4336.svg\" alt=\"e^{-1} \\approx 0.367879441\" style=\"width:18.245ex;height:2.05ex\" loading=\"lazy\" decoding=\"async\"></div></div><div class=\"step\"><h4>Step 3. Multiply by G</h4><p>S = 1 × 0.367879441 ≈ 0.367879441 successful frames/frame time.</p></div><div class=\"step\"><h4>Step 4. Convert to percentage</h4><p>0.367879441 × 100 ≈ 36.7879%.</p></div><div class=\"step\"><h4>Step 5. State the maximum separately</h4><p>The maximum is 1/(1e) ≈ 0.367879 = 36.7879%, at G=1.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> S ≈ 0.367879; percentage ≈ 36.7879%; Smax ≈ 0.367879 at G=1.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.</p></aside></div></section><p><small>Source: Final · 5 December 2025, original question paper page 1. Original marks retained; solution independently authored.</small></p>"},{"id":"q1d","title":"Q1D · IPv4 address block","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q1D. A block of address is granted to a small organization and one of the address is 200.140.64.48/26. Determine the first address and last address in the block. Determine the total number of address in the block. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>200.140.64.48/26</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−26=6; N=2<sup>6</sup>=64.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.192</code>; binary=<code>11111111.11111111.11111111.11000000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 48 lies in 0…63.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 0 in octet 4; set any later octets to zero. Network=<strong>200.140.64.0</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>11001000</td><td>11111111</td><td>11001000</td><td>200</td></tr><tr><td>2</td><td>10001100</td><td>11111111</td><td>10001100</td><td>140</td></tr><tr><td>3</td><td>01000000</td><td>11111111</td><td>01000000</td><td>64</td></tr><tr><td>4</td><td>00110000</td><td>11000000</td><td>00000000</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 63 in the changing octet and 255 in any later octets. Broadcast=<strong>200.140.64.63</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=200.140.64.1; last usable=200.140.64.62; count=64−2=62.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 200.140.64.0; broadcast 200.140.64.63; 64 total, 62 ordinary usable; range 200.140.64.1–200.140.64.62.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section><p><small>Source: Final · 5 December 2025, original question paper page 1. Original marks retained; solution independently authored.</small></p>"},{"id":"q2a","title":"Q2A · Block coding and all pairwise distances","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q2A. (i) Explain the block coding method for error detection and correction. (2 marks) (ii) Two binary codewords are used: C1=1001101 and C2=1110001. Compute their Hamming distance. (2 marks) (iii) C3=1010101 is added. Compute its pairwise distances from the other codewords. (2 marks) (iv) Based on the minimum Hamming distance, determine how many errors the code can detect and correct; justify your answer. (4 marks) <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>(i) Block coding.</strong> Map each k-bit dataword to a distinct n-bit codeword by adding n−k redundant bits. Only the valid codeword subset represents data. A received invalid pattern detects an error; sufficiently separated codewords permit unique correction within the guaranteed radius. For a chosen code, the minimum Hamming distance measures that separation.</p><h2>Given</h2><table><thead><tr><th scope=\"col\">Codeword</th><th scope=\"col\">Bits</th></tr></thead><tbody><tr><td>C1</td><td>1001101</td></tr><tr><td>C2</td><td>1110001</td></tr><tr><td>C3</td><td>1010101</td></tr></tbody></table><h2>To find</h2><p>All pair distances, dmin and the maximum guaranteed numbers of errors.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/08c67b82aac87a74.svg\" alt=\"d(a,b)=\\mathrm{weight}(a\\oplus b)\" style=\"width:22.357ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/b0c374242e18e388.svg\" alt=\"s=d_{\\min}-1,\\quad t=\\lfloor(d_{\\min}-1)/2\\rfloor\" style=\"width:33.068ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>XOR exposes differing positions. Use the closest codeword pair, because it is the weakest separation in the code.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. XOR every distinct pair</h4><table><thead><tr><th scope=\"col\">Pair</th><th scope=\"col\">First</th><th scope=\"col\">Second</th><th scope=\"col\">XOR</th><th scope=\"col\">Distance</th></tr></thead><tbody><tr><td>C1 vs C2</td><td>1001101</td><td>1110001</td><td>0111100</td><td>4</td></tr><tr><td>C1 vs C3</td><td>1001101</td><td>1010101</td><td>0011000</td><td>2</td></tr><tr><td>C2 vs C3</td><td>1110001</td><td>1010101</td><td>0100100</td><td>2</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Take the minimum</h4><p>dmin = min(4, 2, 2) = 2.</p></div><div class=\"step\"><h4>Step 3. Calculate the guarantees</h4><p>Detect = 2−1 = 1; correct = floor((2−1)/2) = 0.</p></div><div class=\"step\"><h4>Step 4. Justify geometrically</h4><p>2 bit changes can reach another valid codeword, so only 1 are guaranteed detectable. Correction regions require 2t &lt; 2.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> dmin=2; detect up to 1 errors; correct up to 0 errors.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A distance of one particular pair does not set the whole-code capability unless it is the minimum.</p></aside></div></section><p><small>Source: Final · 5 December 2025, original question paper page 1. Original marks retained; solution independently authored.</small></p>"},{"id":"q2b","title":"Q2B · Choose a switching technique","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q2B. A company wants to set up a network for smooth data transfer between its offices. Based on your understanding, which switching technique—circuit, packet, or message—would you recommend? Explain how each works and compare their pros, cons, and best use cases to support your choice. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/switching.2b51f856d9.svg\" width=\"820\" height=\"425\" alt=\"Three switching techniques: what is forwarded?\" loading=\"lazy\" decoding=\"async\"></div><figcaption>The three forwarding units and resource choices.</figcaption></figure><h2>Circuit switching</h2><p>A setup phase reserves a circuit through intermediate switches. Data then streams through the established path until release. It offers predictable reserved service and low per-unit forwarding overhead, but setup takes time and idle periods waste reserved capacity. A traditional dedicated voice circuit is an appropriate illustration.</p><h2>Message switching</h2><p>Each intermediate node receives and stores the entire message before forwarding it. Links can be shared and no end-to-end circuit is required, but large messages need buffers and cause substantial store-and-forward delay. It illustrates delay-tolerant whole-message delivery, rather than an efficient choice for interactive office traffic.</p><h2>Packet switching</h2><p>A message is segmented into packets, allowing shared links and pipelined forwarding. This suits bursty data and supports flexible routing. Costs include packet headers, variable queueing delay, potential packet loss and possible reordering in datagram networks.</p><table><thead><tr><th scope=\"col\">Aspect</th><th scope=\"col\">Circuit switching</th><th scope=\"col\">Message switching</th><th scope=\"col\">Packet switching</th></tr></thead><tbody><tr><td>Unit handled</td><td>Continuous stream on established circuit</td><td>Whole message</td><td>Small packets</td></tr><tr><td>Resource use</td><td>Capacity reserved along a circuit</td><td>Shared; message stored at each intermediate node</td><td>Shared; each packet stored/forwarded in this model</td></tr><tr><td>Setup</td><td>Required before data transfer</td><td>No circuit setup required</td><td>Datagram: no connection setup; virtual circuit: setup</td></tr><tr><td>Delay</td><td>Setup delay, then relatively predictable service</td><td>Large store-and-forward delay for long messages</td><td>Variable delay; packet pipeline can reduce completion time</td></tr><tr><td>Main limitation</td><td>Reserved capacity can be idle</td><td>Large buffers; unsuitable for tight delay needs</td><td>Headers, possible queueing/loss; datagrams may reorder</td></tr></tbody></table><h2>Recommendation</h2><p>For ordinary office file, web and collaboration traffic, choose packet switching, with adequate capacity and traffic management. Its statistical sharing serves bursty sources efficiently. If strict deterministic service is required, state that requirement and discuss additional service engineering rather than promising that every packet network guarantees timing.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>One office can upload a file while another sends short web requests. Their packets share available link capacity; a permanently reserved circuit would remain idle between bursts.</p></aside></div></section><p><small>Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q3a","title":"Q3A · LAN, MAN, PAN, WAN, ARPANET","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q3A. Explain the following: (a) LAN (b) MAN (c) PAN (d) WAN (e) ARPANET. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Type</th><th scope=\"col\">Meaning and scope</th><th scope=\"col\">Example</th></tr></thead><tbody><tr><td>PAN</td><td>Personal Area Network: a person’s nearby devices</td><td>Phone linked to earbuds</td></tr><tr><td>LAN</td><td>Local Area Network: a building or local campus network under local administration</td><td>Laboratory Ethernet/Wi-Fi</td></tr><tr><td>MAN</td><td>Metropolitan Area Network: interconnects sites across a town/city</td><td>City-wide institutional network</td></tr><tr><td>WAN</td><td>Wide Area Network: connects geographically separated networks over regional/global links</td><td>Branches in different cities</td></tr><tr><td>ARPANET</td><td>Historical packet-switched research network; a major predecessor of the Internet</td><td>Early interconnected research institutions; not a modern geographic size category</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A local campus LAN can connect through a WAN to other campuses. ARPANET is a historical packet network, not another name for a modern LAN.</p></aside></div></section><p><small>Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q3b","title":"Q3B · OSPF packet types","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q3B. Explain the different types of OSPF packets used for communication between routers. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ospf-packets.6093f0d178.svg\" width=\"820\" height=\"655\" alt=\"OSPFv2: five distinct packet types\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Five OSPFv2 packet types.</figcaption></figure><table><thead><tr><th scope=\"col\">Packet type</th><th scope=\"col\">What it does</th><th scope=\"col\">Simple example</th></tr></thead><tbody><tr><td>Hello</td><td>Discover/maintain neighbours and exchange relationship parameters</td><td>Are we still neighbours?</td></tr><tr><td>Database Description (DD/DBD)</td><td>Summarize link-state database contents during synchronization</td><td>Here are the LSA headers I have</td></tr><tr><td>Link State Request (LSR)</td><td>Ask for specific missing/newer link-state information</td><td>Please send this LSA</td></tr><tr><td>Link State Update (LSU)</td><td>Carry one or more LSAs</td><td>Here is the requested or newly flooded link-state information</td></tr><tr><td>Link State Acknowledgment (LSAck)</td><td>Acknowledge receipt of LSAs</td><td>I received these LSAs</td></tr></tbody></table><p>Database Description packets carry summaries; Link State Update packets carry LSAs themselves. Do not confuse an LSA type with an OSPF packet type.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>After seeing a missing LSA in a database summary, a router sends an LSR, receives an LSU containing it and sends an LSAck.</p></aside></div></section><p><small>Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q3c","title":"Q3C · WWW and HTTP","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q3C. Explain, with the help of a neat diagram, how the World Wide Web (WWW) enables users to access online information through the HTTP protocol. Describe the components and working mechanism of the Web, and interpret how HTTP facilitates communication between a client and a server when a user enters a URL such as http://www.example.com. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>The <strong>World Wide Web (WWW)</strong> is an information system of linked resources identified by URLs and accessed using Web clients and servers. A browser is a client; a Web server hosts or generates representations such as HTML, images or JSON. <strong>HTTP</strong> defines request/response semantics between these components. The Web is one application of the Internet, not a synonym for the entire Internet.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-http.de65bc75dd.svg\" width=\"820\" height=\"805\" alt=\"Opening a plain HTTP/1.1 URL\" loading=\"lazy\" decoding=\"async\"></div><figcaption>URL → DNS → connection → HTTP request/response → displayed document.</figcaption></figure><ol><li>Interpret the URL <strong>http://www.example.com/</strong>: scheme=http; host=www.example.com; path=/; absent explicit port, plain HTTP uses default port 80. A fragment identifier, if present, is handled by the client and is not sent as part of an HTTP target.</li><li>Resolve the hostname using DNS, often via cached results and a recursive resolver. DNS finds an address; it does not download the Web page.</li><li>For this plain HTTP/1.1 example, establish a TCP connection to the server on port 80. HTTPS additionally protects HTTP using TLS; do not add TLS to an explicitly plain-http example without stating a redirect or change of scheme.</li><li>Send a request such as GET / HTTP/1.1 with Host: www.example.com. The server identifies the target resource, processes the request and prepares a response.</li><li>Receive a status line such as HTTP/1.1 200 OK, response headers such as Content-Type, and the response body. A 404 response indicates no matching resource was found; redirects instruct the client to another target.</li><li>The browser parses HTML, retrieves referenced objects as needed and renders the page. Caching may avoid transfers; persistent connections can serve multiple requests.</li></ol><table><thead><tr><th scope=\"col\">Message component</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Request method / target</td><td>Requested action and resource; GET retrieves a representation, POST submits data for processing</td></tr><tr><td>Headers</td><td>Metadata, routing context, representation preferences and cache/connection information</td></tr><tr><td>Status code</td><td>Result class: 2xx success, 3xx redirection, 4xx client error, 5xx server error</td></tr><tr><td>Body</td><td>Representation or submitted content when present</td></tr></tbody></table><p>HTTP semantics are stateless: each request has its own meaning. Cookies/tokens can let an application maintain a login session; stateless does not mean “users cannot log in”. HTTP/1.1 and HTTP/2 commonly use TCP; HTTP/3 uses QUIC over UDP, so “HTTP always uses TCP” is not a universal statement.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A browser can receive the HTML successfully and still need separate requests for its stylesheet and image. One URL entry can therefore cause several HTTP exchanges.</p></aside></div></section><p><small>Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q4a","title":"Q4A · IPv6 expansion and headers","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q4A. Summarize the IPv6 address 0:15::1:12:1213 to its full, original form. Write a comparison between IPv4 and IPv6 packet headers. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Given address: <code>0:15::1:12:1213</code>.</p><h2>To find</h2><p>The full 128-bit address in eight-group hexadecimal notation.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/a013f99fcbb0987c.svg\" alt=\"\\text{missing groups}=8-\\text{visible groups}\" style=\"width:34.708ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>A written 0 is a visible group. :: represents only the omitted all-zero groups.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count groups on both sides</h4><p>Left: 0, 15 (2 group(s)). Right: 1, 12, 1213 (3 group(s)).</p></div><div class=\"step\"><h4>Step 2. Calculate omitted groups</h4><p>Visible=2+3=5. Missing=8−5=3.</p></div><div class=\"step\"><h4>Step 3. Insert the groups</h4><p><code>0:15:0:0:0:1:12:1213</code>.</p></div><div class=\"step\"><h4>Step 4. Pad each group on the left</h4><table><thead><tr><th scope=\"col\">Group number</th><th scope=\"col\">Four-digit group</th></tr></thead><tbody><tr><td>1</td><td>0000</td></tr><tr><td>2</td><td>0015</td></tr><tr><td>3</td><td>0000</td></tr><tr><td>4</td><td>0000</td></tr><tr><td>5</td><td>0000</td></tr><tr><td>6</td><td>0001</td></tr><tr><td>7</td><td>0012</td></tr><tr><td>8</td><td>1213</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Write all eight in order</h4><p><code>0000:0015:0000:0000:0000:0001:0012:1213</code>.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>0000:0015:0000:0000:0000:0001:0012:1213</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>Leading zeros change the spelling, not the address value. The final group count is eight.</p></aside><h2>Header comparison</h2><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">IPv4</th><th scope=\"col\">IPv6</th></tr></thead><tbody><tr><td>Address width</td><td>32 bits</td><td>128 bits</td></tr><tr><td>Base/header size</td><td>20–60 bytes depending on options</td><td>40-byte fixed base header</td></tr><tr><td>Length field</td><td>Total length includes IPv4 header</td><td>Payload Length excludes 40-byte base header</td></tr><tr><td>Lifetime field</td><td>TTL</td><td>Hop Limit</td></tr><tr><td>Following protocol</td><td>Protocol field</td><td>Next Header; may identify an extension</td></tr><tr><td>Header checksum</td><td>Present</td><td>No base-header checksum</td></tr><tr><td>Options</td><td>Inside IPv4 header</td><td>Typically extension headers</td></tr><tr><td>Fragmentation fields</td><td>In IPv4 header; routers may fragment if permitted</td><td>Fragment extension header; fragmentation by source, not routers</td></tr></tbody></table><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ipv6-header.aef1bfbac7.svg\" width=\"820\" height=\"410\" alt=\"IPv6 base header · each horizontal row is 32 bits wide\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Fixed IPv6 base header.</figcaption></figure><div class=\"note\"><p>The supplied scheme’s sentence says four missing groups, but five groups are already visible, so only three are missing. Its printed eight-group expansion is consistent with three. The count shown above is independently verified.</p></div></div></section><p><small>Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q4b","title":"Q4B · UDP and TCP","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q4B. Describe the User Datagram Protocol (UDP) in detail with a suitable diagram. Also explain how it differs from TCP. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>User Datagram Protocol (UDP)</strong> provides connectionless, message-oriented process delivery. One send creates a datagram; message boundaries are retained. UDP has an <strong>8-byte header</strong>, carries ports and length, and offers checksum-based corruption detection. It does not itself guarantee delivery, ordering, duplicate suppression, retransmission, flow control or congestion control.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-udp.b14cba3c28.svg\" width=\"820\" height=\"289\" alt=\"UDP header: each row contains 32 bits\" loading=\"lazy\" decoding=\"async\"></div><figcaption>UDP fixed header: four 16-bit fields, eight bytes total.</figcaption></figure><table><thead><tr><th scope=\"col\">UDP field</th><th scope=\"col\">Width</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Source port</td><td>16 bits</td><td>Sending endpoint; a zero value can indicate no reply port when unused</td></tr><tr><td>Destination port</td><td>16 bits</td><td>Receiving application endpoint</td></tr><tr><td>Length</td><td>16 bits</td><td>UDP header plus UDP payload; minimum 8 bytes</td></tr><tr><td>Checksum</td><td>16 bits</td><td>Error detection over UDP and an IP pseudo-header; not retransmission</td></tr></tbody></table><h2>Operation and services</h2><ol><li>The application chooses the destination IP/port and supplies a message. UDP adds its header and passes the datagram to IP without a connection handshake.</li><li>The receiving UDP layer validates the length/checksum as applicable and uses the destination endpoint to deliver the datagram.</li><li>A corrupt or undeliverable datagram may be discarded; UDP does not recover it. Any reliability or rate-control policy must come from the application or a protocol above UDP.</li><li>UDP checksum zero can mean checksum omitted in IPv4. IPv6 ordinarily requires the UDP checksum; specialized exceptions are outside this syllabus.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A DNS query often uses UDP because a small request/reply can avoid a transport handshake. DNS also uses TCP, so “DNS always UDP” is incorrect.</p></aside><h2>Comparison with TCP</h2><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">UDP</th><th scope=\"col\">TCP</th></tr></thead><tbody><tr><td>Setup</td><td>Connectionless</td><td>Three-way establishment</td></tr><tr><td>Data</td><td>Message/datagram boundaries</td><td>Ordered byte stream</td></tr><tr><td>Recovery</td><td>No built-in retransmission</td><td>ACKs, timers and retransmission</td></tr><tr><td>Control</td><td>No built-in flow/congestion control</td><td>Receive window and congestion window</td></tr><tr><td>Header</td><td>8 bytes</td><td>At least 20 bytes</td></tr><tr><td>Use</td><td>Applications tolerant of loss or managing their own recovery</td><td>Reliable ordered byte transfer</td></tr></tbody></table></div></section><p><small>Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q5a","title":"Q5A · Selective Repeat with three bits","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q5A. Apply the principles of the Selective Repeat ARQ Sliding Window Protocol to determine the maximum permissible sender and receiver window sizes for a frame sequence number field of 3 bits, and explain with the help of a diagram how frames are transmitted, acknowledged, and buffered at both the sender and receiver ends. Justify why this window size is chosen, and analyze how incorrect window sizing can lead to frame misordering or acknowledgment ambiguity. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Selective Repeat (SR) ARQ</strong> accepts and buffers valid out-of-order frames inside the receiver window, acknowledges them individually and retransmits only missing/timed-out frames. In this answer ACK i means “frame i received”, unlike the next-expected cumulative ACK convention used for GBN.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-sr.5ae2b52b45.svg\" width=\"820\" height=\"674\" alt=\"SR W=4: individual ACKs and buffering\" loading=\"lazy\" decoding=\"async\"></div><figcaption>SR buffers 3 while waiting for 2; only 2 is retransmitted.</figcaption></figure><ol><li>For m=3 there are eight sequence numbers, 0…7. With equal sender and receiver windows, maximum W=2<sup>3−1</sup>=4. Both windows begin at 0 and span 0…3.</li><li>Sender sends 0,1,2,3. Receiver accepts 0 and 1, delivers them and advances its left edge to 2. Frame 2 is lost; frame 3 is stored and ACK 3 is sent.</li><li>Although 3 is acknowledged, the sender’s base cannot jump over missing 2. A timer for 2 expires; only frame 2 is retransmitted.</li><li>When 2 arrives, the receiver can deliver 2 and the buffered 3 in order, moving its window forward. Individual ACKs let the sender release the relevant stored copies.</li><li>Why half the space: with an incorrectly chosen W=5 in an eight-number space, receiving old 0…4 moves the receive window to {5,6,7,0,1}. If ACKs are lost, retransmitted old 0 or 1 could fall in the new window and be mistaken for new data. W=4 prevents these two consecutive windows from overlapping.</li><li>A repeated old frame can be acknowledged again without delivering it twice. SR needs more receiver storage and per-frame tracking than GBN.</li></ol><div class=\"math-display\"><img src=\"math/454034d348f17623.svg\" alt=\"W_s=W_r\\le 2^{m-1}\" style=\"width:16.921ex;height:2.357ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>A noisy long-delay link benefits from retransmitting only the missing frame, but the receiver must retain later frames and track which sequence numbers belong to its current window.</p></aside></div></section><p><small>Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q5b","title":"Q5B · SMTP phases","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q5B. Explain SMTP and its role in email communication. Describe the different phases of SMTP communication, detailing the purpose of each phase and the typical commands used. Illustrate your answer with a labelled diagram showing the flow between the client and server. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Simple Mail Transfer Protocol (SMTP)</strong> transfers email from a sending client/server to a receiving mail server using a reliable transport, normally TCP. It is a push/store-and-forward transfer protocol. User agents compose/read mail; mail-transfer agents relay it, consulting DNS MX records to find recipient-domain mail servers.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-smtp.c6f99877c4.svg\" width=\"820\" height=\"902\" alt=\"SMTP: envelope, message and completion\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Submission/relay use SMTP; reading an inbox uses a separate access protocol.</figcaption></figure><table><thead><tr><th scope=\"col\">Phase</th><th scope=\"col\">Typical exchange</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Connection and greeting</td><td>Server 220; client EHLO (HELO for basic SMTP); server 250 capabilities</td><td>Identify peers and learn supported extensions</td></tr><tr><td>Envelope transfer</td><td>MAIL FROM:&lt;sender&gt;; RCPT TO:&lt;recipient&gt;; 250 replies</td><td>Declare return path and one or more delivery recipients</td></tr><tr><td>Message transfer</td><td>DATA; server 354; headers + blank line + body; single dot line; server 250</td><td>Transmit the message after server permission; completion reply accepts responsibility</td></tr><tr><td>Termination</td><td>QUIT; server 221</td><td>Close the SMTP session cleanly</td></tr></tbody></table><h2>Message flow and important details</h2><ol><li>The sender’s user agent submits mail to its configured submission service. Server-to-server SMTP relay commonly uses TCP port 25; message submission commonly uses 587, often with authentication and TLS policy.</li><li>The sending server resolves the recipient domain’s MX records, connects to an appropriate mail server and carries out the SMTP exchange.</li><li>MAIL FROM and RCPT TO are the <strong>envelope</strong>; visible From/To headers inside DATA are message content and can differ. Multiple RCPT TO commands can name several recipients.</li><li>A line containing only a dot ends DATA. A content line beginning with a dot is dot-stuffed for transparency and unstuffed by the receiver.</li><li>A temporary 4xx failure can lead the sending server to queue and retry; a permanent 5xx failure normally rejects that operation. One successful handoff is not proof that a human read the message.</li><li>The recipient reads stored mail using an access protocol such as IMAP/POP3 or webmail. SMTP is not the mailbox-retrieval protocol.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A message addressed to two recipients can send two RCPT TO commands before one DATA body. The SMTP envelope controls delivery even if the visible header lists a mailing-list name.</p></aside></div></section><p><small>Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q6a","title":"Q6A · Unguided media","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q6A. List different types of unguided transmission media and write any two characteristics of each. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Type</th><th scope=\"col\">Characteristic 1</th><th scope=\"col\">Characteristic 2</th></tr></thead><tbody><tr><td>Radio</td><td>Can provide broad-area/mobility support depending on band</td><td>Shared spectrum/interference and obstacles affect reception</td></tr><tr><td>Terrestrial microwave</td><td>Directional, usually line of sight</td><td>Needs antenna alignment; obstructions/weather can matter</td></tr><tr><td>Satellite microwave</td><td>Relay covers large or remote areas</td><td>Delay/capacity depend strongly on orbit/system</td></tr><tr><td>Infrared</td><td>Short range and generally blocked by opaque walls</td><td>Limited room-scale coverage reduces inter-room interference</td></tr></tbody></table><p>Many classifications group satellite links under microwave rather than making a separate spectral category. State that grouping consistently.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Wi-Fi uses radio; a building-to-building directional backhaul can use terrestrial microwave; an infrared remote cannot normally control a device through a solid wall.</p></aside></div></section><p><small>Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q6b","title":"Q6B · CSMA persistence","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q6B. Compare 1-persistent, non-persistent, and p-persistent CSMA strategies with diagrammatic representations. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/persistence.528dafcd8a.svg\" width=\"820\" height=\"590\" alt=\"CSMA persistence: what happens after carrier sensing?\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Different decisions after sensing the channel.</figcaption></figure><table><thead><tr><th scope=\"col\">Rule</th><th scope=\"col\">When idle</th><th scope=\"col\">When busy</th><th scope=\"col\">Trade-off</th></tr></thead><tbody><tr><td>1-persistent</td><td>Transmit immediately</td><td>Keep listening; transmit as soon as idle</td><td>Low idle delay, but waiting stations may start together</td></tr><tr><td>Non-persistent</td><td>Transmit</td><td>Wait a random time, then sense again</td><td>Less synchronized contention; may leave avoidable idle time</td></tr><tr><td>p-persistent (slotted)</td><td>Transmit with probability p; defer a slot with probability 1−p</td><td>Wait until available, then resume the probabilistic slot rule</td><td>Controls contention; needs slots and a choice of p</td></tr></tbody></table><p>All three sense the channel; their persistence rules differ. Propagation delay means carrier sensing cannot guarantee the absence of collisions. In p-persistent CSMA, each eligible idle-slot decision uses the specified probability.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Two stations waiting on a busy channel can start together under 1-persistence. Non-persistence separates repeat sensing through random waits; p-persistence spreads starts using probabilistic decisions.</p></aside></div></section><p><small>Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q6c","title":"Q6C · Open-loop and closed-loop control","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q6C. Explain open-loop and closed-loop congestion control policy in transmission control protocol. Describe any two policies from each type. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Congestion</strong> occurs when offered traffic overloads network resources such as link capacity, router buffers or processing. Queueing delay grows, packets may be dropped, and excessive retransmission can make the overload worse. <strong>Flow control</strong> protects a receiver; congestion control protects the network.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-congestion.c27c2303bb.svg\" width=\"820\" height=\"515\" alt=\"Two congestion-control approaches\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Open-loop prevention and closed-loop feedback.</figcaption></figure><table><thead><tr><th scope=\"col\">Approach</th><th scope=\"col\">Policy / mechanism</th><th scope=\"col\">How it helps</th></tr></thead><tbody><tr><td>Open loop: prevent congestion without runtime congestion feedback</td><td>Retransmission policy</td><td>Carefully chosen timers/selective retransmission avoid needless extra traffic</td></tr><tr><td>Open loop</td><td>Window policy</td><td>Limit outstanding data and avoid excessive retransmission after loss</td></tr><tr><td>Open loop</td><td>Acknowledgement policy</td><td>Avoid unnecessarily frequent ACK traffic while retaining correct recovery</td></tr><tr><td>Open loop</td><td>Admission policy</td><td>Refuse new load when reserved capacity is insufficient</td></tr><tr><td>Closed loop: measure and react to congestion</td><td>Backpressure</td><td>A congested node tells upstream nodes to reduce/stop sending, possibly propagating hop by hop</td></tr><tr><td>Closed loop</td><td>Choke/control signalling</td><td>A congested node sends explicit feedback to the source</td></tr><tr><td>Closed loop</td><td>Implicit signalling</td><td>A sender infers congestion from loss/delay and changes its sending behaviour</td></tr><tr><td>Closed loop</td><td>Explicit marking</td><td>Network marks congestion (for example ECN); endpoints react to returned information</td></tr></tbody></table><p>For an answer asking for two of each: explain retransmission and admission policies under open loop, then backpressure and explicit signalling under closed loop, with the mechanism and its effect. These are general congestion-control classifications used in the course; they are not all mandatory algorithms implemented inside TCP. TCP commonly uses end-to-end feedback such as loss or ECN.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A router’s output link can be overloaded even while the destination application reads quickly. Increasing receiver memory alone will not remove that network bottleneck.</p></aside></div></section><p><small>Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q7a","title":"Q7A · Dijkstra with all intermediate steps","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q7A. Consider a network topology consisting of nodes A, B, C, D, E, F, and G. The directed edges between these nodes and their corresponding positive weights are given in the table below. Using Dijkstra’s Algorithm: (i) Determine the shortest path from source A to destination G. (ii) Compute the shortest distance. (iii) Show all intermediate steps, including initialization and selection of the minimum-distance node for each iteration. (iv) Illustrate the original topology and final shortest path with edge distances. Directed edges: A→B=4, A→C=2, B→C=5, B→D=10, C→D=3, C→E=4, D→E=1, D→F=2, E→F=3, F→G=5. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Cost</th></tr></thead><tbody><tr><td>A→B</td><td>4</td></tr><tr><td>A→C</td><td>2</td></tr><tr><td>B→C</td><td>5</td></tr><tr><td>B→D</td><td>10</td></tr><tr><td>C→D</td><td>3</td></tr><tr><td>C→E</td><td>4</td></tr><tr><td>D→E</td><td>1</td></tr><tr><td>D→F</td><td>2</td></tr><tr><td>E→F</td><td>3</td></tr><tr><td>F→G</td><td>5</td></tr></tbody></table><p>Source=A; target=G. Edges are directed; do not add reverse edges.</p><h2>To find</h2><p>The path A to G, its total cost and intermediate work.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/dijkstra-pyq.ffe6efac11.svg\" width=\"860.00\" height=\"257.00\" alt=\"Dijkstra · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>d[A]=0; every other distance=∞. No predecessors are known.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Tentative</td></tr><tr><td>B</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>C</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>F</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>G</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Settle A at distance 0</h4><p>Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞, E=∞, F=∞, G=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(4)=4</td><td>Improve to 4; predecessor=A</td></tr><tr><td>A→C</td><td>∞</td><td>0+(2)=2</td><td>Improve to 2; predecessor=A</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>4</td><td>A</td><td>Tentative</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>F</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>G</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Settle C at distance 2</h4><p>Unsettled candidates before selection: B=4, C=2, D=∞, E=∞, F=∞, G=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>C→D</td><td>∞</td><td>2+(3)=5</td><td>Improve to 5; predecessor=C</td></tr><tr><td>C→E</td><td>∞</td><td>2+(4)=6</td><td>Improve to 6; predecessor=C</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>4</td><td>A</td><td>Tentative</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>5</td><td>C</td><td>Tentative</td></tr><tr><td>E</td><td>6</td><td>C</td><td>Tentative</td></tr><tr><td>F</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>G</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Settle B at distance 4</h4><p>Unsettled candidates before selection: B=4, D=5, E=6, F=∞, G=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>B→C</td><td>2</td><td>4+(5)=9</td><td>Already settled; retain</td></tr><tr><td>B→D</td><td>5</td><td>4+(10)=14</td><td>Retain 5</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>4</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>5</td><td>C</td><td>Tentative</td></tr><tr><td>E</td><td>6</td><td>C</td><td>Tentative</td></tr><tr><td>F</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>G</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Settle D at distance 5</h4><p>Unsettled candidates before selection: D=5, E=6, F=∞, G=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>D→E</td><td>6</td><td>5+(1)=6</td><td>Retain 6 (equal cost)</td></tr><tr><td>D→F</td><td>∞</td><td>5+(2)=7</td><td>Improve to 7; predecessor=D</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>4</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>5</td><td>C</td><td>Settled</td></tr><tr><td>E</td><td>6</td><td>C</td><td>Tentative</td></tr><tr><td>F</td><td>7</td><td>D</td><td>Tentative</td></tr><tr><td>G</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Settle E at distance 6</h4><p>Unsettled candidates before selection: E=6, F=7, G=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>E→F</td><td>7</td><td>6+(3)=9</td><td>Retain 7</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>4</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>5</td><td>C</td><td>Settled</td></tr><tr><td>E</td><td>6</td><td>C</td><td>Settled</td></tr><tr><td>F</td><td>7</td><td>D</td><td>Tentative</td></tr><tr><td>G</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 7. Settle F at distance 7</h4><p>Unsettled candidates before selection: F=7, G=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>F→G</td><td>∞</td><td>7+(5)=12</td><td>Improve to 12; predecessor=F</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>4</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>5</td><td>C</td><td>Settled</td></tr><tr><td>E</td><td>6</td><td>C</td><td>Settled</td></tr><tr><td>F</td><td>7</td><td>D</td><td>Settled</td></tr><tr><td>G</td><td>12</td><td>F</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 8. Settle G at distance 12</h4><p>Unsettled candidates before selection: G=12. Select the minimum; ties use alphabetical order.</p><p>No outgoing edges to relax.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>4</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>5</td><td>C</td><td>Settled</td></tr><tr><td>E</td><td>6</td><td>C</td><td>Settled</td></tr><tr><td>F</td><td>7</td><td>D</td><td>Settled</td></tr><tr><td>G</td><td>12</td><td>F</td><td>Settled</td></tr></tbody></table></div><div class=\"step\"><h4>Step 9. Recover the path</h4><p>Trace backwards: G ← F ← D ← C ← A. Reverse it: A → C → D → F → G.</p><p>Edge sum: 2 + 3 + 2 + 5 = 12.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A → C → D → F → G; cost=12.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.</p></aside><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/dijkstra-pyq-solution.d92888ba14.svg\" width=\"1087.00\" height=\"307.00\" alt=\"Dijkstra · final route and distances\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Highlighted final route: A→C→D→F→G; total cost 12.</figcaption></figure></div></section><p><small>Source: Final · 5 December 2025, original question paper page 3. Original marks retained; solution independently authored.</small></p>"},{"id":"q7b","title":"Q7B · Token bucket","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q7B. Draw a neat diagram and explain the working of the Token Bucket Algorithm. State any two limitations of the Token Bucket algorithm. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A <strong>token bucket</strong> generates tokens at rate r up to capacity B. Sending one unit of data consumes the corresponding tokens. Tokens accumulate during idle periods only until the bucket is full. Data can therefore burst when saved tokens exist, subject to the physical link rate.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-token.c3ff1dbf76.svg\" width=\"820\" height=\"660\" alt=\"Token bucket: permission is separate from data\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Tokens store permission; the separate data queue stores packets.</figcaption></figure><ol><li>Initialize a stated token count, often B for a full bucket. Add rΔt tokens over elapsed time, capped at B.</li><li>A packet of length L needs L byte-tokens (or one packet-token in a fixed-packet model). If enough tokens exist, deduct them and permit transmission.</li><li>If tokens are insufficient, a <strong>shaper</strong> waits/buffers until enough are available. A <strong>policer</strong> marks or drops nonconforming traffic according to policy. Token shortage does not universally mean drop.</li><li>Over interval t, a full token bucket bounds admitted data by B+rt. Actual output is also limited by link capacity and packet scheduling.</li><li>Unlike the queue-style leaky bucket, token storage allows limited bursts after idle time. It bounds average rate and burst size separately.</li></ol><div class=\"math-display\"><img src=\"math/750b0148fd39654a.svg\" alt=\"\\mathrm{admitted\\ data}(t)\\le B+rt\" style=\"width:25.805ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><table><thead><tr><th scope=\"col\">Limitation</th><th scope=\"col\">Reason</th></tr></thead><tbody><tr><td>Bursts can still congest downstream queues</td><td>Local conformance does not ensure every later link has capacity</td></tr><tr><td>Parameters must match traffic and link requirements</td><td>A small B delays/drops legitimate packets; a large B permits disruptive bursts</td></tr><tr><td>No complete QoS guarantee alone</td><td>Admission, scheduling and end-to-end capacity may still be needed</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>With B=10 KB and r=2 KB/s, an idle sender can immediately use up to 10 KB of saved tokens; additional sustained traffic must respect the refill rate, and physical serialization still takes time.</p></aside></div></section><p><small>Source: Final · 5 December 2025, original question paper page 3. Original marks retained; solution independently authored.</small></p>"}]},{"id":"tee-paper-reexam","title":"Re-exam · 4 February 2026","scope":"TEE · Actual TEE paper · all questions · current syllabus 702AI0C023","sections":[{"id":"q1a","title":"Q1A · Client-server and peer-to-peer","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q1A. An organization plans to deploy an online collaboration platform. Apply the concepts of the Client–Server model and the Peer-to-Peer model to explain how each could be implemented in this scenario with respect to performance, scalability, and reliability. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>In a <strong>client-server</strong> design, users’ clients contact designated service processes. In <strong>peer-to-peer (P2P)</strong>, participating hosts can supply and consume resources. These are application organizations, not different physical cable types.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-client-peer.a7c6f1b535.svg\" width=\"820\" height=\"430\" alt=\"Client-server and peer-to-peer organization\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Central service versus cooperating peers.</figcaption></figure><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">Client-server</th><th scope=\"col\">Peer-to-peer</th></tr></thead><tbody><tr><td>Roles</td><td>Clients request; designated servers provide services</td><td>Peers can both request and provide resources</td></tr><tr><td>Control</td><td>Central policies, accounts and backups are easier to coordinate</td><td>Control and copies distributed among peers</td></tr><tr><td>Performance</td><td>Predictable with adequate server capacity; server may bottleneck</td><td>Resources grow with peers, but peer capacity/availability vary</td></tr><tr><td>Scalability</td><td>Scale servers, replicas, caching and load distribution</td><td>More peers can contribute capacity; coordination becomes harder</td></tr><tr><td>Reliability</td><td>One unreplicated server is a failure point; replication helps</td><td>Loss of one peer need not stop system if useful replicas remain</td></tr><tr><td>Security</td><td>Central access control and monitoring</td><td>Trust and consistent access policy are harder</td></tr><tr><td>Best fit</td><td>Managed collaboration, databases, login services</td><td>Distributed content sharing among participating peers</td></tr></tbody></table><h2>Apply to the platform</h2><p>Central servers can authenticate users, maintain the authoritative shared document and control versions. The organization must provision capacity, replicate data and avoid a single server failure. P2P can exchange large files or local edits among peers and distribute load, but needs discovery, conflict resolution, trust and availability strategies. A hybrid can keep account control centralized while distributing selected content.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>When three teammates edit one document, a replicated central service can order updates. A peer file swarm can speed distribution only while peers with the needed pieces are available.</p></aside></div></section><p><small>Source: Re-exam · 4 February 2026, original question paper page 1. Original marks retained; solution independently authored.</small></p>"},{"id":"q1b","title":"Q1B · TCP/IP reference model","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q1B. Draw the labelled diagram of the TCP/IP reference model and explain the task of all layers. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-models.5bff0518c8.svg\" width=\"820\" height=\"670\" alt=\"OSI layers mapped to the four-layer TCP/IP model\" loading=\"lazy\" decoding=\"async\"></div><figcaption>TCP/IP model and its OSI mapping.</figcaption></figure><table><thead><tr><th scope=\"col\">Layer</th><th scope=\"col\">Task</th><th scope=\"col\">Examples</th></tr></thead><tbody><tr><td>Application</td><td>Defines application message formats and exchanges for Web access, naming, email and file transfer; includes presentation/session functions as needed</td><td>HTTP, DNS, SMTP, FTP</td></tr><tr><td>Transport</td><td>End-to-end process communication</td><td>TCP, UDP, SCTP</td></tr><tr><td>Internet</td><td>IP addressing, routing and best-effort datagrams</td><td>IPv4/IPv6</td></tr><tr><td>Link/network access</td><td>Local delivery and physical access</td><td>Ethernet/Wi-Fi and their medium</td></tr></tbody></table><p>Here the four-layer convention includes physical access within the link layer. A five-layer textbook diagram may split physical from data link; label which convention is being used.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>An HTTP request goes through application → transport TCP → internet IP → link Ethernet/Wi-Fi. Each layer contributes a different delivery function.</p></aside></div></section><p><small>Source: Re-exam · 4 February 2026, original question paper page 1. Original marks retained; solution independently authored.</small></p>"},{"id":"q1c","title":"Q1C · Pure ALOHA","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q1C. In a Pure ALOHA system, the average number of frames generated per frame time is G = 0.5. Calculate the throughput S. What is the maximum possible throughput in Pure ALOHA? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Protocol = Pure ALOHA; G = 0.5 attempts/frame time.</p><h2>To find</h2><p>S, 100S and the maximum possible S.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><p>Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate the exponent</h4><p>−2 × 0.5 = -1.</p></div><div class=\"step\"><h4>Step 2. Evaluate the exponential</h4><div class=\"math-display\"><img src=\"math/f3e24ac70fcf4336.svg\" alt=\"e^{-1} \\approx 0.367879441\" style=\"width:18.245ex;height:2.05ex\" loading=\"lazy\" decoding=\"async\"></div></div><div class=\"step\"><h4>Step 3. Multiply by G</h4><p>S = 0.5 × 0.367879441 ≈ 0.183939721 successful frames/frame time.</p></div><div class=\"step\"><h4>Step 4. Convert to percentage</h4><p>0.183939721 × 100 ≈ 18.3940%.</p></div><div class=\"step\"><h4>Step 5. State the maximum separately</h4><p>The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> S ≈ 0.183940; percentage ≈ 18.3940%; Smax ≈ 0.183940 at G=0.5.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.</p></aside></div></section><p><small>Source: Re-exam · 4 February 2026, original question paper page 1. Original marks retained; solution independently authored.</small></p>"},{"id":"q1d","title":"Q1D · IPv4 address block","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q1D. A block of address is granted to a small organization and one of the address is 193.20.35.40/26. Determine the first address and last address in the block. Determine the total number of address in the block. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>193.20.35.40/26</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−26=6; N=2<sup>6</sup>=64.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.192</code>; binary=<code>11111111.11111111.11111111.11000000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 40 lies in 0…63.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 0 in octet 4; set any later octets to zero. Network=<strong>193.20.35.0</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>11000001</td><td>11111111</td><td>11000001</td><td>193</td></tr><tr><td>2</td><td>00010100</td><td>11111111</td><td>00010100</td><td>20</td></tr><tr><td>3</td><td>00100011</td><td>11111111</td><td>00100011</td><td>35</td></tr><tr><td>4</td><td>00101000</td><td>11000000</td><td>00000000</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 63 in the changing octet and 255 in any later octets. Broadcast=<strong>193.20.35.63</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=193.20.35.1; last usable=193.20.35.62; count=64−2=62.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 193.20.35.0; broadcast 193.20.35.63; 64 total, 62 ordinary usable; range 193.20.35.1–193.20.35.62.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section><p><small>Source: Re-exam · 4 February 2026, original question paper page 1. Original marks retained; solution independently authored.</small></p>"},{"id":"q2a","title":"Q2A · CRC polynomial division","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q2A. Consider a message represented by the polynomial M(x)=x<sup>5</sup>+x<sup>4</sup>+x. Consider a generating polynomial G(x)=x<sup>3</sup>+x<sup>2</sup>+1. Generate a 3-bit CRC and show the transmitted frame. How is error detected by CRC? <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Message=110010; generator=1101; generator degree r=3. This is textbook systematic CRC with zero initial remainder and no reflection/final XOR.</p><h2>To find</h2><p>Exactly r CRC bits, the transmitted frame and receiver syndromes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/3db4ba7cff91f15a.svg\" alt=\"R=(M\\,2^r)\\bmod_2 G,\\qquad T=(M\\,2^r)\\oplus R\" style=\"width:40.767ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Modulo-2 division uses aligned XOR, not ordinary decimal division.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Preserve all polynomial coefficients</h4><p>Message bits=110010; generator bits=1101. Leading exponent is 3, so CRC length is 3.</p></div><div class=\"step\"><h4>Step 2. Append zeros</h4><p>110010 followed by 3 zeros = 110010000.</p></div><div class=\"step\"><h4>Step 3. Perform each nonzero XOR subtraction</h4><table><thead><tr><th scope=\"col\">Before</th><th scope=\"col\">Aligned generator</th><th scope=\"col\">After XOR</th></tr></thead><tbody><tr><td>110010000</td><td>110100000</td><td>000110000</td></tr><tr><td>000110000</td><td>000110100</td><td>000000100</td></tr></tbody></table><p>Remainder padded to 3 bits = <strong>100</strong>. Leading zero columns need no subtraction.</p></div><div class=\"step\"><h4>Step 4. Construct the transmitted frame</h4><p>Message + CRC = 110010 + 100 = <strong>110010100</strong>.</p></div><div class=\"step\"><h4>Step 5. Check the full frame</h4><table><thead><tr><th scope=\"col\">Before</th><th scope=\"col\">Aligned generator</th><th scope=\"col\">After XOR</th></tr></thead><tbody><tr><td>110010100</td><td>110100000</td><td>000110100</td></tr><tr><td>000110100</td><td>000110100</td><td>000000000</td></tr></tbody></table><p>Receiver remainder = 000; the uncorrupted frame passes.</p></div><div class=\"step\"><h4>Step 6. Demonstrate detection</h4><p>Flip the last bit: 110010101. Dividing by 1101 leaves 001, which is nonzero, so this error is detected. A zero syndrome would mean no detected error, not proof of no corruption.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> CRC=100; transmitted frame=110010100; uncorrupted receiver remainder=000.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Some software CRCs use different initial/reflection/final conventions; this answer follows the polynomial-division question’s stated textbook model.</p></aside><div class=\"note\"><p>Scheme correction: the remainder 100 is correct, but one scheme line prints 110010111. The correctly appended frame is 110010100; the receiver division shown above verifies it.</p></div></div></section><p><small>Source: Re-exam · 4 February 2026, original question paper page 1. Original marks retained; solution independently authored.</small></p>"},{"id":"q2b","title":"Q2B · Department subnet allocation","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q2B. A university has been allocated an IP block of 172.16.0.0/16 (65,536 addresses) for its internal network. Department A: 32 labs, each requiring 128 addresses. Department B: 64 labs, each requiring 64 addresses. Department C: 16 labs, each requiring 512 addresses. Design the subnet allocations for each department and calculate how many IP addresses remain unused after the allocation. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Department</th><th scope=\"col\">Labs</th><th scope=\"col\">Total addresses per lab</th></tr></thead><tbody><tr><td>A</td><td>32</td><td>128</td></tr><tr><td>B</td><td>64</td><td>64</td></tr><tr><td>C</td><td>16</td><td>512</td></tr></tbody></table><p>Parent: 172.16.0.0/16 with 65,536 addresses.</p><h2>To find</h2><p>Lab prefixes, department ranges and unused total addresses.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/96f141ad847f8a75.svg\" alt=\"p=32-\\log_2(N_{\\mathrm{addresses\\ per\\ lab}})\" style=\"width:28.506ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/830cf354ee16974f.svg\" alt=\"N_{\\mathrm{department}}=N_{\\mathrm{labs}}N_{\\mathrm{addresses\\ per\\ lab}}\" style=\"width:31.567ex;height:2.195ex\" loading=\"lazy\" decoding=\"async\"></div><p>The question requests addresses, not usable hosts. Therefore do not add two before selecting each lab size.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Department A size</h4><p>128=2⁷ addresses/lab → /25. 32×128=4,096 addresses → department block /20. Allocate 172.16.0.0/20, spanning 172.16.0.0–172.16.15.255.</p></div><div class=\"step\"><h4>Step 2. Department B size</h4><p>64=2⁶ → /26 per lab. 64×64=4,096 → /20 department block. Allocate 172.16.16.0/20, spanning 172.16.16.0–172.16.31.255.</p></div><div class=\"step\"><h4>Step 3. Department C size</h4><p>512=2⁹ → /23 per lab. 16×512=8,192 → /19 department block. Allocate 172.16.32.0/19, spanning 172.16.32.0–172.16.63.255. Its start at third octet 32 is aligned for /19.</p></div><div class=\"step\"><h4>Step 4. List every lab allocation</h4><table><thead><tr><th scope=\"col\">Lab</th><th scope=\"col\">Prefix</th><th scope=\"col\">First address</th><th scope=\"col\">Last address</th></tr></thead><tbody><tr><td>A1</td><td>172.16.0.0/25</td><td>172.16.0.0</td><td>172.16.0.127</td></tr><tr><td>A2</td><td>172.16.0.128/25</td><td>172.16.0.128</td><td>172.16.0.255</td></tr><tr><td>A3</td><td>172.16.1.0/25</td><td>172.16.1.0</td><td>172.16.1.127</td></tr><tr><td>A4</td><td>172.16.1.128/25</td><td>172.16.1.128</td><td>172.16.1.255</td></tr><tr><td>A5</td><td>172.16.2.0/25</td><td>172.16.2.0</td><td>172.16.2.127</td></tr><tr><td>A6</td><td>172.16.2.128/25</td><td>172.16.2.128</td><td>172.16.2.255</td></tr><tr><td>A7</td><td>172.16.3.0/25</td><td>172.16.3.0</td><td>172.16.3.127</td></tr><tr><td>A8</td><td>172.16.3.128/25</td><td>172.16.3.128</td><td>172.16.3.255</td></tr><tr><td>A9</td><td>172.16.4.0/25</td><td>172.16.4.0</td><td>172.16.4.127</td></tr><tr><td>A10</td><td>172.16.4.128/25</td><td>172.16.4.128</td><td>172.16.4.255</td></tr><tr><td>A11</td><td>172.16.5.0/25</td><td>172.16.5.0</td><td>172.16.5.127</td></tr><tr><td>A12</td><td>172.16.5.128/25</td><td>172.16.5.128</td><td>172.16.5.255</td></tr><tr><td>A13</td><td>172.16.6.0/25</td><td>172.16.6.0</td><td>172.16.6.127</td></tr><tr><td>A14</td><td>172.16.6.128/25</td><td>172.16.6.128</td><td>172.16.6.255</td></tr><tr><td>A15</td><td>172.16.7.0/25</td><td>172.16.7.0</td><td>172.16.7.127</td></tr><tr><td>A16</td><td>172.16.7.128/25</td><td>172.16.7.128</td><td>172.16.7.255</td></tr><tr><td>A17</td><td>172.16.8.0/25</td><td>172.16.8.0</td><td>172.16.8.127</td></tr><tr><td>A18</td><td>172.16.8.128/25</td><td>172.16.8.128</td><td>172.16.8.255</td></tr><tr><td>A19</td><td>172.16.9.0/25</td><td>172.16.9.0</td><td>172.16.9.127</td></tr><tr><td>A20</td><td>172.16.9.128/25</td><td>172.16.9.128</td><td>172.16.9.255</td></tr><tr><td>A21</td><td>172.16.10.0/25</td><td>172.16.10.0</td><td>172.16.10.127</td></tr><tr><td>A22</td><td>172.16.10.128/25</td><td>172.16.10.128</td><td>172.16.10.255</td></tr><tr><td>A23</td><td>172.16.11.0/25</td><td>172.16.11.0</td><td>172.16.11.127</td></tr><tr><td>A24</td><td>172.16.11.128/25</td><td>172.16.11.128</td><td>172.16.11.255</td></tr><tr><td>A25</td><td>172.16.12.0/25</td><td>172.16.12.0</td><td>172.16.12.127</td></tr><tr><td>A26</td><td>172.16.12.128/25</td><td>172.16.12.128</td><td>172.16.12.255</td></tr><tr><td>A27</td><td>172.16.13.0/25</td><td>172.16.13.0</td><td>172.16.13.127</td></tr><tr><td>A28</td><td>172.16.13.128/25</td><td>172.16.13.128</td><td>172.16.13.255</td></tr><tr><td>A29</td><td>172.16.14.0/25</td><td>172.16.14.0</td><td>172.16.14.127</td></tr><tr><td>A30</td><td>172.16.14.128/25</td><td>172.16.14.128</td><td>172.16.14.255</td></tr><tr><td>A31</td><td>172.16.15.0/25</td><td>172.16.15.0</td><td>172.16.15.127</td></tr><tr><td>A32</td><td>172.16.15.128/25</td><td>172.16.15.128</td><td>172.16.15.255</td></tr><tr><td>B1</td><td>172.16.16.0/26</td><td>172.16.16.0</td><td>172.16.16.63</td></tr><tr><td>B2</td><td>172.16.16.64/26</td><td>172.16.16.64</td><td>172.16.16.127</td></tr><tr><td>B3</td><td>172.16.16.128/26</td><td>172.16.16.128</td><td>172.16.16.191</td></tr><tr><td>B4</td><td>172.16.16.192/26</td><td>172.16.16.192</td><td>172.16.16.255</td></tr><tr><td>B5</td><td>172.16.17.0/26</td><td>172.16.17.0</td><td>172.16.17.63</td></tr><tr><td>B6</td><td>172.16.17.64/26</td><td>172.16.17.64</td><td>172.16.17.127</td></tr><tr><td>B7</td><td>172.16.17.128/26</td><td>172.16.17.128</td><td>172.16.17.191</td></tr><tr><td>B8</td><td>172.16.17.192/26</td><td>172.16.17.192</td><td>172.16.17.255</td></tr><tr><td>B9</td><td>172.16.18.0/26</td><td>172.16.18.0</td><td>172.16.18.63</td></tr><tr><td>B10</td><td>172.16.18.64/26</td><td>172.16.18.64</td><td>172.16.18.127</td></tr><tr><td>B11</td><td>172.16.18.128/26</td><td>172.16.18.128</td><td>172.16.18.191</td></tr><tr><td>B12</td><td>172.16.18.192/26</td><td>172.16.18.192</td><td>172.16.18.255</td></tr><tr><td>B13</td><td>172.16.19.0/26</td><td>172.16.19.0</td><td>172.16.19.63</td></tr><tr><td>B14</td><td>172.16.19.64/26</td><td>172.16.19.64</td><td>172.16.19.127</td></tr><tr><td>B15</td><td>172.16.19.128/26</td><td>172.16.19.128</td><td>172.16.19.191</td></tr><tr><td>B16</td><td>172.16.19.192/26</td><td>172.16.19.192</td><td>172.16.19.255</td></tr><tr><td>B17</td><td>172.16.20.0/26</td><td>172.16.20.0</td><td>172.16.20.63</td></tr><tr><td>B18</td><td>172.16.20.64/26</td><td>172.16.20.64</td><td>172.16.20.127</td></tr><tr><td>B19</td><td>172.16.20.128/26</td><td>172.16.20.128</td><td>172.16.20.191</td></tr><tr><td>B20</td><td>172.16.20.192/26</td><td>172.16.20.192</td><td>172.16.20.255</td></tr><tr><td>B21</td><td>172.16.21.0/26</td><td>172.16.21.0</td><td>172.16.21.63</td></tr><tr><td>B22</td><td>172.16.21.64/26</td><td>172.16.21.64</td><td>172.16.21.127</td></tr><tr><td>B23</td><td>172.16.21.128/26</td><td>172.16.21.128</td><td>172.16.21.191</td></tr><tr><td>B24</td><td>172.16.21.192/26</td><td>172.16.21.192</td><td>172.16.21.255</td></tr><tr><td>B25</td><td>172.16.22.0/26</td><td>172.16.22.0</td><td>172.16.22.63</td></tr><tr><td>B26</td><td>172.16.22.64/26</td><td>172.16.22.64</td><td>172.16.22.127</td></tr><tr><td>B27</td><td>172.16.22.128/26</td><td>172.16.22.128</td><td>172.16.22.191</td></tr><tr><td>B28</td><td>172.16.22.192/26</td><td>172.16.22.192</td><td>172.16.22.255</td></tr><tr><td>B29</td><td>172.16.23.0/26</td><td>172.16.23.0</td><td>172.16.23.63</td></tr><tr><td>B30</td><td>172.16.23.64/26</td><td>172.16.23.64</td><td>172.16.23.127</td></tr><tr><td>B31</td><td>172.16.23.128/26</td><td>172.16.23.128</td><td>172.16.23.191</td></tr><tr><td>B32</td><td>172.16.23.192/26</td><td>172.16.23.192</td><td>172.16.23.255</td></tr><tr><td>B33</td><td>172.16.24.0/26</td><td>172.16.24.0</td><td>172.16.24.63</td></tr><tr><td>B34</td><td>172.16.24.64/26</td><td>172.16.24.64</td><td>172.16.24.127</td></tr><tr><td>B35</td><td>172.16.24.128/26</td><td>172.16.24.128</td><td>172.16.24.191</td></tr><tr><td>B36</td><td>172.16.24.192/26</td><td>172.16.24.192</td><td>172.16.24.255</td></tr><tr><td>B37</td><td>172.16.25.0/26</td><td>172.16.25.0</td><td>172.16.25.63</td></tr><tr><td>B38</td><td>172.16.25.64/26</td><td>172.16.25.64</td><td>172.16.25.127</td></tr><tr><td>B39</td><td>172.16.25.128/26</td><td>172.16.25.128</td><td>172.16.25.191</td></tr><tr><td>B40</td><td>172.16.25.192/26</td><td>172.16.25.192</td><td>172.16.25.255</td></tr><tr><td>B41</td><td>172.16.26.0/26</td><td>172.16.26.0</td><td>172.16.26.63</td></tr><tr><td>B42</td><td>172.16.26.64/26</td><td>172.16.26.64</td><td>172.16.26.127</td></tr><tr><td>B43</td><td>172.16.26.128/26</td><td>172.16.26.128</td><td>172.16.26.191</td></tr><tr><td>B44</td><td>172.16.26.192/26</td><td>172.16.26.192</td><td>172.16.26.255</td></tr><tr><td>B45</td><td>172.16.27.0/26</td><td>172.16.27.0</td><td>172.16.27.63</td></tr><tr><td>B46</td><td>172.16.27.64/26</td><td>172.16.27.64</td><td>172.16.27.127</td></tr><tr><td>B47</td><td>172.16.27.128/26</td><td>172.16.27.128</td><td>172.16.27.191</td></tr><tr><td>B48</td><td>172.16.27.192/26</td><td>172.16.27.192</td><td>172.16.27.255</td></tr><tr><td>B49</td><td>172.16.28.0/26</td><td>172.16.28.0</td><td>172.16.28.63</td></tr><tr><td>B50</td><td>172.16.28.64/26</td><td>172.16.28.64</td><td>172.16.28.127</td></tr><tr><td>B51</td><td>172.16.28.128/26</td><td>172.16.28.128</td><td>172.16.28.191</td></tr><tr><td>B52</td><td>172.16.28.192/26</td><td>172.16.28.192</td><td>172.16.28.255</td></tr><tr><td>B53</td><td>172.16.29.0/26</td><td>172.16.29.0</td><td>172.16.29.63</td></tr><tr><td>B54</td><td>172.16.29.64/26</td><td>172.16.29.64</td><td>172.16.29.127</td></tr><tr><td>B55</td><td>172.16.29.128/26</td><td>172.16.29.128</td><td>172.16.29.191</td></tr><tr><td>B56</td><td>172.16.29.192/26</td><td>172.16.29.192</td><td>172.16.29.255</td></tr><tr><td>B57</td><td>172.16.30.0/26</td><td>172.16.30.0</td><td>172.16.30.63</td></tr><tr><td>B58</td><td>172.16.30.64/26</td><td>172.16.30.64</td><td>172.16.30.127</td></tr><tr><td>B59</td><td>172.16.30.128/26</td><td>172.16.30.128</td><td>172.16.30.191</td></tr><tr><td>B60</td><td>172.16.30.192/26</td><td>172.16.30.192</td><td>172.16.30.255</td></tr><tr><td>B61</td><td>172.16.31.0/26</td><td>172.16.31.0</td><td>172.16.31.63</td></tr><tr><td>B62</td><td>172.16.31.64/26</td><td>172.16.31.64</td><td>172.16.31.127</td></tr><tr><td>B63</td><td>172.16.31.128/26</td><td>172.16.31.128</td><td>172.16.31.191</td></tr><tr><td>B64</td><td>172.16.31.192/26</td><td>172.16.31.192</td><td>172.16.31.255</td></tr><tr><td>C1</td><td>172.16.32.0/23</td><td>172.16.32.0</td><td>172.16.33.255</td></tr><tr><td>C2</td><td>172.16.34.0/23</td><td>172.16.34.0</td><td>172.16.35.255</td></tr><tr><td>C3</td><td>172.16.36.0/23</td><td>172.16.36.0</td><td>172.16.37.255</td></tr><tr><td>C4</td><td>172.16.38.0/23</td><td>172.16.38.0</td><td>172.16.39.255</td></tr><tr><td>C5</td><td>172.16.40.0/23</td><td>172.16.40.0</td><td>172.16.41.255</td></tr><tr><td>C6</td><td>172.16.42.0/23</td><td>172.16.42.0</td><td>172.16.43.255</td></tr><tr><td>C7</td><td>172.16.44.0/23</td><td>172.16.44.0</td><td>172.16.45.255</td></tr><tr><td>C8</td><td>172.16.46.0/23</td><td>172.16.46.0</td><td>172.16.47.255</td></tr><tr><td>C9</td><td>172.16.48.0/23</td><td>172.16.48.0</td><td>172.16.49.255</td></tr><tr><td>C10</td><td>172.16.50.0/23</td><td>172.16.50.0</td><td>172.16.51.255</td></tr><tr><td>C11</td><td>172.16.52.0/23</td><td>172.16.52.0</td><td>172.16.53.255</td></tr><tr><td>C12</td><td>172.16.54.0/23</td><td>172.16.54.0</td><td>172.16.55.255</td></tr><tr><td>C13</td><td>172.16.56.0/23</td><td>172.16.56.0</td><td>172.16.57.255</td></tr><tr><td>C14</td><td>172.16.58.0/23</td><td>172.16.58.0</td><td>172.16.59.255</td></tr><tr><td>C15</td><td>172.16.60.0/23</td><td>172.16.60.0</td><td>172.16.61.255</td></tr><tr><td>C16</td><td>172.16.62.0/23</td><td>172.16.62.0</td><td>172.16.63.255</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Calculate total allocation</h4><p>4,096+4,096+8,192=16,384 addresses.</p></div><div class=\"step\"><h4>Step 6. Calculate unused space</h4><p>65,536−16,384=49,152 addresses remain unallocated, from 172.16.64.0 through 172.16.255.255.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A: /25 per lab; B: /26 per lab; C: /23 per lab. 49,152 total addresses remain unallocated.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The three department blocks are aligned and non-overlapping. If these had been usable-host requirements, the per-lab prefixes would have been different.</p></aside></div></section><p><small>Source: Re-exam · 4 February 2026, original question paper page 1. Original marks retained; solution independently authored.</small></p>"},{"id":"q3a","title":"Q3A · Network definition and topologies","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q3A. Define computer networks. Discuss any two types of network topologies in computer networks with suitable diagrams. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A computer network is a set of interconnected devices exchanging data through protocols. Topology describes the arrangement of nodes/links. Two examples are star and bus.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-topologies.d9e18f041b.svg\" width=\"820\" height=\"665\" alt=\"Four physical network topologies\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Use the star and bus panels for the two requested examples.</figcaption></figure><ol><li><strong>Star:</strong> each host has a link to a central switch. It is easy to expand and isolate a failed host link. Failure of the central device can affect the entire star.</li><li><strong>Bus:</strong> devices share a common backbone. It can be simple for a small legacy shared segment, but backbone failure affects the segment and simultaneous transmissions can collide.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>For a modern lab, a switched star supports easy port management; a bus is useful as a comparison of shared-medium organization.</p></aside></div></section><p><small>Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q3b","title":"Q3B · OSPF best path","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q3B. Summarize how OSPF determines the best path to a destination network. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/link-state.bbee3173ec.svg\" width=\"820\" height=\"540\" alt=\"Link-state routing: from local links to a shortest-path tree\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Build the topology, then calculate the route.</figcaption></figure><ol><li>Discover/maintain neighbours and determine local link costs.</li><li>Exchange link-state information and synchronize the database within the appropriate area.</li><li>Run Dijkstra’s shortest-path algorithm with the current router as the root.</li><li>Add outgoing link costs along candidate paths and select minimum-cost routes.</li><li>Install next-hop information; recalculate when relevant topology information changes.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Path A→B→D costs 10+10=20, whereas A→C→D costs 5+8=13. The latter is preferred under those metrics. OSPF can support equal-cost alternatives.</p></aside></div></section><p><small>Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q3c","title":"Q3C · DNS namespace","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q3C. With the help of a neat diagram, explain the hierarchical structure of the domain namespace in DNS and describe how this structure ensures the uniqueness of domain names across the Internet. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>The <strong>Domain Name System (DNS)</strong> is a distributed hierarchical naming system. Its namespace is a tree with the root at the top. A complete name is the ordered path of labels from a node back to the root. An absolute name may be written with a trailing dot, for example www.example.com.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-dns.f5345fe9fb.svg\" width=\"820\" height=\"520\" alt=\"DNS namespace: full label paths are unique\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Root, top-level domains, delegated domain and host labels.</figcaption></figure><table><thead><tr><th scope=\"col\">Level</th><th scope=\"col\">Example</th><th scope=\"col\">Meaning</th></tr></thead><tbody><tr><td>Root</td><td>.</td><td>Top of the namespace</td></tr><tr><td>Top-level domain (TLD)</td><td>com, org, in</td><td>A child zone below the root</td></tr><tr><td>Registered/delegated domain</td><td>example.com</td><td>Name under a parent such as com</td></tr><tr><td>Subdomain/host label</td><td>www.example.com</td><td>A label below example.com; a name may own different record types</td></tr></tbody></table><h2>Why names remain unique</h2><ol><li>A parent manages the labels immediately beneath it and does not assign the same child label to two different nodes in that parent’s namespace.</li><li>The full sequence of labels identifies the node. The local label www can appear below many domains without conflict: www.example.com and www.example.org are different complete names.</li><li>Administration is delegated: the parent publishes information identifying authoritative servers for a child zone. A domain is a namespace subtree; a zone is the portion administered together, excluding subtrees delegated onward.</li><li>Multiple names may resolve to one IP address, and one name can return several addresses. Uniqueness of names does not imply a one-name/one-IP rule.</li></ol><h2>Resolution</h2><ol><li>A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.</li><li>Otherwise the resolver can query a root server, receive a referral to the relevant TLD, then receive a referral to the authoritative server for the domain.</li><li>The authoritative server supplies the requested record or a relevant negative response. The recursive resolver returns the result and may cache it according to TTL.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>The labels “mail” under two organizations do not collide because mail.example.com and mail.example.org have different ancestors. DNS delegation distributes administration while preserving a unique full path.</p></aside></div></section><p><small>Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q4a","title":"Q4A · IPv6 packet format","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q4A. Construct the IPv6 packet format and explain the purpose of each field. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ipv6-header.aef1bfbac7.svg\" width=\"820\" height=\"410\" alt=\"IPv6 base header · each horizontal row is 32 bits wide\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Eight base-header fields occupy 320 bits = 40 bytes.</figcaption></figure><table><thead><tr><th scope=\"col\">Field</th><th scope=\"col\">Bits</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Version</td><td>4</td><td>Value 6</td></tr><tr><td>Traffic Class</td><td>8</td><td>Traffic treatment/congestion-related marking</td></tr><tr><td>Flow Label</td><td>20</td><td>Identifies a flow for appropriate handling</td></tr><tr><td>Payload Length</td><td>16</td><td>Bytes after the base header; includes extension headers when present</td></tr><tr><td>Next Header</td><td>8</td><td>Type of the next extension header or upper-layer protocol</td></tr><tr><td>Hop Limit</td><td>8</td><td>Decremented on forwarding; limits packet lifetime in hops</td></tr><tr><td>Source address</td><td>128</td><td>Sending interface address</td></tr><tr><td>Destination address</td><td>128</td><td>Destination address</td></tr></tbody></table><p>The first two 32-bit rows contain 64 bits and the two addresses contain 256 bits, giving a 320-bit base header. Payload Length excludes these 40 bytes. Next Header can identify an extension header or upper-layer protocol. IPv6 has no base-header checksum; optional information is carried through extension headers.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A packet with 24 extension-header bytes and 1,200 upper-layer bytes has Payload Length=1,224 and total length=1,264 bytes. This illustrates why the two length values differ.</p></aside></div></section><p><small>Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q4b","title":"Q4B · TCP connection lifecycle","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q4B. What is the TCP three-way handshaking mechanism? Describe connection establishment, data transfer and connection termination in detail with the help of a diagram. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A TCP connection establishes each endpoint’s initial sequence number and confirms that both can receive. Use client initial sequence x=1000 and server initial sequence y=5000; assume no payload in the handshake.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-handshake.e053246177.svg\" width=\"820\" height=\"873\" alt=\"TCP: handshake, data and orderly close\" loading=\"lazy\" decoding=\"async\"></div><figcaption>SYN and FIN each consume one sequence number; pure ACK consumes none.</figcaption></figure><table><thead><tr><th scope=\"col\">Step</th><th scope=\"col\">Segment</th><th scope=\"col\">Meaning</th></tr></thead><tbody><tr><td>1 Client → server</td><td>SYN, Seq=1000</td><td>Client proposes its starting sequence</td></tr><tr><td>2 Server → client</td><td>SYN+ACK, Seq=5000, Ack=1001</td><td>Server acknowledges client SYN and supplies its own start</td></tr><tr><td>3 Client → server</td><td>ACK, Seq=1001, Ack=5001</td><td>Client acknowledges server SYN; connection is established</td></tr></tbody></table><h2>Data transfer</h2><p>Client sends 200 bytes beginning at Seq=1001, so byte numbers are 1001…1200. The receiver acknowledges Ack=1201, the next byte expected. If bytes starting at 1201 are missing but later bytes arrive, the cumulative ACK remains 1201 until the gap is repaired. TCP may buffer out-of-order bytes; it delivers the byte stream in order. Each direction counts independently.</p><h2>Orderly termination</h2><ol><li>Assume client’s next data sequence is 1201. It sends FIN with Seq=1201, meaning it has finished sending.</li><li>Server sends ACK=1202. The connection is half closed: the server can still send data until its application finishes.</li><li>Assume server has sent no data since the handshake. It sends FIN with Seq=5001.</li><li>Client responds with ACK=5002. In a common active-close path the client enters TIME-WAIT so delayed segments and retransmitted FINs can be handled before the tuple is reused.</li><li>These are commonly four segments, but ACK and FIN can be combined and simultaneous close is possible. RST is an abort, not the same as the orderly FIN exchange.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A client can finish uploading a request and close its sending direction while still receiving the server’s response. Full-duplex directions do not have to end at the same instant.</p></aside></div></section><p><small>Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q5a","title":"Q5A · Go-Back-N three cases","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q5A. Apply the Go-Back-N ARQ Sliding Window Protocol for window size 7 and explain its working in real-time transmission scenarios. Illustrate with diagrams and examples how sender and receiver windows move in (a) normal transmission (no error), (b) lost data frame and (c) lost acknowledgment. Analyze retransmission and window shifting in each case to ensure reliable delivery. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Go-Back-N (GBN) ARQ</strong> pipelines up to W outstanding frames. For m-bit sequence numbers, textbook GBN uses W ≤ 2<sup>m</sup>−1 and receiver window 1. The receiver accepts only the next in-order frame; out-of-order frames are discarded. ACK k here cumulatively acknowledges all frames before k and means “next expected is k”.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-gbn.5f577a6979.svg\" width=\"820\" height=\"750\" alt=\"GBN W=7: loss and cumulative ACKs\" loading=\"lazy\" decoding=\"async\"></div><figcaption>GBN example: frame 2 lost; frames 3–6 discarded; timeout resends 2–6.</figcaption></figure><ol><li>For W=7 with m=3, the sequence space is 0…7. Initially the sender can transmit 0…6. It stores every unacknowledged frame; a timer tracks the oldest one.</li><li>Normal: after receiving 0 and 1, cumulative ACK 2 advances the sender base to 2. The sender can fill newly opened window slots.</li><li>Lost data: if frame 2 is lost, frames 3…6 arrive out of order and are discarded. Repeated ACK 2 says frame 2 is still expected. On timeout the sender retransmits all outstanding frames starting at 2, here 2…6.</li><li>Lost ACK: if ACK 2 is lost but ACK 3 arrives, the later cumulative ACK confirms frames 0…2 and avoids unnecessary retransmission. If no later useful ACK arrives before timeout, the sender retransmits from its oldest outstanding frame; the receiver rejects duplicates and sends its current ACK.</li><li>After sequence 7, numbers wrap to 0. The bound W ≤ 7 leaves one sequence value outside the sender’s current window, preventing the all-ACKs-lost ambiguity of a full eight-frame window in the textbook model.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>With W=7, loss of frame 2 can waste successful receptions of 3…6. GBN trades simple receiver buffering for extra retransmission after loss.</p></aside><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-gbn-normal.144a24ea80.svg\" width=\"820\" height=\"522\" alt=\"GBN W=7: normal window movement\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Normal transmission: both windows advance as frames are cumulatively acknowledged.</figcaption></figure><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-gbn-ack.713dc9972e.svg\" width=\"820\" height=\"598\" alt=\"GBN: a later cumulative ACK covers a lost ACK\" loading=\"lazy\" decoding=\"async\"></div><figcaption>A later cumulative ACK can cover an earlier lost ACK.</figcaption></figure></div></section><p><small>Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q5b","title":"Q5B · FTP connections","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q5B. Explain what FTP is and describe the functions of the control connection and the data connection. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>File Transfer Protocol (FTP)</strong> transfers files between a client and server using TCP and separates commands from file data. This separation is its central design feature. Its control connection remains available across multiple operations, while data connections carry file bytes or directory listings.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-ftp.1b305fa997.svg\" width=\"820\" height=\"660\" alt=\"FTP: separate control and data connections\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Control connection on server port 21; active/passive data connection roles differ.</figcaption></figure><table><thead><tr><th scope=\"col\">Connection</th><th scope=\"col\">Function</th><th scope=\"col\">Lifetime / ports</th></tr></thead><tbody><tr><td>Control</td><td>Commands and replies: USER, PASS, CWD, TYPE, LIST, RETR, STOR, QUIT</td><td>Client connects to server TCP port 21; normally kept for the session</td></tr><tr><td>Data</td><td>File contents and directory listing data</td><td>Opened as needed; separate from command channel</td></tr></tbody></table><h2>How a transfer works</h2><ol><li>Client opens the control connection and exchanges server greeting, login commands and replies. Plain FTP sends credentials/data without encryption.</li><li>Client chooses transfer settings such as binary/image mode for arbitrary bytes, and requests the needed working directory/operation.</li><li>In <strong>active FTP</strong>, the client provides a listening endpoint and the server initiates the data connection, traditionally from server port 20.</li><li>In <strong>passive FTP</strong>, the server returns a listening endpoint and the client initiates the data connection to that chosen server port. Therefore “FTP data always uses server port 20” is wrong.</li><li>RETR downloads a file; STOR uploads a file; LIST returns a directory listing over the data connection. Control replies report progress/completion. The session can continue for another transfer.</li><li>QUIT ends the control session.</li></ol><p>FTP over TLS (FTPS) protects FTP connections. SFTP is a separate SSH-based file-transfer protocol, not “FTP using an SSH port”. These names should not be treated as interchangeable.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A passive client behind a firewall can initiate both its control connection and data connection. The file bytes travel on the negotiated data connection, while the command RETR stays on the control connection.</p></aside></div></section><p><small>Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q6a","title":"Q6A · Media classification and fiber","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q6A. How is transmission media classified? List advantages and disadvantages of optical fiber. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Transmission media are classified into guided media (twisted pair, coaxial cable, optical fiber) and unguided media (radio, microwave, infrared).</p><p>Optical fiber carries data as light in a core surrounded by cladding. It is a guided medium. Single-mode fiber supports one main propagation mode and is used for long/high-capacity links; multimode supports multiple modes and is often used over shorter distances.</p><table><thead><tr><th scope=\"col\">Advantages</th><th scope=\"col\">Disadvantages / design costs</th></tr></thead><tbody><tr><td>High data capacity and low attenuation over suitable links</td><td>Optical transceivers, connectors and splicing add cost/skill requirements</td></tr><tr><td>Immune to electromagnetic interference; no electrical crosstalk</td><td>Tight bends, dirty connectors and poor installation increase loss</td></tr><tr><td>Electrical isolation between buildings</td><td>Fiber is mechanically sensitive and requires appropriate protection</td></tr><tr><td>Harder to tap casually than an unprotected radio channel</td><td>It is not automatically confidential; encryption/access control remain necessary</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A campus backbone can use fiber between buildings to avoid electrical interference and achieve high capacity. Installers still need to respect bend radius and test connectors.</p></aside></div></section><p><small>Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q6b","title":"Q6B · ALOHA at three rates","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q6B. A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps. What is the throughput if the system (all stations together) produces (a) 1000 frames per second, (b) 500 frames per second, (c) 250 frames per second? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Interpret the stated aggregate production rates as offered attempt rates in the standard textbook model. The following working includes normalized throughput, successful frames/s and successful frame bits/s for each case.</p><h2>Case a · 1000 frames/s</h2><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>200 bits</td></tr><tr><td>R</td><td>200 kbps = 200,000 bits/s</td></tr><tr><td>λ</td><td>1000 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 200/200,000 = 0.001 s = 1 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 1000 × 0.001 = 1 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−2G = -2; e to that power ≈ 0.135335283.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 1 × 0.135335283 ≈ 0.135335283.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.135335283/0.001 ≈ 135.335283 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.135335283 × 200,000 ≈ 27067.056647 bits/s ≈ 27.067057 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=1, S≈0.135335, successful rate≈135.335 frames/s = 27.067 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 1000 attempts/s; collisions reduce the delivered frame rate to about 135.335/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside><h2>Case b · 500 frames/s</h2><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>200 bits</td></tr><tr><td>R</td><td>200 kbps = 200,000 bits/s</td></tr><tr><td>λ</td><td>500 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 200/200,000 = 0.001 s = 1 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 500 × 0.001 = 0.5 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−2G = -1; e to that power ≈ 0.367879441.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 0.5 × 0.367879441 ≈ 0.183939721.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.183939721/0.001 ≈ 183.939721 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.183939721 × 200,000 ≈ 36787.944117 bits/s ≈ 36.787944 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=0.5, S≈0.183940, successful rate≈183.940 frames/s = 36.788 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 500 attempts/s; collisions reduce the delivered frame rate to about 183.940/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside><h2>Case c · 250 frames/s</h2><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>200 bits</td></tr><tr><td>R</td><td>200 kbps = 200,000 bits/s</td></tr><tr><td>λ</td><td>250 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 200/200,000 = 0.001 s = 1 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 250 × 0.001 = 0.25 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−2G = -0.5; e to that power ≈ 0.606530660.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 0.25 × 0.606530660 ≈ 0.151632665.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.151632665/0.001 ≈ 151.632665 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.151632665 × 200,000 ≈ 30326.532986 bits/s ≈ 30.326533 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=0.25, S≈0.151633, successful rate≈151.633 frames/s = 30.327 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 250 attempts/s; collisions reduce the delivered frame rate to about 151.633/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside></div></section><p><small>Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q6c","title":"Q6C · UDP TCP SCTP comparison","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q6C. Compare UDP, TCP and SCTP with appropriate points (any eight points). <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">UDP</th><th scope=\"col\">TCP</th><th scope=\"col\">SCTP</th></tr></thead><tbody><tr><td>Service unit</td><td>Datagram; preserves messages</td><td>Byte stream; no message boundaries</td><td>Messages carried in chunks; preserves boundaries</td></tr><tr><td>Connection setup</td><td>No protocol handshake</td><td>Connection; usual three-way SYN exchange</td><td>Association; four-message cookie exchange</td></tr><tr><td>Reliability</td><td>No delivery/order guarantee</td><td>Reliable ordered stream</td><td>Reliable messages; ordered per stream by default, unordered option</td></tr><tr><td>Ordering scope</td><td>None supplied</td><td>One ordered byte stream per direction</td><td>Multiple streams; per-stream order avoids blocking every stream on one stream’s ordering gap</td></tr><tr><td>Flow control</td><td>Not supplied by UDP</td><td>Receiver-advertised window</td><td>Receiver flow control</td></tr><tr><td>Congestion control</td><td>Not supplied by UDP</td><td>Yes</td><td>Yes</td></tr><tr><td>Multihoming</td><td>No built-in association failover</td><td>Classic TCP uses one address pair</td><td>Association can bind multiple addresses; built-in path failover</td></tr><tr><td>Header</td><td>8 bytes</td><td>Minimum 20 bytes</td><td>12-byte common header plus chunks</td></tr><tr><td>Typical use</td><td>DNS, real-time applications with their own controls</td><td>Web over HTTP/1.1 or HTTP/2, reliable byte transfers</td><td>Telecom signalling and multi-stream message applications</td></tr><tr><td>Performance claim</td><td>Low protocol overhead, not automatically fastest overall</td><td>Recovery/ordering have costs and benefits</td><td>Extra capabilities; no universal speed ranking</td></tr></tbody></table><p>The correct protocol depends on application semantics and network conditions. “UDP is always faster” and “SCTP is always slower than TCP” are not defensible general rules. All three normally run above IP; security/encryption is a separate requirement.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A game can prefer fresh updates over retransmitting stale state, while a document download needs every byte. An application with separate message streams can benefit from SCTP’s stream separation.</p></aside></div></section><p><small>Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.</small></p>"},{"id":"q7a","title":"Q7A · Bellman–Ford intermediate steps","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q7A. Consider a network topology consisting of nodes A, B, C, D, E, F, and G. The directed edges and weights are given below. Using Bellman–Ford: (i) Determine the shortest path from A to G. (ii) Compute its shortest distance. (iii) Show all intermediate steps, including edge relaxation at each iteration. (iv) Illustrate the original topology and the final shortest path with edge distances clearly marked. Directed edges: A→B=7, A→C=6, A→D=5, B→E=−2, D→C=−2, C→B=−2, C→E=1, E→G=5, D→F=3, F→G=4. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Directed edge</th><th scope=\"col\">Weight</th></tr></thead><tbody><tr><td>A→B</td><td>7</td></tr><tr><td>A→C</td><td>6</td></tr><tr><td>A→D</td><td>5</td></tr><tr><td>B→E</td><td>-2</td></tr><tr><td>D→C</td><td>-2</td></tr><tr><td>C→B</td><td>-2</td></tr><tr><td>C→E</td><td>1</td></tr><tr><td>E→G</td><td>5</td></tr><tr><td>D→F</td><td>3</td></tr><tr><td>F→G</td><td>4</td></tr></tbody></table><h2>To find</h2><p>The shortest route and cost, with complete passes and a negative-cycle check.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Bellman–Ford permits negative edges. We use the listed order with in-place updates; do not mix this with a table that reads only the previous pass.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/bellman-pyq.8245b97635.svg\" width=\"772.00\" height=\"370.00\" alt=\"Bellman–Ford · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>7 vertices → at most 6 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.</p></div><div class=\"step\"><h4>Step 2. Pass 1: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(7)=7</td><td>7</td><td>Update; predecessor=A</td></tr><tr><td>A→C</td><td>∞</td><td>0+(6)=6</td><td>6</td><td>Update; predecessor=A</td></tr><tr><td>A→D</td><td>∞</td><td>0+(5)=5</td><td>5</td><td>Update; predecessor=A</td></tr><tr><td>B→E</td><td>∞</td><td>7+(-2)=5</td><td>5</td><td>Update; predecessor=B</td></tr><tr><td>D→C</td><td>6</td><td>5+(-2)=3</td><td>3</td><td>Update; predecessor=D</td></tr><tr><td>C→B</td><td>7</td><td>3+(-2)=1</td><td>1</td><td>Update; predecessor=C</td></tr><tr><td>C→E</td><td>5</td><td>3+(1)=4</td><td>4</td><td>Update; predecessor=C</td></tr><tr><td>E→G</td><td>∞</td><td>4+(5)=9</td><td>9</td><td>Update; predecessor=E</td></tr><tr><td>D→F</td><td>∞</td><td>5+(3)=8</td><td>8</td><td>Update; predecessor=D</td></tr><tr><td>F→G</td><td>9</td><td>8+(4)=12</td><td>9</td><td>No improvement</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th><th scope=\"col\">E</th><th scope=\"col\">F</th><th scope=\"col\">G</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>1</td><td>3</td><td>5</td><td>4</td><td>8</td><td>9</td></tr><tr><td>Predecessor</td><td>—</td><td>C</td><td>D</td><td>A</td><td>C</td><td>D</td><td>E</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Pass 2: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>1</td><td>0+(7)=7</td><td>1</td><td>No improvement</td></tr><tr><td>A→C</td><td>3</td><td>0+(6)=6</td><td>3</td><td>No improvement</td></tr><tr><td>A→D</td><td>5</td><td>0+(5)=5</td><td>5</td><td>No improvement</td></tr><tr><td>B→E</td><td>4</td><td>1+(-2)=-1</td><td>-1</td><td>Update; predecessor=B</td></tr><tr><td>D→C</td><td>3</td><td>5+(-2)=3</td><td>3</td><td>No improvement</td></tr><tr><td>C→B</td><td>1</td><td>3+(-2)=1</td><td>1</td><td>No improvement</td></tr><tr><td>C→E</td><td>-1</td><td>3+(1)=4</td><td>-1</td><td>No improvement</td></tr><tr><td>E→G</td><td>9</td><td>-1+(5)=4</td><td>4</td><td>Update; predecessor=E</td></tr><tr><td>D→F</td><td>8</td><td>5+(3)=8</td><td>8</td><td>No improvement</td></tr><tr><td>F→G</td><td>4</td><td>8+(4)=12</td><td>4</td><td>No improvement</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th><th scope=\"col\">E</th><th scope=\"col\">F</th><th scope=\"col\">G</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>1</td><td>3</td><td>5</td><td>-1</td><td>8</td><td>4</td></tr><tr><td>Predecessor</td><td>—</td><td>C</td><td>D</td><td>A</td><td>B</td><td>D</td><td>E</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Pass 3: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>1</td><td>0+(7)=7</td><td>1</td><td>No improvement</td></tr><tr><td>A→C</td><td>3</td><td>0+(6)=6</td><td>3</td><td>No improvement</td></tr><tr><td>A→D</td><td>5</td><td>0+(5)=5</td><td>5</td><td>No improvement</td></tr><tr><td>B→E</td><td>-1</td><td>1+(-2)=-1</td><td>-1</td><td>No improvement</td></tr><tr><td>D→C</td><td>3</td><td>5+(-2)=3</td><td>3</td><td>No improvement</td></tr><tr><td>C→B</td><td>1</td><td>3+(-2)=1</td><td>1</td><td>No improvement</td></tr><tr><td>C→E</td><td>-1</td><td>3+(1)=4</td><td>-1</td><td>No improvement</td></tr><tr><td>E→G</td><td>4</td><td>-1+(5)=4</td><td>4</td><td>No improvement</td></tr><tr><td>D→F</td><td>8</td><td>5+(3)=8</td><td>8</td><td>No improvement</td></tr><tr><td>F→G</td><td>4</td><td>8+(4)=12</td><td>4</td><td>No improvement</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th><th scope=\"col\">E</th><th scope=\"col\">F</th><th scope=\"col\">G</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>1</td><td>3</td><td>5</td><td>-1</td><td>8</td><td>4</td></tr><tr><td>Predecessor</td><td>—</td><td>C</td><td>D</td><td>A</td><td>B</td><td>D</td><td>E</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Stop after an unchanged pass</h4><p>This entire pass changed no distance. Further identical relaxation passes will not improve anything.</p></div><div class=\"step\"><h4>Step 6. Recover and total the path</h4><p>Backward predecessors: G ← E ← B ← C ← D ← A. Forward route: A → D → C → B → E → G.</p><p>Cost = (5) + (-2) + (-2) + (-2) + (5) = 4. No edge can now improve its destination label.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A → D → C → B → E → G; shortest cost=4.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Negative weights are a general graph-exercise feature. RIP hop counts and OSPF link costs are not negative in the ordinary routing protocols studied here.</p></aside><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/bellman-pyq-solution.9ae8451e95.svg\" width=\"999.00\" height=\"428.00\" alt=\"Bellman–Ford · final route and distances\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Highlighted route A→D→C→B→E→G, cost 5−2−2−2+5=4.</figcaption></figure></div></section><p><small>Source: Re-exam · 4 February 2026, original question paper page 3. Original marks retained; solution independently authored.</small></p>"},{"id":"q7b","title":"Q7B · Leaky bucket and comparison","html":"<section class=\"example\"><h3 class=\"exam-question\">Actual PYQ · Q7B. Draw a neat diagram and explain the working of the Leaky Bucket Algorithm. Is the Leaky Bucket Algorithm advantageous over the Token Bucket Algorithm? Justify your answer. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>In the textbook <strong>leaky-bucket queue/shaper</strong> model, arriving packets enter a finite buffer. The output sends at a configured rate whenever data is queued. When the queue empties, it cannot send nonexistent packets; when the buffer is full, excess arrivals are dropped in this finite-buffer model.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-leaky.77bdbcf957.svg\" width=\"820\" height=\"515\" alt=\"Leaky-bucket data queue\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Finite data buffer smooths a burst into a bounded departure rate.</figcaption></figure><ol><li>Choose buffer capacity B and output service rate r in consistent units.</li><li>Admit arrivals that fit. Drop/mark overflow according to the stated implementation; this queue example drops the excess.</li><li>Drain at rate r while the queue is nonempty. Idle time does not accumulate permission for a later faster burst.</li><li>The result is smoothed output. Larger buffers accommodate larger bursts but can increase waiting delay.</li></ol><table><thead><tr><th scope=\"col\">Advantage</th><th scope=\"col\">Limitation</th></tr></thead><tbody><tr><td>Simple bound on output rate</td><td>Bursts may overflow or suffer delay</td></tr><tr><td>Reduces short-term output variation</td><td>Unused idle service cannot be saved</td></tr><tr><td>Useful for predictable traffic shaping</td><td>No end-to-end delay/loss guarantee by itself</td></tr></tbody></table><p>The term “leaky bucket” can also describe a conformance meter in standards. This course’s diagrams and numerical questions explicitly use the finite data-queue model, so its state is queued data rather than tokens.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A queue of 20 packets drained at 5 packets/s needs 4 seconds to empty without new arrivals. If it is already full, an instantaneous extra burst cannot all be stored.</p></aside><h2>Justified comparison</h2><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">Leaky data queue</th><th scope=\"col\">Token bucket</th></tr></thead><tbody><tr><td>Stored state</td><td>Queued data</td><td>Tokens representing permission</td></tr><tr><td>Idle period</td><td>Empty queue; unused service lost</td><td>Tokens accumulate up to B</td></tr><tr><td>Output burst</td><td>Smoothed by configured service rate</td><td>Allowed if enough tokens and physical capacity exist</td></tr><tr><td>Overflow/shortage</td><td>Finite queue can overflow</td><td>Shaper waits; policer may mark/drop</td></tr><tr><td>Main parameters</td><td>Queue capacity and drain rate</td><td>Token capacity and generation rate</td></tr><tr><td>Useful when</td><td>A smoother output profile is required</td><td>Average rate plus burst allowance is required</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A steady-rate interface may use leaky shaping. A bursty file application can use token shaping to send short bursts while limiting its sustained rate.</p></aside><p>Neither is always advantageous. Choose leaky queue shaping for smooth departures; choose token bucket when controlled bursts after idle time are desirable.</p></div></section><p><small>Source: Re-exam · 4 February 2026, original question paper page 3. Original marks retained; solution independently authored.</small></p>"}]},{"id":"paper-2025-legacy-reexam","title":"2025-12-05 · 2022-23","unit":"Historical PYQ","scope":"Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.","sections":[{"id":"q1a","title":"Q1(a) · Network definition","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(a). What is computer Network. Draw a schematic diagram of it. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>A <strong>computer network</strong> is a set of interconnected devices that exchange data and share resources using communication protocols. A link carries signals; a protocol defines message format, meaning and timing. Hosts run applications, switches forward local frames and routers connect IP networks.</p><table><thead><tr><th scope=\"col\">Type</th><th scope=\"col\">Meaning and scope</th><th scope=\"col\">Example</th></tr></thead><tbody><tr><td>PAN</td><td>Personal Area Network: a person’s nearby devices</td><td>Phone linked to earbuds</td></tr><tr><td>LAN</td><td>Local Area Network: a building or local campus network under local administration</td><td>Laboratory Ethernet/Wi-Fi</td></tr><tr><td>MAN</td><td>Metropolitan Area Network: interconnects sites across a town/city</td><td>City-wide institutional network</td></tr><tr><td>WAN</td><td>Wide Area Network: connects geographically separated networks over regional/global links</td><td>Branches in different cities</td></tr><tr><td>ARPANET</td><td>Historical packet-switched research network; a major predecessor of the Internet</td><td>Early interconnected research institutions; not a modern geographic size category</td></tr></tbody></table><p>Classification by geographical scope is descriptive: a fixed kilometre boundary or a guaranteed speed is not part of every definition. Networks can also be classified by wired/wireless medium or by client-server/peer-to-peer organization.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A student uses a PAN for earbuds, a LAN in the lab and a WAN when accessing a distant university service.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> PAN personal, LAN local, MAN city, WAN wide.</p><pre>Host A ─┐\r\n        ├─ Switch ─ Router ─ Other network\r\nHost B ─┘</pre><p>The hosts exchange application data; the switch forwards local frames; the router connects different IP networks.</p></div></section>"},{"id":"q1b","title":"Q1(b) · Error control","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(b). What is error control. What are the different methods defined for error control. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>A transmission error changes one or more bits. A <strong>single-bit error</strong> flips one bit. A <strong>burst error</strong> affects a span from the first corrupted bit to the last; the bits in between need not all change. Detection identifies an invalid received pattern; correction identifies the intended pattern within the code’s guaranteed capability.</p><h2>Block coding</h2><ol><li>Divide data into fixed k-bit datawords. Map each one to an n-bit codeword, with n greater than k.</li><li>The n−k redundant bits create separation between valid codewords. There are 2<sup>k</sup> valid codewords, a subset of the 2<sup>n</sup> possible n-bit patterns, for an injective binary block code.</li><li>A receiver can reject patterns that are not valid codewords. Nearest-codeword decoding can correct errors only if the received pattern has an unambiguous nearest intended codeword under the error bound.</li><li>Error-control protocols may combine detection with retransmission (ARQ), or use sufficient coding redundancy for forward error correction (FEC).</li></ol><div class=\"math-display\"><img src=\"math/d973fda532c4ffe6.svg\" alt=\"R_c=k/n,\\quad r=n-k\" style=\"width:21.89ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>A simple even-parity code maps 101 to 1010. The redundant parity bit permits detection of any single-bit flip, but cannot identify which bit changed.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Detection asks error hua? Correction asks kaunsa correct word?</p></div></section>"},{"id":"q1c","title":"Q1(c) · Classful IPv4","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(c). Explain the classes of IP address. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>An IPv4 address identifies an IP interface. The network prefix selects the destination network; remaining bits identify an address within it. Classful addressing is historical; modern routing uses explicit CIDR prefixes.</p><div class=\"table-wrap\"><table><thead><tr><th>Class</th><th>First octet</th><th>Default mask</th><th>Network / host split</th><th>Purpose</th></tr></thead><tbody><tr><td>A</td><td>1–126 (ordinary unicast)</td><td>255.0.0.0 (/8)</td><td>8 / 24 bits</td><td>Large historical unicast networks; 0 and 127 reserved</td></tr><tr><td>B</td><td>128–191</td><td>255.255.0.0 (/16)</td><td>16 / 16 bits</td><td>Medium historical unicast networks</td></tr><tr><td>C</td><td>192–223</td><td>255.255.255.0 (/24)</td><td>24 / 8 bits</td><td>Small historical unicast networks</td></tr><tr><td>D</td><td>224–239</td><td>No unicast default mask</td><td>Not network/host class split</td><td>Multicast</td></tr><tr><td>E</td><td>240–255</td><td>No unicast default mask</td><td>Not normal unicast allocation</td><td>Reserved/experimental; special addresses exist</td></tr></tbody></table></div><p>Example: 114.34.2.8 is class A with network 114.0.0.0 and host portion 34.2.8. Class does not override an explicitly supplied CIDR prefix.</p></div></section>"},{"id":"q1d","title":"Q1(d) · UDP features","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(d). What are the features of UDP. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>User Datagram Protocol (UDP)</strong> provides connectionless, message-oriented process delivery. One send creates a datagram; message boundaries are retained. UDP has an <strong>8-byte header</strong>, carries ports and length, and offers checksum-based corruption detection. It does not itself guarantee delivery, ordering, duplicate suppression, retransmission, flow control or congestion control.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-udp.b14cba3c28.svg\" width=\"820\" height=\"289\" alt=\"UDP header: each row contains 32 bits\" loading=\"lazy\" decoding=\"async\"></div><figcaption>UDP fixed header: four 16-bit fields, eight bytes total.</figcaption></figure><table><thead><tr><th scope=\"col\">UDP field</th><th scope=\"col\">Width</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Source port</td><td>16 bits</td><td>Sending endpoint; a zero value can indicate no reply port when unused</td></tr><tr><td>Destination port</td><td>16 bits</td><td>Receiving application endpoint</td></tr><tr><td>Length</td><td>16 bits</td><td>UDP header plus UDP payload; minimum 8 bytes</td></tr><tr><td>Checksum</td><td>16 bits</td><td>Error detection over UDP and an IP pseudo-header; not retransmission</td></tr></tbody></table><h2>Operation and services</h2><ol><li>The application chooses the destination IP/port and supplies a message. UDP adds its header and passes the datagram to IP without a connection handshake.</li><li>The receiving UDP layer validates the length/checksum as applicable and uses the destination endpoint to deliver the datagram.</li><li>A corrupt or undeliverable datagram may be discarded; UDP does not recover it. Any reliability or rate-control policy must come from the application or a protocol above UDP.</li><li>UDP checksum zero can mean checksum omitted in IPv4. IPv6 ordinarily requires the UDP checksum; specialized exceptions are outside this syllabus.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A DNS query often uses UDP because a small request/reply can avoid a transport handshake. DNS also uses TCP, so “DNS always UDP” is incorrect.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> UDP datagram preserve; reliability automatic nahi.</p></div></section>"},{"id":"q2a","title":"Q2(a) · Network topologies","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(a). Explain the topologies used in computer networks. Give specific examples of each and compare them on the basis of advantages and disadvantages. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Topology</strong> is the arrangement of nodes and links. Physical topology describes actual links; logical topology describes how data flows. A switch-centred physical star is different from a shared collision-domain bus.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-topologies.d9e18f041b.svg\" width=\"820\" height=\"665\" alt=\"Four physical network topologies\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Star, bus, ring and full mesh; edges depict physical connections.</figcaption></figure><table><thead><tr><th scope=\"col\">Topology</th><th scope=\"col\">Structure</th><th scope=\"col\">Benefit</th><th scope=\"col\">Limitation</th></tr></thead><tbody><tr><td>Bus</td><td>Devices share a common backbone</td><td>Simple small shared-medium layout</td><td>Backbone fault affects segment; collisions possible on classic shared bus</td></tr><tr><td>Star</td><td>Each device connects to a central switch/hub</td><td>Easy expansion and fault isolation</td><td>Central-device failure affects star; more cabling</td></tr><tr><td>Ring</td><td>Each node connected to two neighbours in a ring</td><td>Structured traversal; token-based variants coordinate access</td><td>Simple single-ring break can disrupt operation unless protected</td></tr><tr><td>Full mesh</td><td>Every pair has a direct link</td><td>Redundant paths and direct connectivity</td><td>Expensive ports/cabling: n(n−1)/2 undirected links</td></tr><tr><td>Tree/hybrid</td><td>Hierarchical stars or combined topologies</td><td>Scales into buildings/floors</td><td>Upper-level faults affect dependent branches</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A lab normally uses a switch-centred star: unplugging one workstation cable isolates that workstation. A failed central switch can stop the whole lab unless redundancy is provided.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Layout draw karo, then one strength and one failure case.</p><h3>Two advantages and two disadvantages of each topology</h3><div class=\"table-wrap\"><table><thead><tr><th>Topology / example</th><th>Advantage 1</th><th>Advantage 2</th><th>Disadvantage 1</th><th>Disadvantage 2</th></tr></thead><tbody><tr><td>Star: switched computer laboratory</td><td>A device can be added on a spare central port without rebuilding the whole topology</td><td>A single access-cable fault normally isolates only its attached device</td><td>Central-switch failure affects all attached devices unless redundant</td><td>A separate cable and switch port are needed per device</td></tr><tr><td>Bus: legacy coaxial Ethernet</td><td>Uses little cable in a small linear layout</td><td>No central switch is required in the simple shared-bus design</td><td>A backbone fault can disable the segment</td><td>Shared bandwidth, contention and fault diagnosis become difficult as it grows</td></tr><tr><td>Ring: token-based ring</td><td>Controlled token access avoids data collisions among compliant stations</td><td>Token rotation gives stations an organized opportunity to transmit</td><td>A break can interrupt an unprotected single ring</td><td>Adding/removing a node can disrupt a simple ring</td></tr><tr><td>Mesh: redundant router backbone</td><td>Alternate links preserve connectivity after some link failures</td><td>Direct pairwise links can carry separate exchanges without a shared central bottleneck</td><td>A full mesh needs n(n−1)/2 links and many ports</td><td>Configuration, cabling and maintenance become complex</td></tr></tbody></table></div><p>The ring benefits above assume token-controlled access; physical ring wiring alone does not guarantee fairness or collision avoidance. The failure disadvantages describe simple layouts without protection/redundancy.</p></div></section>"},{"id":"q2b","title":"Q2(b) · Stop-and-Wait versus Go-Back-N","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(b). Explain the stop and Wait ARQ and the Go Back N ARQ method. Which method is superior and why? <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Stop-and-Wait ARQ</strong> permits only one outstanding frame. The sender stores its frame, transmits it and starts a timer. A valid matching ACK advances the sender; a timeout retransmits the stored frame.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-stopwait.a99281ab96.svg\" width=\"820\" height=\"569\" alt=\"Stop-and-Wait: lost ACK and duplicate rejection\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Lost ACK causes a duplicate transmission, not duplicate delivery.</figcaption></figure><ol><li>Use alternating sequence numbers 0 and 1. The receiver remembers the next expected number. Here ACK k means the next sequence expected.</li><li>Normal: send frame 0, receiver accepts it and sends ACK 1; sender then sends frame 1.</li><li>Damaged/lost data: receiver cannot accept the missing valid frame. The sender eventually times out and retransmits.</li><li>Lost ACK: the receiver already accepted the frame, but the sender times out and retransmits it. The receiver detects the duplicate by sequence number, does not deliver it twice, and repeats the ACK.</li><li>A damaged ACK must not advance the sender. The timer provides eventual recovery. Waiting each round trip limits utilization on high-delay links.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>After frame 0 is delivered, ACK 1 is lost. A retransmitted frame 0 is discarded as a duplicate; another ACK 1 tells the sender it may proceed.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> One frame outstanding; duplicate ko acknowledge karo, deliver dobara nahi.</p>\r\n<div class=\"answer\"><p><strong>Go-Back-N (GBN) ARQ</strong> pipelines up to W outstanding frames. For m-bit sequence numbers, textbook GBN uses W ≤ 2<sup>m</sup>−1 and receiver window 1. The receiver accepts only the next in-order frame; out-of-order frames are discarded. ACK k here cumulatively acknowledges all frames before k and means “next expected is k”.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-gbn.5f577a6979.svg\" width=\"820\" height=\"750\" alt=\"GBN W=7: loss and cumulative ACKs\" loading=\"lazy\" decoding=\"async\"></div><figcaption>GBN example: frame 2 lost; frames 3–6 discarded; timeout resends 2–6.</figcaption></figure><ol><li>For W=7 with m=3, the sequence space is 0…7. Initially the sender can transmit 0…6. It stores every unacknowledged frame; a timer tracks the oldest one.</li><li>Normal: after receiving 0 and 1, cumulative ACK 2 advances the sender base to 2. The sender can fill newly opened window slots.</li><li>Lost data: if frame 2 is lost, frames 3…6 arrive out of order and are discarded. Repeated ACK 2 says frame 2 is still expected. On timeout the sender retransmits all outstanding frames starting at 2, here 2…6.</li><li>Lost ACK: if ACK 2 is lost but ACK 3 arrives, the later cumulative ACK confirms frames 0…2 and avoids unnecessary retransmission. If no later useful ACK arrives before timeout, the sender retransmits from its oldest outstanding frame; the receiver rejects duplicates and sends its current ACK.</li><li>After sequence 7, numbers wrap to 0. The bound W ≤ 7 leaves one sequence value outside the sender’s current window, preventing the all-ACKs-lost ambiguity of a full eight-frame window in the textbook model.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>With W=7, loss of frame 2 can waste successful receptions of 3…6. GBN trades simple receiver buffering for extra retransmission after loss.</p></aside><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-gbn-normal.144a24ea80.svg\" width=\"820\" height=\"522\" alt=\"GBN W=7: normal window movement\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Normal transmission: both windows advance as frames are cumulatively acknowledged.</figcaption></figure><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-gbn-ack.713dc9972e.svg\" width=\"820\" height=\"598\" alt=\"GBN: a later cumulative ACK covers a lost ACK\" loading=\"lazy\" decoding=\"async\"></div><figcaption>A later cumulative ACK can cover an earlier lost ACK.</figcaption></figure></div><p class=\"memory\"><strong>Yaad rakho:</strong> GBN receiver one; gap ke baad discard; timeout pe outstanding suffix repeat.</p>\r\n<div class=\"answer\"><table><thead><tr><th scope=\"col\">Property</th><th scope=\"col\">Stop-and-Wait</th><th scope=\"col\">Go-Back-N</th><th scope=\"col\">Selective Repeat</th></tr></thead><tbody><tr><td>Outstanding sender frames</td><td>1</td><td>Up to 2^m−1</td><td>Up to 2^(m−1), equal windows</td></tr><tr><td>Receiver window</td><td>1</td><td>1</td><td>Same maximum as sender in standard equal-window SR</td></tr><tr><td>ACK convention used here</td><td>Next expected</td><td>Cumulative, next expected</td><td>Individual frame accepted</td></tr><tr><td>Out-of-order data</td><td>Not delivered</td><td>Discarded</td><td>Buffered within valid window</td></tr><tr><td>After timeout</td><td>Repeat the one frame</td><td>Repeat outstanding frames from base</td><td>Repeat only timed-out frame</td></tr><tr><td>Buffer/tracking cost</td><td>Low</td><td>Sender window; simple receiver</td><td>Sender and receiver windows; per-frame tracking</td></tr><tr><td>Tradeoff</td><td>Simple but idle during RTT</td><td>Good pipelining, waste after loss</td><td>Efficient loss recovery, greater complexity</td></tr></tbody></table><p>Every comparison assumes finite sequence numbers, correct duplicate handling and the textbook protocol models. The same text “ACK 3” can mean different things under different ACK conventions; state its meaning before explaining a trace.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>If one frame out of a seven-frame burst is lost, GBN may retransmit several frames, whereas SR can retain later frames and resend the missing one.</p></aside></div><h3>Which is superior, and why?</h3><p><strong>Go-Back-N is usually superior in link utilization when propagation delay is significant:</strong> it sends several frames before waiting, whereas Stop-and-Wait leaves the link idle during much of the round trip. Its cumulative ACKs also simplify receiver tracking. This is not an unconditional reliability ranking: GBN needs sender buffering and may retransmit correctly received later frames after one loss. Stop-and-Wait is simpler and can suffice for low-rate, short-delay exchanges. Both recover loss correctly when their timers and sequence-number rules are followed.</p></div></section>"},{"id":"q3a","title":"Q3(a) · FDMA and TDMA","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(a). Explain and compare the FDMA and TDMA techniques. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical question is outside the named current syllabus. It is retained in the map for a truthful paper inventory but excluded from the current exam-preparation sequence.</p></div></section>"},{"id":"q3b","title":"Q3(b) · Classful net/host IDs and /26 host","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(b). (i) Find the netid and the hostid of the following classfull addresses: a. 114.34.2.8 b. 208.34.54.12 [5]. (ii) what is the last valid host on the subnetwork 165.21.80.128/26? [5] <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>An IPv4 address identifies an IP interface. The network prefix selects the destination network; remaining bits identify an address within it. Classful addressing is historical; modern routing uses explicit CIDR prefixes.</p><div class=\"table-wrap\"><table><thead><tr><th>Class</th><th>First octet</th><th>Default mask</th><th>Network / host split</th><th>Purpose</th></tr></thead><tbody><tr><td>A</td><td>1–126 (ordinary unicast)</td><td>255.0.0.0 (/8)</td><td>8 / 24 bits</td><td>Large historical unicast networks; 0 and 127 reserved</td></tr><tr><td>B</td><td>128–191</td><td>255.255.0.0 (/16)</td><td>16 / 16 bits</td><td>Medium historical unicast networks</td></tr><tr><td>C</td><td>192–223</td><td>255.255.255.0 (/24)</td><td>24 / 8 bits</td><td>Small historical unicast networks</td></tr><tr><td>D</td><td>224–239</td><td>No unicast default mask</td><td>Not network/host class split</td><td>Multicast</td></tr><tr><td>E</td><td>240–255</td><td>No unicast default mask</td><td>Not normal unicast allocation</td><td>Reserved/experimental; special addresses exist</td></tr></tbody></table></div><p>Example: 114.34.2.8 is class A with network 114.0.0.0 and host portion 34.2.8. Class does not override an explicitly supplied CIDR prefix.</p><h3>Classful split</h3><div class=\"table-wrap\"><table><thead><tr><th>Address</th><th>Class and mask</th><th>Network ID</th><th>Host ID</th></tr></thead><tbody><tr><td>114.34.2.8</td><td>A /8</td><td>114.0.0.0</td><td>34.2.8 (24-bit host portion)</td></tr><tr><td>208.34.54.12</td><td>C /24</td><td>208.34.54.0</td><td>12 (8-bit host portion)</td></tr></tbody></table></div><h3>Last valid host of 165.21.80.128/26</h3><h3>Given</h3><p>165.21.80.128/26</p><h3>To find</h3><p>First and last addresses and total block size.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/06561cae3cdafd6c.svg\" alt=\"N=2^{32-p}\" style=\"width:9.994ex;height:2.185ex\" loading=\"lazy\" decoding=\"async\"></div><p>p is the prefix length. The remaining host bits vary through every combination. The network address is the first address; setting all host bits to one gives the last address.</p><div class=\"step\"><h3>Step 1. Find host bits</h3><p>32 − 26 = 6. N = 64.</p></div><div class=\"step\"><h3>Step 2. Locate the aligned block</h3><p>Mask = 255.255.255.192. The first varying octet is octet 4; its block width is 64. The supplied value 128 lies in the interval 128–191. Keep earlier octets fixed. Set any later octets to 0 for the first address and 255 for the last address.</p></div><div class=\"step\"><h3>Step 3. Write the result</h3><p>First = <strong>165.21.80.128</strong>; last = <strong>165.21.80.191</strong>; total = <strong>64</strong> addresses. Usual usable host range: 165.21.80.129–165.21.80.190.</p></div><p><strong>Asked host answer: 165.21.80.190</strong>; .191 is broadcast, not a usable host.</p></div></section>"},{"id":"q4a","title":"Q4(a) · CSMA persistence and CSMA/CD","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(a). Explain the persistence method defined in CSMA. In which way these methods are used in CSMA/CD. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Persistence specifies how a station behaves after observing that the medium is busy or becomes idle.</p><p><strong>Simple meaning.</strong> 1 = turant; non = random wait; p = probability ke basis pe start.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/persistence.528dafcd8a.svg\" width=\"820\" height=\"590\" alt=\"CSMA persistence: what happens after carrier sensing?\" loading=\"lazy\" decoding=\"async\"></div><figcaption>1-persistent, non-persistent and p-persistent CSMA</figcaption></figure><h2>Understand it step by step</h2><ol><li>In 1-persistent CSMA, a ready station transmits immediately when idle; when busy it continuously senses. Several waiting stations may all start at the same idle transition.</li><li>In non-persistent CSMA, a busy observation causes a random wait before the next sensing attempt. This reduces simultaneous retries but can waste some idle time.</li><li>In p-persistent CSMA, when an eligible idle slot begins, transmit with probability p. With probability 1−p, defer to a later slot and sense again. The probabilistic decision is repeated, not a one-time discard.</li></ol><table><thead><tr><th scope=\"col\">Rule</th><th scope=\"col\">When idle</th><th scope=\"col\">When busy</th><th scope=\"col\">Trade-off</th></tr></thead><tbody><tr><td>1-persistent</td><td>Transmit immediately</td><td>Keep listening; transmit as soon as idle</td><td>Low idle delay, but waiting stations may start together</td></tr><tr><td>Non-persistent</td><td>Transmit</td><td>Wait a random time, then sense again</td><td>Less synchronized contention; may leave avoidable idle time</td></tr><tr><td>p-persistent (slotted)</td><td>Transmit with probability p; defer a slot with probability 1−p</td><td>Wait until available, then resume the probabilistic slot rule</td><td>Controls contention; needs slots and a choice of p</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>With p=0.25, the station has a 25% chance of transmitting at that idle-slot decision and a 75% chance of deferring. It does not mean it transmits exactly once every four slots.</p></aside><div class=\"answer\"></div><p class=\"memory\"><strong>Yaad rakho:</strong> 1 = start now; non = wait then listen; p = chance per idle slot.</p>\r\n<p><strong>Definition.</strong> CSMA with Collision Detection monitors the medium during transmission, aborts a detected collision and retries after a randomized backoff.</p><p><strong>Simple meaning.</strong> CD = takkar detect hui toh transmission rok do.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/collision-roundtrip.42358ec7bf.svg\" width=\"820\" height=\"410\" alt=\"CSMA/CD: sender must still be sending after a round trip\" loading=\"lazy\" decoding=\"async\"></div><figcaption>CSMA/CD: detect a collision while transmitting</figcaption></figure><h2>Understand it step by step</h2><ol><li>Sense the channel. In traditional shared half-duplex Ethernet, begin transmission when permitted by the access rule.</li><li>Continue monitoring while transmitting. If a collision is detected, send the collision/jam indication and abort the current frame.</li><li>Choose a random delay using binary exponential backoff; then attempt again subject to the access rules.</li><li>The sender must still be transmitting when a worst-case collision indication returns. Hence the ideal timing requirement is Tframe ≥ 2Tp.</li><li>Modern switched full-duplex Ethernet links do not use collision-based CSMA/CD access. Keep the historical/shared-medium assumptions explicit.</li></ol><div class=\"math-display\"><img src=\"math/4f522413155daf19.svg\" alt=\"T_{\\mathrm{frame}}\\geq 2T_p\" style=\"width:11.931ex;height:2.181ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/eae5a57f0575ef7d.svg\" alt=\"L_{\\min}\\geq 2RT_p\" style=\"width:12.575ex;height:2.195ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>On a shared half-duplex Ethernet segment, a station that detects a collision stops sending the remaining frame bits, saving time compared with completing a corrupted long frame.</p></aside><div class=\"answer\"><p>CSMA/CD senses before transmission and detects collisions during transmission. A collision causes abort/jam and a random backoff before retry. To detect the most distant collision before the frame finishes, the transmission duration must be at least the worst-case round-trip propagation delay. Thus Lmin/R ≥ 2Tp in the idealized model.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Detect karna hai toh sender tab tak bhej raha hona chahiye.</p><h3>Persistence decision flows</h3><pre>1-persistent:\r\nReady → sense → busy? yes → sense again\r\n                      no → transmit immediately\r\n\r\np-persistent (slotted medium):\r\nReady → sense → busy? yes → wait and sense\r\n                      no → draw random decision\r\n                    probability p → transmit\r\n                  probability 1−p → wait one slot → sense again</pre><p>Non-persistent CSMA instead waits a random time after a busy observation before sensing again. A collision leads to the protocol's retry/backoff procedure; the persistence rule alone does not guarantee success.</p></div></section>"},{"id":"q4b","title":"Q4(b) · OSPF and link types","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(b). Explain OSPF protocol and the types of links used in OSPF to establish the communication. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Open Shortest Path First (OSPF) is an interior link-state routing protocol that selects routes using shortest-path calculations and additive link costs.</p><p><strong>Simple meaning.</strong> OSPF = link-state map + Dijkstra + summed costs.</p><h2>Understand it step by step</h2><ol><li>Routers discover and maintain neighbour relationships using Hello packets and exchange link-state information.</li><li>Routers calculate shortest paths from their own position in the topology. A path cost is the sum of its outgoing-link costs, not necessarily the fewest hops.</li><li>The network can be divided into areas. In normal OSPF hierarchy, Area 0 is the backbone used to interconnect other areas via area border routers.</li><li>OSPFv2 is the IPv4 protocol in the supplied paper; it is carried directly in IP protocol number 89, not TCP/UDP port 89.</li><li>A common vendor default derives interface cost from reference bandwidth/interface bandwidth, but actual configured costs and reference bandwidth matter. Use the given costs in an exam graph.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Route A→B→D costs 10+10=20 while A→C→D costs 5+8=13. OSPF’s cost comparison prefers the latter even though both have two links.</p></aside><div class=\"answer\"><p>OSPF exchanges and maintains link-state information, builds a topology database and runs Dijkstra’s shortest-path computation rooted at the local router. It chooses a path with the lowest sum of link costs and installs the corresponding next hop. Equal-cost paths may be supported.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> OSPF cost add karo; sirf hops nahi.</p><h3>Link types represented in an OSPF topology</h3><div class=\"table-wrap\"><table><thead><tr><th>Type</th><th>Meaning</th><th>Diagram</th></tr></thead><tbody><tr><td>Point-to-point</td><td>Direct connection between two routers</td><td>R1 — R2</td></tr><tr><td>Transit network</td><td>Multiaccess network through which routers communicate; a designated router helps represent it</td><td>R1 — LAN — R2 (also R3)</td></tr><tr><td>Stub network</td><td>Network reachable through one router, with no onward transit via another router</td><td>R1 — end-host LAN</td></tr><tr><td>Virtual link</td><td>Logical OSPF backbone connection through a transit area</td><td>Area 0 — R1 ⋯ transit area ⋯ R2 — Area 0</td></tr></tbody></table></div><p>Do not confuse these topology/link descriptions with the five OSPF packet types. Hello discovers/maintains neighbours; database description, link-state request, link-state update and acknowledgement synchronize link-state information.</p></div></section>"},{"id":"q5a","title":"Q5(a) · Dijkstra algorithm","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(a). Explain the Dijkstra’s algorithm with an example. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Dijkstra’s algorithm finds shortest paths from a source in a graph whose edge weights are nonnegative.</p><p><strong>Simple meaning.</strong> Sabse chhota unfinished distance select karo, phir uske neighbours improve karo.</p><h2>Understand it step by step</h2><ol><li>Initialize source distance 0, all others ∞, and no predecessors. No vertex is settled initially.</li><li>Select an unsettled vertex with minimum tentative distance. With nonnegative edges, its distance can now be finalized.</li><li>Relax each relevant outgoing edge: compare old distance with selected distance plus edge cost.</li><li>Repeat selection and relaxation. If all remaining distances are ∞, the remaining vertices are unreachable from the source.</li><li>Trace predecessors for the required destination. Always preserve arrow direction. Standard Dijkstra is not valid for graphs with negative edge costs.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>If tentative distances are B=4, C=2 and D=∞, settle C next. You choose using total source-to-vertex cost 2, not the smallest individual edge anywhere in the graph.</p></aside><div class=\"answer\"><ol><li>Set source to 0 and other distances to infinity.</li><li>Repeatedly choose the unsettled vertex with minimum tentative distance.</li><li>Settle it and relax its outgoing edges.</li><li>Recover paths using predecessors.</li></ol><p>The standard algorithm requires nonnegative edge weights.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Minimum tentative total choose; negative edges pe Dijkstra nahi.</p>\r\n<div class=\"answer\"><h2>Given</h2><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Cost</th></tr></thead><tbody><tr><td>A→B</td><td>4</td></tr><tr><td>A→C</td><td>2</td></tr><tr><td>C→B</td><td>1</td></tr><tr><td>B→D</td><td>3</td></tr><tr><td>C→D</td><td>7</td></tr></tbody></table><p>Source=A; target=D. Edges are directed; do not add reverse edges.</p><h2>To find</h2><p>The path A to D, its total cost and intermediate work.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/dijkstra-1.973d01595e.svg\" width=\"482.00\" height=\"228.00\" alt=\"Dijkstra · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>d[A]=0; every other distance=∞. No predecessors are known.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Tentative</td></tr><tr><td>B</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>C</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Settle A at distance 0</h4><p>Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(4)=4</td><td>Improve to 4; predecessor=A</td></tr><tr><td>A→C</td><td>∞</td><td>0+(2)=2</td><td>Improve to 2; predecessor=A</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>4</td><td>A</td><td>Tentative</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Settle C at distance 2</h4><p>Unsettled candidates before selection: B=4, C=2, D=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>C→B</td><td>4</td><td>2+(1)=3</td><td>Improve to 3; predecessor=C</td></tr><tr><td>C→D</td><td>∞</td><td>2+(7)=9</td><td>Improve to 9; predecessor=C</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>C</td><td>Tentative</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>9</td><td>C</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Settle B at distance 3</h4><p>Unsettled candidates before selection: B=3, D=9. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>B→D</td><td>9</td><td>3+(3)=6</td><td>Improve to 6; predecessor=B</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>C</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>6</td><td>B</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Settle D at distance 6</h4><p>Unsettled candidates before selection: D=6. Select the minimum; ties use alphabetical order.</p><p>No outgoing edges to relax.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>C</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>6</td><td>B</td><td>Settled</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Recover the path</h4><p>Trace backwards: D ← B ← C ← A. Reverse it: A → C → B → D.</p><p>Edge sum: 2 + 1 + 3 = 6.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A → C → B → D; cost=6.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.</p></aside></div></div></section>"},{"id":"q5b","title":"Q5(b) · Congestion control","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(b). Explain the different configuration of congestion control mechanism. Explain in detail with examples. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Congestion</strong> occurs when offered traffic overloads network resources such as link capacity, router buffers or processing. Queueing delay grows, packets may be dropped, and excessive retransmission can make the overload worse. <strong>Flow control</strong> protects a receiver; congestion control protects the network.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-congestion.c27c2303bb.svg\" width=\"820\" height=\"515\" alt=\"Two congestion-control approaches\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Open-loop prevention and closed-loop feedback.</figcaption></figure><table><thead><tr><th scope=\"col\">Approach</th><th scope=\"col\">Policy / mechanism</th><th scope=\"col\">How it helps</th></tr></thead><tbody><tr><td>Open loop: prevent congestion without runtime congestion feedback</td><td>Retransmission policy</td><td>Carefully chosen timers/selective retransmission avoid needless extra traffic</td></tr><tr><td>Open loop</td><td>Window policy</td><td>Limit outstanding data and avoid excessive retransmission after loss</td></tr><tr><td>Open loop</td><td>Acknowledgement policy</td><td>Avoid unnecessarily frequent ACK traffic while retaining correct recovery</td></tr><tr><td>Open loop</td><td>Admission policy</td><td>Refuse new load when reserved capacity is insufficient</td></tr><tr><td>Closed loop: measure and react to congestion</td><td>Backpressure</td><td>A congested node tells upstream nodes to reduce/stop sending, possibly propagating hop by hop</td></tr><tr><td>Closed loop</td><td>Choke/control signalling</td><td>A congested node sends explicit feedback to the source</td></tr><tr><td>Closed loop</td><td>Implicit signalling</td><td>A sender infers congestion from loss/delay and changes its sending behaviour</td></tr><tr><td>Closed loop</td><td>Explicit marking</td><td>Network marks congestion (for example ECN); endpoints react to returned information</td></tr></tbody></table><p>For an answer asking for two of each: explain retransmission and admission policies under open loop, then backpressure and explicit signalling under closed loop, with the mechanism and its effect. These are general congestion-control classifications used in the course; they are not all mandatory algorithms implemented inside TCP. TCP commonly uses end-to-end feedback such as loss or ECN.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A router’s output link can be overloaded even while the destination application reads quickly. Increasing receiver memory alone will not remove that network bottleneck.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Open loop pehle prevent; closed loop feedback se react.</p></div></section>"},{"id":"q6a","title":"Q6(a) · TCP phases","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(a). How to establish communication in TCP. What are the different phases of it. Explain in detail. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>A TCP connection establishes each endpoint’s initial sequence number and confirms that both can receive. Use client initial sequence x=1000 and server initial sequence y=5000; assume no payload in the handshake.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-handshake.e053246177.svg\" width=\"820\" height=\"873\" alt=\"TCP: handshake, data and orderly close\" loading=\"lazy\" decoding=\"async\"></div><figcaption>SYN and FIN each consume one sequence number; pure ACK consumes none.</figcaption></figure><table><thead><tr><th scope=\"col\">Step</th><th scope=\"col\">Segment</th><th scope=\"col\">Meaning</th></tr></thead><tbody><tr><td>1 Client → server</td><td>SYN, Seq=1000</td><td>Client proposes its starting sequence</td></tr><tr><td>2 Server → client</td><td>SYN+ACK, Seq=5000, Ack=1001</td><td>Server acknowledges client SYN and supplies its own start</td></tr><tr><td>3 Client → server</td><td>ACK, Seq=1001, Ack=5001</td><td>Client acknowledges server SYN; connection is established</td></tr></tbody></table><h2>Data transfer</h2><p>Client sends 200 bytes beginning at Seq=1001, so byte numbers are 1001…1200. The receiver acknowledges Ack=1201, the next byte expected. If bytes starting at 1201 are missing but later bytes arrive, the cumulative ACK remains 1201 until the gap is repaired. TCP may buffer out-of-order bytes; it delivers the byte stream in order. Each direction counts independently.</p><h2>Orderly termination</h2><ol><li>Assume client’s next data sequence is 1201. It sends FIN with Seq=1201, meaning it has finished sending.</li><li>Server sends ACK=1202. The connection is half closed: the server can still send data until its application finishes.</li><li>Assume server has sent no data since the handshake. It sends FIN with Seq=5001.</li><li>Client responds with ACK=5002. In a common active-close path the client enters TIME-WAIT so delayed segments and retransmitted FINs can be handled before the tuple is reused.</li><li>These are commonly four segments, but ACK and FIN can be combined and simultaneous close is possible. RST is an abort, not the same as the orderly FIN exchange.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A client can finish uploading a request and close its sending direction while still receiving the server’s response. Full-duplex directions do not have to end at the same instant.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> SYN plus one, FIN plus one; ACK next expected byte.</p></div></section>"},{"id":"q6b","title":"Q6(b) · DNS hierarchy and resolution","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(b). Explain the DNS hierarchy and its working principle. Give example to support your answer. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>The <strong>Domain Name System (DNS)</strong> is a distributed hierarchical naming system. Its namespace is a tree with the root at the top. A complete name is the ordered path of labels from a node back to the root. An absolute name may be written with a trailing dot, for example www.example.com.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-dns.f5345fe9fb.svg\" width=\"820\" height=\"520\" alt=\"DNS namespace: full label paths are unique\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Root, top-level domains, delegated domain and host labels.</figcaption></figure><table><thead><tr><th scope=\"col\">Level</th><th scope=\"col\">Example</th><th scope=\"col\">Meaning</th></tr></thead><tbody><tr><td>Root</td><td>.</td><td>Top of the namespace</td></tr><tr><td>Top-level domain (TLD)</td><td>com, org, in</td><td>A child zone below the root</td></tr><tr><td>Registered/delegated domain</td><td>example.com</td><td>Name under a parent such as com</td></tr><tr><td>Subdomain/host label</td><td>www.example.com</td><td>A label below example.com; a name may own different record types</td></tr></tbody></table><h2>Why names remain unique</h2><ol><li>A parent manages the labels immediately beneath it and does not assign the same child label to two different nodes in that parent’s namespace.</li><li>The full sequence of labels identifies the node. The local label www can appear below many domains without conflict: www.example.com and www.example.org are different complete names.</li><li>Administration is delegated: the parent publishes information identifying authoritative servers for a child zone. A domain is a namespace subtree; a zone is the portion administered together, excluding subtrees delegated onward.</li><li>Multiple names may resolve to one IP address, and one name can return several addresses. Uniqueness of names does not imply a one-name/one-IP rule.</li></ol><h2>Resolution</h2><ol><li>A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.</li><li>Otherwise the resolver can query a root server, receive a referral to the relevant TLD, then receive a referral to the authoritative server for the domain.</li><li>The authoritative server supplies the requested record or a relevant negative response. The recursive resolver returns the result and may cache it according to TTL.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>The labels “mail” under two organizations do not collide because mail.example.com and mail.example.org have different ancestors. DNS delegation distributes administration while preserving a unique full path.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Full path unique; www label akela unique nahi.</p><h3>Worked resolution example: www.xyz.com</h3><pre>Client → recursive resolver → root (.)\r\n                           → .com TLD\r\n                           → authoritative server for xyz.com\r\nClient ← final A/AAAA answer ← resolver</pre><p>Assume a cache miss and that the name exists. (1) The client asks its resolver for www.xyz.com. (2) A root server refers the resolver to .com servers. (3) A .com server refers it to authoritative servers for xyz.com. (4) An authoritative server returns the applicable A/AAAA record, or a CNAME that must be followed. (5) The resolver returns the answer and caches it according to TTL. No real IP address for this domain is assumed. Root and TLD servers normally supply referrals here, not the final host address.</p></div></section>"},{"id":"q7a","title":"Q7(a) · Network classifications","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(a). List and compare the different types of computer networks. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>A <strong>computer network</strong> is a set of interconnected devices that exchange data and share resources using communication protocols. A link carries signals; a protocol defines message format, meaning and timing. Hosts run applications, switches forward local frames and routers connect IP networks.</p><table><thead><tr><th scope=\"col\">Type</th><th scope=\"col\">Meaning and scope</th><th scope=\"col\">Example</th></tr></thead><tbody><tr><td>PAN</td><td>Personal Area Network: a person’s nearby devices</td><td>Phone linked to earbuds</td></tr><tr><td>LAN</td><td>Local Area Network: a building or local campus network under local administration</td><td>Laboratory Ethernet/Wi-Fi</td></tr><tr><td>MAN</td><td>Metropolitan Area Network: interconnects sites across a town/city</td><td>City-wide institutional network</td></tr><tr><td>WAN</td><td>Wide Area Network: connects geographically separated networks over regional/global links</td><td>Branches in different cities</td></tr><tr><td>ARPANET</td><td>Historical packet-switched research network; a major predecessor of the Internet</td><td>Early interconnected research institutions; not a modern geographic size category</td></tr></tbody></table><p>Classification by geographical scope is descriptive: a fixed kilometre boundary or a guaranteed speed is not part of every definition. Networks can also be classified by wired/wireless medium or by client-server/peer-to-peer organization.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A student uses a PAN for earbuds, a LAN in the lab and a WAN when accessing a distant university service.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> PAN personal, LAN local, MAN city, WAN wide.</p></div></section>"},{"id":"q7b","title":"Q7(b) · Block coding","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(b). Explain block codes in detail with an example. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>A transmission error changes one or more bits. A <strong>single-bit error</strong> flips one bit. A <strong>burst error</strong> affects a span from the first corrupted bit to the last; the bits in between need not all change. Detection identifies an invalid received pattern; correction identifies the intended pattern within the code’s guaranteed capability.</p><h2>Block coding</h2><ol><li>Divide data into fixed k-bit datawords. Map each one to an n-bit codeword, with n greater than k.</li><li>The n−k redundant bits create separation between valid codewords. There are 2<sup>k</sup> valid codewords, a subset of the 2<sup>n</sup> possible n-bit patterns, for an injective binary block code.</li><li>A receiver can reject patterns that are not valid codewords. Nearest-codeword decoding can correct errors only if the received pattern has an unambiguous nearest intended codeword under the error bound.</li><li>Error-control protocols may combine detection with retransmission (ARQ), or use sufficient coding redundancy for forward error correction (FEC).</li></ol><div class=\"math-display\"><img src=\"math/d973fda532c4ffe6.svg\" alt=\"R_c=k/n,\\quad r=n-k\" style=\"width:21.89ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>A simple even-parity code maps 101 to 1010. The redundant parity bit permits detection of any single-bit flip, but cannot identify which bit changed.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Detection asks error hua? Correction asks kaunsa correct word?</p>\r\n<div class=\"answer\"><p><strong>Hamming distance</strong> d(a,b) is the number of positions where two equal-length bit strings differ. XOR the strings and count the 1s. <strong>Minimum distance</strong> d<sub>min</sub> is the smallest distance between distinct valid codewords; do not use the largest pairwise distance.</p><div class=\"math-display\"><img src=\"math/08c67b82aac87a74.svg\" alt=\"d(a,b)=\\mathrm{weight}(a\\oplus b)\" style=\"width:22.357ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/bd55e600f9b980f0.svg\" alt=\"s_{\\max}=d_{\\min}-1,\\qquad t_{\\max}=\\left\\lfloor\\frac{d_{\\min}-1}{2}\\right\\rfloor\" style=\"width:39.262ex;height:5.428ex\" loading=\"lazy\" decoding=\"async\"></div><ol><li>Detection: fewer than dmin flips cannot transform one valid codeword into another, so all such errors are detected.</li><li>Correction: radius-t error regions around different codewords must not overlap. Therefore 2t &lt; dmin, or dmin ≥ 2t+1.</li><li>These are separate maximum guaranteed capabilities. A code with dmin=3 detects up to two errors in detection mode and corrects one in correction mode; that statement does not promise simultaneous correction of one and reliable identification of every two-error event under the same nearest-codeword decoder.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>The repetition code {000,111} has distance 3. If 001 arrives and at most one flip occurred, 000 is the unique nearest codeword.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> XOR ones count; minimum minus one detect, half floor correct.</p></div></section>"},{"id":"q7c","title":"Q7(c) · ARP","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(c). Explain the method of Address Resolution protocol. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Address Resolution Protocol (ARP) resolves a known IPv4 address to a link-layer hardware address on the local network.</p><p><strong>Simple meaning.</strong> IP pata hai; local delivery ke liye MAC chahiye.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/arp.c8af39ddb3.svg\" width=\"820\" height=\"540\" alt=\"ARP resolves the selected local next hop\" loading=\"lazy\" decoding=\"async\"></div><figcaption>ARP: find the local next-hop MAC address</figcaption></figure><h2>Understand it step by step</h2><ol><li>First determine whether the destination is on the local subnet. If local, the next hop is the destination itself. If remote, the next hop is a router such as the default gateway.</li><li>Check the ARP cache. If the next-hop mapping is absent, broadcast an ARP request on the local link.</li><li>The owner of the requested IPv4 address normally replies with its hardware address. The sender caches the mapping and constructs its data frame.</li><li>Routers do not normally forward a host’s ARP broadcast across networks. ARP resolves the next hop, not the MAC of a remote Internet server.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Host 192.168.1.10/24 sending to 192.168.1.20 asks for .20’s MAC. Sending to 203.0.113.7 through gateway 192.168.1.1 asks for the gateway’s MAC instead.</p></aside><div class=\"answer\"><p>ARP maps a known local next-hop IPv4 address to a hardware address. A sender broadcasts a request when the mapping is missing; the address owner replies, and the mapping is cached. For a remote IP destination, the sender resolves its gateway’s local MAC address, then forwards the packet toward that gateway.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Remote packet ka next-hop MAC gateway ka hota hai.</p></div></section>"},{"id":"q7d","title":"Q7(d) · SMTP and SNMP","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(d). What are the features of SMTP and SNMP protocol. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Simple Mail Transfer Protocol (SMTP)</strong> transfers email from a sending client/server to a receiving mail server using a reliable transport, normally TCP. It is a push/store-and-forward transfer protocol. User agents compose/read mail; mail-transfer agents relay it, consulting DNS MX records to find recipient-domain mail servers.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-smtp.c6f99877c4.svg\" width=\"820\" height=\"902\" alt=\"SMTP: envelope, message and completion\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Submission/relay use SMTP; reading an inbox uses a separate access protocol.</figcaption></figure><table><thead><tr><th scope=\"col\">Phase</th><th scope=\"col\">Typical exchange</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Connection and greeting</td><td>Server 220; client EHLO (HELO for basic SMTP); server 250 capabilities</td><td>Identify peers and learn supported extensions</td></tr><tr><td>Envelope transfer</td><td>MAIL FROM:&lt;sender&gt;; RCPT TO:&lt;recipient&gt;; 250 replies</td><td>Declare return path and one or more delivery recipients</td></tr><tr><td>Message transfer</td><td>DATA; server 354; headers + blank line + body; single dot line; server 250</td><td>Transmit the message after server permission; completion reply accepts responsibility</td></tr><tr><td>Termination</td><td>QUIT; server 221</td><td>Close the SMTP session cleanly</td></tr></tbody></table><h2>Message flow and important details</h2><ol><li>The sender’s user agent submits mail to its configured submission service. Server-to-server SMTP relay commonly uses TCP port 25; message submission commonly uses 587, often with authentication and TLS policy.</li><li>The sending server resolves the recipient domain’s MX records, connects to an appropriate mail server and carries out the SMTP exchange.</li><li>MAIL FROM and RCPT TO are the <strong>envelope</strong>; visible From/To headers inside DATA are message content and can differ. Multiple RCPT TO commands can name several recipients.</li><li>A line containing only a dot ends DATA. A content line beginning with a dot is dot-stuffed for transparency and unstuffed by the receiver.</li><li>A temporary 4xx failure can lead the sending server to queue and retry; a permanent 5xx failure normally rejects that operation. One successful handoff is not proof that a human read the message.</li><li>The recipient reads stored mail using an access protocol such as IMAP/POP3 or webmail. SMTP is not the mailbox-retrieval protocol.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A message addressed to two recipients can send two RCPT TO commands before one DATA body. The SMTP envelope controls delivery even if the visible header lists a mailing-list name.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> SMTP send/relay; inbox read IMAP/POP/webmail.</p><p>SNMP is a network-management protocol (manager/agent, management information, requests/responses and notifications). It is not named in the current syllabus. This question’s combined 5 marks cannot be split into SMTP and SNMP without a printed allocation.</p></div></section>"}]},{"id":"paper-2024-final","title":"2024-12-06 · Final 2024-25 / Re-exam 2023-24","unit":"Historical PYQ","scope":"Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.","sections":[{"id":"q1a","title":"Q1(a) · LAN MAN WAN","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(a). Describe and differentiate between LAN, MAN, WAN with examples. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>A <strong>computer network</strong> is a set of interconnected devices that exchange data and share resources using communication protocols. A link carries signals; a protocol defines message format, meaning and timing. Hosts run applications, switches forward local frames and routers connect IP networks.</p><table><thead><tr><th scope=\"col\">Type</th><th scope=\"col\">Meaning and scope</th><th scope=\"col\">Example</th></tr></thead><tbody><tr><td>PAN</td><td>Personal Area Network: a person’s nearby devices</td><td>Phone linked to earbuds</td></tr><tr><td>LAN</td><td>Local Area Network: a building or local campus network under local administration</td><td>Laboratory Ethernet/Wi-Fi</td></tr><tr><td>MAN</td><td>Metropolitan Area Network: interconnects sites across a town/city</td><td>City-wide institutional network</td></tr><tr><td>WAN</td><td>Wide Area Network: connects geographically separated networks over regional/global links</td><td>Branches in different cities</td></tr><tr><td>ARPANET</td><td>Historical packet-switched research network; a major predecessor of the Internet</td><td>Early interconnected research institutions; not a modern geographic size category</td></tr></tbody></table><p>Classification by geographical scope is descriptive: a fixed kilometre boundary or a guaranteed speed is not part of every definition. Networks can also be classified by wired/wireless medium or by client-server/peer-to-peer organization.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A student uses a PAN for earbuds, a LAN in the lab and a WAN when accessing a distant university service.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> PAN personal, LAN local, MAN city, WAN wide.</p></div></section>"},{"id":"q1b","title":"Q1(b) · Selective Repeat versus Go-Back-N","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(b). Compare and contrast Selective Repeat and Go Back N protocol. (Any 5 points) <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><table><thead><tr><th scope=\"col\">Property</th><th scope=\"col\">Stop-and-Wait</th><th scope=\"col\">Go-Back-N</th><th scope=\"col\">Selective Repeat</th></tr></thead><tbody><tr><td>Outstanding sender frames</td><td>1</td><td>Up to 2^m−1</td><td>Up to 2^(m−1), equal windows</td></tr><tr><td>Receiver window</td><td>1</td><td>1</td><td>Same maximum as sender in standard equal-window SR</td></tr><tr><td>ACK convention used here</td><td>Next expected</td><td>Cumulative, next expected</td><td>Individual frame accepted</td></tr><tr><td>Out-of-order data</td><td>Not delivered</td><td>Discarded</td><td>Buffered within valid window</td></tr><tr><td>After timeout</td><td>Repeat the one frame</td><td>Repeat outstanding frames from base</td><td>Repeat only timed-out frame</td></tr><tr><td>Buffer/tracking cost</td><td>Low</td><td>Sender window; simple receiver</td><td>Sender and receiver windows; per-frame tracking</td></tr><tr><td>Tradeoff</td><td>Simple but idle during RTT</td><td>Good pipelining, waste after loss</td><td>Efficient loss recovery, greater complexity</td></tr></tbody></table><p>Every comparison assumes finite sequence numbers, correct duplicate handling and the textbook protocol models. The same text “ACK 3” can mean different things under different ACK conventions; state its meaning before explaining a trace.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>If one frame out of a seven-frame burst is lost, GBN may retransmit several frames, whereas SR can retain later frames and resend the missing one.</p></aside></div></div></section>"},{"id":"q1c","title":"Q1(c) · TCP versus UDP","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(c). Compare TCP and UDP. (Any 5 points for each) <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">UDP</th><th scope=\"col\">TCP</th><th scope=\"col\">SCTP</th></tr></thead><tbody><tr><td>Service unit</td><td>Datagram; preserves messages</td><td>Byte stream; no message boundaries</td><td>Messages carried in chunks; preserves boundaries</td></tr><tr><td>Connection setup</td><td>No protocol handshake</td><td>Connection; usual three-way SYN exchange</td><td>Association; four-message cookie exchange</td></tr><tr><td>Reliability</td><td>No delivery/order guarantee</td><td>Reliable ordered stream</td><td>Reliable messages; ordered per stream by default, unordered option</td></tr><tr><td>Ordering scope</td><td>None supplied</td><td>One ordered byte stream per direction</td><td>Multiple streams; per-stream order avoids blocking every stream on one stream’s ordering gap</td></tr><tr><td>Flow control</td><td>Not supplied by UDP</td><td>Receiver-advertised window</td><td>Receiver flow control</td></tr><tr><td>Congestion control</td><td>Not supplied by UDP</td><td>Yes</td><td>Yes</td></tr><tr><td>Multihoming</td><td>No built-in association failover</td><td>Classic TCP uses one address pair</td><td>Association can bind multiple addresses; built-in path failover</td></tr><tr><td>Header</td><td>8 bytes</td><td>Minimum 20 bytes</td><td>12-byte common header plus chunks</td></tr><tr><td>Typical use</td><td>DNS, real-time applications with their own controls</td><td>Web over HTTP/1.1 or HTTP/2, reliable byte transfers</td><td>Telecom signalling and multi-stream message applications</td></tr><tr><td>Performance claim</td><td>Low protocol overhead, not automatically fastest overall</td><td>Recovery/ordering have costs and benefits</td><td>Extra capabilities; no universal speed ranking</td></tr></tbody></table><p>The correct protocol depends on application semantics and network conditions. “UDP is always faster” and “SCTP is always slower than TCP” are not defensible general rules. All three normally run above IP; security/encryption is a separate requirement.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A game can prefer fresh updates over retransmitting stale state, while a document download needs every byte. An application with separate message streams can benefit from SCTP’s stream separation.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> UDP messages simple; TCP byte stream; SCTP reliable message streams.</p></div></section>"},{"id":"q1d","title":"Q1(d) · DHCP","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(d). Explain the usage and functionality of DHCP protocol. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Dynamic Host Configuration Protocol (DHCP) provides IP configuration parameters to clients and can lease reusable addresses for limited periods.</p><p><strong>Simple meaning.</strong> DORA = Discover, Offer, Request, Acknowledge.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/dhcp.510e8eca42.svg\" width=\"820\" height=\"470\" alt=\"DHCP initial allocation: DORA\" loading=\"lazy\" decoding=\"async\"></div><figcaption>DHCP: automatic configuration through DORA</figcaption></figure><h2>Understand it step by step</h2><ol><li><strong>Discover:</strong> a new client looks for DHCP servers. With no configured IPv4 address, it commonly starts from 0.0.0.0 and uses broadcast discovery.</li><li><strong>Offer:</strong> a server offers an address and configuration, such as subnet mask, lease information and other options.</li><li><strong>Request:</strong> the client indicates the selected offer and requested address. In initial allocation this also informs other servers of its choice.</li><li><strong>Acknowledge:</strong> the selected server confirms the lease/configuration. The client can then use the address after the required checks.</li><li>DHCPv4 uses UDP server port 67 and client port 68. A DHCP relay can carry requests between a client subnet and a server elsewhere; ordinary routers do not simply forward local broadcasts by default.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>When a laptop joins a campus network, DHCP can supply its address, mask, gateway and DNS-server option. It does not itself resolve website names; it can tell the laptop which DNS server to use.</p></aside><div class=\"answer\"><ol><li>DHCPDISCOVER: client searches for a server.</li><li>DHCPOFFER: server proposes an address/configuration.</li><li>DHCPREQUEST: client requests the chosen allocation.</li><li>DHCPACK: server confirms the lease.</li></ol><p>DHCP reduces manual configuration and supports controlled address reuse through leases.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Discover–Offer–Request–ACK; pehle D, phir O, phir R, phir A.</p></div></section>"},{"id":"q2a","title":"Q2(a) · OSI model","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(a). Describe in detail the layered architecture of OSI reference model with the help of labelled diagram. Write any TWO functionalities of each layer. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>The <strong>Open Systems Interconnection (OSI)</strong> model separates network functions into seven layers. A layer offers services upward and uses services below. Peer layers communicate logically through protocol rules; actual data moves down the sender’s stack, across links and up the receiver’s stack.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-models.5bff0518c8.svg\" width=\"820\" height=\"670\" alt=\"OSI layers mapped to the four-layer TCP/IP model\" loading=\"lazy\" decoding=\"async\"></div><figcaption>OSI seven-layer model mapped to the four-layer TCP/IP model.</figcaption></figure><table><thead><tr><th scope=\"col\">Layer</th><th scope=\"col\">Task</th><th scope=\"col\">Example</th></tr></thead><tbody><tr><td>7 Application</td><td>Services used by network applications</td><td>HTTP, DNS, FTP, SMTP</td></tr><tr><td>6 Presentation</td><td>Representation, encoding and application data transformations</td><td>Character encoding, serialization; encryption as a conceptual function</td></tr><tr><td>5 Session</td><td>Manage dialogue and synchronization/checkpoints</td><td>Session establishment and resumption concepts</td></tr><tr><td>4 Transport</td><td>Process delivery; reliability/flow control where supplied</td><td>TCP, UDP, SCTP; ports</td></tr><tr><td>3 Network</td><td>Logical addressing and routing across networks</td><td>IP; routers</td></tr><tr><td>2 Data link</td><td>Framing, local link addressing, medium access and error detection</td><td>Ethernet/Wi-Fi; MAC addresses</td></tr><tr><td>1 Physical</td><td>Transmit signal symbols/bits through a medium</td><td>Electrical, optical or radio signals</td></tr></tbody></table><h2>Encapsulation and delivery</h2><ol><li>Application creates data. Transport adds a transport header: TCP segment or UDP datagram.</li><li>IP adds its header to form a packet. The link adds a header and usually a trailer to form a frame.</li><li>The physical layer carries signals. The destination reverses the process and sends the data to the receiving process.</li><li>At a router, local framing changes for the next link. A transit router primarily forwards at Layer 3; it need not run the end application.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A browser request becomes TCP data, an IP packet and then an Ethernet frame. An IP address selects the host/interface, while a TCP port selects the service.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Application se physical tak wrap; receiver par unwrap.</p><h3>Two functions of every OSI layer</h3><div class=\"table-wrap\"><table><thead><tr><th>Layer</th><th>Function 1</th><th>Function 2</th></tr></thead><tbody><tr><td>Application</td><td>Provide application-level network services, such as file transfer</td><td>Define application exchanges for services such as email or name resolution</td></tr><tr><td>Presentation</td><td>Translate/serialize data into an agreed representation</td><td>Compress data or encrypt/decrypt it where these transformations are required</td></tr><tr><td>Session</td><td>Establish, manage and end a dialogue/session</td><td>Provide synchronization/checkpoints for resuming a dialogue</td></tr><tr><td>Transport</td><td>Identify sending/receiving processes using ports and segment/reassemble data</td><td>Provide end-to-end reliability and flow control when the selected protocol supports them</td></tr><tr><td>Network</td><td>Provide logical addressing across networks</td><td>Select routes and forward packets towards the destination</td></tr><tr><td>Data link</td><td>Frame the data and identify local interfaces</td><td>Control shared-medium access and detect link-frame errors</td></tr><tr><td>Physical</td><td>Represent bits as electrical, optical or radio signal symbols</td><td>Specify physical-interface/signalling properties such as timing, connectors and transmission rate</td></tr></tbody></table></div><p>These are reference-model responsibilities; an actual protocol stack may combine them. UDP, for example, does not supply TCP-style reliable delivery merely because both are transport protocols.</p></div></section>"},{"id":"q2b","title":"Q2(b) · CSMA/CD","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(b). Explain the working of CSMA/CD with flow diagram. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> CSMA with Collision Detection monitors the medium during transmission, aborts a detected collision and retries after a randomized backoff.</p><p><strong>Simple meaning.</strong> CD = takkar detect hui toh transmission rok do.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/collision-roundtrip.42358ec7bf.svg\" width=\"820\" height=\"410\" alt=\"CSMA/CD: sender must still be sending after a round trip\" loading=\"lazy\" decoding=\"async\"></div><figcaption>CSMA/CD: detect a collision while transmitting</figcaption></figure><h2>Understand it step by step</h2><ol><li>Sense the channel. In traditional shared half-duplex Ethernet, begin transmission when permitted by the access rule.</li><li>Continue monitoring while transmitting. If a collision is detected, send the collision/jam indication and abort the current frame.</li><li>Choose a random delay using binary exponential backoff; then attempt again subject to the access rules.</li><li>The sender must still be transmitting when a worst-case collision indication returns. Hence the ideal timing requirement is Tframe ≥ 2Tp.</li><li>Modern switched full-duplex Ethernet links do not use collision-based CSMA/CD access. Keep the historical/shared-medium assumptions explicit.</li></ol><div class=\"math-display\"><img src=\"math/4f522413155daf19.svg\" alt=\"T_{\\mathrm{frame}}\\geq 2T_p\" style=\"width:11.931ex;height:2.181ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/eae5a57f0575ef7d.svg\" alt=\"L_{\\min}\\geq 2RT_p\" style=\"width:12.575ex;height:2.195ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>On a shared half-duplex Ethernet segment, a station that detects a collision stops sending the remaining frame bits, saving time compared with completing a corrupted long frame.</p></aside><div class=\"answer\"><p>CSMA/CD senses before transmission and detects collisions during transmission. A collision causes abort/jam and a random backoff before retry. To detect the most distant collision before the frame finishes, the transmission duration must be at least the worst-case round-trip propagation delay. Thus Lmin/R ≥ 2Tp in the idealized model.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Detect karna hai toh sender tab tak bhej raha hona chahiye.</p><h3>CSMA/CD flow diagram</h3><pre>Frame ready → sense channel\r\n                 │\r\n          Busy? yes → keep sensing (1-persistent case)\r\n                 no\r\n                 ↓\r\n          Transmit and monitor\r\n                 │\r\n          Collision? no → frame finished? → success\r\n                 yes\r\n                 ↓\r\n          Jam indication → abort frame → increment attempt count\r\n                 │\r\n          Retry limit reached? yes → report failure\r\n                 no\r\n                 ↓\r\n          Random binary-exponential backoff → sense again</pre><p>For Ethernet, the backoff range grows with collisions, capped after the specified stage; transmission is abandoned at the retry limit. Carrier sensing must still be obeyed after the random delay.</p></div></section>"},{"id":"q3a","title":"Q3(a) · SMTP phases","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(a). Explain the working of SMTP protocol focusing on connection establishment, mail transfer and connection transfer. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p><strong>Source note:</strong> The scan says connection transfer; the third SMTP phase is connection termination.</p>\r\n<div class=\"answer\"><p><strong>Simple Mail Transfer Protocol (SMTP)</strong> transfers email from a sending client/server to a receiving mail server using a reliable transport, normally TCP. It is a push/store-and-forward transfer protocol. User agents compose/read mail; mail-transfer agents relay it, consulting DNS MX records to find recipient-domain mail servers.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-smtp.c6f99877c4.svg\" width=\"820\" height=\"902\" alt=\"SMTP: envelope, message and completion\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Submission/relay use SMTP; reading an inbox uses a separate access protocol.</figcaption></figure><table><thead><tr><th scope=\"col\">Phase</th><th scope=\"col\">Typical exchange</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Connection and greeting</td><td>Server 220; client EHLO (HELO for basic SMTP); server 250 capabilities</td><td>Identify peers and learn supported extensions</td></tr><tr><td>Envelope transfer</td><td>MAIL FROM:&lt;sender&gt;; RCPT TO:&lt;recipient&gt;; 250 replies</td><td>Declare return path and one or more delivery recipients</td></tr><tr><td>Message transfer</td><td>DATA; server 354; headers + blank line + body; single dot line; server 250</td><td>Transmit the message after server permission; completion reply accepts responsibility</td></tr><tr><td>Termination</td><td>QUIT; server 221</td><td>Close the SMTP session cleanly</td></tr></tbody></table><h2>Message flow and important details</h2><ol><li>The sender’s user agent submits mail to its configured submission service. Server-to-server SMTP relay commonly uses TCP port 25; message submission commonly uses 587, often with authentication and TLS policy.</li><li>The sending server resolves the recipient domain’s MX records, connects to an appropriate mail server and carries out the SMTP exchange.</li><li>MAIL FROM and RCPT TO are the <strong>envelope</strong>; visible From/To headers inside DATA are message content and can differ. Multiple RCPT TO commands can name several recipients.</li><li>A line containing only a dot ends DATA. A content line beginning with a dot is dot-stuffed for transparency and unstuffed by the receiver.</li><li>A temporary 4xx failure can lead the sending server to queue and retry; a permanent 5xx failure normally rejects that operation. One successful handoff is not proof that a human read the message.</li><li>The recipient reads stored mail using an access protocol such as IMAP/POP3 or webmail. SMTP is not the mailbox-retrieval protocol.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A message addressed to two recipients can send two RCPT TO commands before one DATA body. The SMTP envelope controls delivery even if the visible header lists a mailing-list name.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> SMTP send/relay; inbox read IMAP/POP/webmail.</p><h3>The three phases requested in the paper</h3><div class=\"table-wrap\"><table><thead><tr><th>Phase</th><th>Commands / replies</th><th>Meaning</th></tr></thead><tbody><tr><td>1. Connection establishment</td><td>TCP connection; 220 greeting; EHLO/HELO; 250 reply</td><td>Open the connection and identify the SMTP peers</td></tr><tr><td>2. Mail transfer</td><td>MAIL FROM, RCPT TO, DATA; 354; message; single dot; 250</td><td>Transfer the envelope and then the message content</td></tr><tr><td>3. Connection termination</td><td>QUIT; 221; close TCP</td><td>Finish the SMTP session</td></tr></tbody></table></div><p>Envelope transfer and message-body transfer are substeps of the single mail-transfer phase. Thus the more detailed table above still fits the standard three-phase description.</p></div></section>"},{"id":"q3b","title":"Q3(b) · OSPF and link types","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(b). Explain in detail OSPF protocol. Summarise the different types of links used in OSPF routing protocol. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Open Shortest Path First (OSPF) is an interior link-state routing protocol that selects routes using shortest-path calculations and additive link costs.</p><p><strong>Simple meaning.</strong> OSPF = link-state map + Dijkstra + summed costs.</p><h2>Understand it step by step</h2><ol><li>Routers discover and maintain neighbour relationships using Hello packets and exchange link-state information.</li><li>Routers calculate shortest paths from their own position in the topology. A path cost is the sum of its outgoing-link costs, not necessarily the fewest hops.</li><li>The network can be divided into areas. In normal OSPF hierarchy, Area 0 is the backbone used to interconnect other areas via area border routers.</li><li>OSPFv2 is the IPv4 protocol in the supplied paper; it is carried directly in IP protocol number 89, not TCP/UDP port 89.</li><li>A common vendor default derives interface cost from reference bandwidth/interface bandwidth, but actual configured costs and reference bandwidth matter. Use the given costs in an exam graph.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Route A→B→D costs 10+10=20 while A→C→D costs 5+8=13. OSPF’s cost comparison prefers the latter even though both have two links.</p></aside><div class=\"answer\"><p>OSPF exchanges and maintains link-state information, builds a topology database and runs Dijkstra’s shortest-path computation rooted at the local router. It chooses a path with the lowest sum of link costs and installs the corresponding next hop. Equal-cost paths may be supported.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> OSPF cost add karo; sirf hops nahi.</p><h3>Link types represented in an OSPF topology</h3><div class=\"table-wrap\"><table><thead><tr><th>Type</th><th>Meaning</th><th>Diagram</th></tr></thead><tbody><tr><td>Point-to-point</td><td>Direct connection between two routers</td><td>R1 — R2</td></tr><tr><td>Transit network</td><td>Multiaccess network through which routers communicate; a designated router helps represent it</td><td>R1 — LAN — R2 (also R3)</td></tr><tr><td>Stub network</td><td>Network reachable through one router, with no onward transit via another router</td><td>R1 — end-host LAN</td></tr><tr><td>Virtual link</td><td>Logical OSPF backbone connection through a transit area</td><td>Area 0 — R1 ⋯ transit area ⋯ R2 — Area 0</td></tr></tbody></table></div><p>Do not confuse these topology/link descriptions with the five OSPF packet types. Hello discovers/maintains neighbours; database description, link-state request, link-state update and acknowledgement synchronize link-state information.</p></div></section>"},{"id":"q4a","title":"Q4(a) · CRC and corrupted frame","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(a). Given the data bit sequence 1001100 and the CRC polynomial x^3+x^2+1, calculate the transmission sequence. Suppose the 2nd bit from the left is inverted during transmission. Illustrate how the receiver will detect the error. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Data = 1001100; generator bits = 1101; degree r = 3.</p><h3>To find</h3><p>CRC remainder, complete transmitted frame and receiver check; then detect the specified bit inversion.</p><h3>Formula and why</h3><p>Append r zeros, divide using XOR (modulo 2), and replace those zeros with the r-bit remainder. XOR has no borrowing or carrying. A valid received codeword has remainder zero; the receiver does not append new zeros.</p><div class=\"step\"><h3>Step 1. Append zeros</h3><p>1001100 → 1001100000</p></div><div class=\"step\"><h3>Step 2. Perform XOR division</h3><div class=\"table-wrap\"><table><thead><tr><th>Leading position</th><th>Before XOR</th><th>Aligned generator</th><th>After XOR</th></tr></thead><tbody><tr><td>1</td><td>1001100000</td><td>1101000000</td><td>0100100000</td></tr><tr><td>2</td><td>0100100000</td><td>0110100000</td><td>0010000000</td></tr><tr><td>3</td><td>0010000000</td><td>0011010000</td><td>0001010000</td></tr><tr><td>4</td><td>0001010000</td><td>0001101000</td><td>0000111000</td></tr><tr><td>5</td><td>0000111000</td><td>0000110100</td><td>0000001100</td></tr><tr><td>7</td><td>0000001100</td><td>0000001101</td><td>0000000001</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 3. Build the frame</h3><p>Remainder = <strong>001</strong>. Transmit <strong>1001100001</strong>.</p></div><div class=\"step\"><h3>Step 4. Divide the received frame</h3><div class=\"table-wrap\"><table><thead><tr><th>Position</th><th>Before</th><th>Generator</th><th>After</th></tr></thead><tbody><tr><td>1</td><td>1001100001</td><td>1101000000</td><td>0100100001</td></tr><tr><td>2</td><td>0100100001</td><td>0110100000</td><td>0010000001</td></tr><tr><td>3</td><td>0010000001</td><td>0011010000</td><td>0001010001</td></tr><tr><td>4</td><td>0001010001</td><td>0001101000</td><td>0000111001</td></tr><tr><td>5</td><td>0000111001</td><td>0000110100</td><td>0000001101</td></tr><tr><td>7</td><td>0000001101</td><td>0000001101</td><td>0000000000</td></tr></tbody></table></div><p>Receiver remainder = 000. No error is detected; this is not a guarantee that every possible corruption is detectable.</p></div><div class=\"step\"><h3>Step 5. Invert bit 2 from the left</h3><p>1001100001 becomes 1101100001.</p><div class=\"table-wrap\"><table><thead><tr><th>Position</th><th>Before</th><th>Generator</th><th>After</th></tr></thead><tbody><tr><td>1</td><td>1101100001</td><td>1101000000</td><td>0000100001</td></tr><tr><td>5</td><td>0000100001</td><td>0000110100</td><td>0000010101</td></tr><tr><td>6</td><td>0000010101</td><td>0000011010</td><td>0000001111</td></tr><tr><td>7</td><td>0000001111</td><td>0000001101</td><td>0000000010</td></tr></tbody></table></div><p>Remainder = <strong>010</strong>, which is nonzero: reject the frame and request recovery according to the error-control protocol.</p></div></div></section>"},{"id":"q4b","title":"Q4(b) · UDP and applications","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(b). Explain briefly UDP operation and any 5 applications of UDP protocol. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>User Datagram Protocol (UDP)</strong> provides connectionless, message-oriented process delivery. One send creates a datagram; message boundaries are retained. UDP has an <strong>8-byte header</strong>, carries ports and length, and offers checksum-based corruption detection. It does not itself guarantee delivery, ordering, duplicate suppression, retransmission, flow control or congestion control.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-udp.b14cba3c28.svg\" width=\"820\" height=\"289\" alt=\"UDP header: each row contains 32 bits\" loading=\"lazy\" decoding=\"async\"></div><figcaption>UDP fixed header: four 16-bit fields, eight bytes total.</figcaption></figure><table><thead><tr><th scope=\"col\">UDP field</th><th scope=\"col\">Width</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Source port</td><td>16 bits</td><td>Sending endpoint; a zero value can indicate no reply port when unused</td></tr><tr><td>Destination port</td><td>16 bits</td><td>Receiving application endpoint</td></tr><tr><td>Length</td><td>16 bits</td><td>UDP header plus UDP payload; minimum 8 bytes</td></tr><tr><td>Checksum</td><td>16 bits</td><td>Error detection over UDP and an IP pseudo-header; not retransmission</td></tr></tbody></table><h2>Operation and services</h2><ol><li>The application chooses the destination IP/port and supplies a message. UDP adds its header and passes the datagram to IP without a connection handshake.</li><li>The receiving UDP layer validates the length/checksum as applicable and uses the destination endpoint to deliver the datagram.</li><li>A corrupt or undeliverable datagram may be discarded; UDP does not recover it. Any reliability or rate-control policy must come from the application or a protocol above UDP.</li><li>UDP checksum zero can mean checksum omitted in IPv4. IPv6 ordinarily requires the UDP checksum; specialized exceptions are outside this syllabus.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A DNS query often uses UDP because a small request/reply can avoid a transport handshake. DNS also uses TCP, so “DNS always UDP” is incorrect.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> UDP datagram preserve; reliability automatic nahi.</p><h3>Five suitable application examples</h3><div class=\"table-wrap\"><table><thead><tr><th>Application</th><th>Why UDP can suit it</th></tr></thead><tbody><tr><td>DNS queries</td><td>Small request/reply; application retries if necessary. DNS also supports TCP.</td></tr><tr><td>DHCP</td><td>A host without an assigned address can use UDP broadcasts to obtain configuration.</td></tr><tr><td>Real-time audio/video using RTP</td><td>Late packets are often less useful than timely packets; application handles loss/jitter.</td></tr><tr><td>Online game state updates</td><td>A newer position can replace a stale one; application-specific reliability can protect critical events.</td></tr><tr><td>NTP</td><td>Small timestamp exchanges; a fresh later measurement can replace a lost exchange.</td></tr></tbody></table></div><p>These are examples of applications that can use UDP, not a claim that every implementation of each application always uses UDP. Applications must still manage congestion responsibly.</p></div></section>"},{"id":"q5a","title":"Q5(a) · Network models","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(a). Distinguish between peer-to-peer and client server communication. Any 5 points each. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>In a <strong>client-server</strong> design, users’ clients contact designated service processes. In <strong>peer-to-peer (P2P)</strong>, participating hosts can supply and consume resources. These are application organizations, not different physical cable types.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-client-peer.a7c6f1b535.svg\" width=\"820\" height=\"430\" alt=\"Client-server and peer-to-peer organization\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Central service versus cooperating peers.</figcaption></figure><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">Client-server</th><th scope=\"col\">Peer-to-peer</th></tr></thead><tbody><tr><td>Roles</td><td>Clients request; designated servers provide services</td><td>Peers can both request and provide resources</td></tr><tr><td>Control</td><td>Central policies, accounts and backups are easier to coordinate</td><td>Control and copies distributed among peers</td></tr><tr><td>Performance</td><td>Predictable with adequate server capacity; server may bottleneck</td><td>Resources grow with peers, but peer capacity/availability vary</td></tr><tr><td>Scalability</td><td>Scale servers, replicas, caching and load distribution</td><td>More peers can contribute capacity; coordination becomes harder</td></tr><tr><td>Reliability</td><td>One unreplicated server is a failure point; replication helps</td><td>Loss of one peer need not stop system if useful replicas remain</td></tr><tr><td>Security</td><td>Central access control and monitoring</td><td>Trust and consistent access policy are harder</td></tr><tr><td>Best fit</td><td>Managed collaboration, databases, login services</td><td>Distributed content sharing among participating peers</td></tr></tbody></table><h2>Apply to the platform</h2><p>Central servers can authenticate users, maintain the authoritative shared document and control versions. The organization must provision capacity, replicate data and avoid a single server failure. P2P can exchange large files or local edits among peers and distribute load, but needs discovery, conflict resolution, trust and availability strategies. A hybrid can keep account control centralized while distributing selected content.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>When three teammates edit one document, a replicated central service can order updates. A peer file swarm can speed distribution only while peers with the needed pieces are available.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Server mein service central; peers dono roles karte hain.</p></div></section>"},{"id":"q5b","title":"Q5(b) · DNS hierarchy","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(b). Explain the hierarchy of name servers in DNS. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>The <strong>Domain Name System (DNS)</strong> is a distributed hierarchical naming system. Its namespace is a tree with the root at the top. A complete name is the ordered path of labels from a node back to the root. An absolute name may be written with a trailing dot, for example www.example.com.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-dns.f5345fe9fb.svg\" width=\"820\" height=\"520\" alt=\"DNS namespace: full label paths are unique\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Root, top-level domains, delegated domain and host labels.</figcaption></figure><table><thead><tr><th scope=\"col\">Level</th><th scope=\"col\">Example</th><th scope=\"col\">Meaning</th></tr></thead><tbody><tr><td>Root</td><td>.</td><td>Top of the namespace</td></tr><tr><td>Top-level domain (TLD)</td><td>com, org, in</td><td>A child zone below the root</td></tr><tr><td>Registered/delegated domain</td><td>example.com</td><td>Name under a parent such as com</td></tr><tr><td>Subdomain/host label</td><td>www.example.com</td><td>A label below example.com; a name may own different record types</td></tr></tbody></table><h2>Why names remain unique</h2><ol><li>A parent manages the labels immediately beneath it and does not assign the same child label to two different nodes in that parent’s namespace.</li><li>The full sequence of labels identifies the node. The local label www can appear below many domains without conflict: www.example.com and www.example.org are different complete names.</li><li>Administration is delegated: the parent publishes information identifying authoritative servers for a child zone. A domain is a namespace subtree; a zone is the portion administered together, excluding subtrees delegated onward.</li><li>Multiple names may resolve to one IP address, and one name can return several addresses. Uniqueness of names does not imply a one-name/one-IP rule.</li></ol><h2>Resolution</h2><ol><li>A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.</li><li>Otherwise the resolver can query a root server, receive a referral to the relevant TLD, then receive a referral to the authoritative server for the domain.</li><li>The authoritative server supplies the requested record or a relevant negative response. The recursive resolver returns the result and may cache it according to TTL.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>The labels “mail” under two organizations do not collide because mail.example.com and mail.example.org have different ancestors. DNS delegation distributes administration while preserving a unique full path.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Full path unique; www label akela unique nahi.</p><h3>Worked resolution example: www.xyz.com</h3><pre>Client → recursive resolver → root (.)\r\n                           → .com TLD\r\n                           → authoritative server for xyz.com\r\nClient ← final A/AAAA answer ← resolver</pre><p>Assume a cache miss and that the name exists. (1) The client asks its resolver for www.xyz.com. (2) A root server refers the resolver to .com servers. (3) A .com server refers it to authoritative servers for xyz.com. (4) An authoritative server returns the applicable A/AAAA record, or a CNAME that must be followed. (5) The resolver returns the answer and caches it according to TTL. No real IP address for this domain is assumed. Root and TLD servers normally supply referrals here, not the final host address.</p></div></section>"},{"id":"q5c","title":"Q5(c) · Bellman-Ford example","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(c). Explain Bellman Ford algorithm for finding shortest path from source node to destination node with the help of an example. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Bellman–Ford computes single-source shortest paths by repeatedly relaxing every edge. It supports negative edge weights and detects reachable negative cycles.</p><p><strong>Simple meaning.</strong> Har edge ko baar-baar relax; negative edge chalega, negative cycle problem hai.</p><h2>Understand it step by step</h2><ol><li>Initialize source 0 and all other distances ∞.</li><li>Relax every directed edge, in a stated order, for at most V−1 full passes, where V is the number of vertices. A shortest simple path uses at most V−1 edges when no relevant negative cycle exists.</li><li>In the in-place convention used here, an update is immediately available to later edges in the same pass. Different edge orders can therefore produce different intermediate tables while converging to the same valid final distances.</li><li>If a full pass makes no change, all distances have stabilized and the algorithm may stop early.</li><li>A further improvement on a reachable edge after V−1 passes signals a reachable negative cycle. Destinations reachable from such a cycle need not have a finite shortest distance.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A→B=4 and B→C=−2 can give A→C cost 2. A negative edge is not itself a negative cycle; a cycle requires a route returning to an earlier vertex.</p></aside><div class=\"answer\"><p>Bellman–Ford repeatedly relaxes all edges and can handle negative weights. It uses up to V−1 passes and an additional improvement check for reachable negative cycles. Dijkstra settles the smallest tentative vertex and requires nonnegative weights for its standard correctness guarantee.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Pass = all edges once. Negative edge ≠ negative cycle.</p>\r\n<div class=\"answer\"><h2>Given</h2><table><thead><tr><th scope=\"col\">Directed edge</th><th scope=\"col\">Weight</th></tr></thead><tbody><tr><td>A→B</td><td>4</td></tr><tr><td>A→C</td><td>5</td></tr><tr><td>B→C</td><td>-2</td></tr><tr><td>C→D</td><td>3</td></tr></tbody></table><h2>To find</h2><p>The shortest route and cost, with complete passes and a negative-cycle check.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Bellman–Ford permits negative edges. We use the listed order with in-place updates; do not mix this with a table that reads only the previous pass.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/bellman-1.1bf4232fcf.svg\" width=\"489.00\" height=\"194.00\" alt=\"Bellman–Ford · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>4 vertices → at most 3 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.</p></div><div class=\"step\"><h4>Step 2. Pass 1: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(4)=4</td><td>4</td><td>Update; predecessor=A</td></tr><tr><td>A→C</td><td>∞</td><td>0+(5)=5</td><td>5</td><td>Update; predecessor=A</td></tr><tr><td>B→C</td><td>5</td><td>4+(-2)=2</td><td>2</td><td>Update; predecessor=B</td></tr><tr><td>C→D</td><td>∞</td><td>2+(3)=5</td><td>5</td><td>Update; predecessor=C</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>4</td><td>2</td><td>5</td></tr><tr><td>Predecessor</td><td>—</td><td>A</td><td>B</td><td>C</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Pass 2: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>4</td><td>0+(4)=4</td><td>4</td><td>No improvement</td></tr><tr><td>A→C</td><td>2</td><td>0+(5)=5</td><td>2</td><td>No improvement</td></tr><tr><td>B→C</td><td>2</td><td>4+(-2)=2</td><td>2</td><td>No improvement</td></tr><tr><td>C→D</td><td>5</td><td>2+(3)=5</td><td>5</td><td>No improvement</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Stop after an unchanged pass</h4><p>This entire pass changed no distance. Further identical relaxation passes will not improve anything.</p></div><div class=\"step\"><h4>Step 5. Recover and total the path</h4><p>Backward predecessors: D ← C ← B ← A. Forward route: A → B → C → D.</p><p>Cost = (4) + (-2) + (3) = 5. No edge can now improve its destination label.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A → B → C → D; shortest cost=5.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Negative weights are a general graph-exercise feature. RIP hop counts and OSPF link costs are not negative in the ordinary routing protocols studied here.</p></aside></div></div></section>"},{"id":"q6a","title":"Q6(a) · Pure ALOHA rates","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(a). A pure ALOHA network transmits 400-bit frames on a shared channel of 100 kbps. Calculate the throughput, and how many frames will survive if the system (all stations together) produces the following number of frames per second: i. 1200 frames per second ii. 600 frames per second iii. 300 frames per second. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Frame length L = 400 bits; link rate R = 100,000 bit/s; attempted rates λ = 1200, 600, 300 frames/s.</p><h3>To find</h3><p>Normalized throughput S and successful frames per second for each offered load.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/043fb89e4a6dc8db.svg\" alt=\"T_f=L/R,\\quad G=\\lambda T_f,\\quad S=Ge^{-2G},\\quad \\lambda_{success}=S/T_f=\\lambda e^{-2G}\" style=\"width:62.583ex;height:2.73ex\" loading=\"lazy\" decoding=\"async\"></div><p>G counts attempted frames per frame time, including retransmissions if present. S is not measured in frames/s. Multiply by the frame rate capacity 1/Tf to obtain surviving frames/s.</p><div class=\"step\"><h3>Step 1. Convert the link rate and compute frame time</h3><p>Tf = 400/100000 = 0.004 s. Capacity = 1/Tf = 250 frames/s.</p></div><div class=\"step\"><h3>Step 2. Offered rate 1200 frames/s</h3><p>G = 1200 × 0.004 = 4.8.</p><p>e<sup>−2G</sup> = e<sup>−9.6</sup> = 6.77287365e-05.</p><p>S = 4.8 × 6.77287365e-05 = <strong>0.000325097935</strong>.</p><p>Successful frames/s = 1200 × 6.77287365e-05 = <strong>0.0812744838</strong>. Successful bit/s = 0.0812744838 × 400 = 32.5097935.</p></div><div class=\"step\"><h3>Step 3. Offered rate 600 frames/s</h3><p>G = 600 × 0.004 = 2.4.</p><p>e<sup>−2G</sup> = e<sup>−4.8</sup> = 0.00822974705.</p><p>S = 2.4 × 0.00822974705 = <strong>0.0197513929</strong>.</p><p>Successful frames/s = 600 × 0.00822974705 = <strong>4.93784823</strong>. Successful bit/s = 4.93784823 × 400 = 1975.13929.</p></div><div class=\"step\"><h3>Step 4. Offered rate 300 frames/s</h3><p>G = 300 × 0.004 = 1.2.</p><p>e<sup>−2G</sup> = e<sup>−2.4</sup> = 0.0907179533.</p><p>S = 1.2 × 0.0907179533 = <strong>0.108861544</strong>.</p><p>Successful frames/s = 300 × 0.0907179533 = <strong>27.215386</strong>. Successful bit/s = 27.215386 × 400 = 10886.1544.</p></div></div></section>"},{"id":"q6b","title":"Q6(b) · VLSM groups","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(b). An ISP is allocated a block of addresses starting with 188.15.0.0/16 (65,536 addresses). The ISP needs to distribute these addresses among three customer groups as follows: i) The first group consists of 64 customers; each requires 256 addresses. ii) The second group consists of 128 customers; each requires 128 addresses. iii) The third group consists of 64 customers; each requires 128 addresses. Design the sub blocks and determine the first address and last address of first customer and last customer for each group. Calculate how many addresses are still available after these allocations. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>188.15.0.0/16; Group 1: 64 customers × 256 addresses; Group 2: 128 customers × 128 addresses; Group 3: 64 customers × 128 addresses</p><h3>To find</h3><p>Each customer prefix, every group range, first/last customer blocks, and unallocated addresses.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/2cb46cf5eb7fdc4d.svg\" alt=\"p=32-\\log_2(\\text{addresses per customer}),\\quad A_{group}=n\\times A_{customer}\" style=\"width:62.003ex;height:2.364ex\" loading=\"lazy\" decoding=\"async\"></div><p>These are requested total addresses, not usable-host counts. Allocate customer blocks on their prefix boundary. A group with a non-power-of-two customer count need not be forced into one larger, wasteful CIDR aggregate.</p><div class=\"step\"><h3>Step 1. Compute sizes and allocate consecutive aligned customer blocks</h3><div class=\"table-wrap\"><table><thead><tr><th>Group</th><th>Customers</th><th>Addresses each</th><th>Customer prefix</th><th>Used</th><th>Group range</th></tr></thead><tbody><tr><td>1</td><td>64</td><td>256</td><td>/24</td><td>16384</td><td>188.15.0.0–188.15.63.255</td></tr><tr><td>2</td><td>128</td><td>128</td><td>/25</td><td>16384</td><td>188.15.64.0–188.15.127.255</td></tr><tr><td>3</td><td>64</td><td>128</td><td>/25</td><td>8192</td><td>188.15.128.0–188.15.159.255</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. State first and last customer ranges</h3><div class=\"table-wrap\"><table><thead><tr><th>Group</th><th>First customer</th><th>Last customer</th></tr></thead><tbody><tr><td>1</td><td>188.15.0.0–188.15.0.255</td><td>188.15.63.0–188.15.63.255</td></tr><tr><td>2</td><td>188.15.64.0–188.15.64.127</td><td>188.15.127.128–188.15.127.255</td></tr><tr><td>3</td><td>188.15.128.0–188.15.128.127</td><td>188.15.159.128–188.15.159.255</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 3. Count the unused addresses</h3><p>Allocated = 16384 + 16384 + 8192 = 40960. Unused = 65536 − 40960 = <strong>24576</strong>.</p><p>Unused range: 188.15.160.0–188.15.255.255.</p></div></div></section>"},{"id":"q7a","title":"Q7(a) · Leaky versus token bucket","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(a). Compare and contrast Leaky Bucket and Token Bucket algorithm for QoS improvement. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>In the textbook <strong>leaky-bucket queue/shaper</strong> model, arriving packets enter a finite buffer. The output sends at a configured rate whenever data is queued. When the queue empties, it cannot send nonexistent packets; when the buffer is full, excess arrivals are dropped in this finite-buffer model.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-leaky.77bdbcf957.svg\" width=\"820\" height=\"515\" alt=\"Leaky-bucket data queue\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Finite data buffer smooths a burst into a bounded departure rate.</figcaption></figure><ol><li>Choose buffer capacity B and output service rate r in consistent units.</li><li>Admit arrivals that fit. Drop/mark overflow according to the stated implementation; this queue example drops the excess.</li><li>Drain at rate r while the queue is nonempty. Idle time does not accumulate permission for a later faster burst.</li><li>The result is smoothed output. Larger buffers accommodate larger bursts but can increase waiting delay.</li></ol><table><thead><tr><th scope=\"col\">Advantage</th><th scope=\"col\">Limitation</th></tr></thead><tbody><tr><td>Simple bound on output rate</td><td>Bursts may overflow or suffer delay</td></tr><tr><td>Reduces short-term output variation</td><td>Unused idle service cannot be saved</td></tr><tr><td>Useful for predictable traffic shaping</td><td>No end-to-end delay/loss guarantee by itself</td></tr></tbody></table><p>The term “leaky bucket” can also describe a conformance meter in standards. This course’s diagrams and numerical questions explicitly use the finite data-queue model, so its state is queued data rather than tokens.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A queue of 20 packets drained at 5 packets/s needs 4 seconds to empty without new arrivals. If it is already full, an instantaneous extra burst cannot all be stored.</p></aside><p>No algorithm is universally better. The leaky data-queue model is useful for a smooth output profile; token bucket is preferable when controlled bursts should be allowed. State the application’s delay, burst and rate needs before recommending one.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Leaky bucket stores data; idle service save nahi hota.</p>\r\n<div class=\"answer\"><p>A <strong>token bucket</strong> generates tokens at rate r up to capacity B. Sending one unit of data consumes the corresponding tokens. Tokens accumulate during idle periods only until the bucket is full. Data can therefore burst when saved tokens exist, subject to the physical link rate.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-token.c3ff1dbf76.svg\" width=\"820\" height=\"660\" alt=\"Token bucket: permission is separate from data\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Tokens store permission; the separate data queue stores packets.</figcaption></figure><ol><li>Initialize a stated token count, often B for a full bucket. Add rΔt tokens over elapsed time, capped at B.</li><li>A packet of length L needs L byte-tokens (or one packet-token in a fixed-packet model). If enough tokens exist, deduct them and permit transmission.</li><li>If tokens are insufficient, a <strong>shaper</strong> waits/buffers until enough are available. A <strong>policer</strong> marks or drops nonconforming traffic according to policy. Token shortage does not universally mean drop.</li><li>Over interval t, a full token bucket bounds admitted data by B+rt. Actual output is also limited by link capacity and packet scheduling.</li><li>Unlike the queue-style leaky bucket, token storage allows limited bursts after idle time. It bounds average rate and burst size separately.</li></ol><div class=\"math-display\"><img src=\"math/750b0148fd39654a.svg\" alt=\"\\mathrm{admitted\\ data}(t)\\le B+rt\" style=\"width:25.805ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><table><thead><tr><th scope=\"col\">Limitation</th><th scope=\"col\">Reason</th></tr></thead><tbody><tr><td>Bursts can still congest downstream queues</td><td>Local conformance does not ensure every later link has capacity</td></tr><tr><td>Parameters must match traffic and link requirements</td><td>A small B delays/drops legitimate packets; a large B permits disruptive bursts</td></tr><tr><td>No complete QoS guarantee alone</td><td>Admission, scheduling and end-to-end capacity may still be needed</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>With B=10 KB and r=2 KB/s, an idle sender can immediately use up to 10 KB of saved tokens; additional sustained traffic must respect the refill rate, and physical serialization still takes time.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Token permission store hota hai; actual packet alag queue mein.</p>\r\n<div class=\"answer\"><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">Leaky data queue</th><th scope=\"col\">Token bucket</th></tr></thead><tbody><tr><td>Stored state</td><td>Queued data</td><td>Tokens representing permission</td></tr><tr><td>Idle period</td><td>Empty queue; unused service lost</td><td>Tokens accumulate up to B</td></tr><tr><td>Output burst</td><td>Smoothed by configured service rate</td><td>Allowed if enough tokens and physical capacity exist</td></tr><tr><td>Overflow/shortage</td><td>Finite queue can overflow</td><td>Shaper waits; policer may mark/drop</td></tr><tr><td>Main parameters</td><td>Queue capacity and drain rate</td><td>Token capacity and generation rate</td></tr><tr><td>Useful when</td><td>A smoother output profile is required</td><td>Average rate plus burst allowance is required</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A steady-rate interface may use leaky shaping. A bursty file application can use token shaping to send short bursts while limiting its sustained rate.</p></aside></div></div></section>"},{"id":"q7b","title":"Q7(b) · HTTP","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(b). Explain the HTTP protocol and its role in data transmission between clients and servers over the internet. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>The <strong>World Wide Web (WWW)</strong> is an information system of linked resources identified by URLs and accessed using Web clients and servers. A browser is a client; a Web server hosts or generates representations such as HTML, images or JSON. <strong>HTTP</strong> defines request/response semantics between these components. The Web is one application of the Internet, not a synonym for the entire Internet.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-http.de65bc75dd.svg\" width=\"820\" height=\"805\" alt=\"Opening a plain HTTP/1.1 URL\" loading=\"lazy\" decoding=\"async\"></div><figcaption>URL → DNS → connection → HTTP request/response → displayed document.</figcaption></figure><ol><li>Interpret the URL <strong>http://www.example.com/</strong>: scheme=http; host=www.example.com; path=/; absent explicit port, plain HTTP uses default port 80. A fragment identifier, if present, is handled by the client and is not sent as part of an HTTP target.</li><li>Resolve the hostname using DNS, often via cached results and a recursive resolver. DNS finds an address; it does not download the Web page.</li><li>For this plain HTTP/1.1 example, establish a TCP connection to the server on port 80. HTTPS additionally protects HTTP using TLS; do not add TLS to an explicitly plain-http example without stating a redirect or change of scheme.</li><li>Send a request such as GET / HTTP/1.1 with Host: www.example.com. The server identifies the target resource, processes the request and prepares a response.</li><li>Receive a status line such as HTTP/1.1 200 OK, response headers such as Content-Type, and the response body. A 404 response indicates no matching resource was found; redirects instruct the client to another target.</li><li>The browser parses HTML, retrieves referenced objects as needed and renders the page. Caching may avoid transfers; persistent connections can serve multiple requests.</li></ol><table><thead><tr><th scope=\"col\">Message component</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Request method / target</td><td>Requested action and resource; GET retrieves a representation, POST submits data for processing</td></tr><tr><td>Headers</td><td>Metadata, routing context, representation preferences and cache/connection information</td></tr><tr><td>Status code</td><td>Result class: 2xx success, 3xx redirection, 4xx client error, 5xx server error</td></tr><tr><td>Body</td><td>Representation or submitted content when present</td></tr></tbody></table><p>HTTP semantics are stateless: each request has its own meaning. Cookies/tokens can let an application maintain a login session; stateless does not mean “users cannot log in”. HTTP/1.1 and HTTP/2 commonly use TCP; HTTP/3 uses QUIC over UDP, so “HTTP always uses TCP” is not a universal statement.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A browser can receive the HTML successfully and still need separate requests for its stylesheet and image. One URL entry can therefore cause several HTTP exchanges.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> DNS address dhoondta; HTTP resource mangta; browser render karta.</p></div></section>"},{"id":"q7c","title":"Q7(c) · Distance vector versus link state","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(c). Compare and contrast distance vector and link state routing. Any 5 points each. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> RIP and OSPF are routing protocols; Bellman–Ford and Dijkstra are algorithms underlying different route-computation approaches.</p><p><strong>Simple meaning.</strong> Protocol message bhejta hai; algorithm route calculate karta hai.</p><h2>Understand it step by step</h2><ol><li>RIP uses distance-vector information and a bounded hop metric. OSPF distributes link-state information and computes paths using additive costs.</li><li>A generic Bellman–Ford graph exercise can contain negative weights; RIP’s ordinary hop-count metric does not.</li><li>Dijkstra assumes nonnegative edge weights. Do not select it for the negative-weight re-exam graph simply because the question says “routing”.</li><li>State whether a drawn graph is directed or undirected before solving. Both algorithms can be applied to appropriate directed graphs.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>The December paper explicitly gives positive directed edges and asks for Dijkstra. The February paper includes negative directed edges and asks for Bellman–Ford.</p></aside><div class=\"answer\"><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">RIP</th><th scope=\"col\">OSPF</th></tr></thead><tbody><tr><td>Family</td><td>Distance vector</td><td>Link state</td></tr><tr><td>Typical metric</td><td>Hop count; 16 unreachable</td><td>Sum of configured link costs</td></tr><tr><td>Knowledge exchanged</td><td>Destination distances via neighbours</td><td>Link-state information</td></tr><tr><td>Algorithm connection</td><td>Distributed Bellman–Ford idea</td><td>Dijkstra shortest paths</td></tr><tr><td>Scale design</td><td>Small/simple networks; limited diameter</td><td>Area-based scalable design</td></tr></tbody></table></div><p class=\"memory\"><strong>Yaad rakho:</strong> Distance vector → RIP; link state → OSPF.</p><h3>Distance vector versus link state: five direct comparisons</h3><div class=\"table-wrap\"><table><thead><tr><th>Point</th><th>Distance vector</th><th>Link state</th></tr></thead><tbody><tr><td>Information exchanged</td><td>Destination-distance estimates and route information</td><td>Descriptions of local links, neighbours and link costs</td></tr><tr><td>Recipient / distribution</td><td>Neighbour-to-neighbour exchange</td><td>Flooding across the routing domain or area</td></tr><tr><td>Topology knowledge</td><td>Ordinarily no complete topology map; relies on neighbours' advertised distances</td><td>Builds a link-state database representing the area topology</td></tr><tr><td>Computation</td><td>Distributed Bellman–Ford style minimum via neighbours</td><td>Dijkstra shortest-path tree from the router itself</td></tr><tr><td>Convergence / resource tradeoff</td><td>Simple advertisements, but failures can cause count-to-infinity and transient loops</td><td>More database/computation and flooding overhead; topology changes can be propagated promptly</td></tr></tbody></table></div><p>RIP and OSPF illustrate these families, respectively. Exact convergence time depends on timers, topology and implementation, so neither family has one universal time bound.</p></div></section>"}]},{"id":"paper-2025-feb-reexam","title":"2025-02-19 · 2023-24 / 2024-25","unit":"Historical PYQ","scope":"Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.","sections":[{"id":"q1a","title":"Q1(a) · TCP/IP network and transport layers","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(a). Explain the network layer and transport layer protocols of TCP/IP model. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>The <strong>TCP/IP model</strong> describes the Internet protocol suite in four layers. Many teaching books split the link layer into data link and physical, making a five-layer teaching model; identify the convention before drawing.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-models.5bff0518c8.svg\" width=\"820\" height=\"670\" alt=\"OSI layers mapped to the four-layer TCP/IP model\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Four TCP/IP layers; the link layer includes the physical medium.</figcaption></figure><table><thead><tr><th scope=\"col\">TCP/IP layer</th><th scope=\"col\">Function</th><th scope=\"col\">Examples</th></tr></thead><tbody><tr><td>Application</td><td>Defines application message formats and exchanges for Web access, naming, email and file transfer; includes presentation/session functions as needed</td><td>HTTP, DNS, SMTP, FTP</td></tr><tr><td>Transport</td><td>End-to-end process communication</td><td>TCP, UDP, SCTP</td></tr><tr><td>Internet</td><td>IP addressing, routing and best-effort datagrams</td><td>IPv4/IPv6</td></tr><tr><td>Link/network access</td><td>Local delivery and physical access</td><td>Ethernet/Wi-Fi and their medium</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">OSI</th><th scope=\"col\">TCP/IP</th></tr></thead><tbody><tr><td>Layer count</td><td>Seven</td><td>Four here; five-layer teaching variant splits link</td></tr><tr><td>Upper functions</td><td>Application, presentation, session separated</td><td>Grouped under application</td></tr><tr><td>Lower functions</td><td>Data link and physical separated</td><td>Grouped under link/network access</td></tr><tr><td>Purpose</td><td>General reference architecture</td><td>Architecture of deployed Internet protocol family</td></tr><tr><td>Network service</td><td>Reference model can describe different services</td><td>Internet layer uses connectionless IP</td></tr><tr><td>Transport</td><td>Conceptual transport service</td><td>TCP reliable byte stream; UDP datagrams; SCTP messages</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>An application can use UDP without changing the IP or Ethernet layers. Layering lets one protocol vary without redesigning every network function.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> OSI 7; TCP/IP four mein upper three merge, lower two merge.</p><h3>Internet and transport protocols</h3><div class=\"table-wrap\"><table><thead><tr><th>Layer</th><th>Protocol</th><th>Role</th></tr></thead><tbody><tr><td>Internet</td><td>IPv4 / IPv6</td><td>Address and deliver best-effort packets across networks</td></tr><tr><td>Internet</td><td>ICMP / ICMPv6</td><td>Report selected IP errors and operational information; used by diagnostic exchanges</td></tr><tr><td>Transport</td><td>TCP</td><td>Reliable, ordered byte stream with connection establishment, flow and congestion control</td></tr><tr><td>Transport</td><td>UDP</td><td>Connectionless message delivery using ports, without built-in retransmission or ordering</td></tr><tr><td>Transport</td><td>SCTP</td><td>Reliable message-oriented association with multiple streams and multihoming support</td></tr></tbody></table></div></div></section>"},{"id":"q1b","title":"Q1(b) · Stop-and-Wait losses","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(b). Describe how the Stop-and-Wait ARQ protocol addresses the issues of lost data packets and lost acknowledgments to ensure reliable data transmission? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Stop-and-Wait ARQ</strong> permits only one outstanding frame. The sender stores its frame, transmits it and starts a timer. A valid matching ACK advances the sender; a timeout retransmits the stored frame.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-stopwait.a99281ab96.svg\" width=\"820\" height=\"569\" alt=\"Stop-and-Wait: lost ACK and duplicate rejection\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Lost ACK causes a duplicate transmission, not duplicate delivery.</figcaption></figure><ol><li>Use alternating sequence numbers 0 and 1. The receiver remembers the next expected number. Here ACK k means the next sequence expected.</li><li>Normal: send frame 0, receiver accepts it and sends ACK 1; sender then sends frame 1.</li><li>Damaged/lost data: receiver cannot accept the missing valid frame. The sender eventually times out and retransmits.</li><li>Lost ACK: the receiver already accepted the frame, but the sender times out and retransmits it. The receiver detects the duplicate by sequence number, does not deliver it twice, and repeats the ACK.</li><li>A damaged ACK must not advance the sender. The timer provides eventual recovery. Waiting each round trip limits utilization on high-delay links.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>After frame 0 is delivered, ACK 1 is lost. A retransmitted frame 0 is discarded as a duplicate; another ACK 1 tells the sender it may proceed.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> One frame outstanding; duplicate ko acknowledge karo, deliver dobara nahi.</p></div></section>"},{"id":"q1c","title":"Q1(c) · SCTP services","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(c). Explain any 5 services of SCTP. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Stream Control Transmission Protocol (SCTP)</strong> is a reliable message-oriented transport. A relationship between endpoints is an <strong>association</strong>. Its packets contain a common header followed by chunks, which carry data or control information.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-sctp.55048562bb.svg\" width=\"820\" height=\"522\" alt=\"SCTP association setup\" loading=\"lazy\" decoding=\"async\"></div><figcaption>SCTP four-message association setup and independent ordered streams.</figcaption></figure><ol><li>INIT → INIT ACK → COOKIE ECHO → COOKIE ACK is the normal setup. The state cookie helps avoid committing full association resources solely on an initial request.</li><li>Data is organized into messages on streams. Transmission Sequence Numbers track reliable chunk delivery across the association; ordering information identifies order within an ordered stream.</li><li>Multiple streams allow a missing message in one stream to avoid forcing every other stream to wait for that stream’s ordering. They still share association/network resources, so this does not guarantee total independence.</li><li>Multihoming lets endpoints advertise multiple addresses, supporting alternate paths and failover. Standard multihoming does not automatically mean all paths’ bandwidth is aggregated.</li><li>SCTP supplies retransmission, selective acknowledgements, receiver flow control and congestion control. Its common header is 12 bytes; chunks add their own headers and data.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A signalling application can use separate streams for independent dialogues. If a primary network path fails, an available alternate address/path can maintain the association.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> SCTP association: streams separate order, addresses provide failover.</p><h3>Five SCTP services</h3><div class=\"table-wrap\"><table><thead><tr><th>Service</th><th>Explanation</th></tr></thead><tbody><tr><td>Process-to-process delivery</td><td>Port numbers identify the sending and receiving applications</td></tr><tr><td>Reliable message delivery</td><td>Checks, sequence tracking, acknowledgements and retransmission recover missing chunks while preserving messages</td></tr><tr><td>Multistreaming</td><td>Separate ordering within streams reduces cross-stream ordering blockage</td></tr><tr><td>Multihoming</td><td>Multiple endpoint addresses permit an alternate path if the primary fails</td></tr><tr><td>Flow and congestion control</td><td>Receiver flow control limits receiver overload; congestion control adapts traffic to network conditions</td></tr></tbody></table></div></div></section>"},{"id":"q1d","title":"Q1(d) · Message versus packet switching","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(d). Compare message switching and packet switching. Write any two advantages and disadvantages of both. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Switching selects how data passes through intermediate network nodes from a source to a destination.</p><p><strong>Simple meaning.</strong> Raasta reserve karna, poora message ruk-ruk ke bhejna, ya chhote packets bhejna—yeh teen ideas hain.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/switching.2b51f856d9.svg\" width=\"820\" height=\"425\" alt=\"Three switching techniques: what is forwarded?\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Circuit, message and packet switching</figcaption></figure><h2>Understand it step by step</h2><ol><li><strong>Circuit switching:</strong> establish a circuit, reserve resources, transfer data, then release the circuit. Capacity is dedicated even during a silent period.</li><li><strong>Message switching:</strong> each intermediate node receives the entire message before forwarding it. Large messages require large buffers and can delay later messages.</li><li><strong>Packet switching:</strong> divide data into smaller packets. Nodes forward packets individually; different links can carry successive packets at the same time.</li><li>The Internet uses packet switching. A traditional circuit-switched telephone call illustrates the circuit concept. Many current calls use packet-based networks, so do not label every phone call circuit-switched.</li></ol><table><thead><tr><th scope=\"col\">Aspect</th><th scope=\"col\">Circuit switching</th><th scope=\"col\">Message switching</th><th scope=\"col\">Packet switching</th></tr></thead><tbody><tr><td>Unit handled</td><td>Continuous stream on established circuit</td><td>Whole message</td><td>Small packets</td></tr><tr><td>Resource use</td><td>Capacity reserved along a circuit</td><td>Shared; message stored at each intermediate node</td><td>Shared; each packet stored/forwarded in this model</td></tr><tr><td>Setup</td><td>Required before data transfer</td><td>No circuit setup required</td><td>Datagram: no connection setup; virtual circuit: setup</td></tr><tr><td>Delay</td><td>Setup delay, then relatively predictable service</td><td>Large store-and-forward delay for long messages</td><td>Variable delay; packet pipeline can reduce completion time</td></tr><tr><td>Main limitation</td><td>Reserved capacity can be idle</td><td>Large buffers; unsuitable for tight delay needs</td><td>Headers, possible queueing/loss; datagrams may reorder</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A campus transferring web pages and files has bursty traffic. Packet switching allows multiple users to share link capacity instead of reserving a circuit that remains idle between bursts.</p></aside><div class=\"answer\"><p>For ordinary bursty office data, packet switching is generally appropriate because resources are shared among active transfers. The design must still account for queueing, loss and the required service quality.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Circuit reserves; message waits whole; packets pipeline.</p><h3>Two advantages and two disadvantages</h3><div class=\"table-wrap\"><table><thead><tr><th>Method</th><th>Advantage 1</th><th>Advantage 2</th><th>Disadvantage 1</th><th>Disadvantage 2</th></tr></thead><tbody><tr><td>Message switching</td><td>Shares link capacity without a permanently reserved circuit</td><td>Intermediate storage lets a message wait for a currently busy outgoing link</td><td>The entire message must arrive before forwarding, giving long delay</td><td>Large messages require large buffers and can hold up other messages</td></tr><tr><td>Packet switching</td><td>Statistical sharing suits bursty data from many users</td><td>Packets can be pipelined across successive links, reducing completion time</td><td>Every packet needs header/control overhead</td><td>Queueing, loss and (for datagrams) reordering need endpoint or network handling</td></tr></tbody></table></div><p>A packet-switched network may use datagrams or virtual circuits. The possibility of independent routes and reordering refers to datagrams, not every packet-switching implementation.</p></div></section>"},{"id":"q2a","title":"Q2(a) · Star and mesh","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(a). Define network topology. Draw diagram to illustrate star and mesh topology and explain each topology with any two advantages and disadvantages. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Topology</strong> is the arrangement of nodes and links. Physical topology describes actual links; logical topology describes how data flows. A switch-centred physical star is different from a shared collision-domain bus.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-topologies.d9e18f041b.svg\" width=\"820\" height=\"665\" alt=\"Four physical network topologies\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Star, bus, ring and full mesh; edges depict physical connections.</figcaption></figure><table><thead><tr><th scope=\"col\">Topology</th><th scope=\"col\">Structure</th><th scope=\"col\">Benefit</th><th scope=\"col\">Limitation</th></tr></thead><tbody><tr><td>Bus</td><td>Devices share a common backbone</td><td>Simple small shared-medium layout</td><td>Backbone fault affects segment; collisions possible on classic shared bus</td></tr><tr><td>Star</td><td>Each device connects to a central switch/hub</td><td>Easy expansion and fault isolation</td><td>Central-device failure affects star; more cabling</td></tr><tr><td>Ring</td><td>Each node connected to two neighbours in a ring</td><td>Structured traversal; token-based variants coordinate access</td><td>Simple single-ring break can disrupt operation unless protected</td></tr><tr><td>Full mesh</td><td>Every pair has a direct link</td><td>Redundant paths and direct connectivity</td><td>Expensive ports/cabling: n(n−1)/2 undirected links</td></tr><tr><td>Tree/hybrid</td><td>Hierarchical stars or combined topologies</td><td>Scales into buildings/floors</td><td>Upper-level faults affect dependent branches</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A lab normally uses a switch-centred star: unplugging one workstation cable isolates that workstation. A failed central switch can stop the whole lab unless redundancy is provided.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Layout draw karo, then one strength and one failure case.</p><h3>Two advantages and two disadvantages of each topology</h3><div class=\"table-wrap\"><table><thead><tr><th>Topology / example</th><th>Advantage 1</th><th>Advantage 2</th><th>Disadvantage 1</th><th>Disadvantage 2</th></tr></thead><tbody><tr><td>Star: switched computer laboratory</td><td>A device can be added on a spare central port without rebuilding the whole topology</td><td>A single access-cable fault normally isolates only its attached device</td><td>Central-switch failure affects all attached devices unless redundant</td><td>A separate cable and switch port are needed per device</td></tr><tr><td>Bus: legacy coaxial Ethernet</td><td>Uses little cable in a small linear layout</td><td>No central switch is required in the simple shared-bus design</td><td>A backbone fault can disable the segment</td><td>Shared bandwidth, contention and fault diagnosis become difficult as it grows</td></tr><tr><td>Ring: token-based ring</td><td>Controlled token access avoids data collisions among compliant stations</td><td>Token rotation gives stations an organized opportunity to transmit</td><td>A break can interrupt an unprotected single ring</td><td>Adding/removing a node can disrupt a simple ring</td></tr><tr><td>Mesh: redundant router backbone</td><td>Alternate links preserve connectivity after some link failures</td><td>Direct pairwise links can carry separate exchanges without a shared central bottleneck</td><td>A full mesh needs n(n−1)/2 links and many ports</td><td>Configuration, cabling and maintenance become complex</td></tr></tbody></table></div><p>The ring benefits above assume token-controlled access; physical ring wiring alone does not guarantee fairness or collision avoidance. The failure disadvantages describe simple layouts without protection/redundancy.</p></div></section>"},{"id":"q2b","title":"Q2(b) · CSMA/CA and RTS/CTS","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(b). Explain in detail CSMA/CA with the help of a diagram. Describe the role of RTS and CTS in avoiding collision in CSMA/CA. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> CSMA with Collision Avoidance uses carrier sensing and randomized access delays, with acknowledgements and optional reservation exchanges, to reduce collisions on a wireless shared medium.</p><p><strong>Simple meaning.</strong> CA = pehle collision avoid karne ki koshish; guarantee nahi.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ca-sequence.566280e50f.svg\" width=\"820\" height=\"490\" alt=\"CSMA/CA: optional reservation, data, acknowledgement\" loading=\"lazy\" decoding=\"async\"></div><figcaption>CSMA/CA: reduce collision risk before sending</figcaption></figure><h2>Understand it step by step</h2><ol><li>A wireless station senses the medium and follows the required interframe waiting and contention rules.</li><li>A random backoff counter counts down in eligible idle slots and freezes while the medium is busy. It resumes when permitted; it is not continuously counted through someone else’s transmission.</li><li>When its counter reaches zero, it transmits. A unicast receiver normally sends an ACK after successful reception. Missing ACK triggers retry logic.</li><li>RTS/CTS is an optional reservation exchange. Stations hearing reservation information defer for the indicated duration. It can reduce hidden-terminal data collisions but adds overhead.</li><li>Wireless stations cannot generally rely on Ethernet-style collision detection while transmitting. Collision avoidance does not eliminate all losses or collisions.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Two laptops using one Wi-Fi channel contend for access. Random backoff reduces simultaneous starts; an ACK lets the sender know a unicast frame was received.</p></aside><div class=\"answer\"><table><thead><tr><th scope=\"col\">Aspect</th><th scope=\"col\">CSMA/CD</th><th scope=\"col\">CSMA/CA</th></tr></thead><tbody><tr><td>Main action</td><td>Detect and abort a collision during sending</td><td>Reduce collision risk before sending</td></tr><tr><td>Typical teaching context</td><td>Shared half-duplex wired Ethernet</td><td>Wi-Fi contention access</td></tr><tr><td>Mechanisms</td><td>Carrier sensing, detection/jam, backoff</td><td>Carrier sensing, random backoff, ACK; optional RTS/CTS</td></tr></tbody></table></div><p class=\"memory\"><strong>Yaad rakho:</strong> CD = detect during; CA = avoid before.</p>\r\n<p><strong>Definition.</strong> Hidden terminals are stations that cannot sense each other but whose transmissions can interfere at a common receiver.</p><p><strong>Simple meaning.</strong> A aur C ek dusre ko nahi sunte, par dono B ko bhej rahe hain.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/hidden-terminal.1ffcf794d5.svg\" width=\"820\" height=\"330\" alt=\"Hidden terminals: A and C cannot sense each other\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Hidden terminals and RTS/CTS</figcaption></figure><h2>Understand it step by step</h2><ol><li>Suppose A and C are outside each other’s sensing range, but B can receive both.</li><li>A senses no signal from C and may transmit; C may make the same decision. Their frames can collide at B.</li><li>With optional RTS/CTS, A first sends a short RTS to B. B replies CTS, which C can hear. C defers for the reservation duration.</li><li>RTS frames can themselves collide and wireless conditions still matter. Describe RTS/CTS as mitigation, not an absolute guarantee.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Access points can hear devices at opposite ends of a room even when those devices cannot hear one another clearly. The access point’s CTS can inform both sides about a reservation.</p></aside><div class=\"answer\"><p>A and C may both reach B but be unable to sense one another. Simultaneous transmissions can then collide at B. A short RTS followed by B’s CTS announces a reservation; a station hearing the CTS defers, reducing the risk of a long data-frame collision.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Hidden: senders invisible to each other, receiver common.</p><h3>CSMA/CA flow diagram</h3><pre>Frame ready → sense medium\r\nBusy? yes → defer until eligible idle interval\r\n          ↓\r\nChoose a random backoff → count down eligible idle slots\r\nMedium becomes busy? → freeze counter; resume after required idle wait\r\n          ↓ counter reaches zero\r\nOptional RTS → CTS received? no → retry/back off\r\n          ↓ yes (or RTS/CTS not used)\r\nSend DATA → ACK received? yes → success\r\n                        no → retry/back off or fail at retry limit</pre><p>A station hearing a duration reservation updates its network allocation vector and defers. RTS/CTS is optional; loss of CTS or ACK triggers recovery but does not by itself prove a collision, because channel errors can also cause loss.</p></div></section>"},{"id":"q3a","title":"Q3(a) · TCP connection lifecycle","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(a). Describe the TCP connection establishment and termination with the help of diagrams. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>A TCP connection establishes each endpoint’s initial sequence number and confirms that both can receive. Use client initial sequence x=1000 and server initial sequence y=5000; assume no payload in the handshake.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-handshake.e053246177.svg\" width=\"820\" height=\"873\" alt=\"TCP: handshake, data and orderly close\" loading=\"lazy\" decoding=\"async\"></div><figcaption>SYN and FIN each consume one sequence number; pure ACK consumes none.</figcaption></figure><table><thead><tr><th scope=\"col\">Step</th><th scope=\"col\">Segment</th><th scope=\"col\">Meaning</th></tr></thead><tbody><tr><td>1 Client → server</td><td>SYN, Seq=1000</td><td>Client proposes its starting sequence</td></tr><tr><td>2 Server → client</td><td>SYN+ACK, Seq=5000, Ack=1001</td><td>Server acknowledges client SYN and supplies its own start</td></tr><tr><td>3 Client → server</td><td>ACK, Seq=1001, Ack=5001</td><td>Client acknowledges server SYN; connection is established</td></tr></tbody></table><h2>Data transfer</h2><p>Client sends 200 bytes beginning at Seq=1001, so byte numbers are 1001…1200. The receiver acknowledges Ack=1201, the next byte expected. If bytes starting at 1201 are missing but later bytes arrive, the cumulative ACK remains 1201 until the gap is repaired. TCP may buffer out-of-order bytes; it delivers the byte stream in order. Each direction counts independently.</p><h2>Orderly termination</h2><ol><li>Assume client’s next data sequence is 1201. It sends FIN with Seq=1201, meaning it has finished sending.</li><li>Server sends ACK=1202. The connection is half closed: the server can still send data until its application finishes.</li><li>Assume server has sent no data since the handshake. It sends FIN with Seq=5001.</li><li>Client responds with ACK=5002. In a common active-close path the client enters TIME-WAIT so delayed segments and retransmitted FINs can be handled before the tuple is reused.</li><li>These are commonly four segments, but ACK and FIN can be combined and simultaneous close is possible. RST is an abort, not the same as the orderly FIN exchange.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A client can finish uploading a request and close its sending direction while still receiving the server’s response. Full-duplex directions do not have to end at the same instant.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> SYN plus one, FIN plus one; ACK next expected byte.</p></div></section>"},{"id":"q3b","title":"Q3(b) · VLSM customer allocation","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(b). An ISP is allocated a block of addresses starting with 180.50.0.0/16 (65,536 addresses). The ISP needs to distribute these addresses among three customer groups as follows: i) The first group consists of 80 customers; each requires 256 addresses. ii) The second group consists of 150 customers; each requires 256 addresses. iii) The third group consists of 32 customers; each requires 128 addresses. Design the sub blocks and determine the first address and last address of first customer and last customer for each group. Calculate how many addresses are still available after these allocations. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>180.50.0.0/16; Group 1: 80 customers × 256 addresses; Group 2: 150 customers × 256 addresses; Group 3: 32 customers × 128 addresses</p><h3>To find</h3><p>Each customer prefix, every group range, first/last customer blocks, and unallocated addresses.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/2cb46cf5eb7fdc4d.svg\" alt=\"p=32-\\log_2(\\text{addresses per customer}),\\quad A_{group}=n\\times A_{customer}\" style=\"width:62.003ex;height:2.364ex\" loading=\"lazy\" decoding=\"async\"></div><p>These are requested total addresses, not usable-host counts. Allocate customer blocks on their prefix boundary. A group with a non-power-of-two customer count need not be forced into one larger, wasteful CIDR aggregate.</p><div class=\"step\"><h3>Step 1. Compute sizes and allocate consecutive aligned customer blocks</h3><div class=\"table-wrap\"><table><thead><tr><th>Group</th><th>Customers</th><th>Addresses each</th><th>Customer prefix</th><th>Used</th><th>Group range</th></tr></thead><tbody><tr><td>1</td><td>80</td><td>256</td><td>/24</td><td>20480</td><td>180.50.0.0–180.50.79.255</td></tr><tr><td>2</td><td>150</td><td>256</td><td>/24</td><td>38400</td><td>180.50.80.0–180.50.229.255</td></tr><tr><td>3</td><td>32</td><td>128</td><td>/25</td><td>4096</td><td>180.50.230.0–180.50.245.255</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. State first and last customer ranges</h3><div class=\"table-wrap\"><table><thead><tr><th>Group</th><th>First customer</th><th>Last customer</th></tr></thead><tbody><tr><td>1</td><td>180.50.0.0–180.50.0.255</td><td>180.50.79.0–180.50.79.255</td></tr><tr><td>2</td><td>180.50.80.0–180.50.80.255</td><td>180.50.229.0–180.50.229.255</td></tr><tr><td>3</td><td>180.50.230.0–180.50.230.127</td><td>180.50.245.128–180.50.245.255</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 3. Count the unused addresses</h3><p>Allocated = 20480 + 38400 + 4096 = 62976. Unused = 65536 − 62976 = <strong>2560</strong>.</p><p>Unused range: 180.50.246.0–180.50.255.255.</p></div></div></section>"},{"id":"q4a","title":"Q4(a) · DNS resolution","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(a). Explain the working of the DNS protocol in resolving domain names to IP addresses. Discuss the role of the hierarchical structure of DNS servers in this process. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>The <strong>Domain Name System (DNS)</strong> is a distributed hierarchical naming system. Its namespace is a tree with the root at the top. A complete name is the ordered path of labels from a node back to the root. An absolute name may be written with a trailing dot, for example www.example.com.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-dns.f5345fe9fb.svg\" width=\"820\" height=\"520\" alt=\"DNS namespace: full label paths are unique\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Root, top-level domains, delegated domain and host labels.</figcaption></figure><table><thead><tr><th scope=\"col\">Level</th><th scope=\"col\">Example</th><th scope=\"col\">Meaning</th></tr></thead><tbody><tr><td>Root</td><td>.</td><td>Top of the namespace</td></tr><tr><td>Top-level domain (TLD)</td><td>com, org, in</td><td>A child zone below the root</td></tr><tr><td>Registered/delegated domain</td><td>example.com</td><td>Name under a parent such as com</td></tr><tr><td>Subdomain/host label</td><td>www.example.com</td><td>A label below example.com; a name may own different record types</td></tr></tbody></table><h2>Why names remain unique</h2><ol><li>A parent manages the labels immediately beneath it and does not assign the same child label to two different nodes in that parent’s namespace.</li><li>The full sequence of labels identifies the node. The local label www can appear below many domains without conflict: www.example.com and www.example.org are different complete names.</li><li>Administration is delegated: the parent publishes information identifying authoritative servers for a child zone. A domain is a namespace subtree; a zone is the portion administered together, excluding subtrees delegated onward.</li><li>Multiple names may resolve to one IP address, and one name can return several addresses. Uniqueness of names does not imply a one-name/one-IP rule.</li></ol><h2>Resolution</h2><ol><li>A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.</li><li>Otherwise the resolver can query a root server, receive a referral to the relevant TLD, then receive a referral to the authoritative server for the domain.</li><li>The authoritative server supplies the requested record or a relevant negative response. The recursive resolver returns the result and may cache it according to TTL.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>The labels “mail” under two organizations do not collide because mail.example.com and mail.example.org have different ancestors. DNS delegation distributes administration while preserving a unique full path.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Full path unique; www label akela unique nahi.</p><h3>Worked resolution example: www.xyz.com</h3><pre>Client → recursive resolver → root (.)\r\n                           → .com TLD\r\n                           → authoritative server for xyz.com\r\nClient ← final A/AAAA answer ← resolver</pre><p>Assume a cache miss and that the name exists. (1) The client asks its resolver for www.xyz.com. (2) A root server refers the resolver to .com servers. (3) A .com server refers it to authoritative servers for xyz.com. (4) An authoritative server returns the applicable A/AAAA record, or a CNAME that must be followed. (5) The resolver returns the answer and caches it according to TTL. No real IP address for this domain is assumed. Root and TLD servers normally supply referrals here, not the final host address.</p></div></section>"},{"id":"q4b","title":"Q4(b) · RIP route updates","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(b). Explain Routing Information Protocol. Illustrate with an example how routes are updated in RIP. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Routing Information Protocol (RIP) is an interior distance-vector routing protocol that uses a bounded metric, commonly hop count, to select routes.</p><p><strong>Simple meaning.</strong> RIP mein hops count; 15 tak reachable, 16 means unreachable.</p><h2>Understand it step by step</h2><ol><li>RIPv2 uses distance-vector updates and carries subnet-mask information, allowing classless routes.</li><li>The usual hop-count metric admits costs 1–15 for reachable routes; 16 denotes infinity/unreachable. A received advertisement is incremented by the local link cost and capped at 16.</li><li>RIPv2 normally sends periodic updates about every 30 seconds, with implementation/timer behavior and triggered updates affecting the exact timing. RIPv2 uses UDP port 520 and can send updates to multicast 224.0.0.9.</li><li>Hop count does not directly measure bandwidth or delay, so a low-hop route is not always the fastest link path. The 15-hop limit restricts scale.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>If a neighbour advertises a destination at 15 hops and your added cost is 1, the resulting 16 means unreachable, not a valid 16-hop route.</p></aside><div class=\"answer\"><p>RIP uses distance-vector routing and commonly hop count as its metric. Reachable metrics are at most 15; 16 represents infinity. Its main limitations include limited diameter, a coarse metric and relatively slow convergence with possible temporary loops.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> RIP: neighbour distances; 16 is infinity.</p><h3>Route-update example using RIP hop counts</h3><p>Let router A have neighbours B and C, each one hop away. B advertises destination network N at 2 hops; C advertises N at 4 hops. A adds its local one-hop cost to each advertisement.</p><div class=\"table-wrap\"><table><thead><tr><th>Candidate</th><th>Calculation</th><th>Result</th></tr></thead><tbody><tr><td>Via B</td><td>1 + 2</td><td>3 hops</td></tr><tr><td>Via C</td><td>1 + 4</td><td>5 hops</td></tr></tbody></table></div><p>A chooses B and records (destination N, next hop B, metric 3). If B subsequently advertises metric 16, that route is unreachable. If the advertisement from C is still valid, A can select C at metric 5 instead. Updates can propagate to other routers; split horizon/poisoned reverse and triggered updates help limit loops and speed convergence, but do not make every transient loop impossible.</p></div></section>"},{"id":"q5a","title":"Q5(a) · Pure versus slotted ALOHA","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(a). Define random Access. Differentiate between pure ALOHA &amp; slotted ALOHA in terms of the following performance factors. (i) Throughput (ii) Vulnerable time (iii) Efficiency (iv) Time synchronization. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Pure ALOHA is a random-access protocol in which a station transmits whenever a frame is ready and retransmits after a random delay if the transmission is unsuccessful.</p><p><strong>Simple meaning.</strong> Frame ready → bhej do. Collision hua → random wait karke retry.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/pure-aloha.8aa7732ee2.svg\" width=\"820\" height=\"345\" alt=\"Pure ALOHA: arbitrary start times can overlap\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Pure ALOHA: transmit first, retry if necessary</figcaption></figure><h2>Understand it step by step</h2><ol><li>Several stations share the same channel. Pure ALOHA does not first check whether the channel is idle.</li><li>A station transmits immediately. In the basic collision-channel model, any overlapping frame makes the involved frames unsuccessful.</li><li>An acknowledgement indicates successful reception. If it is not received before timeout, the station treats the attempt as unsuccessful. An absent ACK alone cannot distinguish a collision from another loss.</li><li>The station waits a random backoff time and retries. If every station used the same fixed delay, they could collide again together.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Two remote sensors may both transmit a reading immediately after it becomes ready. A random retry delay reduces the chance that their next attempts overlap again.</p></aside><div class=\"answer\"><p>In Pure ALOHA, a station transmits a ready frame without carrier sensing. If a successful acknowledgement is not received, it waits for a random interval and retransmits. Overlapping transmissions cause collisions in the basic model. Its maximum normalized throughput is 1/(2e) ≈ 18.4%, so it is inefficient at high offered load.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Pure = kisi bhi time start; retry ka wait random.</p>\r\n<p><strong>Definition.</strong> The vulnerable period is the interval of start times of other frames that would cause a collision with a chosen frame.</p><p><strong>Simple meaning.</strong> Apne frame se ek frame-time pehle start hua frame bhi takra sakta hai, aur baad mein bhi.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/vulnerable.e2a01a5ab7.svg\" width=\"820\" height=\"360\" alt=\"Pure ALOHA: interfering starts from −T to +T\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Why Pure ALOHA has a 2T vulnerable period</figcaption></figure><h2>Understand it step by step</h2><ol><li>Let your frame start at time 0 and finish at T. All frames have the same transmission duration T.</li><li>Another frame starting between −T and 0 is still being transmitted when your frame begins.</li><li>Another frame starting between 0 and T begins before your frame ends.</li><li>Therefore interfering start times occupy an interval of length 2T. Exact boundary contact is treated as non-overlap in this idealized timing model.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>If a frame takes 2 ms, another frame starting 1 ms before yours overlaps its beginning; a frame starting 1 ms after yours overlaps its end. The vulnerable interval is 4 ms long.</p></aside><div class=\"answer\"><p>A frame lasting T can collide with an equal-length frame that began less than T earlier, or one that begins less than T later. The two intervals together have length T+T=2T.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Pure: before T + after T = 2T.</p>\r\n<p><strong>Definition.</strong> Slotted ALOHA is a random-access protocol that divides time into slots of one frame duration and permits transmissions only at the beginning of a slot.</p><p><strong>Simple meaning.</strong> Frame ready hai tab bhi next slot ki start-line ka wait karo.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/slotted-aloha.fbfbef9647.svg\" width=\"820\" height=\"390\" alt=\"Slotted ALOHA: one frame duration per slot\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Slotted ALOHA: starts only at slot boundaries</figcaption></figure><h2>Understand it step by step</h2><ol><li>All stations agree on slot boundaries; time synchronization is required.</li><li>A station with a frame waits for a slot boundary before starting. A slot can be idle, successful or a collision.</li><li>Exactly one station transmitting in a slot produces success in the ideal model. Two or more simultaneous attempts collide.</li><li>Frames cannot partially overlap adjacent slots under the assumptions. The vulnerable interval is T instead of 2T. Randomized retries are still needed.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>If the slot duration is 1 ms and a frame becomes ready at 2.4 ms, the next permitted start is 3 ms. Another station choosing the same slot can still collide.</p></aside><div class=\"answer\"><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">Pure</th><th scope=\"col\">Slotted</th></tr></thead><tbody><tr><td>Start time</td><td>Any time</td><td>Slot boundary only</td></tr><tr><td>Synchronization</td><td>No common slots required</td><td>Required</td></tr><tr><td>Vulnerable period</td><td>2T</td><td>T</td></tr><tr><td>Maximum S</td><td>1/(2e) ≈ 0.184</td><td>1/e ≈ 0.368</td></tr><tr><td>G at maximum</td><td>0.5</td><td>1</td></tr></tbody></table></div><p class=\"memory\"><strong>Yaad rakho:</strong> Slotted = aligned starts; collision risk half-window, not zero.</p></div></section>"},{"id":"q5b","title":"Q5(b) · Congestion policies","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(b). Distinguish between open-loop and closed loop congestion control mechanism. (Any 2 points for each) Describe in detail any 4 congestion control policies used in open-loop and closed loop. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Congestion</strong> occurs when offered traffic overloads network resources such as link capacity, router buffers or processing. Queueing delay grows, packets may be dropped, and excessive retransmission can make the overload worse. <strong>Flow control</strong> protects a receiver; congestion control protects the network.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-congestion.c27c2303bb.svg\" width=\"820\" height=\"515\" alt=\"Two congestion-control approaches\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Open-loop prevention and closed-loop feedback.</figcaption></figure><table><thead><tr><th scope=\"col\">Approach</th><th scope=\"col\">Policy / mechanism</th><th scope=\"col\">How it helps</th></tr></thead><tbody><tr><td>Open loop: prevent congestion without runtime congestion feedback</td><td>Retransmission policy</td><td>Carefully chosen timers/selective retransmission avoid needless extra traffic</td></tr><tr><td>Open loop</td><td>Window policy</td><td>Limit outstanding data and avoid excessive retransmission after loss</td></tr><tr><td>Open loop</td><td>Acknowledgement policy</td><td>Avoid unnecessarily frequent ACK traffic while retaining correct recovery</td></tr><tr><td>Open loop</td><td>Admission policy</td><td>Refuse new load when reserved capacity is insufficient</td></tr><tr><td>Closed loop: measure and react to congestion</td><td>Backpressure</td><td>A congested node tells upstream nodes to reduce/stop sending, possibly propagating hop by hop</td></tr><tr><td>Closed loop</td><td>Choke/control signalling</td><td>A congested node sends explicit feedback to the source</td></tr><tr><td>Closed loop</td><td>Implicit signalling</td><td>A sender infers congestion from loss/delay and changes its sending behaviour</td></tr><tr><td>Closed loop</td><td>Explicit marking</td><td>Network marks congestion (for example ECN); endpoints react to returned information</td></tr></tbody></table><p>For an answer asking for two of each: explain retransmission and admission policies under open loop, then backpressure and explicit signalling under closed loop, with the mechanism and its effect. These are general congestion-control classifications used in the course; they are not all mandatory algorithms implemented inside TCP. TCP commonly uses end-to-end feedback such as loss or ECN.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A router’s output link can be overloaded even while the destination application reads quickly. Increasing receiver memory alone will not remove that network bottleneck.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Open loop pehle prevent; closed loop feedback se react.</p></div></section>"},{"id":"q6a","title":"Q6(a) · Dijkstra six-node graph","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(a). Consider the following network diagram comprising 6 nodes. Find the shortest path and shortest distance using Dijkstra’s Algorithm from A to every other node. Show all the intermediate steps. Show the table with shortest distance and previous node for all 6 nodes. <span class=\"marks\">[10 marks]</span></h3><h3>Original diagram data</h3><div class=\"table-wrap\"><table><thead><tr><th>From</th><th>To</th><th>Cost</th></tr></thead><tbody><tr><td>A</td><td>B</td><td>3</td></tr><tr><td>A</td><td>D</td><td>7</td></tr><tr><td>B</td><td>D</td><td>5</td></tr><tr><td>B</td><td>E</td><td>5</td></tr><tr><td>D</td><td>E</td><td>4</td></tr><tr><td>D</td><td>F</td><td>2</td></tr><tr><td>E</td><td>F</td><td>1</td></tr><tr><td>E</td><td>C</td><td>8</td></tr><tr><td>F</td><td>C</td><td>3</td></tr></tbody></table></div><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>The original diagram is undirected. All edge labels are reproduced below. Source = A.</p><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/old-dijkstra-2025.c24a5141a1.svg\" width=\"720\" height=\"440\" alt=\"dijkstra 2025 original question graph\" loading=\"lazy\" decoding=\"async\"></div><div class=\"table-wrap\"><table><thead><tr><th>From</th><th>To</th><th>Cost</th></tr></thead><tbody><tr><td>A</td><td>B</td><td>3</td></tr><tr><td>A</td><td>D</td><td>7</td></tr><tr><td>B</td><td>D</td><td>5</td></tr><tr><td>B</td><td>E</td><td>5</td></tr><tr><td>D</td><td>E</td><td>4</td></tr><tr><td>D</td><td>F</td><td>2</td></tr><tr><td>E</td><td>F</td><td>1</td></tr><tr><td>E</td><td>C</td><td>8</td></tr><tr><td>F</td><td>C</td><td>3</td></tr></tbody></table></div><h3>To find</h3><p>Shortest distance, complete route and predecessor for every node from A.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/e31cde29472d2c2d.svg\" alt=\"d(v)\\leftarrow\\min(d(v),d(u)+w(u,v))\" style=\"width:31.899ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Relaxation replaces a tentative route when going through u is cheaper. Dijkstra settles the unvisited node of least tentative distance. Nonnegative edge costs make the settled distance final. Equal-distance nodes may be settled in either order.</p><div class=\"step\"><h3>Step 1. Initialize and relax</h3><div class=\"table-wrap\"><table><thead><tr><th>Pass / settled node</th><th>Strict improvements</th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th></tr></thead><tbody><tr><td>0</td><td>Initial</td><td>0</td><td>∞</td><td>∞</td><td>∞</td><td>∞</td><td>∞</td></tr><tr><td>A</td><td>B←A: 0+3=3; D←A: 0+7=7</td><td>0</td><td>3</td><td>∞</td><td>7</td><td>∞</td><td>∞</td></tr><tr><td>B</td><td>E←B: 3+5=8</td><td>0</td><td>3</td><td>∞</td><td>7</td><td>8</td><td>∞</td></tr><tr><td>D</td><td>F←D: 7+2=9</td><td>0</td><td>3</td><td>∞</td><td>7</td><td>8</td><td>9</td></tr><tr><td>E</td><td>C←E: 8+8=16</td><td>0</td><td>3</td><td>16</td><td>7</td><td>8</td><td>9</td></tr><tr><td>F</td><td>C←F: 9+3=12</td><td>0</td><td>3</td><td>12</td><td>7</td><td>8</td><td>9</td></tr><tr><td>C</td><td>No change</td><td>0</td><td>3</td><td>12</td><td>7</td><td>8</td><td>9</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. Read predecessors backwards, then reverse</h3><div class=\"table-wrap\"><table><thead><tr><th>Destination</th><th>Distance</th><th>Previous</th><th>Route</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>A</td></tr><tr><td>B</td><td>3</td><td>A</td><td>A → B</td></tr><tr><td>C</td><td>12</td><td>F</td><td>A → D → F → C</td></tr><tr><td>D</td><td>7</td><td>A</td><td>A → D</td></tr><tr><td>E</td><td>8</td><td>B</td><td>A → B → E</td></tr><tr><td>F</td><td>9</td><td>D</td><td>A → D → F</td></tr></tbody></table></div></div><p>A tie between two equally short paths is valid; this table retains the first predecessor on equal distances.</p></div></section>"},{"id":"q6b","title":"Q6(b) · CRC","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(b). Given the data bit sequence 1010011110 and the CRC polynomial of x^3+x+1. Determine the transmitted message from the sender. Illustrate the process of checking the received message for any errors at the receiver side. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Data = 1010011110; generator bits = 1011; degree r = 3.</p><h3>To find</h3><p>CRC remainder, complete transmitted frame and receiver check.</p><h3>Formula and why</h3><p>Append r zeros, divide using XOR (modulo 2), and replace those zeros with the r-bit remainder. XOR has no borrowing or carrying. A valid received codeword has remainder zero; the receiver does not append new zeros.</p><div class=\"step\"><h3>Step 1. Append zeros</h3><p>1010011110 → 1010011110000</p></div><div class=\"step\"><h3>Step 2. Perform XOR division</h3><div class=\"table-wrap\"><table><thead><tr><th>Leading position</th><th>Before XOR</th><th>Aligned generator</th><th>After XOR</th></tr></thead><tbody><tr><td>1</td><td>1010011110000</td><td>1011000000000</td><td>0001011110000</td></tr><tr><td>4</td><td>0001011110000</td><td>0001011000000</td><td>0000000110000</td></tr><tr><td>8</td><td>0000000110000</td><td>0000000101100</td><td>0000000011100</td></tr><tr><td>9</td><td>0000000011100</td><td>0000000010110</td><td>0000000001010</td></tr><tr><td>10</td><td>0000000001010</td><td>0000000001011</td><td>0000000000001</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 3. Build the frame</h3><p>Remainder = <strong>001</strong>. Transmit <strong>1010011110001</strong>.</p></div><div class=\"step\"><h3>Step 4. Divide the received frame</h3><div class=\"table-wrap\"><table><thead><tr><th>Position</th><th>Before</th><th>Generator</th><th>After</th></tr></thead><tbody><tr><td>1</td><td>1010011110001</td><td>1011000000000</td><td>0001011110001</td></tr><tr><td>4</td><td>0001011110001</td><td>0001011000000</td><td>0000000110001</td></tr><tr><td>8</td><td>0000000110001</td><td>0000000101100</td><td>0000000011101</td></tr><tr><td>9</td><td>0000000011101</td><td>0000000010110</td><td>0000000001011</td></tr><tr><td>10</td><td>0000000001011</td><td>0000000001011</td><td>0000000000000</td></tr></tbody></table></div><p>Receiver remainder = 000. No error is detected; this is not a guarantee that every possible corruption is detectable.</p></div></div></section>"},{"id":"q7a","title":"Q7(a) · Guided versus unguided media","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(a). Compare guided and unguided transmission media in terms of their working principles, key characteristics, and common applications. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Guided media</strong> constrain signals to a physical path: twisted pair, coaxial cable and optical fiber. <strong>Unguided media</strong> carry electromagnetic waves through free space: radio, microwave and infrared. Wireless bandwidth and reach depend on frequency, power, antenna, obstacles and regulations; media names alone do not fix a speed.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-media.aff26cd0b5.svg\" width=\"820\" height=\"515\" alt=\"Transmission media: guided and unguided\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Transmission media classification.</figcaption></figure><table><thead><tr><th scope=\"col\">Medium</th><th scope=\"col\">Two key characteristics</th><th scope=\"col\">Limitations / use</th></tr></thead><tbody><tr><td>Twisted pair</td><td>Electrical signal; pairs twisted to reduce interference</td><td>Low-cost LAN access; distance/noise limits depend on category and design</td></tr><tr><td>Coaxial cable</td><td>Shielded central conductor; greater shielding than basic unshielded pair</td><td>Bulkier; cable broadband and legacy shared LANs</td></tr><tr><td>Optical fiber</td><td>Light in glass/plastic; high capacity with immunity to electromagnetic interference</td><td>Transceivers and careful splicing/bend control needed; backbone links</td></tr><tr><td>Radio waves</td><td>Wireless propagation; many bands support broad/non-line-of-sight coverage</td><td>Interference, shared spectrum and security configuration matter; Wi-Fi/mobile</td></tr><tr><td>Terrestrial microwave</td><td>Directional antennas; typically line of sight</td><td>Alignment and obstructions matter; point-to-point backhaul</td></tr><tr><td>Satellite microwave</td><td>Wide coverage through relay in space</td><td>Cost and latency depend strongly on orbit/system; remote connectivity</td></tr><tr><td>Infrared</td><td>Short-range light; usually blocked by walls</td><td>Limited coverage; short-range indoor/remote-control links</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A university can connect buildings with fiber, desktops with twisted pair and mobile students with managed Wi-Fi. Satellite access is an option where suitable terrestrial links are unavailable.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Guided = cable path; unguided = free-space waves.</p>\r\n<div class=\"answer\"><p>Transmission media are classified into guided media (twisted pair, coaxial cable, optical fiber) and unguided media (radio, microwave, infrared).</p><p>Optical fiber carries data as light in a core surrounded by cladding. It is a guided medium. Single-mode fiber supports one main propagation mode and is used for long/high-capacity links; multimode supports multiple modes and is often used over shorter distances.</p><table><thead><tr><th scope=\"col\">Advantages</th><th scope=\"col\">Disadvantages / design costs</th></tr></thead><tbody><tr><td>High data capacity and low attenuation over suitable links</td><td>Optical transceivers, connectors and splicing add cost/skill requirements</td></tr><tr><td>Immune to electromagnetic interference; no electrical crosstalk</td><td>Tight bends, dirty connectors and poor installation increase loss</td></tr><tr><td>Electrical isolation between buildings</td><td>Fiber is mechanically sensitive and requires appropriate protection</td></tr><tr><td>Harder to tap casually than an unprotected radio channel</td><td>It is not automatically confidential; encryption/access control remain necessary</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A campus backbone can use fiber between buildings to avoid electrical interference and achieve high capacity. Installers still need to respect bend radius and test connectors.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Fiber light carry karta hai; immunity means no EMI, not no security risk.</p><h3>Two guided media: advantages and disadvantages</h3><div class=\"table-wrap\"><table><thead><tr><th>Medium / working principle</th><th>Advantages</th><th>Disadvantages</th></tr></thead><tbody><tr><td>Twisted pair: voltage signals travel on two insulated copper conductors twisted together</td><td>Low purchase/installation cost; flexible and easy to terminate for local access</td><td>More susceptible to electromagnetic interference than fiber; distance and capacity are limited by cable category and signalling design</td></tr><tr><td>Optical fiber: light pulses travel through a core guided by its refractive-index structure</td><td>High capacity and long reach; immune to electromagnetic interference</td><td>Optical equipment and splicing can cost more; tight bends, damage and dirty connectors degrade the link</td></tr></tbody></table></div><p>These comparisons describe typical engineering tradeoffs, not a guarantee that every fiber installation is faster or more expensive than every copper installation.</p></div></section>"},{"id":"q7b","title":"Q7(b) · IPv4 /26 block","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(b). A block of addresses is granted to a small organization. One of the address is 210.16.36.56/26. Find the first address in the block, last address in the block and total number of addresses possible in the block. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>210.16.36.56/26</p><h3>To find</h3><p>First and last addresses and total block size.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/06561cae3cdafd6c.svg\" alt=\"N=2^{32-p}\" style=\"width:9.994ex;height:2.185ex\" loading=\"lazy\" decoding=\"async\"></div><p>p is the prefix length. The remaining host bits vary through every combination. The network address is the first address; setting all host bits to one gives the last address.</p><div class=\"step\"><h3>Step 1. Find host bits</h3><p>32 − 26 = 6. N = 64.</p></div><div class=\"step\"><h3>Step 2. Locate the aligned block</h3><p>Mask = 255.255.255.192. The first varying octet is octet 4; its block width is 64. The supplied value 56 lies in the interval 0–63. Keep earlier octets fixed. Set any later octets to 0 for the first address and 255 for the last address.</p></div><div class=\"step\"><h3>Step 3. Write the result</h3><p>First = <strong>210.16.36.0</strong>; last = <strong>210.16.36.63</strong>; total = <strong>64</strong> addresses. Usual usable host range: 210.16.36.1–210.16.36.62.</p></div></div></section>"},{"id":"q7c","title":"Q7(c) · FTP connections","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(c). Explain the process of file transfer using FTP protocol with a diagram. Compare communication over control connection and communication over data connection. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>File Transfer Protocol (FTP)</strong> transfers files between a client and server using TCP and separates commands from file data. This separation is its central design feature. Its control connection remains available across multiple operations, while data connections carry file bytes or directory listings.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-ftp.1b305fa997.svg\" width=\"820\" height=\"660\" alt=\"FTP: separate control and data connections\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Control connection on server port 21; active/passive data connection roles differ.</figcaption></figure><table><thead><tr><th scope=\"col\">Connection</th><th scope=\"col\">Function</th><th scope=\"col\">Lifetime / ports</th></tr></thead><tbody><tr><td>Control</td><td>Commands and replies: USER, PASS, CWD, TYPE, LIST, RETR, STOR, QUIT</td><td>Client connects to server TCP port 21; normally kept for the session</td></tr><tr><td>Data</td><td>File contents and directory listing data</td><td>Opened as needed; separate from command channel</td></tr></tbody></table><h2>How a transfer works</h2><ol><li>Client opens the control connection and exchanges server greeting, login commands and replies. Plain FTP sends credentials/data without encryption.</li><li>Client chooses transfer settings such as binary/image mode for arbitrary bytes, and requests the needed working directory/operation.</li><li>In <strong>active FTP</strong>, the client provides a listening endpoint and the server initiates the data connection, traditionally from server port 20.</li><li>In <strong>passive FTP</strong>, the server returns a listening endpoint and the client initiates the data connection to that chosen server port. Therefore “FTP data always uses server port 20” is wrong.</li><li>RETR downloads a file; STOR uploads a file; LIST returns a directory listing over the data connection. Control replies report progress/completion. The session can continue for another transfer.</li><li>QUIT ends the control session.</li></ol><p>FTP over TLS (FTPS) protects FTP connections. SFTP is a separate SSH-based file-transfer protocol, not “FTP using an SSH port”. These names should not be treated as interchangeable.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A passive client behind a firewall can initiate both its control connection and data connection. The file bytes travel on the negotiated data connection, while the command RETR stays on the control connection.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Control commands, data file; passive mein client dono connect karta.</p></div></section>"}]},{"id":"paper-2023-final","title":"2023-11-22 · Final 2023-24 / Re-exam 2022-23","unit":"Historical PYQ","scope":"Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.","sections":[{"id":"q1a","title":"Q1(a) · Network classification","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(a). Describe briefly the classification of computer networks. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>A <strong>computer network</strong> is a set of interconnected devices that exchange data and share resources using communication protocols. A link carries signals; a protocol defines message format, meaning and timing. Hosts run applications, switches forward local frames and routers connect IP networks.</p><table><thead><tr><th scope=\"col\">Type</th><th scope=\"col\">Meaning and scope</th><th scope=\"col\">Example</th></tr></thead><tbody><tr><td>PAN</td><td>Personal Area Network: a person’s nearby devices</td><td>Phone linked to earbuds</td></tr><tr><td>LAN</td><td>Local Area Network: a building or local campus network under local administration</td><td>Laboratory Ethernet/Wi-Fi</td></tr><tr><td>MAN</td><td>Metropolitan Area Network: interconnects sites across a town/city</td><td>City-wide institutional network</td></tr><tr><td>WAN</td><td>Wide Area Network: connects geographically separated networks over regional/global links</td><td>Branches in different cities</td></tr><tr><td>ARPANET</td><td>Historical packet-switched research network; a major predecessor of the Internet</td><td>Early interconnected research institutions; not a modern geographic size category</td></tr></tbody></table><p>Classification by geographical scope is descriptive: a fixed kilometre boundary or a guaranteed speed is not part of every definition. Networks can also be classified by wired/wireless medium or by client-server/peer-to-peer organization.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A student uses a PAN for earbuds, a LAN in the lab and a WAN when accessing a distant university service.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> PAN personal, LAN local, MAN city, WAN wide.</p></div></section>"},{"id":"q1b","title":"Q1(b) · ALOHA and vulnerable periods","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(b). Compare and contrast pure ALOHA and slotted ALOHA. Briefly explain vulnerable time and how it is calculated in each of them. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Pure ALOHA is a random-access protocol in which a station transmits whenever a frame is ready and retransmits after a random delay if the transmission is unsuccessful.</p><p><strong>Simple meaning.</strong> Frame ready → bhej do. Collision hua → random wait karke retry.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/pure-aloha.8aa7732ee2.svg\" width=\"820\" height=\"345\" alt=\"Pure ALOHA: arbitrary start times can overlap\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Pure ALOHA: transmit first, retry if necessary</figcaption></figure><h2>Understand it step by step</h2><ol><li>Several stations share the same channel. Pure ALOHA does not first check whether the channel is idle.</li><li>A station transmits immediately. In the basic collision-channel model, any overlapping frame makes the involved frames unsuccessful.</li><li>An acknowledgement indicates successful reception. If it is not received before timeout, the station treats the attempt as unsuccessful. An absent ACK alone cannot distinguish a collision from another loss.</li><li>The station waits a random backoff time and retries. If every station used the same fixed delay, they could collide again together.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Two remote sensors may both transmit a reading immediately after it becomes ready. A random retry delay reduces the chance that their next attempts overlap again.</p></aside><div class=\"answer\"><p>In Pure ALOHA, a station transmits a ready frame without carrier sensing. If a successful acknowledgement is not received, it waits for a random interval and retransmits. Overlapping transmissions cause collisions in the basic model. Its maximum normalized throughput is 1/(2e) ≈ 18.4%, so it is inefficient at high offered load.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Pure = kisi bhi time start; retry ka wait random.</p>\r\n<p><strong>Definition.</strong> The vulnerable period is the interval of start times of other frames that would cause a collision with a chosen frame.</p><p><strong>Simple meaning.</strong> Apne frame se ek frame-time pehle start hua frame bhi takra sakta hai, aur baad mein bhi.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/vulnerable.e2a01a5ab7.svg\" width=\"820\" height=\"360\" alt=\"Pure ALOHA: interfering starts from −T to +T\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Why Pure ALOHA has a 2T vulnerable period</figcaption></figure><h2>Understand it step by step</h2><ol><li>Let your frame start at time 0 and finish at T. All frames have the same transmission duration T.</li><li>Another frame starting between −T and 0 is still being transmitted when your frame begins.</li><li>Another frame starting between 0 and T begins before your frame ends.</li><li>Therefore interfering start times occupy an interval of length 2T. Exact boundary contact is treated as non-overlap in this idealized timing model.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>If a frame takes 2 ms, another frame starting 1 ms before yours overlaps its beginning; a frame starting 1 ms after yours overlaps its end. The vulnerable interval is 4 ms long.</p></aside><div class=\"answer\"><p>A frame lasting T can collide with an equal-length frame that began less than T earlier, or one that begins less than T later. The two intervals together have length T+T=2T.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Pure: before T + after T = 2T.</p>\r\n<p><strong>Definition.</strong> Slotted ALOHA is a random-access protocol that divides time into slots of one frame duration and permits transmissions only at the beginning of a slot.</p><p><strong>Simple meaning.</strong> Frame ready hai tab bhi next slot ki start-line ka wait karo.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/slotted-aloha.fbfbef9647.svg\" width=\"820\" height=\"390\" alt=\"Slotted ALOHA: one frame duration per slot\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Slotted ALOHA: starts only at slot boundaries</figcaption></figure><h2>Understand it step by step</h2><ol><li>All stations agree on slot boundaries; time synchronization is required.</li><li>A station with a frame waits for a slot boundary before starting. A slot can be idle, successful or a collision.</li><li>Exactly one station transmitting in a slot produces success in the ideal model. Two or more simultaneous attempts collide.</li><li>Frames cannot partially overlap adjacent slots under the assumptions. The vulnerable interval is T instead of 2T. Randomized retries are still needed.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>If the slot duration is 1 ms and a frame becomes ready at 2.4 ms, the next permitted start is 3 ms. Another station choosing the same slot can still collide.</p></aside><div class=\"answer\"><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">Pure</th><th scope=\"col\">Slotted</th></tr></thead><tbody><tr><td>Start time</td><td>Any time</td><td>Slot boundary only</td></tr><tr><td>Synchronization</td><td>No common slots required</td><td>Required</td></tr><tr><td>Vulnerable period</td><td>2T</td><td>T</td></tr><tr><td>Maximum S</td><td>1/(2e) ≈ 0.184</td><td>1/e ≈ 0.368</td></tr><tr><td>G at maximum</td><td>0.5</td><td>1</td></tr></tbody></table></div><p class=\"memory\"><strong>Yaad rakho:</strong> Slotted = aligned starts; collision risk half-window, not zero.</p></div></section>"},{"id":"q1c","title":"Q1(c) · Classful addressing","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(c). Explain the significance of IP addressing in computer networks. Illustrate the classfull addressing scheme in computer networks, with address range and default subnet mask of each class. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>An IPv4 address identifies an IP interface. The network prefix selects the destination network; remaining bits identify an address within it. Classful addressing is historical; modern routing uses explicit CIDR prefixes.</p><div class=\"table-wrap\"><table><thead><tr><th>Class</th><th>First octet</th><th>Default mask</th><th>Network / host split</th><th>Purpose</th></tr></thead><tbody><tr><td>A</td><td>1–126 (ordinary unicast)</td><td>255.0.0.0 (/8)</td><td>8 / 24 bits</td><td>Large historical unicast networks; 0 and 127 reserved</td></tr><tr><td>B</td><td>128–191</td><td>255.255.0.0 (/16)</td><td>16 / 16 bits</td><td>Medium historical unicast networks</td></tr><tr><td>C</td><td>192–223</td><td>255.255.255.0 (/24)</td><td>24 / 8 bits</td><td>Small historical unicast networks</td></tr><tr><td>D</td><td>224–239</td><td>No unicast default mask</td><td>Not network/host class split</td><td>Multicast</td></tr><tr><td>E</td><td>240–255</td><td>No unicast default mask</td><td>Not normal unicast allocation</td><td>Reserved/experimental; special addresses exist</td></tr></tbody></table></div><p>Example: 114.34.2.8 is class A with network 114.0.0.0 and host portion 34.2.8. Class does not override an explicitly supplied CIDR prefix.</p></div></section>"},{"id":"q1d","title":"Q1(d) · UDP applications","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(d). UDP would make a good candidate as a transport protocol if reliability is not of primary importance. Justify this statement with any 5 applications of UDP. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>User Datagram Protocol (UDP)</strong> provides connectionless, message-oriented process delivery. One send creates a datagram; message boundaries are retained. UDP has an <strong>8-byte header</strong>, carries ports and length, and offers checksum-based corruption detection. It does not itself guarantee delivery, ordering, duplicate suppression, retransmission, flow control or congestion control.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-udp.b14cba3c28.svg\" width=\"820\" height=\"289\" alt=\"UDP header: each row contains 32 bits\" loading=\"lazy\" decoding=\"async\"></div><figcaption>UDP fixed header: four 16-bit fields, eight bytes total.</figcaption></figure><table><thead><tr><th scope=\"col\">UDP field</th><th scope=\"col\">Width</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Source port</td><td>16 bits</td><td>Sending endpoint; a zero value can indicate no reply port when unused</td></tr><tr><td>Destination port</td><td>16 bits</td><td>Receiving application endpoint</td></tr><tr><td>Length</td><td>16 bits</td><td>UDP header plus UDP payload; minimum 8 bytes</td></tr><tr><td>Checksum</td><td>16 bits</td><td>Error detection over UDP and an IP pseudo-header; not retransmission</td></tr></tbody></table><h2>Operation and services</h2><ol><li>The application chooses the destination IP/port and supplies a message. UDP adds its header and passes the datagram to IP without a connection handshake.</li><li>The receiving UDP layer validates the length/checksum as applicable and uses the destination endpoint to deliver the datagram.</li><li>A corrupt or undeliverable datagram may be discarded; UDP does not recover it. Any reliability or rate-control policy must come from the application or a protocol above UDP.</li><li>UDP checksum zero can mean checksum omitted in IPv4. IPv6 ordinarily requires the UDP checksum; specialized exceptions are outside this syllabus.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A DNS query often uses UDP because a small request/reply can avoid a transport handshake. DNS also uses TCP, so “DNS always UDP” is incorrect.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> UDP datagram preserve; reliability automatic nahi.</p><h3>Five suitable application examples</h3><div class=\"table-wrap\"><table><thead><tr><th>Application</th><th>Why UDP can suit it</th></tr></thead><tbody><tr><td>DNS queries</td><td>Small request/reply; application retries if necessary. DNS also supports TCP.</td></tr><tr><td>DHCP</td><td>A host without an assigned address can use UDP broadcasts to obtain configuration.</td></tr><tr><td>Real-time audio/video using RTP</td><td>Late packets are often less useful than timely packets; application handles loss/jitter.</td></tr><tr><td>Online game state updates</td><td>A newer position can replace a stale one; application-specific reliability can protect critical events.</td></tr><tr><td>NTP</td><td>Small timestamp exchanges; a fresh later measurement can replace a lost exchange.</td></tr></tbody></table></div><p>These are examples of applications that can use UDP, not a claim that every implementation of each application always uses UDP. Applications must still manage congestion responsibly.</p></div></section>"},{"id":"q2a","title":"Q2(a) · SMTP phases","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(a). Explain the working of Simple Mail Transfer Protocol in sending email messages. Briefly explain the three phases of mail transfer. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Simple Mail Transfer Protocol (SMTP)</strong> transfers email from a sending client/server to a receiving mail server using a reliable transport, normally TCP. It is a push/store-and-forward transfer protocol. User agents compose/read mail; mail-transfer agents relay it, consulting DNS MX records to find recipient-domain mail servers.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-smtp.c6f99877c4.svg\" width=\"820\" height=\"902\" alt=\"SMTP: envelope, message and completion\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Submission/relay use SMTP; reading an inbox uses a separate access protocol.</figcaption></figure><table><thead><tr><th scope=\"col\">Phase</th><th scope=\"col\">Typical exchange</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Connection and greeting</td><td>Server 220; client EHLO (HELO for basic SMTP); server 250 capabilities</td><td>Identify peers and learn supported extensions</td></tr><tr><td>Envelope transfer</td><td>MAIL FROM:&lt;sender&gt;; RCPT TO:&lt;recipient&gt;; 250 replies</td><td>Declare return path and one or more delivery recipients</td></tr><tr><td>Message transfer</td><td>DATA; server 354; headers + blank line + body; single dot line; server 250</td><td>Transmit the message after server permission; completion reply accepts responsibility</td></tr><tr><td>Termination</td><td>QUIT; server 221</td><td>Close the SMTP session cleanly</td></tr></tbody></table><h2>Message flow and important details</h2><ol><li>The sender’s user agent submits mail to its configured submission service. Server-to-server SMTP relay commonly uses TCP port 25; message submission commonly uses 587, often with authentication and TLS policy.</li><li>The sending server resolves the recipient domain’s MX records, connects to an appropriate mail server and carries out the SMTP exchange.</li><li>MAIL FROM and RCPT TO are the <strong>envelope</strong>; visible From/To headers inside DATA are message content and can differ. Multiple RCPT TO commands can name several recipients.</li><li>A line containing only a dot ends DATA. A content line beginning with a dot is dot-stuffed for transparency and unstuffed by the receiver.</li><li>A temporary 4xx failure can lead the sending server to queue and retry; a permanent 5xx failure normally rejects that operation. One successful handoff is not proof that a human read the message.</li><li>The recipient reads stored mail using an access protocol such as IMAP/POP3 or webmail. SMTP is not the mailbox-retrieval protocol.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A message addressed to two recipients can send two RCPT TO commands before one DATA body. The SMTP envelope controls delivery even if the visible header lists a mailing-list name.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> SMTP send/relay; inbox read IMAP/POP/webmail.</p><h3>The three phases requested in the paper</h3><div class=\"table-wrap\"><table><thead><tr><th>Phase</th><th>Commands / replies</th><th>Meaning</th></tr></thead><tbody><tr><td>1. Connection establishment</td><td>TCP connection; 220 greeting; EHLO/HELO; 250 reply</td><td>Open the connection and identify the SMTP peers</td></tr><tr><td>2. Mail transfer</td><td>MAIL FROM, RCPT TO, DATA; 354; message; single dot; 250</td><td>Transfer the envelope and then the message content</td></tr><tr><td>3. Connection termination</td><td>QUIT; 221; close TCP</td><td>Finish the SMTP session</td></tr></tbody></table></div><p>Envelope transfer and message-body transfer are substeps of the single mail-transfer phase. Thus the more detailed table above still fits the standard three-phase description.</p></div></section>"},{"id":"q2b","title":"Q2(b) · OSI layers","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(b). Draw and explain the OSI network model. Briefly describe the functionalities of each layer. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>The <strong>Open Systems Interconnection (OSI)</strong> model separates network functions into seven layers. A layer offers services upward and uses services below. Peer layers communicate logically through protocol rules; actual data moves down the sender’s stack, across links and up the receiver’s stack.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-models.5bff0518c8.svg\" width=\"820\" height=\"670\" alt=\"OSI layers mapped to the four-layer TCP/IP model\" loading=\"lazy\" decoding=\"async\"></div><figcaption>OSI seven-layer model mapped to the four-layer TCP/IP model.</figcaption></figure><table><thead><tr><th scope=\"col\">Layer</th><th scope=\"col\">Task</th><th scope=\"col\">Example</th></tr></thead><tbody><tr><td>7 Application</td><td>Services used by network applications</td><td>HTTP, DNS, FTP, SMTP</td></tr><tr><td>6 Presentation</td><td>Representation, encoding and application data transformations</td><td>Character encoding, serialization; encryption as a conceptual function</td></tr><tr><td>5 Session</td><td>Manage dialogue and synchronization/checkpoints</td><td>Session establishment and resumption concepts</td></tr><tr><td>4 Transport</td><td>Process delivery; reliability/flow control where supplied</td><td>TCP, UDP, SCTP; ports</td></tr><tr><td>3 Network</td><td>Logical addressing and routing across networks</td><td>IP; routers</td></tr><tr><td>2 Data link</td><td>Framing, local link addressing, medium access and error detection</td><td>Ethernet/Wi-Fi; MAC addresses</td></tr><tr><td>1 Physical</td><td>Transmit signal symbols/bits through a medium</td><td>Electrical, optical or radio signals</td></tr></tbody></table><h2>Encapsulation and delivery</h2><ol><li>Application creates data. Transport adds a transport header: TCP segment or UDP datagram.</li><li>IP adds its header to form a packet. The link adds a header and usually a trailer to form a frame.</li><li>The physical layer carries signals. The destination reverses the process and sends the data to the receiving process.</li><li>At a router, local framing changes for the next link. A transit router primarily forwards at Layer 3; it need not run the end application.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A browser request becomes TCP data, an IP packet and then an Ethernet frame. An IP address selects the host/interface, while a TCP port selects the service.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Application se physical tak wrap; receiver par unwrap.</p><h3>Two functions of every OSI layer</h3><div class=\"table-wrap\"><table><thead><tr><th>Layer</th><th>Function 1</th><th>Function 2</th></tr></thead><tbody><tr><td>Application</td><td>Provide application-level network services, such as file transfer</td><td>Define application exchanges for services such as email or name resolution</td></tr><tr><td>Presentation</td><td>Translate/serialize data into an agreed representation</td><td>Compress data or encrypt/decrypt it where these transformations are required</td></tr><tr><td>Session</td><td>Establish, manage and end a dialogue/session</td><td>Provide synchronization/checkpoints for resuming a dialogue</td></tr><tr><td>Transport</td><td>Identify sending/receiving processes using ports and segment/reassemble data</td><td>Provide end-to-end reliability and flow control when the selected protocol supports them</td></tr><tr><td>Network</td><td>Provide logical addressing across networks</td><td>Select routes and forward packets towards the destination</td></tr><tr><td>Data link</td><td>Frame the data and identify local interfaces</td><td>Control shared-medium access and detect link-frame errors</td></tr><tr><td>Physical</td><td>Represent bits as electrical, optical or radio signal symbols</td><td>Specify physical-interface/signalling properties such as timing, connectors and transmission rate</td></tr></tbody></table></div><p>These are reference-model responsibilities; an actual protocol stack may combine them. UDP, for example, does not supply TCP-style reliable delivery merely because both are transport protocols.</p></div></section>"},{"id":"q3a","title":"Q3(a) · Network models","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(a). Distinguish between peer-to-peer communication and client-server communication. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>In a <strong>client-server</strong> design, users’ clients contact designated service processes. In <strong>peer-to-peer (P2P)</strong>, participating hosts can supply and consume resources. These are application organizations, not different physical cable types.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-client-peer.a7c6f1b535.svg\" width=\"820\" height=\"430\" alt=\"Client-server and peer-to-peer organization\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Central service versus cooperating peers.</figcaption></figure><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">Client-server</th><th scope=\"col\">Peer-to-peer</th></tr></thead><tbody><tr><td>Roles</td><td>Clients request; designated servers provide services</td><td>Peers can both request and provide resources</td></tr><tr><td>Control</td><td>Central policies, accounts and backups are easier to coordinate</td><td>Control and copies distributed among peers</td></tr><tr><td>Performance</td><td>Predictable with adequate server capacity; server may bottleneck</td><td>Resources grow with peers, but peer capacity/availability vary</td></tr><tr><td>Scalability</td><td>Scale servers, replicas, caching and load distribution</td><td>More peers can contribute capacity; coordination becomes harder</td></tr><tr><td>Reliability</td><td>One unreplicated server is a failure point; replication helps</td><td>Loss of one peer need not stop system if useful replicas remain</td></tr><tr><td>Security</td><td>Central access control and monitoring</td><td>Trust and consistent access policy are harder</td></tr><tr><td>Best fit</td><td>Managed collaboration, databases, login services</td><td>Distributed content sharing among participating peers</td></tr></tbody></table><h2>Apply to the platform</h2><p>Central servers can authenticate users, maintain the authoritative shared document and control versions. The organization must provision capacity, replicate data and avoid a single server failure. P2P can exchange large files or local edits among peers and distribute load, but needs discovery, conflict resolution, trust and availability strategies. A hybrid can keep account control centralized while distributing selected content.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>When three teammates edit one document, a replicated central service can order updates. A peer file swarm can speed distribution only while peers with the needed pieces are available.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Server mein service central; peers dono roles karte hain.</p></div></section>"},{"id":"q3b","title":"Q3(b) · CSMA/CD","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(b). Describe the working of CSMA/CD with the help of flow diagram. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> CSMA with Collision Detection monitors the medium during transmission, aborts a detected collision and retries after a randomized backoff.</p><p><strong>Simple meaning.</strong> CD = takkar detect hui toh transmission rok do.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/collision-roundtrip.42358ec7bf.svg\" width=\"820\" height=\"410\" alt=\"CSMA/CD: sender must still be sending after a round trip\" loading=\"lazy\" decoding=\"async\"></div><figcaption>CSMA/CD: detect a collision while transmitting</figcaption></figure><h2>Understand it step by step</h2><ol><li>Sense the channel. In traditional shared half-duplex Ethernet, begin transmission when permitted by the access rule.</li><li>Continue monitoring while transmitting. If a collision is detected, send the collision/jam indication and abort the current frame.</li><li>Choose a random delay using binary exponential backoff; then attempt again subject to the access rules.</li><li>The sender must still be transmitting when a worst-case collision indication returns. Hence the ideal timing requirement is Tframe ≥ 2Tp.</li><li>Modern switched full-duplex Ethernet links do not use collision-based CSMA/CD access. Keep the historical/shared-medium assumptions explicit.</li></ol><div class=\"math-display\"><img src=\"math/4f522413155daf19.svg\" alt=\"T_{\\mathrm{frame}}\\geq 2T_p\" style=\"width:11.931ex;height:2.181ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/eae5a57f0575ef7d.svg\" alt=\"L_{\\min}\\geq 2RT_p\" style=\"width:12.575ex;height:2.195ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>On a shared half-duplex Ethernet segment, a station that detects a collision stops sending the remaining frame bits, saving time compared with completing a corrupted long frame.</p></aside><div class=\"answer\"><p>CSMA/CD senses before transmission and detects collisions during transmission. A collision causes abort/jam and a random backoff before retry. To detect the most distant collision before the frame finishes, the transmission duration must be at least the worst-case round-trip propagation delay. Thus Lmin/R ≥ 2Tp in the idealized model.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Detect karna hai toh sender tab tak bhej raha hona chahiye.</p><h3>CSMA/CD flow diagram</h3><pre>Frame ready → sense channel\r\n                 │\r\n          Busy? yes → keep sensing (1-persistent case)\r\n                 no\r\n                 ↓\r\n          Transmit and monitor\r\n                 │\r\n          Collision? no → frame finished? → success\r\n                 yes\r\n                 ↓\r\n          Jam indication → abort frame → increment attempt count\r\n                 │\r\n          Retry limit reached? yes → report failure\r\n                 no\r\n                 ↓\r\n          Random binary-exponential backoff → sense again</pre><p>For Ethernet, the backoff range grows with collisions, capped after the specified stage; transmission is abandoned at the retry limit. Carrier sensing must still be obeyed after the random delay.</p></div></section>"},{"id":"q3c","title":"Q3(c) · OSPF routing","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(c). Explain briefly OSPF routing algorithm. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Open Shortest Path First (OSPF) is an interior link-state routing protocol that selects routes using shortest-path calculations and additive link costs.</p><p><strong>Simple meaning.</strong> OSPF = link-state map + Dijkstra + summed costs.</p><h2>Understand it step by step</h2><ol><li>Routers discover and maintain neighbour relationships using Hello packets and exchange link-state information.</li><li>Routers calculate shortest paths from their own position in the topology. A path cost is the sum of its outgoing-link costs, not necessarily the fewest hops.</li><li>The network can be divided into areas. In normal OSPF hierarchy, Area 0 is the backbone used to interconnect other areas via area border routers.</li><li>OSPFv2 is the IPv4 protocol in the supplied paper; it is carried directly in IP protocol number 89, not TCP/UDP port 89.</li><li>A common vendor default derives interface cost from reference bandwidth/interface bandwidth, but actual configured costs and reference bandwidth matter. Use the given costs in an exam graph.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Route A→B→D costs 10+10=20 while A→C→D costs 5+8=13. OSPF’s cost comparison prefers the latter even though both have two links.</p></aside><div class=\"answer\"><p>OSPF exchanges and maintains link-state information, builds a topology database and runs Dijkstra’s shortest-path computation rooted at the local router. It chooses a path with the lowest sum of link costs and installs the corresponding next hop. Equal-cost paths may be supported.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> OSPF cost add karo; sirf hops nahi.</p></div></section>"},{"id":"q4a","title":"Q4(a) · Traffic shaping buckets","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(a). Describe in detail the working of token bucket and leaky bucket in traffic shaping. Illustrate with diagrams the implementation of each. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>In the textbook <strong>leaky-bucket queue/shaper</strong> model, arriving packets enter a finite buffer. The output sends at a configured rate whenever data is queued. When the queue empties, it cannot send nonexistent packets; when the buffer is full, excess arrivals are dropped in this finite-buffer model.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-leaky.77bdbcf957.svg\" width=\"820\" height=\"515\" alt=\"Leaky-bucket data queue\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Finite data buffer smooths a burst into a bounded departure rate.</figcaption></figure><ol><li>Choose buffer capacity B and output service rate r in consistent units.</li><li>Admit arrivals that fit. Drop/mark overflow according to the stated implementation; this queue example drops the excess.</li><li>Drain at rate r while the queue is nonempty. Idle time does not accumulate permission for a later faster burst.</li><li>The result is smoothed output. Larger buffers accommodate larger bursts but can increase waiting delay.</li></ol><table><thead><tr><th scope=\"col\">Advantage</th><th scope=\"col\">Limitation</th></tr></thead><tbody><tr><td>Simple bound on output rate</td><td>Bursts may overflow or suffer delay</td></tr><tr><td>Reduces short-term output variation</td><td>Unused idle service cannot be saved</td></tr><tr><td>Useful for predictable traffic shaping</td><td>No end-to-end delay/loss guarantee by itself</td></tr></tbody></table><p>The term “leaky bucket” can also describe a conformance meter in standards. This course’s diagrams and numerical questions explicitly use the finite data-queue model, so its state is queued data rather than tokens.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A queue of 20 packets drained at 5 packets/s needs 4 seconds to empty without new arrivals. If it is already full, an instantaneous extra burst cannot all be stored.</p></aside><p>No algorithm is universally better. The leaky data-queue model is useful for a smooth output profile; token bucket is preferable when controlled bursts should be allowed. State the application’s delay, burst and rate needs before recommending one.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Leaky bucket stores data; idle service save nahi hota.</p>\r\n<div class=\"answer\"><p>A <strong>token bucket</strong> generates tokens at rate r up to capacity B. Sending one unit of data consumes the corresponding tokens. Tokens accumulate during idle periods only until the bucket is full. Data can therefore burst when saved tokens exist, subject to the physical link rate.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-token.c3ff1dbf76.svg\" width=\"820\" height=\"660\" alt=\"Token bucket: permission is separate from data\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Tokens store permission; the separate data queue stores packets.</figcaption></figure><ol><li>Initialize a stated token count, often B for a full bucket. Add rΔt tokens over elapsed time, capped at B.</li><li>A packet of length L needs L byte-tokens (or one packet-token in a fixed-packet model). If enough tokens exist, deduct them and permit transmission.</li><li>If tokens are insufficient, a <strong>shaper</strong> waits/buffers until enough are available. A <strong>policer</strong> marks or drops nonconforming traffic according to policy. Token shortage does not universally mean drop.</li><li>Over interval t, a full token bucket bounds admitted data by B+rt. Actual output is also limited by link capacity and packet scheduling.</li><li>Unlike the queue-style leaky bucket, token storage allows limited bursts after idle time. It bounds average rate and burst size separately.</li></ol><div class=\"math-display\"><img src=\"math/750b0148fd39654a.svg\" alt=\"\\mathrm{admitted\\ data}(t)\\le B+rt\" style=\"width:25.805ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><table><thead><tr><th scope=\"col\">Limitation</th><th scope=\"col\">Reason</th></tr></thead><tbody><tr><td>Bursts can still congest downstream queues</td><td>Local conformance does not ensure every later link has capacity</td></tr><tr><td>Parameters must match traffic and link requirements</td><td>A small B delays/drops legitimate packets; a large B permits disruptive bursts</td></tr><tr><td>No complete QoS guarantee alone</td><td>Admission, scheduling and end-to-end capacity may still be needed</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>With B=10 KB and r=2 KB/s, an idle sender can immediately use up to 10 KB of saved tokens; additional sustained traffic must respect the refill rate, and physical serialization still takes time.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Token permission store hota hai; actual packet alag queue mein.</p>\r\n<div class=\"answer\"><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">Leaky data queue</th><th scope=\"col\">Token bucket</th></tr></thead><tbody><tr><td>Stored state</td><td>Queued data</td><td>Tokens representing permission</td></tr><tr><td>Idle period</td><td>Empty queue; unused service lost</td><td>Tokens accumulate up to B</td></tr><tr><td>Output burst</td><td>Smoothed by configured service rate</td><td>Allowed if enough tokens and physical capacity exist</td></tr><tr><td>Overflow/shortage</td><td>Finite queue can overflow</td><td>Shaper waits; policer may mark/drop</td></tr><tr><td>Main parameters</td><td>Queue capacity and drain rate</td><td>Token capacity and generation rate</td></tr><tr><td>Useful when</td><td>A smoother output profile is required</td><td>Average rate plus burst allowance is required</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A steady-rate interface may use leaky shaping. A bursty file application can use token shaping to send short bursts while limiting its sustained rate.</p></aside></div></div></section>"},{"id":"q4b","title":"Q4(b) · Selective Repeat scenarios","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(b). Illustrate the working of selective repeat ARQ with the help of frame transmission scenarios. Give any one advantage and disadvantage. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Selective Repeat (SR) ARQ</strong> accepts and buffers valid out-of-order frames inside the receiver window, acknowledges them individually and retransmits only missing/timed-out frames. In this answer ACK i means “frame i received”, unlike the next-expected cumulative ACK convention used for GBN.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-sr.5ae2b52b45.svg\" width=\"820\" height=\"674\" alt=\"SR W=4: individual ACKs and buffering\" loading=\"lazy\" decoding=\"async\"></div><figcaption>SR buffers 3 while waiting for 2; only 2 is retransmitted.</figcaption></figure><ol><li>For m=3 there are eight sequence numbers, 0…7. With equal sender and receiver windows, maximum W=2<sup>3−1</sup>=4. Both windows begin at 0 and span 0…3.</li><li>Sender sends 0,1,2,3. Receiver accepts 0 and 1, delivers them and advances its left edge to 2. Frame 2 is lost; frame 3 is stored and ACK 3 is sent.</li><li>Although 3 is acknowledged, the sender’s base cannot jump over missing 2. A timer for 2 expires; only frame 2 is retransmitted.</li><li>When 2 arrives, the receiver can deliver 2 and the buffered 3 in order, moving its window forward. Individual ACKs let the sender release the relevant stored copies.</li><li>Why half the space: with an incorrectly chosen W=5 in an eight-number space, receiving old 0…4 moves the receive window to {5,6,7,0,1}. If ACKs are lost, retransmitted old 0 or 1 could fall in the new window and be mistaken for new data. W=4 prevents these two consecutive windows from overlapping.</li><li>A repeated old frame can be acknowledged again without delivering it twice. SR needs more receiver storage and per-frame tracking than GBN.</li></ol><div class=\"math-display\"><img src=\"math/454034d348f17623.svg\" alt=\"W_s=W_r\\le 2^{m-1}\" style=\"width:16.921ex;height:2.357ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>A noisy long-delay link benefits from retransmitting only the missing frame, but the receiver must retain later frames and track which sequence numbers belong to its current window.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> SR selective resend; half sequence space keeps old and new separate.</p><h3>Transmission cases and evaluation</h3><div class=\"table-wrap\"><table><thead><tr><th>Case</th><th>Receiver action</th><th>Sender action</th></tr></thead><tbody><tr><td>Normal transmission</td><td>Accept valid frames in its window; deliver the contiguous in-order sequence; ACK each frame</td><td>Send within the window and advance its base when the earliest outstanding frames are acknowledged</td></tr><tr><td>Lost data frame</td><td>Buffer later valid frames and ACK them, leaving the missing gap</td><td>On the missing frame's timeout, retransmit only that frame</td></tr><tr><td>Lost ACK</td><td>If an already accepted frame is repeated, acknowledge it again without delivering it twice</td><td>The individual timer may expire and repeat that one frame; the repeated ACK ends recovery</td></tr></tbody></table></div><p><strong>Advantage:</strong> selective retransmission saves link capacity after isolated loss. <strong>Disadvantage:</strong> buffering out-of-order frames and tracking individual timers/ACKs make the receiver and sender more complex.</p></div></section>"},{"id":"q5a","title":"Q5(a) · VLSM two groups","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(a). An ISP is granted a block of addresses starting with 191.10.0.0/16 (65,536 addresses). The ISP needs to distribute these addresses to two groups of customers as follows: a. The first group has 128 customers; each needs 256 addresses. b. The second group has 64 customers; each needs 128 addresses. Design the subblocks and find out how many addresses are still available after these allocations. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>191.10.0.0/16; Group 1: 128 customers × 256 addresses; Group 2: 64 customers × 128 addresses</p><h3>To find</h3><p>Each customer prefix, every group range, first/last customer blocks, and unallocated addresses.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/2cb46cf5eb7fdc4d.svg\" alt=\"p=32-\\log_2(\\text{addresses per customer}),\\quad A_{group}=n\\times A_{customer}\" style=\"width:62.003ex;height:2.364ex\" loading=\"lazy\" decoding=\"async\"></div><p>These are requested total addresses, not usable-host counts. Allocate customer blocks on their prefix boundary. A group with a non-power-of-two customer count need not be forced into one larger, wasteful CIDR aggregate.</p><div class=\"step\"><h3>Step 1. Compute sizes and allocate consecutive aligned customer blocks</h3><div class=\"table-wrap\"><table><thead><tr><th>Group</th><th>Customers</th><th>Addresses each</th><th>Customer prefix</th><th>Used</th><th>Group range</th></tr></thead><tbody><tr><td>1</td><td>128</td><td>256</td><td>/24</td><td>32768</td><td>191.10.0.0–191.10.127.255</td></tr><tr><td>2</td><td>64</td><td>128</td><td>/25</td><td>8192</td><td>191.10.128.0–191.10.159.255</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. State first and last customer ranges</h3><div class=\"table-wrap\"><table><thead><tr><th>Group</th><th>First customer</th><th>Last customer</th></tr></thead><tbody><tr><td>1</td><td>191.10.0.0–191.10.0.255</td><td>191.10.127.0–191.10.127.255</td></tr><tr><td>2</td><td>191.10.128.0–191.10.128.127</td><td>191.10.159.128–191.10.159.255</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 3. Count the unused addresses</h3><p>Allocated = 32768 + 8192 = 40960. Unused = 65536 − 40960 = <strong>24576</strong>.</p><p>Unused range: 191.10.160.0–191.10.255.255.</p></div></div></section>"},{"id":"q5b","title":"Q5(b) · FTP","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(b). With the help of a diagram, explain briefly the working of File Transfer Protocol. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>File Transfer Protocol (FTP)</strong> transfers files between a client and server using TCP and separates commands from file data. This separation is its central design feature. Its control connection remains available across multiple operations, while data connections carry file bytes or directory listings.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-ftp.1b305fa997.svg\" width=\"820\" height=\"660\" alt=\"FTP: separate control and data connections\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Control connection on server port 21; active/passive data connection roles differ.</figcaption></figure><table><thead><tr><th scope=\"col\">Connection</th><th scope=\"col\">Function</th><th scope=\"col\">Lifetime / ports</th></tr></thead><tbody><tr><td>Control</td><td>Commands and replies: USER, PASS, CWD, TYPE, LIST, RETR, STOR, QUIT</td><td>Client connects to server TCP port 21; normally kept for the session</td></tr><tr><td>Data</td><td>File contents and directory listing data</td><td>Opened as needed; separate from command channel</td></tr></tbody></table><h2>How a transfer works</h2><ol><li>Client opens the control connection and exchanges server greeting, login commands and replies. Plain FTP sends credentials/data without encryption.</li><li>Client chooses transfer settings such as binary/image mode for arbitrary bytes, and requests the needed working directory/operation.</li><li>In <strong>active FTP</strong>, the client provides a listening endpoint and the server initiates the data connection, traditionally from server port 20.</li><li>In <strong>passive FTP</strong>, the server returns a listening endpoint and the client initiates the data connection to that chosen server port. Therefore “FTP data always uses server port 20” is wrong.</li><li>RETR downloads a file; STOR uploads a file; LIST returns a directory listing over the data connection. Control replies report progress/completion. The session can continue for another transfer.</li><li>QUIT ends the control session.</li></ol><p>FTP over TLS (FTPS) protects FTP connections. SFTP is a separate SSH-based file-transfer protocol, not “FTP using an SSH port”. These names should not be treated as interchangeable.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A passive client behind a firewall can initiate both its control connection and data connection. The file bytes travel on the negotiated data connection, while the command RETR stays on the control connection.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Control commands, data file; passive mein client dono connect karta.</p></div></section>"},{"id":"q5c","title":"Q5(c) · ARP","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(c). Explain briefly the significance of ARP protocol in LAN. Illustrate its working with diagram. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Address Resolution Protocol (ARP) resolves a known IPv4 address to a link-layer hardware address on the local network.</p><p><strong>Simple meaning.</strong> IP pata hai; local delivery ke liye MAC chahiye.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/arp.c8af39ddb3.svg\" width=\"820\" height=\"540\" alt=\"ARP resolves the selected local next hop\" loading=\"lazy\" decoding=\"async\"></div><figcaption>ARP: find the local next-hop MAC address</figcaption></figure><h2>Understand it step by step</h2><ol><li>First determine whether the destination is on the local subnet. If local, the next hop is the destination itself. If remote, the next hop is a router such as the default gateway.</li><li>Check the ARP cache. If the next-hop mapping is absent, broadcast an ARP request on the local link.</li><li>The owner of the requested IPv4 address normally replies with its hardware address. The sender caches the mapping and constructs its data frame.</li><li>Routers do not normally forward a host’s ARP broadcast across networks. ARP resolves the next hop, not the MAC of a remote Internet server.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Host 192.168.1.10/24 sending to 192.168.1.20 asks for .20’s MAC. Sending to 203.0.113.7 through gateway 192.168.1.1 asks for the gateway’s MAC instead.</p></aside><div class=\"answer\"><p>ARP maps a known local next-hop IPv4 address to a hardware address. A sender broadcasts a request when the mapping is missing; the address owner replies, and the mapping is cached. For a remote IP destination, the sender resolves its gateway’s local MAC address, then forwards the packet toward that gateway.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Remote packet ka next-hop MAC gateway ka hota hai.</p></div></section>"},{"id":"q6a","title":"Q6(a) · CRC","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(a). Consider data generated at sender 110101 and CRC polynomial x^3+x+1. Calculate i) CRC code generated at the sender side ii) Final message transmitted from sender to receiver iii) Show message is received without error at receiver. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Data = 110101; generator bits = 1011; degree r = 3.</p><h3>To find</h3><p>CRC remainder, complete transmitted frame and receiver check.</p><h3>Formula and why</h3><p>Append r zeros, divide using XOR (modulo 2), and replace those zeros with the r-bit remainder. XOR has no borrowing or carrying. A valid received codeword has remainder zero; the receiver does not append new zeros.</p><div class=\"step\"><h3>Step 1. Append zeros</h3><p>110101 → 110101000</p></div><div class=\"step\"><h3>Step 2. Perform XOR division</h3><div class=\"table-wrap\"><table><thead><tr><th>Leading position</th><th>Before XOR</th><th>Aligned generator</th><th>After XOR</th></tr></thead><tbody><tr><td>1</td><td>110101000</td><td>101100000</td><td>011001000</td></tr><tr><td>2</td><td>011001000</td><td>010110000</td><td>001111000</td></tr><tr><td>3</td><td>001111000</td><td>001011000</td><td>000100000</td></tr><tr><td>4</td><td>000100000</td><td>000101100</td><td>000001100</td></tr><tr><td>6</td><td>000001100</td><td>000001011</td><td>000000111</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 3. Build the frame</h3><p>Remainder = <strong>111</strong>. Transmit <strong>110101111</strong>.</p></div><div class=\"step\"><h3>Step 4. Divide the received frame</h3><div class=\"table-wrap\"><table><thead><tr><th>Position</th><th>Before</th><th>Generator</th><th>After</th></tr></thead><tbody><tr><td>1</td><td>110101111</td><td>101100000</td><td>011001111</td></tr><tr><td>2</td><td>011001111</td><td>010110000</td><td>001111111</td></tr><tr><td>3</td><td>001111111</td><td>001011000</td><td>000100111</td></tr><tr><td>4</td><td>000100111</td><td>000101100</td><td>000001011</td></tr><tr><td>6</td><td>000001011</td><td>000001011</td><td>000000000</td></tr></tbody></table></div><p>Receiver remainder = 000. No error is detected; this is not a guarantee that every possible corruption is detectable.</p></div></div></section>"},{"id":"q6b","title":"Q6(b) · IPv4 /26 block","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(b). A block of address is granted to a small organization and one of the address is 211.15.35.40/26. Determine the first address and last address in the block. Determine the total number of address in the block. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>211.15.35.40/26</p><h3>To find</h3><p>First and last addresses and total block size.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/06561cae3cdafd6c.svg\" alt=\"N=2^{32-p}\" style=\"width:9.994ex;height:2.185ex\" loading=\"lazy\" decoding=\"async\"></div><p>p is the prefix length. The remaining host bits vary through every combination. The network address is the first address; setting all host bits to one gives the last address.</p><div class=\"step\"><h3>Step 1. Find host bits</h3><p>32 − 26 = 6. N = 64.</p></div><div class=\"step\"><h3>Step 2. Locate the aligned block</h3><p>Mask = 255.255.255.192. The first varying octet is octet 4; its block width is 64. The supplied value 40 lies in the interval 0–63. Keep earlier octets fixed. Set any later octets to 0 for the first address and 255 for the last address.</p></div><div class=\"step\"><h3>Step 3. Write the result</h3><p>First = <strong>211.15.35.0</strong>; last = <strong>211.15.35.63</strong>; total = <strong>64</strong> addresses. Usual usable host range: 211.15.35.1–211.15.35.62.</p></div></div></section>"},{"id":"q6c","title":"Q6(c) · DNS hierarchy","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(c). Explain briefly the hierarchy of name servers used in DNS. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>The <strong>Domain Name System (DNS)</strong> is a distributed hierarchical naming system. Its namespace is a tree with the root at the top. A complete name is the ordered path of labels from a node back to the root. An absolute name may be written with a trailing dot, for example www.example.com.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-dns.f5345fe9fb.svg\" width=\"820\" height=\"520\" alt=\"DNS namespace: full label paths are unique\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Root, top-level domains, delegated domain and host labels.</figcaption></figure><table><thead><tr><th scope=\"col\">Level</th><th scope=\"col\">Example</th><th scope=\"col\">Meaning</th></tr></thead><tbody><tr><td>Root</td><td>.</td><td>Top of the namespace</td></tr><tr><td>Top-level domain (TLD)</td><td>com, org, in</td><td>A child zone below the root</td></tr><tr><td>Registered/delegated domain</td><td>example.com</td><td>Name under a parent such as com</td></tr><tr><td>Subdomain/host label</td><td>www.example.com</td><td>A label below example.com; a name may own different record types</td></tr></tbody></table><h2>Why names remain unique</h2><ol><li>A parent manages the labels immediately beneath it and does not assign the same child label to two different nodes in that parent’s namespace.</li><li>The full sequence of labels identifies the node. The local label www can appear below many domains without conflict: www.example.com and www.example.org are different complete names.</li><li>Administration is delegated: the parent publishes information identifying authoritative servers for a child zone. A domain is a namespace subtree; a zone is the portion administered together, excluding subtrees delegated onward.</li><li>Multiple names may resolve to one IP address, and one name can return several addresses. Uniqueness of names does not imply a one-name/one-IP rule.</li></ol><h2>Resolution</h2><ol><li>A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.</li><li>Otherwise the resolver can query a root server, receive a referral to the relevant TLD, then receive a referral to the authoritative server for the domain.</li><li>The authoritative server supplies the requested record or a relevant negative response. The recursive resolver returns the result and may cache it according to TTL.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>The labels “mail” under two organizations do not collide because mail.example.com and mail.example.org have different ancestors. DNS delegation distributes administration while preserving a unique full path.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Full path unique; www label akela unique nahi.</p><h3>Worked resolution example: www.xyz.com</h3><pre>Client → recursive resolver → root (.)\r\n                           → .com TLD\r\n                           → authoritative server for xyz.com\r\nClient ← final A/AAAA answer ← resolver</pre><p>Assume a cache miss and that the name exists. (1) The client asks its resolver for www.xyz.com. (2) A root server refers the resolver to .com servers. (3) A .com server refers it to authoritative servers for xyz.com. (4) An authoritative server returns the applicable A/AAAA record, or a CNAME that must be followed. (5) The resolver returns the answer and caches it according to TTL. No real IP address for this domain is assumed. Root and TLD servers normally supply referrals here, not the final host address.</p></div></section>"},{"id":"q7a","title":"Q7(a) · Bellman-Ford directed graph","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(a). Consider the directed graph with costs given below. Determine the shortest path from source vertex A to every other vertex in the graph using Bellman Ford Algorithm. Illustrate step-by-step procedure and draw the shortest path table. <span class=\"marks\">[10 marks]</span></h3><h3>Original diagram data</h3><div class=\"table-wrap\"><table><thead><tr><th>From</th><th>To</th><th>Cost</th></tr></thead><tbody><tr><td>A</td><td>B</td><td>4</td></tr><tr><td>A</td><td>C</td><td>3</td></tr><tr><td>A</td><td>D</td><td>6</td></tr><tr><td>C</td><td>B</td><td>-1</td></tr><tr><td>D</td><td>C</td><td>-4</td></tr><tr><td>B</td><td>E</td><td>-1</td></tr><tr><td>C</td><td>E</td><td>2</td></tr><tr><td>D</td><td>F</td><td>-2</td></tr><tr><td>E</td><td>F</td><td>3</td></tr></tbody></table></div><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>The original diagram is directed. All edge labels are reproduced below. Source = A.</p><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/old-bellman-2023.5222c69942.svg\" width=\"720\" height=\"440\" alt=\"bellman 2023 original question graph\" loading=\"lazy\" decoding=\"async\"></div><div class=\"table-wrap\"><table><thead><tr><th>From</th><th>To</th><th>Cost</th></tr></thead><tbody><tr><td>A</td><td>B</td><td>4</td></tr><tr><td>A</td><td>C</td><td>3</td></tr><tr><td>A</td><td>D</td><td>6</td></tr><tr><td>C</td><td>B</td><td>-1</td></tr><tr><td>D</td><td>C</td><td>-4</td></tr><tr><td>B</td><td>E</td><td>-1</td></tr><tr><td>C</td><td>E</td><td>2</td></tr><tr><td>D</td><td>F</td><td>-2</td></tr><tr><td>E</td><td>F</td><td>3</td></tr></tbody></table></div><h3>To find</h3><p>Shortest distance, complete route and predecessor for every node from A.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/e31cde29472d2c2d.svg\" alt=\"d(v)\\leftarrow\\min(d(v),d(u)+w(u,v))\" style=\"width:31.899ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Relaxation replaces a tentative route when going through u is cheaper. Bellman–Ford permits negative edge weights. This table uses synchronous passes: pass k uses distances at the end of pass k−1, so it covers paths of at most k edges.</p><div class=\"step\"><h3>Step 1. Initialize and relax</h3><div class=\"table-wrap\"><table><thead><tr><th>Pass / settled node</th><th>Strict improvements</th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th></tr></thead><tbody><tr><td>0</td><td>Initial</td><td>0</td><td>∞</td><td>∞</td><td>∞</td><td>∞</td><td>∞</td></tr><tr><td>1</td><td>B←A: 0+(4)=4; C←A: 0+(3)=3; D←A: 0+(6)=6</td><td>0</td><td>4</td><td>3</td><td>6</td><td>∞</td><td>∞</td></tr><tr><td>2</td><td>B←C: 3+(-1)=2; C←D: 6+(-4)=2; E←B: 4+(-1)=3; F←D: 6+(-2)=4</td><td>0</td><td>2</td><td>2</td><td>6</td><td>3</td><td>4</td></tr><tr><td>3</td><td>B←C: 2+(-1)=1; E←B: 2+(-1)=1</td><td>0</td><td>1</td><td>2</td><td>6</td><td>1</td><td>4</td></tr><tr><td>4</td><td>E←B: 1+(-1)=0</td><td>0</td><td>1</td><td>2</td><td>6</td><td>0</td><td>4</td></tr><tr><td>5</td><td>F←E: 0+(3)=3</td><td>0</td><td>1</td><td>2</td><td>6</td><td>0</td><td>3</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. Read predecessors backwards, then reverse</h3><div class=\"table-wrap\"><table><thead><tr><th>Destination</th><th>Distance</th><th>Previous</th><th>Route</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>A</td></tr><tr><td>B</td><td>1</td><td>C</td><td>A → D → C → B</td></tr><tr><td>C</td><td>2</td><td>D</td><td>A → D → C</td></tr><tr><td>D</td><td>6</td><td>A</td><td>A → D</td></tr><tr><td>E</td><td>0</td><td>B</td><td>A → D → C → B → E</td></tr><tr><td>F</td><td>3</td><td>E</td><td>A → D → C → B → E → F</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 3. Check for a reachable negative cycle</h3><div class=\"table-wrap\"><table><thead><tr><th>Edge</th><th>Candidate d[u] + weight</th><th>Current d[v]</th><th>Improvement?</th></tr></thead><tbody><tr><td>A → B</td><td>0 + (4) = 4</td><td>1</td><td>No</td></tr><tr><td>A → C</td><td>0 + (3) = 3</td><td>2</td><td>No</td></tr><tr><td>A → D</td><td>0 + (6) = 6</td><td>6</td><td>No</td></tr><tr><td>C → B</td><td>2 + (-1) = 1</td><td>1</td><td>No</td></tr><tr><td>D → C</td><td>6 + (-4) = 2</td><td>2</td><td>No</td></tr><tr><td>B → E</td><td>1 + (-1) = 0</td><td>0</td><td>No</td></tr><tr><td>C → E</td><td>2 + (2) = 4</td><td>0</td><td>No</td></tr><tr><td>D → F</td><td>6 + (-2) = 4</td><td>3</td><td>No</td></tr><tr><td>E → F</td><td>0 + (3) = 3</td><td>3</td><td>No</td></tr></tbody></table></div><p>No edge improves its destination on the extra pass. Therefore no negative cycle reachable from the source is detected.</p></div></div></section>"},{"id":"q7b","title":"Q7(b) · Congestion control","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(b). Compare and contrast the open-loop and closed-loop congestion control. Explain the mechanisms used in open-loop and closed-loop. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Congestion</strong> occurs when offered traffic overloads network resources such as link capacity, router buffers or processing. Queueing delay grows, packets may be dropped, and excessive retransmission can make the overload worse. <strong>Flow control</strong> protects a receiver; congestion control protects the network.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-congestion.c27c2303bb.svg\" width=\"820\" height=\"515\" alt=\"Two congestion-control approaches\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Open-loop prevention and closed-loop feedback.</figcaption></figure><table><thead><tr><th scope=\"col\">Approach</th><th scope=\"col\">Policy / mechanism</th><th scope=\"col\">How it helps</th></tr></thead><tbody><tr><td>Open loop: prevent congestion without runtime congestion feedback</td><td>Retransmission policy</td><td>Carefully chosen timers/selective retransmission avoid needless extra traffic</td></tr><tr><td>Open loop</td><td>Window policy</td><td>Limit outstanding data and avoid excessive retransmission after loss</td></tr><tr><td>Open loop</td><td>Acknowledgement policy</td><td>Avoid unnecessarily frequent ACK traffic while retaining correct recovery</td></tr><tr><td>Open loop</td><td>Admission policy</td><td>Refuse new load when reserved capacity is insufficient</td></tr><tr><td>Closed loop: measure and react to congestion</td><td>Backpressure</td><td>A congested node tells upstream nodes to reduce/stop sending, possibly propagating hop by hop</td></tr><tr><td>Closed loop</td><td>Choke/control signalling</td><td>A congested node sends explicit feedback to the source</td></tr><tr><td>Closed loop</td><td>Implicit signalling</td><td>A sender infers congestion from loss/delay and changes its sending behaviour</td></tr><tr><td>Closed loop</td><td>Explicit marking</td><td>Network marks congestion (for example ECN); endpoints react to returned information</td></tr></tbody></table><p>For an answer asking for two of each: explain retransmission and admission policies under open loop, then backpressure and explicit signalling under closed loop, with the mechanism and its effect. These are general congestion-control classifications used in the course; they are not all mandatory algorithms implemented inside TCP. TCP commonly uses end-to-end feedback such as loss or ECN.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A router’s output link can be overloaded even while the destination application reads quickly. Increasing receiver memory alone will not remove that network bottleneck.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Open loop pehle prevent; closed loop feedback se react.</p></div></section>"}]},{"id":"paper-2024-feb-reexam","title":"2024-02-06 · 2022-23","unit":"Historical PYQ","scope":"Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.","sections":[{"id":"q1a","title":"Q1(a) · TCP versus UDP","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(a). Differentiate between Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). (Any 5 points each) <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">UDP</th><th scope=\"col\">TCP</th><th scope=\"col\">SCTP</th></tr></thead><tbody><tr><td>Service unit</td><td>Datagram; preserves messages</td><td>Byte stream; no message boundaries</td><td>Messages carried in chunks; preserves boundaries</td></tr><tr><td>Connection setup</td><td>No protocol handshake</td><td>Connection; usual three-way SYN exchange</td><td>Association; four-message cookie exchange</td></tr><tr><td>Reliability</td><td>No delivery/order guarantee</td><td>Reliable ordered stream</td><td>Reliable messages; ordered per stream by default, unordered option</td></tr><tr><td>Ordering scope</td><td>None supplied</td><td>One ordered byte stream per direction</td><td>Multiple streams; per-stream order avoids blocking every stream on one stream’s ordering gap</td></tr><tr><td>Flow control</td><td>Not supplied by UDP</td><td>Receiver-advertised window</td><td>Receiver flow control</td></tr><tr><td>Congestion control</td><td>Not supplied by UDP</td><td>Yes</td><td>Yes</td></tr><tr><td>Multihoming</td><td>No built-in association failover</td><td>Classic TCP uses one address pair</td><td>Association can bind multiple addresses; built-in path failover</td></tr><tr><td>Header</td><td>8 bytes</td><td>Minimum 20 bytes</td><td>12-byte common header plus chunks</td></tr><tr><td>Typical use</td><td>DNS, real-time applications with their own controls</td><td>Web over HTTP/1.1 or HTTP/2, reliable byte transfers</td><td>Telecom signalling and multi-stream message applications</td></tr><tr><td>Performance claim</td><td>Low protocol overhead, not automatically fastest overall</td><td>Recovery/ordering have costs and benefits</td><td>Extra capabilities; no universal speed ranking</td></tr></tbody></table><p>The correct protocol depends on application semantics and network conditions. “UDP is always faster” and “SCTP is always slower than TCP” are not defensible general rules. All three normally run above IP; security/encryption is a separate requirement.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A game can prefer fresh updates over retransmitting stale state, while a document download needs every byte. An application with separate message streams can benefit from SCTP’s stream separation.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> UDP messages simple; TCP byte stream; SCTP reliable message streams.</p></div></section>"},{"id":"q1b","title":"Q1(b) · Guided media","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(b). Describe briefly any two categories of guided transmission media. Write the advantages and disadvantages of each. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Guided media</strong> constrain signals to a physical path: twisted pair, coaxial cable and optical fiber. <strong>Unguided media</strong> carry electromagnetic waves through free space: radio, microwave and infrared. Wireless bandwidth and reach depend on frequency, power, antenna, obstacles and regulations; media names alone do not fix a speed.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-media.aff26cd0b5.svg\" width=\"820\" height=\"515\" alt=\"Transmission media: guided and unguided\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Transmission media classification.</figcaption></figure><table><thead><tr><th scope=\"col\">Medium</th><th scope=\"col\">Two key characteristics</th><th scope=\"col\">Limitations / use</th></tr></thead><tbody><tr><td>Twisted pair</td><td>Electrical signal; pairs twisted to reduce interference</td><td>Low-cost LAN access; distance/noise limits depend on category and design</td></tr><tr><td>Coaxial cable</td><td>Shielded central conductor; greater shielding than basic unshielded pair</td><td>Bulkier; cable broadband and legacy shared LANs</td></tr><tr><td>Optical fiber</td><td>Light in glass/plastic; high capacity with immunity to electromagnetic interference</td><td>Transceivers and careful splicing/bend control needed; backbone links</td></tr><tr><td>Radio waves</td><td>Wireless propagation; many bands support broad/non-line-of-sight coverage</td><td>Interference, shared spectrum and security configuration matter; Wi-Fi/mobile</td></tr><tr><td>Terrestrial microwave</td><td>Directional antennas; typically line of sight</td><td>Alignment and obstructions matter; point-to-point backhaul</td></tr><tr><td>Satellite microwave</td><td>Wide coverage through relay in space</td><td>Cost and latency depend strongly on orbit/system; remote connectivity</td></tr><tr><td>Infrared</td><td>Short-range light; usually blocked by walls</td><td>Limited coverage; short-range indoor/remote-control links</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A university can connect buildings with fiber, desktops with twisted pair and mobile students with managed Wi-Fi. Satellite access is an option where suitable terrestrial links are unavailable.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Guided = cable path; unguided = free-space waves.</p>\r\n<div class=\"answer\"><p>Transmission media are classified into guided media (twisted pair, coaxial cable, optical fiber) and unguided media (radio, microwave, infrared).</p><p>Optical fiber carries data as light in a core surrounded by cladding. It is a guided medium. Single-mode fiber supports one main propagation mode and is used for long/high-capacity links; multimode supports multiple modes and is often used over shorter distances.</p><table><thead><tr><th scope=\"col\">Advantages</th><th scope=\"col\">Disadvantages / design costs</th></tr></thead><tbody><tr><td>High data capacity and low attenuation over suitable links</td><td>Optical transceivers, connectors and splicing add cost/skill requirements</td></tr><tr><td>Immune to electromagnetic interference; no electrical crosstalk</td><td>Tight bends, dirty connectors and poor installation increase loss</td></tr><tr><td>Electrical isolation between buildings</td><td>Fiber is mechanically sensitive and requires appropriate protection</td></tr><tr><td>Harder to tap casually than an unprotected radio channel</td><td>It is not automatically confidential; encryption/access control remain necessary</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A campus backbone can use fiber between buildings to avoid electrical interference and achieve high capacity. Installers still need to respect bend radius and test connectors.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Fiber light carry karta hai; immunity means no EMI, not no security risk.</p><h3>Two guided media: advantages and disadvantages</h3><div class=\"table-wrap\"><table><thead><tr><th>Medium / working principle</th><th>Advantages</th><th>Disadvantages</th></tr></thead><tbody><tr><td>Twisted pair: voltage signals travel on two insulated copper conductors twisted together</td><td>Low purchase/installation cost; flexible and easy to terminate for local access</td><td>More susceptible to electromagnetic interference than fiber; distance and capacity are limited by cable category and signalling design</td></tr><tr><td>Optical fiber: light pulses travel through a core guided by its refractive-index structure</td><td>High capacity and long reach; immune to electromagnetic interference</td><td>Optical equipment and splicing can cost more; tight bends, damage and dirty connectors degrade the link</td></tr></tbody></table></div><p>These comparisons describe typical engineering tradeoffs, not a guarantee that every fiber installation is faster or more expensive than every copper installation.</p></div></section>"},{"id":"q1c","title":"Q1(c) · CSMA persistence","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(c). Compare and contrast 1 persistent and p persistent schemes in multiple access with flow diagrams. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Persistence specifies how a station behaves after observing that the medium is busy or becomes idle.</p><p><strong>Simple meaning.</strong> 1 = turant; non = random wait; p = probability ke basis pe start.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/persistence.528dafcd8a.svg\" width=\"820\" height=\"590\" alt=\"CSMA persistence: what happens after carrier sensing?\" loading=\"lazy\" decoding=\"async\"></div><figcaption>1-persistent, non-persistent and p-persistent CSMA</figcaption></figure><h2>Understand it step by step</h2><ol><li>In 1-persistent CSMA, a ready station transmits immediately when idle; when busy it continuously senses. Several waiting stations may all start at the same idle transition.</li><li>In non-persistent CSMA, a busy observation causes a random wait before the next sensing attempt. This reduces simultaneous retries but can waste some idle time.</li><li>In p-persistent CSMA, when an eligible idle slot begins, transmit with probability p. With probability 1−p, defer to a later slot and sense again. The probabilistic decision is repeated, not a one-time discard.</li></ol><table><thead><tr><th scope=\"col\">Rule</th><th scope=\"col\">When idle</th><th scope=\"col\">When busy</th><th scope=\"col\">Trade-off</th></tr></thead><tbody><tr><td>1-persistent</td><td>Transmit immediately</td><td>Keep listening; transmit as soon as idle</td><td>Low idle delay, but waiting stations may start together</td></tr><tr><td>Non-persistent</td><td>Transmit</td><td>Wait a random time, then sense again</td><td>Less synchronized contention; may leave avoidable idle time</td></tr><tr><td>p-persistent (slotted)</td><td>Transmit with probability p; defer a slot with probability 1−p</td><td>Wait until available, then resume the probabilistic slot rule</td><td>Controls contention; needs slots and a choice of p</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>With p=0.25, the station has a 25% chance of transmitting at that idle-slot decision and a 75% chance of deferring. It does not mean it transmits exactly once every four slots.</p></aside><div class=\"answer\"></div><p class=\"memory\"><strong>Yaad rakho:</strong> 1 = start now; non = wait then listen; p = chance per idle slot.</p>\r\n<p><strong>Definition.</strong> CSMA with Collision Detection monitors the medium during transmission, aborts a detected collision and retries after a randomized backoff.</p><p><strong>Simple meaning.</strong> CD = takkar detect hui toh transmission rok do.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/collision-roundtrip.42358ec7bf.svg\" width=\"820\" height=\"410\" alt=\"CSMA/CD: sender must still be sending after a round trip\" loading=\"lazy\" decoding=\"async\"></div><figcaption>CSMA/CD: detect a collision while transmitting</figcaption></figure><h2>Understand it step by step</h2><ol><li>Sense the channel. In traditional shared half-duplex Ethernet, begin transmission when permitted by the access rule.</li><li>Continue monitoring while transmitting. If a collision is detected, send the collision/jam indication and abort the current frame.</li><li>Choose a random delay using binary exponential backoff; then attempt again subject to the access rules.</li><li>The sender must still be transmitting when a worst-case collision indication returns. Hence the ideal timing requirement is Tframe ≥ 2Tp.</li><li>Modern switched full-duplex Ethernet links do not use collision-based CSMA/CD access. Keep the historical/shared-medium assumptions explicit.</li></ol><div class=\"math-display\"><img src=\"math/4f522413155daf19.svg\" alt=\"T_{\\mathrm{frame}}\\geq 2T_p\" style=\"width:11.931ex;height:2.181ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/eae5a57f0575ef7d.svg\" alt=\"L_{\\min}\\geq 2RT_p\" style=\"width:12.575ex;height:2.195ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>On a shared half-duplex Ethernet segment, a station that detects a collision stops sending the remaining frame bits, saving time compared with completing a corrupted long frame.</p></aside><div class=\"answer\"><p>CSMA/CD senses before transmission and detects collisions during transmission. A collision causes abort/jam and a random backoff before retry. To detect the most distant collision before the frame finishes, the transmission duration must be at least the worst-case round-trip propagation delay. Thus Lmin/R ≥ 2Tp in the idealized model.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Detect karna hai toh sender tab tak bhej raha hona chahiye.</p><h3>Persistence decision flows</h3><pre>1-persistent:\r\nReady → sense → busy? yes → sense again\r\n                      no → transmit immediately\r\n\r\np-persistent (slotted medium):\r\nReady → sense → busy? yes → wait and sense\r\n                      no → draw random decision\r\n                    probability p → transmit\r\n                  probability 1−p → wait one slot → sense again</pre><p>Non-persistent CSMA instead waits a random time after a busy observation before sensing again. A collision leads to the protocol's retry/backoff procedure; the persistence rule alone does not guarantee success.</p></div></section>"},{"id":"q1d","title":"Q1(d) · Circuit versus packet switching","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(d). Distinguish between circuit switching and packet switching (Any 5 points for each) <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Switching selects how data passes through intermediate network nodes from a source to a destination.</p><p><strong>Simple meaning.</strong> Raasta reserve karna, poora message ruk-ruk ke bhejna, ya chhote packets bhejna—yeh teen ideas hain.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/switching.2b51f856d9.svg\" width=\"820\" height=\"425\" alt=\"Three switching techniques: what is forwarded?\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Circuit, message and packet switching</figcaption></figure><h2>Understand it step by step</h2><ol><li><strong>Circuit switching:</strong> establish a circuit, reserve resources, transfer data, then release the circuit. Capacity is dedicated even during a silent period.</li><li><strong>Message switching:</strong> each intermediate node receives the entire message before forwarding it. Large messages require large buffers and can delay later messages.</li><li><strong>Packet switching:</strong> divide data into smaller packets. Nodes forward packets individually; different links can carry successive packets at the same time.</li><li>The Internet uses packet switching. A traditional circuit-switched telephone call illustrates the circuit concept. Many current calls use packet-based networks, so do not label every phone call circuit-switched.</li></ol><table><thead><tr><th scope=\"col\">Aspect</th><th scope=\"col\">Circuit switching</th><th scope=\"col\">Message switching</th><th scope=\"col\">Packet switching</th></tr></thead><tbody><tr><td>Unit handled</td><td>Continuous stream on established circuit</td><td>Whole message</td><td>Small packets</td></tr><tr><td>Resource use</td><td>Capacity reserved along a circuit</td><td>Shared; message stored at each intermediate node</td><td>Shared; each packet stored/forwarded in this model</td></tr><tr><td>Setup</td><td>Required before data transfer</td><td>No circuit setup required</td><td>Datagram: no connection setup; virtual circuit: setup</td></tr><tr><td>Delay</td><td>Setup delay, then relatively predictable service</td><td>Large store-and-forward delay for long messages</td><td>Variable delay; packet pipeline can reduce completion time</td></tr><tr><td>Main limitation</td><td>Reserved capacity can be idle</td><td>Large buffers; unsuitable for tight delay needs</td><td>Headers, possible queueing/loss; datagrams may reorder</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A campus transferring web pages and files has bursty traffic. Packet switching allows multiple users to share link capacity instead of reserving a circuit that remains idle between bursts.</p></aside><div class=\"answer\"><p>For ordinary bursty office data, packet switching is generally appropriate because resources are shared among active transfers. The design must still account for queueing, loss and the required service quality.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Circuit reserves; message waits whole; packets pipeline.</p><h3>Two advantages and two disadvantages</h3><div class=\"table-wrap\"><table><thead><tr><th>Method</th><th>Advantage 1</th><th>Advantage 2</th><th>Disadvantage 1</th><th>Disadvantage 2</th></tr></thead><tbody><tr><td>Message switching</td><td>Shares link capacity without a permanently reserved circuit</td><td>Intermediate storage lets a message wait for a currently busy outgoing link</td><td>The entire message must arrive before forwarding, giving long delay</td><td>Large messages require large buffers and can hold up other messages</td></tr><tr><td>Packet switching</td><td>Statistical sharing suits bursty data from many users</td><td>Packets can be pipelined across successive links, reducing completion time</td><td>Every packet needs header/control overhead</td><td>Queueing, loss and (for datagrams) reordering need endpoint or network handling</td></tr></tbody></table></div><p>A packet-switched network may use datagrams or virtual circuits. The possibility of independent routes and reordering refers to datagrams, not every packet-switching implementation.</p></div></section>"},{"id":"q2a","title":"Q2(a) · QoS and scheduling","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(a). Explain briefly the characteristics used to analyse Quality of Service (QoS) of flow/traffic. (Any 4). Illustrate with diagrams the different types of scheduling used to improve QoS. Briefly explain each. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Quality of Service (QoS)</strong> describes delivery characteristics important to an application: throughput/bandwidth, delay, delay variation (jitter) and loss/reliability. Different applications value them differently; a voice call is sensitive to delay/jitter, while a file transfer strongly needs complete data.</p><table><thead><tr><th scope=\"col\">Technique</th><th scope=\"col\">Mechanism</th><th scope=\"col\">Tradeoff</th></tr></thead><tbody><tr><td>Scheduling</td><td>FIFO, priority or fair/weighted queues choose which packet transmits next</td><td>Strict priority may starve lower classes; fair scheduling balances shares</td></tr><tr><td>Traffic shaping</td><td>Delay departures to match a profile</td><td>Smooths load but adds queueing delay</td></tr><tr><td>Policing</td><td>Measure compliance; mark/drop nonconforming packets according to policy</td><td>Controls excess traffic but can lose packets</td></tr><tr><td>Admission control</td><td>Accept new flows only when resources can support them</td><td>Protects existing service by refusing excess demand</td></tr><tr><td>Resource allocation/reservation</td><td>Assign bandwidth/buffer/service resources</td><td>Requires capacity planning and coordination</td></tr><tr><td>Classification/marking</td><td>Identify traffic classes and carry service markings</td><td>Marking alone does not create capacity or guarantees</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A campus link can prioritize interactive audio while fairly serving file downloads. Token-bucket shaping bounds a burst source; admission control avoids promising more reserved capacity than the link has.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Bandwidth, delay, jitter, loss; requirement ke hisaab se policy.</p><h3>Scheduling diagrams</h3><pre>FIFO:      arrivals → [one queue] → link\r\nPriority:  high → [queue H] ─┐\r\n           low  → [queue L] ─┴→ choose H first → link\r\nWeighted fair: Q1, Q2, Q3 → scheduler shares 1:2:1 → link</pre><p>FIFO sends in arrival order, so a long burst can delay urgent traffic. Strict priority chooses the highest nonempty class and can starve lower classes. Fair/weighted fair scheduling shares service among queues according to equal or configured weights, preventing one flow from taking every opportunity. The four QoS dimensions are bandwidth/throughput, delay, jitter and loss/reliability.</p></div></section>"},{"id":"q2b","title":"Q2(b) · Slotted ALOHA rates","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(b). A slotted ALOHA network transmits 150-bit frames using a shared channel with a 400-kbps bandwidth. Calculate the throughput and how many frames will survive if the system (all stations together) produces i) 800 frames per second ii) 400 frames per second <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Frame length L = 150 bits; link rate R = 400,000 bit/s; attempted rates λ = 800, 400 frames/s.</p><h3>To find</h3><p>Normalized throughput S and successful frames per second for each offered load.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/094350050f7316f3.svg\" alt=\"T_f=L/R,\\quad G=\\lambda T_f,\\quad S=Ge^{-G},\\quad \\lambda_{success}=S/T_f=\\lambda e^{-G}\" style=\"width:60.983ex;height:2.73ex\" loading=\"lazy\" decoding=\"async\"></div><p>G counts attempted frames per frame time, including retransmissions if present. S is not measured in frames/s. Multiply by the frame rate capacity 1/Tf to obtain surviving frames/s.</p><div class=\"step\"><h3>Step 1. Convert the link rate and compute frame time</h3><p>Tf = 150/400000 = 0.000375 s. Capacity = 1/Tf = 2666.66667 frames/s.</p></div><div class=\"step\"><h3>Step 2. Offered rate 800 frames/s</h3><p>G = 800 × 0.000375 = 0.3.</p><p>e<sup>−1G</sup> = e<sup>−0.3</sup> = 0.740818221.</p><p>S = 0.3 × 0.740818221 = <strong>0.222245466</strong>.</p><p>Successful frames/s = 800 × 0.740818221 = <strong>592.654577</strong>. Successful bit/s = 592.654577 × 150 = 88898.1865.</p></div><div class=\"step\"><h3>Step 3. Offered rate 400 frames/s</h3><p>G = 400 × 0.000375 = 0.15.</p><p>e<sup>−1G</sup> = e<sup>−0.15</sup> = 0.860707976.</p><p>S = 0.15 × 0.860707976 = <strong>0.129106196</strong>.</p><p>Successful frames/s = 400 × 0.860707976 = <strong>344.283191</strong>. Successful bit/s = 344.283191 × 150 = 51642.4786.</p></div></div></section>"},{"id":"q3a","title":"Q3(a) · CSMA/CA","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(a). Describe the working of CSMA/CA with the help of flow diagram. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> CSMA with Collision Avoidance uses carrier sensing and randomized access delays, with acknowledgements and optional reservation exchanges, to reduce collisions on a wireless shared medium.</p><p><strong>Simple meaning.</strong> CA = pehle collision avoid karne ki koshish; guarantee nahi.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ca-sequence.566280e50f.svg\" width=\"820\" height=\"490\" alt=\"CSMA/CA: optional reservation, data, acknowledgement\" loading=\"lazy\" decoding=\"async\"></div><figcaption>CSMA/CA: reduce collision risk before sending</figcaption></figure><h2>Understand it step by step</h2><ol><li>A wireless station senses the medium and follows the required interframe waiting and contention rules.</li><li>A random backoff counter counts down in eligible idle slots and freezes while the medium is busy. It resumes when permitted; it is not continuously counted through someone else’s transmission.</li><li>When its counter reaches zero, it transmits. A unicast receiver normally sends an ACK after successful reception. Missing ACK triggers retry logic.</li><li>RTS/CTS is an optional reservation exchange. Stations hearing reservation information defer for the indicated duration. It can reduce hidden-terminal data collisions but adds overhead.</li><li>Wireless stations cannot generally rely on Ethernet-style collision detection while transmitting. Collision avoidance does not eliminate all losses or collisions.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Two laptops using one Wi-Fi channel contend for access. Random backoff reduces simultaneous starts; an ACK lets the sender know a unicast frame was received.</p></aside><div class=\"answer\"><table><thead><tr><th scope=\"col\">Aspect</th><th scope=\"col\">CSMA/CD</th><th scope=\"col\">CSMA/CA</th></tr></thead><tbody><tr><td>Main action</td><td>Detect and abort a collision during sending</td><td>Reduce collision risk before sending</td></tr><tr><td>Typical teaching context</td><td>Shared half-duplex wired Ethernet</td><td>Wi-Fi contention access</td></tr><tr><td>Mechanisms</td><td>Carrier sensing, detection/jam, backoff</td><td>Carrier sensing, random backoff, ACK; optional RTS/CTS</td></tr></tbody></table></div><p class=\"memory\"><strong>Yaad rakho:</strong> CD = detect during; CA = avoid before.</p>\r\n<p><strong>Definition.</strong> Hidden terminals are stations that cannot sense each other but whose transmissions can interfere at a common receiver.</p><p><strong>Simple meaning.</strong> A aur C ek dusre ko nahi sunte, par dono B ko bhej rahe hain.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/hidden-terminal.1ffcf794d5.svg\" width=\"820\" height=\"330\" alt=\"Hidden terminals: A and C cannot sense each other\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Hidden terminals and RTS/CTS</figcaption></figure><h2>Understand it step by step</h2><ol><li>Suppose A and C are outside each other’s sensing range, but B can receive both.</li><li>A senses no signal from C and may transmit; C may make the same decision. Their frames can collide at B.</li><li>With optional RTS/CTS, A first sends a short RTS to B. B replies CTS, which C can hear. C defers for the reservation duration.</li><li>RTS frames can themselves collide and wireless conditions still matter. Describe RTS/CTS as mitigation, not an absolute guarantee.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Access points can hear devices at opposite ends of a room even when those devices cannot hear one another clearly. The access point’s CTS can inform both sides about a reservation.</p></aside><div class=\"answer\"><p>A and C may both reach B but be unable to sense one another. Simultaneous transmissions can then collide at B. A short RTS followed by B’s CTS announces a reservation; a station hearing the CTS defers, reducing the risk of a long data-frame collision.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Hidden: senders invisible to each other, receiver common.</p><h3>CSMA/CA flow diagram</h3><pre>Frame ready → sense medium\r\nBusy? yes → defer until eligible idle interval\r\n          ↓\r\nChoose a random backoff → count down eligible idle slots\r\nMedium becomes busy? → freeze counter; resume after required idle wait\r\n          ↓ counter reaches zero\r\nOptional RTS → CTS received? no → retry/back off\r\n          ↓ yes (or RTS/CTS not used)\r\nSend DATA → ACK received? yes → success\r\n                        no → retry/back off or fail at retry limit</pre><p>A station hearing a duration reservation updates its network allocation vector and defers. RTS/CTS is optional; loss of CTS or ACK triggers recovery but does not by itself prove a collision, because channel errors can also cause loss.</p></div></section>"},{"id":"q3b","title":"Q3(b) · RIP and timers","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(b). Explain in detail the working of Routing Information Protocol (RIP). List and briefly explain the timers used in RIP. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Routing Information Protocol (RIP) is an interior distance-vector routing protocol that uses a bounded metric, commonly hop count, to select routes.</p><p><strong>Simple meaning.</strong> RIP mein hops count; 15 tak reachable, 16 means unreachable.</p><h2>Understand it step by step</h2><ol><li>RIPv2 uses distance-vector updates and carries subnet-mask information, allowing classless routes.</li><li>The usual hop-count metric admits costs 1–15 for reachable routes; 16 denotes infinity/unreachable. A received advertisement is incremented by the local link cost and capped at 16.</li><li>RIPv2 normally sends periodic updates about every 30 seconds, with implementation/timer behavior and triggered updates affecting the exact timing. RIPv2 uses UDP port 520 and can send updates to multicast 224.0.0.9.</li><li>Hop count does not directly measure bandwidth or delay, so a low-hop route is not always the fastest link path. The 15-hop limit restricts scale.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>If a neighbour advertises a destination at 15 hops and your added cost is 1, the resulting 16 means unreachable, not a valid 16-hop route.</p></aside><div class=\"answer\"><p>RIP uses distance-vector routing and commonly hop count as its metric. Reachable metrics are at most 15; 16 represents infinity. Its main limitations include limited diameter, a coarse metric and relatively slow convergence with possible temporary loops.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> RIP: neighbour distances; 16 is infinity.</p><h3>RIPv2 timer roles</h3><div class=\"table-wrap\"><table><thead><tr><th>Timer</th><th>Usual RFC value</th><th>Action</th></tr></thead><tbody><tr><td>Periodic update</td><td>Approximately 30 seconds, with randomized variation</td><td>Send routing information to neighbours</td></tr><tr><td>Route timeout</td><td>180 seconds without a valid refresh</td><td>Declare the route invalid and set metric 16</td></tr><tr><td>Garbage collection</td><td>120 seconds after invalidation</td><td>Keep advertising the unreachable route before deleting it</td></tr></tbody></table></div><p>Some vendor courses additionally describe an invalid/hold-down/flush timer set (often 180/180/240 seconds). Those are implementation conventions and must not be mixed with the RFC timeout-plus-garbage sequence as if they were identical clocks.</p></div></section>"},{"id":"q4a","title":"Q4(a) · TCP lifecycle","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(a). Illustrate with suitable diagrams the TCP connection establishment and termination. Describe the steps involved in each case. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>A TCP connection establishes each endpoint’s initial sequence number and confirms that both can receive. Use client initial sequence x=1000 and server initial sequence y=5000; assume no payload in the handshake.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-handshake.e053246177.svg\" width=\"820\" height=\"873\" alt=\"TCP: handshake, data and orderly close\" loading=\"lazy\" decoding=\"async\"></div><figcaption>SYN and FIN each consume one sequence number; pure ACK consumes none.</figcaption></figure><table><thead><tr><th scope=\"col\">Step</th><th scope=\"col\">Segment</th><th scope=\"col\">Meaning</th></tr></thead><tbody><tr><td>1 Client → server</td><td>SYN, Seq=1000</td><td>Client proposes its starting sequence</td></tr><tr><td>2 Server → client</td><td>SYN+ACK, Seq=5000, Ack=1001</td><td>Server acknowledges client SYN and supplies its own start</td></tr><tr><td>3 Client → server</td><td>ACK, Seq=1001, Ack=5001</td><td>Client acknowledges server SYN; connection is established</td></tr></tbody></table><h2>Data transfer</h2><p>Client sends 200 bytes beginning at Seq=1001, so byte numbers are 1001…1200. The receiver acknowledges Ack=1201, the next byte expected. If bytes starting at 1201 are missing but later bytes arrive, the cumulative ACK remains 1201 until the gap is repaired. TCP may buffer out-of-order bytes; it delivers the byte stream in order. Each direction counts independently.</p><h2>Orderly termination</h2><ol><li>Assume client’s next data sequence is 1201. It sends FIN with Seq=1201, meaning it has finished sending.</li><li>Server sends ACK=1202. The connection is half closed: the server can still send data until its application finishes.</li><li>Assume server has sent no data since the handshake. It sends FIN with Seq=5001.</li><li>Client responds with ACK=5002. In a common active-close path the client enters TIME-WAIT so delayed segments and retransmitted FINs can be handled before the tuple is reused.</li><li>These are commonly four segments, but ACK and FIN can be combined and simultaneous close is possible. RST is an abort, not the same as the orderly FIN exchange.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A client can finish uploading a request and close its sending direction while still receiving the server’s response. Full-duplex directions do not have to end at the same instant.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> SYN plus one, FIN plus one; ACK next expected byte.</p></div></section>"},{"id":"q4b","title":"Q4(b) · DNS resolution","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(b). Explain in detail the steps involved in mapping www.xyz.com (domain name) to the corresponding IP address using DNS. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>The <strong>Domain Name System (DNS)</strong> is a distributed hierarchical naming system. Its namespace is a tree with the root at the top. A complete name is the ordered path of labels from a node back to the root. An absolute name may be written with a trailing dot, for example www.example.com.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-dns.f5345fe9fb.svg\" width=\"820\" height=\"520\" alt=\"DNS namespace: full label paths are unique\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Root, top-level domains, delegated domain and host labels.</figcaption></figure><table><thead><tr><th scope=\"col\">Level</th><th scope=\"col\">Example</th><th scope=\"col\">Meaning</th></tr></thead><tbody><tr><td>Root</td><td>.</td><td>Top of the namespace</td></tr><tr><td>Top-level domain (TLD)</td><td>com, org, in</td><td>A child zone below the root</td></tr><tr><td>Registered/delegated domain</td><td>example.com</td><td>Name under a parent such as com</td></tr><tr><td>Subdomain/host label</td><td>www.example.com</td><td>A label below example.com; a name may own different record types</td></tr></tbody></table><h2>Why names remain unique</h2><ol><li>A parent manages the labels immediately beneath it and does not assign the same child label to two different nodes in that parent’s namespace.</li><li>The full sequence of labels identifies the node. The local label www can appear below many domains without conflict: www.example.com and www.example.org are different complete names.</li><li>Administration is delegated: the parent publishes information identifying authoritative servers for a child zone. A domain is a namespace subtree; a zone is the portion administered together, excluding subtrees delegated onward.</li><li>Multiple names may resolve to one IP address, and one name can return several addresses. Uniqueness of names does not imply a one-name/one-IP rule.</li></ol><h2>Resolution</h2><ol><li>A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.</li><li>Otherwise the resolver can query a root server, receive a referral to the relevant TLD, then receive a referral to the authoritative server for the domain.</li><li>The authoritative server supplies the requested record or a relevant negative response. The recursive resolver returns the result and may cache it according to TTL.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>The labels “mail” under two organizations do not collide because mail.example.com and mail.example.org have different ancestors. DNS delegation distributes administration while preserving a unique full path.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Full path unique; www label akela unique nahi.</p><h3>Worked resolution example: www.xyz.com</h3><pre>Client → recursive resolver → root (.)\r\n                           → .com TLD\r\n                           → authoritative server for xyz.com\r\nClient ← final A/AAAA answer ← resolver</pre><p>Assume a cache miss and that the name exists. (1) The client asks its resolver for www.xyz.com. (2) A root server refers the resolver to .com servers. (3) A .com server refers it to authoritative servers for xyz.com. (4) An authoritative server returns the applicable A/AAAA record, or a CNAME that must be followed. (5) The resolver returns the answer and caches it according to TTL. No real IP address for this domain is assumed. Root and TLD servers normally supply referrals here, not the final host address.</p></div></section>"},{"id":"q5a","title":"Q5(a) · Go-Back-N scenarios","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(a). Illustrate the working of Go-Back N ARQ with the help of frame transmission scenarios. Give any one advantage and disadvantage. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Go-Back-N (GBN) ARQ</strong> pipelines up to W outstanding frames. For m-bit sequence numbers, textbook GBN uses W ≤ 2<sup>m</sup>−1 and receiver window 1. The receiver accepts only the next in-order frame; out-of-order frames are discarded. ACK k here cumulatively acknowledges all frames before k and means “next expected is k”.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-gbn.5f577a6979.svg\" width=\"820\" height=\"750\" alt=\"GBN W=7: loss and cumulative ACKs\" loading=\"lazy\" decoding=\"async\"></div><figcaption>GBN example: frame 2 lost; frames 3–6 discarded; timeout resends 2–6.</figcaption></figure><ol><li>For W=7 with m=3, the sequence space is 0…7. Initially the sender can transmit 0…6. It stores every unacknowledged frame; a timer tracks the oldest one.</li><li>Normal: after receiving 0 and 1, cumulative ACK 2 advances the sender base to 2. The sender can fill newly opened window slots.</li><li>Lost data: if frame 2 is lost, frames 3…6 arrive out of order and are discarded. Repeated ACK 2 says frame 2 is still expected. On timeout the sender retransmits all outstanding frames starting at 2, here 2…6.</li><li>Lost ACK: if ACK 2 is lost but ACK 3 arrives, the later cumulative ACK confirms frames 0…2 and avoids unnecessary retransmission. If no later useful ACK arrives before timeout, the sender retransmits from its oldest outstanding frame; the receiver rejects duplicates and sends its current ACK.</li><li>After sequence 7, numbers wrap to 0. The bound W ≤ 7 leaves one sequence value outside the sender’s current window, preventing the all-ACKs-lost ambiguity of a full eight-frame window in the textbook model.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>With W=7, loss of frame 2 can waste successful receptions of 3…6. GBN trades simple receiver buffering for extra retransmission after loss.</p></aside><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-gbn-normal.144a24ea80.svg\" width=\"820\" height=\"522\" alt=\"GBN W=7: normal window movement\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Normal transmission: both windows advance as frames are cumulatively acknowledged.</figcaption></figure><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-gbn-ack.713dc9972e.svg\" width=\"820\" height=\"598\" alt=\"GBN: a later cumulative ACK covers a lost ACK\" loading=\"lazy\" decoding=\"async\"></div><figcaption>A later cumulative ACK can cover an earlier lost ACK.</figcaption></figure></div><p class=\"memory\"><strong>Yaad rakho:</strong> GBN receiver one; gap ke baad discard; timeout pe outstanding suffix repeat.</p><h3>One advantage and one disadvantage</h3><p><strong>Advantage:</strong> pipelining improves utilization over Stop-and-Wait while retaining a simple one-frame receiver window. <strong>Disadvantage:</strong> after a gap, the receiver discards later frames, so a timeout can force retransmission of several frames that arrived correctly.</p></div></section>"},{"id":"q5b","title":"Q5(b) · FTP connections","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(b). Distinguish between communication over control connection and communication over data connection in FTP. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>File Transfer Protocol (FTP)</strong> transfers files between a client and server using TCP and separates commands from file data. This separation is its central design feature. Its control connection remains available across multiple operations, while data connections carry file bytes or directory listings.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-ftp.1b305fa997.svg\" width=\"820\" height=\"660\" alt=\"FTP: separate control and data connections\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Control connection on server port 21; active/passive data connection roles differ.</figcaption></figure><table><thead><tr><th scope=\"col\">Connection</th><th scope=\"col\">Function</th><th scope=\"col\">Lifetime / ports</th></tr></thead><tbody><tr><td>Control</td><td>Commands and replies: USER, PASS, CWD, TYPE, LIST, RETR, STOR, QUIT</td><td>Client connects to server TCP port 21; normally kept for the session</td></tr><tr><td>Data</td><td>File contents and directory listing data</td><td>Opened as needed; separate from command channel</td></tr></tbody></table><h2>How a transfer works</h2><ol><li>Client opens the control connection and exchanges server greeting, login commands and replies. Plain FTP sends credentials/data without encryption.</li><li>Client chooses transfer settings such as binary/image mode for arbitrary bytes, and requests the needed working directory/operation.</li><li>In <strong>active FTP</strong>, the client provides a listening endpoint and the server initiates the data connection, traditionally from server port 20.</li><li>In <strong>passive FTP</strong>, the server returns a listening endpoint and the client initiates the data connection to that chosen server port. Therefore “FTP data always uses server port 20” is wrong.</li><li>RETR downloads a file; STOR uploads a file; LIST returns a directory listing over the data connection. Control replies report progress/completion. The session can continue for another transfer.</li><li>QUIT ends the control session.</li></ol><p>FTP over TLS (FTPS) protects FTP connections. SFTP is a separate SSH-based file-transfer protocol, not “FTP using an SSH port”. These names should not be treated as interchangeable.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A passive client behind a firewall can initiate both its control connection and data connection. The file bytes travel on the negotiated data connection, while the command RETR stays on the control connection.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Control commands, data file; passive mein client dono connect karta.</p></div></section>"},{"id":"q5c","title":"Q5(c) · DHCP dynamic allocation","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(c). Explain the working of DHCP protocol highlighting dynamic IP address allocation. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Dynamic Host Configuration Protocol (DHCP) provides IP configuration parameters to clients and can lease reusable addresses for limited periods.</p><p><strong>Simple meaning.</strong> DORA = Discover, Offer, Request, Acknowledge.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/dhcp.510e8eca42.svg\" width=\"820\" height=\"470\" alt=\"DHCP initial allocation: DORA\" loading=\"lazy\" decoding=\"async\"></div><figcaption>DHCP: automatic configuration through DORA</figcaption></figure><h2>Understand it step by step</h2><ol><li><strong>Discover:</strong> a new client looks for DHCP servers. With no configured IPv4 address, it commonly starts from 0.0.0.0 and uses broadcast discovery.</li><li><strong>Offer:</strong> a server offers an address and configuration, such as subnet mask, lease information and other options.</li><li><strong>Request:</strong> the client indicates the selected offer and requested address. In initial allocation this also informs other servers of its choice.</li><li><strong>Acknowledge:</strong> the selected server confirms the lease/configuration. The client can then use the address after the required checks.</li><li>DHCPv4 uses UDP server port 67 and client port 68. A DHCP relay can carry requests between a client subnet and a server elsewhere; ordinary routers do not simply forward local broadcasts by default.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>When a laptop joins a campus network, DHCP can supply its address, mask, gateway and DNS-server option. It does not itself resolve website names; it can tell the laptop which DNS server to use.</p></aside><div class=\"answer\"><ol><li>DHCPDISCOVER: client searches for a server.</li><li>DHCPOFFER: server proposes an address/configuration.</li><li>DHCPREQUEST: client requests the chosen allocation.</li><li>DHCPACK: server confirms the lease.</li></ol><p>DHCP reduces manual configuration and supports controlled address reuse through leases.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Discover–Offer–Request–ACK; pehle D, phir O, phir R, phir A.</p></div></section>"},{"id":"q6a","title":"Q6(a) · VLSM and noncanonical block address","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(a). An ISP is granted a block of addresses starting with 190.20.10.0/16 (65,536 addresses). The ISP needs to distribute the addresses to two groups of customers as follows: a. The first group has 128 customers; each needs 256 addresses. b. The second group has 128 customers; each needs 128 addresses. Design the subblocks and find out how many addresses are still available after these allocations. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p><strong>Source note:</strong> 190.20.10.0 is inside 190.20.0.0/16, not the network address. Solution must disclose canonical network interpretation.</p><h3>Given</h3><p>190.20.10.0/16; Group 1: 128 customers × 256 addresses; Group 2: 128 customers × 128 addresses</p><p><strong>Source correction/assumption:</strong> The written address is a host address inside 190.20.0.0/16. A /16 cannot begin at third octet 10. Use the canonical 190.20.0.0/16 block; do not silently start unaligned subnets at 190.20.10.0.</p><h3>To find</h3><p>Each customer prefix, every group range, first/last customer blocks, and unallocated addresses.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/2cb46cf5eb7fdc4d.svg\" alt=\"p=32-\\log_2(\\text{addresses per customer}),\\quad A_{group}=n\\times A_{customer}\" style=\"width:62.003ex;height:2.364ex\" loading=\"lazy\" decoding=\"async\"></div><p>These are requested total addresses, not usable-host counts. Allocate customer blocks on their prefix boundary. A group with a non-power-of-two customer count need not be forced into one larger, wasteful CIDR aggregate.</p><div class=\"step\"><h3>Step 1. Compute sizes and allocate consecutive aligned customer blocks</h3><div class=\"table-wrap\"><table><thead><tr><th>Group</th><th>Customers</th><th>Addresses each</th><th>Customer prefix</th><th>Used</th><th>Group range</th></tr></thead><tbody><tr><td>1</td><td>128</td><td>256</td><td>/24</td><td>32768</td><td>190.20.0.0–190.20.127.255</td></tr><tr><td>2</td><td>128</td><td>128</td><td>/25</td><td>16384</td><td>190.20.128.0–190.20.191.255</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. State first and last customer ranges</h3><div class=\"table-wrap\"><table><thead><tr><th>Group</th><th>First customer</th><th>Last customer</th></tr></thead><tbody><tr><td>1</td><td>190.20.0.0–190.20.0.255</td><td>190.20.127.0–190.20.127.255</td></tr><tr><td>2</td><td>190.20.128.0–190.20.128.127</td><td>190.20.191.128–190.20.191.255</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 3. Count the unused addresses</h3><p>Allocated = 32768 + 16384 = 49152. Unused = 65536 − 49152 = <strong>16384</strong>.</p><p>Unused range: 190.20.192.0–190.20.255.255.</p></div></div></section>"},{"id":"q6b","title":"Q6(b) · SMTP","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(b). Illustrate how SMTP is used in sending email. Briefly explain. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Simple Mail Transfer Protocol (SMTP)</strong> transfers email from a sending client/server to a receiving mail server using a reliable transport, normally TCP. It is a push/store-and-forward transfer protocol. User agents compose/read mail; mail-transfer agents relay it, consulting DNS MX records to find recipient-domain mail servers.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-smtp.c6f99877c4.svg\" width=\"820\" height=\"902\" alt=\"SMTP: envelope, message and completion\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Submission/relay use SMTP; reading an inbox uses a separate access protocol.</figcaption></figure><table><thead><tr><th scope=\"col\">Phase</th><th scope=\"col\">Typical exchange</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Connection and greeting</td><td>Server 220; client EHLO (HELO for basic SMTP); server 250 capabilities</td><td>Identify peers and learn supported extensions</td></tr><tr><td>Envelope transfer</td><td>MAIL FROM:&lt;sender&gt;; RCPT TO:&lt;recipient&gt;; 250 replies</td><td>Declare return path and one or more delivery recipients</td></tr><tr><td>Message transfer</td><td>DATA; server 354; headers + blank line + body; single dot line; server 250</td><td>Transmit the message after server permission; completion reply accepts responsibility</td></tr><tr><td>Termination</td><td>QUIT; server 221</td><td>Close the SMTP session cleanly</td></tr></tbody></table><h2>Message flow and important details</h2><ol><li>The sender’s user agent submits mail to its configured submission service. Server-to-server SMTP relay commonly uses TCP port 25; message submission commonly uses 587, often with authentication and TLS policy.</li><li>The sending server resolves the recipient domain’s MX records, connects to an appropriate mail server and carries out the SMTP exchange.</li><li>MAIL FROM and RCPT TO are the <strong>envelope</strong>; visible From/To headers inside DATA are message content and can differ. Multiple RCPT TO commands can name several recipients.</li><li>A line containing only a dot ends DATA. A content line beginning with a dot is dot-stuffed for transparency and unstuffed by the receiver.</li><li>A temporary 4xx failure can lead the sending server to queue and retry; a permanent 5xx failure normally rejects that operation. One successful handoff is not proof that a human read the message.</li><li>The recipient reads stored mail using an access protocol such as IMAP/POP3 or webmail. SMTP is not the mailbox-retrieval protocol.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A message addressed to two recipients can send two RCPT TO commands before one DATA body. The SMTP envelope controls delivery even if the visible header lists a mailing-list name.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> SMTP send/relay; inbox read IMAP/POP/webmail.</p><h3>The three phases requested in the paper</h3><div class=\"table-wrap\"><table><thead><tr><th>Phase</th><th>Commands / replies</th><th>Meaning</th></tr></thead><tbody><tr><td>1. Connection establishment</td><td>TCP connection; 220 greeting; EHLO/HELO; 250 reply</td><td>Open the connection and identify the SMTP peers</td></tr><tr><td>2. Mail transfer</td><td>MAIL FROM, RCPT TO, DATA; 354; message; single dot; 250</td><td>Transfer the envelope and then the message content</td></tr><tr><td>3. Connection termination</td><td>QUIT; 221; close TCP</td><td>Finish the SMTP session</td></tr></tbody></table></div><p>Envelope transfer and message-body transfer are substeps of the single mail-transfer phase. Thus the more detailed table above still fits the standard three-phase description.</p></div></section>"},{"id":"q6c","title":"Q6(c) · TCP/IP layers","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(c). Explain briefly the functionalities of layers of TCP/IP protocol suite. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>The <strong>TCP/IP model</strong> describes the Internet protocol suite in four layers. Many teaching books split the link layer into data link and physical, making a five-layer teaching model; identify the convention before drawing.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-models.5bff0518c8.svg\" width=\"820\" height=\"670\" alt=\"OSI layers mapped to the four-layer TCP/IP model\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Four TCP/IP layers; the link layer includes the physical medium.</figcaption></figure><table><thead><tr><th scope=\"col\">TCP/IP layer</th><th scope=\"col\">Function</th><th scope=\"col\">Examples</th></tr></thead><tbody><tr><td>Application</td><td>Defines application message formats and exchanges for Web access, naming, email and file transfer; includes presentation/session functions as needed</td><td>HTTP, DNS, SMTP, FTP</td></tr><tr><td>Transport</td><td>End-to-end process communication</td><td>TCP, UDP, SCTP</td></tr><tr><td>Internet</td><td>IP addressing, routing and best-effort datagrams</td><td>IPv4/IPv6</td></tr><tr><td>Link/network access</td><td>Local delivery and physical access</td><td>Ethernet/Wi-Fi and their medium</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">OSI</th><th scope=\"col\">TCP/IP</th></tr></thead><tbody><tr><td>Layer count</td><td>Seven</td><td>Four here; five-layer teaching variant splits link</td></tr><tr><td>Upper functions</td><td>Application, presentation, session separated</td><td>Grouped under application</td></tr><tr><td>Lower functions</td><td>Data link and physical separated</td><td>Grouped under link/network access</td></tr><tr><td>Purpose</td><td>General reference architecture</td><td>Architecture of deployed Internet protocol family</td></tr><tr><td>Network service</td><td>Reference model can describe different services</td><td>Internet layer uses connectionless IP</td></tr><tr><td>Transport</td><td>Conceptual transport service</td><td>TCP reliable byte stream; UDP datagrams; SCTP messages</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>An application can use UDP without changing the IP or Ethernet layers. Layering lets one protocol vary without redesigning every network function.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> OSI 7; TCP/IP four mein upper three merge, lower two merge.</p><h3>Internet and transport protocols</h3><div class=\"table-wrap\"><table><thead><tr><th>Layer</th><th>Protocol</th><th>Role</th></tr></thead><tbody><tr><td>Internet</td><td>IPv4 / IPv6</td><td>Address and deliver best-effort packets across networks</td></tr><tr><td>Internet</td><td>ICMP / ICMPv6</td><td>Report selected IP errors and operational information; used by diagnostic exchanges</td></tr><tr><td>Transport</td><td>TCP</td><td>Reliable, ordered byte stream with connection establishment, flow and congestion control</td></tr><tr><td>Transport</td><td>UDP</td><td>Connectionless message delivery using ports, without built-in retransmission or ordering</td></tr><tr><td>Transport</td><td>SCTP</td><td>Reliable message-oriented association with multiple streams and multihoming support</td></tr></tbody></table></div></div></section>"},{"id":"q7a","title":"Q7(a) · Dijkstra graph","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(a). Determine the shortest path and shortest distance from source vertex A to every other vertex in the following graph using Dijkstra’s Algorithm. Illustrate step-by-step procedure and draw shortest path table. <span class=\"marks\">[10 marks]</span></h3><h3>Original diagram data</h3><div class=\"table-wrap\"><table><thead><tr><th>From</th><th>To</th><th>Cost</th></tr></thead><tbody><tr><td>A</td><td>B</td><td>3</td></tr><tr><td>A</td><td>C</td><td>5</td></tr><tr><td>B</td><td>C</td><td>9</td></tr><tr><td>B</td><td>D</td><td>8</td></tr><tr><td>B</td><td>E</td><td>6</td></tr><tr><td>C</td><td>E</td><td>3</td></tr><tr><td>D</td><td>E</td><td>10</td></tr><tr><td>D</td><td>F</td><td>3</td></tr><tr><td>E</td><td>F</td><td>5</td></tr></tbody></table></div><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>The original diagram is undirected. All edge labels are reproduced below. Source = A.</p><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/old-dijkstra-2024.b1cf42a96f.svg\" width=\"720\" height=\"440\" alt=\"dijkstra 2024 original question graph\" loading=\"lazy\" decoding=\"async\"></div><div class=\"table-wrap\"><table><thead><tr><th>From</th><th>To</th><th>Cost</th></tr></thead><tbody><tr><td>A</td><td>B</td><td>3</td></tr><tr><td>A</td><td>C</td><td>5</td></tr><tr><td>B</td><td>C</td><td>9</td></tr><tr><td>B</td><td>D</td><td>8</td></tr><tr><td>B</td><td>E</td><td>6</td></tr><tr><td>C</td><td>E</td><td>3</td></tr><tr><td>D</td><td>E</td><td>10</td></tr><tr><td>D</td><td>F</td><td>3</td></tr><tr><td>E</td><td>F</td><td>5</td></tr></tbody></table></div><h3>To find</h3><p>Shortest distance, complete route and predecessor for every node from A.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/e31cde29472d2c2d.svg\" alt=\"d(v)\\leftarrow\\min(d(v),d(u)+w(u,v))\" style=\"width:31.899ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Relaxation replaces a tentative route when going through u is cheaper. Dijkstra settles the unvisited node of least tentative distance. Nonnegative edge costs make the settled distance final. Equal-distance nodes may be settled in either order.</p><div class=\"step\"><h3>Step 1. Initialize and relax</h3><div class=\"table-wrap\"><table><thead><tr><th>Pass / settled node</th><th>Strict improvements</th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th></tr></thead><tbody><tr><td>0</td><td>Initial</td><td>0</td><td>∞</td><td>∞</td><td>∞</td><td>∞</td><td>∞</td></tr><tr><td>A</td><td>B←A: 0+3=3; C←A: 0+5=5</td><td>0</td><td>3</td><td>5</td><td>∞</td><td>∞</td><td>∞</td></tr><tr><td>B</td><td>D←B: 3+8=11; E←B: 3+6=9</td><td>0</td><td>3</td><td>5</td><td>11</td><td>9</td><td>∞</td></tr><tr><td>C</td><td>E←C: 5+3=8</td><td>0</td><td>3</td><td>5</td><td>11</td><td>8</td><td>∞</td></tr><tr><td>E</td><td>F←E: 8+5=13</td><td>0</td><td>3</td><td>5</td><td>11</td><td>8</td><td>13</td></tr><tr><td>D</td><td>No change</td><td>0</td><td>3</td><td>5</td><td>11</td><td>8</td><td>13</td></tr><tr><td>F</td><td>No change</td><td>0</td><td>3</td><td>5</td><td>11</td><td>8</td><td>13</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. Read predecessors backwards, then reverse</h3><div class=\"table-wrap\"><table><thead><tr><th>Destination</th><th>Distance</th><th>Previous</th><th>Route</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>A</td></tr><tr><td>B</td><td>3</td><td>A</td><td>A → B</td></tr><tr><td>C</td><td>5</td><td>A</td><td>A → C</td></tr><tr><td>D</td><td>11</td><td>B</td><td>A → B → D</td></tr><tr><td>E</td><td>8</td><td>C</td><td>A → C → E</td></tr><tr><td>F</td><td>13</td><td>E</td><td>A → C → E → F</td></tr></tbody></table></div></div><p>A tie between two equally short paths is valid; this table retains the first predecessor on equal distances.</p></div></section>"},{"id":"q7b","title":"Q7(b) · Four network topologies","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(b). Define network topology. Compare various network topologies (any 4) with the advantages and disadvantages of each. Draw diagram to illustrate each topology. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Topology</strong> is the arrangement of nodes and links. Physical topology describes actual links; logical topology describes how data flows. A switch-centred physical star is different from a shared collision-domain bus.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-topologies.d9e18f041b.svg\" width=\"820\" height=\"665\" alt=\"Four physical network topologies\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Star, bus, ring and full mesh; edges depict physical connections.</figcaption></figure><table><thead><tr><th scope=\"col\">Topology</th><th scope=\"col\">Structure</th><th scope=\"col\">Benefit</th><th scope=\"col\">Limitation</th></tr></thead><tbody><tr><td>Bus</td><td>Devices share a common backbone</td><td>Simple small shared-medium layout</td><td>Backbone fault affects segment; collisions possible on classic shared bus</td></tr><tr><td>Star</td><td>Each device connects to a central switch/hub</td><td>Easy expansion and fault isolation</td><td>Central-device failure affects star; more cabling</td></tr><tr><td>Ring</td><td>Each node connected to two neighbours in a ring</td><td>Structured traversal; token-based variants coordinate access</td><td>Simple single-ring break can disrupt operation unless protected</td></tr><tr><td>Full mesh</td><td>Every pair has a direct link</td><td>Redundant paths and direct connectivity</td><td>Expensive ports/cabling: n(n−1)/2 undirected links</td></tr><tr><td>Tree/hybrid</td><td>Hierarchical stars or combined topologies</td><td>Scales into buildings/floors</td><td>Upper-level faults affect dependent branches</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A lab normally uses a switch-centred star: unplugging one workstation cable isolates that workstation. A failed central switch can stop the whole lab unless redundancy is provided.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Layout draw karo, then one strength and one failure case.</p><h3>Two advantages and two disadvantages of each topology</h3><div class=\"table-wrap\"><table><thead><tr><th>Topology / example</th><th>Advantage 1</th><th>Advantage 2</th><th>Disadvantage 1</th><th>Disadvantage 2</th></tr></thead><tbody><tr><td>Star: switched computer laboratory</td><td>A device can be added on a spare central port without rebuilding the whole topology</td><td>A single access-cable fault normally isolates only its attached device</td><td>Central-switch failure affects all attached devices unless redundant</td><td>A separate cable and switch port are needed per device</td></tr><tr><td>Bus: legacy coaxial Ethernet</td><td>Uses little cable in a small linear layout</td><td>No central switch is required in the simple shared-bus design</td><td>A backbone fault can disable the segment</td><td>Shared bandwidth, contention and fault diagnosis become difficult as it grows</td></tr><tr><td>Ring: token-based ring</td><td>Controlled token access avoids data collisions among compliant stations</td><td>Token rotation gives stations an organized opportunity to transmit</td><td>A break can interrupt an unprotected single ring</td><td>Adding/removing a node can disrupt a simple ring</td></tr><tr><td>Mesh: redundant router backbone</td><td>Alternate links preserve connectivity after some link failures</td><td>Direct pairwise links can carry separate exchanges without a shared central bottleneck</td><td>A full mesh needs n(n−1)/2 links and many ports</td><td>Configuration, cabling and maintenance become complex</td></tr></tbody></table></div><p>The ring benefits above assume token-controlled access; physical ring wiring alone does not guarantee fairness or collision avoidance. The failure disadvantages describe simple layouts without protection/redundancy.</p></div></section>"}]},{"id":"paper-2023-ai-partial","title":"2023-11-22 · AI-only Sem V variant; incomplete recovered scan","unit":"Historical AI paper","scope":"Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.","sections":[{"id":"q1a","title":"Q1(a) · Subnetting and masks","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(a). What is subnetting? Explain subnetting and default subnet masks. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Subnetting divides an address block into smaller prefix-defined blocks. In an ordinary subnet, the network and directed-broadcast addresses bound its usable host range.</p><p><strong>Simple meaning.</strong> Pehle block nikalo; phir first aur last. Uske baad hosts.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/subnet-blocks.67a24f46fc.svg\" width=\"820\" height=\"410\" alt=\"A /24 split into four /26 blocks\" loading=\"lazy\" decoding=\"async\"></div><figcaption>One method for every ordinary IPv4 block question</figcaption></figure><h2>Understand it step by step</h2><ol><li>Read /p. Host bits h=32−p. Total addresses N=2ʰ, not N−2.</li><li>Build the mask. Find the first octet that is not 255; block step there is 256−that mask octet.</li><li>Round that address octet down to a multiple of the step. Preserve preceding octets and set later octets to 0 for the network address.</li><li>For the broadcast address, use the end of the same interval in the changing octet and set later octets to 255. Equivalently, broadcast is network+(N−1) in 32-bit address arithmetic.</li><li>For an ordinary broadcast subnet with at least two host bits: first usable=network+1, last usable=broadcast−1, usable count=N−2. /31 point-to-point and /32 routes are exceptions explained separately.</li></ol><div class=\"math-display\"><img src=\"math/06561cae3cdafd6c.svg\" alt=\"N=2^{32-p}\" style=\"width:9.994ex;height:2.185ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/6d26c03e47eb5b6c.svg\" alt=\"\\text{block step}=256-\\text{changing mask octet}\" style=\"width:38.928ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/0d9d5151a6681f69.svg\" alt=\"\\text{ordinary usable hosts}=2^h-2\" style=\"width:29.885ex;height:2.506ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>For a /26, the changing fourth octet moves in steps of 64: blocks 0–63, 64–127, 128–191 and 192–255. An address ending in 77 is in the 64–127 block.</p></aside><div class=\"answer\"><p>A /26 has 32−26=6 host bits, so it contains 2⁶=64 total addresses. Under ordinary IPv4 subnet rules, one is the network address and one is directed broadcast, leaving 64−2=62 usable host addresses.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Total mein sab count; usable mein boundary ke 2 minus.</p><p>An IPv4 address identifies an IP interface. The network prefix selects the destination network; remaining bits identify an address within it. Classful addressing is historical; modern routing uses explicit CIDR prefixes.</p><div class=\"table-wrap\"><table><thead><tr><th>Class</th><th>First octet</th><th>Default mask</th><th>Network / host split</th><th>Purpose</th></tr></thead><tbody><tr><td>A</td><td>1–126 (ordinary unicast)</td><td>255.0.0.0 (/8)</td><td>8 / 24 bits</td><td>Large historical unicast networks; 0 and 127 reserved</td></tr><tr><td>B</td><td>128–191</td><td>255.255.0.0 (/16)</td><td>16 / 16 bits</td><td>Medium historical unicast networks</td></tr><tr><td>C</td><td>192–223</td><td>255.255.255.0 (/24)</td><td>24 / 8 bits</td><td>Small historical unicast networks</td></tr><tr><td>D</td><td>224–239</td><td>No unicast default mask</td><td>Not network/host class split</td><td>Multicast</td></tr><tr><td>E</td><td>240–255</td><td>No unicast default mask</td><td>Not normal unicast allocation</td><td>Reserved/experimental; special addresses exist</td></tr></tbody></table></div><p>Example: 114.34.2.8 is class A with network 114.0.0.0 and host portion 34.2.8. Class does not override an explicitly supplied CIDR prefix.</p><p>Example: 192.168.1.70 AND255.255.255.192 gives network192.168.1.64. The mask distinguishes the network prefix from the host portion. CIDR masks need not equal historical default class masks.</p></div></section>"},{"id":"q1b","title":"Q1(b) · Shared bottleneck throughput","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(b). Four server/client paths share a link R = 1 Gbps. Each server link Rs = 400 Mbps and client link Rc = 300 Mbps. Assuming fair sharing and maximum sending rates, find the maximum throughput of each connection. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>4 flows, server links 400 Mbps, client links 300 Mbps, shared link 1000 Mbps.</p><h3>To find</h3><p>Maximum throughput of each flow.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/26062ae8bce5ae5e.svg\" alt=\"T=\\min(R_s,R_c,R/n)\" style=\"width:21.612ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>A flow cannot exceed any link on its path; fair sharing divides the common capacity among n active flows.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Convert and divide the shared capacity</h3><p>1000 Mbps ÷ 4 = 250 Mbps per flow.</p></div><div class=\"step\"><h3>Step 2. Take the smallest per-flow capacity</h3><p>T=min(400,300,250)=<strong>250 Mbps</strong>.</p></div><p>Total delivered rate=4×250=1000 Mbps.</p></div></section>"},{"id":"q1c","title":"Q1(c) · HTTP/1.0 delay","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(c). An HTTP client knows the server IP, but has no recent TCP connection. GET transmission time is zero; each object takes 1/2 RTT to transmit. Include connection setup, request/response propagation and object transmission. The base HTML references one JPEG on gaia.cs.umass.edu. Both must be downloaded sequentially using HTTP/1.0. Find the total number of RTTs. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Known IP; new initial TCP connection; zero GET transmission; each object transmission=0.5 RTT.</p><h3>To find</h3><p>Time to obtain both the base HTML and its referenced JPEG.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/174653a5aa0dead0.svg\" alt=\"T_{object}=T_{setup}+RTT+T_{transmission}\" style=\"width:35.509ex;height:2.211ex\" loading=\"lazy\" decoding=\"async\"></div><p>A referenced object cannot be requested until the HTML reveals it. HTTP/1.0 here uses a fresh connection per object; persistent HTTP/1.1 reuses one.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Download base HTML</h3><p>1 RTT for TCP setup + 1 RTT for GET/first response bit + 0.5 RTT to transmit = <strong>2.5 RTT</strong>.</p></div><div class=\"step\"><h3>Step 2. Download referenced JPEG</h3><p>1 RTT for another TCP setup + 1 RTT for GET/response + 0.5 RTT transmission = 2.5 RTT.</p></div><div class=\"step\"><h3>Step 3. Add sequential delays</h3><p><strong>Total = 2.5+2.5=5 RTT</strong>. DNS adds zero here because the IP address is already known.</p></div></div></section>"},{"id":"q1d","title":"Q1(d) · Cryptographic hash versus checksum","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(d). How does a cryptographic hash differ from a checksum? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q2a","title":"Q2(a) · Hamming error correction","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(a). A seven-bit Hamming codeword received is 1011011. Assuming even parity, determine whether it is correct; if not, locate and correct the erroneous bit. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Received word 1011011; even parity. Number positions 7,6,5,4,3,2,1 from left to right, so position 1 is the rightmost bit.</p><h3>To find</h3><p>Syndrome, erroneous position, and corrected word.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/915c318ac72ec415.svg\" alt=\"s_p=\\bigoplus_{i\\,\\&amp;\\,p\\ne0}b_i,\\quad \\text{error position}=4s_4+2s_2+s_1\" style=\"width:45.955ex;height:5.256ex\" loading=\"lazy\" decoding=\"async\"></div><p>Each parity check covers positions whose binary position number contains that parity bit. For even parity, XOR must be zero; a 1 identifies a failed group.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Label every received bit</h3><div class=\"table-wrap\"><table><thead><tr><th>Position</th><th>7</th><th>6</th><th>5</th><th>4</th><th>3</th><th>2</th><th>1</th></tr></thead><tbody><tr><td>Received bit</td><td>1</td><td>0</td><td>1</td><td>1</td><td>0</td><td>1</td><td>1</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. Evaluate the three parity groups</h3><div class=\"table-wrap\"><table><thead><tr><th>Parity</th><th>Covered positions</th><th>Bits added</th><th>Sum</th><th>Sum mod 2</th></tr></thead><tbody><tr><td>1</td><td>1, 3, 5, 7</td><td>1 + 0 + 1 + 1</td><td>3</td><td>1</td></tr><tr><td>2</td><td>2, 3, 6, 7</td><td>1 + 0 + 0 + 1</td><td>2</td><td>0</td></tr><tr><td>4</td><td>4, 5, 6, 7</td><td>1 + 1 + 0 + 1</td><td>3</td><td>1</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 3. Read the syndrome as a binary position</h3><p>Syndrome s4s2s1 = 101; decimal = 5. Under the single-bit-error assumption, flip position 5 from the right. <strong>Corrected word = 1001011</strong>.</p></div><div class=\"step\"><h3>Step 4. State the assumption</h3><p>Ordinary Hamming(7,4) corrects one bit. A multi-bit corruption may produce a misleading nonzero syndrome, so do not claim guaranteed correction of arbitrary errors.</p></div></div></section>"},{"id":"q2b","title":"Q2(b) · CRC encoding","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(b). Given message 1011011010 and generator G(x) = x³ + x + 1, calculate the CRC code and transmission message. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Data = 1011011010; generator bits = 1011; degree r = 3.</p><h3>To find</h3><p>CRC remainder, complete transmitted frame and receiver check.</p><h3>Formula and why</h3><p>Append r zeros, divide using XOR (modulo 2), and replace those zeros with the r-bit remainder. XOR has no borrowing or carrying. A valid received codeword has remainder zero; the receiver does not append new zeros.</p><div class=\"step\"><h3>Step 1. Append zeros</h3><p>1011011010 → 1011011010000</p></div><div class=\"step\"><h3>Step 2. Perform XOR division</h3><div class=\"table-wrap\"><table><thead><tr><th>Leading position</th><th>Before XOR</th><th>Aligned generator</th><th>After XOR</th></tr></thead><tbody><tr><td>1</td><td>1011011010000</td><td>1011000000000</td><td>0000011010000</td></tr><tr><td>6</td><td>0000011010000</td><td>0000010110000</td><td>0000001100000</td></tr><tr><td>7</td><td>0000001100000</td><td>0000001011000</td><td>0000000111000</td></tr><tr><td>8</td><td>0000000111000</td><td>0000000101100</td><td>0000000010100</td></tr><tr><td>9</td><td>0000000010100</td><td>0000000010110</td><td>0000000000010</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 3. Build the frame</h3><p>Remainder = <strong>010</strong>. Transmit <strong>1011011010010</strong>.</p></div><div class=\"step\"><h3>Step 4. Divide the received frame</h3><div class=\"table-wrap\"><table><thead><tr><th>Position</th><th>Before</th><th>Generator</th><th>After</th></tr></thead><tbody><tr><td>1</td><td>1011011010010</td><td>1011000000000</td><td>0000011010010</td></tr><tr><td>6</td><td>0000011010010</td><td>0000010110000</td><td>0000001100010</td></tr><tr><td>7</td><td>0000001100010</td><td>0000001011000</td><td>0000000111010</td></tr><tr><td>8</td><td>0000000111010</td><td>0000000101100</td><td>0000000010110</td></tr><tr><td>9</td><td>0000000010110</td><td>0000000010110</td><td>0000000000000</td></tr></tbody></table></div><p>Receiver remainder = 000. No error is detected; this is not a guarantee that every possible corruption is detectable.</p></div></div></section>"},{"id":"q2c","title":"Q2(c) · Framing","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(c). Explain methods of framing. What are the advantages of variable-length frames over fixed-length frames? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>Framing separates a continuous bit stream into data-link units so the receiver knows where each frame begins and ends.</p><div class=\"table-wrap\"><table><thead><tr><th>Method</th><th>Operation</th><th>Key issue</th></tr></thead><tbody><tr><td>Fixed size</td><td>Every N bytes forms one frame</td><td>No delimiter needed, but padding may waste capacity</td></tr><tr><td>Length/character count</td><td>Header gives frame length</td><td>A damaged count can lose synchronization</td></tr><tr><td>Byte stuffing</td><td>Flag bytes delimit frames; escape any flag/escape inside payload</td><td>Receiver removes inserted escape bytes</td></tr><tr><td>Bit stuffing</td><td>Flag01111110; insert0 after five consecutive data1s</td><td>Receiver removes the stuffed0</td></tr><tr><td>Coding violation</td><td>Reserve physical symbols unavailable to data</td><td>Depends on the line code</td></tr></tbody></table></div><p>Variable-length frames fit different packet sizes, reducing padding and often using bandwidth efficiently. They need boundary/length handling and variable buffering; fixed-size frames give simple predictable processing. Example: a20-byte payload need not occupy an entire500-byte fixed frame when a suitable short variable frame is allowed.</p></div></section>"},{"id":"q3a","title":"Q3(a) · Alternating-bit state transitions","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(a). Use the printed rdt3.0 alternating-bit sender/receiver: S0 sends data0; S3 accepts ACK0; S5 sends data1; S8 accepts ACK1; S2/S7 are timeout retransmissions; S1/S6 ignore corrupt or wrong ACKs. Receiver R0 accepts new data0 and sends ACK0; R2 accepts new data1 and sends ACK1; R3/R1 handle corrupt or duplicate data while waiting for 0/1 respectively. Complete the global transition sequence S0, R0, t1, t2, t3, t4 that delivers two messages without errors, including the second ACK at the sender. Justify each transition. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Two messages; no DATA or ACK errors; original FSM transition labels in the question.</p><h3>To find</h3><p>The global interleaved transition sequence, including the final ACK.</p><h3>Formula and why</h3><p>Send DATA → receive and acknowledge DATA → receive matching ACK → advance the sequence bit.</p><p>Each successful ACK permits the sender to send the next new message.</p><h3>Solution</h3><p>The sequence bit labels the outstanding DATA packet. ACK0 confirms data0 and ACK1 confirms data1 in this printed FSM; these are not TCP cumulative byte numbers. An ACK loss does not advance the sender. A duplicate data packet is acknowledged again but not delivered twice.</p><div class=\"table-wrap\"><table><tbody><tr><td><strong>Send0</strong></td><td>→</td><td><strong>ACK0</strong></td><td>→</td><td><strong>Send1</strong></td><td>→</td><td><strong>ACK1</strong></td></tr></tbody></table></div><div class=\"table-wrap\"><table><thead><tr><th>Order</th><th>Transition</th><th>Action</th></tr></thead><tbody><tr><td>1</td><td>S0</td><td>Send data0; start timer</td></tr><tr><td>2</td><td>R0</td><td>Accept data0; deliver; send ACK0</td></tr><tr><td>3</td><td>S3</td><td>Accept ACK0; stop timer</td></tr><tr><td>4</td><td>S5</td><td>Send data1; start timer</td></tr><tr><td>5</td><td>R2</td><td>Accept data1; deliver; send ACK1</td></tr><tr><td>6</td><td>S8</td><td>Accept ACK1; stop timer</td></tr></tbody></table></div><p><strong>Required sequence: S0, R0, S3, S5, R2, S8.</strong> For the four placeholders: t1=S3, t2=S5, t3=R2, t4=S8.</p></div></section>"},{"id":"q3b","title":"Q3(b) · Stateful packet filtering","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(b). What are the two main data structures used by a stateful packet filter? Explain their purpose. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q3c","title":"Q3(c) · DNS cache inference","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(c). Can an ordinary user, without access to the DNS cache as administrator, infer whether an external website was visited a few seconds ago? Explain a possible method and its limitations. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>A rough method is to query the local resolver for a site and compare response time or remaining TTL with a likely cold lookup. A cached answer can be returned without an external lookup, so a fast response or an aged TTL may suggest a previous resolution.</p><p>This is not proof of a visit a few seconds ago: cached records may come from another user, background requests, prefetching or older use; TTLs differ and network timing is noisy. A visit may also use an already cached browser/OS answer without contacting that DNS server. State “possible weak inference”, not a certain browsing history.</p></div></section>"},{"id":"q3d","title":"Q3(d) · IPv4 address classes","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(d). Explain the classification of IPv4 addresses with suitable examples. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>An IPv4 address identifies an IP interface. The network prefix selects the destination network; remaining bits identify an address within it. Classful addressing is historical; modern routing uses explicit CIDR prefixes.</p><div class=\"table-wrap\"><table><thead><tr><th>Class</th><th>First octet</th><th>Default mask</th><th>Network / host split</th><th>Purpose</th></tr></thead><tbody><tr><td>A</td><td>1–126 (ordinary unicast)</td><td>255.0.0.0 (/8)</td><td>8 / 24 bits</td><td>Large historical unicast networks; 0 and 127 reserved</td></tr><tr><td>B</td><td>128–191</td><td>255.255.0.0 (/16)</td><td>16 / 16 bits</td><td>Medium historical unicast networks</td></tr><tr><td>C</td><td>192–223</td><td>255.255.255.0 (/24)</td><td>24 / 8 bits</td><td>Small historical unicast networks</td></tr><tr><td>D</td><td>224–239</td><td>No unicast default mask</td><td>Not network/host class split</td><td>Multicast</td></tr><tr><td>E</td><td>240–255</td><td>No unicast default mask</td><td>Not normal unicast allocation</td><td>Reserved/experimental; special addresses exist</td></tr></tbody></table></div><p>Example: 114.34.2.8 is class A with network 114.0.0.0 and host portion 34.2.8. Class does not override an explicitly supplied CIDR prefix.</p></div></section>"},{"id":"q4a","title":"Q4(a) · Dijkstra from u","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(a). Using Dijkstra’s algorithm, calculate the shortest path from u to all nodes in the given undirected graph. Show every step. The complete original edge list is reproduced below. <span class=\"marks\">[10 marks]</span></h3><h3>Original diagram data</h3><div class=\"table-wrap\"><table><thead><tr><th>Edge endpoint1</th><th>Endpoint2</th><th>Cost</th></tr></thead><tbody><tr><td>z</td><td>x</td><td>8</td></tr><tr><td>z</td><td>y</td><td>12</td></tr><tr><td>x</td><td>y</td><td>6</td></tr><tr><td>x</td><td>v</td><td>3</td></tr><tr><td>x</td><td>w</td><td>6</td></tr><tr><td>y</td><td>v</td><td>8</td></tr><tr><td>y</td><td>t</td><td>7</td></tr><tr><td>v</td><td>t</td><td>4</td></tr><tr><td>v</td><td>u</td><td>3</td></tr><tr><td>v</td><td>w</td><td>4</td></tr><tr><td>w</td><td>u</td><td>3</td></tr><tr><td>t</td><td>u</td><td>2</td></tr></tbody></table></div><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>The original diagram is undirected. All edge labels are reproduced below. Source = u.</p><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/old-ai-cn-2023-11-22-ai-q4a.23319ec754.svg\" width=\"720\" height=\"460\" alt=\"Original undirected question graph: every edge weight retained; source u\" loading=\"lazy\" decoding=\"async\"></div><div class=\"table-wrap\"><table><thead><tr><th>From</th><th>To</th><th>Cost</th></tr></thead><tbody><tr><td>z</td><td>x</td><td>8</td></tr><tr><td>z</td><td>y</td><td>12</td></tr><tr><td>x</td><td>y</td><td>6</td></tr><tr><td>x</td><td>v</td><td>3</td></tr><tr><td>x</td><td>w</td><td>6</td></tr><tr><td>y</td><td>v</td><td>8</td></tr><tr><td>y</td><td>t</td><td>7</td></tr><tr><td>v</td><td>t</td><td>4</td></tr><tr><td>v</td><td>u</td><td>3</td></tr><tr><td>v</td><td>w</td><td>4</td></tr><tr><td>w</td><td>u</td><td>3</td></tr><tr><td>t</td><td>u</td><td>2</td></tr></tbody></table></div><h3>To find</h3><p>Shortest distance, complete route and predecessor for every node from u.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/e31cde29472d2c2d.svg\" alt=\"d(v)\\leftarrow\\min(d(v),d(u)+w(u,v))\" style=\"width:31.899ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Relaxation replaces a tentative route when going through u is cheaper. Dijkstra settles the unvisited node of least tentative distance. Nonnegative edge costs make the settled distance final. Equal-distance nodes may be settled in either order.</p><div class=\"step\"><h3>Step 1. Initialize and relax</h3><div class=\"table-wrap\"><table><thead><tr><th>Pass / settled node</th><th>Strict improvements</th><th>t</th><th>u</th><th>v</th><th>w</th><th>x</th><th>y</th><th>z</th></tr></thead><tbody><tr><td>0</td><td>Initial</td><td>∞</td><td>0</td><td>∞</td><td>∞</td><td>∞</td><td>∞</td><td>∞</td></tr><tr><td>u</td><td>v←u: 0+3=3; w←u: 0+3=3; t←u: 0+2=2</td><td>2</td><td>0</td><td>3</td><td>3</td><td>∞</td><td>∞</td><td>∞</td></tr><tr><td>t</td><td>y←t: 2+7=9</td><td>2</td><td>0</td><td>3</td><td>3</td><td>∞</td><td>9</td><td>∞</td></tr><tr><td>v</td><td>x←v: 3+3=6</td><td>2</td><td>0</td><td>3</td><td>3</td><td>6</td><td>9</td><td>∞</td></tr><tr><td>w</td><td>No change</td><td>2</td><td>0</td><td>3</td><td>3</td><td>6</td><td>9</td><td>∞</td></tr><tr><td>x</td><td>z←x: 6+8=14</td><td>2</td><td>0</td><td>3</td><td>3</td><td>6</td><td>9</td><td>14</td></tr><tr><td>y</td><td>No change</td><td>2</td><td>0</td><td>3</td><td>3</td><td>6</td><td>9</td><td>14</td></tr><tr><td>z</td><td>No change</td><td>2</td><td>0</td><td>3</td><td>3</td><td>6</td><td>9</td><td>14</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. Read predecessors backwards, then reverse</h3><div class=\"table-wrap\"><table><thead><tr><th>Destination</th><th>Distance</th><th>Previous</th><th>Route</th></tr></thead><tbody><tr><td>t</td><td>2</td><td>u</td><td>u → t</td></tr><tr><td>u</td><td>0</td><td>—</td><td>u</td></tr><tr><td>v</td><td>3</td><td>u</td><td>u → v</td></tr><tr><td>w</td><td>3</td><td>u</td><td>u → w</td></tr><tr><td>x</td><td>6</td><td>v</td><td>u → v → x</td></tr><tr><td>y</td><td>9</td><td>t</td><td>u → t → y</td></tr><tr><td>z</td><td>14</td><td>x</td><td>u → v → x → z</td></tr></tbody></table></div></div><p>A tie between two equally short paths is valid; this table retains the first predecessor on equal distances.</p></div></section>"},{"id":"q4b","title":"Q4(b) · TCP socket port numbers","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(b). Clients A and B initiate Telnet sessions with server S. Give possible source/destination ports for B→S and S→B. If A and B are on the same host, can both connections use the same source port to the same server? Explain. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>IP delivers a packet toward a host interface. The transport layer delivers application data to a <strong>process endpoint</strong>, identified using a port. A socket endpoint is commonly described by IP address and port; the protocol also matters. TCP distinguishes connections by source IP/port and destination IP/port.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-ports.f496c69028.svg\" width=\"820\" height=\"515\" alt=\"Transport: from hosts to application processes\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Several applications share IP connectivity; ports separate their transport endpoints.</figcaption></figure><ol><li>At the sender, transport multiplexing accepts data from several application sockets and adds the appropriate header.</li><li>A server normally listens on a known service port; a client commonly chooses a temporary local port.</li><li>At the receiver, demultiplexing uses protocol/header information to deliver data to the appropriate socket.</li><li>A TCP connection is bidirectional and maintains state. Two clients can contact the same server port because their connection tuples differ. UDP demultiplexing is connectionless at the protocol level; applications can still keep their own state.</li></ol><table><thead><tr><th scope=\"col\">Identifier</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>MAC address</td><td>Delivery on a local link</td></tr><tr><td>IP address</td><td>Network-layer interface/addressing</td></tr><tr><td>Port number</td><td>Transport-layer application endpoint</td></tr><tr><td>Domain name</td><td>Application-level naming resolved through DNS</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>Laptop 192.0.2.10:51000 contacts server 198.51.100.20:443. Another browser connection uses local port 51001, so the server can distinguish both TCP connections.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> IP host tak; port process tak.</p><div class=\"table-wrap\"><table><thead><tr><th>Direction</th><th>Source port</th><th>Destination port</th></tr></thead><tbody><tr><td>Client→server</td><td>Example49152</td><td>23 (Telnet)</td></tr><tr><td>Server→client</td><td>23</td><td>49152</td></tr></tbody></table></div><p>Different simultaneous connections from the same client IP to the same server IP and port23 require different client ports, e.g.49152 and49153. Otherwise the TCP four-tuples would be identical.</p></div></section>"},{"id":"q4c","title":"Q4(c) · SDN control-plane layers","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(c). Describe the layers of the SDN controller and their roles. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q5a","title":"Q5(a) · BGP topology views","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(a). Provider networks A, B and C connect in a triangle; W attaches to A, X to B and C, and Y to C. From the path information reaching stub networks W and X, draw their respective topology views and justify them. The paper supplies Y’s view as W–A–C with C–X and C–Y. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q5b","title":"Q5(b) · Symmetric and public-key cryptography","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(b). Compare symmetric-key and public-key cryptography from the perspective of the services they provide. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q5c","title":"Q5(c) · CDN placement and server selection","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(c). Describe the two CDN server-placement philosophies and non-network factors in CDN server selection. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q6a","title":"Q6(a) · Incomplete multiple-access question","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(a). Six messages arrive at different nodes at t = 0.3, 1.7, 1.8, 2.5, 4.2, 4.6. Each transmission takes one time unit; no retransmission is attempted until after t = 5. [The scan ends here before the protocol and requested tasks.] <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>The recovered page gives arrivals but stops before the protocol and requested task. Page6 is needed for an exact answer. Guessing ALOHA or CSMA from another paper would silently change this question. The complete, separately identified older papers contain solved examples of each protocol.</p></div></section>"}]},{"id":"paper-2022-ai-final","title":"2022-11-16 · AI-only Sem V","unit":"Historical AI paper","scope":"Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.","sections":[{"id":"q1a","title":"Q1(a) · Store-and-forward delay","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(a). A 1000-bit packet crosses three store-and-forward links. Every link has rate 2 Mbps and propagation delay 1 ms. Ignore other delays. Find the end-to-end delay. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>One packet, L=1000 bits;3 links;rate2000000 bits/s;propagation1ms/link;store-and-forward.</p><h3>To find</h3><p>Total time until the final packet bit reaches the destination.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/73c28ce2abb77cac.svg\" alt=\"T=\\sum_{i=1}^{3}(L/R_i+d_{prop,i})\" style=\"width:22.999ex;height:6.711ex\" loading=\"lazy\" decoding=\"async\"></div><p>Each router must receive the complete packet before sending it onward, so all three serialization times count.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Calculate serialization on one link</h3><p>1000/2000000 seconds=0.0005s=0.5ms.</p></div><div class=\"step\"><h3>Step 2. Add propagation per link</h3><p>0.5+1=1.5ms.</p></div><div class=\"step\"><h3>Step 3. Add all three links</h3><p>3×1.5=<strong>4.5ms</strong>. Queuing/processing are ignored as instructed.</p></div></div></section>"},{"id":"q1b","title":"Q1(b) · Token passing and ideal broadcast access","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(b). State four desirable characteristics of a broadcast channel. Which does token passing have, and why? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q1c","title":"Q1(c) · Priority scheduling","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(c). Packets arrive as shown: packet 1 before t=0; packets 2,3,4 during (0,1), in that order; packet 5 during (2,3); packets 6,7 during (3,4), in that order. One packet takes one slot and starts only at the next slot boundary after arrival. Packets 2,3,5,7 have priority over 1,4,6; use FIFO within each priority class. Give and justify departures at t=1,2,3,4,5,6,7 as seven ordered digits. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Arrival groups in the question; one-unit service; slot-boundary starts; FIFO inside each queue.</p><h3>To find</h3><p>Departure order at t=1 through7.</p><h3>Formula and why</h3><p>At each slot start, consider only packets that have already arrived.</p><p>Strict priority chooses the high queue whenever it is nonempty. A running packet is not preempted.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Apply the queue rule at each boundary</h3><div class=\"table-wrap\"><table><thead><tr><th>Service interval</th><th>Departure packet</th><th>Reason</th></tr></thead><tbody><tr><td>[0,1)</td><td>1</td><td>Only1 is available.</td></tr><tr><td>[1,2)</td><td>2</td><td>High-priority2 is oldest.</td></tr><tr><td>[2,3)</td><td>3</td><td>High-priority3 precedes low-priority4.</td></tr><tr><td>[3,4)</td><td>5</td><td>High-priority5 has arrived.</td></tr><tr><td>[4,5)</td><td>7</td><td>High-priority7 precedes low-priority4 and6.</td></tr><tr><td>[5,6)</td><td>4</td><td>No high-priority packet remains; send oldest low4.</td></tr><tr><td>[6,7)</td><td>6</td><td>Send remaining low6.</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. Write the required ordered digits</h3><p><strong>1 2 3 5 7 4 6</strong></p></div></div></section>"},{"id":"q1d","title":"Q1(d) · TCP flow control","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(d). What is flow control in TCP and how is it implemented? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Transmission Control Protocol (TCP)</strong> provides reliable ordered byte-stream communication between two endpoints over an unreliable IP service. It repairs many network losses while the connection remains viable; a failed connection still must be handled by the application.</p><ul><li>Connection-oriented: state is established between endpoints before ordinary data transfer.</li><li>Reliable, ordered <strong>byte stream</strong>: sequence numbers, acknowledgements and retransmission handle loss; application message boundaries are not preserved.</li><li>Full duplex: each direction has its own byte sequence and ACK information.</li><li>Receiver flow control: advertised receive window limits data the receiver can accept.</li><li>Congestion control: the sender also limits sending based on network conditions.</li><li>Checksum detects corruption; ports multiplex connections. Reliability does not equal encryption.</li><li>Segmentation divides stream bytes into transport segments; buffering and retransmission reconstruct the ordered stream.</li></ul><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-tcp.81a8dfb693.svg\" width=\"820\" height=\"569\" alt=\"TCP header: minimum 20 bytes\" loading=\"lazy\" decoding=\"async\"></div><figcaption>TCP base header; optional fields follow the minimum 20 bytes.</figcaption></figure><table><thead><tr><th scope=\"col\">Field</th><th scope=\"col\">Meaning</th></tr></thead><tbody><tr><td>Source/destination ports (16 each)</td><td>Identify process endpoints</td></tr><tr><td>Sequence number (32)</td><td>First data-byte number in this segment; SYN/FIN also occupy sequence space</td></tr><tr><td>Acknowledgement number (32)</td><td>Next sequence number expected when ACK flag is set</td></tr><tr><td>Data offset (4)</td><td>TCP header length in 32-bit words; minimum 5 → 20 bytes</td></tr><tr><td>Flags</td><td>SYN establishes; ACK validates acknowledgement; FIN closes a sending direction; RST aborts; others have defined purposes</td></tr><tr><td>Window (16 base field)</td><td>Advertised receive window; scaling can be negotiated</td></tr><tr><td>Checksum (16)</td><td>Covers TCP header/data and pseudo-header</td></tr><tr><td>Urgent pointer (16)</td><td>Used with URG for the urgent indication</td></tr><tr><td>Options/padding</td><td>Optional features such as MSS; align header to 32-bit words</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>If a file-transfer application writes 100 bytes twice, the peer may read 200 bytes together or in smaller chunks. TCP preserves byte order, not the boundaries of those two writes.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> TCP bytes count karta hai; writes ke borders preserve nahi.</p><p><strong>Mechanism:</strong> the receiver advertises free buffer space as rwnd. The sender limits outstanding unacknowledged bytes to the advertised window, subject also to congestion control. ACKs move the window; a zero window pauses ordinary sending, with persist probes to learn when space reopens. For example, with4000 free bytes and1000 already outstanding, at most3000 more bytes can be outstanding under flow control. Flow control protects the receiver; congestion control protects the network.</p></div></section>"},{"id":"q2a","title":"Q2(a) · HTTP delay comparison","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(a). An HTTP client knows the server IP, but has no recent TCP connection. GET transmission time is zero; each object takes 1/2 RTT to transmit. Include connection setup, request/response propagation and object transmission. (1) Find the time to download the base object alone. (2) The base object references one JPEG, downloaded after the HTML using HTTP/1.0. Find the total time to download both. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Known IP; new initial TCP connection; zero GET transmission; each object transmission=0.5 RTT.</p><h3>To find</h3><p>Time to obtain the base object and then the pair of objects.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/174653a5aa0dead0.svg\" alt=\"T_{object}=T_{setup}+RTT+T_{transmission}\" style=\"width:35.509ex;height:2.211ex\" loading=\"lazy\" decoding=\"async\"></div><p>A referenced object cannot be requested until the HTML reveals it. HTTP/1.0 here uses a fresh connection per object; persistent HTTP/1.1 reuses one.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Download base HTML</h3><p>1 RTT for TCP setup + 1 RTT for GET/first response bit + 0.5 RTT to transmit = <strong>2.5 RTT</strong>.</p></div><div class=\"step\"><h3>Step 2. Download referenced JPEG</h3><p>1 RTT for another TCP setup + 1 RTT for GET/response + 0.5 RTT transmission = 2.5 RTT.</p></div><div class=\"step\"><h3>Step 3. Add sequential delays</h3><p><strong>Total = 2.5+2.5=5 RTT</strong>. DNS adds zero here because the IP address is already known.</p></div></div></section>"},{"id":"q2bi","title":"Q2(b)(i) · Block coding capacity","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(b)(i). In a block coding scheme k=4 and n=5. Find the number of datawords and codewords. How many datawords are successfully received? <span class=\"marks\">[4 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p><strong>Source note:</strong> The phrase “successfully received” does not specify a channel/error event. The answer distinguishes the 16 valid encoded words from the 32 possible received 5-bit patterns.</p><h3>Given</h3><p>k=4 data bits; n=5 coded bits.</p><h3>To find</h3><p>Dataword count, possible received words, valid codewords. </p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/6ac9b03072926d25.svg\" alt=\"N_{data}=2^k,\\quad N_{possible}=2^n,\\quad N_{valid}=2^k\" style=\"width:40.312ex;height:2.694ex\" loading=\"lazy\" decoding=\"async\"></div><p>A one-to-one encoder maps every dataword to exactly one valid codeword. The remaining n-bit patterns are not valid codewords.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Count datawords</h3><p>2⁴=16.</p></div><div class=\"step\"><h3>Step 2. Count all 5-bit patterns</h3><p>2⁵=32 possible received patterns; only16 are selected valid codewords.</p></div><div class=\"step\"><h3>Step 3. Interpret successful reception carefully</h3><p>All16 distinct datawords can be represented and recovered when received correctly. The question gives no channel outcomes, so an actual count of successful transmissions cannot be calculated. Invalid patterns indicate an error; an error that changes one valid word to another can go undetected.</p></div></div></section>"},{"id":"q2bii","title":"Q2(b)(ii) · CRC encoder and decoder","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(b)(ii). Explain the principle and working of cyclic redundancy check with a neat encoder and decoder diagram. <span class=\"marks\">[6 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>A <strong>Cyclic Redundancy Check (CRC)</strong> treats a binary message as a polynomial over GF(2). Addition and subtraction are XOR: 0⊕0=0, 1⊕0=1, 0⊕1=1, 1⊕1=0. There are no carries or borrows. A degree-r generator contains r+1 bits, with leading and constant coefficients 1.</p><div class=\"math-display\"><img src=\"math/5edc4316a910e4aa.svg\" alt=\"T(x)=x^rM(x)\\oplus R(x),\\quad R(x)=x^rM(x)\\bmod G(x)\" style=\"width:51.893ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><ol><li>Convert each polynomial coefficient into a bit, including zero coefficients for missing powers.</li><li>Append r zero bits to the message, because multiplying by x^r shifts it left r places.</li><li>Align the generator’s leading 1 with the current leading 1; XOR and repeat until fewer than r+1 significant bits remain. Pad the remainder to exactly r bits.</li><li>Replace the appended zeros with the remainder. The resulting transmitted frame is divisible by the generator.</li><li>The receiver divides the entire received frame by the same generator without appending more zeros. A nonzero remainder proves a detected error. Zero means no error detected; a nonzero error polynomial divisible by the generator can pass.</li></ol><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-crc.24705171b3.svg\" width=\"820\" height=\"660\" alt=\"CRC sender and receiver\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Sender appends remainder; receiver checks divisibility.</figcaption></figure><p>A degree-r generator with nonzero constant term detects every burst of length at most r. Generators containing factor (x+1) detect every odd number of bit errors. Longer-error guarantees depend on the polynomial and frame length; CRC is not a general correction method.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Generator 1101 has degree 3, so append three zeros, not four. A 3-bit remainder such as 001 must keep its leading zeros.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> CRC mein subtract bhi XOR; receiver par full frame divide.</p><div class=\"table-wrap\"><table><tbody><tr><td><strong>Data + r zero bits</strong></td><td>→</td><td><strong>Modulo-2 divide by generator</strong></td><td>→</td><td><strong>Append r-bit remainder</strong></td><td>→</td><td><strong>Receiver divides full codeword</strong></td><td>→</td><td><strong>Zero remainder: no detected error</strong></td></tr></tbody></table></div></div></section>"},{"id":"q3a","title":"Q3(a) · Dijkstra from t","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(a). Using Dijkstra’s algorithm, determine the shortest path from t to all nodes. Show all necessary steps; the original graph’s complete edge list is reproduced below. <span class=\"marks\">[10 marks]</span></h3><h3>Original diagram data</h3><div class=\"table-wrap\"><table><thead><tr><th>Edge endpoint1</th><th>Endpoint2</th><th>Cost</th></tr></thead><tbody><tr><td>z</td><td>x</td><td>8</td></tr><tr><td>z</td><td>y</td><td>12</td></tr><tr><td>x</td><td>y</td><td>6</td></tr><tr><td>x</td><td>v</td><td>3</td></tr><tr><td>x</td><td>w</td><td>6</td></tr><tr><td>y</td><td>v</td><td>8</td></tr><tr><td>y</td><td>t</td><td>7</td></tr><tr><td>v</td><td>t</td><td>4</td></tr><tr><td>v</td><td>u</td><td>3</td></tr><tr><td>v</td><td>w</td><td>4</td></tr><tr><td>w</td><td>u</td><td>3</td></tr><tr><td>t</td><td>u</td><td>2</td></tr></tbody></table></div><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>The original diagram is undirected. All edge labels are reproduced below. Source = t.</p><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/old-ai-cn-2022-11-16-ai-q3a.503e410dd7.svg\" width=\"720\" height=\"460\" alt=\"Original undirected question graph: every edge weight retained; source t\" loading=\"lazy\" decoding=\"async\"></div><div class=\"table-wrap\"><table><thead><tr><th>From</th><th>To</th><th>Cost</th></tr></thead><tbody><tr><td>z</td><td>x</td><td>8</td></tr><tr><td>z</td><td>y</td><td>12</td></tr><tr><td>x</td><td>y</td><td>6</td></tr><tr><td>x</td><td>v</td><td>3</td></tr><tr><td>x</td><td>w</td><td>6</td></tr><tr><td>y</td><td>v</td><td>8</td></tr><tr><td>y</td><td>t</td><td>7</td></tr><tr><td>v</td><td>t</td><td>4</td></tr><tr><td>v</td><td>u</td><td>3</td></tr><tr><td>v</td><td>w</td><td>4</td></tr><tr><td>w</td><td>u</td><td>3</td></tr><tr><td>t</td><td>u</td><td>2</td></tr></tbody></table></div><h3>To find</h3><p>Shortest distance, complete route and predecessor for every node from t.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/e31cde29472d2c2d.svg\" alt=\"d(v)\\leftarrow\\min(d(v),d(u)+w(u,v))\" style=\"width:31.899ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Relaxation replaces a tentative route when going through u is cheaper. Dijkstra settles the unvisited node of least tentative distance. Nonnegative edge costs make the settled distance final. Equal-distance nodes may be settled in either order.</p><div class=\"step\"><h3>Step 1. Initialize and relax</h3><div class=\"table-wrap\"><table><thead><tr><th>Pass / settled node</th><th>Strict improvements</th><th>t</th><th>u</th><th>v</th><th>w</th><th>x</th><th>y</th><th>z</th></tr></thead><tbody><tr><td>0</td><td>Initial</td><td>0</td><td>∞</td><td>∞</td><td>∞</td><td>∞</td><td>∞</td><td>∞</td></tr><tr><td>t</td><td>u←t: 0+2=2; y←t: 0+7=7; v←t: 0+4=4</td><td>0</td><td>2</td><td>4</td><td>∞</td><td>∞</td><td>7</td><td>∞</td></tr><tr><td>u</td><td>w←u: 2+3=5</td><td>0</td><td>2</td><td>4</td><td>5</td><td>∞</td><td>7</td><td>∞</td></tr><tr><td>v</td><td>x←v: 4+3=7</td><td>0</td><td>2</td><td>4</td><td>5</td><td>7</td><td>7</td><td>∞</td></tr><tr><td>w</td><td>No change</td><td>0</td><td>2</td><td>4</td><td>5</td><td>7</td><td>7</td><td>∞</td></tr><tr><td>x</td><td>z←x: 7+8=15</td><td>0</td><td>2</td><td>4</td><td>5</td><td>7</td><td>7</td><td>15</td></tr><tr><td>y</td><td>No change</td><td>0</td><td>2</td><td>4</td><td>5</td><td>7</td><td>7</td><td>15</td></tr><tr><td>z</td><td>No change</td><td>0</td><td>2</td><td>4</td><td>5</td><td>7</td><td>7</td><td>15</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. Read predecessors backwards, then reverse</h3><div class=\"table-wrap\"><table><thead><tr><th>Destination</th><th>Distance</th><th>Previous</th><th>Route</th></tr></thead><tbody><tr><td>t</td><td>0</td><td>—</td><td>t</td></tr><tr><td>u</td><td>2</td><td>t</td><td>t → u</td></tr><tr><td>v</td><td>4</td><td>t</td><td>t → v</td></tr><tr><td>w</td><td>5</td><td>u</td><td>t → u → w</td></tr><tr><td>x</td><td>7</td><td>v</td><td>t → v → x</td></tr><tr><td>y</td><td>7</td><td>t</td><td>t → y</td></tr><tr><td>z</td><td>15</td><td>x</td><td>t → v → x → z</td></tr></tbody></table></div></div><p>A tie between two equally short paths is valid; this table retains the first predecessor on equal distances.</p></div></section>"},{"id":"q3bi","title":"Q3(b)(i) · UDP checksum limitations","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(b)(i). A UDP receiver computes the Internet checksum and it matches the checksum carried in the segment. Can it be absolutely certain that no bit errors occurred? Explain. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p><strong>No.</strong> An Internet checksum compresses a long message into16 bits, so different messages can have the same sum. Compensating changes can leave the one’s-complement sum unchanged. For example, word pair0001,0002 and0000,0003 (shown in hexadecimal) both sum to0003 and have the same complement checksum. A matching checksum means “no error detected”; it does not guarantee bit-for-bit identity. UDP does not automatically repair errors or retransmit lost data.</p></div></section>"},{"id":"q3bii","title":"Q3(b)(ii) · TCP demultiplexing","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(b)(ii). Which datagram and segment header fields are used when demultiplexing data to a TCP socket? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>IP delivers a packet toward a host interface. The transport layer delivers application data to a <strong>process endpoint</strong>, identified using a port. A socket endpoint is commonly described by IP address and port; the protocol also matters. TCP distinguishes connections by source IP/port and destination IP/port.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-ports.f496c69028.svg\" width=\"820\" height=\"515\" alt=\"Transport: from hosts to application processes\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Several applications share IP connectivity; ports separate their transport endpoints.</figcaption></figure><ol><li>At the sender, transport multiplexing accepts data from several application sockets and adds the appropriate header.</li><li>A server normally listens on a known service port; a client commonly chooses a temporary local port.</li><li>At the receiver, demultiplexing uses protocol/header information to deliver data to the appropriate socket.</li><li>A TCP connection is bidirectional and maintains state. Two clients can contact the same server port because their connection tuples differ. UDP demultiplexing is connectionless at the protocol level; applications can still keep their own state.</li></ol><table><thead><tr><th scope=\"col\">Identifier</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>MAC address</td><td>Delivery on a local link</td></tr><tr><td>IP address</td><td>Network-layer interface/addressing</td></tr><tr><td>Port number</td><td>Transport-layer application endpoint</td></tr><tr><td>Domain name</td><td>Application-level naming resolved through DNS</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>Laptop 192.0.2.10:51000 contacts server 198.51.100.20:443. Another browser connection uses local port 51001, so the server can distinguish both TCP connections.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> IP host tak; port process tak.</p><p>An established TCP connection is identified by source IP, source port, destination IP, destination port. IP addresses come from the IP header; port numbers come from the TCP header. The transport protocol distinguishes TCP from UDP.</p><p>A web server’s listening socket accepts connections on port80. Accepted connections from A and B use distinct connection sockets/state, although both server-side local ports remain80. Different remote IP/port pairs distinguish them. Persistent connections reuse their own established socket for subsequent requests.</p></div></section>"},{"id":"q4a","title":"Q4(a) · rdt3.0 global transition sequence","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(a). Use the printed rdt3.0 alternating-bit sender/receiver: S0 sends data0; S3 accepts ACK0; S5 sends data1; S8 accepts ACK1; S2/S7 are timeout retransmissions; S1/S6 ignore corrupt or wrong ACKs. Receiver R0 accepts new data0 and sends ACK0; R2 accepts new data1 and sends ACK1; R3/R1 handle corrupt or duplicate data while waiting for 0/1 respectively. Determine the complete interleaved transition sequence to deliver two messages with no errors, including the ACK for the second message. Start S0, R0 and justify each transition. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Two messages; no DATA or ACK errors; original FSM transition labels in the question.</p><h3>To find</h3><p>The global interleaved transition sequence, including the final ACK.</p><h3>Formula and why</h3><p>Send DATA → receive and acknowledge DATA → receive matching ACK → advance the sequence bit.</p><p>Each successful ACK permits the sender to send the next new message.</p><h3>Solution</h3><p>The sequence bit labels the outstanding DATA packet. ACK0 confirms data0 and ACK1 confirms data1 in this printed FSM; these are not TCP cumulative byte numbers. An ACK loss does not advance the sender. A duplicate data packet is acknowledged again but not delivered twice.</p><div class=\"table-wrap\"><table><tbody><tr><td><strong>Send0</strong></td><td>→</td><td><strong>ACK0</strong></td><td>→</td><td><strong>Send1</strong></td><td>→</td><td><strong>ACK1</strong></td></tr></tbody></table></div><div class=\"table-wrap\"><table><thead><tr><th>Order</th><th>Transition</th><th>Action</th></tr></thead><tbody><tr><td>1</td><td>S0</td><td>Send data0; start timer</td></tr><tr><td>2</td><td>R0</td><td>Accept data0; deliver; send ACK0</td></tr><tr><td>3</td><td>S3</td><td>Accept ACK0; stop timer</td></tr><tr><td>4</td><td>S5</td><td>Send data1; start timer</td></tr><tr><td>5</td><td>R2</td><td>Accept data1; deliver; send ACK1</td></tr><tr><td>6</td><td>S8</td><td>Accept ACK1; stop timer</td></tr></tbody></table></div><p><strong>Required sequence: S0, R0, S3, S5, R2, S8.</strong> For the four placeholders: t1=S3, t2=S5, t3=R2, t4=S8.</p></div></section>"},{"id":"q4bi","title":"Q4(b)(i) · CDN placement","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(b)(i). CDNs typically adopt one of two server-placement philosophies. List and discuss them briefly. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q4bii","title":"Q4(b)(ii) · CDN server selection","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(b)(ii). Besides delay, loss and bandwidth, what other factors enter a CDN server-selection strategy? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q5a","title":"Q5(a) · BGP path views","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(a). Provider networks A, B and C form a triangle. W attaches to A; X attaches to B and C; Y attaches to C. Determine the views of the topology at W and X from the path information they receive. Justify using the supplied Y view W–A–C, C–X, C–Y. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q5bi","title":"Q5(b)(i) · Access technologies","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(b)(i). List and explain four access technologies. Classify each as home access, enterprise access or wide-area wireless access. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q5bii","title":"Q5(b)(ii) · Ethernet physical media","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(b)(ii). What physical media can Ethernet run over? Explain in detail. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Guided media</strong> constrain signals to a physical path: twisted pair, coaxial cable and optical fiber. <strong>Unguided media</strong> carry electromagnetic waves through free space: radio, microwave and infrared. Wireless bandwidth and reach depend on frequency, power, antenna, obstacles and regulations; media names alone do not fix a speed.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-media.aff26cd0b5.svg\" width=\"820\" height=\"515\" alt=\"Transmission media: guided and unguided\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Transmission media classification.</figcaption></figure><table><thead><tr><th scope=\"col\">Medium</th><th scope=\"col\">Two key characteristics</th><th scope=\"col\">Limitations / use</th></tr></thead><tbody><tr><td>Twisted pair</td><td>Electrical signal; pairs twisted to reduce interference</td><td>Low-cost LAN access; distance/noise limits depend on category and design</td></tr><tr><td>Coaxial cable</td><td>Shielded central conductor; greater shielding than basic unshielded pair</td><td>Bulkier; cable broadband and legacy shared LANs</td></tr><tr><td>Optical fiber</td><td>Light in glass/plastic; high capacity with immunity to electromagnetic interference</td><td>Transceivers and careful splicing/bend control needed; backbone links</td></tr><tr><td>Radio waves</td><td>Wireless propagation; many bands support broad/non-line-of-sight coverage</td><td>Interference, shared spectrum and security configuration matter; Wi-Fi/mobile</td></tr><tr><td>Terrestrial microwave</td><td>Directional antennas; typically line of sight</td><td>Alignment and obstructions matter; point-to-point backhaul</td></tr><tr><td>Satellite microwave</td><td>Wide coverage through relay in space</td><td>Cost and latency depend strongly on orbit/system; remote connectivity</td></tr><tr><td>Infrared</td><td>Short-range light; usually blocked by walls</td><td>Limited coverage; short-range indoor/remote-control links</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A university can connect buildings with fiber, desktops with twisted pair and mobile students with managed Wi-Fi. Satellite access is an option where suitable terrestrial links are unavailable.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Guided = cable path; unguided = free-space waves.</p>\r\n<div class=\"answer\"><p>Transmission media are classified into guided media (twisted pair, coaxial cable, optical fiber) and unguided media (radio, microwave, infrared).</p><p>Optical fiber carries data as light in a core surrounded by cladding. It is a guided medium. Single-mode fiber supports one main propagation mode and is used for long/high-capacity links; multimode supports multiple modes and is often used over shorter distances.</p><table><thead><tr><th scope=\"col\">Advantages</th><th scope=\"col\">Disadvantages / design costs</th></tr></thead><tbody><tr><td>High data capacity and low attenuation over suitable links</td><td>Optical transceivers, connectors and splicing add cost/skill requirements</td></tr><tr><td>Immune to electromagnetic interference; no electrical crosstalk</td><td>Tight bends, dirty connectors and poor installation increase loss</td></tr><tr><td>Electrical isolation between buildings</td><td>Fiber is mechanically sensitive and requires appropriate protection</td></tr><tr><td>Harder to tap casually than an unprotected radio channel</td><td>It is not automatically confidential; encryption/access control remain necessary</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A campus backbone can use fiber between buildings to avoid electrical interference and achieve high capacity. Installers still need to respect bend radius and test connectors.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Fiber light carry karta hai; immunity means no EMI, not no security risk.</p><p>Ethernet can use balanced twisted-pair copper (e.g.100BASE-TX/1000BASE-T), optical fiber (e.g.1000BASE-SX/LX), and historical coaxial cable (10BASE2/10BASE5). Twisted pair is economical for typical building runs; fiber supports longer reach and immunity to electromagnetic interference. The exact reach and rate depend on the Ethernet standard, not simply the word “fiber”.</p></div></section>"},{"id":"q6a","title":"Q6(a) · CSMA/CD arrival timeline","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(a). Six messages arrive at different nodes at t = 0.3, 1.7, 1.8, 2.5, 4.2, 4.6. Each transmission takes one time unit; no retransmission is attempted until after t = 5. For CSMA/CD, identify successful packets. Propagation between nodes takes 0.2 units. If a node senses busy or experiences collision, it waits until after t=5 before retrying. A collision stops transmission immediately, but the last bit still propagates for 0.2 units. Explain carefully. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Arrivals0.3,1.7,1.8,2.5,4.2,4.6; one-unit frames; no retries before time5.</p><h3>To find</h3><p>Successful packet numbers and each relevant start/collision decision.</p><h3>Formula and why</h3><p>Pure ALOHA sends immediately. Slotted ALOHA waits for the next slot. CSMA/CD senses only signals that have had time to propagate.</p><p>Check intervals, not just whether arrival times differ. Any collision corrupts a frame; collision detection shortens the wasted transmission but does not make that frame successful.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Trace every message</h3><div class=\"table-wrap\"><table><thead><tr><th>Packet</th><th>Transmission / slot</th><th>Reason</th><th>Outcome</th></tr></thead><tbody><tr><td>1</td><td>0.3–1.3</td><td>Signal clears other nodes at1.5</td><td>Success</td></tr><tr><td>2</td><td>1.7–2.0</td><td>At1.7 channel idle; detects3 at1.8+0.2=2.0</td><td>Collision</td></tr><tr><td>3</td><td>1.8–1.9</td><td>Cannot sense2 until1.9; then stops</td><td>Collision</td></tr><tr><td>4</td><td>2.5–3.5</td><td>Last collision signal clears by2.2, so idle</td><td>Success</td></tr><tr><td>5</td><td>4.2–5.2</td><td>Previous signal cleared by3.7</td><td>Success</td></tr><tr><td>6</td><td>No transmission</td><td>At4.6 senses5, whose signal arrives4.4</td><td>Busy; waits</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. State successful messages</h3><p><strong>1, 4, 5</strong>. </p></div></div></section>"},{"id":"q6bi","title":"Q6(b)(i) · Classful addresses and masks","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(b)(i). List and explain IP address classes and the purpose of a subnet mask. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>An IPv4 address identifies an IP interface. The network prefix selects the destination network; remaining bits identify an address within it. Classful addressing is historical; modern routing uses explicit CIDR prefixes.</p><div class=\"table-wrap\"><table><thead><tr><th>Class</th><th>First octet</th><th>Default mask</th><th>Network / host split</th><th>Purpose</th></tr></thead><tbody><tr><td>A</td><td>1–126 (ordinary unicast)</td><td>255.0.0.0 (/8)</td><td>8 / 24 bits</td><td>Large historical unicast networks; 0 and 127 reserved</td></tr><tr><td>B</td><td>128–191</td><td>255.255.0.0 (/16)</td><td>16 / 16 bits</td><td>Medium historical unicast networks</td></tr><tr><td>C</td><td>192–223</td><td>255.255.255.0 (/24)</td><td>24 / 8 bits</td><td>Small historical unicast networks</td></tr><tr><td>D</td><td>224–239</td><td>No unicast default mask</td><td>Not network/host class split</td><td>Multicast</td></tr><tr><td>E</td><td>240–255</td><td>No unicast default mask</td><td>Not normal unicast allocation</td><td>Reserved/experimental; special addresses exist</td></tr></tbody></table></div><p>Example: 114.34.2.8 is class A with network 114.0.0.0 and host portion 34.2.8. Class does not override an explicitly supplied CIDR prefix.</p></div></section>"},{"id":"q6bii","title":"Q6(b)(ii) · CIDR block","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(b)(ii). One address in an allocated block is 210.90.12.7/20. Find its first address, last address and number of addresses. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>210.90.12.7/20</p><h3>To find</h3><p>First and last addresses and total block size.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/06561cae3cdafd6c.svg\" alt=\"N=2^{32-p}\" style=\"width:9.994ex;height:2.185ex\" loading=\"lazy\" decoding=\"async\"></div><p>p is the prefix length. The remaining host bits vary through every combination. The network address is the first address; setting all host bits to one gives the last address.</p><div class=\"step\"><h3>Step 1. Find host bits</h3><p>32 − 20 = 12. N = 4096.</p></div><div class=\"step\"><h3>Step 2. Locate the aligned block</h3><p>Mask = 255.255.240.0. The first varying octet is octet 3; its block width is 16. The supplied value 12 lies in the interval 0–15. Keep earlier octets fixed. Set any later octets to 0 for the first address and 255 for the last address.</p></div><div class=\"step\"><h3>Step 3. Write the result</h3><p>First = <strong>210.90.0.0</strong>; last = <strong>210.90.15.255</strong>; total = <strong>4096</strong> addresses. Usual usable host range: 210.90.0.1–210.90.15.254.</p></div></div></section>"},{"id":"q7a","title":"Q7(a) · Circuit switching advantage","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(a). What advantage does a circuit-switched network have over a packet-switched network? Give an example. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Switching selects how data passes through intermediate network nodes from a source to a destination.</p><p><strong>Simple meaning.</strong> Raasta reserve karna, poora message ruk-ruk ke bhejna, ya chhote packets bhejna—yeh teen ideas hain.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/switching.2b51f856d9.svg\" width=\"820\" height=\"425\" alt=\"Three switching techniques: what is forwarded?\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Circuit, message and packet switching</figcaption></figure><h2>Understand it step by step</h2><ol><li><strong>Circuit switching:</strong> establish a circuit, reserve resources, transfer data, then release the circuit. Capacity is dedicated even during a silent period.</li><li><strong>Message switching:</strong> each intermediate node receives the entire message before forwarding it. Large messages require large buffers and can delay later messages.</li><li><strong>Packet switching:</strong> divide data into smaller packets. Nodes forward packets individually; different links can carry successive packets at the same time.</li><li>The Internet uses packet switching. A traditional circuit-switched telephone call illustrates the circuit concept. Many current calls use packet-based networks, so do not label every phone call circuit-switched.</li></ol><table><thead><tr><th scope=\"col\">Aspect</th><th scope=\"col\">Circuit switching</th><th scope=\"col\">Message switching</th><th scope=\"col\">Packet switching</th></tr></thead><tbody><tr><td>Unit handled</td><td>Continuous stream on established circuit</td><td>Whole message</td><td>Small packets</td></tr><tr><td>Resource use</td><td>Capacity reserved along a circuit</td><td>Shared; message stored at each intermediate node</td><td>Shared; each packet stored/forwarded in this model</td></tr><tr><td>Setup</td><td>Required before data transfer</td><td>No circuit setup required</td><td>Datagram: no connection setup; virtual circuit: setup</td></tr><tr><td>Delay</td><td>Setup delay, then relatively predictable service</td><td>Large store-and-forward delay for long messages</td><td>Variable delay; packet pipeline can reduce completion time</td></tr><tr><td>Main limitation</td><td>Reserved capacity can be idle</td><td>Large buffers; unsuitable for tight delay needs</td><td>Headers, possible queueing/loss; datagrams may reorder</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A campus transferring web pages and files has bursty traffic. Packet switching allows multiple users to share link capacity instead of reserving a circuit that remains idle between bursts.</p></aside><div class=\"answer\"><p>For ordinary bursty office data, packet switching is generally appropriate because resources are shared among active transfers. The design must still account for queueing, loss and the required service quality.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Circuit reserves; message waits whole; packets pipeline.</p><p><strong>Choice:</strong> circuit switching reserves a path and capacity before communication, giving predictable service and avoiding packet-queue contention after setup. A dedicated voice circuit is a standard example. It sacrifices statistical sharing and may waste reserved capacity when silent.</p></div></section>"},{"id":"q7b","title":"Q7(b) · HTTP cookies","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(b). An e-commerce site wants to keep a purchase record for each customer. Illustrate how cookies can do this. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><table><thead><tr><th scope=\"col\">Concept</th><th scope=\"col\">Explanation</th><th scope=\"col\">Example</th></tr></thead><tbody><tr><td>GET</td><td>Retrieve the selected representation</td><td>Read a page</td></tr><tr><td>POST</td><td>Ask the resource to process submitted content</td><td>Submit a form</td></tr><tr><td>PUT / DELETE</td><td>Replace target representation / request removal according to server semantics</td><td>Update/delete an API resource</td></tr><tr><td>200 / 301 / 404 / 500</td><td>Success / permanent redirect / not found / server error</td><td>Read status before interpreting body</td></tr><tr><td>Persistent connection</td><td>Reuse a connection for multiple exchanges</td><td>Avoid repeated TCP setup for each image</td></tr><tr><td>Cookie/session token</td><td>Carry an identifier so the application can relate requests</td><td>Remain signed in</td></tr><tr><td>HTTPS</td><td>HTTP protected by authenticated encryption through TLS in common deployments</td><td>Protect credentials and content in transit</td></tr></tbody></table><p>A secure transport protects the connection; it does not prove that every server’s content is truthful. HTTP method semantics and application authorization still matter. For exam comparisons, separate HTTP semantics, connection lifetime and application session state.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A login page may send a session cookie after successful authentication. Later requests include it even though each HTTP request remains a separate protocol exchange.</p></aside></div><div class=\"table-wrap\"><table><tbody><tr><td><strong>First visit</strong></td><td>→</td><td><strong>Server creates customer/session ID</strong></td><td>→</td><td><strong>Set-Cookie header</strong></td><td>→</td><td><strong>Browser stores cookie</strong></td><td>→</td><td><strong>Later Cookie header</strong></td><td>→</td><td><strong>Server retrieves purchase record</strong></td></tr></tbody></table></div><p>Keep the purchase record in the server database keyed by a suitable identifier; the browser need only carry that identifier. Example: cookie customer=R81 links later visits to R81’s stored orders. HTTP requests remain independent at the protocol level; the application supplies continuity. Account login can restore the record when a cookie is absent.</p></div></section>"},{"id":"q7c","title":"Q7(c) · Selective Repeat","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(c). What is Selective Repeat? Explain its implementation with an example. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Selective Repeat (SR) ARQ</strong> accepts and buffers valid out-of-order frames inside the receiver window, acknowledges them individually and retransmits only missing/timed-out frames. In this answer ACK i means “frame i received”, unlike the next-expected cumulative ACK convention used for GBN.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-sr.5ae2b52b45.svg\" width=\"820\" height=\"674\" alt=\"SR W=4: individual ACKs and buffering\" loading=\"lazy\" decoding=\"async\"></div><figcaption>SR buffers 3 while waiting for 2; only 2 is retransmitted.</figcaption></figure><ol><li>For m=3 there are eight sequence numbers, 0…7. With equal sender and receiver windows, maximum W=2<sup>3−1</sup>=4. Both windows begin at 0 and span 0…3.</li><li>Sender sends 0,1,2,3. Receiver accepts 0 and 1, delivers them and advances its left edge to 2. Frame 2 is lost; frame 3 is stored and ACK 3 is sent.</li><li>Although 3 is acknowledged, the sender’s base cannot jump over missing 2. A timer for 2 expires; only frame 2 is retransmitted.</li><li>When 2 arrives, the receiver can deliver 2 and the buffered 3 in order, moving its window forward. Individual ACKs let the sender release the relevant stored copies.</li><li>Why half the space: with an incorrectly chosen W=5 in an eight-number space, receiving old 0…4 moves the receive window to {5,6,7,0,1}. If ACKs are lost, retransmitted old 0 or 1 could fall in the new window and be mistaken for new data. W=4 prevents these two consecutive windows from overlapping.</li><li>A repeated old frame can be acknowledged again without delivering it twice. SR needs more receiver storage and per-frame tracking than GBN.</li></ol><div class=\"math-display\"><img src=\"math/454034d348f17623.svg\" alt=\"W_s=W_r\\le 2^{m-1}\" style=\"width:16.921ex;height:2.357ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>A noisy long-delay link benefits from retransmitting only the missing frame, but the receiver must retain later frames and track which sequence numbers belong to its current window.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> SR selective resend; half sequence space keeps old and new separate.</p></div></section>"},{"id":"q7d","title":"Q7(d) · Destination-based forwarding","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(d). Router A connects H1 at interface 1, H2 at 2, router B at 3 and router C at 4. B and C each lead to D, and D leads to H3. (i) Show A’s forwarding entry sending all H3 traffic through interface 3. (ii) Can an ordinary destination-based table send H1→H3 through 3 but H2→H3 through 4? Explain. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><div class=\"table-wrap\"><table><thead><tr><th>Destination</th><th>A output interface</th></tr></thead><tbody><tr><td>H3 (its destination address/prefix)</td><td>3</td></tr></tbody></table></div><p>For part(ii), an ordinary destination-only forwarding lookup sees the same destination H3 for both packets, so it cannot make the requested distinction by sender. It would need policy/source-aware forwarding or a more general match-action rule. A simple table sending H3 to3 sends both H1 andH2 that way. The alternate path through4 exists physically but is not selected by source under the stated rule.</p></div></section>"}]},{"id":"paper-2023-jan-ai-reexam","title":"2023-01-27 · AI-only Sem V","unit":"Historical AI paper","scope":"Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.","sections":[{"id":"q1a","title":"Q1(a) · Shared bottleneck throughput","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(a). Ten server/client paths share middle link R=200 Mbps. Each server link Rs=25 Mbps and each client link Rc=50 Mbps. Assuming fair sharing and maximum server sending rates, find each pair’s maximum end-to-end throughput in Mbps. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>10 flows, server links 25 Mbps, client links 50 Mbps, shared link 200 Mbps.</p><h3>To find</h3><p>Maximum throughput of each flow.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/26062ae8bce5ae5e.svg\" alt=\"T=\\min(R_s,R_c,R/n)\" style=\"width:21.612ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>A flow cannot exceed any link on its path; fair sharing divides the common capacity among n active flows.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Convert and divide the shared capacity</h3><p>200 Mbps ÷ 10 = 20 Mbps per flow.</p></div><div class=\"step\"><h3>Step 2. Take the smallest per-flow capacity</h3><p>T=min(25,50,20)=<strong>20 Mbps</strong>.</p></div><p>Total delivered rate=10×20=200 Mbps.</p></div></section>"},{"id":"q1b","title":"Q1(b) · Ideal broadcast channel and slotted ALOHA","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(b). State four desirable characteristics of a broadcast channel. Which does slotted ALOHA have, and why? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><div class=\"table-wrap\"><table><thead><tr><th>Ideal characteristic</th><th>Slotted ALOHA</th></tr></thead><tbody><tr><td>One active node uses rate R</td><td>Yes, at slot boundaries with no collisions; an initial wait may occur</td></tr><tr><td>M active nodes each achieve R/M</td><td>Not in general: collisions and empty slots waste capacity</td></tr><tr><td>Decentralized without master or clock synchronization</td><td>No master is needed, but all nodes must synchronize slots</td></tr><tr><td>Simple</td><td>Yes: transmit at a slot boundary, then retry after random backoff</td></tr></tbody></table></div><p>The standard independent-attempt throughput maximum approaches1/e≈0.368 of the channel as the contender count becomes large, so it does not deliver ideal full utilization under contention.</p></div></section>"},{"id":"q1c","title":"Q1(c) · Round-robin scheduling","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(c). Set 1 contains packets 1,4,6; set 2 contains 2,3,5,7. Packet 1 arrives before t=0; 2,3,4 arrive during (0,1); 5 during (2,3); 6,7 during (3,4). Each packet takes one slot, starting at a slot boundary after arrival. Round-robin begins with set 1 and uses FIFO within a set. Give departures at t=1 through 7 and justify. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Arrival groups in the question; one-unit service; slot-boundary starts; FIFO inside each queue.</p><h3>To find</h3><p>Departure order at t=1 through7.</p><h3>Formula and why</h3><p>At each slot start, consider only packets that have already arrived.</p><p>Round robin alternates nonempty queues, skipping an empty queue.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Apply the queue rule at each boundary</h3><div class=\"table-wrap\"><table><thead><tr><th>Service interval</th><th>Departure packet</th><th>Reason</th></tr></thead><tbody><tr><td>[0,1)</td><td>1</td><td>Only packet1 has arrived.</td></tr><tr><td>[1,2)</td><td>2</td><td>Use set2: oldest is2.</td></tr><tr><td>[2,3)</td><td>4</td><td>Use set1: oldest is4.</td></tr><tr><td>[3,4)</td><td>3</td><td>Use set2: oldest is3.</td></tr><tr><td>[4,5)</td><td>6</td><td>Use set1:6 has arrived.</td></tr><tr><td>[5,6)</td><td>5</td><td>Use set2:oldest is5.</td></tr><tr><td>[6,7)</td><td>7</td><td>Set1 empty; set2 supplies7.</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. Write the required ordered digits</h3><p><strong>1 2 4 3 6 5 7</strong></p></div></div></section>"},{"id":"q1d","title":"Q1(d) · TCP congestion control","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(d). What is congestion control in TCP and how is it implemented? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>A TCP sender is limited by receiver capacity and network capacity. The <strong>receive window rwnd</strong> comes from the receiver; the <strong>congestion window cwnd</strong> is maintained by the sender. Roughly, allowed outstanding data is min(rwnd,cwnd), with the existing bytes in flight subtracted before sending new bytes.</p><div class=\"math-display\"><img src=\"math/e04fbf2fea600eab.svg\" alt=\"\\mathrm{new\\ allowance}=\\max(0,\\min(rwnd,cwnd)-\\mathrm{bytes\\ in\\ flight})\" style=\"width:58.216ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><ol><li>In classic slow start, cwnd grows rapidly as ACKs arrive; under a simplified round-based model it approximately doubles each RTT.</li><li>At the slow-start threshold, congestion avoidance grows more cautiously; classic additive increase is approximately one MSS per RTT.</li><li>Loss/timeout or an explicit congestion signal causes the sender to reduce its sending allowance. Exact recovery behaviour depends on the TCP congestion-control algorithm.</li><li>Fast retransmit can infer a missing segment from duplicate ACK evidence. It is distinct from waiting for a retransmission timeout.</li><li>The simplified Reno-style outline is supporting detail for the syllabus’s congestion-control topic, not a claim that all modern TCP stacks use an identical curve.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>If rwnd=32 KB and cwnd=12 KB, the network estimate limits outstanding bytes to about 12 KB. With 8 KB already in flight, only 4 KB of new data fits.</p></aside></div></div></section>"},{"id":"q2a","title":"Q2(a) · Persistent HTTP delay","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(a). An HTTP client knows the server IP, but has no recent TCP connection. GET transmission time is zero; each object takes 1/2 RTT to transmit. Include connection setup, request/response propagation and object transmission. (1) Find the delay for the base object alone. (2) The base object references one JPEG downloaded afterwards on the same persistent HTTP/1.1 connection. Find the total delay for both objects. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Known IP; new initial TCP connection; zero GET transmission; each object transmission=0.5 RTT.</p><h3>To find</h3><p>Time to obtain the base object and then the pair of objects.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/174653a5aa0dead0.svg\" alt=\"T_{object}=T_{setup}+RTT+T_{transmission}\" style=\"width:35.509ex;height:2.211ex\" loading=\"lazy\" decoding=\"async\"></div><p>A referenced object cannot be requested until the HTML reveals it. HTTP/1.0 here uses a fresh connection per object; persistent HTTP/1.1 reuses one.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Download base HTML</h3><p>1 RTT for TCP setup + 1 RTT for GET/first response bit + 0.5 RTT to transmit = <strong>2.5 RTT</strong>.</p></div><div class=\"step\"><h3>Step 2. Download referenced JPEG</h3><p>Existing TCP connection: 0 setup + 1 RTT for GET/response + 0.5 RTT transmission = 1.5 RTT.</p></div><div class=\"step\"><h3>Step 3. Add sequential delays</h3><p><strong>Total = 2.5+1.5=4 RTT</strong>. DNS adds zero here because the IP address is already known.</p></div></div></section>"},{"id":"q2bi","title":"Q2(b)(i) · Block-code received words","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(b)(i). For k=2,n=3, the encoding table is 00→000, 01→011, 10→101, 11→110. The sender sends dataword 01 as codeword 011. Explain the receiver outcome if it receives (a)111 and (b)000. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Sent data01, encoded011; valid codewords000,011,101,110.</p><h3>To find</h3><p>Receiver outcome for111 and000.</p><h3>Formula and why</h3><p>A receiver first checks membership in the valid-codeword set, then decodes a valid word.</p><p>This even-parity code detects any single-bit error but cannot identify a unique bit to correct.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Received111</h3><p>111 has odd parity and is not a valid word. Relative to011, one bit differs. The receiver detects an error and rejects/requests retransmission; it cannot uniquely infer the original data.</p></div><div class=\"step\"><h3>Step 2. Received000</h3><p>000 is a valid word and decodes to00. Relative to the actual sent011, two bits changed. Therefore this is an undetected error: the receiver accepts the wrong dataword00.</p></div></div></section>"},{"id":"q2bii","title":"Q2(b)(ii) · CRC and syndrome","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(b)(ii). Data 1001 is transmitted using G(x)=x³+x+1. (a) Find the transmitted codeword. (b) Explain the role of syndrome bits at the receiver. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Data = 1001; generator bits = 1011; degree r = 3.</p><h3>To find</h3><p>CRC remainder, complete transmitted frame and receiver check.</p><h3>Formula and why</h3><p>Append r zeros, divide using XOR (modulo 2), and replace those zeros with the r-bit remainder. XOR has no borrowing or carrying. A valid received codeword has remainder zero; the receiver does not append new zeros.</p><div class=\"step\"><h3>Step 1. Append zeros</h3><p>1001 → 1001000</p></div><div class=\"step\"><h3>Step 2. Perform XOR division</h3><div class=\"table-wrap\"><table><thead><tr><th>Leading position</th><th>Before XOR</th><th>Aligned generator</th><th>After XOR</th></tr></thead><tbody><tr><td>1</td><td>1001000</td><td>1011000</td><td>0010000</td></tr><tr><td>3</td><td>0010000</td><td>0010110</td><td>0000110</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 3. Build the frame</h3><p>Remainder = <strong>110</strong>. Transmit <strong>1001110</strong>.</p></div><div class=\"step\"><h3>Step 4. Divide the received frame</h3><div class=\"table-wrap\"><table><thead><tr><th>Position</th><th>Before</th><th>Generator</th><th>After</th></tr></thead><tbody><tr><td>1</td><td>1001110</td><td>1011000</td><td>0010110</td></tr><tr><td>3</td><td>0010110</td><td>0010110</td><td>0000000</td></tr></tbody></table></div><p>Receiver remainder = 000. No error is detected; this is not a guarantee that every possible corruption is detectable.</p></div></div></section>"},{"id":"q3a","title":"Q3(a) · Dijkstra from u","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(a). Using Dijkstra’s algorithm calculate shortest paths from u to all nodes, showing every step. The original undirected graph’s edges are reproduced below. <span class=\"marks\">[10 marks]</span></h3><h3>Original diagram data</h3><div class=\"table-wrap\"><table><thead><tr><th>Edge endpoint1</th><th>Endpoint2</th><th>Cost</th></tr></thead><tbody><tr><td>u</td><td>v</td><td>4</td></tr><tr><td>u</td><td>w</td><td>3</td></tr><tr><td>u</td><td>x</td><td>5</td></tr><tr><td>v</td><td>w</td><td>1</td></tr><tr><td>v</td><td>x</td><td>8</td></tr><tr><td>x</td><td>w</td><td>7</td></tr><tr><td>x</td><td>y</td><td>7</td></tr><tr><td>w</td><td>y</td><td>6</td></tr><tr><td>w</td><td>z</td><td>7</td></tr><tr><td>y</td><td>z</td><td>7</td></tr></tbody></table></div><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>The original diagram is undirected. All edge labels are reproduced below. Source = u.</p><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/old-ai-cn-2023-01-27-ai-q3a.e2a89263bf.svg\" width=\"720\" height=\"460\" alt=\"Original undirected question graph: every edge weight retained; source u\" loading=\"lazy\" decoding=\"async\"></div><div class=\"table-wrap\"><table><thead><tr><th>From</th><th>To</th><th>Cost</th></tr></thead><tbody><tr><td>u</td><td>v</td><td>4</td></tr><tr><td>u</td><td>w</td><td>3</td></tr><tr><td>u</td><td>x</td><td>5</td></tr><tr><td>v</td><td>w</td><td>1</td></tr><tr><td>v</td><td>x</td><td>8</td></tr><tr><td>x</td><td>w</td><td>7</td></tr><tr><td>x</td><td>y</td><td>7</td></tr><tr><td>w</td><td>y</td><td>6</td></tr><tr><td>w</td><td>z</td><td>7</td></tr><tr><td>y</td><td>z</td><td>7</td></tr></tbody></table></div><h3>To find</h3><p>Shortest distance, complete route and predecessor for every node from u.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/e31cde29472d2c2d.svg\" alt=\"d(v)\\leftarrow\\min(d(v),d(u)+w(u,v))\" style=\"width:31.899ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Relaxation replaces a tentative route when going through u is cheaper. Dijkstra settles the unvisited node of least tentative distance. Nonnegative edge costs make the settled distance final. Equal-distance nodes may be settled in either order.</p><div class=\"step\"><h3>Step 1. Initialize and relax</h3><div class=\"table-wrap\"><table><thead><tr><th>Pass / settled node</th><th>Strict improvements</th><th>u</th><th>v</th><th>w</th><th>x</th><th>y</th><th>z</th></tr></thead><tbody><tr><td>0</td><td>Initial</td><td>0</td><td>∞</td><td>∞</td><td>∞</td><td>∞</td><td>∞</td></tr><tr><td>u</td><td>v←u: 0+4=4; w←u: 0+3=3; x←u: 0+5=5</td><td>0</td><td>4</td><td>3</td><td>5</td><td>∞</td><td>∞</td></tr><tr><td>w</td><td>y←w: 3+6=9; z←w: 3+7=10</td><td>0</td><td>4</td><td>3</td><td>5</td><td>9</td><td>10</td></tr><tr><td>v</td><td>No change</td><td>0</td><td>4</td><td>3</td><td>5</td><td>9</td><td>10</td></tr><tr><td>x</td><td>No change</td><td>0</td><td>4</td><td>3</td><td>5</td><td>9</td><td>10</td></tr><tr><td>y</td><td>No change</td><td>0</td><td>4</td><td>3</td><td>5</td><td>9</td><td>10</td></tr><tr><td>z</td><td>No change</td><td>0</td><td>4</td><td>3</td><td>5</td><td>9</td><td>10</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. Read predecessors backwards, then reverse</h3><div class=\"table-wrap\"><table><thead><tr><th>Destination</th><th>Distance</th><th>Previous</th><th>Route</th></tr></thead><tbody><tr><td>u</td><td>0</td><td>—</td><td>u</td></tr><tr><td>v</td><td>4</td><td>u</td><td>u → v</td></tr><tr><td>w</td><td>3</td><td>u</td><td>u → w</td></tr><tr><td>x</td><td>5</td><td>u</td><td>u → x</td></tr><tr><td>y</td><td>9</td><td>w</td><td>u → w → y</td></tr><tr><td>z</td><td>10</td><td>w</td><td>u → w → z</td></tr></tbody></table></div></div><p>A tie between two equally short paths is valid; this table retains the first predecessor on equal distances.</p></div></section>"},{"id":"q3bi","title":"Q3(b)(i) · Why rdt3.0 needs a timer","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(b)(i). If the round-trip delay is constant and known to the sender, is a timer still necessary in rdt3.0 when packets may be lost? Explain. <span class=\"marks\">[4 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p><strong>Yes.</strong> A known RTT tells the sender when a response should arrive, but a lost DATA or ACK produces no arrival event. A timer is required to detect that absence and trigger retransmission. It can be set using the known RTT plus appropriate transmission/processing allowance. Example: DATA0 is lost; without a timer the sender could wait forever forACK0. A timeout repeats DATA0, while the sequence bit prevents duplicate delivery if only the ACK was lost.</p></div></section>"},{"id":"q3bii","title":"Q3(b)(ii) · Internet checksum","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(b)(ii). Compute the Internet checksum of 10110100 01000110 and 11001000 01101110. Write the result as two 8-bit groups separated by one space. <span class=\"marks\">[6 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>1011010001000110, 1100100001101110; word width = 16 bits.</p><h3>To find</h3><p>Sender checksum and receiver verification.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/c15ebbb2cede607a.svg\" alt=\"S=\\operatorname{endAroundCarry}(\\text{sum of words}),\\qquad C=\\operatorname{NOT}(S)\" style=\"width:54.346ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>One’s-complement addition returns an overflow carry to the least-significant end. Complement only after all words have been added.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Add the words, folding each carry</h3><div class=\"table-wrap\"><table><thead><tr><th>Word</th><th>Decimal</th><th>Raw addition</th><th>Folded addition</th><th>Running binary sum</th></tr></thead><tbody><tr><td>1011010001000110</td><td>46150</td><td>46150</td><td>46150 + carry 0 = 46150</td><td>1011010001000110</td></tr><tr><td>1100100001101110</td><td>51310</td><td>97460</td><td>31924 + carry 1 = 31925</td><td>0111110010110101</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. Complement every bit</h3><p>Running sum = 0111110010110101. Change every 0 to 1 and every 1 to 0: <strong>checksum = 1000001101001010</strong> (decimal 33610). In the requested two-byte format: <strong>10000011 01001010</strong>.</p></div><div class=\"step\"><h3>Step 3. Receiver adds the data and checksum</h3><p>31925 + 33610 = 65535 = 1111111111111111. All bits are 1; complement gives all zeros. Therefore this intact message passes the checksum check. A matching checksum detects no error; it does not prove that every possible corruption is absent.</p></div></div></section>"},{"id":"q4a","title":"Q4(a) · Alternating-bit data and ACK sequence","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(a). Use the printed rdt3.0 alternating-bit sender/receiver: S0 sends data0; S3 accepts ACK0; S5 sends data1; S8 accepts ACK1; S2/S7 are timeout retransmissions; S1/S6 ignore corrupt or wrong ACKs. Receiver R0 accepts new data0 and sends ACK0; R2 accepts new data1 and sends ACK1; R3/R1 handle corrupt or duplicate data while waiting for 0/1 respectively. Timeline: data at t=0 arrives correctly at t=1; ACK arrives at sender t=2. New data sent t=2 arrives t=3, but its ACK is lost. Timeout just after t=4 resends that data, received at t=5; ACK reaches sender t=6. Data sent at t=6 is corrupted on arrival t=7, and its ACK reaches sender t=8. Give the interleaved numbers for data at t=2, ACK at t=3, timeout data after t=4, ACK at t=5, data at t=6, ACK at t=7. Justify. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>The complete timeline in the question, starting with data0 at t=0.</p><h3>To find</h3><p>Six interleaved DATA/ACK numbers.</p><h3>Formula and why</h3><p>Advance DATA sequence only after a correct matching ACK. On timeout resend the same sequence; on duplicate or corrupt data repeat the last successful ACK.</p><p>This keeps lost ACKs from causing duplicate application delivery.</p><h3>Solution</h3><p>The sequence bit labels the outstanding DATA packet. ACK0 confirms data0 and ACK1 confirms data1 in this printed FSM; these are not TCP cumulative byte numbers. An ACK loss does not advance the sender. A duplicate data packet is acknowledged again but not delivered twice.</p><div class=\"table-wrap\"><table><thead><tr><th>Event</th><th>Number</th><th>Reason</th></tr></thead><tbody><tr><td>t2 data</td><td>1</td><td>ACK0 has arrived; next DATA is1</td></tr><tr><td>t3 ACK</td><td>1</td><td>Receiver accepted data1</td></tr><tr><td>after t4 timeout data</td><td>1</td><td>ACK1 lost; sender resends1</td></tr><tr><td>t5 ACK</td><td>1</td><td>Duplicate data1: re-ACK1, do not redeliver</td></tr><tr><td>t6 data</td><td>0</td><td>ACK1 now arrives; wrap to0</td></tr><tr><td>t7 ACK</td><td>1</td><td>Data0 corrupt: receiver still expects0 and repeatsACK1</td></tr></tbody></table></div><p><strong>Answer: 1, 1, 1, 1, 0, 1.</strong> At t8 ACK1 is wrong for outstanding data0, so S1 ignores it; the next timeout retransmits0.</p></div></section>"},{"id":"q4b","title":"Q4(b) · HTTP/2 multiplexing versus HTTP/1.1","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(b). RTT=4 time units; all four objects are requested at t=0 on an established connection. O1 has 10 frames, O2 has 1, O3 has 2, O4 has 1. One frame takes 1 time unit. HTTP/2 cycles O1,O2,O3,O4, skipping finished objects; HTTP/1.1 sends complete objects FCFS O1,O2,O3,O4. Find each completion time and average object download delay for both methods, including request and response propagation. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>RTT4; frame time1; O1/O2/O3/O4 have10/1/2/1 frames; established connection.</p><h3>To find</h3><p>Every object completion time and average delay.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/20bdb51428a09b4e.svg\" alt=\"T_j=RTT+\\text{position of the last frame of object }j\" style=\"width:47.444ex;height:2.261ex\" loading=\"lazy\" decoding=\"async\"></div><p>Requests need2 units to reach the server and final frame bits need2 to return. Thus add4 to each last-frame transmission count; do not add a new RTT per frame.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Write transmission orders and last-frame positions</h3><div class=\"table-wrap\"><table><thead><tr><th>Method</th><th>Frame order</th><th>O1 completion</th><th>O2 completion</th><th>O3 completion</th><th>O4 completion</th><th>Average</th></tr></thead><tbody><tr><td>HTTP/2</td><td>O1, O2, O3, O4, O1, O3, O1, O1, O1, O1, O1, O1, O1, O1</td><td>18</td><td>6</td><td>10</td><td>8</td><td>10.5</td></tr><tr><td>HTTP/1.1</td><td>O1, O1, O1, O1, O1, O1, O1, O1, O1, O1, O2, O3, O3, O4</td><td>14</td><td>15</td><td>17</td><td>18</td><td>16.0</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. Calculate averages explicitly</h3><p>HTTP/2: (18+6+10+8)/4=42/4=<strong>10.5</strong>. HTTP/1.1: (14+15+17+18)/4=64/4=<strong>16</strong>. All objects finish by18 in both cases; multiplexing makes short objects finish earlier.</p></div></div></section>"},{"id":"q5a","title":"Q5(a) · BGP export policy","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(a). A is a customer of B and C; B and C are peers. Stub networks W and V are customers of A. A wants incoming traffic for W through B only, but V through B or C. How should A advertise routes, and which AS routes does C receive? Justify. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q5bi","title":"Q5(b)(i) · HFC access","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(b)(i). Is HFC transmission rate dedicated or shared? Are collisions possible on a downstream HFC channel? Why? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q5bii","title":"Q5(b)(ii) · Wireless access technologies","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(b)(ii). Explain the popular wireless Internet access technologies and compare them. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q6a","title":"Q6(a) · Slotted ALOHA arrival timeline","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(a). Six messages arrive at different nodes at t = 0.3, 1.7, 1.8, 2.5, 4.2, 4.6. Each transmission takes one time unit; no retransmission is attempted until after t = 5. For slotted ALOHA, identify successful packets and justify collisions at the next slot boundary after each arrival. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Arrivals0.3,1.7,1.8,2.5,4.2,4.6; one-unit frames; no retries before time5.</p><h3>To find</h3><p>Successful packet numbers and each relevant start/collision decision.</p><h3>Formula and why</h3><p>Pure ALOHA sends immediately. Slotted ALOHA waits for the next slot. CSMA/CD senses only signals that have had time to propagate.</p><p>Check intervals, not just whether arrival times differ. Any collision corrupts a frame; collision detection shortens the wasted transmission but does not make that frame successful.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Trace every message</h3><div class=\"table-wrap\"><table><thead><tr><th>Packet</th><th>Transmission / slot</th><th>Reason</th><th>Outcome</th></tr></thead><tbody><tr><td>1</td><td>1–2</td><td>Alone in slot1</td><td>Success</td></tr><tr><td>2</td><td>2–3</td><td>Same slot as3</td><td>Collision</td></tr><tr><td>3</td><td>2–3</td><td>Same slot as2</td><td>Collision</td></tr><tr><td>4</td><td>3–4</td><td>Alone in slot3</td><td>Success</td></tr><tr><td>5</td><td>5–6</td><td>Same slot as6</td><td>Collision</td></tr><tr><td>6</td><td>5–6</td><td>Same slot as5</td><td>Collision</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. State successful messages</h3><p><strong>1, 4</strong>. The slot beginning at5 is the initial attempt of packets5 and6, not a retransmission.</p></div></div></section>"},{"id":"q6b","title":"Q6(b) · ISP VLSM allocation","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(b). An ISP has 190.100.0.0/16 (65536 addresses). Group 1: 64 customers, 256 addresses each. Group 2: 128 customers, 128 addresses each. Group 3: 128 customers, 64 addresses each. Design aligned customer sub-blocks and find how many addresses remain. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>190.100.0.0/16; Group 1: 64 customers × 256 addresses; Group 2: 128 customers × 128 addresses; Group 3: 128 customers × 64 addresses</p><p><strong>Source correction/assumption:</strong> All requests are total addresses, not usable hosts; therefore no extra two addresses are added.</p><h3>To find</h3><p>Each customer prefix, every group range, first/last customer blocks, and unallocated addresses.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/2cb46cf5eb7fdc4d.svg\" alt=\"p=32-\\log_2(\\text{addresses per customer}),\\quad A_{group}=n\\times A_{customer}\" style=\"width:62.003ex;height:2.364ex\" loading=\"lazy\" decoding=\"async\"></div><p>These are requested total addresses, not usable-host counts. Allocate customer blocks on their prefix boundary. A group with a non-power-of-two customer count need not be forced into one larger, wasteful CIDR aggregate.</p><div class=\"step\"><h3>Step 1. Compute sizes and allocate consecutive aligned customer blocks</h3><div class=\"table-wrap\"><table><thead><tr><th>Group</th><th>Customers</th><th>Addresses each</th><th>Customer prefix</th><th>Used</th><th>Group range</th></tr></thead><tbody><tr><td>1</td><td>64</td><td>256</td><td>/24</td><td>16384</td><td>190.100.0.0–190.100.63.255</td></tr><tr><td>2</td><td>128</td><td>128</td><td>/25</td><td>16384</td><td>190.100.64.0–190.100.127.255</td></tr><tr><td>3</td><td>128</td><td>64</td><td>/26</td><td>8192</td><td>190.100.128.0–190.100.159.255</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. State first and last customer ranges</h3><div class=\"table-wrap\"><table><thead><tr><th>Group</th><th>First customer</th><th>Last customer</th></tr></thead><tbody><tr><td>1</td><td>190.100.0.0–190.100.0.255</td><td>190.100.63.0–190.100.63.255</td></tr><tr><td>2</td><td>190.100.64.0–190.100.64.127</td><td>190.100.127.128–190.100.127.255</td></tr><tr><td>3</td><td>190.100.128.0–190.100.128.63</td><td>190.100.159.192–190.100.159.255</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 3. Count the unused addresses</h3><p>Allocated = 16384 + 16384 + 8192 = 40960. Unused = 65536 − 40960 = <strong>24576</strong>.</p><p>Unused range: 190.100.160.0–190.100.255.255.</p></div></div></section>"},{"id":"q7a","title":"Q7(a) · TDM versus FDM","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(a). What advantages does TDM have over FDM in a circuit-switched network? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q7b","title":"Q7(b) · HTTP state","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(b). How do websites get around HTTP statelessness? Explain using an example. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><table><thead><tr><th scope=\"col\">Concept</th><th scope=\"col\">Explanation</th><th scope=\"col\">Example</th></tr></thead><tbody><tr><td>GET</td><td>Retrieve the selected representation</td><td>Read a page</td></tr><tr><td>POST</td><td>Ask the resource to process submitted content</td><td>Submit a form</td></tr><tr><td>PUT / DELETE</td><td>Replace target representation / request removal according to server semantics</td><td>Update/delete an API resource</td></tr><tr><td>200 / 301 / 404 / 500</td><td>Success / permanent redirect / not found / server error</td><td>Read status before interpreting body</td></tr><tr><td>Persistent connection</td><td>Reuse a connection for multiple exchanges</td><td>Avoid repeated TCP setup for each image</td></tr><tr><td>Cookie/session token</td><td>Carry an identifier so the application can relate requests</td><td>Remain signed in</td></tr><tr><td>HTTPS</td><td>HTTP protected by authenticated encryption through TLS in common deployments</td><td>Protect credentials and content in transit</td></tr></tbody></table><p>A secure transport protects the connection; it does not prove that every server’s content is truthful. HTTP method semantics and application authorization still matter. For exam comparisons, separate HTTP semantics, connection lifetime and application session state.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A login page may send a session cookie after successful authentication. Later requests include it even though each HTTP request remains a separate protocol exchange.</p></aside></div><div class=\"table-wrap\"><table><tbody><tr><td><strong>First visit</strong></td><td>→</td><td><strong>Server creates customer/session ID</strong></td><td>→</td><td><strong>Set-Cookie header</strong></td><td>→</td><td><strong>Browser stores cookie</strong></td><td>→</td><td><strong>Later Cookie header</strong></td><td>→</td><td><strong>Server retrieves purchase record</strong></td></tr></tbody></table></div><p>Keep the purchase record in the server database keyed by a suitable identifier; the browser need only carry that identifier. Example: cookie customer=R81 links later visits to R81’s stored orders. HTTP requests remain independent at the protocol level; the application supplies continuity. Account login can restore the record when a cookie is absent.</p></div></section>"},{"id":"q7c","title":"Q7(c) · TCP server sockets","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(c). A web server on host C port 80 uses persistent connections from two different hosts A and B. Are their requests passed through the same socket on C? If different sockets, do both have port 80? Explain. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>IP delivers a packet toward a host interface. The transport layer delivers application data to a <strong>process endpoint</strong>, identified using a port. A socket endpoint is commonly described by IP address and port; the protocol also matters. TCP distinguishes connections by source IP/port and destination IP/port.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-ports.f496c69028.svg\" width=\"820\" height=\"515\" alt=\"Transport: from hosts to application processes\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Several applications share IP connectivity; ports separate their transport endpoints.</figcaption></figure><ol><li>At the sender, transport multiplexing accepts data from several application sockets and adds the appropriate header.</li><li>A server normally listens on a known service port; a client commonly chooses a temporary local port.</li><li>At the receiver, demultiplexing uses protocol/header information to deliver data to the appropriate socket.</li><li>A TCP connection is bidirectional and maintains state. Two clients can contact the same server port because their connection tuples differ. UDP demultiplexing is connectionless at the protocol level; applications can still keep their own state.</li></ol><table><thead><tr><th scope=\"col\">Identifier</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>MAC address</td><td>Delivery on a local link</td></tr><tr><td>IP address</td><td>Network-layer interface/addressing</td></tr><tr><td>Port number</td><td>Transport-layer application endpoint</td></tr><tr><td>Domain name</td><td>Application-level naming resolved through DNS</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>Laptop 192.0.2.10:51000 contacts server 198.51.100.20:443. Another browser connection uses local port 51001, so the server can distinguish both TCP connections.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> IP host tak; port process tak.</p><p>An established TCP connection is identified by source IP, source port, destination IP, destination port. IP addresses come from the IP header; port numbers come from the TCP header. The transport protocol distinguishes TCP from UDP.</p><p>A web server’s listening socket accepts connections on port80. Accepted connections from A and B use distinct connection sockets/state, although both server-side local ports remain80. Different remote IP/port pairs distinguish them. Persistent connections reuse their own established socket for subsequent requests.</p></div></section>"},{"id":"q7d","title":"Q7(d) · NAT translated flow","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(d). Host 10.0.0.1:2020 communicates with web server 128.119.40.186:80. NAT maps public 138.76.29.7:5051 to 10.0.0.1:2020. At point D (return packet after translation, inside the LAN), find source/destination IP addresses and ports. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"}]},{"id":"paper-2024-feb-ai-reexam","title":"2024-02-06 · AI-only Sem V variant","unit":"Historical AI paper","scope":"Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.","sections":[{"id":"q1a","title":"Q1(a) · Subnet mask","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(a). Explain why a subnet mask is required in IPv4 addressing. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Subnetting divides an address block into smaller prefix-defined blocks. In an ordinary subnet, the network and directed-broadcast addresses bound its usable host range.</p><p><strong>Simple meaning.</strong> Pehle block nikalo; phir first aur last. Uske baad hosts.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/subnet-blocks.67a24f46fc.svg\" width=\"820\" height=\"410\" alt=\"A /24 split into four /26 blocks\" loading=\"lazy\" decoding=\"async\"></div><figcaption>One method for every ordinary IPv4 block question</figcaption></figure><h2>Understand it step by step</h2><ol><li>Read /p. Host bits h=32−p. Total addresses N=2ʰ, not N−2.</li><li>Build the mask. Find the first octet that is not 255; block step there is 256−that mask octet.</li><li>Round that address octet down to a multiple of the step. Preserve preceding octets and set later octets to 0 for the network address.</li><li>For the broadcast address, use the end of the same interval in the changing octet and set later octets to 255. Equivalently, broadcast is network+(N−1) in 32-bit address arithmetic.</li><li>For an ordinary broadcast subnet with at least two host bits: first usable=network+1, last usable=broadcast−1, usable count=N−2. /31 point-to-point and /32 routes are exceptions explained separately.</li></ol><div class=\"math-display\"><img src=\"math/06561cae3cdafd6c.svg\" alt=\"N=2^{32-p}\" style=\"width:9.994ex;height:2.185ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/6d26c03e47eb5b6c.svg\" alt=\"\\text{block step}=256-\\text{changing mask octet}\" style=\"width:38.928ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/0d9d5151a6681f69.svg\" alt=\"\\text{ordinary usable hosts}=2^h-2\" style=\"width:29.885ex;height:2.506ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>For a /26, the changing fourth octet moves in steps of 64: blocks 0–63, 64–127, 128–191 and 192–255. An address ending in 77 is in the 64–127 block.</p></aside><div class=\"answer\"><p>A /26 has 32−26=6 host bits, so it contains 2⁶=64 total addresses. Under ordinary IPv4 subnet rules, one is the network address and one is directed broadcast, leaving 64−2=62 usable host addresses.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Total mein sab count; usable mein boundary ke 2 minus.</p><p>An IPv4 address identifies an IP interface. The network prefix selects the destination network; remaining bits identify an address within it. Classful addressing is historical; modern routing uses explicit CIDR prefixes.</p><div class=\"table-wrap\"><table><thead><tr><th>Class</th><th>First octet</th><th>Default mask</th><th>Network / host split</th><th>Purpose</th></tr></thead><tbody><tr><td>A</td><td>1–126 (ordinary unicast)</td><td>255.0.0.0 (/8)</td><td>8 / 24 bits</td><td>Large historical unicast networks; 0 and 127 reserved</td></tr><tr><td>B</td><td>128–191</td><td>255.255.0.0 (/16)</td><td>16 / 16 bits</td><td>Medium historical unicast networks</td></tr><tr><td>C</td><td>192–223</td><td>255.255.255.0 (/24)</td><td>24 / 8 bits</td><td>Small historical unicast networks</td></tr><tr><td>D</td><td>224–239</td><td>No unicast default mask</td><td>Not network/host class split</td><td>Multicast</td></tr><tr><td>E</td><td>240–255</td><td>No unicast default mask</td><td>Not normal unicast allocation</td><td>Reserved/experimental; special addresses exist</td></tr></tbody></table></div><p>Example: 114.34.2.8 is class A with network 114.0.0.0 and host portion 34.2.8. Class does not override an explicitly supplied CIDR prefix.</p><p>Example: 192.168.1.70 AND255.255.255.192 gives network192.168.1.64. The mask distinguishes the network prefix from the host portion. CIDR masks need not equal historical default class masks.</p></div></section>"},{"id":"q1b","title":"Q1(b) · Additional shared bottleneck","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(b). Four server/client paths share R=1 Gbps; Rs=400 Mbps, Rc=300 Mbps. Host 1 and Host 2 additionally share link Re before their separate Rc links. Assuming fair sharing on R, find the minimum Re so links Rc or Re do not bottleneck these two connections. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>4 flows, server links 400 Mbps, client links 300 Mbps, shared link 1000 Mbps.</p><h3>To find</h3><p>Minimum extra shared link Re.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/26062ae8bce5ae5e.svg\" alt=\"T=\\min(R_s,R_c,R/n)\" style=\"width:21.612ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>A flow cannot exceed any link on its path; fair sharing divides the common capacity among n active flows.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Convert and divide the shared capacity</h3><p>1000 Mbps ÷ 4 = 250 Mbps per flow.</p></div><div class=\"step\"><h3>Step 2. Take the smallest per-flow capacity</h3><p>T=min(400,300,250)=<strong>250 Mbps</strong>.</p></div><div class=\"step\"><h3>Step 3. Carry both downstream flows</h3><p>Each of Hosts1 and2 requires 250 Mbps. Re must carry their sum: <strong>Re≥500 Mbps</strong>. Rc=300 Mbps is already at least 250 Mbps.</p></div></div></section>"},{"id":"q1c","title":"Q1(c) · HTTP/1.1 delay","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(c). An HTTP client knows the server IP, but has no recent TCP connection. GET transmission time is zero; each object takes 1/2 RTT to transmit. Include connection setup, request/response propagation and object transmission. The base HTML references one JPEG on gaia.cs.umass.edu; download both sequentially on the same persistent HTTP/1.1 connection. Find total RTTs. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Known IP; new initial TCP connection; zero GET transmission; each object transmission=0.5 RTT.</p><h3>To find</h3><p>Time to obtain both the base HTML and its referenced JPEG.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/174653a5aa0dead0.svg\" alt=\"T_{object}=T_{setup}+RTT+T_{transmission}\" style=\"width:35.509ex;height:2.211ex\" loading=\"lazy\" decoding=\"async\"></div><p>A referenced object cannot be requested until the HTML reveals it. HTTP/1.0 here uses a fresh connection per object; persistent HTTP/1.1 reuses one.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Download base HTML</h3><p>1 RTT for TCP setup + 1 RTT for GET/first response bit + 0.5 RTT to transmit = <strong>2.5 RTT</strong>.</p></div><div class=\"step\"><h3>Step 2. Download referenced JPEG</h3><p>Existing TCP connection: 0 setup + 1 RTT for GET/response + 0.5 RTT transmission = 1.5 RTT.</p></div><div class=\"step\"><h3>Step 3. Add sequential delays</h3><p><strong>Total = 2.5+1.5=4 RTT</strong>. DNS adds zero here because the IP address is already known.</p></div></div></section>"},{"id":"q1d","title":"Q1(d) · Confidentiality versus integrity","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(d). Distinguish confidentiality and integrity. Can either exist without the other? Justify. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q2a","title":"Q2(a) · Dijkstra from w","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(a). Using Dijkstra’s algorithm calculate shortest paths from w to all nodes in the original graph. Show all steps; the complete edge list is below. <span class=\"marks\">[10 marks]</span></h3><h3>Original diagram data</h3><div class=\"table-wrap\"><table><thead><tr><th>Edge endpoint1</th><th>Endpoint2</th><th>Cost</th></tr></thead><tbody><tr><td>z</td><td>x</td><td>8</td></tr><tr><td>z</td><td>y</td><td>12</td></tr><tr><td>x</td><td>y</td><td>6</td></tr><tr><td>x</td><td>v</td><td>3</td></tr><tr><td>x</td><td>w</td><td>6</td></tr><tr><td>y</td><td>v</td><td>8</td></tr><tr><td>y</td><td>t</td><td>7</td></tr><tr><td>v</td><td>t</td><td>4</td></tr><tr><td>v</td><td>u</td><td>3</td></tr><tr><td>v</td><td>w</td><td>4</td></tr><tr><td>w</td><td>u</td><td>3</td></tr><tr><td>t</td><td>u</td><td>2</td></tr></tbody></table></div><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>The original diagram is undirected. All edge labels are reproduced below. Source = w.</p><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/old-ai-cn-2024-02-06-ai-q2a.60ea5488ef.svg\" width=\"720\" height=\"460\" alt=\"Original undirected question graph: every edge weight retained; source w\" loading=\"lazy\" decoding=\"async\"></div><div class=\"table-wrap\"><table><thead><tr><th>From</th><th>To</th><th>Cost</th></tr></thead><tbody><tr><td>z</td><td>x</td><td>8</td></tr><tr><td>z</td><td>y</td><td>12</td></tr><tr><td>x</td><td>y</td><td>6</td></tr><tr><td>x</td><td>v</td><td>3</td></tr><tr><td>x</td><td>w</td><td>6</td></tr><tr><td>y</td><td>v</td><td>8</td></tr><tr><td>y</td><td>t</td><td>7</td></tr><tr><td>v</td><td>t</td><td>4</td></tr><tr><td>v</td><td>u</td><td>3</td></tr><tr><td>v</td><td>w</td><td>4</td></tr><tr><td>w</td><td>u</td><td>3</td></tr><tr><td>t</td><td>u</td><td>2</td></tr></tbody></table></div><h3>To find</h3><p>Shortest distance, complete route and predecessor for every node from w.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/e31cde29472d2c2d.svg\" alt=\"d(v)\\leftarrow\\min(d(v),d(u)+w(u,v))\" style=\"width:31.899ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Relaxation replaces a tentative route when going through u is cheaper. Dijkstra settles the unvisited node of least tentative distance. Nonnegative edge costs make the settled distance final. Equal-distance nodes may be settled in either order.</p><div class=\"step\"><h3>Step 1. Initialize and relax</h3><div class=\"table-wrap\"><table><thead><tr><th>Pass / settled node</th><th>Strict improvements</th><th>t</th><th>u</th><th>v</th><th>w</th><th>x</th><th>y</th><th>z</th></tr></thead><tbody><tr><td>0</td><td>Initial</td><td>∞</td><td>∞</td><td>∞</td><td>0</td><td>∞</td><td>∞</td><td>∞</td></tr><tr><td>w</td><td>u←w: 0+3=3; x←w: 0+6=6; v←w: 0+4=4</td><td>∞</td><td>3</td><td>4</td><td>0</td><td>6</td><td>∞</td><td>∞</td></tr><tr><td>u</td><td>t←u: 3+2=5</td><td>5</td><td>3</td><td>4</td><td>0</td><td>6</td><td>∞</td><td>∞</td></tr><tr><td>v</td><td>y←v: 4+8=12</td><td>5</td><td>3</td><td>4</td><td>0</td><td>6</td><td>12</td><td>∞</td></tr><tr><td>t</td><td>No change</td><td>5</td><td>3</td><td>4</td><td>0</td><td>6</td><td>12</td><td>∞</td></tr><tr><td>x</td><td>z←x: 6+8=14</td><td>5</td><td>3</td><td>4</td><td>0</td><td>6</td><td>12</td><td>14</td></tr><tr><td>y</td><td>No change</td><td>5</td><td>3</td><td>4</td><td>0</td><td>6</td><td>12</td><td>14</td></tr><tr><td>z</td><td>No change</td><td>5</td><td>3</td><td>4</td><td>0</td><td>6</td><td>12</td><td>14</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. Read predecessors backwards, then reverse</h3><div class=\"table-wrap\"><table><thead><tr><th>Destination</th><th>Distance</th><th>Previous</th><th>Route</th></tr></thead><tbody><tr><td>t</td><td>5</td><td>u</td><td>w → u → t</td></tr><tr><td>u</td><td>3</td><td>w</td><td>w → u</td></tr><tr><td>v</td><td>4</td><td>w</td><td>w → v</td></tr><tr><td>w</td><td>0</td><td>—</td><td>w</td></tr><tr><td>x</td><td>6</td><td>w</td><td>w → x</td></tr><tr><td>y</td><td>12</td><td>v</td><td>w → v → y</td></tr><tr><td>z</td><td>14</td><td>x</td><td>w → x → z</td></tr></tbody></table></div></div><p>A tie between two equally short paths is valid; this table retains the first predecessor on equal distances.</p></div></section>"},{"id":"q2b","title":"Q2(b) · Telnet connection ports","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(b). A and B initiate Telnet sessions to S. Give possible ports for A→S and S→A. If A and B are different hosts, may their source ports be equal? Explain. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>IP delivers a packet toward a host interface. The transport layer delivers application data to a <strong>process endpoint</strong>, identified using a port. A socket endpoint is commonly described by IP address and port; the protocol also matters. TCP distinguishes connections by source IP/port and destination IP/port.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-ports.f496c69028.svg\" width=\"820\" height=\"515\" alt=\"Transport: from hosts to application processes\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Several applications share IP connectivity; ports separate their transport endpoints.</figcaption></figure><ol><li>At the sender, transport multiplexing accepts data from several application sockets and adds the appropriate header.</li><li>A server normally listens on a known service port; a client commonly chooses a temporary local port.</li><li>At the receiver, demultiplexing uses protocol/header information to deliver data to the appropriate socket.</li><li>A TCP connection is bidirectional and maintains state. Two clients can contact the same server port because their connection tuples differ. UDP demultiplexing is connectionless at the protocol level; applications can still keep their own state.</li></ol><table><thead><tr><th scope=\"col\">Identifier</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>MAC address</td><td>Delivery on a local link</td></tr><tr><td>IP address</td><td>Network-layer interface/addressing</td></tr><tr><td>Port number</td><td>Transport-layer application endpoint</td></tr><tr><td>Domain name</td><td>Application-level naming resolved through DNS</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>Laptop 192.0.2.10:51000 contacts server 198.51.100.20:443. Another browser connection uses local port 51001, so the server can distinguish both TCP connections.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> IP host tak; port process tak.</p><div class=\"table-wrap\"><table><thead><tr><th>Direction</th><th>Source port</th><th>Destination port</th></tr></thead><tbody><tr><td>Client→server</td><td>Example49152</td><td>23 (Telnet)</td></tr><tr><td>Server→client</td><td>23</td><td>49152</td></tr></tbody></table></div><p>Different client hosts may both use49152: their different source IP addresses distinguish the four-tuples. The server keeps separate connection state.</p></div></section>"},{"id":"q2c","title":"Q2(c) · SDN routing application","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(c). At which SDN control-plane layer would a new routing protocol be implemented? Explain. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q3a","title":"Q3(a) · rdt3.0 error recovery","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(a). Use the printed rdt3.0 alternating-bit sender/receiver: S0 sends data0; S3 accepts ACK0; S5 sends data1; S8 accepts ACK1; S2/S7 are timeout retransmissions; S1/S6 ignore corrupt or wrong ACKs. Receiver R0 accepts new data0 and sends ACK0; R2 accepts new data1 and sends ACK1; R3/R1 handle corrupt or duplicate data while waiting for 0/1 respectively. List possible transition sequences following an initial rdt_send call with no messages initially in the channel, allowing later message corruption and error recovery. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>The sequence bit labels the outstanding DATA packet. ACK0 confirms data0 and ACK1 confirms data1 in this printed FSM; these are not TCP cumulative byte numbers. An ACK loss does not advance the sender. A duplicate data packet is acknowledged again but not delivered twice.</p><div class=\"table-wrap\"><table><thead><tr><th>Case</th><th>Possible ordered transitions</th><th>Explanation</th></tr></thead><tbody><tr><td>No error</td><td>S0,R0,S3</td><td>DATA0 and ACK0 both arrive</td></tr><tr><td>Corrupt data0</td><td>S0,R3,S1,S2,R0,S3</td><td>Receiver repeatsACK1; sender ignores it, times out, resends0</td></tr><tr><td>Lost data0</td><td>S0,S2,R0,S3</td><td>No receiver event for the lost packet</td></tr><tr><td>Corrupt ACK0</td><td>S0,R0,S1,S2,R1,S3</td><td>Receiver has delivered0; duplicate0 getsACK0 without redelivery</td></tr><tr><td>Lost ACK0</td><td>S0,R0,S2,R1,S3</td><td>No sender event for a lost ACK; timeout triggers retry</td></tr></tbody></table></div><p>After recovery, S5 sends data1 and the symmetric transitions S7/R2/R3/S8 apply as appropriate. These are representative possible traces; repeated losses/corruptions can repeat the retry loops arbitrarily often. No single finite list can enumerate every possible error history.</p></div></section>"},{"id":"q3b","title":"Q3(b) · DNS cache popularity","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(b). If you can access departmental local-DNS caches, propose a way to roughly determine which external web servers are most popular among departmental users. Explain limitations. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>Take repeated authorized snapshots of cache entries or resolution counters and group names by web service. A record frequently present or refreshed after expiry suggests repeated resolutions; query logs/counters, if available, provide a better frequency estimate than a single cache snapshot.</p><p>Do not equate DNS queries with page views. TTL duration, client/browser caches, shared CDN names, prefetching and multiple domains per page bias the result. A long-TTL unpopular name may remain cached longer than a popular short-TTL name. The result is only a rough popularity indicator, not a count of users or visits.</p></div></section>"},{"id":"q3c","title":"Q3(c) · TLS impersonation","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(c). Bob connects to Trudy pretending to be Alice. Trudy sends Alice’s certificate. At what TLS-handshake step does Bob discover the impersonation? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q3d","title":"Q3(d) · TLS nonces","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(d). What is the purpose of random nonces in the TLS handshake? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q4a","title":"Q4(a) · Distance vector at z","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(a). Initially each node knows only neighbor costs. For undirected edges u–v=1, u–y=2, v–x=3, y–x=3, v–z=6, x–z=2, apply distance vector and show distance-table entries at z. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>At z, neighbor costs c(z,v)=6 and c(z,x)=2; all original links are stated in the question.</p><h3>To find</h3><p>Distance table at z over synchronous exchanges.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/b9f38cdb21f5d397.svg\" alt=\"D_z(d)=\\min\\{6+D_v(d),\\ 2+D_x(d)\\}\" style=\"width:35.845ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Add the local link cost to each neighbor’s advertised distance. Round0 below uses the neighbors’ initialized direct-link vectors; next rounds use their previous completed exchange.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Evaluate both candidate routes for every destination</h3><div class=\"table-wrap\"><table><thead><tr><th>Exchange input round</th><th>Destination</th><th>Via v</th><th>Via x</th><th>Minimum</th></tr></thead><tbody><tr><td>0</td><td>u</td><td>7</td><td>∞</td><td>7</td></tr><tr><td>0</td><td>v</td><td>6</td><td>5</td><td>5</td></tr><tr><td>0</td><td>x</td><td>9</td><td>2</td><td>2</td></tr><tr><td>0</td><td>y</td><td>∞</td><td>5</td><td>5</td></tr><tr><td>1</td><td>u</td><td>7</td><td>6</td><td>6</td></tr><tr><td>1</td><td>v</td><td>6</td><td>5</td><td>5</td></tr><tr><td>1</td><td>x</td><td>9</td><td>2</td><td>2</td></tr><tr><td>1</td><td>y</td><td>9</td><td>5</td><td>5</td></tr><tr><td>2</td><td>u</td><td>7</td><td>6</td><td>6</td></tr><tr><td>2</td><td>v</td><td>6</td><td>5</td><td>5</td></tr><tr><td>2</td><td>x</td><td>9</td><td>2</td><td>2</td></tr><tr><td>2</td><td>y</td><td>9</td><td>5</td><td>5</td></tr><tr><td>3</td><td>u</td><td>7</td><td>6</td><td>6</td></tr><tr><td>3</td><td>v</td><td>6</td><td>5</td><td>5</td></tr><tr><td>3</td><td>x</td><td>9</td><td>2</td><td>2</td></tr><tr><td>3</td><td>y</td><td>9</td><td>5</td><td>5</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. Read the converged routes</h3><p>From z: u=6 viax→v→u; v=5 viax→v; x=2 direct; y=5 viax→y; z=0. The route to u throughx→y→u costs7 and is therefore not the minimum.</p></div></div></section>"},{"id":"q4b","title":"Q4(b) · Cryptographic attack models","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(b). An intruder has an encrypted message and its decrypted version. Can the intruder mount ciphertext-only, known-plaintext or chosen-plaintext attacks? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q4c","title":"Q4(c) · CDN design","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(c). Name and describe the two CDN placement philosophies; give non-network factors besides delay, loss and bandwidth used in server selection. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q5a","title":"Q5(a) · Hamming error detection","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(a). The seven-bit received Hamming word is 1011001. Under even parity, determine correctness and locate any erroneous bit. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Received word 1011001; even parity. Number positions 7,6,5,4,3,2,1 from left to right, so position 1 is the rightmost bit.</p><h3>To find</h3><p>Syndrome, erroneous position, and corrected word.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/915c318ac72ec415.svg\" alt=\"s_p=\\bigoplus_{i\\,\\&amp;\\,p\\ne0}b_i,\\quad \\text{error position}=4s_4+2s_2+s_1\" style=\"width:45.955ex;height:5.256ex\" loading=\"lazy\" decoding=\"async\"></div><p>Each parity check covers positions whose binary position number contains that parity bit. For even parity, XOR must be zero; a 1 identifies a failed group.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Label every received bit</h3><div class=\"table-wrap\"><table><thead><tr><th>Position</th><th>7</th><th>6</th><th>5</th><th>4</th><th>3</th><th>2</th><th>1</th></tr></thead><tbody><tr><td>Received bit</td><td>1</td><td>0</td><td>1</td><td>1</td><td>0</td><td>0</td><td>1</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. Evaluate the three parity groups</h3><div class=\"table-wrap\"><table><thead><tr><th>Parity</th><th>Covered positions</th><th>Bits added</th><th>Sum</th><th>Sum mod 2</th></tr></thead><tbody><tr><td>1</td><td>1, 3, 5, 7</td><td>1 + 0 + 1 + 1</td><td>3</td><td>1</td></tr><tr><td>2</td><td>2, 3, 6, 7</td><td>0 + 0 + 0 + 1</td><td>1</td><td>1</td></tr><tr><td>4</td><td>4, 5, 6, 7</td><td>1 + 1 + 0 + 1</td><td>3</td><td>1</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 3. Read the syndrome as a binary position</h3><p>Syndrome s4s2s1 = 111; decimal = 7. Under the single-bit-error assumption, flip position 7 from the right. <strong>Corrected word = 0011001</strong>.</p></div><div class=\"step\"><h3>Step 4. State the assumption</h3><p>Ordinary Hamming(7,4) corrects one bit. A multi-bit corruption may produce a misleading nonzero syndrome, so do not claim guaranteed correction of arbitrary errors.</p></div></div></section>"},{"id":"q5b","title":"Q5(b) · CRC and damaged message","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(b). For M=11010110101 and G(x)=x⁴+x²+1, calculate CRC and transmitted message. If one bit changes (the paper illustrates 11010110101→11010111101), can the receiver detect it? Show the receiver check using the original appended CRC. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Data = 11010110101; generator bits = 10101; degree r = 4.</p><h3>To find</h3><p>CRC remainder, complete transmitted frame and receiver check; then detect the specified bit inversion.</p><h3>Formula and why</h3><p>Append r zeros, divide using XOR (modulo 2), and replace those zeros with the r-bit remainder. XOR has no borrowing or carrying. A valid received codeword has remainder zero; the receiver does not append new zeros.</p><div class=\"step\"><h3>Step 1. Append zeros</h3><p>11010110101 → 110101101010000</p></div><div class=\"step\"><h3>Step 2. Perform XOR division</h3><div class=\"table-wrap\"><table><thead><tr><th>Leading position</th><th>Before XOR</th><th>Aligned generator</th><th>After XOR</th></tr></thead><tbody><tr><td>1</td><td>110101101010000</td><td>101010000000000</td><td>011111101010000</td></tr><tr><td>2</td><td>011111101010000</td><td>010101000000000</td><td>001010101010000</td></tr><tr><td>3</td><td>001010101010000</td><td>001010100000000</td><td>000000001010000</td></tr><tr><td>9</td><td>000000001010000</td><td>000000001010100</td><td>000000000000100</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 3. Build the frame</h3><p>Remainder = <strong>0100</strong>. Transmit <strong>110101101010100</strong>.</p></div><div class=\"step\"><h3>Step 4. Divide the received frame</h3><div class=\"table-wrap\"><table><thead><tr><th>Position</th><th>Before</th><th>Generator</th><th>After</th></tr></thead><tbody><tr><td>1</td><td>110101101010100</td><td>101010000000000</td><td>011111101010100</td></tr><tr><td>2</td><td>011111101010100</td><td>010101000000000</td><td>001010101010100</td></tr><tr><td>3</td><td>001010101010100</td><td>001010100000000</td><td>000000001010100</td></tr><tr><td>9</td><td>000000001010100</td><td>000000001010100</td><td>000000000000000</td></tr></tbody></table></div><p>Receiver remainder = 0000. No error is detected; this is not a guarantee that every possible corruption is detectable.</p></div><div class=\"step\"><h3>Step 5. Invert bit 8 from the left</h3><p>110101101010100 becomes 110101111010100.</p><div class=\"table-wrap\"><table><thead><tr><th>Position</th><th>Before</th><th>Generator</th><th>After</th></tr></thead><tbody><tr><td>1</td><td>110101111010100</td><td>101010000000000</td><td>011111111010100</td></tr><tr><td>2</td><td>011111111010100</td><td>010101000000000</td><td>001010111010100</td></tr><tr><td>3</td><td>001010111010100</td><td>001010100000000</td><td>000000011010100</td></tr><tr><td>8</td><td>000000011010100</td><td>000000010101000</td><td>000000001111100</td></tr><tr><td>9</td><td>000000001111100</td><td>000000001010100</td><td>000000000101000</td></tr><tr><td>10</td><td>000000000101000</td><td>000000000101010</td><td>000000000000010</td></tr></tbody></table></div><p>Remainder = <strong>0010</strong>, which is nonzero: reject the frame and request recovery according to the error-control protocol.</p></div></div></section>"},{"id":"q5c","title":"Q5(c) · 8-bit checksum","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(c). For data 10101001 00111001, show sender and receiver steps for an 8-bit checksum. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>10101001, 00111001; word width = 8 bits.</p><h3>To find</h3><p>Sender checksum and receiver verification.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/c15ebbb2cede607a.svg\" alt=\"S=\\operatorname{endAroundCarry}(\\text{sum of words}),\\qquad C=\\operatorname{NOT}(S)\" style=\"width:54.346ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>One’s-complement addition returns an overflow carry to the least-significant end. Complement only after all words have been added.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Add the words, folding each carry</h3><div class=\"table-wrap\"><table><thead><tr><th>Word</th><th>Decimal</th><th>Raw addition</th><th>Folded addition</th><th>Running binary sum</th></tr></thead><tbody><tr><td>10101001</td><td>169</td><td>169</td><td>169 + carry 0 = 169</td><td>10101001</td></tr><tr><td>00111001</td><td>57</td><td>226</td><td>226 + carry 0 = 226</td><td>11100010</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. Complement every bit</h3><p>Running sum = 11100010. Change every 0 to 1 and every 1 to 0: <strong>checksum = 00011101</strong> (decimal 29).</p></div><div class=\"step\"><h3>Step 3. Receiver adds the data and checksum</h3><p>226 + 29 = 255 = 11111111. All bits are 1; complement gives all zeros. Therefore this intact message passes the checksum check. A matching checksum detects no error; it does not prove that every possible corruption is absent.</p></div></div></section>"},{"id":"q6a","title":"Q6(a) · Pure ALOHA timeline","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(a). Six messages arrive at different nodes at t = 0.3, 1.7, 1.8, 2.5, 4.2, 4.6. Each transmission takes one time unit; no retransmission is attempted until after t = 5. For pure ALOHA, identify which packets are successfully transmitted, with explanations. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Arrivals0.3,1.7,1.8,2.5,4.2,4.6; one-unit frames; no retries before time5.</p><h3>To find</h3><p>Successful packet numbers and each relevant start/collision decision.</p><h3>Formula and why</h3><p>Pure ALOHA sends immediately. Slotted ALOHA waits for the next slot. CSMA/CD senses only signals that have had time to propagate.</p><p>Check intervals, not just whether arrival times differ. Any collision corrupts a frame; collision detection shortens the wasted transmission but does not make that frame successful.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Trace every message</h3><div class=\"table-wrap\"><table><thead><tr><th>Packet</th><th>Transmission / slot</th><th>Reason</th><th>Outcome</th></tr></thead><tbody><tr><td>1</td><td>0.3–1.3</td><td>No overlap</td><td>Success</td></tr><tr><td>2</td><td>1.7–2.7</td><td>Overlaps3 and4</td><td>Collision</td></tr><tr><td>3</td><td>1.8–2.8</td><td>Overlaps2 and4</td><td>Collision</td></tr><tr><td>4</td><td>2.5–3.5</td><td>Overlaps2 and3</td><td>Collision</td></tr><tr><td>5</td><td>4.2–5.2</td><td>Overlaps6</td><td>Collision</td></tr><tr><td>6</td><td>4.6–5.6</td><td>Overlaps5</td><td>Collision</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. State successful messages</h3><p><strong>1</strong>. </p></div></div></section>"},{"id":"q6b","title":"Q6(b) · Distance-vector link change","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(b). x has only neighbors w and y. Links x–w=2, x–y=5, w–y=2. Minimum cost from w to destination u is 5 and from y to u is 6. All link costs are positive integers. Find x’s distance vector for w,y,u. Give a change to x–w or x–y that does not change x’s minimum cost to u. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>x–w2,x–y5,w–y2; Dw(u)=5,Dy(u)=6.</p><h3>To find</h3><p>Dx(w),Dx(y),Dx(u) and a link change leaving Dx(u) unchanged.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/a570618da07d1f4e.svg\" alt=\"D_x(u)=\\min(2+5,5+6)\" style=\"width:25.642ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Compare complete candidate route costs, not the last advertised value alone.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Neighbor destinations</h3><p>Dx(w)=2 direct. Dx(y)=min(5,2+2)=4 viaw.</p></div><div class=\"step\"><h3>Step 2. Destination u</h3><p>Dx(u)=min(7,11)=<strong>7 viaw</strong>. Vector for(w,y,u) is <strong>(2,4,7)</strong>.</p></div><div class=\"step\"><h3>Step 3. Choose a harmless change</h3><p>Increase c(x,y) from5 to6. Route viaw remains2+5=7; route viay becomes6+6=12. The minimum cost to u is unchanged, so x has no changed u-distance to advertise. Other destination entries must be considered separately.</p></div></div></section>"},{"id":"q6c","title":"Q6(c) · Polling and token passing","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(c). Describe polling and token passing and distinguish them. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q6d","title":"Q6(d) · Classful and IPv6 addresses","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(d). I. Find the class of (i)11000011 00111011 00001011 11101111 and (ii)129.5.25.111. II. Distinguish IPv4 and IPv6 addresses. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>An IPv4 address identifies an IP interface. The network prefix selects the destination network; remaining bits identify an address within it. Classful addressing is historical; modern routing uses explicit CIDR prefixes.</p><div class=\"table-wrap\"><table><thead><tr><th>Class</th><th>First octet</th><th>Default mask</th><th>Network / host split</th><th>Purpose</th></tr></thead><tbody><tr><td>A</td><td>1–126 (ordinary unicast)</td><td>255.0.0.0 (/8)</td><td>8 / 24 bits</td><td>Large historical unicast networks; 0 and 127 reserved</td></tr><tr><td>B</td><td>128–191</td><td>255.255.0.0 (/16)</td><td>16 / 16 bits</td><td>Medium historical unicast networks</td></tr><tr><td>C</td><td>192–223</td><td>255.255.255.0 (/24)</td><td>24 / 8 bits</td><td>Small historical unicast networks</td></tr><tr><td>D</td><td>224–239</td><td>No unicast default mask</td><td>Not network/host class split</td><td>Multicast</td></tr><tr><td>E</td><td>240–255</td><td>No unicast default mask</td><td>Not normal unicast allocation</td><td>Reserved/experimental; special addresses exist</td></tr></tbody></table></div><p>Example: 114.34.2.8 is class A with network 114.0.0.0 and host portion 34.2.8. Class does not override an explicitly supplied CIDR prefix.</p><div class=\"step\"><h3>Step 1. Classify the first octets</h3><p>11000011₂=128+64+2+1=195: ClassC. 129 lies in128–191: ClassB.</p></div>\r\n<p><strong>Definition.</strong> IPv6 extends address size and reorganizes IP forwarding information into a fixed base header with extension headers.</p><p><strong>Simple meaning.</strong> Sirf address bada nahi; header ka arrangement bhi badla.</p><h2>Understand it step by step</h2><ol><li>IPv6 uses unicast, multicast and anycast addressing; it does not use IPv4-style broadcast addressing.</li><li>Unicast identifies an interface; multicast addresses a group; anycast reaches one appropriate member of a group sharing an address, according to routing.</li><li>::1 is loopback. fe80::/10 is link-local space. ff00::/8 identifies multicast. These serve different purposes.</li><li>IPv6 neighbour discovery replaces IPv4 ARP mechanisms. Do not write that IPv6 uses ARP to map its addresses.</li><li>IPv6 is not automatically encrypted or secure merely because it has a larger address space. Security depends on the mechanisms deployed.</li></ol><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">IPv4</th><th scope=\"col\">IPv6</th></tr></thead><tbody><tr><td>Address width</td><td>32 bits</td><td>128 bits</td></tr><tr><td>Base/header size</td><td>20–60 bytes depending on options</td><td>40-byte fixed base header</td></tr><tr><td>Length field</td><td>Total length includes IPv4 header</td><td>Payload Length excludes 40-byte base header</td></tr><tr><td>Lifetime field</td><td>TTL</td><td>Hop Limit</td></tr><tr><td>Following protocol</td><td>Protocol field</td><td>Next Header; may identify an extension</td></tr><tr><td>Header checksum</td><td>Present</td><td>No base-header checksum</td></tr><tr><td>Options</td><td>Inside IPv4 header</td><td>Typically extension headers</td></tr><tr><td>Fragmentation fields</td><td>In IPv4 header; routers may fragment if permitted</td><td>Fragment extension header; fragmentation by source, not routers</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A router handling an oversized IPv6 packet cannot fragment it on behalf of the source; the source must respond to path-MTU information and use an appropriate packet size or source fragmentation.</p></aside><div class=\"answer\"></div><p class=\"memory\"><strong>Yaad rakho:</strong> v4 total length; v6 payload length.</p></div></section>"},{"id":"q7a","title":"Q7(a) · Network delay components","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(a). For a packet sent over a fixed route, list end-to-end delay components. Which are constant and which vary? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><p><strong>Definition.</strong> Store-and-forward requires a node to receive the complete forwarding unit before sending it onward; pipelining allows successive units to occupy different links simultaneously.</p><p><strong>Simple meaning.</strong> Pehla packet next link pe jaa raha hai, tab doosra packet first link pe aa sakta hai.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/pipeline.a023f04605.svg\" width=\"820\" height=\"410\" alt=\"Packet pipeline: successive packets use different links\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Store-and-forward and pipelining</figcaption></figure><h2>Understand it step by step</h2><ol><li>With message switching, the whole message is the forwarding unit. On h equal-rate links, a message of M bits needs hM/R seconds of serialization.</li><li>With k equal packets, the first packet needs h packet-transmission times to cross h links. Each later packet then emerges one packet-transmission time later under ideal equal-rate conditions.</li><li>Thus k packets of L bits take (h+k−1)L/R plus all link propagation delays. This assumes no losses, no queueing, negligible processing, equal packet sizes and equal rates.</li><li>Count links, not routers: three intermediate routers between source and destination create four links. Include packet headers in L if the question supplies them.</li></ol><div class=\"math-display\"><img src=\"math/88eb2b8ca0c2e1fd.svg\" alt=\"T_{\\mathrm{message}}=hM/R+h\\tau\" style=\"width:21.908ex;height:2.366ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/209da411e5cae6a2.svg\" alt=\"T_{\\mathrm{packet}}=(h+k-1)L/R+h\\tau\" style=\"width:29.636ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>A three-link path can simultaneously carry packet 1 on the third link, packet 2 on the second, and packet 3 on the first. The frames are not all transmitted on one link at the same instant.</p></aside><div class=\"answer\"><p>Packet switching can pipeline smaller units across successive links. After the first packet is forwarded, the next packet can use an earlier link while the first uses a later link. Whole-message store-and-forward must receive the entire message at each node, preventing that packet-level pipeline.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> First packet h times; remaining packets one time each.</p><div class=\"table-wrap\"><table><thead><tr><th>Delay</th><th>Formula / cause</th><th>Constant or variable on a fixed route</th></tr></thead><tbody><tr><td>Processing</td><td>Header/error/lookup work</td><td>Often modeled constant, can vary with implementation/load</td></tr><tr><td>Queuing</td><td>Waiting behind other packets</td><td>Variable with traffic</td></tr><tr><td>Transmission</td><td>L/R</td><td>Constant only when packet sizeL and link rateR are fixed</td></tr><tr><td>Propagation</td><td>Distance/speed</td><td>Approximately constant for a fixed physical link</td></tr></tbody></table></div><p>Sum these components over the traversed links/nodes; a fixed route alone does not make queueing delay constant.</p></div></section>"},{"id":"q7b","title":"Q7(b) · Webmail to IMAP recipient","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(b). Alice sends from a web-based email account; Bob accesses mail using IMAP. Explain the message’s journey and the sequence of application protocols used. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><div class=\"table-wrap\"><table><tbody><tr><td><strong>Alice browser</strong></td><td>→</td><td><strong>HTTP(S) webmail service</strong></td><td>→</td><td><strong>SMTP between mail servers</strong></td><td>→</td><td><strong>Bob mailbox</strong></td><td>→</td><td><strong>IMAP client</strong></td></tr></tbody></table></div><div class=\"table-wrap\"><table><thead><tr><th>Stage</th><th>Protocol and role</th><th>Transport / conventional ports</th></tr></thead><tbody><tr><td>Browser submits message</td><td>HTTP POST over HTTPS; application uploads/pushes the message</td><td>HTTPS:TCP443; historical HTTP:TCP80</td></tr><tr><td>Sender mail server→recipient mail server</td><td>SMTP pushes the mail to recipient domain</td><td>TCP25 for server relay; client submission commonly587</td></tr><tr><td>Bob retrieves/synchronizes</td><td>IMAP pulls/synchronizes mailbox state</td><td>TCP143 (IMAP) /993 with implicit TLS</td></tr></tbody></table></div><p>DNS may first locate the recipient domain’s MX record and mail-host IP (typicallyUDP53, withTCP53 when needed). HTTP is a request/response protocol rather than a pure push-only protocol; classify this particular POST as submission. The named IMAP/POP3 stage is historical email context; SMTP is the explicitly listed current application topic.</p></div></section>"},{"id":"q7c","title":"Q7(c) · Selective Repeat implementation","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(c). What is Selective Repeat? Explain its implementation. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>Selective Repeat (SR) ARQ</strong> accepts and buffers valid out-of-order frames inside the receiver window, acknowledges them individually and retransmits only missing/timed-out frames. In this answer ACK i means “frame i received”, unlike the next-expected cumulative ACK convention used for GBN.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-sr.5ae2b52b45.svg\" width=\"820\" height=\"674\" alt=\"SR W=4: individual ACKs and buffering\" loading=\"lazy\" decoding=\"async\"></div><figcaption>SR buffers 3 while waiting for 2; only 2 is retransmitted.</figcaption></figure><ol><li>For m=3 there are eight sequence numbers, 0…7. With equal sender and receiver windows, maximum W=2<sup>3−1</sup>=4. Both windows begin at 0 and span 0…3.</li><li>Sender sends 0,1,2,3. Receiver accepts 0 and 1, delivers them and advances its left edge to 2. Frame 2 is lost; frame 3 is stored and ACK 3 is sent.</li><li>Although 3 is acknowledged, the sender’s base cannot jump over missing 2. A timer for 2 expires; only frame 2 is retransmitted.</li><li>When 2 arrives, the receiver can deliver 2 and the buffered 3 in order, moving its window forward. Individual ACKs let the sender release the relevant stored copies.</li><li>Why half the space: with an incorrectly chosen W=5 in an eight-number space, receiving old 0…4 moves the receive window to {5,6,7,0,1}. If ACKs are lost, retransmitted old 0 or 1 could fall in the new window and be mistaken for new data. W=4 prevents these two consecutive windows from overlapping.</li><li>A repeated old frame can be acknowledged again without delivering it twice. SR needs more receiver storage and per-frame tracking than GBN.</li></ol><div class=\"math-display\"><img src=\"math/454034d348f17623.svg\" alt=\"W_s=W_r\\le 2^{m-1}\" style=\"width:16.921ex;height:2.357ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>A noisy long-delay link benefits from retransmitting only the missing frame, but the receiver must retain later frames and track which sequence numbers belong to its current window.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> SR selective resend; half sequence space keeps old and new separate.</p></div></section>"}]},{"id":"paper-2024-ai-final","title":"2024-12-06 · AI-only Sem V variant","unit":"Historical AI paper","scope":"Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.","sections":[{"id":"q1a","title":"Q1(a) · Mission-critical switching choice","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(a). A rocket-launch mission needs real-time communication with minimal delay and absolute certainty of delivery. Which switching technique would you select and why? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Switching selects how data passes through intermediate network nodes from a source to a destination.</p><p><strong>Simple meaning.</strong> Raasta reserve karna, poora message ruk-ruk ke bhejna, ya chhote packets bhejna—yeh teen ideas hain.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/switching.2b51f856d9.svg\" width=\"820\" height=\"425\" alt=\"Three switching techniques: what is forwarded?\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Circuit, message and packet switching</figcaption></figure><h2>Understand it step by step</h2><ol><li><strong>Circuit switching:</strong> establish a circuit, reserve resources, transfer data, then release the circuit. Capacity is dedicated even during a silent period.</li><li><strong>Message switching:</strong> each intermediate node receives the entire message before forwarding it. Large messages require large buffers and can delay later messages.</li><li><strong>Packet switching:</strong> divide data into smaller packets. Nodes forward packets individually; different links can carry successive packets at the same time.</li><li>The Internet uses packet switching. A traditional circuit-switched telephone call illustrates the circuit concept. Many current calls use packet-based networks, so do not label every phone call circuit-switched.</li></ol><table><thead><tr><th scope=\"col\">Aspect</th><th scope=\"col\">Circuit switching</th><th scope=\"col\">Message switching</th><th scope=\"col\">Packet switching</th></tr></thead><tbody><tr><td>Unit handled</td><td>Continuous stream on established circuit</td><td>Whole message</td><td>Small packets</td></tr><tr><td>Resource use</td><td>Capacity reserved along a circuit</td><td>Shared; message stored at each intermediate node</td><td>Shared; each packet stored/forwarded in this model</td></tr><tr><td>Setup</td><td>Required before data transfer</td><td>No circuit setup required</td><td>Datagram: no connection setup; virtual circuit: setup</td></tr><tr><td>Delay</td><td>Setup delay, then relatively predictable service</td><td>Large store-and-forward delay for long messages</td><td>Variable delay; packet pipeline can reduce completion time</td></tr><tr><td>Main limitation</td><td>Reserved capacity can be idle</td><td>Large buffers; unsuitable for tight delay needs</td><td>Headers, possible queueing/loss; datagrams may reorder</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A campus transferring web pages and files has bursty traffic. Packet switching allows multiple users to share link capacity instead of reserving a circuit that remains idle between bursts.</p></aside><div class=\"answer\"><p>For ordinary bursty office data, packet switching is generally appropriate because resources are shared among active transfers. The design must still account for queueing, loss and the required service quality.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Circuit reserves; message waits whole; packets pipeline.</p><p><strong>Choice:</strong> circuit switching reserves a path and capacity before communication, giving predictable service and avoiding packet-queue contention after setup. A dedicated voice circuit is a standard example. It sacrifices statistical sharing and may waste reserved capacity when silent.</p><p>For the rocket case, reservation fits the stated timing need. However, no switching technique alone guarantees absolute delivery: link failures, bit errors and equipment faults still require redundancy, error control and fault-tolerant system design. State the reservation advantage without promising impossible certainty.</p></div></section>"},{"id":"q1b","title":"Q1(b) · Store-and-forward delay","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(b). A 2000-bit packet crosses three store-and-forward links, each 1 Mbps with propagation delay 2 ms. Ignore other delays. Find end-to-end delay. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>One packet, L=2000 bits;3 links;rate1000000 bits/s;propagation2ms/link;store-and-forward.</p><h3>To find</h3><p>Total time until the final packet bit reaches the destination.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/73c28ce2abb77cac.svg\" alt=\"T=\\sum_{i=1}^{3}(L/R_i+d_{prop,i})\" style=\"width:22.999ex;height:6.711ex\" loading=\"lazy\" decoding=\"async\"></div><p>Each router must receive the complete packet before sending it onward, so all three serialization times count.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Calculate serialization on one link</h3><p>2000/1000000 seconds=0.002s=2ms.</p></div><div class=\"step\"><h3>Step 2. Add propagation per link</h3><p>2+2=4ms.</p></div><div class=\"step\"><h3>Step 3. Add all three links</h3><p>3×4=<strong>12ms</strong>. Queuing/processing are ignored as instructed.</p></div></div></section>"},{"id":"q1c","title":"Q1(c) · Classful versus classless addressing","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(c). Explain classful IPv4 addressing and its advantages and disadvantages compared with classless addressing. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>An IPv4 address identifies an IP interface. The network prefix selects the destination network; remaining bits identify an address within it. Classful addressing is historical; modern routing uses explicit CIDR prefixes.</p><div class=\"table-wrap\"><table><thead><tr><th>Class</th><th>First octet</th><th>Default mask</th><th>Network / host split</th><th>Purpose</th></tr></thead><tbody><tr><td>A</td><td>1–126 (ordinary unicast)</td><td>255.0.0.0 (/8)</td><td>8 / 24 bits</td><td>Large historical unicast networks; 0 and 127 reserved</td></tr><tr><td>B</td><td>128–191</td><td>255.255.0.0 (/16)</td><td>16 / 16 bits</td><td>Medium historical unicast networks</td></tr><tr><td>C</td><td>192–223</td><td>255.255.255.0 (/24)</td><td>24 / 8 bits</td><td>Small historical unicast networks</td></tr><tr><td>D</td><td>224–239</td><td>No unicast default mask</td><td>Not network/host class split</td><td>Multicast</td></tr><tr><td>E</td><td>240–255</td><td>No unicast default mask</td><td>Not normal unicast allocation</td><td>Reserved/experimental; special addresses exist</td></tr></tbody></table></div><p>Example: 114.34.2.8 is class A with network 114.0.0.0 and host portion 34.2.8. Class does not override an explicitly supplied CIDR prefix.</p><div class=\"table-wrap\"><table><thead><tr><th>Classful</th><th>CIDR/classless</th></tr></thead><tbody><tr><td>Fixed A/B/C boundaries /8,/16,/24</td><td>Prefix length explicitly states any suitable network boundary</td></tr><tr><td>Simple historical classification</td><td>Flexible allocation and aggregation</td></tr><tr><td>Wastes addresses when demand lies between fixed classes</td><td>Matches sizes more closely, reducing waste</td></tr><tr><td>Network determined partly by leading bits</td><td>Network determined by prefix mask</td></tr></tbody></table></div><p>Example: an organization needing roughly1000 addresses can receive a /22 block (1024 addresses) rather than an entire old ClassB /16. Classless routing relies on the prefix length; the first octet alone is insufficient. Advantages of CIDR are flexible allocations, less address wastage and route aggregation. Disadvantages are more involved prefix/mask planning and longest-prefix lookup; badly fragmented allocations may prevent aggregation.</p></div></section>"},{"id":"q1d","title":"Q1(d) · BGP AS-PATH","html":"<section class=\"example\"><h3 class=\"exam-question\">Q1(d). How does BGP use its AS-PATH attribute? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q2a","title":"Q2(a) · Webmail and POP3 protocol journey","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(a). Alice sends email from a web-based account; Bob accesses mail through POP3. Explain all application protocols in the journey. For each, state push or pull, TCP or UDP, and port numbers. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><div class=\"table-wrap\"><table><tbody><tr><td><strong>Alice browser</strong></td><td>→</td><td><strong>HTTP(S) webmail service</strong></td><td>→</td><td><strong>SMTP between mail servers</strong></td><td>→</td><td><strong>Bob mailbox</strong></td><td>→</td><td><strong>POP3 client</strong></td></tr></tbody></table></div><div class=\"table-wrap\"><table><thead><tr><th>Stage</th><th>Protocol and role</th><th>Transport / conventional ports</th></tr></thead><tbody><tr><td>Browser submits message</td><td>HTTP POST over HTTPS; application uploads/pushes the message</td><td>HTTPS:TCP443; historical HTTP:TCP80</td></tr><tr><td>Sender mail server→recipient mail server</td><td>SMTP pushes the mail to recipient domain</td><td>TCP25 for server relay; client submission commonly587</td></tr><tr><td>Bob retrieves/synchronizes</td><td>POP3 pulls messages for download</td><td>TCP110 (POP3) /995 with implicit TLS</td></tr></tbody></table></div><p>DNS may first locate the recipient domain’s MX record and mail-host IP (typicallyUDP53, withTCP53 when needed). HTTP is a request/response protocol rather than a pure push-only protocol; classify this particular POST as submission. The named IMAP/POP3 stage is historical email context; SMTP is the explicitly listed current application topic.</p></div></section>"},{"id":"q2b","title":"Q2(b) · CDN Bring Home","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(b). Briefly explain the Bring Home placement philosophy of CDNs. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q2c","title":"Q2(c) · ARP response destination","html":"<section class=\"example\"><h3 class=\"exam-question\">Q2(c). Why is an ARP response normally sent to a specific destination MAC address rather than broadcast? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Address Resolution Protocol (ARP) resolves a known IPv4 address to a link-layer hardware address on the local network.</p><p><strong>Simple meaning.</strong> IP pata hai; local delivery ke liye MAC chahiye.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/arp.c8af39ddb3.svg\" width=\"820\" height=\"540\" alt=\"ARP resolves the selected local next hop\" loading=\"lazy\" decoding=\"async\"></div><figcaption>ARP: find the local next-hop MAC address</figcaption></figure><h2>Understand it step by step</h2><ol><li>First determine whether the destination is on the local subnet. If local, the next hop is the destination itself. If remote, the next hop is a router such as the default gateway.</li><li>Check the ARP cache. If the next-hop mapping is absent, broadcast an ARP request on the local link.</li><li>The owner of the requested IPv4 address normally replies with its hardware address. The sender caches the mapping and constructs its data frame.</li><li>Routers do not normally forward a host’s ARP broadcast across networks. ARP resolves the next hop, not the MAC of a remote Internet server.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Host 192.168.1.10/24 sending to 192.168.1.20 asks for .20’s MAC. Sending to 203.0.113.7 through gateway 192.168.1.1 asks for the gateway’s MAC instead.</p></aside><div class=\"answer\"><p>ARP maps a known local next-hop IPv4 address to a hardware address. A sender broadcasts a request when the mapping is missing; the address owner replies, and the mapping is cached. For a remote IP destination, the sender resolves its gateway’s local MAC address, then forwards the packet toward that gateway.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Remote packet ka next-hop MAC gateway ka hota hai.</p><p>The request already contains the requester’s MAC address. The owner of the requested IP can therefore address its reply directly to that MAC. Unicast avoids making every LAN host process a reply intended for one requester and reduces unnecessary traffic. Ordinary request is broadcast because the destination MAC was unknown; ordinary response is unicast because it is now known. Gratuitous/announcement ARP is a different case and can be broadcast.</p></div></section>"},{"id":"q3a","title":"Q3(a) · Store-and-forward caravan","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(a). Ten cars queue at a tollbooth; service is one car per second. Each road to the next booth is 400 km; speed is 10 km/s. A booth waits for the entire caravan before servicing its first car. Find: (1) one-car service time; (2) whole-caravan service time; (3) first car travel time after departure; (4) last car travel time after departure; (5) time from first departure to its next service; (6) whether first and second booths ever service cars simultaneously; (7) whether there is an interval with neither servicing any car. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>10 cars; service1car/s; road400km; speed10km/s; each booth waits for all10 cars.</p><h3>To find</h3><p>All seven timing/overlap questions.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/d9a16d08c4aea6f6.svg\" alt=\"T_{service}=N/r,\\quad T_{travel}=d/v\" style=\"width:29.013ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Transmission corresponds to serializing the whole caravan; propagation is the road journey of each individual car.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Choose t=0 as first service start</h3><p>Car1 leaves at1s; car10 leaves at10s. Travel=400/10=40s. Thus first arrival at booth2 is41s and last arrival is50s. Booth2 starts service only at50s.</p></div><div class=\"step\"><h3>Step 2. Answer every printed subpart</h3><div class=\"table-wrap\"><table><thead><tr><th>Part</th><th>Answer</th><th>Reason</th></tr></thead><tbody><tr><td>1</td><td>1 second</td><td>One car per second</td></tr><tr><td>2</td><td>10 seconds</td><td>10/1</td></tr><tr><td>3</td><td>40 seconds</td><td>Measured from first car departure</td></tr><tr><td>4</td><td>40 seconds</td><td>Last car travels the same road at the same speed</td></tr><tr><td>5</td><td>49 seconds</td><td>From first departure t1 to next service t50:50−1</td></tr><tr><td>6</td><td>No</td><td>First booth service0–10; second50–60</td></tr><tr><td>7</td><td>Yes</td><td>Neither is servicing during(10,50); in particular before first arrival, (10,41)</td></tr></tbody></table></div></div><p>Common mistake: part5 is not50s because its clock starts when the first car leaves, one second after the first service began.</p></div></section>"},{"id":"q3b","title":"Q3(b) · Count to infinity","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(b). What is the count-to-infinity problem in distance-vector routing? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Count-to-infinity is a distance-vector failure in which routers repeatedly increase their estimates for an unreachable destination because they believe one another’s stale route advertisements.</p><p><strong>Simple meaning.</strong> Dono neighbour ek dusre ko bol rahe: mere through jao—par actual route gaya.</p><h2>Understand it step by step</h2><ol><li>Before failure, B reaches a destination through A. After A loses the route, B may still advertise an old finite distance.</li><li>Without sufficient protection, A may infer a new route through B even though B’s route depended on A. This creates a loop and rising metrics.</li><li><strong>Split horizon:</strong> do not advertise a learned route back on the interface from which it was learned.</li><li><strong>Poison reverse:</strong> advertise that reverse direction with an unreachable metric. <strong>Route poisoning:</strong> mark a failed destination unreachable. Triggered updates spread changes sooner.</li><li>These methods reduce common failure modes but do not constitute a universal proof that every multi-router loop is impossible.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>In RIP, a poisoned route is sent with metric 16. Receiving routers treat it as unreachable rather than a new usable longer route.</p></aside><div class=\"answer\"><p>Split horizon suppresses advertising a route back in the direction from which it was learned. Poison reverse explicitly advertises that route back with an infinite/unreachable metric. Both reduce two-router distance-vector loops caused by stale information.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Split: wapas mat bolo. Poison reverse: wapas bolo, par unreachable.</p></div></section>"},{"id":"q3c","title":"Q3(c) · Reliable application over UDP","html":"<section class=\"example\"><h3 class=\"exam-question\">Q3(c). Can an application achieve reliable transfer while running over UDP? If so, how? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p><strong>User Datagram Protocol (UDP)</strong> provides connectionless, message-oriented process delivery. One send creates a datagram; message boundaries are retained. UDP has an <strong>8-byte header</strong>, carries ports and length, and offers checksum-based corruption detection. It does not itself guarantee delivery, ordering, duplicate suppression, retransmission, flow control or congestion control.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-udp.b14cba3c28.svg\" width=\"820\" height=\"289\" alt=\"UDP header: each row contains 32 bits\" loading=\"lazy\" decoding=\"async\"></div><figcaption>UDP fixed header: four 16-bit fields, eight bytes total.</figcaption></figure><table><thead><tr><th scope=\"col\">UDP field</th><th scope=\"col\">Width</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Source port</td><td>16 bits</td><td>Sending endpoint; a zero value can indicate no reply port when unused</td></tr><tr><td>Destination port</td><td>16 bits</td><td>Receiving application endpoint</td></tr><tr><td>Length</td><td>16 bits</td><td>UDP header plus UDP payload; minimum 8 bytes</td></tr><tr><td>Checksum</td><td>16 bits</td><td>Error detection over UDP and an IP pseudo-header; not retransmission</td></tr></tbody></table><h2>Operation and services</h2><ol><li>The application chooses the destination IP/port and supplies a message. UDP adds its header and passes the datagram to IP without a connection handshake.</li><li>The receiving UDP layer validates the length/checksum as applicable and uses the destination endpoint to deliver the datagram.</li><li>A corrupt or undeliverable datagram may be discarded; UDP does not recover it. Any reliability or rate-control policy must come from the application or a protocol above UDP.</li><li>UDP checksum zero can mean checksum omitted in IPv4. IPv6 ordinarily requires the UDP checksum; specialized exceptions are outside this syllabus.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A DNS query often uses UDP because a small request/reply can avoid a transport handshake. DNS also uses TCP, so “DNS always UDP” is incorrect.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> UDP datagram preserve; reliability automatic nahi.</p><p><strong>Yes, reliability can be implemented above UDP.</strong> Add sequence numbers, acknowledgments, checksums, retransmission timers, duplicate suppression, ordering buffers and flow/congestion handling as required. If packet5 is lost, an application-level timeout retransmits5; a receiver seeing a duplicate5 acknowledges it without delivering it twice. UDP itself still supplies no delivery guarantee: the application protocol supplies these mechanisms and may eventually report failure rather than guarantee delivery across a permanent outage.</p></div></section>"},{"id":"q4a","title":"Q4(a) · CRC codeword","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(a). Transmit bit stream 10011101 using CRC with G(x)=x³+1. Show the actual transmitted bit string. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Data = 10011101; generator bits = 1001; degree r = 3.</p><h3>To find</h3><p>CRC remainder, complete transmitted frame and receiver check.</p><h3>Formula and why</h3><p>Append r zeros, divide using XOR (modulo 2), and replace those zeros with the r-bit remainder. XOR has no borrowing or carrying. A valid received codeword has remainder zero; the receiver does not append new zeros.</p><div class=\"step\"><h3>Step 1. Append zeros</h3><p>10011101 → 10011101000</p></div><div class=\"step\"><h3>Step 2. Perform XOR division</h3><div class=\"table-wrap\"><table><thead><tr><th>Leading position</th><th>Before XOR</th><th>Aligned generator</th><th>After XOR</th></tr></thead><tbody><tr><td>1</td><td>10011101000</td><td>10010000000</td><td>00001101000</td></tr><tr><td>5</td><td>00001101000</td><td>00001001000</td><td>00000100000</td></tr><tr><td>6</td><td>00000100000</td><td>00000100100</td><td>00000000100</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 3. Build the frame</h3><p>Remainder = <strong>100</strong>. Transmit <strong>10011101100</strong>.</p></div><div class=\"step\"><h3>Step 4. Divide the received frame</h3><div class=\"table-wrap\"><table><thead><tr><th>Position</th><th>Before</th><th>Generator</th><th>After</th></tr></thead><tbody><tr><td>1</td><td>10011101100</td><td>10010000000</td><td>00001101100</td></tr><tr><td>5</td><td>00001101100</td><td>00001001000</td><td>00000100100</td></tr><tr><td>6</td><td>00000100100</td><td>00000100100</td><td>00000000000</td></tr></tbody></table></div><p>Receiver remainder = 000. No error is detected; this is not a guarantee that every possible corruption is detectable.</p></div></div></section>"},{"id":"q4b","title":"Q4(b) · Internet checksum","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(b). Find the 8-bit checksum of 10110001, 10101011, 00110101, 10100001. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>10110001, 10101011, 00110101, 10100001; word width = 8 bits.</p><h3>To find</h3><p>Sender checksum and receiver verification.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/c15ebbb2cede607a.svg\" alt=\"S=\\operatorname{endAroundCarry}(\\text{sum of words}),\\qquad C=\\operatorname{NOT}(S)\" style=\"width:54.346ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>One’s-complement addition returns an overflow carry to the least-significant end. Complement only after all words have been added.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Add the words, folding each carry</h3><div class=\"table-wrap\"><table><thead><tr><th>Word</th><th>Decimal</th><th>Raw addition</th><th>Folded addition</th><th>Running binary sum</th></tr></thead><tbody><tr><td>10110001</td><td>177</td><td>177</td><td>177 + carry 0 = 177</td><td>10110001</td></tr><tr><td>10101011</td><td>171</td><td>348</td><td>92 + carry 1 = 93</td><td>01011101</td></tr><tr><td>00110101</td><td>53</td><td>146</td><td>146 + carry 0 = 146</td><td>10010010</td></tr><tr><td>10100001</td><td>161</td><td>307</td><td>51 + carry 1 = 52</td><td>00110100</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. Complement every bit</h3><p>Running sum = 00110100. Change every 0 to 1 and every 1 to 0: <strong>checksum = 11001011</strong> (decimal 203).</p></div><div class=\"step\"><h3>Step 3. Receiver adds the data and checksum</h3><p>52 + 203 = 255 = 11111111. All bits are 1; complement gives all zeros. Therefore this intact message passes the checksum check. A matching checksum detects no error; it does not prove that every possible corruption is absent.</p></div></div></section>"},{"id":"q4c","title":"Q4(c) · Hamming generation and correction","html":"<section class=\"example\"><h3 class=\"exam-question\">Q4(c). Generate even-parity Hamming code for data 10101111. If the 7th bit is corrupted, give the received pattern and show how to detect and correct the error. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p><strong>Source note:</strong> The paper does not state bit-position direction. The solution numbers positions from the right, matching current faculty slides; position 7 means the seventh from the right throughout.</p><h3>Given</h3><p>Data 10101111; even parity; one error at position 7 from the right.</p><h3>To find</h3><p>Codeword, received word, syndrome, corrected data.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/ced24dba71859ec0.svg\" alt=\"2^r\\ge m+r+1,\\qquad m=8\" style=\"width:26.393ex;height:2.08ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the smallest r satisfying the inequality. Four checks label positions up to 12; parity positions are powers of two.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Choose parity positions</h3><p>r=3 gives 8 < 8+3+1=12, so it is insufficient. r=4 gives16 ≥8+4+1=13. Total length =12; reserve positions1,2,4,8.</p></div><div class=\"step\"><h3>Step 2. Insert data in the remaining positions</h3><div class=\"table-wrap\"><table><thead><tr><th>Position (right-to-left index)</th><th>12</th><th>11</th><th>10</th><th>9</th><th>8</th><th>7</th><th>6</th><th>5</th><th>4</th><th>3</th><th>2</th><th>1</th></tr></thead><tbody><tr><td>Role</td><td>data</td><td>data</td><td>data</td><td>data</td><td>p8</td><td>data</td><td>data</td><td>data</td><td>p4</td><td>data</td><td>p2</td><td>p1</td></tr><tr><td>Data/parity</td><td>1</td><td>0</td><td>1</td><td>0</td><td>?</td><td>1</td><td>1</td><td>1</td><td>?</td><td>1</td><td>?</td><td>?</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 3. Set each parity bit for an even total</h3><div class=\"table-wrap\"><table><thead><tr><th>Parity</th><th>Other covered positions</th><th>Other bits</th><th>Parity bit</th></tr></thead><tbody><tr><td>1</td><td>3, 5, 7, 9, 11</td><td>1 + 1 + 1 + 0 + 0</td><td>1</td></tr><tr><td>2</td><td>3, 6, 7, 10, 11</td><td>1 + 1 + 1 + 1 + 0</td><td>0</td></tr><tr><td>4</td><td>5, 6, 7, 12</td><td>1 + 1 + 1 + 1</td><td>0</td></tr><tr><td>8</td><td>9, 10, 11, 12</td><td>0 + 1 + 0 + 1</td><td>0</td></tr></tbody></table></div><p><strong>Transmitted codeword = 101001110101</strong>.</p></div><div class=\"step\"><h3>Step 4. Flip position 7</h3><p>Position7 changes 1→0. Received word = <strong>101000110101</strong>.</p></div><div class=\"step\"><h3>Step 5. Compute the received syndrome</h3><div class=\"table-wrap\"><table><thead><tr><th>Parity check</th><th>Positions</th><th>XOR</th></tr></thead><tbody><tr><td>1</td><td>1,3,5,7,9,11</td><td>1</td></tr><tr><td>2</td><td>2,3,6,7,10,11</td><td>1</td></tr><tr><td>4</td><td>4,5,6,7,12</td><td>1</td></tr><tr><td>8</td><td>8,9,10,11,12</td><td>0</td></tr></tbody></table></div><p>s8s4s2s1 = 0111 = 7. Flip position7 back; all four checks become0. Remove positions1,2,4,8 to recover <strong>10101111</strong>.</p></div></div></section>"},{"id":"q5a","title":"Q5(a) · Persistent HTTP cache delay","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(a). HTTP/1.1 client/server RTT=1 second; server object transmission=4 seconds. Local cache delay to the client and local object transmission are zero; cache-to-server RTT=1 second. Client makes 200 sequential requests, waiting for each reply before the next; 50% are cache hits. No If-Modified-Since is used. Find time from first request to final object. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p><strong>Source note:</strong> The paper does not explicitly state whether the origin TCP connection already exists. Both the established persistent-connection convention and one new shared connection are distinguished.</p><h3>Given</h3><p>200 sequential requests;50%hits;hit delay0;miss RTT1s and object transmission4s.</p><h3>To find</h3><p>Total time, making connection setup assumption explicit.</p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/277a57e2fbd98438.svg\" alt=\"T=N_{hit}T_{hit}+N_{miss}(RTT+T_{object})+T_{setup}\" style=\"width:43.595ex;height:2.363ex\" loading=\"lazy\" decoding=\"async\"></div><p>Sequential requests cannot overlap, and without conditional validation a cache hit needs no origin round trip.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Count hits and misses</h3><p>Hits=200×0.5=100; misses=100.</p></div><div class=\"step\"><h3>Step 2. Add response delays</h3><p>Each miss costs1+4=5s. Total response time=100×0+100×5=<strong>500s</strong>.</p></div><div class=\"step\"><h3>Step 3. State the setup convention</h3><p>With an already-established persistent origin connection, answer500s. If the model instead includes one new reusable origin TCP connection, add1RTT once:501s. The paper does not state that initial condition; do not add100 separate handshakes to a persistent connection or silently assume one connection per object. Multiple origin connections would require their setup count.</p></div></div></section>"},{"id":"q5b","title":"Q5(b) · Iterative DNS resolution","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(b). The user wants gaia.cs.umass.edu but has no IP address. In the supplied iterative DNS diagram: (1) where does local DNS check before querying root? (2) what server category does the root referral identify? (3) what category does the TLD referral identify? (4) what record carries the returned IPv4 address? (5) is iterative or recursive querying best practice? <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<div class=\"answer\"><p>The <strong>Domain Name System (DNS)</strong> is a distributed hierarchical naming system. Its namespace is a tree with the root at the top. A complete name is the ordered path of labels from a node back to the root. An absolute name may be written with a trailing dot, for example www.example.com.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-dns.f5345fe9fb.svg\" width=\"820\" height=\"520\" alt=\"DNS namespace: full label paths are unique\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Root, top-level domains, delegated domain and host labels.</figcaption></figure><table><thead><tr><th scope=\"col\">Level</th><th scope=\"col\">Example</th><th scope=\"col\">Meaning</th></tr></thead><tbody><tr><td>Root</td><td>.</td><td>Top of the namespace</td></tr><tr><td>Top-level domain (TLD)</td><td>com, org, in</td><td>A child zone below the root</td></tr><tr><td>Registered/delegated domain</td><td>example.com</td><td>Name under a parent such as com</td></tr><tr><td>Subdomain/host label</td><td>www.example.com</td><td>A label below example.com; a name may own different record types</td></tr></tbody></table><h2>Why names remain unique</h2><ol><li>A parent manages the labels immediately beneath it and does not assign the same child label to two different nodes in that parent’s namespace.</li><li>The full sequence of labels identifies the node. The local label www can appear below many domains without conflict: www.example.com and www.example.org are different complete names.</li><li>Administration is delegated: the parent publishes information identifying authoritative servers for a child zone. A domain is a namespace subtree; a zone is the portion administered together, excluding subtrees delegated onward.</li><li>Multiple names may resolve to one IP address, and one name can return several addresses. Uniqueness of names does not imply a one-name/one-IP rule.</li></ol><h2>Resolution</h2><ol><li>A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.</li><li>Otherwise the resolver can query a root server, receive a referral to the relevant TLD, then receive a referral to the authoritative server for the domain.</li><li>The authoritative server supplies the requested record or a relevant negative response. The recursive resolver returns the result and may cache it according to TTL.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>The labels “mail” under two organizations do not collide because mail.example.com and mail.example.org have different ancestors. DNS delegation distributes administration while preserving a unique full path.</p></aside></div><p class=\"memory\"><strong>Yaad rakho:</strong> Full path unique; www label akela unique nahi.</p><div class=\"table-wrap\"><table><thead><tr><th>Part</th><th>Answer</th><th>Explanation</th></tr></thead><tbody><tr><td>1</td><td>DNS Local</td><td>Check the local resolver cache first</td></tr><tr><td>2</td><td>DNS TLD</td><td>Root supplies a referral toward .edu TLD servers; the response packet itself goes back to local DNS</td></tr><tr><td>3</td><td>DNS Authoritative</td><td>TLD supplies a referral toward the responsible authoritative servers; response goes back to local DNS</td></tr><tr><td>4</td><td>A record</td><td>Contains an IPv4 address; AAAA would contain IPv6</td></tr><tr><td>5</td><td>Iterative between the resolver and hierarchy; recursive client-to-resolver</td><td>Neither is universally best in every role. Typical deployment combines the two</td></tr></tbody></table></div><p>The wording “where does the response link” is read as the referral target, not the packet’s network destination. This distinction prevents confusing local DNS with the next server category.</p></div></section>"},{"id":"q5c","title":"Q5(c) · Longest-prefix matching","html":"<section class=\"example\"><h3 class=\"exam-question\">Q5(c). An 8-bit forwarding table maps prefixes 01→interface1, 10→2, 011→3, 100→4, 001→5, otherwise→6. Determine interfaces for destinations (1)00111101, (2)01010101, (3)11001001 using longest-prefix matching. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Prefixes01→1,10→2,011→3,100→4,001→5,default→6.</p><h3>To find</h3><p>Output interface for each destination.</p><h3>Formula and why</h3><p>Among matching prefixes choose the one with the most bits; use default only when none match.</p><p>The leading bits must match from the first bit; a substring appearing later does not count.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Compare each destination from the left</h3><div class=\"table-wrap\"><table><thead><tr><th>Destination</th><th>Matching prefixes</th><th>Longest</th><th>Interface</th></tr></thead><tbody><tr><td>00111101</td><td>001</td><td>001</td><td>5</td></tr><tr><td>01010101</td><td>01 (but not011)</td><td>01</td><td>1</td></tr><tr><td>11001001</td><td>None</td><td>Default</td><td>6</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. Write final order</h3><p><strong>5, 1, 6.</strong></p></div></div></section>"},{"id":"q6a","title":"Q6(a) · Classful network and host portions","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(a). Identify class, default subnet mask, network, broadcast and host portion for (a)191.5.8.9 and (b)214.25.6.3. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>An IPv4 address identifies an IP interface. The network prefix selects the destination network; remaining bits identify an address within it. Classful addressing is historical; modern routing uses explicit CIDR prefixes.</p><div class=\"table-wrap\"><table><thead><tr><th>Class</th><th>First octet</th><th>Default mask</th><th>Network / host split</th><th>Purpose</th></tr></thead><tbody><tr><td>A</td><td>1–126 (ordinary unicast)</td><td>255.0.0.0 (/8)</td><td>8 / 24 bits</td><td>Large historical unicast networks; 0 and 127 reserved</td></tr><tr><td>B</td><td>128–191</td><td>255.255.0.0 (/16)</td><td>16 / 16 bits</td><td>Medium historical unicast networks</td></tr><tr><td>C</td><td>192–223</td><td>255.255.255.0 (/24)</td><td>24 / 8 bits</td><td>Small historical unicast networks</td></tr><tr><td>D</td><td>224–239</td><td>No unicast default mask</td><td>Not network/host class split</td><td>Multicast</td></tr><tr><td>E</td><td>240–255</td><td>No unicast default mask</td><td>Not normal unicast allocation</td><td>Reserved/experimental; special addresses exist</td></tr></tbody></table></div><p>Example: 114.34.2.8 is class A with network 114.0.0.0 and host portion 34.2.8. Class does not override an explicitly supplied CIDR prefix.</p><h3>Given</h3><p>191.5.8.9 and214.25.6.3; historical default class masks.</p><h3>To find</h3><p>Class, mask, network, broadcast and host portion.</p><h3>Formula and why</h3><p>Network = address AND mask; broadcast = network with all host bits1.</p><p>Without a custom prefix the question’s classful default determines the split.</p><h3>Solution</h3><div class=\"table-wrap\"><table><thead><tr><th>Address</th><th>Class</th><th>Mask</th><th>Network</th><th>Broadcast</th><th>Host portion</th></tr></thead><tbody><tr><td>191.5.8.9</td><td>B</td><td>255.255.0.0 (/16)</td><td>191.5.0.0</td><td>191.5.255.255</td><td>8.9 (16 bits)</td></tr><tr><td>214.25.6.3</td><td>C</td><td>255.255.255.0 (/24)</td><td>214.25.6.0</td><td>214.25.6.255</td><td>3 (8 bits)</td></tr></tbody></table></div><p>The supplied address itself is a host address; “host portion” means the suffix left after removing the network bits.</p></div></section>"},{"id":"q6b","title":"Q6(b) · CSMA without collision detection","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(b). Seven messages arrive at 0.3,0.6,0.9,1.6,2.7,3.3,4.3, each with one-unit transmission time. CSMA has no collision detection; propagation takes 0.4 units, so transmission [2,3] is sensed busy at another node during [2.4,3.4]. (1) List each start time, or s if busy at arrival. (2) List successful packet numbers. No deferred retry is requested. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>Arrival times0.3,0.6,0.9,1.6,2.7,3.3,4.3;frame1;propagation0.4.</p><h3>To find</h3><p>Starts/busy decisions and successfully received packets.</p><h3>Formula and why</h3><p>A transmission starting at a is sensed by another node during [a+0.4,a+1.4]. Without collision detection, it continues for its full one-unit duration.</p><p>A node may start before an earlier distant transmission has arrived. Such starts can collide even though each node initially sensed idle.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Inspect arrivals chronologically</h3><div class=\"table-wrap\"><table><thead><tr><th>Packet</th><th>Arrival</th><th>Decision</th><th>Reason</th></tr></thead><tbody><tr><td>1</td><td>0.3</td><td>0.3</td><td>No prior signal</td></tr><tr><td>2</td><td>0.6</td><td>0.6</td><td>Signal1 first arrives0.7</td></tr><tr><td>3</td><td>0.9</td><td>s</td><td>Signal1 busy[0.7,1.7]</td></tr><tr><td>4</td><td>1.6</td><td>s</td><td>Signals1 and2 are busy</td></tr><tr><td>5</td><td>2.7</td><td>2.7</td><td>Both prior signals cleared by2.0</td></tr><tr><td>6</td><td>3.3</td><td>s</td><td>Signal5 busy[3.1,4.1]</td></tr><tr><td>7</td><td>4.3</td><td>4.3</td><td>Signal5 cleared by4.1</td></tr></tbody></table></div></div><div class=\"step\"><h3>Step 2. Identify collisions</h3><p>Frames1 and2 overlap and collide. Frames5 and7 have no overlapping reception intervals at another node. <strong>Starts:0.3,0.6,s,s,2.7,s,4.3. Successes:5,7.</strong></p></div></div></section>"},{"id":"q6c","title":"Q6(c) · Recovering unknown routing weights","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(c). Undirected graph: U–V has unknown link cost X, U–nodeX has unknown link cost Y, U–W=8, V–W=1, V–nodeX=4, nodeX–W=7, nodeX–nodeY=4, W–nodeY=1, W–Z=4, nodeY–Z=6. The shortest-path table from V is V:0/none, W:1/V, nodeY:2/W, nodeX:4/V, Z:5/W, U:6/V. Find unknown edge costs X and Y; write n/a if undetermined. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><h3>Given</h3><p>dV(U)=6 with predecessorV; dV(nodeX)=4 with predecessorV. Unknown linkX is U–V; linkY is U–nodeX.</p><h3>To find</h3><p>Unknown edge costs or n/a. </p><h3>Formula and why</h3><div class=\"math-display\"><img src=\"math/af3d37f6202e501e.svg\" alt=\"d(U)=d(\\operatorname{pred}(U))+c(\\operatorname{pred}(U),U)\" style=\"width:34.678ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>A predecessor edge lies on the reported shortest path, so its cost is fixed by the distance difference. An unused edge is usually constrained, not uniquely determined.</p><h3>Solution</h3><div class=\"step\"><h3>Step 1. Recover link X</h3><p>U’s predecessor isV:6=0+X, therefore <strong>X=6</strong>.</p></div><div class=\"step\"><h3>Step 2. Test what is known about link Y</h3><p>The alternate routeV→nodeX→U costs4+Y. It must not be shorter than6, henceY≥2 (assuming nonnegative costs). Many values satisfy this; ifY=2 there is a tie and predecessorV remains valid. Therefore <strong>Y=n/a (not uniquely determined)</strong>.</p></div></div></section>"},{"id":"q6d","title":"Q6(d) · ALOHA comparison","html":"<section class=\"example\"><h3 class=\"exam-question\">Q6(d). Describe pure and slotted ALOHA and distinguish them. <span class=\"marks\">[5 marks]</span></h3><div class=\"answer\"><h3>Answer</h3>\r\n<p><strong>Definition.</strong> Pure ALOHA is a random-access protocol in which a station transmits whenever a frame is ready and retransmits after a random delay if the transmission is unsuccessful.</p><p><strong>Simple meaning.</strong> Frame ready → bhej do. Collision hua → random wait karke retry.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/pure-aloha.8aa7732ee2.svg\" width=\"820\" height=\"345\" alt=\"Pure ALOHA: arbitrary start times can overlap\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Pure ALOHA: transmit first, retry if necessary</figcaption></figure><h2>Understand it step by step</h2><ol><li>Several stations share the same channel. Pure ALOHA does not first check whether the channel is idle.</li><li>A station transmits immediately. In the basic collision-channel model, any overlapping frame makes the involved frames unsuccessful.</li><li>An acknowledgement indicates successful reception. If it is not received before timeout, the station treats the attempt as unsuccessful. An absent ACK alone cannot distinguish a collision from another loss.</li><li>The station waits a random backoff time and retries. If every station used the same fixed delay, they could collide again together.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Two remote sensors may both transmit a reading immediately after it becomes ready. A random retry delay reduces the chance that their next attempts overlap again.</p></aside><div class=\"answer\"><p>In Pure ALOHA, a station transmits a ready frame without carrier sensing. If a successful acknowledgement is not received, it waits for a random interval and retransmits. Overlapping transmissions cause collisions in the basic model. Its maximum normalized throughput is 1/(2e) ≈ 18.4%, so it is inefficient at high offered load.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Pure = kisi bhi time start; retry ka wait random.</p>\r\n<p><strong>Definition.</strong> The vulnerable period is the interval of start times of other frames that would cause a collision with a chosen frame.</p><p><strong>Simple meaning.</strong> Apne frame se ek frame-time pehle start hua frame bhi takra sakta hai, aur baad mein bhi.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/vulnerable.e2a01a5ab7.svg\" width=\"820\" height=\"360\" alt=\"Pure ALOHA: interfering starts from −T to +T\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Why Pure ALOHA has a 2T vulnerable period</figcaption></figure><h2>Understand it step by step</h2><ol><li>Let your frame start at time 0 and finish at T. All frames have the same transmission duration T.</li><li>Another frame starting between −T and 0 is still being transmitted when your frame begins.</li><li>Another frame starting between 0 and T begins before your frame ends.</li><li>Therefore interfering start times occupy an interval of length 2T. Exact boundary contact is treated as non-overlap in this idealized timing model.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>If a frame takes 2 ms, another frame starting 1 ms before yours overlaps its beginning; a frame starting 1 ms after yours overlaps its end. The vulnerable interval is 4 ms long.</p></aside><div class=\"answer\"><p>A frame lasting T can collide with an equal-length frame that began less than T earlier, or one that begins less than T later. The two intervals together have length T+T=2T.</p></div><p class=\"memory\"><strong>Yaad rakho:</strong> Pure: before T + after T = 2T.</p>\r\n<p><strong>Definition.</strong> Slotted ALOHA is a random-access protocol that divides time into slots of one frame duration and permits transmissions only at the beginning of a slot.</p><p><strong>Simple meaning.</strong> Frame ready hai tab bhi next slot ki start-line ka wait karo.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/slotted-aloha.fbfbef9647.svg\" width=\"820\" height=\"390\" alt=\"Slotted ALOHA: one frame duration per slot\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Slotted ALOHA: starts only at slot boundaries</figcaption></figure><h2>Understand it step by step</h2><ol><li>All stations agree on slot boundaries; time synchronization is required.</li><li>A station with a frame waits for a slot boundary before starting. A slot can be idle, successful or a collision.</li><li>Exactly one station transmitting in a slot produces success in the ideal model. Two or more simultaneous attempts collide.</li><li>Frames cannot partially overlap adjacent slots under the assumptions. The vulnerable interval is T instead of 2T. Randomized retries are still needed.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>If the slot duration is 1 ms and a frame becomes ready at 2.4 ms, the next permitted start is 3 ms. Another station choosing the same slot can still collide.</p></aside><div class=\"answer\"><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">Pure</th><th scope=\"col\">Slotted</th></tr></thead><tbody><tr><td>Start time</td><td>Any time</td><td>Slot boundary only</td></tr><tr><td>Synchronization</td><td>No common slots required</td><td>Required</td></tr><tr><td>Vulnerable period</td><td>2T</td><td>T</td></tr><tr><td>Maximum S</td><td>1/(2e) ≈ 0.184</td><td>1/e ≈ 0.368</td></tr><tr><td>G at maximum</td><td>0.5</td><td>1</td></tr></tbody></table></div><p class=\"memory\"><strong>Yaad rakho:</strong> Slotted = aligned starts; collision risk half-window, not zero.</p></div></section>"},{"id":"q7a","title":"Q7(a) · Learning-switch tables, mislabeled ARP","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(a). Two switches connect via left interface8/right7. Left hosts G,H,I,J,K,L use 10,11,12,13,14,15; right hosts A,B,C,D,E,F use 1,2,3,4,5,6. Initially tables are empty. For E→A, F→E, L→C, C→F at times1–4 (with replies), show entries added at both switches. The question calls these ARP tables though the columns are MAC/interface/TTL. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p><strong>Source note:</strong> This is MAC learning, not an ARP cache. The diagram’s example (A,2) conflicts with the drawn A interface1. No unqualified ARP solution is presented.</p><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"},{"id":"q7b","title":"Q7(b) · NAT four packet stages","html":"<section class=\"example\"><h3 class=\"exam-question\">Q7(b). Host10.0.1.10:3469 sends to128.119.166.184:80 through public address135.122.101.214. For outbound before/after NAT and inbound before/after NAT, identify source/destination IPs, whether source port changes, and whether a new NAT-table entry is made. The pictured existing table concerns10.0.1.20 rather than the sending host. <span class=\"marks\">[10 marks]</span></h3><div class=\"answer\"><h3>Answer</h3><p>This historical topic is not named in the current six-unit syllabus. It is recorded for a complete paper inventory, but excluded from the required preparation and current-unit mark totals.</p></div></section>"}]}],"mocks":[{"id":"tee-mock-guide","title":"TEE mocks · instructions","scope":"TEE · Authored practice using the two supplied papers’ structure · current syllabus 702AI0C023","sections":[{"id":"instructions","title":"Attempt a complete 100-mark paper","html":"<p><strong>Historical pattern used for these compiled mocks: 3 hours, 100 marks. Q1 is compulsory; attempt any four whole questions from Q2–Q7.</strong> Every whole question is 20 marks. These are practice papers, not predicted examination papers. They combine lesson questions, reused actual-paper questions and newly varied numerical problems; the actual-paper tab preserves the original papers separately.</p><p>Attempt Q1(a–d), then choose four complete 20-mark question groups. The solutions follow each part so that every choice is fully reviewable. For a closed-book attempt, write the question in your notebook before reading its answer.</p><table><thead><tr><th scope=\"col\">Planning suggestion</th><th scope=\"col\">Time</th></tr></thead><tbody><tr><td>Read and select four question groups</td><td>10 minutes</td></tr><tr><td>Write five 20-mark questions including Q1</td><td>About 32 minutes each</td></tr><tr><td>Check units, diagrams, sequence numbers and chosen parts</td><td>10 minutes</td></tr></tbody></table><p>Timing is a suggestion based on the historical three-hour papers. It is not a current instructor instruction. Mock numerical assumptions are explicit; use those assumptions in your answer.</p><p>Each mock part follows a question family present in the originals. Q6(a) is transmission-media theory; TCP sequence-number drills are optional, not mock questions. Reused questions and fresh numerical variants are practice, with mock marks rather than a claim that the new data appeared in an exam.</p>"}]},{"id":"tee-mock-a","title":"TEE mock A · full paper","scope":"TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023","sections":[{"id":"q1a","title":"Q1A · Networks and design","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q1A. A university plans a campus network. Explain how wired and wireless communication can be used with respect to speed, reliability and security. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Criterion</th><th scope=\"col\">Wired campus links</th><th scope=\"col\">Wireless campus access</th></tr></thead><tbody><tr><td>Speed/capacity</td><td>Dedicated switch ports and fiber backbones can provide high, predictable capacity</td><td>Capacity shared over radio; performance depends on contention, coverage and interference</td></tr><tr><td>Reliability</td><td>Stable when cables/ports and redundant uplinks are healthy</td><td>Mobility and flexible access; radio interference and coverage holes can cause variability</td></tr><tr><td>Security</td><td>Physical access control helps, but ports still need authentication/segmentation</td><td>Use authenticated encryption and managed access; radio extends beyond rooms</td></tr><tr><td>Deployment</td><td>Cabling cost and fixed access points</td><td>Supports mobile users and faster coverage changes</td></tr><tr><td>Recommended role</td><td>Servers, laboratories, inter-building backbone</td><td>Students’ phones/laptops, roaming and guest access</td></tr></tbody></table><p>Choose a hybrid: wired core/backbone and critical endpoints, with managed access points providing wireless mobility. Separate guest traffic, authenticate users and plan redundant infrastructure. Neither medium alone guarantees security or availability.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A lecture hall uses Wi-Fi for students, while each access point connects by cable to a switch and fiber links the building to campus servers.</p></aside></div></section>"},{"id":"q1b","title":"Q1B · Reference models","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q1B. Draw the TCP/IP reference model, explain all layers and compare it with OSI on five points. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>The <strong>TCP/IP model</strong> describes the Internet protocol suite in four layers. Many teaching books split the link layer into data link and physical, making a five-layer teaching model; identify the convention before drawing.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-models.5bff0518c8.svg\" width=\"820\" height=\"670\" alt=\"OSI layers mapped to the four-layer TCP/IP model\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Four TCP/IP layers; the link layer includes the physical medium.</figcaption></figure><table><thead><tr><th scope=\"col\">TCP/IP layer</th><th scope=\"col\">Function</th><th scope=\"col\">Examples</th></tr></thead><tbody><tr><td>Application</td><td>Defines application message formats and exchanges for Web access, naming, email and file transfer; includes presentation/session functions as needed</td><td>HTTP, DNS, SMTP, FTP</td></tr><tr><td>Transport</td><td>End-to-end process communication</td><td>TCP, UDP, SCTP</td></tr><tr><td>Internet</td><td>IP addressing, routing and best-effort datagrams</td><td>IPv4/IPv6</td></tr><tr><td>Link/network access</td><td>Local delivery and physical access</td><td>Ethernet/Wi-Fi and their medium</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">OSI</th><th scope=\"col\">TCP/IP</th></tr></thead><tbody><tr><td>Layer count</td><td>Seven</td><td>Four here; five-layer teaching variant splits link</td></tr><tr><td>Upper functions</td><td>Application, presentation, session separated</td><td>Grouped under application</td></tr><tr><td>Lower functions</td><td>Data link and physical separated</td><td>Grouped under link/network access</td></tr><tr><td>Purpose</td><td>General reference architecture</td><td>Architecture of deployed Internet protocol family</td></tr><tr><td>Network service</td><td>Reference model can describe different services</td><td>Internet layer uses connectionless IP</td></tr><tr><td>Transport</td><td>Conceptual transport service</td><td>TCP reliable byte stream; UDP datagrams; SCTP messages</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>An application can use UDP without changing the IP or Ethernet layers. Layering lets one protocol vary without redesigning every network function.</p></aside></div></section>"},{"id":"q1c","title":"Q1C · ALOHA throughput","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q1C. In a Pure ALOHA system, the offered load is G=0.25. Find normalized throughput, percentage throughput, and the theoretical maximum. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Protocol = Pure ALOHA; G = 0.25 attempts/frame time.</p><h2>To find</h2><p>S, 100S and the maximum possible S.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><p>Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate the exponent</h4><p>−2 × 0.25 = -0.5.</p></div><div class=\"step\"><h4>Step 2. Evaluate the exponential</h4><div class=\"math-display\"><img src=\"math/871b71246f6a730f.svg\" alt=\"e^{-0.5} \\approx 0.606530660\" style=\"width:19.49ex;height:2.05ex\" loading=\"lazy\" decoding=\"async\"></div></div><div class=\"step\"><h4>Step 3. Multiply by G</h4><p>S = 0.25 × 0.606530660 ≈ 0.151632665 successful frames/frame time.</p></div><div class=\"step\"><h4>Step 4. Convert to percentage</h4><p>0.151632665 × 100 ≈ 15.1633%.</p></div><div class=\"step\"><h4>Step 5. State the maximum separately</h4><p>The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> S ≈ 0.151633; percentage ≈ 15.1633%; Smax ≈ 0.183940 at G=0.5.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.</p></aside></div></section>"},{"id":"q1d","title":"Q1D · IPv4 address block","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q1D. One address in a block is 192.168.8.173/27. Find its subnet mask, first/last address, total address count and ordinary usable-host range. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>192.168.8.173/27</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−27=5; N=2<sup>5</sup>=32.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.255.224</code>; binary=<code>11111111.11111111.11111111.11100000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 4. Its mask value is 224, so step=256−224=32. The IP value 173 lies in 160…191.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 160 in octet 4; set any later octets to zero. Network=<strong>192.168.8.160</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>11000000</td><td>11111111</td><td>11000000</td><td>192</td></tr><tr><td>2</td><td>10101000</td><td>11111111</td><td>10101000</td><td>168</td></tr><tr><td>3</td><td>00001000</td><td>11111111</td><td>00001000</td><td>8</td></tr><tr><td>4</td><td>10101101</td><td>11100000</td><td>10100000</td><td>160</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 191 in the changing octet and 255 in any later octets. Broadcast=<strong>192.168.8.191</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=192.168.8.161; last usable=192.168.8.190; count=32−2=30.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 192.168.8.160; broadcast 192.168.8.191; 32 total, 30 ordinary usable; range 192.168.8.161–192.168.8.190.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"q2a","title":"Q2A · Error detection and correction","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q2A. Explain block coding and redundancy. For the binary codewords C1=0000000, C2=1111000, C3=0011110, find every pairwise Hamming distance, the minimum distance, and the guaranteed error detection/correction limits. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Block coding maps each k-bit dataword to an n-bit codeword, adding n−k redundant bits. Only selected codewords are valid; their separation determines error-detection/correction capability.</p><h2>Given</h2><table><thead><tr><th scope=\"col\">Codeword</th><th scope=\"col\">Bits</th></tr></thead><tbody><tr><td>C1</td><td>0000000</td></tr><tr><td>C2</td><td>1111000</td></tr><tr><td>C3</td><td>0011110</td></tr></tbody></table><h2>To find</h2><p>All pair distances, dmin and the maximum guaranteed numbers of errors.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/08c67b82aac87a74.svg\" alt=\"d(a,b)=\\mathrm{weight}(a\\oplus b)\" style=\"width:22.357ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/b0c374242e18e388.svg\" alt=\"s=d_{\\min}-1,\\quad t=\\lfloor(d_{\\min}-1)/2\\rfloor\" style=\"width:33.068ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>XOR exposes differing positions. Use the closest codeword pair, because it is the weakest separation in the code.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. XOR every distinct pair</h4><table><thead><tr><th scope=\"col\">Pair</th><th scope=\"col\">First</th><th scope=\"col\">Second</th><th scope=\"col\">XOR</th><th scope=\"col\">Distance</th></tr></thead><tbody><tr><td>C1 vs C2</td><td>0000000</td><td>1111000</td><td>1111000</td><td>4</td></tr><tr><td>C1 vs C3</td><td>0000000</td><td>0011110</td><td>0011110</td><td>4</td></tr><tr><td>C2 vs C3</td><td>1111000</td><td>0011110</td><td>1100110</td><td>4</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Take the minimum</h4><p>dmin = min(4, 4, 4) = 4.</p></div><div class=\"step\"><h4>Step 3. Calculate the guarantees</h4><p>Detect = 4−1 = 3; correct = floor((4−1)/2) = 1.</p></div><div class=\"step\"><h4>Step 4. Justify geometrically</h4><p>4 bit changes can reach another valid codeword, so only 3 are guaranteed detectable. Correction regions require 2t &lt; 4.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> dmin=4; detect up to 3 errors; correct up to 1 errors.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A distance of one particular pair does not set the whole-code capability unless it is the minimum.</p></aside></div></section>"},{"id":"q2b","title":"Q2B · Switching or subnet design","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q2B. A company wants to set up a network for smooth data transfer between its offices. Based on your understanding, which switching technique—circuit, packet, or message—would you recommend? Explain how each works and compare their pros, cons, and best use cases to support your choice. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/switching.2b51f856d9.svg\" width=\"820\" height=\"425\" alt=\"Three switching techniques: what is forwarded?\" loading=\"lazy\" decoding=\"async\"></div><figcaption>The three forwarding units and resource choices.</figcaption></figure><h2>Circuit switching</h2><p>A setup phase reserves a circuit through intermediate switches. Data then streams through the established path until release. It offers predictable reserved service and low per-unit forwarding overhead, but setup takes time and idle periods waste reserved capacity. A traditional dedicated voice circuit is an appropriate illustration.</p><h2>Message switching</h2><p>Each intermediate node receives and stores the entire message before forwarding it. Links can be shared and no end-to-end circuit is required, but large messages need buffers and cause substantial store-and-forward delay. It illustrates delay-tolerant whole-message delivery, rather than an efficient choice for interactive office traffic.</p><h2>Packet switching</h2><p>A message is segmented into packets, allowing shared links and pipelined forwarding. This suits bursty data and supports flexible routing. Costs include packet headers, variable queueing delay, potential packet loss and possible reordering in datagram networks.</p><table><thead><tr><th scope=\"col\">Aspect</th><th scope=\"col\">Circuit switching</th><th scope=\"col\">Message switching</th><th scope=\"col\">Packet switching</th></tr></thead><tbody><tr><td>Unit handled</td><td>Continuous stream on established circuit</td><td>Whole message</td><td>Small packets</td></tr><tr><td>Resource use</td><td>Capacity reserved along a circuit</td><td>Shared; message stored at each intermediate node</td><td>Shared; each packet stored/forwarded in this model</td></tr><tr><td>Setup</td><td>Required before data transfer</td><td>No circuit setup required</td><td>Datagram: no connection setup; virtual circuit: setup</td></tr><tr><td>Delay</td><td>Setup delay, then relatively predictable service</td><td>Large store-and-forward delay for long messages</td><td>Variable delay; packet pipeline can reduce completion time</td></tr><tr><td>Main limitation</td><td>Reserved capacity can be idle</td><td>Large buffers; unsuitable for tight delay needs</td><td>Headers, possible queueing/loss; datagrams may reorder</td></tr></tbody></table><h2>Recommendation</h2><p>For ordinary office file, web and collaboration traffic, choose packet switching, with adequate capacity and traffic management. Its statistical sharing serves bursty sources efficiently. If strict deterministic service is required, state that requirement and discuss additional service engineering rather than promising that every packet network guarantees timing.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>One office can upload a file while another sends short web requests. Their packets share available link capacity; a permanently reserved circuit would remain idle between bursts.</p></aside></div></section>"},{"id":"q3a","title":"Q3A · Network classifications and topologies","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q3A. Define a computer network. Explain LAN, MAN, PAN, WAN and ARPANET with examples. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A <strong>computer network</strong> is a set of interconnected devices that exchange data and share resources using communication protocols. A link carries signals; a protocol defines message format, meaning and timing. Hosts run applications, switches forward local frames and routers connect IP networks.</p><table><thead><tr><th scope=\"col\">Type</th><th scope=\"col\">Meaning and scope</th><th scope=\"col\">Example</th></tr></thead><tbody><tr><td>PAN</td><td>Personal Area Network: a person’s nearby devices</td><td>Phone linked to earbuds</td></tr><tr><td>LAN</td><td>Local Area Network: a building or local campus network under local administration</td><td>Laboratory Ethernet/Wi-Fi</td></tr><tr><td>MAN</td><td>Metropolitan Area Network: interconnects sites across a town/city</td><td>City-wide institutional network</td></tr><tr><td>WAN</td><td>Wide Area Network: connects geographically separated networks over regional/global links</td><td>Branches in different cities</td></tr><tr><td>ARPANET</td><td>Historical packet-switched research network; a major predecessor of the Internet</td><td>Early interconnected research institutions; not a modern geographic size category</td></tr></tbody></table><p>Classification by geographical scope is descriptive: a fixed kilometre boundary or a guaranteed speed is not part of every definition. Networks can also be classified by wired/wireless medium or by client-server/peer-to-peer organization.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A student uses a PAN for earbuds, a LAN in the lab and a WAN when accessing a distant university service.</p></aside></div></section>"},{"id":"q3b","title":"Q3B · OSPF","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q3B. Explain the different types of OSPF packets used for communication between routers. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ospf-packets.6093f0d178.svg\" width=\"820\" height=\"655\" alt=\"OSPFv2: five distinct packet types\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Five OSPFv2 packet types.</figcaption></figure><table><thead><tr><th scope=\"col\">Packet type</th><th scope=\"col\">What it does</th><th scope=\"col\">Simple example</th></tr></thead><tbody><tr><td>Hello</td><td>Discover/maintain neighbours and exchange relationship parameters</td><td>Are we still neighbours?</td></tr><tr><td>Database Description (DD/DBD)</td><td>Summarize link-state database contents during synchronization</td><td>Here are the LSA headers I have</td></tr><tr><td>Link State Request (LSR)</td><td>Ask for specific missing/newer link-state information</td><td>Please send this LSA</td></tr><tr><td>Link State Update (LSU)</td><td>Carry one or more LSAs</td><td>Here is the requested or newly flooded link-state information</td></tr><tr><td>Link State Acknowledgment (LSAck)</td><td>Acknowledge receipt of LSAs</td><td>I received these LSAs</td></tr></tbody></table><p>Database Description packets carry summaries; Link State Update packets carry LSAs themselves. Do not confuse an LSA type with an OSPF packet type.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>After seeing a missing LSA in a database summary, a router sends an LSR, receives an LSU containing it and sends an LSAck.</p></aside></div></section>"},{"id":"q3c","title":"Q3C · Application-layer mechanism","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q3C. Explain with a diagram how the WWW uses HTTP when a user enters http://www.example.com. Describe components and the client-server mechanism. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>The <strong>World Wide Web (WWW)</strong> is an information system of linked resources identified by URLs and accessed using Web clients and servers. A browser is a client; a Web server hosts or generates representations such as HTML, images or JSON. <strong>HTTP</strong> defines request/response semantics between these components. The Web is one application of the Internet, not a synonym for the entire Internet.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-http.de65bc75dd.svg\" width=\"820\" height=\"805\" alt=\"Opening a plain HTTP/1.1 URL\" loading=\"lazy\" decoding=\"async\"></div><figcaption>URL → DNS → connection → HTTP request/response → displayed document.</figcaption></figure><ol><li>Interpret the URL <strong>http://www.example.com/</strong>: scheme=http; host=www.example.com; path=/; absent explicit port, plain HTTP uses default port 80. A fragment identifier, if present, is handled by the client and is not sent as part of an HTTP target.</li><li>Resolve the hostname using DNS, often via cached results and a recursive resolver. DNS finds an address; it does not download the Web page.</li><li>For this plain HTTP/1.1 example, establish a TCP connection to the server on port 80. HTTPS additionally protects HTTP using TLS; do not add TLS to an explicitly plain-http example without stating a redirect or change of scheme.</li><li>Send a request such as GET / HTTP/1.1 with Host: www.example.com. The server identifies the target resource, processes the request and prepares a response.</li><li>Receive a status line such as HTTP/1.1 200 OK, response headers such as Content-Type, and the response body. A 404 response indicates no matching resource was found; redirects instruct the client to another target.</li><li>The browser parses HTML, retrieves referenced objects as needed and renders the page. Caching may avoid transfers; persistent connections can serve multiple requests.</li></ol><table><thead><tr><th scope=\"col\">Message component</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Request method / target</td><td>Requested action and resource; GET retrieves a representation, POST submits data for processing</td></tr><tr><td>Headers</td><td>Metadata, routing context, representation preferences and cache/connection information</td></tr><tr><td>Status code</td><td>Result class: 2xx success, 3xx redirection, 4xx client error, 5xx server error</td></tr><tr><td>Body</td><td>Representation or submitted content when present</td></tr></tbody></table><p>HTTP semantics are stateless: each request has its own meaning. Cookies/tokens can let an application maintain a login session; stateless does not mean “users cannot log in”. HTTP/1.1 and HTTP/2 commonly use TCP; HTTP/3 uses QUIC over UDP, so “HTTP always uses TCP” is not a universal statement.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A browser can receive the HTML successfully and still need separate requests for its stylesheet and image. One URL entry can therefore cause several HTTP exchanges.</p></aside></div></section>"},{"id":"q4a","title":"Q4A · IPv6 and packet headers","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q4A. Summarize the IPv6 address 0:15::1:12:1213 to its full, original form. Write a comparison between IPv4 and IPv6 packet headers. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Given address: <code>0:15::1:12:1213</code>.</p><h2>To find</h2><p>The full 128-bit address in eight-group hexadecimal notation.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/a013f99fcbb0987c.svg\" alt=\"\\text{missing groups}=8-\\text{visible groups}\" style=\"width:34.708ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>A written 0 is a visible group. :: represents only the omitted all-zero groups.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count groups on both sides</h4><p>Left: 0, 15 (2 group(s)). Right: 1, 12, 1213 (3 group(s)).</p></div><div class=\"step\"><h4>Step 2. Calculate omitted groups</h4><p>Visible=2+3=5. Missing=8−5=3.</p></div><div class=\"step\"><h4>Step 3. Insert the groups</h4><p><code>0:15:0:0:0:1:12:1213</code>.</p></div><div class=\"step\"><h4>Step 4. Pad each group on the left</h4><table><thead><tr><th scope=\"col\">Group number</th><th scope=\"col\">Four-digit group</th></tr></thead><tbody><tr><td>1</td><td>0000</td></tr><tr><td>2</td><td>0015</td></tr><tr><td>3</td><td>0000</td></tr><tr><td>4</td><td>0000</td></tr><tr><td>5</td><td>0000</td></tr><tr><td>6</td><td>0001</td></tr><tr><td>7</td><td>0012</td></tr><tr><td>8</td><td>1213</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Write all eight in order</h4><p><code>0000:0015:0000:0000:0000:0001:0012:1213</code>.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>0000:0015:0000:0000:0000:0001:0012:1213</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>Leading zeros change the spelling, not the address value. The final group count is eight.</p></aside><h2>Header comparison</h2><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">IPv4</th><th scope=\"col\">IPv6</th></tr></thead><tbody><tr><td>Address width</td><td>32 bits</td><td>128 bits</td></tr><tr><td>Base/header size</td><td>20–60 bytes depending on options</td><td>40-byte fixed base header</td></tr><tr><td>Length field</td><td>Total length includes IPv4 header</td><td>Payload Length excludes 40-byte base header</td></tr><tr><td>Lifetime field</td><td>TTL</td><td>Hop Limit</td></tr><tr><td>Following protocol</td><td>Protocol field</td><td>Next Header; may identify an extension</td></tr><tr><td>Header checksum</td><td>Present</td><td>No base-header checksum</td></tr><tr><td>Options</td><td>Inside IPv4 header</td><td>Typically extension headers</td></tr><tr><td>Fragmentation fields</td><td>In IPv4 header; routers may fragment if permitted</td><td>Fragment extension header; fragmentation by source, not routers</td></tr></tbody></table><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ipv6-header.aef1bfbac7.svg\" width=\"820\" height=\"410\" alt=\"IPv6 base header · each horizontal row is 32 bits wide\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Fixed IPv6 base header.</figcaption></figure><div class=\"note\"><p>The supplied scheme’s sentence says four missing groups, but five groups are already visible, so only three are missing. Its printed eight-group expansion is consistent with three. The count shown above is independently verified.</p></div></div></section>"},{"id":"q4b","title":"Q4B · Transport-layer mechanism","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q4B. What is TCP three-way handshaking? Explain establishment, data transfer and termination with labelled diagrams. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A TCP connection establishes each endpoint’s initial sequence number and confirms that both can receive. Use client initial sequence x=1000 and server initial sequence y=5000; assume no payload in the handshake.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-handshake.e053246177.svg\" width=\"820\" height=\"873\" alt=\"TCP: handshake, data and orderly close\" loading=\"lazy\" decoding=\"async\"></div><figcaption>SYN and FIN each consume one sequence number; pure ACK consumes none.</figcaption></figure><table><thead><tr><th scope=\"col\">Step</th><th scope=\"col\">Segment</th><th scope=\"col\">Meaning</th></tr></thead><tbody><tr><td>1 Client → server</td><td>SYN, Seq=1000</td><td>Client proposes its starting sequence</td></tr><tr><td>2 Server → client</td><td>SYN+ACK, Seq=5000, Ack=1001</td><td>Server acknowledges client SYN and supplies its own start</td></tr><tr><td>3 Client → server</td><td>ACK, Seq=1001, Ack=5001</td><td>Client acknowledges server SYN; connection is established</td></tr></tbody></table><h2>Data transfer</h2><p>Client sends 200 bytes beginning at Seq=1001, so byte numbers are 1001…1200. The receiver acknowledges Ack=1201, the next byte expected. If bytes starting at 1201 are missing but later bytes arrive, the cumulative ACK remains 1201 until the gap is repaired. TCP may buffer out-of-order bytes; it delivers the byte stream in order. Each direction counts independently.</p><h2>Orderly termination</h2><ol><li>Assume client’s next data sequence is 1201. It sends FIN with Seq=1201, meaning it has finished sending.</li><li>Server sends ACK=1202. The connection is half closed: the server can still send data until its application finishes.</li><li>Assume server has sent no data since the handshake. It sends FIN with Seq=5001.</li><li>Client responds with ACK=5002. In a common active-close path the client enters TIME-WAIT so delayed segments and retransmitted FINs can be handled before the tuple is reused.</li><li>These are commonly four segments, but ACK and FIN can be combined and simultaneous close is possible. RST is an abort, not the same as the orderly FIN exchange.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A client can finish uploading a request and close its sending direction while still receiving the server’s response. Full-duplex directions do not have to end at the same instant.</p></aside></div></section>"},{"id":"q5a","title":"Q5A · Sliding-window ARQ","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q5A. Apply Go-Back-N ARQ for window size 7. Explain normal transmission, a lost data frame and a lost ACK, including window shifting and retransmission. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Go-Back-N (GBN) ARQ</strong> pipelines up to W outstanding frames. For m-bit sequence numbers, textbook GBN uses W ≤ 2<sup>m</sup>−1 and receiver window 1. The receiver accepts only the next in-order frame; out-of-order frames are discarded. ACK k here cumulatively acknowledges all frames before k and means “next expected is k”.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-gbn.5f577a6979.svg\" width=\"820\" height=\"750\" alt=\"GBN W=7: loss and cumulative ACKs\" loading=\"lazy\" decoding=\"async\"></div><figcaption>GBN example: frame 2 lost; frames 3–6 discarded; timeout resends 2–6.</figcaption></figure><ol><li>For W=7 with m=3, the sequence space is 0…7. Initially the sender can transmit 0…6. It stores every unacknowledged frame; a timer tracks the oldest one.</li><li>Normal: after receiving 0 and 1, cumulative ACK 2 advances the sender base to 2. The sender can fill newly opened window slots.</li><li>Lost data: if frame 2 is lost, frames 3…6 arrive out of order and are discarded. Repeated ACK 2 says frame 2 is still expected. On timeout the sender retransmits all outstanding frames starting at 2, here 2…6.</li><li>Lost ACK: if ACK 2 is lost but ACK 3 arrives, the later cumulative ACK confirms frames 0…2 and avoids unnecessary retransmission. If no later useful ACK arrives before timeout, the sender retransmits from its oldest outstanding frame; the receiver rejects duplicates and sends its current ACK.</li><li>After sequence 7, numbers wrap to 0. The bound W ≤ 7 leaves one sequence value outside the sender’s current window, preventing the all-ACKs-lost ambiguity of a full eight-frame window in the textbook model.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>With W=7, loss of frame 2 can waste successful receptions of 3…6. GBN trades simple receiver buffering for extra retransmission after loss.</p></aside><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-gbn-normal.144a24ea80.svg\" width=\"820\" height=\"522\" alt=\"GBN W=7: normal window movement\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Normal transmission: both windows advance as frames are cumulatively acknowledged.</figcaption></figure><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-gbn-ack.713dc9972e.svg\" width=\"820\" height=\"598\" alt=\"GBN: a later cumulative ACK covers a lost ACK\" loading=\"lazy\" decoding=\"async\"></div><figcaption>A later cumulative ACK can cover an earlier lost ACK.</figcaption></figure></div></section>"},{"id":"q5b","title":"Q5B · Application protocol","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q5B. Explain FTP and the functions of its control and data connections. Illustrate the transfer process. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>File Transfer Protocol (FTP)</strong> transfers files between a client and server using TCP and separates commands from file data. This separation is its central design feature. Its control connection remains available across multiple operations, while data connections carry file bytes or directory listings.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-ftp.1b305fa997.svg\" width=\"820\" height=\"660\" alt=\"FTP: separate control and data connections\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Control connection on server port 21; active/passive data connection roles differ.</figcaption></figure><table><thead><tr><th scope=\"col\">Connection</th><th scope=\"col\">Function</th><th scope=\"col\">Lifetime / ports</th></tr></thead><tbody><tr><td>Control</td><td>Commands and replies: USER, PASS, CWD, TYPE, LIST, RETR, STOR, QUIT</td><td>Client connects to server TCP port 21; normally kept for the session</td></tr><tr><td>Data</td><td>File contents and directory listing data</td><td>Opened as needed; separate from command channel</td></tr></tbody></table><h2>How a transfer works</h2><ol><li>Client opens the control connection and exchanges server greeting, login commands and replies. Plain FTP sends credentials/data without encryption.</li><li>Client chooses transfer settings such as binary/image mode for arbitrary bytes, and requests the needed working directory/operation.</li><li>In <strong>active FTP</strong>, the client provides a listening endpoint and the server initiates the data connection, traditionally from server port 20.</li><li>In <strong>passive FTP</strong>, the server returns a listening endpoint and the client initiates the data connection to that chosen server port. Therefore “FTP data always uses server port 20” is wrong.</li><li>RETR downloads a file; STOR uploads a file; LIST returns a directory listing over the data connection. Control replies report progress/completion. The session can continue for another transfer.</li><li>QUIT ends the control session.</li></ol><p>FTP over TLS (FTPS) protects FTP connections. SFTP is a separate SSH-based file-transfer protocol, not “FTP using an SSH port”. These names should not be treated as interchangeable.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A passive client behind a firewall can initiate both its control connection and data connection. The file bytes travel on the negotiated data connection, while the command RETR stays on the control connection.</p></aside></div></section>"},{"id":"q6a","title":"Q6A · Transmission media","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q6A. List different types of unguided transmission media and write any two characteristics of each. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Type</th><th scope=\"col\">Characteristic 1</th><th scope=\"col\">Characteristic 2</th></tr></thead><tbody><tr><td>Radio</td><td>Can provide broad-area/mobility support depending on band</td><td>Shared spectrum/interference and obstacles affect reception</td></tr><tr><td>Terrestrial microwave</td><td>Directional, usually line of sight</td><td>Needs antenna alignment; obstructions/weather can matter</td></tr><tr><td>Satellite microwave</td><td>Relay covers large or remote areas</td><td>Delay/capacity depend strongly on orbit/system</td></tr><tr><td>Infrared</td><td>Short range and generally blocked by opaque walls</td><td>Limited room-scale coverage reduces inter-room interference</td></tr></tbody></table><p>Many classifications group satellite links under microwave rather than making a separate spectral category. State that grouping consistently.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Wi-Fi uses radio; a building-to-building directional backhaul can use terrestrial microwave; an infrared remote cannot normally control a device through a solid wall.</p></aside></div></section>"},{"id":"q6b","title":"Q6B · Random access","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q6B. Compare 1-persistent, non-persistent, and p-persistent CSMA strategies with diagrammatic representations. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/persistence.528dafcd8a.svg\" width=\"820\" height=\"590\" alt=\"CSMA persistence: what happens after carrier sensing?\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Different decisions after sensing the channel.</figcaption></figure><table><thead><tr><th scope=\"col\">Rule</th><th scope=\"col\">When idle</th><th scope=\"col\">When busy</th><th scope=\"col\">Trade-off</th></tr></thead><tbody><tr><td>1-persistent</td><td>Transmit immediately</td><td>Keep listening; transmit as soon as idle</td><td>Low idle delay, but waiting stations may start together</td></tr><tr><td>Non-persistent</td><td>Transmit</td><td>Wait a random time, then sense again</td><td>Less synchronized contention; may leave avoidable idle time</td></tr><tr><td>p-persistent (slotted)</td><td>Transmit with probability p; defer a slot with probability 1−p</td><td>Wait until available, then resume the probabilistic slot rule</td><td>Controls contention; needs slots and a choice of p</td></tr></tbody></table><p>All three sense the channel; their persistence rules differ. Propagation delay means carrier sensing cannot guarantee the absence of collisions. In p-persistent CSMA, each eligible idle-slot decision uses the specified probability.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Two stations waiting on a busy channel can start together under 1-persistence. Non-persistence separates repeat sensing through random waits; p-persistence spreads starts using probabilistic decisions.</p></aside></div></section>"},{"id":"q6c","title":"Q6C · Transport and congestion","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q6C. Explain open-loop and closed-loop congestion control. Describe at least two policies from each and distinguish congestion from flow control. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Congestion</strong> occurs when offered traffic overloads network resources such as link capacity, router buffers or processing. Queueing delay grows, packets may be dropped, and excessive retransmission can make the overload worse. <strong>Flow control</strong> protects a receiver; congestion control protects the network.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-congestion.c27c2303bb.svg\" width=\"820\" height=\"515\" alt=\"Two congestion-control approaches\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Open-loop prevention and closed-loop feedback.</figcaption></figure><table><thead><tr><th scope=\"col\">Approach</th><th scope=\"col\">Policy / mechanism</th><th scope=\"col\">How it helps</th></tr></thead><tbody><tr><td>Open loop: prevent congestion without runtime congestion feedback</td><td>Retransmission policy</td><td>Carefully chosen timers/selective retransmission avoid needless extra traffic</td></tr><tr><td>Open loop</td><td>Window policy</td><td>Limit outstanding data and avoid excessive retransmission after loss</td></tr><tr><td>Open loop</td><td>Acknowledgement policy</td><td>Avoid unnecessarily frequent ACK traffic while retaining correct recovery</td></tr><tr><td>Open loop</td><td>Admission policy</td><td>Refuse new load when reserved capacity is insufficient</td></tr><tr><td>Closed loop: measure and react to congestion</td><td>Backpressure</td><td>A congested node tells upstream nodes to reduce/stop sending, possibly propagating hop by hop</td></tr><tr><td>Closed loop</td><td>Choke/control signalling</td><td>A congested node sends explicit feedback to the source</td></tr><tr><td>Closed loop</td><td>Implicit signalling</td><td>A sender infers congestion from loss/delay and changes its sending behaviour</td></tr><tr><td>Closed loop</td><td>Explicit marking</td><td>Network marks congestion (for example ECN); endpoints react to returned information</td></tr></tbody></table><p>For an answer asking for two of each: explain retransmission and admission policies under open loop, then backpressure and explicit signalling under closed loop, with the mechanism and its effect. These are general congestion-control classifications used in the course; they are not all mandatory algorithms implemented inside TCP. TCP commonly uses end-to-end feedback such as loss or ECN.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A router’s output link can be overloaded even while the destination application reads quickly. Increasing receiver memory alone will not remove that network bottleneck.</p></aside></div></section>"},{"id":"q7a","title":"Q7A · Shortest paths · full working","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q7A. For directed edges A→B=3, A→C=2, B→D=4, C→B=1, C→D=7, D→E=2, C→E=10, use Dijkstra from A to E. Show initialization, each settled vertex, updated distances and final path, and draw the network. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Cost</th></tr></thead><tbody><tr><td>A→B</td><td>3</td></tr><tr><td>A→C</td><td>2</td></tr><tr><td>B→D</td><td>4</td></tr><tr><td>C→B</td><td>1</td></tr><tr><td>C→D</td><td>7</td></tr><tr><td>D→E</td><td>2</td></tr><tr><td>C→E</td><td>10</td></tr></tbody></table><p>Source=A; target=E. Edges are directed; do not add reverse edges.</p><h2>To find</h2><p>The path A to E, its total cost and intermediate work.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-mock-a-route.6f748058c9.svg\" width=\"619.00\" height=\"340.00\" alt=\"Dijkstra · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>d[A]=0; every other distance=∞. No predecessors are known.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Tentative</td></tr><tr><td>B</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>C</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Settle A at distance 0</h4><p>Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞, E=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(3)=3</td><td>Improve to 3; predecessor=A</td></tr><tr><td>A→C</td><td>∞</td><td>0+(2)=2</td><td>Improve to 2; predecessor=A</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>A</td><td>Tentative</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Settle C at distance 2</h4><p>Unsettled candidates before selection: B=3, C=2, D=∞, E=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>C→B</td><td>3</td><td>2+(1)=3</td><td>Retain 3 (equal cost)</td></tr><tr><td>C→D</td><td>∞</td><td>2+(7)=9</td><td>Improve to 9; predecessor=C</td></tr><tr><td>C→E</td><td>∞</td><td>2+(10)=12</td><td>Improve to 12; predecessor=C</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>A</td><td>Tentative</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>9</td><td>C</td><td>Tentative</td></tr><tr><td>E</td><td>12</td><td>C</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Settle B at distance 3</h4><p>Unsettled candidates before selection: B=3, D=9, E=12. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>B→D</td><td>9</td><td>3+(4)=7</td><td>Improve to 7; predecessor=B</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>7</td><td>B</td><td>Tentative</td></tr><tr><td>E</td><td>12</td><td>C</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Settle D at distance 7</h4><p>Unsettled candidates before selection: D=7, E=12. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>D→E</td><td>12</td><td>7+(2)=9</td><td>Improve to 9; predecessor=D</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>7</td><td>B</td><td>Settled</td></tr><tr><td>E</td><td>9</td><td>D</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Settle E at distance 9</h4><p>Unsettled candidates before selection: E=9. Select the minimum; ties use alphabetical order.</p><p>No outgoing edges to relax.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>A</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>7</td><td>B</td><td>Settled</td></tr><tr><td>E</td><td>9</td><td>D</td><td>Settled</td></tr></tbody></table></div><div class=\"step\"><h4>Step 7. Recover the path</h4><p>Trace backwards: E ← D ← B ← A. Reverse it: A → B → D → E.</p><p>Edge sum: 3 + 4 + 2 = 9.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A → B → D → E; cost=9.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.</p></aside><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-mock-a-route-solution.c1a801d55e.svg\" width=\"781.00\" height=\"389.00\" alt=\"Dijkstra · final route and distances\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Highlighted final shortest path, with source-to-vertex distance labels.</figcaption></figure></div></section>"},{"id":"q7b","title":"Q7B · Traffic-shaping algorithm","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q7B. Draw and explain the token-bucket algorithm. State at least two limitations. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A <strong>token bucket</strong> generates tokens at rate r up to capacity B. Sending one unit of data consumes the corresponding tokens. Tokens accumulate during idle periods only until the bucket is full. Data can therefore burst when saved tokens exist, subject to the physical link rate.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-token.c3ff1dbf76.svg\" width=\"820\" height=\"660\" alt=\"Token bucket: permission is separate from data\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Tokens store permission; the separate data queue stores packets.</figcaption></figure><ol><li>Initialize a stated token count, often B for a full bucket. Add rΔt tokens over elapsed time, capped at B.</li><li>A packet of length L needs L byte-tokens (or one packet-token in a fixed-packet model). If enough tokens exist, deduct them and permit transmission.</li><li>If tokens are insufficient, a <strong>shaper</strong> waits/buffers until enough are available. A <strong>policer</strong> marks or drops nonconforming traffic according to policy. Token shortage does not universally mean drop.</li><li>Over interval t, a full token bucket bounds admitted data by B+rt. Actual output is also limited by link capacity and packet scheduling.</li><li>Unlike the queue-style leaky bucket, token storage allows limited bursts after idle time. It bounds average rate and burst size separately.</li></ol><div class=\"math-display\"><img src=\"math/750b0148fd39654a.svg\" alt=\"\\mathrm{admitted\\ data}(t)\\le B+rt\" style=\"width:25.805ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><table><thead><tr><th scope=\"col\">Limitation</th><th scope=\"col\">Reason</th></tr></thead><tbody><tr><td>Bursts can still congest downstream queues</td><td>Local conformance does not ensure every later link has capacity</td></tr><tr><td>Parameters must match traffic and link requirements</td><td>A small B delays/drops legitimate packets; a large B permits disruptive bursts</td></tr><tr><td>No complete QoS guarantee alone</td><td>Admission, scheduling and end-to-end capacity may still be needed</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>With B=10 KB and r=2 KB/s, an idle sender can immediately use up to 10 KB of saved tokens; additional sustained traffic must respect the refill rate, and physical serialization still takes time.</p></aside></div></section>"}]},{"id":"tee-mock-b","title":"TEE mock B · full paper","scope":"TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023","sections":[{"id":"q1a","title":"Q1A · Networks and design","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q1A. An organization plans an online collaboration platform. Explain how client-server and peer-to-peer designs affect performance, scalability and reliability. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>In a <strong>client-server</strong> design, users’ clients contact designated service processes. In <strong>peer-to-peer (P2P)</strong>, participating hosts can supply and consume resources. These are application organizations, not different physical cable types.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-client-peer.a7c6f1b535.svg\" width=\"820\" height=\"430\" alt=\"Client-server and peer-to-peer organization\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Central service versus cooperating peers.</figcaption></figure><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">Client-server</th><th scope=\"col\">Peer-to-peer</th></tr></thead><tbody><tr><td>Roles</td><td>Clients request; designated servers provide services</td><td>Peers can both request and provide resources</td></tr><tr><td>Control</td><td>Central policies, accounts and backups are easier to coordinate</td><td>Control and copies distributed among peers</td></tr><tr><td>Performance</td><td>Predictable with adequate server capacity; server may bottleneck</td><td>Resources grow with peers, but peer capacity/availability vary</td></tr><tr><td>Scalability</td><td>Scale servers, replicas, caching and load distribution</td><td>More peers can contribute capacity; coordination becomes harder</td></tr><tr><td>Reliability</td><td>One unreplicated server is a failure point; replication helps</td><td>Loss of one peer need not stop system if useful replicas remain</td></tr><tr><td>Security</td><td>Central access control and monitoring</td><td>Trust and consistent access policy are harder</td></tr><tr><td>Best fit</td><td>Managed collaboration, databases, login services</td><td>Distributed content sharing among participating peers</td></tr></tbody></table><h2>Apply to the platform</h2><p>Central servers can authenticate users, maintain the authoritative shared document and control versions. The organization must provision capacity, replicate data and avoid a single server failure. P2P can exchange large files or local edits among peers and distribute load, but needs discovery, conflict resolution, trust and availability strategies. A hybrid can keep account control centralized while distributing selected content.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>When three teammates edit one document, a replicated central service can order updates. A peer file swarm can speed distribution only while peers with the needed pieces are available.</p></aside></div></section>"},{"id":"q1b","title":"Q1B · Reference models","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q1B. Draw the TCP/IP reference model, explain all layers and compare it with OSI on five points. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>The <strong>TCP/IP model</strong> describes the Internet protocol suite in four layers. Many teaching books split the link layer into data link and physical, making a five-layer teaching model; identify the convention before drawing.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-models.5bff0518c8.svg\" width=\"820\" height=\"670\" alt=\"OSI layers mapped to the four-layer TCP/IP model\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Four TCP/IP layers; the link layer includes the physical medium.</figcaption></figure><table><thead><tr><th scope=\"col\">TCP/IP layer</th><th scope=\"col\">Function</th><th scope=\"col\">Examples</th></tr></thead><tbody><tr><td>Application</td><td>Defines application message formats and exchanges for Web access, naming, email and file transfer; includes presentation/session functions as needed</td><td>HTTP, DNS, SMTP, FTP</td></tr><tr><td>Transport</td><td>End-to-end process communication</td><td>TCP, UDP, SCTP</td></tr><tr><td>Internet</td><td>IP addressing, routing and best-effort datagrams</td><td>IPv4/IPv6</td></tr><tr><td>Link/network access</td><td>Local delivery and physical access</td><td>Ethernet/Wi-Fi and their medium</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">OSI</th><th scope=\"col\">TCP/IP</th></tr></thead><tbody><tr><td>Layer count</td><td>Seven</td><td>Four here; five-layer teaching variant splits link</td></tr><tr><td>Upper functions</td><td>Application, presentation, session separated</td><td>Grouped under application</td></tr><tr><td>Lower functions</td><td>Data link and physical separated</td><td>Grouped under link/network access</td></tr><tr><td>Purpose</td><td>General reference architecture</td><td>Architecture of deployed Internet protocol family</td></tr><tr><td>Network service</td><td>Reference model can describe different services</td><td>Internet layer uses connectionless IP</td></tr><tr><td>Transport</td><td>Conceptual transport service</td><td>TCP reliable byte stream; UDP datagrams; SCTP messages</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>An application can use UDP without changing the IP or Ethernet layers. Layering lets one protocol vary without redesigning every network function.</p></aside></div></section>"},{"id":"q1c","title":"Q1C · ALOHA throughput","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q1C. In a Slotted ALOHA system, the offered load is G=0.6. Find normalized throughput, percentage throughput, and the theoretical maximum. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Protocol = Slotted ALOHA; G = 0.6 attempts/frame time.</p><h2>To find</h2><p>S, 100S and the maximum possible S.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/01e46e63e1b256b9.svg\" alt=\"S=G e^{-G}\" style=\"width:9.999ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><p>Select the formula from the protocol name. The exponent is −G because Slotted ALOHA has a T vulnerable period.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate the exponent</h4><p>−1 × 0.6 = -0.6.</p></div><div class=\"step\"><h4>Step 2. Evaluate the exponential</h4><div class=\"math-display\"><img src=\"math/aa9f70bc612091c4.svg\" alt=\"e^{-0.6} \\approx 0.548811636\" style=\"width:19.49ex;height:2.05ex\" loading=\"lazy\" decoding=\"async\"></div></div><div class=\"step\"><h4>Step 3. Multiply by G</h4><p>S = 0.6 × 0.548811636 ≈ 0.329286982 successful frames/frame time.</p></div><div class=\"step\"><h4>Step 4. Convert to percentage</h4><p>0.329286982 × 100 ≈ 32.9287%.</p></div><div class=\"step\"><h4>Step 5. State the maximum separately</h4><p>The maximum is 1/(1e) ≈ 0.367879 = 36.7879%, at G=1.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> S ≈ 0.329287; percentage ≈ 32.9287%; Smax ≈ 0.367879 at G=1.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.</p></aside></div></section>"},{"id":"q1d","title":"Q1D · IPv4 address block","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q1D. One address in a block is 10.20.45.200/20. Find its subnet mask, first/last address, total address count and ordinary usable-host range. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>10.20.45.200/20</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−20=12; N=2<sup>12</sup>=4,096.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.240.0</code>; binary=<code>11111111.11111111.11110000.00000000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 3. Its mask value is 240, so step=256−240=16. The IP value 45 lies in 32…47.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 32 in octet 3; set any later octets to zero. Network=<strong>10.20.32.0</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>00001010</td><td>11111111</td><td>00001010</td><td>10</td></tr><tr><td>2</td><td>00010100</td><td>11111111</td><td>00010100</td><td>20</td></tr><tr><td>3</td><td>00101101</td><td>11110000</td><td>00100000</td><td>32</td></tr><tr><td>4</td><td>11001000</td><td>00000000</td><td>00000000</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 47 in the changing octet and 255 in any later octets. Broadcast=<strong>10.20.47.255</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=10.20.32.1; last usable=10.20.47.254; count=4096−2=4094.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 10.20.32.0; broadcast 10.20.47.255; 4,096 total, 4,094 ordinary usable; range 10.20.32.1–10.20.47.254.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"q2a","title":"Q2A · Error detection and correction","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q2A. For message bits 101101 and generator 10011, calculate the CRC and transmitted frame. Check the frame at the receiver and show a detected one-bit error. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Message=101101; generator=10011; generator degree r=4. This is textbook systematic CRC with zero initial remainder and no reflection/final XOR.</p><h2>To find</h2><p>Exactly r CRC bits, the transmitted frame and receiver syndromes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/3db4ba7cff91f15a.svg\" alt=\"R=(M\\,2^r)\\bmod_2 G,\\qquad T=(M\\,2^r)\\oplus R\" style=\"width:40.767ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Modulo-2 division uses aligned XOR, not ordinary decimal division.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Preserve all polynomial coefficients</h4><p>Message bits=101101; generator bits=10011. Leading exponent is 4, so CRC length is 4.</p></div><div class=\"step\"><h4>Step 2. Append zeros</h4><p>101101 followed by 4 zeros = 1011010000.</p></div><div class=\"step\"><h4>Step 3. Perform each nonzero XOR subtraction</h4><table><thead><tr><th scope=\"col\">Before</th><th scope=\"col\">Aligned generator</th><th scope=\"col\">After XOR</th></tr></thead><tbody><tr><td>1011010000</td><td>1001100000</td><td>0010110000</td></tr><tr><td>0010110000</td><td>0010011000</td><td>0000101000</td></tr><tr><td>0000101000</td><td>0000100110</td><td>0000001110</td></tr></tbody></table><p>Remainder padded to 4 bits = <strong>1110</strong>. Leading zero columns need no subtraction.</p></div><div class=\"step\"><h4>Step 4. Construct the transmitted frame</h4><p>Message + CRC = 101101 + 1110 = <strong>1011011110</strong>.</p></div><div class=\"step\"><h4>Step 5. Check the full frame</h4><table><thead><tr><th scope=\"col\">Before</th><th scope=\"col\">Aligned generator</th><th scope=\"col\">After XOR</th></tr></thead><tbody><tr><td>1011011110</td><td>1001100000</td><td>0010111110</td></tr><tr><td>0010111110</td><td>0010011000</td><td>0000100110</td></tr><tr><td>0000100110</td><td>0000100110</td><td>0000000000</td></tr></tbody></table><p>Receiver remainder = 0000; the uncorrupted frame passes.</p></div><div class=\"step\"><h4>Step 6. Demonstrate detection</h4><p>Flip the last bit: 1011011111. Dividing by 10011 leaves 0001, which is nonzero, so this error is detected. A zero syndrome would mean no detected error, not proof of no corruption.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> CRC=1110; transmitted frame=1011011110; uncorrupted receiver remainder=0000.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Some software CRCs use different initial/reflection/final conventions; this answer follows the polynomial-division question’s stated textbook model.</p></aside></div></section>"},{"id":"q2b","title":"Q2B · Switching or subnet design","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q2B. A university has been allocated an IP block of 172.16.0.0/16 (65,536 addresses) for its internal network. Department A: 32 labs, each requiring 128 addresses. Department B: 64 labs, each requiring 64 addresses. Department C: 16 labs, each requiring 512 addresses. Design the subnet allocations for each department and calculate how many IP addresses remain unused after the allocation. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Department</th><th scope=\"col\">Labs</th><th scope=\"col\">Total addresses per lab</th></tr></thead><tbody><tr><td>A</td><td>32</td><td>128</td></tr><tr><td>B</td><td>64</td><td>64</td></tr><tr><td>C</td><td>16</td><td>512</td></tr></tbody></table><p>Parent: 172.16.0.0/16 with 65,536 addresses.</p><h2>To find</h2><p>Lab prefixes, department ranges and unused total addresses.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/96f141ad847f8a75.svg\" alt=\"p=32-\\log_2(N_{\\mathrm{addresses\\ per\\ lab}})\" style=\"width:28.506ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/830cf354ee16974f.svg\" alt=\"N_{\\mathrm{department}}=N_{\\mathrm{labs}}N_{\\mathrm{addresses\\ per\\ lab}}\" style=\"width:31.567ex;height:2.195ex\" loading=\"lazy\" decoding=\"async\"></div><p>The question requests addresses, not usable hosts. Therefore do not add two before selecting each lab size.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Department A size</h4><p>128=2⁷ addresses/lab → /25. 32×128=4,096 addresses → department block /20. Allocate 172.16.0.0/20, spanning 172.16.0.0–172.16.15.255.</p></div><div class=\"step\"><h4>Step 2. Department B size</h4><p>64=2⁶ → /26 per lab. 64×64=4,096 → /20 department block. Allocate 172.16.16.0/20, spanning 172.16.16.0–172.16.31.255.</p></div><div class=\"step\"><h4>Step 3. Department C size</h4><p>512=2⁹ → /23 per lab. 16×512=8,192 → /19 department block. Allocate 172.16.32.0/19, spanning 172.16.32.0–172.16.63.255. Its start at third octet 32 is aligned for /19.</p></div><div class=\"step\"><h4>Step 4. List every lab allocation</h4><table><thead><tr><th scope=\"col\">Lab</th><th scope=\"col\">Prefix</th><th scope=\"col\">First address</th><th scope=\"col\">Last address</th></tr></thead><tbody><tr><td>A1</td><td>172.16.0.0/25</td><td>172.16.0.0</td><td>172.16.0.127</td></tr><tr><td>A2</td><td>172.16.0.128/25</td><td>172.16.0.128</td><td>172.16.0.255</td></tr><tr><td>A3</td><td>172.16.1.0/25</td><td>172.16.1.0</td><td>172.16.1.127</td></tr><tr><td>A4</td><td>172.16.1.128/25</td><td>172.16.1.128</td><td>172.16.1.255</td></tr><tr><td>A5</td><td>172.16.2.0/25</td><td>172.16.2.0</td><td>172.16.2.127</td></tr><tr><td>A6</td><td>172.16.2.128/25</td><td>172.16.2.128</td><td>172.16.2.255</td></tr><tr><td>A7</td><td>172.16.3.0/25</td><td>172.16.3.0</td><td>172.16.3.127</td></tr><tr><td>A8</td><td>172.16.3.128/25</td><td>172.16.3.128</td><td>172.16.3.255</td></tr><tr><td>A9</td><td>172.16.4.0/25</td><td>172.16.4.0</td><td>172.16.4.127</td></tr><tr><td>A10</td><td>172.16.4.128/25</td><td>172.16.4.128</td><td>172.16.4.255</td></tr><tr><td>A11</td><td>172.16.5.0/25</td><td>172.16.5.0</td><td>172.16.5.127</td></tr><tr><td>A12</td><td>172.16.5.128/25</td><td>172.16.5.128</td><td>172.16.5.255</td></tr><tr><td>A13</td><td>172.16.6.0/25</td><td>172.16.6.0</td><td>172.16.6.127</td></tr><tr><td>A14</td><td>172.16.6.128/25</td><td>172.16.6.128</td><td>172.16.6.255</td></tr><tr><td>A15</td><td>172.16.7.0/25</td><td>172.16.7.0</td><td>172.16.7.127</td></tr><tr><td>A16</td><td>172.16.7.128/25</td><td>172.16.7.128</td><td>172.16.7.255</td></tr><tr><td>A17</td><td>172.16.8.0/25</td><td>172.16.8.0</td><td>172.16.8.127</td></tr><tr><td>A18</td><td>172.16.8.128/25</td><td>172.16.8.128</td><td>172.16.8.255</td></tr><tr><td>A19</td><td>172.16.9.0/25</td><td>172.16.9.0</td><td>172.16.9.127</td></tr><tr><td>A20</td><td>172.16.9.128/25</td><td>172.16.9.128</td><td>172.16.9.255</td></tr><tr><td>A21</td><td>172.16.10.0/25</td><td>172.16.10.0</td><td>172.16.10.127</td></tr><tr><td>A22</td><td>172.16.10.128/25</td><td>172.16.10.128</td><td>172.16.10.255</td></tr><tr><td>A23</td><td>172.16.11.0/25</td><td>172.16.11.0</td><td>172.16.11.127</td></tr><tr><td>A24</td><td>172.16.11.128/25</td><td>172.16.11.128</td><td>172.16.11.255</td></tr><tr><td>A25</td><td>172.16.12.0/25</td><td>172.16.12.0</td><td>172.16.12.127</td></tr><tr><td>A26</td><td>172.16.12.128/25</td><td>172.16.12.128</td><td>172.16.12.255</td></tr><tr><td>A27</td><td>172.16.13.0/25</td><td>172.16.13.0</td><td>172.16.13.127</td></tr><tr><td>A28</td><td>172.16.13.128/25</td><td>172.16.13.128</td><td>172.16.13.255</td></tr><tr><td>A29</td><td>172.16.14.0/25</td><td>172.16.14.0</td><td>172.16.14.127</td></tr><tr><td>A30</td><td>172.16.14.128/25</td><td>172.16.14.128</td><td>172.16.14.255</td></tr><tr><td>A31</td><td>172.16.15.0/25</td><td>172.16.15.0</td><td>172.16.15.127</td></tr><tr><td>A32</td><td>172.16.15.128/25</td><td>172.16.15.128</td><td>172.16.15.255</td></tr><tr><td>B1</td><td>172.16.16.0/26</td><td>172.16.16.0</td><td>172.16.16.63</td></tr><tr><td>B2</td><td>172.16.16.64/26</td><td>172.16.16.64</td><td>172.16.16.127</td></tr><tr><td>B3</td><td>172.16.16.128/26</td><td>172.16.16.128</td><td>172.16.16.191</td></tr><tr><td>B4</td><td>172.16.16.192/26</td><td>172.16.16.192</td><td>172.16.16.255</td></tr><tr><td>B5</td><td>172.16.17.0/26</td><td>172.16.17.0</td><td>172.16.17.63</td></tr><tr><td>B6</td><td>172.16.17.64/26</td><td>172.16.17.64</td><td>172.16.17.127</td></tr><tr><td>B7</td><td>172.16.17.128/26</td><td>172.16.17.128</td><td>172.16.17.191</td></tr><tr><td>B8</td><td>172.16.17.192/26</td><td>172.16.17.192</td><td>172.16.17.255</td></tr><tr><td>B9</td><td>172.16.18.0/26</td><td>172.16.18.0</td><td>172.16.18.63</td></tr><tr><td>B10</td><td>172.16.18.64/26</td><td>172.16.18.64</td><td>172.16.18.127</td></tr><tr><td>B11</td><td>172.16.18.128/26</td><td>172.16.18.128</td><td>172.16.18.191</td></tr><tr><td>B12</td><td>172.16.18.192/26</td><td>172.16.18.192</td><td>172.16.18.255</td></tr><tr><td>B13</td><td>172.16.19.0/26</td><td>172.16.19.0</td><td>172.16.19.63</td></tr><tr><td>B14</td><td>172.16.19.64/26</td><td>172.16.19.64</td><td>172.16.19.127</td></tr><tr><td>B15</td><td>172.16.19.128/26</td><td>172.16.19.128</td><td>172.16.19.191</td></tr><tr><td>B16</td><td>172.16.19.192/26</td><td>172.16.19.192</td><td>172.16.19.255</td></tr><tr><td>B17</td><td>172.16.20.0/26</td><td>172.16.20.0</td><td>172.16.20.63</td></tr><tr><td>B18</td><td>172.16.20.64/26</td><td>172.16.20.64</td><td>172.16.20.127</td></tr><tr><td>B19</td><td>172.16.20.128/26</td><td>172.16.20.128</td><td>172.16.20.191</td></tr><tr><td>B20</td><td>172.16.20.192/26</td><td>172.16.20.192</td><td>172.16.20.255</td></tr><tr><td>B21</td><td>172.16.21.0/26</td><td>172.16.21.0</td><td>172.16.21.63</td></tr><tr><td>B22</td><td>172.16.21.64/26</td><td>172.16.21.64</td><td>172.16.21.127</td></tr><tr><td>B23</td><td>172.16.21.128/26</td><td>172.16.21.128</td><td>172.16.21.191</td></tr><tr><td>B24</td><td>172.16.21.192/26</td><td>172.16.21.192</td><td>172.16.21.255</td></tr><tr><td>B25</td><td>172.16.22.0/26</td><td>172.16.22.0</td><td>172.16.22.63</td></tr><tr><td>B26</td><td>172.16.22.64/26</td><td>172.16.22.64</td><td>172.16.22.127</td></tr><tr><td>B27</td><td>172.16.22.128/26</td><td>172.16.22.128</td><td>172.16.22.191</td></tr><tr><td>B28</td><td>172.16.22.192/26</td><td>172.16.22.192</td><td>172.16.22.255</td></tr><tr><td>B29</td><td>172.16.23.0/26</td><td>172.16.23.0</td><td>172.16.23.63</td></tr><tr><td>B30</td><td>172.16.23.64/26</td><td>172.16.23.64</td><td>172.16.23.127</td></tr><tr><td>B31</td><td>172.16.23.128/26</td><td>172.16.23.128</td><td>172.16.23.191</td></tr><tr><td>B32</td><td>172.16.23.192/26</td><td>172.16.23.192</td><td>172.16.23.255</td></tr><tr><td>B33</td><td>172.16.24.0/26</td><td>172.16.24.0</td><td>172.16.24.63</td></tr><tr><td>B34</td><td>172.16.24.64/26</td><td>172.16.24.64</td><td>172.16.24.127</td></tr><tr><td>B35</td><td>172.16.24.128/26</td><td>172.16.24.128</td><td>172.16.24.191</td></tr><tr><td>B36</td><td>172.16.24.192/26</td><td>172.16.24.192</td><td>172.16.24.255</td></tr><tr><td>B37</td><td>172.16.25.0/26</td><td>172.16.25.0</td><td>172.16.25.63</td></tr><tr><td>B38</td><td>172.16.25.64/26</td><td>172.16.25.64</td><td>172.16.25.127</td></tr><tr><td>B39</td><td>172.16.25.128/26</td><td>172.16.25.128</td><td>172.16.25.191</td></tr><tr><td>B40</td><td>172.16.25.192/26</td><td>172.16.25.192</td><td>172.16.25.255</td></tr><tr><td>B41</td><td>172.16.26.0/26</td><td>172.16.26.0</td><td>172.16.26.63</td></tr><tr><td>B42</td><td>172.16.26.64/26</td><td>172.16.26.64</td><td>172.16.26.127</td></tr><tr><td>B43</td><td>172.16.26.128/26</td><td>172.16.26.128</td><td>172.16.26.191</td></tr><tr><td>B44</td><td>172.16.26.192/26</td><td>172.16.26.192</td><td>172.16.26.255</td></tr><tr><td>B45</td><td>172.16.27.0/26</td><td>172.16.27.0</td><td>172.16.27.63</td></tr><tr><td>B46</td><td>172.16.27.64/26</td><td>172.16.27.64</td><td>172.16.27.127</td></tr><tr><td>B47</td><td>172.16.27.128/26</td><td>172.16.27.128</td><td>172.16.27.191</td></tr><tr><td>B48</td><td>172.16.27.192/26</td><td>172.16.27.192</td><td>172.16.27.255</td></tr><tr><td>B49</td><td>172.16.28.0/26</td><td>172.16.28.0</td><td>172.16.28.63</td></tr><tr><td>B50</td><td>172.16.28.64/26</td><td>172.16.28.64</td><td>172.16.28.127</td></tr><tr><td>B51</td><td>172.16.28.128/26</td><td>172.16.28.128</td><td>172.16.28.191</td></tr><tr><td>B52</td><td>172.16.28.192/26</td><td>172.16.28.192</td><td>172.16.28.255</td></tr><tr><td>B53</td><td>172.16.29.0/26</td><td>172.16.29.0</td><td>172.16.29.63</td></tr><tr><td>B54</td><td>172.16.29.64/26</td><td>172.16.29.64</td><td>172.16.29.127</td></tr><tr><td>B55</td><td>172.16.29.128/26</td><td>172.16.29.128</td><td>172.16.29.191</td></tr><tr><td>B56</td><td>172.16.29.192/26</td><td>172.16.29.192</td><td>172.16.29.255</td></tr><tr><td>B57</td><td>172.16.30.0/26</td><td>172.16.30.0</td><td>172.16.30.63</td></tr><tr><td>B58</td><td>172.16.30.64/26</td><td>172.16.30.64</td><td>172.16.30.127</td></tr><tr><td>B59</td><td>172.16.30.128/26</td><td>172.16.30.128</td><td>172.16.30.191</td></tr><tr><td>B60</td><td>172.16.30.192/26</td><td>172.16.30.192</td><td>172.16.30.255</td></tr><tr><td>B61</td><td>172.16.31.0/26</td><td>172.16.31.0</td><td>172.16.31.63</td></tr><tr><td>B62</td><td>172.16.31.64/26</td><td>172.16.31.64</td><td>172.16.31.127</td></tr><tr><td>B63</td><td>172.16.31.128/26</td><td>172.16.31.128</td><td>172.16.31.191</td></tr><tr><td>B64</td><td>172.16.31.192/26</td><td>172.16.31.192</td><td>172.16.31.255</td></tr><tr><td>C1</td><td>172.16.32.0/23</td><td>172.16.32.0</td><td>172.16.33.255</td></tr><tr><td>C2</td><td>172.16.34.0/23</td><td>172.16.34.0</td><td>172.16.35.255</td></tr><tr><td>C3</td><td>172.16.36.0/23</td><td>172.16.36.0</td><td>172.16.37.255</td></tr><tr><td>C4</td><td>172.16.38.0/23</td><td>172.16.38.0</td><td>172.16.39.255</td></tr><tr><td>C5</td><td>172.16.40.0/23</td><td>172.16.40.0</td><td>172.16.41.255</td></tr><tr><td>C6</td><td>172.16.42.0/23</td><td>172.16.42.0</td><td>172.16.43.255</td></tr><tr><td>C7</td><td>172.16.44.0/23</td><td>172.16.44.0</td><td>172.16.45.255</td></tr><tr><td>C8</td><td>172.16.46.0/23</td><td>172.16.46.0</td><td>172.16.47.255</td></tr><tr><td>C9</td><td>172.16.48.0/23</td><td>172.16.48.0</td><td>172.16.49.255</td></tr><tr><td>C10</td><td>172.16.50.0/23</td><td>172.16.50.0</td><td>172.16.51.255</td></tr><tr><td>C11</td><td>172.16.52.0/23</td><td>172.16.52.0</td><td>172.16.53.255</td></tr><tr><td>C12</td><td>172.16.54.0/23</td><td>172.16.54.0</td><td>172.16.55.255</td></tr><tr><td>C13</td><td>172.16.56.0/23</td><td>172.16.56.0</td><td>172.16.57.255</td></tr><tr><td>C14</td><td>172.16.58.0/23</td><td>172.16.58.0</td><td>172.16.59.255</td></tr><tr><td>C15</td><td>172.16.60.0/23</td><td>172.16.60.0</td><td>172.16.61.255</td></tr><tr><td>C16</td><td>172.16.62.0/23</td><td>172.16.62.0</td><td>172.16.63.255</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Calculate total allocation</h4><p>4,096+4,096+8,192=16,384 addresses.</p></div><div class=\"step\"><h4>Step 6. Calculate unused space</h4><p>65,536−16,384=49,152 addresses remain unallocated, from 172.16.64.0 through 172.16.255.255.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A: /25 per lab; B: /26 per lab; C: /23 per lab. 49,152 total addresses remain unallocated.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The three department blocks are aligned and non-overlapping. If these had been usable-host requirements, the per-lab prefixes would have been different.</p></aside></div></section>"},{"id":"q3a","title":"Q3A · Network classifications and topologies","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q3A. Define network topology. Explain star and bus topologies with diagrams, advantages and disadvantages; compare ring and mesh. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Topology</strong> is the arrangement of nodes and links. Physical topology describes actual links; logical topology describes how data flows. A switch-centred physical star is different from a shared collision-domain bus.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-topologies.d9e18f041b.svg\" width=\"820\" height=\"665\" alt=\"Four physical network topologies\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Star, bus, ring and full mesh; edges depict physical connections.</figcaption></figure><table><thead><tr><th scope=\"col\">Topology</th><th scope=\"col\">Structure</th><th scope=\"col\">Benefit</th><th scope=\"col\">Limitation</th></tr></thead><tbody><tr><td>Bus</td><td>Devices share a common backbone</td><td>Simple small shared-medium layout</td><td>Backbone fault affects segment; collisions possible on classic shared bus</td></tr><tr><td>Star</td><td>Each device connects to a central switch/hub</td><td>Easy expansion and fault isolation</td><td>Central-device failure affects star; more cabling</td></tr><tr><td>Ring</td><td>Each node connected to two neighbours in a ring</td><td>Structured traversal; token-based variants coordinate access</td><td>Simple single-ring break can disrupt operation unless protected</td></tr><tr><td>Full mesh</td><td>Every pair has a direct link</td><td>Redundant paths and direct connectivity</td><td>Expensive ports/cabling: n(n−1)/2 undirected links</td></tr><tr><td>Tree/hybrid</td><td>Hierarchical stars or combined topologies</td><td>Scales into buildings/floors</td><td>Upper-level faults affect dependent branches</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A lab normally uses a switch-centred star: unplugging one workstation cable isolates that workstation. A failed central switch can stop the whole lab unless redundancy is provided.</p></aside></div></section>"},{"id":"q3b","title":"Q3B · OSPF","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q3B. Summarize how OSPF determines the best path to a destination network. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/link-state.bbee3173ec.svg\" width=\"820\" height=\"540\" alt=\"Link-state routing: from local links to a shortest-path tree\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Build the topology, then calculate the route.</figcaption></figure><ol><li>Discover/maintain neighbours and determine local link costs.</li><li>Exchange link-state information and synchronize the database within the appropriate area.</li><li>Run Dijkstra’s shortest-path algorithm with the current router as the root.</li><li>Add outgoing link costs along candidate paths and select minimum-cost routes.</li><li>Install next-hop information; recalculate when relevant topology information changes.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>Path A→B→D costs 10+10=20, whereas A→C→D costs 5+8=13. The latter is preferred under those metrics. OSPF can support equal-cost alternatives.</p></aside></div></section>"},{"id":"q3c","title":"Q3C · Application-layer mechanism","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q3C. With a neat diagram, explain the hierarchical domain namespace in DNS and how it ensures unique domain names. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>The <strong>Domain Name System (DNS)</strong> is a distributed hierarchical naming system. Its namespace is a tree with the root at the top. A complete name is the ordered path of labels from a node back to the root. An absolute name may be written with a trailing dot, for example www.example.com.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-dns.f5345fe9fb.svg\" width=\"820\" height=\"520\" alt=\"DNS namespace: full label paths are unique\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Root, top-level domains, delegated domain and host labels.</figcaption></figure><table><thead><tr><th scope=\"col\">Level</th><th scope=\"col\">Example</th><th scope=\"col\">Meaning</th></tr></thead><tbody><tr><td>Root</td><td>.</td><td>Top of the namespace</td></tr><tr><td>Top-level domain (TLD)</td><td>com, org, in</td><td>A child zone below the root</td></tr><tr><td>Registered/delegated domain</td><td>example.com</td><td>Name under a parent such as com</td></tr><tr><td>Subdomain/host label</td><td>www.example.com</td><td>A label below example.com; a name may own different record types</td></tr></tbody></table><h2>Why names remain unique</h2><ol><li>A parent manages the labels immediately beneath it and does not assign the same child label to two different nodes in that parent’s namespace.</li><li>The full sequence of labels identifies the node. The local label www can appear below many domains without conflict: www.example.com and www.example.org are different complete names.</li><li>Administration is delegated: the parent publishes information identifying authoritative servers for a child zone. A domain is a namespace subtree; a zone is the portion administered together, excluding subtrees delegated onward.</li><li>Multiple names may resolve to one IP address, and one name can return several addresses. Uniqueness of names does not imply a one-name/one-IP rule.</li></ol><h2>Resolution</h2><ol><li>A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.</li><li>Otherwise the resolver can query a root server, receive a referral to the relevant TLD, then receive a referral to the authoritative server for the domain.</li><li>The authoritative server supplies the requested record or a relevant negative response. The recursive resolver returns the result and may cache it according to TTL.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>The labels “mail” under two organizations do not collide because mail.example.com and mail.example.org have different ancestors. DNS delegation distributes administration while preserving a unique full path.</p></aside></div></section>"},{"id":"q4a","title":"Q4A · IPv6 and packet headers","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q4A. Construct the IPv6 packet format and explain the purpose of each field. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ipv6-header.aef1bfbac7.svg\" width=\"820\" height=\"410\" alt=\"IPv6 base header · each horizontal row is 32 bits wide\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Eight base-header fields occupy 320 bits = 40 bytes.</figcaption></figure><table><thead><tr><th scope=\"col\">Field</th><th scope=\"col\">Bits</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Version</td><td>4</td><td>Value 6</td></tr><tr><td>Traffic Class</td><td>8</td><td>Traffic treatment/congestion-related marking</td></tr><tr><td>Flow Label</td><td>20</td><td>Identifies a flow for appropriate handling</td></tr><tr><td>Payload Length</td><td>16</td><td>Bytes after the base header; includes extension headers when present</td></tr><tr><td>Next Header</td><td>8</td><td>Type of the next extension header or upper-layer protocol</td></tr><tr><td>Hop Limit</td><td>8</td><td>Decremented on forwarding; limits packet lifetime in hops</td></tr><tr><td>Source address</td><td>128</td><td>Sending interface address</td></tr><tr><td>Destination address</td><td>128</td><td>Destination address</td></tr></tbody></table><p>The first two 32-bit rows contain 64 bits and the two addresses contain 256 bits, giving a 320-bit base header. Payload Length excludes these 40 bytes. Next Header can identify an extension header or upper-layer protocol. IPv6 has no base-header checksum; optional information is carried through extension headers.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A packet with 24 extension-header bytes and 1,200 upper-layer bytes has Payload Length=1,224 and total length=1,264 bytes. This illustrates why the two length values differ.</p></aside></div></section>"},{"id":"q4b","title":"Q4B · Transport-layer mechanism","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q4B. Describe UDP in detail with a labelled header diagram. Explain its services and operation. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>User Datagram Protocol (UDP)</strong> provides connectionless, message-oriented process delivery. One send creates a datagram; message boundaries are retained. UDP has an <strong>8-byte header</strong>, carries ports and length, and offers checksum-based corruption detection. It does not itself guarantee delivery, ordering, duplicate suppression, retransmission, flow control or congestion control.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-udp.b14cba3c28.svg\" width=\"820\" height=\"289\" alt=\"UDP header: each row contains 32 bits\" loading=\"lazy\" decoding=\"async\"></div><figcaption>UDP fixed header: four 16-bit fields, eight bytes total.</figcaption></figure><table><thead><tr><th scope=\"col\">UDP field</th><th scope=\"col\">Width</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Source port</td><td>16 bits</td><td>Sending endpoint; a zero value can indicate no reply port when unused</td></tr><tr><td>Destination port</td><td>16 bits</td><td>Receiving application endpoint</td></tr><tr><td>Length</td><td>16 bits</td><td>UDP header plus UDP payload; minimum 8 bytes</td></tr><tr><td>Checksum</td><td>16 bits</td><td>Error detection over UDP and an IP pseudo-header; not retransmission</td></tr></tbody></table><h2>Operation and services</h2><ol><li>The application chooses the destination IP/port and supplies a message. UDP adds its header and passes the datagram to IP without a connection handshake.</li><li>The receiving UDP layer validates the length/checksum as applicable and uses the destination endpoint to deliver the datagram.</li><li>A corrupt or undeliverable datagram may be discarded; UDP does not recover it. Any reliability or rate-control policy must come from the application or a protocol above UDP.</li><li>UDP checksum zero can mean checksum omitted in IPv4. IPv6 ordinarily requires the UDP checksum; specialized exceptions are outside this syllabus.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A DNS query often uses UDP because a small request/reply can avoid a transport handshake. DNS also uses TCP, so “DNS always UDP” is incorrect.</p></aside></div></section>"},{"id":"q5a","title":"Q5A · Sliding-window ARQ","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q5A. For a 3-bit sequence field, find the maximum sender and receiver windows for Selective Repeat ARQ. Explain transmission, ACKs, buffering and the ambiguity of an oversized window. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Selective Repeat (SR) ARQ</strong> accepts and buffers valid out-of-order frames inside the receiver window, acknowledges them individually and retransmits only missing/timed-out frames. In this answer ACK i means “frame i received”, unlike the next-expected cumulative ACK convention used for GBN.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-sr.5ae2b52b45.svg\" width=\"820\" height=\"674\" alt=\"SR W=4: individual ACKs and buffering\" loading=\"lazy\" decoding=\"async\"></div><figcaption>SR buffers 3 while waiting for 2; only 2 is retransmitted.</figcaption></figure><ol><li>For m=3 there are eight sequence numbers, 0…7. With equal sender and receiver windows, maximum W=2<sup>3−1</sup>=4. Both windows begin at 0 and span 0…3.</li><li>Sender sends 0,1,2,3. Receiver accepts 0 and 1, delivers them and advances its left edge to 2. Frame 2 is lost; frame 3 is stored and ACK 3 is sent.</li><li>Although 3 is acknowledged, the sender’s base cannot jump over missing 2. A timer for 2 expires; only frame 2 is retransmitted.</li><li>When 2 arrives, the receiver can deliver 2 and the buffered 3 in order, moving its window forward. Individual ACKs let the sender release the relevant stored copies.</li><li>Why half the space: with an incorrectly chosen W=5 in an eight-number space, receiving old 0…4 moves the receive window to {5,6,7,0,1}. If ACKs are lost, retransmitted old 0 or 1 could fall in the new window and be mistaken for new data. W=4 prevents these two consecutive windows from overlapping.</li><li>A repeated old frame can be acknowledged again without delivering it twice. SR needs more receiver storage and per-frame tracking than GBN.</li></ol><div class=\"math-display\"><img src=\"math/454034d348f17623.svg\" alt=\"W_s=W_r\\le 2^{m-1}\" style=\"width:16.921ex;height:2.357ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>A noisy long-delay link benefits from retransmitting only the missing frame, but the receiver must retain later frames and track which sequence numbers belong to its current window.</p></aside></div></section>"},{"id":"q5b","title":"Q5B · Application protocol","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q5B. Explain SMTP and its role in email. Describe communication phases and typical commands with a labelled client-server diagram. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Simple Mail Transfer Protocol (SMTP)</strong> transfers email from a sending client/server to a receiving mail server using a reliable transport, normally TCP. It is a push/store-and-forward transfer protocol. User agents compose/read mail; mail-transfer agents relay it, consulting DNS MX records to find recipient-domain mail servers.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-smtp.c6f99877c4.svg\" width=\"820\" height=\"902\" alt=\"SMTP: envelope, message and completion\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Submission/relay use SMTP; reading an inbox uses a separate access protocol.</figcaption></figure><table><thead><tr><th scope=\"col\">Phase</th><th scope=\"col\">Typical exchange</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Connection and greeting</td><td>Server 220; client EHLO (HELO for basic SMTP); server 250 capabilities</td><td>Identify peers and learn supported extensions</td></tr><tr><td>Envelope transfer</td><td>MAIL FROM:&lt;sender&gt;; RCPT TO:&lt;recipient&gt;; 250 replies</td><td>Declare return path and one or more delivery recipients</td></tr><tr><td>Message transfer</td><td>DATA; server 354; headers + blank line + body; single dot line; server 250</td><td>Transmit the message after server permission; completion reply accepts responsibility</td></tr><tr><td>Termination</td><td>QUIT; server 221</td><td>Close the SMTP session cleanly</td></tr></tbody></table><h2>Message flow and important details</h2><ol><li>The sender’s user agent submits mail to its configured submission service. Server-to-server SMTP relay commonly uses TCP port 25; message submission commonly uses 587, often with authentication and TLS policy.</li><li>The sending server resolves the recipient domain’s MX records, connects to an appropriate mail server and carries out the SMTP exchange.</li><li>MAIL FROM and RCPT TO are the <strong>envelope</strong>; visible From/To headers inside DATA are message content and can differ. Multiple RCPT TO commands can name several recipients.</li><li>A line containing only a dot ends DATA. A content line beginning with a dot is dot-stuffed for transparency and unstuffed by the receiver.</li><li>A temporary 4xx failure can lead the sending server to queue and retry; a permanent 5xx failure normally rejects that operation. One successful handoff is not proof that a human read the message.</li><li>The recipient reads stored mail using an access protocol such as IMAP/POP3 or webmail. SMTP is not the mailbox-retrieval protocol.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A message addressed to two recipients can send two RCPT TO commands before one DATA body. The SMTP envelope controls delivery even if the visible header lists a mailing-list name.</p></aside></div></section>"},{"id":"q6a","title":"Q6A · Transmission media","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q6A. How is transmission media classified? List advantages and disadvantages of optical fiber. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Transmission media are classified into guided media (twisted pair, coaxial cable, optical fiber) and unguided media (radio, microwave, infrared).</p><p>Optical fiber carries data as light in a core surrounded by cladding. It is a guided medium. Single-mode fiber supports one main propagation mode and is used for long/high-capacity links; multimode supports multiple modes and is often used over shorter distances.</p><table><thead><tr><th scope=\"col\">Advantages</th><th scope=\"col\">Disadvantages / design costs</th></tr></thead><tbody><tr><td>High data capacity and low attenuation over suitable links</td><td>Optical transceivers, connectors and splicing add cost/skill requirements</td></tr><tr><td>Immune to electromagnetic interference; no electrical crosstalk</td><td>Tight bends, dirty connectors and poor installation increase loss</td></tr><tr><td>Electrical isolation between buildings</td><td>Fiber is mechanically sensitive and requires appropriate protection</td></tr><tr><td>Harder to tap casually than an unprotected radio channel</td><td>It is not automatically confidential; encryption/access control remain necessary</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>A campus backbone can use fiber between buildings to avoid electrical interference and achieve high capacity. Installers still need to respect bend radius and test connectors.</p></aside></div></section>"},{"id":"q6b","title":"Q6B · Random access","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q6B. A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps. What is the throughput if the system (all stations together) produces (a) 1000 frames per second, (b) 500 frames per second, (c) 250 frames per second? <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Interpret the stated aggregate production rates as offered attempt rates in the standard textbook model. The following working includes normalized throughput, successful frames/s and successful frame bits/s for each case.</p><h2>Case a · 1000 frames/s</h2><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>200 bits</td></tr><tr><td>R</td><td>200 kbps = 200,000 bits/s</td></tr><tr><td>λ</td><td>1000 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 200/200,000 = 0.001 s = 1 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 1000 × 0.001 = 1 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−2G = -2; e to that power ≈ 0.135335283.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 1 × 0.135335283 ≈ 0.135335283.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.135335283/0.001 ≈ 135.335283 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.135335283 × 200,000 ≈ 27067.056647 bits/s ≈ 27.067057 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=1, S≈0.135335, successful rate≈135.335 frames/s = 27.067 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 1000 attempts/s; collisions reduce the delivered frame rate to about 135.335/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside><h2>Case b · 500 frames/s</h2><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>200 bits</td></tr><tr><td>R</td><td>200 kbps = 200,000 bits/s</td></tr><tr><td>λ</td><td>500 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 200/200,000 = 0.001 s = 1 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 500 × 0.001 = 0.5 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−2G = -1; e to that power ≈ 0.367879441.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 0.5 × 0.367879441 ≈ 0.183939721.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.183939721/0.001 ≈ 183.939721 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.183939721 × 200,000 ≈ 36787.944117 bits/s ≈ 36.787944 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=0.5, S≈0.183940, successful rate≈183.940 frames/s = 36.788 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 500 attempts/s; collisions reduce the delivered frame rate to about 183.940/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside><h2>Case c · 250 frames/s</h2><h2>Given</h2><table><thead><tr><th scope=\"col\">Symbol</th><th scope=\"col\">Given</th></tr></thead><tbody><tr><td>L</td><td>200 bits</td></tr><tr><td>R</td><td>200 kbps = 200,000 bits/s</td></tr><tr><td>λ</td><td>250 aggregate attempts/s</td></tr></tbody></table><h2>To find</h2><p>T, G, S, successful frames/s and bit/s.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/4ac7eb7c34287111.svg\" alt=\"T=L/R\" style=\"width:8.999ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/f8d7da692e922bd4.svg\" alt=\"G=\\lambda T\" style=\"width:7.707ex;height:1.781ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/afb39a0ed04909f3.svg\" alt=\"F_{\\mathrm{success}}=S/T,\\qquad B_{\\mathrm{success}}=SR\" style=\"width:32.295ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Frame transmission time</h4><p>T = 200/200,000 = 0.001 s = 1 ms.</p></div><div class=\"step\"><h4>Step 2. Offered load</h4><p>G = 250 × 0.001 = 0.25 attempts/frame time.</p></div><div class=\"step\"><h4>Step 3. Exponent and exponential</h4><p>−2G = -0.5; e to that power ≈ 0.606530660.</p></div><div class=\"step\"><h4>Step 4. Normalized throughput</h4><p>S = 0.25 × 0.606530660 ≈ 0.151632665.</p></div><div class=\"step\"><h4>Step 5. Successful frames each second</h4><p>S/T = 0.151632665/0.001 ≈ 151.632665 frames/s.</p></div><div class=\"step\"><h4>Step 6. Successful frame bit rate</h4><p>SR = 0.151632665 × 200,000 ≈ 30326.532986 bits/s ≈ 30.326533 kbps.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> G=0.25, S≈0.151633, successful rate≈151.633 frames/s = 30.327 kbps.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The input is 250 attempts/s; collisions reduce the delivered frame rate to about 151.633/s. If the paper calls generated traffic the offered traffic, use that stated value as λ.</p></aside></div></section>"},{"id":"q6c","title":"Q6C · Transport and congestion","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q6C. Compare UDP, TCP and SCTP on at least eight points. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">UDP</th><th scope=\"col\">TCP</th><th scope=\"col\">SCTP</th></tr></thead><tbody><tr><td>Service unit</td><td>Datagram; preserves messages</td><td>Byte stream; no message boundaries</td><td>Messages carried in chunks; preserves boundaries</td></tr><tr><td>Connection setup</td><td>No protocol handshake</td><td>Connection; usual three-way SYN exchange</td><td>Association; four-message cookie exchange</td></tr><tr><td>Reliability</td><td>No delivery/order guarantee</td><td>Reliable ordered stream</td><td>Reliable messages; ordered per stream by default, unordered option</td></tr><tr><td>Ordering scope</td><td>None supplied</td><td>One ordered byte stream per direction</td><td>Multiple streams; per-stream order avoids blocking every stream on one stream’s ordering gap</td></tr><tr><td>Flow control</td><td>Not supplied by UDP</td><td>Receiver-advertised window</td><td>Receiver flow control</td></tr><tr><td>Congestion control</td><td>Not supplied by UDP</td><td>Yes</td><td>Yes</td></tr><tr><td>Multihoming</td><td>No built-in association failover</td><td>Classic TCP uses one address pair</td><td>Association can bind multiple addresses; built-in path failover</td></tr><tr><td>Header</td><td>8 bytes</td><td>Minimum 20 bytes</td><td>12-byte common header plus chunks</td></tr><tr><td>Typical use</td><td>DNS, real-time applications with their own controls</td><td>Web over HTTP/1.1 or HTTP/2, reliable byte transfers</td><td>Telecom signalling and multi-stream message applications</td></tr><tr><td>Performance claim</td><td>Low protocol overhead, not automatically fastest overall</td><td>Recovery/ordering have costs and benefits</td><td>Extra capabilities; no universal speed ranking</td></tr></tbody></table><p>The correct protocol depends on application semantics and network conditions. “UDP is always faster” and “SCTP is always slower than TCP” are not defensible general rules. All three normally run above IP; security/encryption is a separate requirement.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A game can prefer fresh updates over retransmitting stale state, while a document download needs every byte. An application with separate message streams can benefit from SCTP’s stream separation.</p></aside></div></section>"},{"id":"q7a","title":"Q7A · Shortest paths · full working","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q7A. For directed edges A→B=4, A→C=5, B→C=−2, B→D=6, C→D=2, D→E=3, C→E=8, use Bellman–Ford from A to E. Show the declared edge order, each pass, final distances and path; explain the negative-cycle check. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Directed edge</th><th scope=\"col\">Weight</th></tr></thead><tbody><tr><td>A→B</td><td>4</td></tr><tr><td>A→C</td><td>5</td></tr><tr><td>B→C</td><td>-2</td></tr><tr><td>B→D</td><td>6</td></tr><tr><td>C→D</td><td>2</td></tr><tr><td>D→E</td><td>3</td></tr><tr><td>C→E</td><td>8</td></tr></tbody></table><h2>To find</h2><p>The shortest route and cost, with complete passes and a negative-cycle check.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Bellman–Ford permits negative edges. We use the listed order with in-place updates; do not mix this with a table that reads only the previous pass.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-mock-b-route.720ccc32b6.svg\" width=\"614.00\" height=\"234.00\" alt=\"Bellman–Ford · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>5 vertices → at most 4 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.</p></div><div class=\"step\"><h4>Step 2. Pass 1: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(4)=4</td><td>4</td><td>Update; predecessor=A</td></tr><tr><td>A→C</td><td>∞</td><td>0+(5)=5</td><td>5</td><td>Update; predecessor=A</td></tr><tr><td>B→C</td><td>5</td><td>4+(-2)=2</td><td>2</td><td>Update; predecessor=B</td></tr><tr><td>B→D</td><td>∞</td><td>4+(6)=10</td><td>10</td><td>Update; predecessor=B</td></tr><tr><td>C→D</td><td>10</td><td>2+(2)=4</td><td>4</td><td>Update; predecessor=C</td></tr><tr><td>D→E</td><td>∞</td><td>4+(3)=7</td><td>7</td><td>Update; predecessor=D</td></tr><tr><td>C→E</td><td>7</td><td>2+(8)=10</td><td>7</td><td>No improvement</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th><th scope=\"col\">E</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>4</td><td>2</td><td>4</td><td>7</td></tr><tr><td>Predecessor</td><td>—</td><td>A</td><td>B</td><td>C</td><td>D</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Pass 2: relax every edge</h4><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old d[target]</th><th scope=\"col\">Candidate via source</th><th scope=\"col\">New d[target]</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>4</td><td>0+(4)=4</td><td>4</td><td>No improvement</td></tr><tr><td>A→C</td><td>2</td><td>0+(5)=5</td><td>2</td><td>No improvement</td></tr><tr><td>B→C</td><td>2</td><td>4+(-2)=2</td><td>2</td><td>No improvement</td></tr><tr><td>B→D</td><td>4</td><td>4+(6)=10</td><td>4</td><td>No improvement</td></tr><tr><td>C→D</td><td>4</td><td>2+(2)=4</td><td>4</td><td>No improvement</td></tr><tr><td>D→E</td><td>7</td><td>4+(3)=7</td><td>7</td><td>No improvement</td></tr><tr><td>C→E</td><td>7</td><td>2+(8)=10</td><td>7</td><td>No improvement</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">A</th><th scope=\"col\">B</th><th scope=\"col\">C</th><th scope=\"col\">D</th><th scope=\"col\">E</th></tr></thead><tbody><tr><td>End-of-pass distance</td><td>0</td><td>4</td><td>2</td><td>4</td><td>7</td></tr><tr><td>Predecessor</td><td>—</td><td>A</td><td>B</td><td>C</td><td>D</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Stop after an unchanged pass</h4><p>This entire pass changed no distance. Further identical relaxation passes will not improve anything.</p></div><div class=\"step\"><h4>Step 5. Recover and total the path</h4><p>Backward predecessors: E ← D ← C ← B ← A. Forward route: A → B → C → D → E.</p><p>Cost = (4) + (-2) + (2) + (3) = 7. No edge can now improve its destination label.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A → B → C → D → E; shortest cost=7.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Negative weights are a general graph-exercise feature. RIP hop counts and OSPF link costs are not negative in the ordinary routing protocols studied here.</p></aside><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-mock-b-route-solution.f6bae119c4.svg\" width=\"776.00\" height=\"289.00\" alt=\"Bellman–Ford · final route and distances\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Highlighted final shortest path, with source-to-vertex distance labels.</figcaption></figure></div></section>"},{"id":"q7b","title":"Q7B · Traffic-shaping algorithm","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q7B. Draw and explain the leaky-bucket algorithm. Is it always better than a token bucket? <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>In the textbook <strong>leaky-bucket queue/shaper</strong> model, arriving packets enter a finite buffer. The output sends at a configured rate whenever data is queued. When the queue empties, it cannot send nonexistent packets; when the buffer is full, excess arrivals are dropped in this finite-buffer model.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-leaky.77bdbcf957.svg\" width=\"820\" height=\"515\" alt=\"Leaky-bucket data queue\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Finite data buffer smooths a burst into a bounded departure rate.</figcaption></figure><ol><li>Choose buffer capacity B and output service rate r in consistent units.</li><li>Admit arrivals that fit. Drop/mark overflow according to the stated implementation; this queue example drops the excess.</li><li>Drain at rate r while the queue is nonempty. Idle time does not accumulate permission for a later faster burst.</li><li>The result is smoothed output. Larger buffers accommodate larger bursts but can increase waiting delay.</li></ol><table><thead><tr><th scope=\"col\">Advantage</th><th scope=\"col\">Limitation</th></tr></thead><tbody><tr><td>Simple bound on output rate</td><td>Bursts may overflow or suffer delay</td></tr><tr><td>Reduces short-term output variation</td><td>Unused idle service cannot be saved</td></tr><tr><td>Useful for predictable traffic shaping</td><td>No end-to-end delay/loss guarantee by itself</td></tr></tbody></table><p>The term “leaky bucket” can also describe a conformance meter in standards. This course’s diagrams and numerical questions explicitly use the finite data-queue model, so its state is queued data rather than tokens.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A queue of 20 packets drained at 5 packets/s needs 4 seconds to empty without new arrivals. If it is already full, an instantaneous extra burst cannot all be stored.</p></aside><p>No algorithm is universally better. The leaky data-queue model is useful for a smooth output profile; token bucket is preferable when controlled bursts should be allowed. State the application’s delay, burst and rate needs before recommending one.</p></div></section>"}]},{"id":"tee-mock-c","title":"TEE mock C · full paper","scope":"TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023","sections":[{"id":"q1a","title":"Q1A · Networks and design","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q1A. A university plans a campus network. Explain how wired and wireless communication can be used with respect to speed, reliability and security. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Criterion</th><th scope=\"col\">Wired campus links</th><th scope=\"col\">Wireless campus access</th></tr></thead><tbody><tr><td>Speed/capacity</td><td>Dedicated switch ports and fiber backbones can provide high, predictable capacity</td><td>Capacity shared over radio; performance depends on contention, coverage and interference</td></tr><tr><td>Reliability</td><td>Stable when cables/ports and redundant uplinks are healthy</td><td>Mobility and flexible access; radio interference and coverage holes can cause variability</td></tr><tr><td>Security</td><td>Physical access control helps, but ports still need authentication/segmentation</td><td>Use authenticated encryption and managed access; radio extends beyond rooms</td></tr><tr><td>Deployment</td><td>Cabling cost and fixed access points</td><td>Supports mobile users and faster coverage changes</td></tr><tr><td>Recommended role</td><td>Servers, laboratories, inter-building backbone</td><td>Students’ phones/laptops, roaming and guest access</td></tr></tbody></table><p>Choose a hybrid: wired core/backbone and critical endpoints, with managed access points providing wireless mobility. Separate guest traffic, authenticate users and plan redundant infrastructure. Neither medium alone guarantees security or availability.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A lecture hall uses Wi-Fi for students, while each access point connects by cable to a switch and fiber links the building to campus servers.</p></aside></div></section>"},{"id":"q1b","title":"Q1B · Reference models","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q1B. Draw the OSI reference model and explain the function of each layer. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>The <strong>Open Systems Interconnection (OSI)</strong> model separates network functions into seven layers. A layer offers services upward and uses services below. Peer layers communicate logically through protocol rules; actual data moves down the sender’s stack, across links and up the receiver’s stack.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-models.5bff0518c8.svg\" width=\"820\" height=\"670\" alt=\"OSI layers mapped to the four-layer TCP/IP model\" loading=\"lazy\" decoding=\"async\"></div><figcaption>OSI seven-layer model mapped to the four-layer TCP/IP model.</figcaption></figure><table><thead><tr><th scope=\"col\">Layer</th><th scope=\"col\">Task</th><th scope=\"col\">Example</th></tr></thead><tbody><tr><td>7 Application</td><td>Services used by network applications</td><td>HTTP, DNS, FTP, SMTP</td></tr><tr><td>6 Presentation</td><td>Representation, encoding and application data transformations</td><td>Character encoding, serialization; encryption as a conceptual function</td></tr><tr><td>5 Session</td><td>Manage dialogue and synchronization/checkpoints</td><td>Session establishment and resumption concepts</td></tr><tr><td>4 Transport</td><td>Process delivery; reliability/flow control where supplied</td><td>TCP, UDP, SCTP; ports</td></tr><tr><td>3 Network</td><td>Logical addressing and routing across networks</td><td>IP; routers</td></tr><tr><td>2 Data link</td><td>Framing, local link addressing, medium access and error detection</td><td>Ethernet/Wi-Fi; MAC addresses</td></tr><tr><td>1 Physical</td><td>Transmit signal symbols/bits through a medium</td><td>Electrical, optical or radio signals</td></tr></tbody></table><h2>Encapsulation and delivery</h2><ol><li>Application creates data. Transport adds a transport header: TCP segment or UDP datagram.</li><li>IP adds its header to form a packet. The link adds a header and usually a trailer to form a frame.</li><li>The physical layer carries signals. The destination reverses the process and sends the data to the receiving process.</li><li>At a router, local framing changes for the next link. A transit router primarily forwards at Layer 3; it need not run the end application.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A browser request becomes TCP data, an IP packet and then an Ethernet frame. An IP address selects the host/interface, while a TCP port selects the service.</p></aside></div></section>"},{"id":"q1c","title":"Q1C · ALOHA throughput","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q1C. In a Pure ALOHA system, the offered load is G=0.8. Find normalized throughput, percentage throughput, and the theoretical maximum. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Protocol = Pure ALOHA; G = 0.8 attempts/frame time.</p><h2>To find</h2><p>S, 100S and the maximum possible S.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/66b7a6b6082e223e.svg\" alt=\"S=G e^{-2G}\" style=\"width:10.799ex;height:2.248ex\" loading=\"lazy\" decoding=\"async\"></div><p>Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate the exponent</h4><p>−2 × 0.8 = -1.6.</p></div><div class=\"step\"><h4>Step 2. Evaluate the exponential</h4><div class=\"math-display\"><img src=\"math/e7173ebbd6128f2f.svg\" alt=\"e^{-1.6} \\approx 0.201896518\" style=\"width:19.49ex;height:2.05ex\" loading=\"lazy\" decoding=\"async\"></div></div><div class=\"step\"><h4>Step 3. Multiply by G</h4><p>S = 0.8 × 0.201896518 ≈ 0.161517214 successful frames/frame time.</p></div><div class=\"step\"><h4>Step 4. Convert to percentage</h4><p>0.161517214 × 100 ≈ 16.1517%.</p></div><div class=\"step\"><h4>Step 5. State the maximum separately</h4><p>The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> S ≈ 0.161517; percentage ≈ 16.1517%; Smax ≈ 0.183940 at G=0.5.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.</p></aside></div></section>"},{"id":"q1d","title":"Q1D · IPv4 address block","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q1D. One address in a block is 172.18.7.33/23. Find its subnet mask, first/last address, total address count and ordinary usable-host range. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IP/prefix = <code>172.18.7.33/23</code>.</p><h2>To find</h2><p>The complete containing address block and its usable host range.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ab3d8502169db5ce.svg\" alt=\"h=32-p,\\qquad N=2^h\" style=\"width:23.284ex;height:2.484ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/cb1467f42fc2ae0f.svg\" alt=\"\\text{step}=256-\\text{changing mask octet}\" style=\"width:33.145ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count host bits and addresses</h4><p>h=32−23=9; N=2<sup>9</sup>=512.</p></div><div class=\"step\"><h4>Step 2. Construct the mask</h4><p>Mask=<code>255.255.254.0</code>; binary=<code>11111111.11111111.11111110.00000000</code>.</p></div><div class=\"step\"><h4>Step 3. Find the changing-octet interval</h4><p>The changing octet is number 3. Its mask value is 254, so step=256−254=2. The IP value 7 lies in 6…7.</p></div><div class=\"step\"><h4>Step 4. Form the first/network address</h4><p>Keep earlier octets; place 6 in octet 3; set any later octets to zero. Network=<strong>172.18.6.0</strong>.</p></div><div class=\"step\"><h4>Step 5. Show the AND operation</h4><table><thead><tr><th scope=\"col\">Octet</th><th scope=\"col\">IP bits</th><th scope=\"col\">Mask bits</th><th scope=\"col\">AND result</th><th scope=\"col\">Decimal</th></tr></thead><tbody><tr><td>1</td><td>10101100</td><td>11111111</td><td>10101100</td><td>172</td></tr><tr><td>2</td><td>00010010</td><td>11111111</td><td>00010010</td><td>18</td></tr><tr><td>3</td><td>00000111</td><td>11111110</td><td>00000110</td><td>6</td></tr><tr><td>4</td><td>00100001</td><td>00000000</td><td>00000000</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Form the last/broadcast address</h4><p>Use 7 in the changing octet and 255 in any later octets. Broadcast=<strong>172.18.7.255</strong>.</p></div><div class=\"step\"><h4>Step 7. State usable hosts</h4><p>First usable=172.18.6.1; last usable=172.18.7.254; count=512−2=510.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Network 172.18.6.0; broadcast 172.18.7.255; 512 total, 510 ordinary usable; range 172.18.6.1–172.18.7.254.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The first address in a block means its network address. It is different from the first usable host address.</p></aside></div></section>"},{"id":"q2a","title":"Q2A · Error detection and correction","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q2A. Explain block coding and redundancy. For the binary codewords C1=0000000, C2=1110000, C3=0011100, find every pairwise Hamming distance, the minimum distance, and the guaranteed error detection/correction limits. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Block coding maps each k-bit dataword to an n-bit codeword, adding n−k redundant bits. Only selected codewords are valid; their separation determines error-detection/correction capability.</p><h2>Given</h2><table><thead><tr><th scope=\"col\">Codeword</th><th scope=\"col\">Bits</th></tr></thead><tbody><tr><td>C1</td><td>0000000</td></tr><tr><td>C2</td><td>1110000</td></tr><tr><td>C3</td><td>0011100</td></tr></tbody></table><h2>To find</h2><p>All pair distances, dmin and the maximum guaranteed numbers of errors.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/08c67b82aac87a74.svg\" alt=\"d(a,b)=\\mathrm{weight}(a\\oplus b)\" style=\"width:22.357ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/b0c374242e18e388.svg\" alt=\"s=d_{\\min}-1,\\quad t=\\lfloor(d_{\\min}-1)/2\\rfloor\" style=\"width:33.068ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>XOR exposes differing positions. Use the closest codeword pair, because it is the weakest separation in the code.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. XOR every distinct pair</h4><table><thead><tr><th scope=\"col\">Pair</th><th scope=\"col\">First</th><th scope=\"col\">Second</th><th scope=\"col\">XOR</th><th scope=\"col\">Distance</th></tr></thead><tbody><tr><td>C1 vs C2</td><td>0000000</td><td>1110000</td><td>1110000</td><td>3</td></tr><tr><td>C1 vs C3</td><td>0000000</td><td>0011100</td><td>0011100</td><td>3</td></tr><tr><td>C2 vs C3</td><td>1110000</td><td>0011100</td><td>1101100</td><td>4</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Take the minimum</h4><p>dmin = min(3, 3, 4) = 3.</p></div><div class=\"step\"><h4>Step 3. Calculate the guarantees</h4><p>Detect = 3−1 = 2; correct = floor((3−1)/2) = 1.</p></div><div class=\"step\"><h4>Step 4. Justify geometrically</h4><p>3 bit changes can reach another valid codeword, so only 2 are guaranteed detectable. Correction regions require 2t &lt; 3.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> dmin=3; detect up to 2 errors; correct up to 1 errors.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A distance of one particular pair does not set the whole-code capability unless it is the minimum.</p></aside></div></section>"},{"id":"q2b","title":"Q2B · Switching or subnet design","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q2B. A company wants to set up a network for smooth data transfer between its offices. Based on your understanding, which switching technique—circuit, packet, or message—would you recommend? Explain how each works and compare their pros, cons, and best use cases to support your choice. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/switching.2b51f856d9.svg\" width=\"820\" height=\"425\" alt=\"Three switching techniques: what is forwarded?\" loading=\"lazy\" decoding=\"async\"></div><figcaption>The three forwarding units and resource choices.</figcaption></figure><h2>Circuit switching</h2><p>A setup phase reserves a circuit through intermediate switches. Data then streams through the established path until release. It offers predictable reserved service and low per-unit forwarding overhead, but setup takes time and idle periods waste reserved capacity. A traditional dedicated voice circuit is an appropriate illustration.</p><h2>Message switching</h2><p>Each intermediate node receives and stores the entire message before forwarding it. Links can be shared and no end-to-end circuit is required, but large messages need buffers and cause substantial store-and-forward delay. It illustrates delay-tolerant whole-message delivery, rather than an efficient choice for interactive office traffic.</p><h2>Packet switching</h2><p>A message is segmented into packets, allowing shared links and pipelined forwarding. This suits bursty data and supports flexible routing. Costs include packet headers, variable queueing delay, potential packet loss and possible reordering in datagram networks.</p><table><thead><tr><th scope=\"col\">Aspect</th><th scope=\"col\">Circuit switching</th><th scope=\"col\">Message switching</th><th scope=\"col\">Packet switching</th></tr></thead><tbody><tr><td>Unit handled</td><td>Continuous stream on established circuit</td><td>Whole message</td><td>Small packets</td></tr><tr><td>Resource use</td><td>Capacity reserved along a circuit</td><td>Shared; message stored at each intermediate node</td><td>Shared; each packet stored/forwarded in this model</td></tr><tr><td>Setup</td><td>Required before data transfer</td><td>No circuit setup required</td><td>Datagram: no connection setup; virtual circuit: setup</td></tr><tr><td>Delay</td><td>Setup delay, then relatively predictable service</td><td>Large store-and-forward delay for long messages</td><td>Variable delay; packet pipeline can reduce completion time</td></tr><tr><td>Main limitation</td><td>Reserved capacity can be idle</td><td>Large buffers; unsuitable for tight delay needs</td><td>Headers, possible queueing/loss; datagrams may reorder</td></tr></tbody></table><h2>Recommendation</h2><p>For ordinary office file, web and collaboration traffic, choose packet switching, with adequate capacity and traffic management. Its statistical sharing serves bursty sources efficiently. If strict deterministic service is required, state that requirement and discuss additional service engineering rather than promising that every packet network guarantees timing.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>One office can upload a file while another sends short web requests. Their packets share available link capacity; a permanently reserved circuit would remain idle between bursts.</p></aside></div></section>"},{"id":"q3a","title":"Q3A · Network classifications and topologies","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q3A. Define a computer network. Explain LAN, MAN, PAN, WAN and ARPANET with examples. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A <strong>computer network</strong> is a set of interconnected devices that exchange data and share resources using communication protocols. A link carries signals; a protocol defines message format, meaning and timing. Hosts run applications, switches forward local frames and routers connect IP networks.</p><table><thead><tr><th scope=\"col\">Type</th><th scope=\"col\">Meaning and scope</th><th scope=\"col\">Example</th></tr></thead><tbody><tr><td>PAN</td><td>Personal Area Network: a person’s nearby devices</td><td>Phone linked to earbuds</td></tr><tr><td>LAN</td><td>Local Area Network: a building or local campus network under local administration</td><td>Laboratory Ethernet/Wi-Fi</td></tr><tr><td>MAN</td><td>Metropolitan Area Network: interconnects sites across a town/city</td><td>City-wide institutional network</td></tr><tr><td>WAN</td><td>Wide Area Network: connects geographically separated networks over regional/global links</td><td>Branches in different cities</td></tr><tr><td>ARPANET</td><td>Historical packet-switched research network; a major predecessor of the Internet</td><td>Early interconnected research institutions; not a modern geographic size category</td></tr></tbody></table><p>Classification by geographical scope is descriptive: a fixed kilometre boundary or a guaranteed speed is not part of every definition. Networks can also be classified by wired/wireless medium or by client-server/peer-to-peer organization.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A student uses a PAN for earbuds, a LAN in the lab and a WAN when accessing a distant university service.</p></aside></div></section>"},{"id":"q3b","title":"Q3B · OSPF","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q3B. Explain the different types of OSPF packets used for communication between routers. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ospf-packets.6093f0d178.svg\" width=\"820\" height=\"655\" alt=\"OSPFv2: five distinct packet types\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Five OSPFv2 packet types.</figcaption></figure><table><thead><tr><th scope=\"col\">Packet type</th><th scope=\"col\">What it does</th><th scope=\"col\">Simple example</th></tr></thead><tbody><tr><td>Hello</td><td>Discover/maintain neighbours and exchange relationship parameters</td><td>Are we still neighbours?</td></tr><tr><td>Database Description (DD/DBD)</td><td>Summarize link-state database contents during synchronization</td><td>Here are the LSA headers I have</td></tr><tr><td>Link State Request (LSR)</td><td>Ask for specific missing/newer link-state information</td><td>Please send this LSA</td></tr><tr><td>Link State Update (LSU)</td><td>Carry one or more LSAs</td><td>Here is the requested or newly flooded link-state information</td></tr><tr><td>Link State Acknowledgment (LSAck)</td><td>Acknowledge receipt of LSAs</td><td>I received these LSAs</td></tr></tbody></table><p>Database Description packets carry summaries; Link State Update packets carry LSAs themselves. Do not confuse an LSA type with an OSPF packet type.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>After seeing a missing LSA in a database summary, a router sends an LSR, receives an LSU containing it and sends an LSAck.</p></aside></div></section>"},{"id":"q3c","title":"Q3C · Application-layer mechanism","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q3C. Explain SMTP and its role in email. Describe communication phases and typical commands with a labelled client-server diagram. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Simple Mail Transfer Protocol (SMTP)</strong> transfers email from a sending client/server to a receiving mail server using a reliable transport, normally TCP. It is a push/store-and-forward transfer protocol. User agents compose/read mail; mail-transfer agents relay it, consulting DNS MX records to find recipient-domain mail servers.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-smtp.c6f99877c4.svg\" width=\"820\" height=\"902\" alt=\"SMTP: envelope, message and completion\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Submission/relay use SMTP; reading an inbox uses a separate access protocol.</figcaption></figure><table><thead><tr><th scope=\"col\">Phase</th><th scope=\"col\">Typical exchange</th><th scope=\"col\">Purpose</th></tr></thead><tbody><tr><td>Connection and greeting</td><td>Server 220; client EHLO (HELO for basic SMTP); server 250 capabilities</td><td>Identify peers and learn supported extensions</td></tr><tr><td>Envelope transfer</td><td>MAIL FROM:&lt;sender&gt;; RCPT TO:&lt;recipient&gt;; 250 replies</td><td>Declare return path and one or more delivery recipients</td></tr><tr><td>Message transfer</td><td>DATA; server 354; headers + blank line + body; single dot line; server 250</td><td>Transmit the message after server permission; completion reply accepts responsibility</td></tr><tr><td>Termination</td><td>QUIT; server 221</td><td>Close the SMTP session cleanly</td></tr></tbody></table><h2>Message flow and important details</h2><ol><li>The sender’s user agent submits mail to its configured submission service. Server-to-server SMTP relay commonly uses TCP port 25; message submission commonly uses 587, often with authentication and TLS policy.</li><li>The sending server resolves the recipient domain’s MX records, connects to an appropriate mail server and carries out the SMTP exchange.</li><li>MAIL FROM and RCPT TO are the <strong>envelope</strong>; visible From/To headers inside DATA are message content and can differ. Multiple RCPT TO commands can name several recipients.</li><li>A line containing only a dot ends DATA. A content line beginning with a dot is dot-stuffed for transparency and unstuffed by the receiver.</li><li>A temporary 4xx failure can lead the sending server to queue and retry; a permanent 5xx failure normally rejects that operation. One successful handoff is not proof that a human read the message.</li><li>The recipient reads stored mail using an access protocol such as IMAP/POP3 or webmail. SMTP is not the mailbox-retrieval protocol.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A message addressed to two recipients can send two RCPT TO commands before one DATA body. The SMTP envelope controls delivery even if the visible header lists a mailing-list name.</p></aside></div></section>"},{"id":"q4a","title":"Q4A · IPv6 and packet headers","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q4A. Summarize the IPv6 address 0:15::1:12:1213 to its full, original form. Write a comparison between IPv4 and IPv6 packet headers. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Given address: <code>0:15::1:12:1213</code>.</p><h2>To find</h2><p>The full 128-bit address in eight-group hexadecimal notation.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/a013f99fcbb0987c.svg\" alt=\"\\text{missing groups}=8-\\text{visible groups}\" style=\"width:34.708ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>A written 0 is a visible group. :: represents only the omitted all-zero groups.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count groups on both sides</h4><p>Left: 0, 15 (2 group(s)). Right: 1, 12, 1213 (3 group(s)).</p></div><div class=\"step\"><h4>Step 2. Calculate omitted groups</h4><p>Visible=2+3=5. Missing=8−5=3.</p></div><div class=\"step\"><h4>Step 3. Insert the groups</h4><p><code>0:15:0:0:0:1:12:1213</code>.</p></div><div class=\"step\"><h4>Step 4. Pad each group on the left</h4><table><thead><tr><th scope=\"col\">Group number</th><th scope=\"col\">Four-digit group</th></tr></thead><tbody><tr><td>1</td><td>0000</td></tr><tr><td>2</td><td>0015</td></tr><tr><td>3</td><td>0000</td></tr><tr><td>4</td><td>0000</td></tr><tr><td>5</td><td>0000</td></tr><tr><td>6</td><td>0001</td></tr><tr><td>7</td><td>0012</td></tr><tr><td>8</td><td>1213</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Write all eight in order</h4><p><code>0000:0015:0000:0000:0000:0001:0012:1213</code>.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> <code>0000:0015:0000:0000:0000:0001:0012:1213</code></p><aside class=\"applied-example\"><h4>What this result means</h4><p>Leading zeros change the spelling, not the address value. The final group count is eight.</p></aside><h2>Header comparison</h2><table><thead><tr><th scope=\"col\">Feature</th><th scope=\"col\">IPv4</th><th scope=\"col\">IPv6</th></tr></thead><tbody><tr><td>Address width</td><td>32 bits</td><td>128 bits</td></tr><tr><td>Base/header size</td><td>20–60 bytes depending on options</td><td>40-byte fixed base header</td></tr><tr><td>Length field</td><td>Total length includes IPv4 header</td><td>Payload Length excludes 40-byte base header</td></tr><tr><td>Lifetime field</td><td>TTL</td><td>Hop Limit</td></tr><tr><td>Following protocol</td><td>Protocol field</td><td>Next Header; may identify an extension</td></tr><tr><td>Header checksum</td><td>Present</td><td>No base-header checksum</td></tr><tr><td>Options</td><td>Inside IPv4 header</td><td>Typically extension headers</td></tr><tr><td>Fragmentation fields</td><td>In IPv4 header; routers may fragment if permitted</td><td>Fragment extension header; fragmentation by source, not routers</td></tr></tbody></table><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/ipv6-header.aef1bfbac7.svg\" width=\"820\" height=\"410\" alt=\"IPv6 base header · each horizontal row is 32 bits wide\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Fixed IPv6 base header.</figcaption></figure><div class=\"note\"><p>The supplied scheme’s sentence says four missing groups, but five groups are already visible, so only three are missing. Its printed eight-group expansion is consistent with three. The count shown above is independently verified.</p></div></div></section>"},{"id":"q4b","title":"Q4B · Transport-layer mechanism","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q4B. Compare UDP, TCP and SCTP on at least eight points. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Point</th><th scope=\"col\">UDP</th><th scope=\"col\">TCP</th><th scope=\"col\">SCTP</th></tr></thead><tbody><tr><td>Service unit</td><td>Datagram; preserves messages</td><td>Byte stream; no message boundaries</td><td>Messages carried in chunks; preserves boundaries</td></tr><tr><td>Connection setup</td><td>No protocol handshake</td><td>Connection; usual three-way SYN exchange</td><td>Association; four-message cookie exchange</td></tr><tr><td>Reliability</td><td>No delivery/order guarantee</td><td>Reliable ordered stream</td><td>Reliable messages; ordered per stream by default, unordered option</td></tr><tr><td>Ordering scope</td><td>None supplied</td><td>One ordered byte stream per direction</td><td>Multiple streams; per-stream order avoids blocking every stream on one stream’s ordering gap</td></tr><tr><td>Flow control</td><td>Not supplied by UDP</td><td>Receiver-advertised window</td><td>Receiver flow control</td></tr><tr><td>Congestion control</td><td>Not supplied by UDP</td><td>Yes</td><td>Yes</td></tr><tr><td>Multihoming</td><td>No built-in association failover</td><td>Classic TCP uses one address pair</td><td>Association can bind multiple addresses; built-in path failover</td></tr><tr><td>Header</td><td>8 bytes</td><td>Minimum 20 bytes</td><td>12-byte common header plus chunks</td></tr><tr><td>Typical use</td><td>DNS, real-time applications with their own controls</td><td>Web over HTTP/1.1 or HTTP/2, reliable byte transfers</td><td>Telecom signalling and multi-stream message applications</td></tr><tr><td>Performance claim</td><td>Low protocol overhead, not automatically fastest overall</td><td>Recovery/ordering have costs and benefits</td><td>Extra capabilities; no universal speed ranking</td></tr></tbody></table><p>The correct protocol depends on application semantics and network conditions. “UDP is always faster” and “SCTP is always slower than TCP” are not defensible general rules. All three normally run above IP; security/encryption is a separate requirement.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A game can prefer fresh updates over retransmitting stale state, while a document download needs every byte. An application with separate message streams can benefit from SCTP’s stream separation.</p></aside></div></section>"},{"id":"q5a","title":"Q5A · Sliding-window ARQ","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q5A. Apply Go-Back-N ARQ for window size 7. Explain normal transmission, a lost data frame and a lost ACK, including window shifting and retransmission. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Go-Back-N (GBN) ARQ</strong> pipelines up to W outstanding frames. For m-bit sequence numbers, textbook GBN uses W ≤ 2<sup>m</sup>−1 and receiver window 1. The receiver accepts only the next in-order frame; out-of-order frames are discarded. ACK k here cumulatively acknowledges all frames before k and means “next expected is k”.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-gbn.5f577a6979.svg\" width=\"820\" height=\"750\" alt=\"GBN W=7: loss and cumulative ACKs\" loading=\"lazy\" decoding=\"async\"></div><figcaption>GBN example: frame 2 lost; frames 3–6 discarded; timeout resends 2–6.</figcaption></figure><ol><li>For W=7 with m=3, the sequence space is 0…7. Initially the sender can transmit 0…6. It stores every unacknowledged frame; a timer tracks the oldest one.</li><li>Normal: after receiving 0 and 1, cumulative ACK 2 advances the sender base to 2. The sender can fill newly opened window slots.</li><li>Lost data: if frame 2 is lost, frames 3…6 arrive out of order and are discarded. Repeated ACK 2 says frame 2 is still expected. On timeout the sender retransmits all outstanding frames starting at 2, here 2…6.</li><li>Lost ACK: if ACK 2 is lost but ACK 3 arrives, the later cumulative ACK confirms frames 0…2 and avoids unnecessary retransmission. If no later useful ACK arrives before timeout, the sender retransmits from its oldest outstanding frame; the receiver rejects duplicates and sends its current ACK.</li><li>After sequence 7, numbers wrap to 0. The bound W ≤ 7 leaves one sequence value outside the sender’s current window, preventing the all-ACKs-lost ambiguity of a full eight-frame window in the textbook model.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>With W=7, loss of frame 2 can waste successful receptions of 3…6. GBN trades simple receiver buffering for extra retransmission after loss.</p></aside><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-gbn-normal.144a24ea80.svg\" width=\"820\" height=\"522\" alt=\"GBN W=7: normal window movement\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Normal transmission: both windows advance as frames are cumulatively acknowledged.</figcaption></figure><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-gbn-ack.713dc9972e.svg\" width=\"820\" height=\"598\" alt=\"GBN: a later cumulative ACK covers a lost ACK\" loading=\"lazy\" decoding=\"async\"></div><figcaption>A later cumulative ACK can cover an earlier lost ACK.</figcaption></figure></div></section>"},{"id":"q5b","title":"Q5B · Application protocol","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q5B. With a neat diagram, explain the hierarchical domain namespace in DNS and how it ensures unique domain names. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>The <strong>Domain Name System (DNS)</strong> is a distributed hierarchical naming system. Its namespace is a tree with the root at the top. A complete name is the ordered path of labels from a node back to the root. An absolute name may be written with a trailing dot, for example www.example.com.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-dns.f5345fe9fb.svg\" width=\"820\" height=\"520\" alt=\"DNS namespace: full label paths are unique\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Root, top-level domains, delegated domain and host labels.</figcaption></figure><table><thead><tr><th scope=\"col\">Level</th><th scope=\"col\">Example</th><th scope=\"col\">Meaning</th></tr></thead><tbody><tr><td>Root</td><td>.</td><td>Top of the namespace</td></tr><tr><td>Top-level domain (TLD)</td><td>com, org, in</td><td>A child zone below the root</td></tr><tr><td>Registered/delegated domain</td><td>example.com</td><td>Name under a parent such as com</td></tr><tr><td>Subdomain/host label</td><td>www.example.com</td><td>A label below example.com; a name may own different record types</td></tr></tbody></table><h2>Why names remain unique</h2><ol><li>A parent manages the labels immediately beneath it and does not assign the same child label to two different nodes in that parent’s namespace.</li><li>The full sequence of labels identifies the node. The local label www can appear below many domains without conflict: www.example.com and www.example.org are different complete names.</li><li>Administration is delegated: the parent publishes information identifying authoritative servers for a child zone. A domain is a namespace subtree; a zone is the portion administered together, excluding subtrees delegated onward.</li><li>Multiple names may resolve to one IP address, and one name can return several addresses. Uniqueness of names does not imply a one-name/one-IP rule.</li></ol><h2>Resolution</h2><ol><li>A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.</li><li>Otherwise the resolver can query a root server, receive a referral to the relevant TLD, then receive a referral to the authoritative server for the domain.</li><li>The authoritative server supplies the requested record or a relevant negative response. The recursive resolver returns the result and may cache it according to TTL.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>The labels “mail” under two organizations do not collide because mail.example.com and mail.example.org have different ancestors. DNS delegation distributes administration while preserving a unique full path.</p></aside></div></section>"},{"id":"q6a","title":"Q6A · Transmission media","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q6A. List different types of unguided transmission media and write any two characteristics of each. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><table><thead><tr><th scope=\"col\">Type</th><th scope=\"col\">Characteristic 1</th><th scope=\"col\">Characteristic 2</th></tr></thead><tbody><tr><td>Radio</td><td>Can provide broad-area/mobility support depending on band</td><td>Shared spectrum/interference and obstacles affect reception</td></tr><tr><td>Terrestrial microwave</td><td>Directional, usually line of sight</td><td>Needs antenna alignment; obstructions/weather can matter</td></tr><tr><td>Satellite microwave</td><td>Relay covers large or remote areas</td><td>Delay/capacity depend strongly on orbit/system</td></tr><tr><td>Infrared</td><td>Short range and generally blocked by opaque walls</td><td>Limited room-scale coverage reduces inter-room interference</td></tr></tbody></table><p>Many classifications group satellite links under microwave rather than making a separate spectral category. State that grouping consistently.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Wi-Fi uses radio; a building-to-building directional backhaul can use terrestrial microwave; an infrared remote cannot normally control a device through a solid wall.</p></aside></div></section>"},{"id":"q6b","title":"Q6B · Random access","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q6B. Compare 1-persistent, non-persistent, and p-persistent CSMA strategies with diagrammatic representations. <span class=\"marks\">[5 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/persistence.528dafcd8a.svg\" width=\"820\" height=\"590\" alt=\"CSMA persistence: what happens after carrier sensing?\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Different decisions after sensing the channel.</figcaption></figure><table><thead><tr><th scope=\"col\">Rule</th><th scope=\"col\">When idle</th><th scope=\"col\">When busy</th><th scope=\"col\">Trade-off</th></tr></thead><tbody><tr><td>1-persistent</td><td>Transmit immediately</td><td>Keep listening; transmit as soon as idle</td><td>Low idle delay, but waiting stations may start together</td></tr><tr><td>Non-persistent</td><td>Transmit</td><td>Wait a random time, then sense again</td><td>Less synchronized contention; may leave avoidable idle time</td></tr><tr><td>p-persistent (slotted)</td><td>Transmit with probability p; defer a slot with probability 1−p</td><td>Wait until available, then resume the probabilistic slot rule</td><td>Controls contention; needs slots and a choice of p</td></tr></tbody></table><p>All three sense the channel; their persistence rules differ. Propagation delay means carrier sensing cannot guarantee the absence of collisions. In p-persistent CSMA, each eligible idle-slot decision uses the specified probability.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>Two stations waiting on a busy channel can start together under 1-persistence. Non-persistence separates repeat sensing through random waits; p-persistence spreads starts using probabilistic decisions.</p></aside></div></section>"},{"id":"q6c","title":"Q6C · Transport and congestion","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q6C. Explain open-loop and closed-loop congestion control. Describe at least two policies from each and distinguish congestion from flow control. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p><strong>Congestion</strong> occurs when offered traffic overloads network resources such as link capacity, router buffers or processing. Queueing delay grows, packets may be dropped, and excessive retransmission can make the overload worse. <strong>Flow control</strong> protects a receiver; congestion control protects the network.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-congestion.c27c2303bb.svg\" width=\"820\" height=\"515\" alt=\"Two congestion-control approaches\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Open-loop prevention and closed-loop feedback.</figcaption></figure><table><thead><tr><th scope=\"col\">Approach</th><th scope=\"col\">Policy / mechanism</th><th scope=\"col\">How it helps</th></tr></thead><tbody><tr><td>Open loop: prevent congestion without runtime congestion feedback</td><td>Retransmission policy</td><td>Carefully chosen timers/selective retransmission avoid needless extra traffic</td></tr><tr><td>Open loop</td><td>Window policy</td><td>Limit outstanding data and avoid excessive retransmission after loss</td></tr><tr><td>Open loop</td><td>Acknowledgement policy</td><td>Avoid unnecessarily frequent ACK traffic while retaining correct recovery</td></tr><tr><td>Open loop</td><td>Admission policy</td><td>Refuse new load when reserved capacity is insufficient</td></tr><tr><td>Closed loop: measure and react to congestion</td><td>Backpressure</td><td>A congested node tells upstream nodes to reduce/stop sending, possibly propagating hop by hop</td></tr><tr><td>Closed loop</td><td>Choke/control signalling</td><td>A congested node sends explicit feedback to the source</td></tr><tr><td>Closed loop</td><td>Implicit signalling</td><td>A sender infers congestion from loss/delay and changes its sending behaviour</td></tr><tr><td>Closed loop</td><td>Explicit marking</td><td>Network marks congestion (for example ECN); endpoints react to returned information</td></tr></tbody></table><p>For an answer asking for two of each: explain retransmission and admission policies under open loop, then backpressure and explicit signalling under closed loop, with the mechanism and its effect. These are general congestion-control classifications used in the course; they are not all mandatory algorithms implemented inside TCP. TCP commonly uses end-to-end feedback such as loss or ECN.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A router’s output link can be overloaded even while the destination application reads quickly. Increasing receiver memory alone will not remove that network bottleneck.</p></aside></div></section>"},{"id":"q7a","title":"Q7A · Shortest paths · full working","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q7A. For directed edges A→B=5, A→C=2, B→D=4, C→B=1, C→D=7, D→E=2, C→E=10, use Dijkstra from A to E. Show initialization, each settled vertex, updated distances and final path, and draw the network. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Cost</th></tr></thead><tbody><tr><td>A→B</td><td>5</td></tr><tr><td>A→C</td><td>2</td></tr><tr><td>B→D</td><td>4</td></tr><tr><td>C→B</td><td>1</td></tr><tr><td>C→D</td><td>7</td></tr><tr><td>D→E</td><td>2</td></tr><tr><td>C→E</td><td>10</td></tr></tbody></table><p>Source=A; target=E. Edges are directed; do not add reverse edges.</p><h2>To find</h2><p>The path A to E, its total cost and intermediate work.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/651d18e4e3d7619d.svg\" alt=\"d[v]\\leftarrow\\min(d[v],d[u]+w(u,v))\" style=\"width:30.392ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-mock-c-route.93b735aa12.svg\" width=\"619.00\" height=\"340.00\" alt=\"Dijkstra · given directed graph\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Read the labels and direction before substituting numbers.</figcaption></figure><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Initialize</h4><p>d[A]=0; every other distance=∞. No predecessors are known.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Tentative</td></tr><tr><td>B</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>C</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 2. Settle A at distance 0</h4><p>Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞, E=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>A→B</td><td>∞</td><td>0+(5)=5</td><td>Improve to 5; predecessor=A</td></tr><tr><td>A→C</td><td>∞</td><td>0+(2)=2</td><td>Improve to 2; predecessor=A</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>5</td><td>A</td><td>Tentative</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Tentative</td></tr><tr><td>D</td><td>∞</td><td>—</td><td>Tentative</td></tr><tr><td>E</td><td>∞</td><td>—</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Settle C at distance 2</h4><p>Unsettled candidates before selection: B=5, C=2, D=∞, E=∞. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>C→B</td><td>5</td><td>2+(1)=3</td><td>Improve to 3; predecessor=C</td></tr><tr><td>C→D</td><td>∞</td><td>2+(7)=9</td><td>Improve to 9; predecessor=C</td></tr><tr><td>C→E</td><td>∞</td><td>2+(10)=12</td><td>Improve to 12; predecessor=C</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>C</td><td>Tentative</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>9</td><td>C</td><td>Tentative</td></tr><tr><td>E</td><td>12</td><td>C</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Settle B at distance 3</h4><p>Unsettled candidates before selection: B=3, D=9, E=12. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>B→D</td><td>9</td><td>3+(4)=7</td><td>Improve to 7; predecessor=B</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>C</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>7</td><td>B</td><td>Tentative</td></tr><tr><td>E</td><td>12</td><td>C</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 5. Settle D at distance 7</h4><p>Unsettled candidates before selection: D=7, E=12. Select the minimum; ties use alphabetical order.</p><table><thead><tr><th scope=\"col\">Edge</th><th scope=\"col\">Old distance</th><th scope=\"col\">Candidate</th><th scope=\"col\">Decision</th></tr></thead><tbody><tr><td>D→E</td><td>12</td><td>7+(2)=9</td><td>Improve to 9; predecessor=D</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>C</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>7</td><td>B</td><td>Settled</td></tr><tr><td>E</td><td>9</td><td>D</td><td>Tentative</td></tr></tbody></table></div><div class=\"step\"><h4>Step 6. Settle E at distance 9</h4><p>Unsettled candidates before selection: E=9. Select the minimum; ties use alphabetical order.</p><p>No outgoing edges to relax.</p><table><thead><tr><th scope=\"col\">Vertex</th><th scope=\"col\">Distance from A</th><th scope=\"col\">Predecessor</th><th scope=\"col\">State</th></tr></thead><tbody><tr><td>A</td><td>0</td><td>—</td><td>Settled</td></tr><tr><td>B</td><td>3</td><td>C</td><td>Settled</td></tr><tr><td>C</td><td>2</td><td>A</td><td>Settled</td></tr><tr><td>D</td><td>7</td><td>B</td><td>Settled</td></tr><tr><td>E</td><td>9</td><td>D</td><td>Settled</td></tr></tbody></table></div><div class=\"step\"><h4>Step 7. Recover the path</h4><p>Trace backwards: E ← D ← B ← C ← A. Reverse it: A → C → B → D → E.</p><p>Edge sum: 2 + 1 + 4 + 2 = 9.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> A → C → B → D → E; cost=9.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.</p></aside><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-mock-c-route-solution.94d22e6eb0.svg\" width=\"781.00\" height=\"389.00\" alt=\"Dijkstra · final route and distances\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Highlighted final shortest path, with source-to-vertex distance labels.</figcaption></figure></div></section>"},{"id":"q7b","title":"Q7B · Traffic-shaping algorithm","html":"<section class=\"example\"><h3 class=\"exam-question\">TEE practice mock · Q7B. Draw and explain the token-bucket algorithm. State at least two limitations. <span class=\"marks\">[10 mock marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A <strong>token bucket</strong> generates tokens at rate r up to capacity B. Sending one unit of data consumes the corresponding tokens. Tokens accumulate during idle periods only until the bucket is full. Data can therefore burst when saved tokens exist, subject to the physical link rate.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-token.c3ff1dbf76.svg\" width=\"820\" height=\"660\" alt=\"Token bucket: permission is separate from data\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Tokens store permission; the separate data queue stores packets.</figcaption></figure><ol><li>Initialize a stated token count, often B for a full bucket. Add rΔt tokens over elapsed time, capped at B.</li><li>A packet of length L needs L byte-tokens (or one packet-token in a fixed-packet model). If enough tokens exist, deduct them and permit transmission.</li><li>If tokens are insufficient, a <strong>shaper</strong> waits/buffers until enough are available. A <strong>policer</strong> marks or drops nonconforming traffic according to policy. Token shortage does not universally mean drop.</li><li>Over interval t, a full token bucket bounds admitted data by B+rt. Actual output is also limited by link capacity and packet scheduling.</li><li>Unlike the queue-style leaky bucket, token storage allows limited bursts after idle time. It bounds average rate and burst size separately.</li></ol><div class=\"math-display\"><img src=\"math/750b0148fd39654a.svg\" alt=\"\\mathrm{admitted\\ data}(t)\\le B+rt\" style=\"width:25.805ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><table><thead><tr><th scope=\"col\">Limitation</th><th scope=\"col\">Reason</th></tr></thead><tbody><tr><td>Bursts can still congest downstream queues</td><td>Local conformance does not ensure every later link has capacity</td></tr><tr><td>Parameters must match traffic and link requirements</td><td>A small B delays/drops legitimate packets; a large B permits disruptive bursts</td></tr><tr><td>No complete QoS guarantee alone</td><td>Admission, scheduling and end-to-end capacity may still be needed</td></tr></tbody></table><aside class=\"applied-example\"><h4>Practical example</h4><p>With B=10 KB and r=2 KB/s, an idle sender can immediately use up to 10 KB of saved tokens; additional sustained traffic must respect the refill rate, and physical serialization still takes time.</p></aside></div></section>"}]}],"revision":[{"id":"tee-revision","title":"TEE last-day revision","scope":"TEE · Use after the full lessons and solved papers · current syllabus 702AI0C023","sections":[{"id":"order","title":"One final pass through all six units","html":"<ol><li><strong>Units 1–2:</strong> draw star/bus/ring/mesh and both layered models. Explain wired/wireless tradeoffs and fiber strengths/limits in complete sentences.</li><li><strong>Unit 3:</strong> XOR a codeword pair; determine minimum distance; do one CRC division with receiver check. Trace lost data and lost ACK under all three ARQ protocols. Then revise ALOHA, CSMA/CD and CSMA/CA.</li><li><strong>Unit 4:</strong> solve a subnet across an octet boundary, one VLSM allocation, an IPv6 expansion and one graph with every intermediate step. Explain ARP next hop, DORA, RIP and the five OSPF packet types.</li><li><strong>Unit 5:</strong> draw UDP/TCP headers and TCP handshake/FIN flow. Compare UDP/TCP/SCTP. Explain congestion feedback and solve one leaky timeline and one token burst.</li><li><strong>Unit 6:</strong> narrate URL→DNS→connection→HTTP; draw the DNS hierarchy; separate FTP channels; write SMTP phases and commands.</li><li><strong>Paper:</strong> practise Q1 plus four complete 20-mark questions. Recheck instructions on the actual day.</li></ol><p>If time is short, use the source coverage map to find weak topics. Syllabus hours and repeated questions indicate emphasis, but they do not justify skipping a unit or promising a future question.</p><p class=\"memory\"><strong>Yaad rakho:</strong> Layer ka role samjho; numerical mein units aur assumptions pehle.</p>"},{"id":"u12","title":"Units 1–2: five-mark answer frames","html":"<table><thead><tr><th scope=\"col\">Prompt</th><th scope=\"col\">Write this structure</th></tr></thead><tbody><tr><td>Compare models</td><td>Define each → matched rows for performance/scaling/reliability → one scenario recommendation</td></tr><tr><td>Explain topology</td><td>Definition → labelled diagram → operation → advantage → failure/limitation</td></tr><tr><td>OSI / TCP-IP</td><td>Layer order → one distinct task each → protocol examples → encapsulation</td></tr><tr><td>Transmission media</td><td>Guided versus unguided → named types → two characteristics each → suitable application</td></tr><tr><td>Campus design</td><td>Wired backbone and endpoints + wireless mobility → capacity/reliability/security tradeoffs</td></tr></tbody></table><p>Avoid absolute statements such as “wireless is always slow”, “fiber cannot be tapped”, “P2P has no failures” or “a server always fails the entire system”. Explain the conditions and redundancy.</p>"},{"id":"u3","title":"Unit 3: error and access traps","html":"<table><thead><tr><th scope=\"col\">Trap</th><th scope=\"col\">Correction</th></tr></thead><tbody><tr><td>Hamming distance calculated by decimal subtraction</td><td>XOR equal-length strings and count 1s</td></tr><tr><td>Pick largest pairwise distance</td><td>Find the minimum of every distinct pair</td></tr><tr><td>Detect and correct counts assumed identical</td><td>Detect dmin−1; correct floor((dmin−1)/2)</td></tr><tr><td>CRC generator has four bits, so append four zeros</td><td>Append degree r, one fewer than generator bit count</td></tr><tr><td>CRC receiver appends more zeros</td><td>Divide the received complete frame directly</td></tr><tr><td>Every lost ACK forces immediate retransmission</td><td>A later cumulative ACK may acknowledge the missing earlier ACK in GBN</td></tr><tr><td>SR sender skips a missing base after a later ACK</td><td>Window base cannot pass its earliest unacknowledged frame</td></tr><tr><td>GBN and SR ACK labels interpreted identically</td><td>State cumulative next-expected versus individual-frame convention</td></tr><tr><td>Use S as probability per attempted frame</td><td>S is successful frames per frame time; success probability is S/G</td></tr><tr><td>Carrier sense guarantees no collisions</td><td>Propagation delay creates an uncertainty interval</td></tr><tr><td>CSMA/CA called collision-free</td><td>Avoidance reduces risk; collisions remain possible</td></tr></tbody></table>"},{"id":"u4","title":"Unit 4: numerical method checklist","html":"<ol><li><strong>IPv4 block:</strong> p → 32−p → total size → mask → aligned network/broadcast → distinguish total from ordinary usable hosts.</li><li><strong>VLSM:</strong> translate host requirements to total size; largest first; align every network; check no overlap and containment in parent.</li><li><strong>IPv6:</strong> count visible groups; :: occurs at most once; restore exactly eight groups; pad each to four hex digits.</li><li><strong>Dijkstra:</strong> use nonnegative edges; set source zero and others infinity; select smallest unsettled; update outgoing edges; reconstruct predecessors.</li><li><strong>Bellman–Ford:</strong> state directed edge order; relax all edges for up to V−1 passes; preserve your update convention; one extra improving pass signals a reachable negative cycle.</li><li><strong>Forwarding/mapping:</strong> longest matching prefix selects next hop; ARP resolves that local next hop, not a remote server’s Ethernet address.</li></ol><p>For the actual final graph the path is A→C→D→F→G, cost 12. For the actual re-exam graph it is A→D→C→B→E→G, cost 4. Memorizing those numbers is not enough for a changed graph: show the table.</p>"},{"id":"u5","title":"Unit 5: distinguish the quantities","html":"<table><thead><tr><th scope=\"col\">Pair</th><th scope=\"col\">Difference</th></tr></thead><tbody><tr><td>IP address vs port</td><td>Interface/network delivery vs process endpoint</td></tr><tr><td>TCP vs UDP</td><td>Ordered byte stream with recovery vs datagrams without built-in delivery recovery</td></tr><tr><td>rwnd vs cwnd</td><td>Receiver capacity vs network congestion allowance</td></tr><tr><td>Flow control vs congestion control</td><td>Receiver protection vs shared network protection</td></tr><tr><td>Open loop vs closed loop</td><td>Prevention without runtime congestion feedback vs measurement/feedback/reaction</td></tr><tr><td>Delay vs jitter</td><td>Time taken vs variation in time taken</td></tr><tr><td>Leaky queue vs token bucket</td><td>Stores data to smooth output vs stores permission to allow bounded bursts</td></tr><tr><td>Shaper vs policer</td><td>Delays nonconforming traffic vs measures and applies mark/drop policy</td></tr><tr><td>SCTP streams vs multihoming</td><td>Separate message-ordering streams vs alternate endpoint addresses/paths</td></tr></tbody></table><p>For the observed TCP question, draw establishment, data transfer and termination, and explain the arrows. Separate sequence-number calculation drills are optional; they were not asked in the supplied papers.</p>"},{"id":"u6","title":"Unit 6: redraw four message flows","html":"<table><thead><tr><th scope=\"col\">Protocol</th><th scope=\"col\">Draw and explain</th></tr></thead><tbody><tr><td>HTTP</td><td>Browser → DNS → server connection → request(method,target,headers) → response(status,headers,body) → render/extra objects</td></tr><tr><td>DNS</td><td>Root → TLD → domain/subdomain; stub → recursive resolver → referrals → authoritative record; explain full-name uniqueness</td></tr><tr><td>FTP</td><td>Control TCP21 persists; separate data connection; active server initiation versus passive client initiation</td></tr><tr><td>SMTP</td><td>220/EHLO → MAIL FROM → RCPT TO → DATA/354 → message/dot/250 → QUIT/221; recipient later retrieves via another protocol</td></tr></tbody></table><p>A good 10-mark answer has labelled actors and arrow directions, the ordered mechanism, important fields/commands and one practical example. Keep security and version qualifications precise without replacing the main mechanism.</p>"}]}],"about":[{"id":"tee-about","title":"TEE coverage and source notes","scope":"TEE · Evidence and scope limits · current syllabus 702AI0C023","sections":[{"id":"coverage","title":"Every named syllabus topic has a teaching location","html":"<table><thead><tr><th scope=\"col\">Unit</th><th scope=\"col\">Current syllabus topic</th><th scope=\"col\">Read</th></tr></thead><tbody><tr><td>1</td><td>Computer network</td><td><a href=\"#tee/read/introduction/network-types\">Open lesson</a></td></tr><tr><td>1</td><td>Peer-to-peer and client-server communication</td><td><a href=\"#tee/read/introduction/models\">Open lesson</a></td></tr><tr><td>1</td><td>Classifications of computer networks</td><td><a href=\"#tee/read/introduction/network-types\">Open lesson</a></td></tr><tr><td>1</td><td>Network topologies</td><td><a href=\"#tee/read/introduction/topologies\">Open lesson</a></td></tr><tr><td>2</td><td>OSI model</td><td><a href=\"#tee/read/physical/osi\">Open lesson</a></td></tr><tr><td>2</td><td>TCP/IP model</td><td><a href=\"#tee/read/physical/tcpip\">Open lesson</a></td></tr><tr><td>2</td><td>Transmission media</td><td><a href=\"#tee/read/physical/media\">Open lesson</a></td></tr><tr><td>3</td><td>Fundamentals of error detection and correction</td><td><a href=\"#tee/read/error-control/principles\">Open lesson</a></td></tr><tr><td>3</td><td>Block coding</td><td><a href=\"#tee/read/error-control/principles\">Open lesson</a></td></tr><tr><td>3</td><td>Hamming distance</td><td><a href=\"#tee/read/error-control/hamming-distance\">Open lesson</a></td></tr><tr><td>3</td><td>Flow control and error control</td><td><a href=\"#tee/read/arq/flow-error\">Open lesson</a></td></tr><tr><td>3</td><td>CRC</td><td><a href=\"#tee/read/error-control/crc\">Open lesson</a></td></tr><tr><td>3</td><td>Stop and Wait ARQ</td><td><a href=\"#tee/read/arq/stopwait\">Open lesson</a></td></tr><tr><td>3</td><td>Go-Back-N ARQ</td><td><a href=\"#tee/read/arq/gbn\">Open lesson</a></td></tr><tr><td>3</td><td>Selective Repeat ARQ</td><td><a href=\"#tee/read/arq/sr\">Open lesson</a></td></tr><tr><td>3</td><td>Pure ALOHA</td><td><a href=\"#tee/read/aloha/pure\">Open lesson</a></td></tr><tr><td>3</td><td>Slotted ALOHA</td><td><a href=\"#tee/read/aloha/slotted\">Open lesson</a></td></tr><tr><td>3</td><td>CSMA/CD</td><td><a href=\"#tee/read/csma/cd\">Open lesson</a></td></tr><tr><td>3</td><td>Printed CDMA/CA, interpreted CSMA/CA</td><td><a href=\"#tee/read/csma/ca\">Open lesson</a></td></tr><tr><td>4</td><td>Switching techniques</td><td><a href=\"#tee/read/switching/types\">Open lesson</a></td></tr><tr><td>4</td><td>IPv4 addressing</td><td><a href=\"#tee/read/ipv4/structure\">Open lesson</a></td></tr><tr><td>4</td><td>Subnet mask</td><td><a href=\"#tee/read/subnets/method\">Open lesson</a></td></tr><tr><td>4</td><td>CIDR</td><td><a href=\"#tee/read/cidr/meaning\">Open lesson</a></td></tr><tr><td>4</td><td>IPv6</td><td><a href=\"#tee/read/ipv6/structure\">Open lesson</a></td></tr><tr><td>4</td><td>ARP</td><td><a href=\"#tee/read/mapping/arp\">Open lesson</a></td></tr><tr><td>4</td><td>RARP</td><td><a href=\"#tee/read/mapping/rarp\">Open lesson</a></td></tr><tr><td>4</td><td>DHCP</td><td><a href=\"#tee/read/mapping/dhcp\">Open lesson</a></td></tr><tr><td>4</td><td>Shortest-path routing</td><td><a href=\"#tee/read/routing/vocabulary\">Open lesson</a></td></tr><tr><td>4</td><td>RIP</td><td><a href=\"#tee/read/protocols/rip\">Open lesson</a></td></tr><tr><td>4</td><td>Bellman–Ford</td><td><a href=\"#tee/read/routing/bellman\">Open lesson</a></td></tr><tr><td>4</td><td>Link-state routing</td><td><a href=\"#tee/read/protocols/link-state\">Open lesson</a></td></tr><tr><td>4</td><td>Dijkstra</td><td><a href=\"#tee/read/routing/dijkstra\">Open lesson</a></td></tr><tr><td>4</td><td>OSPF</td><td><a href=\"#tee/read/protocols/ospf\">Open lesson</a></td></tr><tr><td>5</td><td>Process-to-process communication</td><td><a href=\"#tee/read/transport/process\">Open lesson</a></td></tr><tr><td>5</td><td>UDP services and operation</td><td><a href=\"#tee/read/transport/udp\">Open lesson</a></td></tr><tr><td>5</td><td>TCP features</td><td><a href=\"#tee/read/transport/tcp\">Open lesson</a></td></tr><tr><td>5</td><td>TCP three-way handshaking</td><td><a href=\"#tee/read/transport/handshake\">Open lesson</a></td></tr><tr><td>5</td><td>UDP/TCP comparison</td><td><a href=\"#tee/read/transport/comparison\">Open lesson</a></td></tr><tr><td>5</td><td>SCTP</td><td><a href=\"#tee/read/transport/sctp\">Open lesson</a></td></tr><tr><td>5</td><td>Open-loop and closed-loop congestion control</td><td><a href=\"#tee/read/congestion/policies\">Open lesson</a></td></tr><tr><td>5</td><td>Quality of Service</td><td><a href=\"#tee/read/congestion/qos\">Open lesson</a></td></tr><tr><td>5</td><td>QoS improving techniques</td><td><a href=\"#tee/read/congestion/qos\">Open lesson</a></td></tr><tr><td>5</td><td>Leaky bucket</td><td><a href=\"#tee/read/congestion/leaky\">Open lesson</a></td></tr><tr><td>5</td><td>Token bucket</td><td><a href=\"#tee/read/congestion/token\">Open lesson</a></td></tr><tr><td>6</td><td>HTTP</td><td><a href=\"#tee/read/applications/http\">Open lesson</a></td></tr><tr><td>6</td><td>DNS</td><td><a href=\"#tee/read/applications/dns\">Open lesson</a></td></tr><tr><td>6</td><td>FTP</td><td><a href=\"#tee/read/applications/ftp\">Open lesson</a></td></tr><tr><td>6</td><td>SMTP</td><td><a href=\"#tee/read/applications/smtp\">Open lesson</a></td></tr></tbody></table><p>This matrix checks explicit named-topic coverage, not guaranteed examination outcomes. Supporting material includes Hamming-code construction, mesh counting, ideal ARQ utilization, TCP sequence arithmetic, bucket calculations, HTTP timing and IPv4 fragmentation. They develop the core concepts and are labelled where assumptions or scope go beyond the named syllabus.</p><p>Each actual paper contains 18 solved parts, all retained here. Each authored TEE mock presents the historical seven-question choice structure: 140 marks of offered questions, of which 100 are attempted by following Q1 plus four choices.</p>"},{"id":"sources","title":"Sources, verification and limitations","html":"<p><strong>Primary scope:</strong> Syllabus_BTech&amp;MBATech AI_SEM V_AY 26-27_AI subjects_9.6.26_NEW CODE.pdf, CN pages 1–2, course 702AI0C023. It lists six units and 100 TEE marks scaled to 50. Unit durations sum to 30 hours.</p><p><strong>Primary questions:</strong> QP_Final-Exam_Computer Networks(702AI0C007)_Semester V_2025-2026.pdf, dated 5 December 2025; QP_Re-Exam_Computer Networks(702AI0C007)_Semester V_2025-2026.pdf, dated 4 February 2026; associated answer schemes from the supplied Computer Networks archives. Question wording is normalized for legible typography, with original data, parts and marks retained.</p><p><strong>Secondary material:</strong> the supplied CN Master/English answer-book is background reference. Its size, predictions and topics outside the syllabus do not establish scope or guarantee marks. The course does not claim that every page of that large secondary collection was independently checked.</p><p><strong>Checks:</strong> each named syllabus item has a route; both actual papers have all 18 parts; each mock has seven 20-mark groups. Arithmetic is checked separately using bit-string/polynomial routines, integer address boundaries, graph oracles and independent queue/token balances. Rendered assets, links and HTML structure are checked. These are academic and technical checks, not instructor approval.</p><h2>Protocol references used for precision</h2><ul><li><a href=\"https://www.rfc-editor.org/rfc/rfc768.html\" target=\"_blank\" rel=\"noopener\">RFC 768 · UDP</a></li><li><a href=\"https://www.rfc-editor.org/rfc/rfc9293.html\" target=\"_blank\" rel=\"noopener\">RFC 9293 · TCP</a></li><li><a href=\"https://www.rfc-editor.org/rfc/rfc9260.html\" target=\"_blank\" rel=\"noopener\">RFC 9260 · SCTP</a></li><li><a href=\"https://www.rfc-editor.org/rfc/rfc9110.html\" target=\"_blank\" rel=\"noopener\">RFC 9110 · HTTP semantics</a></li><li><a href=\"https://www.rfc-editor.org/rfc/rfc1034.html\" target=\"_blank\" rel=\"noopener\">RFC 1034 · DNS concepts</a></li><li><a href=\"https://www.rfc-editor.org/rfc/rfc959.html\" target=\"_blank\" rel=\"noopener\">RFC 959 · FTP</a></li><li><a href=\"https://www.rfc-editor.org/rfc/rfc5321.html\" target=\"_blank\" rel=\"noopener\">RFC 5321 · SMTP</a></li><li><a href=\"https://www.rfc-editor.org/rfc/rfc2475.html\" target=\"_blank\" rel=\"noopener\">RFC 2475 · traffic conditioning and token buckets</a></li></ul><p><a href=\"#tee/papers/tee-pyq-guide/corrections\">Read the explicit answer-key corrections</a></p><div class=\"note\"><p>The historical papers’ course code and dates differ from the current syllabus. The current future-paper time, choices and unit weighting require the current instructor’s instructions; no separate current CN policy was supplied. The standard CSMA/CA interpretation of printed CDMA/CA is disclosed. No claim of guaranteed marks, predicted questions or complete validation of every possible network edge case is made.</p></div>"}]}],"practice":[{"id":"tee-extra-guide","title":"Optional practice · after the papers","scope":"TEE · Additional explanation, not a revision requirement · current syllabus 702AI0C023","sections":[{"id":"purpose","title":"What belongs in extra practice","html":"<p>These exercises explain related mechanisms but their calculation formats do not occur in the two supplied CN papers. They are kept separate from the main TEE reading order and mocks. Use them only after the syllabus explanations and actual papers, or when a specific concept needs another example.</p><p>Hamming <strong>distance</strong>, CRC, ALOHA, address blocks/subnets, IPv6 expansion, SR windows and shortest paths do have numerical support in the papers. Hamming-code <strong>construction</strong>, HTTP timing and TCP sequence arithmetic are different question types; one does not prove the other was asked.</p>"}]},{"id":"introduction","title":"Unit 1 · Networks and topology · optional practice","scope":"Optional extension · no matching calculation in the two supplied papers","sections":[{"id":"mesh-1","title":"Topology counting · example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A full-mesh network contains 4 nodes with one undirected point-to-point link per pair. Find the links and ports needed per node. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>n=4; links are undirected and no self-links exist.</p><h2>To find</h2><p>Number of distinct links and per-node ports.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/5de641c579576dbf.svg\" alt=\"L=\\frac{n(n-1)}{2},\\qquad p=n-1\" style=\"width:28.866ex;height:4.855ex\" loading=\"lazy\" decoding=\"async\"></div><p>Each node connects to n−1 others; counting endpoints counts each link twice.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count each node’s neighbours</h4><p>4−1=3 ports.</p></div><div class=\"step\"><h4>Step 2. Count then remove double-counting</h4><p>4×3÷2=6 links.</p></div><div class=\"step\"><h4>Step 3. Check endpoints</h4><p>6×2=12 link endpoints, equal to 4 nodes × 3 ports.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 6 links; 3 ports per node.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Supporting topology arithmetic: a directed-arc count would be n(n−1), so read the link convention.</p></aside></div></section>"},{"id":"mesh-2","title":"Topology counting · example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A full-mesh network contains 6 nodes with one undirected point-to-point link per pair. Find the links and ports needed per node. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>n=6; links are undirected and no self-links exist.</p><h2>To find</h2><p>Number of distinct links and per-node ports.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/5de641c579576dbf.svg\" alt=\"L=\\frac{n(n-1)}{2},\\qquad p=n-1\" style=\"width:28.866ex;height:4.855ex\" loading=\"lazy\" decoding=\"async\"></div><p>Each node connects to n−1 others; counting endpoints counts each link twice.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count each node’s neighbours</h4><p>6−1=5 ports.</p></div><div class=\"step\"><h4>Step 2. Count then remove double-counting</h4><p>6×5÷2=15 links.</p></div><div class=\"step\"><h4>Step 3. Check endpoints</h4><p>15×2=30 link endpoints, equal to 6 nodes × 5 ports.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 15 links; 5 ports per node.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Supporting topology arithmetic: a directed-arc count would be n(n−1), so read the link convention.</p></aside></div></section>"},{"id":"mesh-3","title":"Topology counting · example 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A full-mesh network contains 8 nodes with one undirected point-to-point link per pair. Find the links and ports needed per node. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>n=8; links are undirected and no self-links exist.</p><h2>To find</h2><p>Number of distinct links and per-node ports.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/5de641c579576dbf.svg\" alt=\"L=\\frac{n(n-1)}{2},\\qquad p=n-1\" style=\"width:28.866ex;height:4.855ex\" loading=\"lazy\" decoding=\"async\"></div><p>Each node connects to n−1 others; counting endpoints counts each link twice.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count each node’s neighbours</h4><p>8−1=7 ports.</p></div><div class=\"step\"><h4>Step 2. Count then remove double-counting</h4><p>8×7÷2=28 links.</p></div><div class=\"step\"><h4>Step 3. Check endpoints</h4><p>28×2=56 link endpoints, equal to 8 nodes × 7 ports.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 28 links; 7 ports per node.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Supporting topology arithmetic: a directed-arc count would be n(n−1), so read the link convention.</p></aside></div></section>"}]},{"id":"error-control","title":"Unit 3 · Errors, block coding and CRC · optional practice","scope":"Optional extension · no matching calculation in the two supplied papers","sections":[{"id":"hamming-code","title":"How a Hamming code locates a single error","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain the construction and single-error correction of a Hamming code. State the redundancy condition. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A basic binary Hamming code uses parity checks whose outcomes identify a single incorrect bit. For m data bits and r check bits, choose the smallest r satisfying 2<sup>r</sup> ≥ m+r+1. The syndrome must represent each of the m+r possible single-error positions and the no-error state.</p><div class=\"math-display\"><img src=\"math/ecdbdeb0433d59c5.svg\" alt=\"2^r\\ge m+r+1\" style=\"width:14.727ex;height:1.954ex\" loading=\"lazy\" decoding=\"async\"></div><ol><li>Number positions starting at 1. Put parity bits at powers of two: 1,2,4,8,…; fill other positions with data in the stated order.</li><li>Parity bit 1 checks positions whose binary index ends in 1; parity bit 2 checks positions with the 2s bit set; parity bit 4 checks positions with the 4s bit set. Use one declared even/odd parity convention throughout.</li><li>For even parity, choose each check bit so its covered positions XOR to zero.</li><li>At reception, repeat each parity check. Read syndrome bits with the largest parity position first; the resulting integer is the error position under the single-error assumption. Flip that bit.</li><li>A basic Hamming code has distance 3. An additional overall parity bit creates the familiar SECDED extension: single-error correction and double-error detection. Do not claim that basic syndrome correction safely corrects two errors.</li></ol><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/tee-hamming.509c933bba.svg\" width=\"820\" height=\"360\" alt=\"Hamming (7,4): even parity, positions left to right\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Positions 1, 2 and 4 hold parity bits in Hamming (7,4).</figcaption></figure><aside class=\"applied-example\"><h4>Practical example</h4><p>With even parity and positions shown left-to-right as 1…7, data 1011 becomes 0110011. If position 5 flips, syndrome (s4s2s1)=101 gives error position 5.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Parity powers of two; syndrome binary tells the position.</p>"},{"id":"hamming-code-1","title":"Single-error correction · example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. Encode data 1011 using even-parity Hamming coding. Number positions left-to-right starting at 1 and insert data in that order. If bit position 5 flips, show how the receiver locates and corrects it. <span class=\"marks\">[7 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Data=1011; even parity; error position=5; only one bit flips.</p><h2>To find</h2><p>Redundant bits, complete codeword and syndrome correction.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ecdbdeb0433d59c5.svg\" alt=\"2^r\\ge m+r+1\" style=\"width:14.727ex;height:1.954ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/a38011b407dfa547.svg\" alt=\"\\mathrm{syndrome}=s_1+2s_2+4s_4+\\cdots\" style=\"width:31.884ex;height:2.032ex\" loading=\"lazy\" decoding=\"async\"></div><p>Parity positions correspond to binary index bits, so a single flipped position changes precisely its index checks.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Choose redundancy</h4><p>m=4; r=3: 2<sup>3</sup>=8 ≥ 4+3+1=8; one fewer parity bit fails.</p></div><div class=\"step\"><h4>Step 2. Place data and compute checks</h4><table><thead><tr><th scope=\"col\">Check</th><th scope=\"col\">Covered positions (including check)</th><th scope=\"col\">Parity bit</th></tr></thead><tbody><tr><td>p1</td><td>1, 3, 5, 7</td><td>0</td></tr><tr><td>p2</td><td>2, 3, 6, 7</td><td>1</td></tr><tr><td>p4</td><td>4, 5, 6, 7</td><td>0</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Position</th><th scope=\"col\">1</th><th scope=\"col\">2</th><th scope=\"col\">3</th><th scope=\"col\">4</th><th scope=\"col\">5</th><th scope=\"col\">6</th><th scope=\"col\">7</th></tr></thead><tbody><tr><td>Encoded bit</td><td>0</td><td>1</td><td>1</td><td>0</td><td>0</td><td>1</td><td>1</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Introduce and check the error</h4><p>Received = 0110111</p><table><thead><tr><th scope=\"col\">Syndrome check</th><th scope=\"col\">Received-bit XOR</th><th scope=\"col\">Result</th></tr></thead><tbody><tr><td>s1</td><td>0 XOR 1 XOR 1 XOR 1</td><td>1</td></tr><tr><td>s2</td><td>1 XOR 1 XOR 1 XOR 1</td><td>0</td></tr><tr><td>s4</td><td>0 XOR 1 XOR 1 XOR 1</td><td>1</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Locate and flip</h4><p>Syndrome integer=5. Flip position 5; recovered codeword=0110011; extracted data=1011.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Codeword 0110011; syndrome 5; corrected data 1011.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The position direction is explicit. A solution using right-to-left numbering can look different while being consistent; never mix conventions.</p></aside></div></section>"},{"id":"hamming-code-2","title":"Single-error correction · example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. Encode data 0110 using even-parity Hamming coding. Number positions left-to-right starting at 1 and insert data in that order. If bit position 3 flips, show how the receiver locates and corrects it. <span class=\"marks\">[7 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Data=0110; even parity; error position=3; only one bit flips.</p><h2>To find</h2><p>Redundant bits, complete codeword and syndrome correction.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ecdbdeb0433d59c5.svg\" alt=\"2^r\\ge m+r+1\" style=\"width:14.727ex;height:1.954ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/a38011b407dfa547.svg\" alt=\"\\mathrm{syndrome}=s_1+2s_2+4s_4+\\cdots\" style=\"width:31.884ex;height:2.032ex\" loading=\"lazy\" decoding=\"async\"></div><p>Parity positions correspond to binary index bits, so a single flipped position changes precisely its index checks.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Choose redundancy</h4><p>m=4; r=3: 2<sup>3</sup>=8 ≥ 4+3+1=8; one fewer parity bit fails.</p></div><div class=\"step\"><h4>Step 2. Place data and compute checks</h4><table><thead><tr><th scope=\"col\">Check</th><th scope=\"col\">Covered positions (including check)</th><th scope=\"col\">Parity bit</th></tr></thead><tbody><tr><td>p1</td><td>1, 3, 5, 7</td><td>1</td></tr><tr><td>p2</td><td>2, 3, 6, 7</td><td>1</td></tr><tr><td>p4</td><td>4, 5, 6, 7</td><td>0</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Position</th><th scope=\"col\">1</th><th scope=\"col\">2</th><th scope=\"col\">3</th><th scope=\"col\">4</th><th scope=\"col\">5</th><th scope=\"col\">6</th><th scope=\"col\">7</th></tr></thead><tbody><tr><td>Encoded bit</td><td>1</td><td>1</td><td>0</td><td>0</td><td>1</td><td>1</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Introduce and check the error</h4><p>Received = 1110110</p><table><thead><tr><th scope=\"col\">Syndrome check</th><th scope=\"col\">Received-bit XOR</th><th scope=\"col\">Result</th></tr></thead><tbody><tr><td>s1</td><td>1 XOR 1 XOR 1 XOR 0</td><td>1</td></tr><tr><td>s2</td><td>1 XOR 1 XOR 1 XOR 0</td><td>1</td></tr><tr><td>s4</td><td>0 XOR 1 XOR 1 XOR 0</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Locate and flip</h4><p>Syndrome integer=3. Flip position 3; recovered codeword=1100110; extracted data=0110.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Codeword 1100110; syndrome 3; corrected data 0110.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The position direction is explicit. A solution using right-to-left numbering can look different while being consistent; never mix conventions.</p></aside></div></section>"},{"id":"hamming-code-3","title":"Single-error correction · example 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. Encode data 1101 using even-parity Hamming coding. Number positions left-to-right starting at 1 and insert data in that order. If bit position 7 flips, show how the receiver locates and corrects it. <span class=\"marks\">[7 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Data=1101; even parity; error position=7; only one bit flips.</p><h2>To find</h2><p>Redundant bits, complete codeword and syndrome correction.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ecdbdeb0433d59c5.svg\" alt=\"2^r\\ge m+r+1\" style=\"width:14.727ex;height:1.954ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/a38011b407dfa547.svg\" alt=\"\\mathrm{syndrome}=s_1+2s_2+4s_4+\\cdots\" style=\"width:31.884ex;height:2.032ex\" loading=\"lazy\" decoding=\"async\"></div><p>Parity positions correspond to binary index bits, so a single flipped position changes precisely its index checks.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Choose redundancy</h4><p>m=4; r=3: 2<sup>3</sup>=8 ≥ 4+3+1=8; one fewer parity bit fails.</p></div><div class=\"step\"><h4>Step 2. Place data and compute checks</h4><table><thead><tr><th scope=\"col\">Check</th><th scope=\"col\">Covered positions (including check)</th><th scope=\"col\">Parity bit</th></tr></thead><tbody><tr><td>p1</td><td>1, 3, 5, 7</td><td>1</td></tr><tr><td>p2</td><td>2, 3, 6, 7</td><td>0</td></tr><tr><td>p4</td><td>4, 5, 6, 7</td><td>0</td></tr></tbody></table><table><thead><tr><th scope=\"col\">Position</th><th scope=\"col\">1</th><th scope=\"col\">2</th><th scope=\"col\">3</th><th scope=\"col\">4</th><th scope=\"col\">5</th><th scope=\"col\">6</th><th scope=\"col\">7</th></tr></thead><tbody><tr><td>Encoded bit</td><td>1</td><td>0</td><td>1</td><td>0</td><td>1</td><td>0</td><td>1</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Introduce and check the error</h4><p>Received = 1010100</p><table><thead><tr><th scope=\"col\">Syndrome check</th><th scope=\"col\">Received-bit XOR</th><th scope=\"col\">Result</th></tr></thead><tbody><tr><td>s1</td><td>1 XOR 1 XOR 1 XOR 0</td><td>1</td></tr><tr><td>s2</td><td>0 XOR 1 XOR 0 XOR 0</td><td>1</td></tr><tr><td>s4</td><td>0 XOR 1 XOR 0 XOR 0</td><td>1</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Locate and flip</h4><p>Syndrome integer=7. Flip position 7; recovered codeword=1010101; extracted data=1101.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Codeword 1010101; syndrome 7; corrected data 1101.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The position direction is explicit. A solution using right-to-left numbering can look different while being consistent; never mix conventions.</p></aside></div></section>"}]},{"id":"arq","title":"Unit 3 · Flow control and ARQ · optional practice","scope":"Optional extension · no matching calculation in the two supplied papers","sections":[{"id":"efficiency","title":"Supporting numerical: stop-and-wait utilization","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. Derive ideal Stop-and-Wait utilization and the window needed to keep a link busy. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Assume an error-free link, constant data-frame transmission time Tt, one-way propagation Tp, ACK transmission Ta, negligible processing and no queueing. One stop-and-wait cycle takes Tt+2Tp+Ta. Useful data occupies the forward link for Tt of that cycle.</p><div class=\"math-display\"><img src=\"math/0ed523dd39640c27.svg\" alt=\"U_{SW}=\\frac{T_t}{T_t+2T_p+T_a}\" style=\"width:21.872ex;height:5.263ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/041cbb2263043e29.svg\" alt=\"U_W\\approx\\min\\left(1,\\frac{WT_t}{T_t+2T_p+T_a}\\right)\" style=\"width:30.457ex;height:5.481ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/c54f515ee0c2f8e8.svg\" alt=\"W_{\\mathrm{required}}=\\left\\lceil\\frac{T_t+2T_p+T_a}{T_t}\\right\\rceil\" style=\"width:28.136ex;height:5.428ex\" loading=\"lazy\" decoding=\"async\"></div><p>These are ideal teaching bounds for equal frames and a sufficiently fast independent ACK path. Loss, ACK scheduling, headers and a limited sequence space reduce actual performance. A calculated window must also satisfy the selected ARQ protocol’s sequence-number bound.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>If sending a frame takes 1 ms but the round trip adds 10 ms, Stop-and-Wait occupies only 1/11 of the forward link. A window of at least 11 can hide that waiting time under the stated ideal model.</p></aside></div></section>"},{"id":"efficiency-1","title":"Window utilization · example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. On an ideal error-free link, Tt=1 ms, one-way Tp=5 ms, ACK transmission Ta=0 ms. Find Stop-and-Wait utilization, utilization with window 4, and the smallest ideal full-utilization window. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Tt=1 ms; Tp=5 ms; Ta=0 ms; W=4; no processing/queueing delay.</p><h2>To find</h2><p>Two utilizations and the required window.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/46d5773e25e12379.svg\" alt=\"C=T_t+2T_p+T_a,\\quad U_1=T_t/C,\\quad U_W=\\min(1,WT_t/C)\" style=\"width:56.583ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>Both propagation directions matter. All durations already share the same unit.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Compute a complete cycle</h4><p>C=1+2×5+0=11 ms.</p></div><div class=\"step\"><h4>Step 2. Stop-and-wait share</h4><p>U=1/11=0.090909=9.09%.</p></div><div class=\"step\"><h4>Step 3. Pipelined share</h4><p>U=min(1,4×1/11)=0.363636=36.36%.</p></div><div class=\"step\"><h4>Step 4. Round the full-utilization bound upward</h4><p>Wrequired=ceil(11/1)=11; check the sequence-space bound separately.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Stop-and-Wait=9.09%; window-4=36.36%; ideal required window=11.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A percentage above 100 is not valid. The min operation caps link occupancy, and protocol numbering may require more sequence bits.</p></aside></div></section>"},{"id":"efficiency-2","title":"Window utilization · example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. On an ideal error-free link, Tt=2 ms, one-way Tp=3 ms, ACK transmission Ta=0 ms. Find Stop-and-Wait utilization, utilization with window 4, and the smallest ideal full-utilization window. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Tt=2 ms; Tp=3 ms; Ta=0 ms; W=4; no processing/queueing delay.</p><h2>To find</h2><p>Two utilizations and the required window.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/46d5773e25e12379.svg\" alt=\"C=T_t+2T_p+T_a,\\quad U_1=T_t/C,\\quad U_W=\\min(1,WT_t/C)\" style=\"width:56.583ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>Both propagation directions matter. All durations already share the same unit.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Compute a complete cycle</h4><p>C=2+2×3+0=8 ms.</p></div><div class=\"step\"><h4>Step 2. Stop-and-wait share</h4><p>U=2/8=0.250000=25.00%.</p></div><div class=\"step\"><h4>Step 3. Pipelined share</h4><p>U=min(1,4×2/8)=1.000000=100.00%.</p></div><div class=\"step\"><h4>Step 4. Round the full-utilization bound upward</h4><p>Wrequired=ceil(8/2)=4; check the sequence-space bound separately.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Stop-and-Wait=25.00%; window-4=100.00%; ideal required window=4.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A percentage above 100 is not valid. The min operation caps link occupancy, and protocol numbering may require more sequence bits.</p></aside></div></section>"},{"id":"efficiency-3","title":"Window utilization · example 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. On an ideal error-free link, Tt=4 ms, one-way Tp=8 ms, ACK transmission Ta=1 ms. Find Stop-and-Wait utilization, utilization with window 6, and the smallest ideal full-utilization window. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Tt=4 ms; Tp=8 ms; Ta=1 ms; W=6; no processing/queueing delay.</p><h2>To find</h2><p>Two utilizations and the required window.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/46d5773e25e12379.svg\" alt=\"C=T_t+2T_p+T_a,\\quad U_1=T_t/C,\\quad U_W=\\min(1,WT_t/C)\" style=\"width:56.583ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>Both propagation directions matter. All durations already share the same unit.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Compute a complete cycle</h4><p>C=4+2×8+1=21 ms.</p></div><div class=\"step\"><h4>Step 2. Stop-and-wait share</h4><p>U=4/21=0.190476=19.05%.</p></div><div class=\"step\"><h4>Step 3. Pipelined share</h4><p>U=min(1,6×4/21)=1.000000=100.00%.</p></div><div class=\"step\"><h4>Step 4. Round the full-utilization bound upward</h4><p>Wrequired=ceil(21/4)=6; check the sequence-space bound separately.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Stop-and-Wait=19.05%; window-6=100.00%; ideal required window=6.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A percentage above 100 is not valid. The min operation caps link occupancy, and protocol numbering may require more sequence bits.</p></aside></div></section>"}]},{"id":"csma","title":"CSMA, collision detection and avoidance · optional practice","scope":"Optional extension · no matching calculation in the two supplied papers","sections":[{"id":"minframe-1","title":"Collision detection · minimum size 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. For an ideal CSMA/CD link, the data rate is 10 Mbps and the maximum one-way propagation delay is 25.6 μs. Find the minimum theoretical frame length in bits and whole bytes. Ignore additional device delays. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>R=10 Mbps; Tp=25.6 μs.</p><h2>To find</h2><p>Lmin in bits and the minimum whole-byte length.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/dc84d9f4c66a26e3.svg\" alt=\"L_{\\min}=\\lceil 2RT_p\\rceil\" style=\"width:14.584ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>The frame must last at least a round trip. Convert Mbps to bits/s and μs to seconds before multiplying.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Convert the quantities</h4><p>R=10,000,000 bits/s; Tp=0.0000256 s.</p></div><div class=\"step\"><h4>Step 2. Find round-trip delay</h4><p>2Tp=2×25.6=51.2 μs.</p></div><div class=\"step\"><h4>Step 3. Multiply rate by duration</h4><p>Lmin=2×10,000,000×0.0000256=512 bits.</p></div><div class=\"step\"><h4>Step 4. Convert bits to whole bytes</h4><p>512/8=64; round upward if needed → 64 bytes.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 512 bits, or at least 64 whole bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>This is the theoretical timing bound for the stated link. If the question specifically asks for a standardized Ethernet minimum, its format constraints also apply; do not replace the standard by a smaller theoretical result.</p></aside></div></section>"},{"id":"minframe-2","title":"Collision detection · minimum size 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. For an ideal CSMA/CD link, the data rate is 100 Mbps and the maximum one-way propagation delay is 2 μs. Find the minimum theoretical frame length in bits and whole bytes. Ignore additional device delays. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>R=100 Mbps; Tp=2 μs.</p><h2>To find</h2><p>Lmin in bits and the minimum whole-byte length.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/dc84d9f4c66a26e3.svg\" alt=\"L_{\\min}=\\lceil 2RT_p\\rceil\" style=\"width:14.584ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>The frame must last at least a round trip. Convert Mbps to bits/s and μs to seconds before multiplying.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Convert the quantities</h4><p>R=100,000,000 bits/s; Tp=0.000002 s.</p></div><div class=\"step\"><h4>Step 2. Find round-trip delay</h4><p>2Tp=2×2=4 μs.</p></div><div class=\"step\"><h4>Step 3. Multiply rate by duration</h4><p>Lmin=2×100,000,000×0.000002=400 bits.</p></div><div class=\"step\"><h4>Step 4. Convert bits to whole bytes</h4><p>400/8=50; round upward if needed → 50 bytes.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 400 bits, or at least 50 whole bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>This is the theoretical timing bound for the stated link. If the question specifically asks for a standardized Ethernet minimum, its format constraints also apply; do not replace the standard by a smaller theoretical result.</p></aside></div></section>"},{"id":"minframe-3","title":"Collision detection · minimum size 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. For an ideal CSMA/CD link, the data rate is 10 Mbps and the maximum one-way propagation delay is 10 μs. Find the minimum theoretical frame length in bits and whole bytes. Ignore additional device delays. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>R=10 Mbps; Tp=10 μs.</p><h2>To find</h2><p>Lmin in bits and the minimum whole-byte length.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/dc84d9f4c66a26e3.svg\" alt=\"L_{\\min}=\\lceil 2RT_p\\rceil\" style=\"width:14.584ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>The frame must last at least a round trip. Convert Mbps to bits/s and μs to seconds before multiplying.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Convert the quantities</h4><p>R=10,000,000 bits/s; Tp=0.00001 s.</p></div><div class=\"step\"><h4>Step 2. Find round-trip delay</h4><p>2Tp=2×10=20 μs.</p></div><div class=\"step\"><h4>Step 3. Multiply rate by duration</h4><p>Lmin=2×10,000,000×0.00001=200 bits.</p></div><div class=\"step\"><h4>Step 4. Convert bits to whole bytes</h4><p>200/8=25; round upward if needed → 25 bytes.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 200 bits, or at least 25 whole bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>This is the theoretical timing bound for the stated link. If the question specifically asks for a standardized Ethernet minimum, its format constraints also apply; do not replace the standard by a smaller theoretical result.</p></aside></div></section>"},{"id":"backoff-1","title":"Backoff · example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A station has experienced 2 collisions for its current frame. It selects K=3; one slot lasts 51.2 μs. Under binary exponential backoff, find the allowed K range and the selected delay. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>n=2; K=3; Tslot=51.2 μs.</p><h2>To find</h2><p>The random range and the delay for the selected K.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/c06068d72176a7c3.svg\" alt=\"k=\\min(n,10),\\quad K_{\\max}=2^k-1\" style=\"width:31.774ex;height:2.61ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/9da1be02953867d3.svg\" alt=\"T=KT_{\\mathrm{slot}}\" style=\"width:10.627ex;height:1.902ex\" loading=\"lazy\" decoding=\"async\"></div><p>Count starts at zero for K. The selected K must fit the allowed range.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Determine exponent</h4><p>k=min(2,10)=2.</p></div><div class=\"step\"><h4>Step 2. Find the range</h4><p>2<sup>2</sup>=4; largest K=4−1=3. Range: 0 to 3.</p></div><div class=\"step\"><h4>Step 3. Validate selected K</h4><p>3 is within 0…3.</p></div><div class=\"step\"><h4>Step 4. Calculate delay</h4><p>3×51.2=153.6 μs.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> K may be 0…3; selected delay=153.6 μs.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The range is not the actual delay. Use the stated selected K to calculate the delay.</p></aside></div></section>"},{"id":"backoff-2","title":"Backoff · example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A station has experienced 3 collisions for its current frame. It selects K=5; one slot lasts 51.2 μs. Under binary exponential backoff, find the allowed K range and the selected delay. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>n=3; K=5; Tslot=51.2 μs.</p><h2>To find</h2><p>The random range and the delay for the selected K.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/c06068d72176a7c3.svg\" alt=\"k=\\min(n,10),\\quad K_{\\max}=2^k-1\" style=\"width:31.774ex;height:2.61ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/9da1be02953867d3.svg\" alt=\"T=KT_{\\mathrm{slot}}\" style=\"width:10.627ex;height:1.902ex\" loading=\"lazy\" decoding=\"async\"></div><p>Count starts at zero for K. The selected K must fit the allowed range.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Determine exponent</h4><p>k=min(3,10)=3.</p></div><div class=\"step\"><h4>Step 2. Find the range</h4><p>2<sup>3</sup>=8; largest K=8−1=7. Range: 0 to 7.</p></div><div class=\"step\"><h4>Step 3. Validate selected K</h4><p>5 is within 0…7.</p></div><div class=\"step\"><h4>Step 4. Calculate delay</h4><p>5×51.2=256 μs.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> K may be 0…7; selected delay=256 μs.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The range is not the actual delay. Use the stated selected K to calculate the delay.</p></aside></div></section>"},{"id":"backoff-3","title":"Backoff · example 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A station has experienced 5 collisions for its current frame. It selects K=17; one slot lasts 5.12 μs. Under binary exponential backoff, find the allowed K range and the selected delay. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>n=5; K=17; Tslot=5.12 μs.</p><h2>To find</h2><p>The random range and the delay for the selected K.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/c06068d72176a7c3.svg\" alt=\"k=\\min(n,10),\\quad K_{\\max}=2^k-1\" style=\"width:31.774ex;height:2.61ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/9da1be02953867d3.svg\" alt=\"T=KT_{\\mathrm{slot}}\" style=\"width:10.627ex;height:1.902ex\" loading=\"lazy\" decoding=\"async\"></div><p>Count starts at zero for K. The selected K must fit the allowed range.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Determine exponent</h4><p>k=min(5,10)=5.</p></div><div class=\"step\"><h4>Step 2. Find the range</h4><p>2<sup>5</sup>=32; largest K=32−1=31. Range: 0 to 31.</p></div><div class=\"step\"><h4>Step 3. Validate selected K</h4><p>17 is within 0…31.</p></div><div class=\"step\"><h4>Step 4. Calculate delay</h4><p>17×5.12=87.04 μs.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> K may be 0…31; selected delay=87.04 μs.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>The range is not the actual delay. Use the stated selected K to calculate the delay.</p></aside></div></section>"}]},{"id":"switching","title":"Switching techniques · optional practice","scope":"Optional extension · no matching calculation in the two supplied papers","sections":[{"id":"pipeline","title":"Store-and-forward and pipelining","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><p><strong>Definition.</strong> Store-and-forward requires a node to receive the complete forwarding unit before sending it onward; pipelining allows successive units to occupy different links simultaneously.</p><p><strong>Simple meaning.</strong> Pehla packet next link pe jaa raha hai, tab doosra packet first link pe aa sakta hai.</p><figure><span class=\"diagram-hint\">Swipe across the diagram to read its labels ↔</span><div class=\"diagram-pan\" tabindex=\"0\" role=\"group\" aria-label=\"Teaching diagram; use left and right arrow keys to scroll\"><img src=\"fig/pipeline.a023f04605.svg\" width=\"820\" height=\"410\" alt=\"Packet pipeline: successive packets use different links\" loading=\"lazy\" decoding=\"async\"></div><figcaption>Store-and-forward and pipelining</figcaption></figure><h2>Understand it step by step</h2><ol><li>With message switching, the whole message is the forwarding unit. On h equal-rate links, a message of M bits needs hM/R seconds of serialization.</li><li>With k equal packets, the first packet needs h packet-transmission times to cross h links. Each later packet then emerges one packet-transmission time later under ideal equal-rate conditions.</li><li>Thus k packets of L bits take (h+k−1)L/R plus all link propagation delays. This assumes no losses, no queueing, negligible processing, equal packet sizes and equal rates.</li><li>Count links, not routers: three intermediate routers between source and destination create four links. Include packet headers in L if the question supplies them.</li></ol><div class=\"math-display\"><img src=\"math/88eb2b8ca0c2e1fd.svg\" alt=\"T_{\\mathrm{message}}=hM/R+h\\tau\" style=\"width:21.908ex;height:2.366ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/209da411e5cae6a2.svg\" alt=\"T_{\\mathrm{packet}}=(h+k-1)L/R+h\\tau\" style=\"width:29.636ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><aside class=\"applied-example\"><h4>Practical example</h4><p>A three-link path can simultaneously carry packet 1 on the third link, packet 2 on the second, and packet 3 on the first. The frames are not all transmitted on one link at the same instant.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. Explain why packet switching can deliver a large message faster than message switching. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Packet switching can pipeline smaller units across successive links. After the first packet is forwarded, the next packet can use an earlier link while the first uses a later link. Whole-message store-and-forward must receive the entire message at each node, preventing that packet-level pipeline.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A three-link path can simultaneously carry packet 1 on the third link, packet 2 on the second, and packet 3 on the first. The frames are not all transmitted on one link at the same instant.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> First packet h times; remaining packets one time each.</p>"},{"id":"delay-1","title":"Compare completion times · example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A 12,000-bit message crosses 3 links, each 1 Mbps with 2 ms propagation delay. Compare whole-message switching, packet switching using 6 equal packets without headers, and a circuit with 10 ms setup. Ignore processing and queueing. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Given</th><th scope=\"col\">Value</th></tr></thead><tbody><tr><td>M</td><td>12000 bits</td></tr><tr><td>h</td><td>3</td></tr><tr><td>k</td><td>6</td></tr><tr><td>R</td><td>1,000,000 bits/s</td></tr><tr><td>τ</td><td>0.002 s/link</td></tr><tr><td>Circuit setup</td><td>0.01 s</td></tr></tbody></table><h2>To find</h2><p>Time until the final data bit reaches the destination in each method.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/9a18147a7dd3f73d.svg\" alt=\"T_m=hM/R+h\\tau\" style=\"width:17.699ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/2fccb0c108e66b5b.svg\" alt=\"T_p=(h+k-1)L/R+h\\tau\" style=\"width:25.863ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/59666d3c7abd8bb9.svg\" alt=\"T_c=T_{\\mathrm{setup}}+M/R+h\\tau\" style=\"width:23.7ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>Message switching repeats whole-message serialization at every hop. Packet switching pipelines equal packets. A circuit streams bits through the established equal-rate path.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Find packet size</h4><p>L=M/k=12000/6=2000 bits.</p></div><div class=\"step\"><h4>Step 2. Whole-message completion</h4><p>3×12000/1,000,000 + 3×0.002 = 0.042000 s = 42 ms.</p></div><div class=\"step\"><h4>Step 3. One packet transmission time</h4><p>L/R=2000/1,000,000=0.002 s.</p></div><div class=\"step\"><h4>Step 4. Pipelined packet completion</h4><p>(3+6−1)×0.002+3×0.002=0.022000 s = 22 ms.</p></div><div class=\"step\"><h4>Step 5. Circuit completion</h4><p>0.01+12000/1,000,000+3×0.002=0.028000 s = 28 ms.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Message=42 ms; packets=22 ms; circuit=28 ms.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>These values depend on the given setup, rates and ideal pipeline. Do not claim that one technique is always faster in every network.</p></aside></div></section>"},{"id":"delay-2","title":"Compare completion times · example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A 8,000-bit message crosses 2 links, each 1 Mbps with 1 ms propagation delay. Compare whole-message switching, packet switching using 4 equal packets without headers, and a circuit with 5 ms setup. Ignore processing and queueing. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Given</th><th scope=\"col\">Value</th></tr></thead><tbody><tr><td>M</td><td>8000 bits</td></tr><tr><td>h</td><td>2</td></tr><tr><td>k</td><td>4</td></tr><tr><td>R</td><td>1,000,000 bits/s</td></tr><tr><td>τ</td><td>0.001 s/link</td></tr><tr><td>Circuit setup</td><td>0.005 s</td></tr></tbody></table><h2>To find</h2><p>Time until the final data bit reaches the destination in each method.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/9a18147a7dd3f73d.svg\" alt=\"T_m=hM/R+h\\tau\" style=\"width:17.699ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/2fccb0c108e66b5b.svg\" alt=\"T_p=(h+k-1)L/R+h\\tau\" style=\"width:25.863ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/59666d3c7abd8bb9.svg\" alt=\"T_c=T_{\\mathrm{setup}}+M/R+h\\tau\" style=\"width:23.7ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>Message switching repeats whole-message serialization at every hop. Packet switching pipelines equal packets. A circuit streams bits through the established equal-rate path.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Find packet size</h4><p>L=M/k=8000/4=2000 bits.</p></div><div class=\"step\"><h4>Step 2. Whole-message completion</h4><p>2×8000/1,000,000 + 2×0.001 = 0.018000 s = 18 ms.</p></div><div class=\"step\"><h4>Step 3. One packet transmission time</h4><p>L/R=2000/1,000,000=0.002 s.</p></div><div class=\"step\"><h4>Step 4. Pipelined packet completion</h4><p>(2+4−1)×0.002+2×0.001=0.012000 s = 12 ms.</p></div><div class=\"step\"><h4>Step 5. Circuit completion</h4><p>0.005+8000/1,000,000+2×0.001=0.015000 s = 15 ms.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Message=18 ms; packets=12 ms; circuit=15 ms.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>These values depend on the given setup, rates and ideal pipeline. Do not claim that one technique is always faster in every network.</p></aside></div></section>"},{"id":"headers","title":"Packet pipeline with header overhead","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A 12,000-bit message is divided into 1,000-bit payloads. Each packet adds a 100-bit header. Packets cross four store-and-forward links of 1 Mbps, with 1 ms propagation per link. Find packet count, transmitted bits per packet, total bits sent on one link and final completion time. Ignore queueing and processing. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>M=12,000 bits; payload=1,000 bits; header=100 bits; h=4; R=1,000,000 bits/s; τ=0.001 s.</p><h2>To find</h2><p>k, L, total serialized bits on one link and completion time.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/cf2d3cfa77719992.svg\" alt=\"k=M/P,\\quad L=P+H\" style=\"width:23.704ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/a1dee7ec7d280062.svg\" alt=\"T=(h+k-1)L/R+h\\tau\" style=\"width:25.142ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>The payload determines packet count; payload plus header determines packet transmission time.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count packets</h4><p>k=12,000/1,000=12.</p></div><div class=\"step\"><h4>Step 2. Add the header to each packet</h4><p>L=1,000+100=1,100 bits.</p></div><div class=\"step\"><h4>Step 3. Count all bits sent on one link</h4><p>12×1,100=13,200 bits, of which 1,200 are headers.</p></div><div class=\"step\"><h4>Step 4. Find one packet time</h4><p>1,100/1,000,000=0.0011 s.</p></div><div class=\"step\"><h4>Step 5. Apply the pipeline</h4><p>(4+12−1)×0.0011+4×0.001=0.0205 s=20.5 ms.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 12 packets; 1,100 bits each; 13,200 bits on one link; completion=20.5 ms.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Packet headers consume link capacity. Ignoring them gives an unrealistically small completion time for this question.</p></aside></div></section>"}]},{"id":"ipv6","title":"IPv6: addresses and packet format · optional practice","scope":"Optional extension · no matching calculation in the two supplied papers","sections":[{"id":"length-1","title":"IPv6 packet length · example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. An IPv6 packet has a 40-byte base header, 0 bytes of extension headers and 1000 bytes of upper-layer content. Find its Payload Length field value and total packet length. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Base=40 bytes; extensions=0 bytes; upper-layer content=1000 bytes. Ordinary non-jumbo packet.</p><h2>To find</h2><p>Payload Length and total bytes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/30fbafad36710670.svg\" alt=\"P=E+D,\\qquad T=40+P\" style=\"width:27.952ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>Payload begins immediately after the IPv6 base header. Extensions are part of that payload.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate payload</h4><p>P=0+1000=1000 bytes.</p></div><div class=\"step\"><h4>Step 2. Add the base header</h4><p>T=40+1000=1040 bytes.</p></div><div class=\"step\"><h4>Step 3. Identify the stored field</h4><p>The Payload Length field stores 1000, not 1040.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Payload Length=1000; total=1040 bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Do not count the base header twice or leave extension-header bytes out of the payload length.</p></aside></div></section>"},{"id":"length-2","title":"IPv6 packet length · example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. An IPv6 packet has a 40-byte base header, 24 bytes of extension headers and 1200 bytes of upper-layer content. Find its Payload Length field value and total packet length. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Base=40 bytes; extensions=24 bytes; upper-layer content=1200 bytes. Ordinary non-jumbo packet.</p><h2>To find</h2><p>Payload Length and total bytes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/30fbafad36710670.svg\" alt=\"P=E+D,\\qquad T=40+P\" style=\"width:27.952ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>Payload begins immediately after the IPv6 base header. Extensions are part of that payload.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate payload</h4><p>P=24+1200=1224 bytes.</p></div><div class=\"step\"><h4>Step 2. Add the base header</h4><p>T=40+1224=1264 bytes.</p></div><div class=\"step\"><h4>Step 3. Identify the stored field</h4><p>The Payload Length field stores 1224, not 1264.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Payload Length=1224; total=1264 bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Do not count the base header twice or leave extension-header bytes out of the payload length.</p></aside></div></section>"},{"id":"length-3","title":"IPv6 packet length · example 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. An IPv6 packet has a 40-byte base header, 40 bytes of extension headers and 500 bytes of upper-layer content. Find its Payload Length field value and total packet length. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Base=40 bytes; extensions=40 bytes; upper-layer content=500 bytes. Ordinary non-jumbo packet.</p><h2>To find</h2><p>Payload Length and total bytes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/30fbafad36710670.svg\" alt=\"P=E+D,\\qquad T=40+P\" style=\"width:27.952ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>Payload begins immediately after the IPv6 base header. Extensions are part of that payload.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Calculate payload</h4><p>P=40+500=540 bytes.</p></div><div class=\"step\"><h4>Step 2. Add the base header</h4><p>T=40+540=580 bytes.</p></div><div class=\"step\"><h4>Step 3. Identify the stored field</h4><p>The Payload Length field stores 540, not 580.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Payload Length=540; total=580 bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Do not count the base header twice or leave extension-header bytes out of the payload length.</p></aside></div></section>"}]},{"id":"mapping","title":"ARP, RARP and DHCP · optional practice","scope":"Optional extension · no matching calculation in the two supplied papers","sections":[{"id":"lease","title":"DHCP leases, renewal and a relay","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><p><strong>Definition.</strong> A DHCP lease grants use of an address for a specified lifetime; renewal extends that permission, while a relay supports communication across subnets.</p><p><strong>Simple meaning.</strong> Address permanent gift nahi: time-limited lease, phir renew.</p><h2>Understand it step by step</h2><ol><li>In ordinary DHCPv4 defaults, renewal begins at T1=50% of the lease and rebinding at T2=87.5%, unless the server supplies different values.</li><li>At T1 a client attempts renewal with its original server. At T2 it can seek renewal from any suitable server.</li><li>If the lease expires without extension, the client must stop using the leased address. Successful renewal restarts the relevant lease timing.</li><li>A relay forwards DHCP messages between subnets. It is not the same as a router forwarding every broadcast indiscriminately.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>For an 8-hour lease with default timers, T1 is 4 hours and T2 is 7 hours after lease acquisition. These defaults must not override explicit timers in the question.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. What is a DHCP lease? Why is a DHCP relay used? <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>A lease permits a client to use its assigned address for a limited period and may be renewed. A relay conveys DHCP messages between a client subnet and a remote DHCP server, allowing centralized configuration without placing a server on every subnet.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>For an 8-hour lease with default timers, T1 is 4 hours and T2 is 7 hours after lease acquisition. These defaults must not override explicit timers in the question.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Lease = limited time; relay = subnet ke paar DHCP support.</p>"},{"id":"lease-1","title":"DHCP timer example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A DHCPv4 lease lasts 8 hours. No different T1 or T2 values are supplied. Find the default renewal and rebinding times after lease acquisition. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Lease duration L=8 h; use default fractional timers.</p><h2>To find</h2><p>T1 and T2 as elapsed times.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ca97cfd9b6235ae7.svg\" alt=\"T_1=0.5L,\\qquad T_2=0.875L\" style=\"width:27.31ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use these defaults only when the server/question has not specified other timer values.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Renewal timer</h4><p>T1=0.5×8=4 h.</p></div><div class=\"step\"><h4>Step 2. Rebinding timer</h4><p>T2=0.875×8=7 h.</p></div><div class=\"step\"><h4>Step 3. Place them before expiry</h4><p>4 h &lt; 7 h &lt; 8 h.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> T1=4 h; T2=7 h.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>These are elapsed times, not wall-clock times. Add them to the stated acquisition time only when a clock time is requested.</p></aside></div></section>"},{"id":"lease-2","title":"DHCP timer example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A DHCPv4 lease lasts 16 hours. No different T1 or T2 values are supplied. Find the default renewal and rebinding times after lease acquisition. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Lease duration L=16 h; use default fractional timers.</p><h2>To find</h2><p>T1 and T2 as elapsed times.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ca97cfd9b6235ae7.svg\" alt=\"T_1=0.5L,\\qquad T_2=0.875L\" style=\"width:27.31ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use these defaults only when the server/question has not specified other timer values.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Renewal timer</h4><p>T1=0.5×16=8 h.</p></div><div class=\"step\"><h4>Step 2. Rebinding timer</h4><p>T2=0.875×16=14 h.</p></div><div class=\"step\"><h4>Step 3. Place them before expiry</h4><p>8 h &lt; 14 h &lt; 16 h.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> T1=8 h; T2=14 h.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>These are elapsed times, not wall-clock times. Add them to the stated acquisition time only when a clock time is requested.</p></aside></div></section>"},{"id":"lease-3","title":"DHCP timer example 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A DHCPv4 lease lasts 24 hours. No different T1 or T2 values are supplied. Find the default renewal and rebinding times after lease acquisition. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Lease duration L=24 h; use default fractional timers.</p><h2>To find</h2><p>T1 and T2 as elapsed times.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/ca97cfd9b6235ae7.svg\" alt=\"T_1=0.5L,\\qquad T_2=0.875L\" style=\"width:27.31ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>Use these defaults only when the server/question has not specified other timer values.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Renewal timer</h4><p>T1=0.5×24=12 h.</p></div><div class=\"step\"><h4>Step 2. Rebinding timer</h4><p>T2=0.875×24=21 h.</p></div><div class=\"step\"><h4>Step 3. Place them before expiry</h4><p>12 h &lt; 21 h &lt; 24 h.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> T1=12 h; T2=21 h.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>These are elapsed times, not wall-clock times. Add them to the stated acquisition time only when a clock time is requested.</p></aside></div></section>"}]},{"id":"packet-support","title":"IP packet details · supporting practice · optional practice","scope":"Optional extension · no matching calculation in the two supplied papers","sections":[{"id":"ihl-1","title":"IPv4 header-length example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. An IPv4 packet has IHL=5 and Total Length=1000 bytes. Find header and payload sizes. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IHL=5; Total Length=1000 bytes.</p><h2>To find</h2><p>Header bytes and payload bytes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/830ed738bb3329f8.svg\" alt=\"H=4\\,\\mathrm{IHL},\\qquad P=T-H\" style=\"width:27.077ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>IHL counts 32-bit words; each word is 4 bytes.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Convert IHL to bytes</h4><p>H=4×5=20 bytes.</p></div><div class=\"step\"><h4>Step 2. Subtract the header</h4><p>P=1000−20=980 bytes.</p></div><div class=\"step\"><h4>Step 3. Add back the parts</h4><p>20+980=1000 bytes.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Header=20 bytes; payload=980 bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>IPv4 Total Length includes its own header. IPv6 Payload Length uses a different convention.</p></aside></div></section>"},{"id":"ihl-2","title":"IPv4 header-length example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. An IPv4 packet has IHL=6 and Total Length=1200 bytes. Find header and payload sizes. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IHL=6; Total Length=1200 bytes.</p><h2>To find</h2><p>Header bytes and payload bytes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/830ed738bb3329f8.svg\" alt=\"H=4\\,\\mathrm{IHL},\\qquad P=T-H\" style=\"width:27.077ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>IHL counts 32-bit words; each word is 4 bytes.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Convert IHL to bytes</h4><p>H=4×6=24 bytes.</p></div><div class=\"step\"><h4>Step 2. Subtract the header</h4><p>P=1200−24=1176 bytes.</p></div><div class=\"step\"><h4>Step 3. Add back the parts</h4><p>24+1176=1200 bytes.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Header=24 bytes; payload=1176 bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>IPv4 Total Length includes its own header. IPv6 Payload Length uses a different convention.</p></aside></div></section>"},{"id":"ihl-3","title":"IPv4 header-length example 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. An IPv4 packet has IHL=8 and Total Length=800 bytes. Find header and payload sizes. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>IHL=8; Total Length=800 bytes.</p><h2>To find</h2><p>Header bytes and payload bytes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/830ed738bb3329f8.svg\" alt=\"H=4\\,\\mathrm{IHL},\\qquad P=T-H\" style=\"width:27.077ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>IHL counts 32-bit words; each word is 4 bytes.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Convert IHL to bytes</h4><p>H=4×8=32 bytes.</p></div><div class=\"step\"><h4>Step 2. Subtract the header</h4><p>P=800−32=768 bytes.</p></div><div class=\"step\"><h4>Step 3. Add back the parts</h4><p>32+768=800 bytes.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Header=32 bytes; payload=768 bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>IPv4 Total Length includes its own header. IPv6 Payload Length uses a different convention.</p></aside></div></section>"},{"id":"fragmentation","title":"IPv4 fragmentation · optional extension","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><p><strong>Definition.</strong> IPv4 fragmentation divides a packet that exceeds an outgoing link’s MTU into smaller fragments, when fragmentation is permitted.</p><p><strong>Simple meaning.</strong> MTU se packet bada hai toh allowed case mein fragments; offset original payload mein position batata hai.</p><h2>Understand it step by step</h2><ol><li>This is supporting practice, not an explicitly listed numerical in the supplied current syllabus or these two papers. Finish the confirmed core first.</li><li>Assume an originally unfragmented packet and a fixed header H repeated per fragment. The link MTU is the largest whole IP packet it can carry.</li><li>Every non-final fragment’s payload must be a multiple of 8 bytes. Its payload capacity is 8×floor((MTU−H)/8).</li><li>Fragment Offset is the number of preceding original payload bytes divided by 8; it is not a byte count directly. MF=1 means more fragments follow, while the final fragment has MF=0.</li><li>If DF is set, a router cannot fragment the IPv4 packet; IPv6 routers do not fragment packets either. Reassembly is at the destination.</li></ol><aside class=\"applied-example\"><h4>Practical example</h4><p>A fragment with offset 185 starts at byte 185×8=1,480 of the original payload, counting from byte zero.</p></aside><section class=\"example\"><h3 class=\"exam-question\">Practice question. What is the unit of IPv4 fragment offset and what does MF indicate? <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><p>Fragment Offset is measured in units of 8 payload bytes. MF=1 says more fragments of the original packet follow; MF=0 marks the last fragment. Each fragment carries its own IP header.</p><aside class=\"applied-example\"><h4>Practical example</h4><p>A fragment with offset 185 starts at byte 185×8=1,480 of the original payload, counting from byte zero.</p></aside></div></section><p class=\"memory\"><strong>Yaad rakho:</strong> Offset ×8 = starting payload byte.</p>"},{"id":"fragment-1","title":"Optional fragmentation · example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. An unfragmented IPv4 packet is 4000 bytes including a 20-byte header. It crosses a link of MTU 1500 bytes. DF=0 and every fragment repeats the same header. Find each fragment’s payload length, total length, offset and MF flag. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Total=4000; H=20; MTU=1500 bytes; DF=0.</p><h2>To find</h2><p>All fragments and their header-related values.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/00cfb5dffef469d2.svg\" alt=\"P=T-H\" style=\"width:11.084ex;height:1.731ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/fd129cf4e0fe3540.svg\" alt=\"P_{\\max}=8\\left\\lfloor\\frac{\\mathrm{MTU}-H}{8}\\right\\rfloor\" style=\"width:22.956ex;height:5.428ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/76b072d173a1b0cc.svg\" alt=\"\\mathrm{offset}=\\mathrm{preceding\\ payload\\ bytes}/8\" style=\"width:34.099ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Subtract the header before splitting the original payload. Round non-final fragment payload capacity down to a multiple of eight.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Original payload</h4><p>4000−20=3980 bytes.</p></div><div class=\"step\"><h4>Step 2. Non-final payload capacity</h4><p>MTU−H=1500−20=1480. Floor((1480)/8)×8=1480 bytes.</p></div><div class=\"step\"><h4>Step 3. Allocate each fragment</h4><table><thead><tr><th scope=\"col\">Fragment</th><th scope=\"col\">Payload bytes</th><th scope=\"col\">Total bytes</th><th scope=\"col\">Starting byte</th><th scope=\"col\">Offset /8</th><th scope=\"col\">MF</th></tr></thead><tbody><tr><td>1</td><td>1480</td><td>1500</td><td>0</td><td>0</td><td>1</td></tr><tr><td>2</td><td>1480</td><td>1500</td><td>1480</td><td>185</td><td>1</td></tr><tr><td>3</td><td>1020</td><td>1040</td><td>2960</td><td>370</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Verify no payload is lost</h4><p>1480+1480+1020=3980 bytes. Every total length is at most 1500.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 3 fragments; lengths, offsets and MF are listed in the table.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Only payload positions determine offsets; repeating a header does not move the offset of later original data.</p></aside></div></section>"},{"id":"fragment-2","title":"Optional fragmentation · example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. An unfragmented IPv4 packet is 2000 bytes including a 20-byte header. It crosses a link of MTU 620 bytes. DF=0 and every fragment repeats the same header. Find each fragment’s payload length, total length, offset and MF flag. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Total=2000; H=20; MTU=620 bytes; DF=0.</p><h2>To find</h2><p>All fragments and their header-related values.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/00cfb5dffef469d2.svg\" alt=\"P=T-H\" style=\"width:11.084ex;height:1.731ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/fd129cf4e0fe3540.svg\" alt=\"P_{\\max}=8\\left\\lfloor\\frac{\\mathrm{MTU}-H}{8}\\right\\rfloor\" style=\"width:22.956ex;height:5.428ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/76b072d173a1b0cc.svg\" alt=\"\\mathrm{offset}=\\mathrm{preceding\\ payload\\ bytes}/8\" style=\"width:34.099ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Subtract the header before splitting the original payload. Round non-final fragment payload capacity down to a multiple of eight.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Original payload</h4><p>2000−20=1980 bytes.</p></div><div class=\"step\"><h4>Step 2. Non-final payload capacity</h4><p>MTU−H=620−20=600. Floor((600)/8)×8=600 bytes.</p></div><div class=\"step\"><h4>Step 3. Allocate each fragment</h4><table><thead><tr><th scope=\"col\">Fragment</th><th scope=\"col\">Payload bytes</th><th scope=\"col\">Total bytes</th><th scope=\"col\">Starting byte</th><th scope=\"col\">Offset /8</th><th scope=\"col\">MF</th></tr></thead><tbody><tr><td>1</td><td>600</td><td>620</td><td>0</td><td>0</td><td>1</td></tr><tr><td>2</td><td>600</td><td>620</td><td>600</td><td>75</td><td>1</td></tr><tr><td>3</td><td>600</td><td>620</td><td>1200</td><td>150</td><td>1</td></tr><tr><td>4</td><td>180</td><td>200</td><td>1800</td><td>225</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Verify no payload is lost</h4><p>600+600+600+180=1980 bytes. Every total length is at most 620.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 4 fragments; lengths, offsets and MF are listed in the table.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Only payload positions determine offsets; repeating a header does not move the offset of later original data.</p></aside></div></section>"},{"id":"fragment-3","title":"Optional fragmentation · example 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. An unfragmented IPv4 packet is 1500 bytes including a 20-byte header. It crosses a link of MTU 600 bytes. DF=0 and every fragment repeats the same header. Find each fragment’s payload length, total length, offset and MF flag. <span class=\"marks\">[3 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Total=1500; H=20; MTU=600 bytes; DF=0.</p><h2>To find</h2><p>All fragments and their header-related values.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/00cfb5dffef469d2.svg\" alt=\"P=T-H\" style=\"width:11.084ex;height:1.731ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/fd129cf4e0fe3540.svg\" alt=\"P_{\\max}=8\\left\\lfloor\\frac{\\mathrm{MTU}-H}{8}\\right\\rfloor\" style=\"width:22.956ex;height:5.428ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/76b072d173a1b0cc.svg\" alt=\"\\mathrm{offset}=\\mathrm{preceding\\ payload\\ bytes}/8\" style=\"width:34.099ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Subtract the header before splitting the original payload. Round non-final fragment payload capacity down to a multiple of eight.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Original payload</h4><p>1500−20=1480 bytes.</p></div><div class=\"step\"><h4>Step 2. Non-final payload capacity</h4><p>MTU−H=600−20=580. Floor((580)/8)×8=576 bytes.</p></div><div class=\"step\"><h4>Step 3. Allocate each fragment</h4><table><thead><tr><th scope=\"col\">Fragment</th><th scope=\"col\">Payload bytes</th><th scope=\"col\">Total bytes</th><th scope=\"col\">Starting byte</th><th scope=\"col\">Offset /8</th><th scope=\"col\">MF</th></tr></thead><tbody><tr><td>1</td><td>576</td><td>596</td><td>0</td><td>0</td><td>1</td></tr><tr><td>2</td><td>576</td><td>596</td><td>576</td><td>72</td><td>1</td></tr><tr><td>3</td><td>328</td><td>348</td><td>1152</td><td>144</td><td>0</td></tr></tbody></table></div><div class=\"step\"><h4>Step 4. Verify no payload is lost</h4><p>576+576+328=1480 bytes. Every total length is at most 600.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 3 fragments; lengths, offsets and MF are listed in the table.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Only payload positions determine offsets; repeating a header does not move the offset of later original data.</p></aside></div></section>"}]},{"id":"transport","title":"Unit 5 · Process delivery, UDP, TCP and SCTP · optional practice","scope":"Optional extension · no matching calculation in the two supplied papers","sections":[{"id":"udp-size-1","title":"UDP length calculation · example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A UDP datagram carries 100 payload bytes. The IP header is 20 bytes with no additional extension headers. Find the UDP Length and complete IP packet size. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>UDP payload=100 B; UDP fixed header=8 B; IP header=20 B.</p><h2>To find</h2><p>UDP Length field and total packet bytes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/b72774caf03e04db.svg\" alt=\"L_{UDP}=8+P,\\quad L_{IP}=H_{IP}+L_{UDP}\" style=\"width:36.439ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>UDP Length includes its own header, but does not include the IP header.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Include the UDP header</h4><p>100+8=108 bytes.</p></div><div class=\"step\"><h4>Step 2. Include the IP header</h4><p>108+20=128 bytes.</p></div><div class=\"step\"><h4>Step 3. Check layer boundaries</h4><p>20 IP + 8 UDP + 100 data = 128 bytes.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> UDP Length=108 bytes; IP packet=128 bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Do not write the whole IP packet size into the UDP Length field. Link-layer overhead is excluded.</p></aside></div></section>"},{"id":"udp-size-2","title":"UDP length calculation · example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A UDP datagram carries 512 payload bytes. The IP header is 20 bytes with no additional extension headers. Find the UDP Length and complete IP packet size. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>UDP payload=512 B; UDP fixed header=8 B; IP header=20 B.</p><h2>To find</h2><p>UDP Length field and total packet bytes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/b72774caf03e04db.svg\" alt=\"L_{UDP}=8+P,\\quad L_{IP}=H_{IP}+L_{UDP}\" style=\"width:36.439ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>UDP Length includes its own header, but does not include the IP header.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Include the UDP header</h4><p>512+8=520 bytes.</p></div><div class=\"step\"><h4>Step 2. Include the IP header</h4><p>520+20=540 bytes.</p></div><div class=\"step\"><h4>Step 3. Check layer boundaries</h4><p>20 IP + 8 UDP + 512 data = 540 bytes.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> UDP Length=520 bytes; IP packet=540 bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Do not write the whole IP packet size into the UDP Length field. Link-layer overhead is excluded.</p></aside></div></section>"},{"id":"udp-size-3","title":"UDP length calculation · example 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A UDP datagram carries 1200 payload bytes. The IP header is 40 bytes with no additional extension headers. Find the UDP Length and complete IP packet size. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>UDP payload=1200 B; UDP fixed header=8 B; IP header=40 B.</p><h2>To find</h2><p>UDP Length field and total packet bytes.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/b72774caf03e04db.svg\" alt=\"L_{UDP}=8+P,\\quad L_{IP}=H_{IP}+L_{UDP}\" style=\"width:36.439ex;height:1.984ex\" loading=\"lazy\" decoding=\"async\"></div><p>UDP Length includes its own header, but does not include the IP header.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Include the UDP header</h4><p>1200+8=1208 bytes.</p></div><div class=\"step\"><h4>Step 2. Include the IP header</h4><p>1208+40=1248 bytes.</p></div><div class=\"step\"><h4>Step 3. Check layer boundaries</h4><p>40 IP + 8 UDP + 1200 data = 1248 bytes.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> UDP Length=1208 bytes; IP packet=1248 bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Do not write the whole IP packet size into the UDP Length field. Link-layer overhead is excluded.</p></aside></div></section>"},{"id":"tcp-seq-1","title":"TCP sequence and ACK arithmetic · example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A client SYN has Seq=1000; the server SYN has Seq=5000. No handshake data is sent. The client then sends 200 bytes in one segment and immediately finishes its sending direction. Find handshake ACKs, data-byte range, data ACK and FIN ACK. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Client ISN=1000; server ISN=5000; data=200 B; no sequence wrap or loss.</p><h2>To find</h2><p>Each sequence/acknowledgement boundary.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/e95efbc97b48115e.svg\" alt=\"\\mathrm{first}=ISN+1,\\quad \\mathrm{next}=\\mathrm{first}+L\" style=\"width:34.411ex;height:2.034ex\" loading=\"lazy\" decoding=\"async\"></div><p>SYN and FIN consume one sequence value each; data consumes one value per byte; an empty ACK consumes none.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Acknowledge SYNs</h4><p>Server ACK=1001; client ACK=5001.</p></div><div class=\"step\"><h4>Step 2. Number the data</h4><p>First byte=1001; last=1001+200−1=1200.</p></div><div class=\"step\"><h4>Step 3. Acknowledge data</h4><p>Next expected byte=1200+1=1201; receiver sends ACK=1201.</p></div><div class=\"step\"><h4>Step 4. Acknowledge FIN</h4><p>Client FIN Seq=1201; FIN ACK=1202.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Handshake ACKs 1001 and 5001; data 1001…1200; data ACK 1201; FIN ACK 1202.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>An ACK reports the next expected byte, not the last received byte. Each direction has its own sequence space.</p></aside></div></section>"},{"id":"tcp-seq-2","title":"TCP sequence and ACK arithmetic · example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A client SYN has Seq=99; the server SYN has Seq=700. No handshake data is sent. The client then sends 500 bytes in one segment and immediately finishes its sending direction. Find handshake ACKs, data-byte range, data ACK and FIN ACK. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Client ISN=99; server ISN=700; data=500 B; no sequence wrap or loss.</p><h2>To find</h2><p>Each sequence/acknowledgement boundary.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/e95efbc97b48115e.svg\" alt=\"\\mathrm{first}=ISN+1,\\quad \\mathrm{next}=\\mathrm{first}+L\" style=\"width:34.411ex;height:2.034ex\" loading=\"lazy\" decoding=\"async\"></div><p>SYN and FIN consume one sequence value each; data consumes one value per byte; an empty ACK consumes none.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Acknowledge SYNs</h4><p>Server ACK=100; client ACK=701.</p></div><div class=\"step\"><h4>Step 2. Number the data</h4><p>First byte=100; last=100+500−1=599.</p></div><div class=\"step\"><h4>Step 3. Acknowledge data</h4><p>Next expected byte=599+1=600; receiver sends ACK=600.</p></div><div class=\"step\"><h4>Step 4. Acknowledge FIN</h4><p>Client FIN Seq=600; FIN ACK=601.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Handshake ACKs 100 and 701; data 100…599; data ACK 600; FIN ACK 601.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>An ACK reports the next expected byte, not the last received byte. Each direction has its own sequence space.</p></aside></div></section>"},{"id":"tcp-seq-3","title":"TCP sequence and ACK arithmetic · example 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A client SYN has Seq=4000; the server SYN has Seq=9000. No handshake data is sent. The client then sends 1024 bytes in one segment and immediately finishes its sending direction. Find handshake ACKs, data-byte range, data ACK and FIN ACK. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>Client ISN=4000; server ISN=9000; data=1024 B; no sequence wrap or loss.</p><h2>To find</h2><p>Each sequence/acknowledgement boundary.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/e95efbc97b48115e.svg\" alt=\"\\mathrm{first}=ISN+1,\\quad \\mathrm{next}=\\mathrm{first}+L\" style=\"width:34.411ex;height:2.034ex\" loading=\"lazy\" decoding=\"async\"></div><p>SYN and FIN consume one sequence value each; data consumes one value per byte; an empty ACK consumes none.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Acknowledge SYNs</h4><p>Server ACK=4001; client ACK=9001.</p></div><div class=\"step\"><h4>Step 2. Number the data</h4><p>First byte=4001; last=4001+1024−1=5024.</p></div><div class=\"step\"><h4>Step 3. Acknowledge data</h4><p>Next expected byte=5024+1=5025; receiver sends ACK=5025.</p></div><div class=\"step\"><h4>Step 4. Acknowledge FIN</h4><p>Client FIN Seq=5025; FIN ACK=5026.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Handshake ACKs 4001 and 9001; data 4001…5024; data ACK 5025; FIN ACK 5026.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>An ACK reports the next expected byte, not the last received byte. Each direction has its own sequence space.</p></aside></div></section>"}]},{"id":"congestion","title":"Unit 5 · Congestion control and QoS · optional practice","scope":"Optional extension · no matching calculation in the two supplied papers","sections":[{"id":"leaky-1","title":"Leaky-bucket timeline · example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A leaky-bucket data queue holds 10 fixed-size packets and drains at 2 packets/s whenever nonempty. It starts empty. Arrivals are instantaneous at the given times; drain between events, then admit arrivals. Find overflow and final empty time. <span class=\"marks\">[7 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Time (s)</th><th scope=\"col\">Arrival packets</th></tr></thead><tbody><tr><td>0</td><td>8</td></tr><tr><td>2</td><td>9</td></tr><tr><td>5</td><td>3</td></tr></tbody></table><h2>To find</h2><p>Queue after each burst, dropped packets and time the queue finally empties.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/b431990cb4021a43.svg\" alt=\"q_{before}=\\max(0,q_{previous}-r\\Delta t)\" style=\"width:30.601ex;height:2.364ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/b022488f5ef91a76.svg\" alt=\"a_{accepted}=\\min(a,B-q_{before})\" style=\"width:28.307ex;height:2.364ex\" loading=\"lazy\" decoding=\"async\"></div><p>This explicit event order separates elapsed-time service from instantaneous admission.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Start with an empty queue</h4><p>q=0 at t=0 before the first arrival; no negative-time service.</p></div><div class=\"step\"><h4>Step 2. Apply service then admission at each event</h4><table><thead><tr><th scope=\"col\">t</th><th scope=\"col\">Arrive</th><th scope=\"col\">Drained</th><th scope=\"col\">Before</th><th scope=\"col\">Admit</th><th scope=\"col\">Drop</th><th scope=\"col\">After</th></tr></thead><tbody><tr><td>0</td><td>8</td><td>0</td><td>0</td><td>8</td><td>0</td><td>8</td></tr><tr><td>2</td><td>9</td><td>4</td><td>4</td><td>6</td><td>3</td><td>10</td></tr><tr><td>5</td><td>3</td><td>6</td><td>4</td><td>3</td><td>0</td><td>7</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Sum the overflow</h4><p>Total dropped=3 packets.</p></div><div class=\"step\"><h4>Step 4. Drain after the last arrival</h4><p>Last event t=5; queue=7. Time needed=7/2=3.5 s; final empty time=8.5 s.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 3 packets dropped; queue finally empty at t=8.5 s.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A finite queue cannot accept an instantaneous burst beyond its free slots. Inter-event service is capped by available queued data.</p></aside></div></section>"},{"id":"leaky-2","title":"Leaky-bucket timeline · example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A leaky-bucket data queue holds 12 fixed-size packets and drains at 3 packets/s whenever nonempty. It starts empty. Arrivals are instantaneous at the given times; drain between events, then admit arrivals. Find overflow and final empty time. <span class=\"marks\">[7 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Time (s)</th><th scope=\"col\">Arrival packets</th></tr></thead><tbody><tr><td>0</td><td>12</td></tr><tr><td>1</td><td>7</td></tr><tr><td>3</td><td>4</td></tr></tbody></table><h2>To find</h2><p>Queue after each burst, dropped packets and time the queue finally empties.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/b431990cb4021a43.svg\" alt=\"q_{before}=\\max(0,q_{previous}-r\\Delta t)\" style=\"width:30.601ex;height:2.364ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/b022488f5ef91a76.svg\" alt=\"a_{accepted}=\\min(a,B-q_{before})\" style=\"width:28.307ex;height:2.364ex\" loading=\"lazy\" decoding=\"async\"></div><p>This explicit event order separates elapsed-time service from instantaneous admission.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Start with an empty queue</h4><p>q=0 at t=0 before the first arrival; no negative-time service.</p></div><div class=\"step\"><h4>Step 2. Apply service then admission at each event</h4><table><thead><tr><th scope=\"col\">t</th><th scope=\"col\">Arrive</th><th scope=\"col\">Drained</th><th scope=\"col\">Before</th><th scope=\"col\">Admit</th><th scope=\"col\">Drop</th><th scope=\"col\">After</th></tr></thead><tbody><tr><td>0</td><td>12</td><td>0</td><td>0</td><td>12</td><td>0</td><td>12</td></tr><tr><td>1</td><td>7</td><td>3</td><td>9</td><td>3</td><td>4</td><td>12</td></tr><tr><td>3</td><td>4</td><td>6</td><td>6</td><td>4</td><td>0</td><td>10</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Sum the overflow</h4><p>Total dropped=4 packets.</p></div><div class=\"step\"><h4>Step 4. Drain after the last arrival</h4><p>Last event t=3; queue=10. Time needed=10/3=3.33333 s; final empty time=6.33333 s.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 4 packets dropped; queue finally empty at t=6.33333 s.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A finite queue cannot accept an instantaneous burst beyond its free slots. Inter-event service is capped by available queued data.</p></aside></div></section>"},{"id":"leaky-3","title":"Leaky-bucket timeline · example 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A leaky-bucket data queue holds 20 fixed-size packets and drains at 5 packets/s whenever nonempty. It starts empty. Arrivals are instantaneous at the given times; drain between events, then admit arrivals. Find overflow and final empty time. <span class=\"marks\">[7 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><table><thead><tr><th scope=\"col\">Time (s)</th><th scope=\"col\">Arrival packets</th></tr></thead><tbody><tr><td>0</td><td>10</td></tr><tr><td>1</td><td>18</td></tr><tr><td>4</td><td>6</td></tr></tbody></table><h2>To find</h2><p>Queue after each burst, dropped packets and time the queue finally empties.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/b431990cb4021a43.svg\" alt=\"q_{before}=\\max(0,q_{previous}-r\\Delta t)\" style=\"width:30.601ex;height:2.364ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/b022488f5ef91a76.svg\" alt=\"a_{accepted}=\\min(a,B-q_{before})\" style=\"width:28.307ex;height:2.364ex\" loading=\"lazy\" decoding=\"async\"></div><p>This explicit event order separates elapsed-time service from instantaneous admission.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Start with an empty queue</h4><p>q=0 at t=0 before the first arrival; no negative-time service.</p></div><div class=\"step\"><h4>Step 2. Apply service then admission at each event</h4><table><thead><tr><th scope=\"col\">t</th><th scope=\"col\">Arrive</th><th scope=\"col\">Drained</th><th scope=\"col\">Before</th><th scope=\"col\">Admit</th><th scope=\"col\">Drop</th><th scope=\"col\">After</th></tr></thead><tbody><tr><td>0</td><td>10</td><td>0</td><td>0</td><td>10</td><td>0</td><td>10</td></tr><tr><td>1</td><td>18</td><td>5</td><td>5</td><td>15</td><td>3</td><td>20</td></tr><tr><td>4</td><td>6</td><td>15</td><td>5</td><td>6</td><td>0</td><td>11</td></tr></tbody></table></div><div class=\"step\"><h4>Step 3. Sum the overflow</h4><p>Total dropped=3 packets.</p></div><div class=\"step\"><h4>Step 4. Drain after the last arrival</h4><p>Last event t=4; queue=11. Time needed=11/5=2.2 s; final empty time=6.2 s.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> 3 packets dropped; queue finally empty at t=6.2 s.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>A finite queue cannot accept an instantaneous burst beyond its free slots. Inter-event service is capped by available queued data.</p></aside></div></section>"},{"id":"token-wait-1","title":"Token-bucket waiting · example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A byte-token shaper has capacity 10000 bytes and refill rate 2000 bytes/s. It currently holds 3000 tokens. A 7000-byte packet arrives with no other waiting packets. Ignoring serialization time, when can it become eligible to send? <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>B=10000; r=2000; initial tokens=3000; L=7000 bytes; L≤B.</p><h2>To find</h2><p>Token deficit and eligibility wait.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/b2d0e2858bb8f8cc.svg\" alt=\"\\Delta=\\max(0,L-T),\\quad t_{wait}=\\Delta/r\" style=\"width:33.356ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Each byte needs one token. This is a shaper, so it waits for missing tokens; the packet fits within token capacity.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count missing tokens</h4><p>Δ=max(0,7000−3000)=4000.</p></div><div class=\"step\"><h4>Step 2. Divide by refill rate</h4><p>Wait=4000/2000=2 s.</p></div><div class=\"step\"><h4>Step 3. Check tokens at eligibility</h4><p>3000+2000×2=7000 tokens, at most capacity 10000. Sending consumes 7000, leaving 0.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> The packet is eligible after 2 s; physical transmission takes additional time.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>If L exceeds B and packets must be admitted atomically, merely waiting cannot make the packet eligible under this bucket configuration.</p></aside></div></section>"},{"id":"token-wait-2","title":"Token-bucket waiting · example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A byte-token shaper has capacity 8000 bytes and refill rate 1000 bytes/s. It currently holds 500 tokens. A 2500-byte packet arrives with no other waiting packets. Ignoring serialization time, when can it become eligible to send? <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>B=8000; r=1000; initial tokens=500; L=2500 bytes; L≤B.</p><h2>To find</h2><p>Token deficit and eligibility wait.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/b2d0e2858bb8f8cc.svg\" alt=\"\\Delta=\\max(0,L-T),\\quad t_{wait}=\\Delta/r\" style=\"width:33.356ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Each byte needs one token. This is a shaper, so it waits for missing tokens; the packet fits within token capacity.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count missing tokens</h4><p>Δ=max(0,2500−500)=2000.</p></div><div class=\"step\"><h4>Step 2. Divide by refill rate</h4><p>Wait=2000/1000=2 s.</p></div><div class=\"step\"><h4>Step 3. Check tokens at eligibility</h4><p>500+1000×2=2500 tokens, at most capacity 8000. Sending consumes 2500, leaving 0.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> The packet is eligible after 2 s; physical transmission takes additional time.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>If L exceeds B and packets must be admitted atomically, merely waiting cannot make the packet eligible under this bucket configuration.</p></aside></div></section>"},{"id":"token-wait-3","title":"Token-bucket waiting · example 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A byte-token shaper has capacity 12000 bytes and refill rate 3000 bytes/s. It currently holds 4000 tokens. A 10000-byte packet arrives with no other waiting packets. Ignoring serialization time, when can it become eligible to send? <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>B=12000; r=3000; initial tokens=4000; L=10000 bytes; L≤B.</p><h2>To find</h2><p>Token deficit and eligibility wait.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/b2d0e2858bb8f8cc.svg\" alt=\"\\Delta=\\max(0,L-T),\\quad t_{wait}=\\Delta/r\" style=\"width:33.356ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Each byte needs one token. This is a shaper, so it waits for missing tokens; the packet fits within token capacity.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Count missing tokens</h4><p>Δ=max(0,10000−4000)=6000.</p></div><div class=\"step\"><h4>Step 2. Divide by refill rate</h4><p>Wait=6000/3000=2 s.</p></div><div class=\"step\"><h4>Step 3. Check tokens at eligibility</h4><p>4000+3000×2=10000 tokens, at most capacity 12000. Sending consumes 10000, leaving 0.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> The packet is eligible after 2 s; physical transmission takes additional time.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>If L exceeds B and packets must be admitted atomically, merely waiting cannot make the packet eligible under this bucket configuration.</p></aside></div></section>"},{"id":"token-burst-1","title":"Token-bucket sustained burst · example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A token bucket starts full with 10000 byte-tokens, replenishes at 2000 bytes/s, and transmits continuously at peak 12000 bytes/s while tokens permit. Under a fluid model with P>r, find the maximum peak-rate burst duration and data sent. <span class=\"marks\">[7 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>B=10000 bytes; r=2000 B/s; P=12000 B/s; continuously backlogged fluid traffic.</p><h2>To find</h2><p>Time until tokens exhaust and bytes sent at the peak rate.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/931f9e3ab8969d1f.svg\" alt=\"t=\\frac{B}{P-r},\\quad D=Pt\" style=\"width:20.989ex;height:4.812ex\" loading=\"lazy\" decoding=\"async\"></div><p>Tokens are consumed at P and simultaneously replenished at r, so net depletion is P−r.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Net depletion</h4><p>12000−2000=10000 tokens/s.</p></div><div class=\"step\"><h4>Step 2. Time to exhaust B</h4><p>t=10000/10000=1 s.</p></div><div class=\"step\"><h4>Step 3. Data sent and independent balance</h4><p>D=12000×1=12000 bytes. Check B+rt=10000+2000×1=12000 bytes.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Peak burst lasts 1 s and sends 12000 bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Using B/P would ignore replenishment during transmission. Packetized scheduling may round timing; this question explicitly uses a fluid model.</p></aside></div></section>"},{"id":"token-burst-2","title":"Token-bucket sustained burst · example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A token bucket starts full with 6000 byte-tokens, replenishes at 3000 bytes/s, and transmits continuously at peak 9000 bytes/s while tokens permit. Under a fluid model with P>r, find the maximum peak-rate burst duration and data sent. <span class=\"marks\">[7 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>B=6000 bytes; r=3000 B/s; P=9000 B/s; continuously backlogged fluid traffic.</p><h2>To find</h2><p>Time until tokens exhaust and bytes sent at the peak rate.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/931f9e3ab8969d1f.svg\" alt=\"t=\\frac{B}{P-r},\\quad D=Pt\" style=\"width:20.989ex;height:4.812ex\" loading=\"lazy\" decoding=\"async\"></div><p>Tokens are consumed at P and simultaneously replenished at r, so net depletion is P−r.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Net depletion</h4><p>9000−3000=6000 tokens/s.</p></div><div class=\"step\"><h4>Step 2. Time to exhaust B</h4><p>t=6000/6000=1 s.</p></div><div class=\"step\"><h4>Step 3. Data sent and independent balance</h4><p>D=9000×1=9000 bytes. Check B+rt=6000+3000×1=9000 bytes.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Peak burst lasts 1 s and sends 9000 bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Using B/P would ignore replenishment during transmission. Packetized scheduling may round timing; this question explicitly uses a fluid model.</p></aside></div></section>"},{"id":"token-burst-3","title":"Token-bucket sustained burst · example 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A token bucket starts full with 16000 byte-tokens, replenishes at 4000 bytes/s, and transmits continuously at peak 8000 bytes/s while tokens permit. Under a fluid model with P>r, find the maximum peak-rate burst duration and data sent. <span class=\"marks\">[7 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>B=16000 bytes; r=4000 B/s; P=8000 B/s; continuously backlogged fluid traffic.</p><h2>To find</h2><p>Time until tokens exhaust and bytes sent at the peak rate.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/931f9e3ab8969d1f.svg\" alt=\"t=\\frac{B}{P-r},\\quad D=Pt\" style=\"width:20.989ex;height:4.812ex\" loading=\"lazy\" decoding=\"async\"></div><p>Tokens are consumed at P and simultaneously replenished at r, so net depletion is P−r.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Net depletion</h4><p>8000−4000=4000 tokens/s.</p></div><div class=\"step\"><h4>Step 2. Time to exhaust B</h4><p>t=16000/4000=4 s.</p></div><div class=\"step\"><h4>Step 3. Data sent and independent balance</h4><p>D=8000×4=32000 bytes. Check B+rt=16000+4000×4=32000 bytes.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Peak burst lasts 4 s and sends 32000 bytes.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>Using B/P would ignore replenishment during transmission. Packetized scheduling may round timing; this question explicitly uses a fluid model.</p></aside></div></section>"}]},{"id":"applications","title":"Unit 6 · HTTP, DNS, FTP and SMTP · optional practice","scope":"Optional extension · no matching calculation in the two supplied papers","sections":[{"id":"http-time-1","title":"Supporting HTTP timing · example 1","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A client fetches 3 equal objects sequentially. Each object is 10000 bytes; link rate=1000000 bit/s and RTT=50 ms. Ignore DNS, TLS, loss, processing, headers, slow start and parallelism. Compare separate nonpersistent TCP connections with one new persistent connection without pipelining. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>n=3; RTT=50 ms; each payload=10000 B; rate=1000000 bit/s; ideal HTTP/1.x timing model.</p><h2>To find</h2><p>Total time under each stated connection policy.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/d5549e76446992ce.svg\" alt=\"T_{non}=n(2RTT+T_{object})\" style=\"width:24.785ex;height:2.363ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/257c101efa25bb1f.svg\" alt=\"T_{persistent}=RTT+n(RTT+T_{object})\" style=\"width:35.811ex;height:2.363ex\" loading=\"lazy\" decoding=\"async\"></div><p>Nonpersistent uses one setup RTT plus one request/first-response RTT per object. Persistent pays setup once, then one sequential request RTT per object.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Serialize one object</h4><p>Tobject=10000×8/1000000 seconds = 80 ms.</p></div><div class=\"step\"><h4>Step 2. Separate connections</h4><p>Tnon=3×(2×50+80)=540 ms.</p></div><div class=\"step\"><h4>Step 3. One persistent connection</h4><p>Tpersistent=50+3×(50+80)=440 ms.</p></div><div class=\"step\"><h4>Step 4. Check the saving</h4><p>540−440=100 ms = (3−1)×50; exactly the removed setup round trips.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Nonpersistent=540 ms; persistent=440 ms.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>This is an explicitly simplified supporting numerical, not a measured prediction for modern browsers using multiplexing, TLS, caches and parallel connections.</p></aside></div></section>"},{"id":"http-time-2","title":"Supporting HTTP timing · example 2","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A client fetches 5 equal objects sequentially. Each object is 20000 bytes; link rate=2000000 bit/s and RTT=20 ms. Ignore DNS, TLS, loss, processing, headers, slow start and parallelism. Compare separate nonpersistent TCP connections with one new persistent connection without pipelining. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>n=5; RTT=20 ms; each payload=20000 B; rate=2000000 bit/s; ideal HTTP/1.x timing model.</p><h2>To find</h2><p>Total time under each stated connection policy.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/d5549e76446992ce.svg\" alt=\"T_{non}=n(2RTT+T_{object})\" style=\"width:24.785ex;height:2.363ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/257c101efa25bb1f.svg\" alt=\"T_{persistent}=RTT+n(RTT+T_{object})\" style=\"width:35.811ex;height:2.363ex\" loading=\"lazy\" decoding=\"async\"></div><p>Nonpersistent uses one setup RTT plus one request/first-response RTT per object. Persistent pays setup once, then one sequential request RTT per object.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Serialize one object</h4><p>Tobject=20000×8/2000000 seconds = 80 ms.</p></div><div class=\"step\"><h4>Step 2. Separate connections</h4><p>Tnon=5×(2×20+80)=600 ms.</p></div><div class=\"step\"><h4>Step 3. One persistent connection</h4><p>Tpersistent=20+5×(20+80)=520 ms.</p></div><div class=\"step\"><h4>Step 4. Check the saving</h4><p>600−520=80 ms = (5−1)×20; exactly the removed setup round trips.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Nonpersistent=600 ms; persistent=520 ms.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>This is an explicitly simplified supporting numerical, not a measured prediction for modern browsers using multiplexing, TLS, caches and parallel connections.</p></aside></div></section>"},{"id":"http-time-3","title":"Supporting HTTP timing · example 3","html":"<div class=\"note\"><p><strong>Optional worked extension.</strong> This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.</p></div><section class=\"example\"><h3 class=\"exam-question\">Practice question. A client fetches 2 equal objects sequentially. Each object is 5000 bytes; link rate=500000 bit/s and RTT=100 ms. Ignore DNS, TLS, loss, processing, headers, slow start and parallelism. Compare separate nonpersistent TCP connections with one new persistent connection without pipelining. <span class=\"marks\">[5 practice marks]</span></h3><div class=\"answer\"><h4>Answer</h4><h2>Given</h2><p>n=2; RTT=100 ms; each payload=5000 B; rate=500000 bit/s; ideal HTTP/1.x timing model.</p><h2>To find</h2><p>Total time under each stated connection policy.</p><h2>Formula and why</h2><div class=\"math-display\"><img src=\"math/d5549e76446992ce.svg\" alt=\"T_{non}=n(2RTT+T_{object})\" style=\"width:24.785ex;height:2.363ex\" loading=\"lazy\" decoding=\"async\"></div><div class=\"math-display\"><img src=\"math/257c101efa25bb1f.svg\" alt=\"T_{persistent}=RTT+n(RTT+T_{object})\" style=\"width:35.811ex;height:2.363ex\" loading=\"lazy\" decoding=\"async\"></div><p>Nonpersistent uses one setup RTT plus one request/first-response RTT per object. Persistent pays setup once, then one sequential request RTT per object.</p><h2>Step-by-step solution</h2><div class=\"step\"><h4>Step 1. Serialize one object</h4><p>Tobject=5000×8/500000 seconds = 80 ms.</p></div><div class=\"step\"><h4>Step 2. Separate connections</h4><p>Tnon=2×(2×100+80)=560 ms.</p></div><div class=\"step\"><h4>Step 3. One persistent connection</h4><p>Tpersistent=100+2×(100+80)=460 ms.</p></div><div class=\"step\"><h4>Step 4. Check the saving</h4><p>560−460=100 ms = (2−1)×100; exactly the removed setup round trips.</p></div><p class=\"final-answer\"><strong>Final answer:</strong> Nonpersistent=560 ms; persistent=460 ms.</p><aside class=\"applied-example\"><h4>What this result means</h4><p>This is an explicitly simplified supporting numerical, not a measured prediction for modern browsers using multiplexing, TLS, caches and parallel connections.</p></aside></div></section>"}]},{"id":"formulas","title":"Extra timing and packet-length formulas","scope":"TEE · symbols explained; worked examples linked below","sections":[{"id":"units","title":"Delays, units and packet pipeline","html":"<div class=\"note\"><p>Supporting formula collection. Use the compact TEE formula sheet first; the full calculation set below is not an observed-paper requirement.</p></div><div class=\"math-display\"><img src=\"math/9e384aa108fc34e3.svg\" alt=\"T_f=L/R\" style=\"width:9.795ex;height:2.364ex\" loading=\"lazy\" decoding=\"async\"></div><p>L=bits, R=bits/s, Tf=seconds. Use for serialization.</p><div class=\"math-display\"><img src=\"math/9c2209baf93e272e.svg\" alt=\"T_p=d/v\" style=\"width:8.736ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>d=distance, v=propagation speed. Use consistent distance units.</p><div class=\"math-display\"><img src=\"math/a1dee7ec7d280062.svg\" alt=\"T=(h+k-1)L/R+h\\tau\" style=\"width:25.142ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>h equal-rate store-and-forward links, k equal packets, L total bits/packet; τ per-link propagation. No queueing or processing.</p><h2>Learn it with complete solutions</h2><p><a href=\"#tee/read/basics/delay-1\">Three worked delay examples</a></p>"},{"id":"csma","title":"Collision timing and backoff","html":"<div class=\"math-display\"><img src=\"math/eae5a57f0575ef7d.svg\" alt=\"L_{\\min}\\geq 2RT_p\" style=\"width:12.575ex;height:2.195ex\" loading=\"lazy\" decoding=\"async\"></div><p>R=bits/s; Tp=one-way seconds. Theoretical collision-detection bound.</p><div class=\"math-display\"><img src=\"math/f340420d788785f5.svg\" alt=\"k=\\min(n,10),\\quad 0\\leq K\\leq 2^k-1\" style=\"width:32.848ex;height:2.61ex\" loading=\"lazy\" decoding=\"async\"></div><p>n collisions; K selected integer for classic Ethernet backoff.</p><div class=\"math-display\"><img src=\"math/c833ce43529e0206.svg\" alt=\"T_{\\mathrm{backoff}}=KT_{\\mathrm{slot}}\" style=\"width:15.673ex;height:1.902ex\" loading=\"lazy\" decoding=\"async\"></div><p>Multiply selected K by slot duration, retaining units.</p><h2>Learn it with complete solutions</h2><p><a href=\"#tee/practice/csma/minframe-1\">Minimum-frame examples</a></p>"},{"id":"ipv6","title":"IPv6 and packet lengths","html":"<div class=\"note\"><p>Supporting formula collection. Use the compact TEE formula sheet first; the full calculation set below is not an observed-paper requirement.</p></div><div class=\"math-display\"><img src=\"math/38a8a52c7013e253.svg\" alt=\"\\text{omitted groups}=8-\\text{visible groups}\" style=\"width:35.061ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Count every written group, including a written 0.</p><div class=\"math-display\"><img src=\"math/a05ef7dd84fc645e.svg\" alt=\"\\mathrm{IPv6\\ total}=40+\\mathrm{payload\\ length}\" style=\"width:32.405ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>Payload includes extension headers, excludes the base 40 bytes.</p><div class=\"math-display\"><img src=\"math/0abf62f351ee6ca7.svg\" alt=\"\\mathrm{IPv4\\ header\\ bytes}=4\\,\\mathrm{IHL}\" style=\"width:26.04ex;height:2.032ex\" loading=\"lazy\" decoding=\"async\"></div><p>IHL is in 32-bit words.</p><div class=\"math-display\"><img src=\"math/dfefa084951b704c.svg\" alt=\"\\mathrm{IPv4\\ payload}=\\mathrm{Total\\ Length}-4\\,\\mathrm{IHL}\" style=\"width:37.118ex;height:2.036ex\" loading=\"lazy\" decoding=\"async\"></div><p>IPv4 Total Length includes the IPv4 header.</p><h2>Learn it with complete solutions</h2><p><a href=\"#tee/read/ipv6/expand-1\">Four IPv6 expansions</a></p>"}]},{"id":"tee-formulas","title":"Extra mathematical models","scope":"TEE · Complete six-unit quick reference · current syllabus 702AI0C023","sections":[{"id":"coding","title":"Block coding, Hamming distance and CRC","html":"<div class=\"math-display\"><img src=\"math/beca5466928acbfc.svg\" alt=\"r=n-k,\\quad R_c=k/n\" style=\"width:21.89ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>k data bits, n codeword bits, r redundant bits; coding rate is dimensionless.</p><div class=\"math-display\"><img src=\"math/15901a0538322dc0.svg\" alt=\"d(a,b)=\\operatorname{weight}(a\\oplus b)\" style=\"width:22.357ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Count differing bit positions in equal-length words.</p><div class=\"math-display\"><img src=\"math/b0c374242e18e388.svg\" alt=\"s=d_{\\min}-1,\\quad t=\\lfloor(d_{\\min}-1)/2\\rfloor\" style=\"width:33.068ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Separate maximum guaranteed detection and correction counts; all distinct pairs define dmin.</p><div class=\"math-display\"><img src=\"math/ecdbdeb0433d59c5.svg\" alt=\"2^r\\ge m+r+1\" style=\"width:14.727ex;height:1.954ex\" loading=\"lazy\" decoding=\"async\"></div><p>Smallest r for m data bits in single-error Hamming construction; parity positions 1,2,4,….</p><div class=\"math-display\"><img src=\"math/08451acce5e9e980.svg\" alt=\"R(x)=x^rM(x)\\bmod G(x),\\quad T=x^rM\\oplus R\" style=\"width:42.73ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Generator degree r; append r zeros and use modulo-2 XOR division. Receiver divides T directly.</p><p><a href=\"#tee/read/error-control/crc-1\">CRC and receiver-check working</a></p>"},{"id":"arq","title":"ARQ windows and utilization","html":"<div class=\"math-display\"><img src=\"math/17ff91ae191f528e.svg\" alt=\"N=2^m,\\quad W_{GBN}\\le N-1,\\quad W_{R,GBN}=1\" style=\"width:41.449ex;height:2.291ex\" loading=\"lazy\" decoding=\"async\"></div><p>m sequence bits; sequence numbers 0…N−1. GBN receiver accepts only next in order.</p><div class=\"math-display\"><img src=\"math/413c503dfd6c2a68.svg\" alt=\"W_{S,SR}=W_{R,SR}\\le N/2\" style=\"width:22.581ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>Standard equal-window SR bound; prevent successive windows overlapping.</p><div class=\"math-display\"><img src=\"math/0ed523dd39640c27.svg\" alt=\"U_{SW}=\\frac{T_t}{T_t+2T_p+T_a}\" style=\"width:21.872ex;height:5.263ex\" loading=\"lazy\" decoding=\"async\"></div><p>Ideal error-free Stop-and-Wait; Tt data transmission, Tp one-way propagation, Ta ACK transmission.</p><div class=\"math-display\"><img src=\"math/73d665b598b96583.svg\" alt=\"U_W=\\min(1,WT_t/(T_t+2T_p+T_a))\" style=\"width:34.863ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>Supporting ideal pipeline bound; no queueing/processing, equal frames.</p><div class=\"math-display\"><img src=\"math/acc548bc5c4e4387.svg\" alt=\"W_{need}=\\lceil(T_t+2T_p+T_a)/T_t\\rceil\" style=\"width:29.029ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>Round upward for a full pipeline, then verify numbering constraints.</p><p><a href=\"#tee/practice/arq/efficiency-1\">Utilization worked examples</a></p>"},{"id":"transport","title":"UDP and TCP arithmetic","html":"<div class=\"math-display\"><img src=\"math/940bfc5f08006c8a.svg\" alt=\"L_{UDP}=8+L_{data}\" style=\"width:17.226ex;height:1.92ex\" loading=\"lazy\" decoding=\"async\"></div><p>UDP length includes its own eight-byte header, not the IP header.</p><div class=\"math-display\"><img src=\"math/4b6e848089433565.svg\" alt=\"H_{TCP}=4\\times\\mathrm{data\\ offset}\" style=\"width:22.783ex;height:1.97ex\" loading=\"lazy\" decoding=\"async\"></div><p>Offset counts 32-bit words; minimum 20-byte TCP header.</p><div class=\"math-display\"><img src=\"math/8d1628ee7de8ff31.svg\" alt=\"ACK=\\mathrm{first\\ byte\\ sequence}+L\" style=\"width:30.819ex;height:2.081ex\" loading=\"lazy\" decoding=\"async\"></div><p>After receiving all L consecutive data bytes, acknowledge the next expected byte. SYN and FIN each add one.</p><div class=\"math-display\"><img src=\"math/13bf9aaf2ed709a3.svg\" alt=\"W_{new}=\\max(0,\\min(rwnd,cwnd)-F)\" style=\"width:37.605ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Supporting simplified sending allowance; F bytes in flight, all quantities in the same units.</p><p><a href=\"#tee/practice/transport/tcp-seq-1\">TCP sequence-number examples</a></p>"},{"id":"buckets","title":"Leaky queue and token bucket","html":"<div class=\"math-display\"><img src=\"math/b9d2a7d69c31ca42.svg\" alt=\"q_b=\\max(0,q-r\\Delta t)\" style=\"width:20.536ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Leaky data-queue state before the next arrival; service cannot exceed queued data.</p><div class=\"math-display\"><img src=\"math/e3b5b2a12bccb581.svg\" alt=\"a_{ok}=\\min(a,B-q_b),\\quad drop=a-a_{ok}\" style=\"width:37.786ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>B finite data capacity; admit instantaneous arrivals after interval service.</p><div class=\"math-display\"><img src=\"math/017cf4ec943dd0f5.svg\" alt=\"T_{new}=\\min(B,T+r\\Delta t)\" style=\"width:23.712ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Token refill before the next admission, capped by token capacity.</p><div class=\"math-display\"><img src=\"math/f9ae1e0794f3ac3b.svg\" alt=\"t_{wait}=\\max(0,L-T)/r\" style=\"width:23.301ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Single packet of L≤B tokens, no other queued traffic, shaper not policer.</p><div class=\"math-display\"><img src=\"math/6a390266ecc7c5fa.svg\" alt=\"D(t)\\le B+rt\" style=\"width:13.787ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Full token-bucket allowance; physical link rate also bounds actual departure.</p><div class=\"math-display\"><img src=\"math/e637610146069ae8.svg\" alt=\"t_{burst}=B/(P-r),\\quad P&gt;r\" style=\"width:26.771ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Fluid peak-rate burst, initially full and continuously backlogged. Net depletion is P−r.</p><p><a href=\"#tee/practice/congestion/token-burst-1\">Three sustained-burst examples</a></p>"},{"id":"support","title":"Topology and HTTP timing · supporting examples","html":"<div class=\"math-display\"><img src=\"math/1aaf8e0c5d7c5d53.svg\" alt=\"L_{mesh}=n(n-1)/2\" style=\"width:19.202ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Undirected full mesh without self-links; per-node ports n−1.</p><div class=\"math-display\"><img src=\"math/21c4c4bee22560eb.svg\" alt=\"T_{non}=n(2RTT+T_o)\" style=\"width:21.424ex;height:2.262ex\" loading=\"lazy\" decoding=\"async\"></div><p>Sequential nonpersistent HTTP/1.x idealization; no DNS/TLS/loss/parallelism.</p><div class=\"math-display\"><img src=\"math/e9189d93499eafbc.svg\" alt=\"T_{persistent}=RTT+n(RTT+T_o)\" style=\"width:32.45ex;height:2.347ex\" loading=\"lazy\" decoding=\"async\"></div><p>One initial TCP handshake then sequential requests without pipelining; To is one object’s serialization.</p><p><a href=\"#tee/practice/applications/http-time-1\">Assumption-labelled HTTP timing</a></p>"}]}]}}}
