# Computer Networks — all public teaching content

Exact source JSON: https://deep-learning-study-room.vercel.app/exports/cn.json


---

## M2 · Your CN M2 reading order

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/start--plan/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/start/plan

CN M2 · confirmed by your portion message

**Portion: Pure ALOHA onward in Unit 3, followed by complete Unit 4.** You first learn only the vocabulary and mathematics needed for this portion. Each numerical is fully solved; the question stays above its answer.

| Question | Marks | Rule |
| --- | --- | --- |
| Q1(a) | 2 | Compulsory |
| Q1(b) | 2 | Compulsory |
| Q2, Q3, Q4 | 3 each | Attempt any two |

**Attempted total = 2 + 2 + 3 + 3 = 10 marks.** The mock papers follow this pattern. No CN-specific time limit was supplied, so the guide does not invent one.

## Read in this order

1. Essential vocabulary and maths: bits, binary, powers, units, graphs.
2. Shared-channel access: Pure ALOHA, Slotted ALOHA, CSMA, CSMA/CD and CSMA/CA.
3. Switching → IPv4 → masks and subnetting → CIDR and VLSM.
4. IPv6 → ARP, RARP, DHCP → shortest paths → RIP and OSPF.
5. Matched actual PYQs → three M2 mocks → last-day revision.

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.

The current course code is **702AI0C023**. The two supplied older papers use **702AI0C007**; 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.

---

## M2 · Exactly what this M2 guide covers

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/start--map/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/start/map

CN M2 · confirmed by your portion message

| Current syllabus topic | Where to study |
| --- | --- |
| Pure ALOHA and Slotted ALOHA | [ALOHA](https://deep-learning-study-room.vercel.app/read/cn/m2/read/aloha--pure/) |
| CSMA/CD and collision avoidance | [CSMA and its variants](https://deep-learning-study-room.vercel.app/read/cn/m2/read/csma--sense/) |
| Switching techniques | [Switching](https://deep-learning-study-room.vercel.app/read/cn/m2/read/switching--types/) |
| IPv4 addressing, subnet mask and CIDR | [IPv4 and subnetting](https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv4--structure/) |
| IPv6 | [IPv6](https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv6--structure/) |
| ARP, RARP and DHCP | [Address mapping](https://deep-learning-study-room.vercel.app/read/cn/m2/read/mapping--arp/) |
| Shortest paths, Bellman–Ford, distance vector | [Routing foundations](https://deep-learning-study-room.vercel.app/read/cn/m2/read/routing--vocabulary/) |
| Link state, Dijkstra and OSPF | [Routing protocols](https://deep-learning-study-room.vercel.app/read/cn/m2/read/protocols--link-state/) |
| RIP | [RIP](https://deep-learning-study-room.vercel.app/read/cn/m2/read/protocols--rip/) |

The syllabus prints “CDMA/CA” in the random-access list. The standard collision-avoidance protocol corresponding to CSMA/CD is **CSMA/CA**, taught here. Code-division multiple access (CDMA) is a different channelization method; do not expand CSMA/CA as CDMA.

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.

---

## M2 · Device, link, frame, packet and router

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/basics--network/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/basics/network

Prerequisites for CN M2

**Definition.** A computer network is a collection of interconnected devices that exchange data using agreed communication rules called protocols.

**Simple meaning.** Device number bhejta hai; link usko carry karta hai; protocol batata hai kaise bhejna hai.

Swipe across the diagram to read its labels ↔

![One packet travels through several local links](https://deep-learning-study-room.vercel.app/cn/fig/journey.a5c52083fd.svg)

Diagram: One packet travels through several local links. Labels: One packet travels through several local links | One packet travels through several local links | 1. Host creates an IP packet | Destination IP identifies where the packet is going. | 2. Local frame carries it to the next hop | The next-hop MAC address is used on the current Ethernet link. | 3. Router selects another next hop | It uses the destination prefix and its forwarding table. | 4. A new local frame carries the packet onward | The link-layer addresses belong to the new link.

Device, link, frame, packet and router

## Understand it step by step

1. A **host** is an end device such as a laptop. A **link** is the wired or wireless connection over which data travels.
2. A **bit** is 0 or 1. A **frame** is the data-link unit carried over one link. A **packet** is the network-layer unit, such as an IP packet. A packet is normally carried inside a frame.
3. A **switch** forwards Ethernet frames within a local network using MAC addresses. A **router** forwards IP packets between networks using destination IP addresses.
4. 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.

#### Practical example

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.

### Practice question. Distinguish a frame, a packet and the role of a router. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Frame = ek link; packet = networks ke paar.

---

## M2 · Bits, bytes and rate: read the units first

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/basics--bits/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/basics/bits

Prerequisites for CN M2

**Definition.** A bit is one binary digit. A byte contains eight bits. A data rate measures the number of bits transmitted per second.

**Simple meaning.** Capital B = byte; small b = bit. Size aur speed ki units same karo.

## Understand it step by step

1. 1 byte = 8 bits. Therefore 100 bytes = 800 bits.
2. 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.
3. 1 second = 1,000 ms = 1,000,000 μs. A millisecond is 0.001 s; a microsecond is 0.000001 s.
4. 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.



$$
T_{\mathrm{frame}}=\frac{L}{R}
$$





$$
T_p=\frac{d}{v}
$$



#### Practical example

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.

### Practice question. Explain the difference between transmission delay and propagation delay. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Bits / bits-per-second = seconds; metres / metres-per-second = seconds.

---

## M2 · Delay example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/basics--delay-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/basics/delay-1

Prerequisites for CN M2

### 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. [3 practice marks]

#### Answer

## Given

| Quantity | Value |
| --- | --- |
| Frame length | 1000 bytes |
| Rate | 2 Mbps |
| Link length | 2,000 m |
| Signal speed | 200,000,000 m/s |

## To find

The two separate delays, in seconds and microseconds.

## Formula and why



$$
T_{\mathrm{frame}}=L/R
$$





$$
T_p=d/v
$$



L must be in bits and R in bits/s. Link length and signal speed must use the same distance unit.

## Step-by-step solution

#### Step 1. Convert bytes to bits

1000 × 8 = 8,000 bits.

#### Step 2. Convert the rate

2 × 1,000,000 = 2,000,000 bits/s.

#### Step 3. Divide for transmission time

8,000 ÷ 2,000,000 = 0.004000 s = 4000 μs.

#### Step 4. Divide for propagation time

2,000 ÷ 200,000,000 = 0.000010 s = 10 μs.

**Final answer:** Transmission = 4000 μs; propagation = 10 μs.

#### What this result means

These are different physical delays. Do not add a round-trip factor unless the question asks for a round trip.

---

## M2 · Delay example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/basics--delay-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/basics/delay-2

Prerequisites for CN M2

### 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. [3 practice marks]

#### Answer

## Given

| Quantity | Value |
| --- | --- |
| Frame length | 500 bytes |
| Rate | 10 Mbps |
| Link length | 10,000 m |
| Signal speed | 200,000,000 m/s |

## To find

The two separate delays, in seconds and microseconds.

## Formula and why



$$
T_{\mathrm{frame}}=L/R
$$





$$
T_p=d/v
$$



L must be in bits and R in bits/s. Link length and signal speed must use the same distance unit.

## Step-by-step solution

#### Step 1. Convert bytes to bits

500 × 8 = 4,000 bits.

#### Step 2. Convert the rate

10 × 1,000,000 = 10,000,000 bits/s.

#### Step 3. Divide for transmission time

4,000 ÷ 10,000,000 = 0.000400 s = 400 μs.

#### Step 4. Divide for propagation time

10,000 ÷ 200,000,000 = 0.000050 s = 50 μs.

**Final answer:** Transmission = 400 μs; propagation = 50 μs.

#### What this result means

These are different physical delays. Do not add a round-trip factor unless the question asks for a round trip.

---

## M2 · Delay example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/basics--delay-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/basics/delay-3

Prerequisites for CN M2

### 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. [3 practice marks]

#### Answer

## Given

| Quantity | Value |
| --- | --- |
| Frame length | 1500 bytes |
| Rate | 100 Mbps |
| Link length | 100,000 m |
| Signal speed | 250,000,000 m/s |

## To find

The two separate delays, in seconds and microseconds.

## Formula and why



$$
T_{\mathrm{frame}}=L/R
$$





$$
T_p=d/v
$$



L must be in bits and R in bits/s. Link length and signal speed must use the same distance unit.

## Step-by-step solution

#### Step 1. Convert bytes to bits

1500 × 8 = 12,000 bits.

#### Step 2. Convert the rate

100 × 1,000,000 = 100,000,000 bits/s.

#### Step 3. Divide for transmission time

12,000 ÷ 100,000,000 = 0.000120 s = 120 μs.

#### Step 4. Divide for propagation time

100,000 ÷ 250,000,000 = 0.000400 s = 400 μs.

**Final answer:** Transmission = 120 μs; propagation = 400 μs.

#### What this result means

These are different physical delays. Do not add a round-trip factor unless the question asks for a round trip.

---

## M2 · Binary place values: why the rightmost place is 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/basics--binary/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/basics/binary

Prerequisites for CN M2

**Definition.** 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).

**Simple meaning.** Right se 1 shuru karo; left jaate hi har box double: 1, 2, 4, 8…

Swipe across the diagram to read its labels ↔

![Binary positions: each move left doubles the value](https://deep-learning-study-room.vercel.app/cn/fig/binary.f629a09a71.svg)

Diagram: Binary positions: each move left doubles the value. Labels: Binary positions: each move left doubles the value | Binary positions: each move left doubles the value | 128 | pos 7 | 1 | 128 | 64 | pos 6 | 0 | 0 | 32 | pos 5 | 1 | 32 | 16 | pos 4 | 0 | 0 | 8 | pos 3 | 0 | 0 | 4 | pos 2 | 1 | 4 | 2 | pos 1 | 1 | 2 | 1 | pos 0 | 0 | 0 | Bits × place values → 128 + 0 + 32 + 0 + 0 + 4 + 2 + 0 = 166 | Rightmost: position 0 → 2⁰ = 1. Leading zeroes add nothing.

Binary place values: why the rightmost place is 1

## Understand it step by step

1. Decimal 352 means 3×100 + 5×10 + 2×1. The position supplies the value; the digit supplies the multiplier.
2. Binary follows the same idea, but the place values are 1, 2, 4, 8, 16, 32, 64, 128 instead of 1, 10, 100.
3. 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.
4. 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.

#### Practical example

In 00000101, the 1s sit above 4 and 1, so the value is 4+1 = 5. The 0 above 2 contributes 0, not 2.

### Practice question. Explain how a binary octet is converted to decimal. [3 practice marks]

#### Answer

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.

#### Practical example

In 00000101, the 1s sit above 4 and 1, so the value is 4+1 = 5. The 0 above 2 contributes 0, not 2.

**Yaad rakho:** Position ka weight likho; jahan 1 hai bas woh add karo.

---

## M2 · Binary to decimal · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/basics--binary-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/basics/binary-1

Prerequisites for CN M2

### Practice question. Convert the 8-bit binary number 00000101 to decimal. [3 practice marks]

#### Answer

## Given

Binary octet = `00000101`.

## To find

Its decimal value.

## Formula and why



$$
\text{Decimal value}=\sum_{k=0}^{7} b_k2^k
$$



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.

## Step-by-step solution

#### Step 1. Write all eight place values

| Position from right | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Place value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Bit | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 |

#### Step 2. Multiply each bit by its place value

| Place value | Bit | Product |
| --- | --- | --- |
| 128 | 0 | 128 × 0 = 0 |
| 64 | 0 | 64 × 0 = 0 |
| 32 | 0 | 32 × 0 = 0 |
| 16 | 0 | 16 × 0 = 0 |
| 8 | 0 | 8 × 0 = 0 |
| 4 | 1 | 4 × 1 = 4 |
| 2 | 0 | 2 × 0 = 0 |
| 1 | 1 | 1 × 1 = 1 |

#### Step 3. Add the products

0 + 0 + 0 + 0 + 0 + 4 + 0 + 1 = 5.

**Final answer:** 5

#### What this result means

The eight boxes encode one value: 5. Leading zeroes do not change it.

---

## M2 · Binary to decimal · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/basics--binary-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/basics/binary-2

Prerequisites for CN M2

### Practice question. Convert the 8-bit binary number 10100110 to decimal. [3 practice marks]

#### Answer

## Given

Binary octet = `10100110`.

## To find

Its decimal value.

## Formula and why



$$
\text{Decimal value}=\sum_{k=0}^{7} b_k2^k
$$



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.

## Step-by-step solution

#### Step 1. Write all eight place values

| Position from right | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Place value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Bit | 1 | 0 | 1 | 0 | 0 | 1 | 1 | 0 |

#### Step 2. Multiply each bit by its place value

| Place value | Bit | Product |
| --- | --- | --- |
| 128 | 1 | 128 × 1 = 128 |
| 64 | 0 | 64 × 0 = 0 |
| 32 | 1 | 32 × 1 = 32 |
| 16 | 0 | 16 × 0 = 0 |
| 8 | 0 | 8 × 0 = 0 |
| 4 | 1 | 4 × 1 = 4 |
| 2 | 1 | 2 × 1 = 2 |
| 1 | 0 | 1 × 0 = 0 |

#### Step 3. Add the products

128 + 0 + 32 + 0 + 0 + 4 + 2 + 0 = 166.

**Final answer:** 166

#### What this result means

The eight boxes encode one value: 166. Leading zeroes do not change it.

---

## M2 · Binary to decimal · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/basics--binary-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/basics/binary-3

Prerequisites for CN M2

### Practice question. Convert the 8-bit binary number 11100000 to decimal. [3 practice marks]

#### Answer

## Given

Binary octet = `11100000`.

## To find

Its decimal value.

## Formula and why



$$
\text{Decimal value}=\sum_{k=0}^{7} b_k2^k
$$



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.

## Step-by-step solution

#### Step 1. Write all eight place values

| Position from right | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Place value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Bit | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 |

#### Step 2. Multiply each bit by its place value

| Place value | Bit | Product |
| --- | --- | --- |
| 128 | 1 | 128 × 1 = 128 |
| 64 | 1 | 64 × 1 = 64 |
| 32 | 1 | 32 × 1 = 32 |
| 16 | 0 | 16 × 0 = 0 |
| 8 | 0 | 8 × 0 = 0 |
| 4 | 0 | 4 × 0 = 0 |
| 2 | 0 | 2 × 0 = 0 |
| 1 | 0 | 1 × 0 = 0 |

#### Step 3. Add the products

128 + 64 + 32 + 0 + 0 + 0 + 0 + 0 = 224.

**Final answer:** 224

#### What this result means

The eight boxes encode one value: 224. Leading zeroes do not change it.

---

## M2 · Binary to decimal · example 4

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/basics--binary-4/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/basics/binary-4

Prerequisites for CN M2

### Practice question. Convert the 8-bit binary number 11000000 to decimal. [3 practice marks]

#### Answer

## Given

Binary octet = `11000000`.

## To find

Its decimal value.

## Formula and why



$$
\text{Decimal value}=\sum_{k=0}^{7} b_k2^k
$$



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.

## Step-by-step solution

#### Step 1. Write all eight place values

| Position from right | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Place value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Bit | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |

#### Step 2. Multiply each bit by its place value

| Place value | Bit | Product |
| --- | --- | --- |
| 128 | 1 | 128 × 1 = 128 |
| 64 | 1 | 64 × 1 = 64 |
| 32 | 0 | 32 × 0 = 0 |
| 16 | 0 | 16 × 0 = 0 |
| 8 | 0 | 8 × 0 = 0 |
| 4 | 0 | 4 × 0 = 0 |
| 2 | 0 | 2 × 0 = 0 |
| 1 | 0 | 1 × 0 = 0 |

#### Step 3. Add the products

128 + 64 + 0 + 0 + 0 + 0 + 0 + 0 = 192.

**Final answer:** 192

#### What this result means

The eight boxes encode one value: 192. Leading zeroes do not change it.

---

## M2 · Decimal to binary · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/basics--decimal-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/basics/decimal-1

Prerequisites for CN M2

### Practice question. Write decimal 13 as an 8-bit binary octet. [3 practice marks]

#### Answer

## Given

Decimal value = 13.

## To find

Eight bits, including leading zeroes.

## Formula and why

Use the weights 128,64,32,16,8,4,2,1.

At each weight, write 1 and subtract if the remaining value is at least that weight; otherwise write 0.

## Step-by-step solution

#### Step 1. Choose each bit

| Weight | Remaining before | Bit decision | Remaining after |
| --- | --- | --- | --- |
| 128 | 13 | 0: too large | 13 |
| 64 | 13 | 0: too large | 13 |
| 32 | 13 | 0: too large | 13 |
| 16 | 13 | 0: too large | 13 |
| 8 | 13 | 1: subtract | 5 |
| 4 | 5 | 1: subtract | 1 |
| 2 | 1 | 0: too large | 1 |
| 1 | 1 | 1: subtract | 0 |

#### Step 2. Read bits in the same order

`00001101`.

#### Step 3. Reconstruct the decimal value

8 + 4 + 1 = 13.

**Final answer:** `00001101`

#### What this result means

Keep exactly eight positions when writing an IPv4 octet.

---

## M2 · Decimal to binary · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/basics--decimal-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/basics/decimal-2

Prerequisites for CN M2

### Practice question. Write decimal 192 as an 8-bit binary octet. [3 practice marks]

#### Answer

## Given

Decimal value = 192.

## To find

Eight bits, including leading zeroes.

## Formula and why

Use the weights 128,64,32,16,8,4,2,1.

At each weight, write 1 and subtract if the remaining value is at least that weight; otherwise write 0.

## Step-by-step solution

#### Step 1. Choose each bit

| Weight | Remaining before | Bit decision | Remaining after |
| --- | --- | --- | --- |
| 128 | 192 | 1: subtract | 64 |
| 64 | 64 | 1: subtract | 0 |
| 32 | 0 | 0: too large | 0 |
| 16 | 0 | 0: too large | 0 |
| 8 | 0 | 0: too large | 0 |
| 4 | 0 | 0: too large | 0 |
| 2 | 0 | 0: too large | 0 |
| 1 | 0 | 0: too large | 0 |

#### Step 2. Read bits in the same order

`11000000`.

#### Step 3. Reconstruct the decimal value

128 + 64 = 192.

**Final answer:** `11000000`

#### What this result means

Keep exactly eight positions when writing an IPv4 octet.

---

## M2 · Decimal to binary · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/basics--decimal-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/basics/decimal-3

Prerequisites for CN M2

### Practice question. Write decimal 224 as an 8-bit binary octet. [3 practice marks]

#### Answer

## Given

Decimal value = 224.

## To find

Eight bits, including leading zeroes.

## Formula and why

Use the weights 128,64,32,16,8,4,2,1.

At each weight, write 1 and subtract if the remaining value is at least that weight; otherwise write 0.

## Step-by-step solution

#### Step 1. Choose each bit

| Weight | Remaining before | Bit decision | Remaining after |
| --- | --- | --- | --- |
| 128 | 224 | 1: subtract | 96 |
| 64 | 96 | 1: subtract | 32 |
| 32 | 32 | 1: subtract | 0 |
| 16 | 0 | 0: too large | 0 |
| 8 | 0 | 0: too large | 0 |
| 4 | 0 | 0: too large | 0 |
| 2 | 0 | 0: too large | 0 |
| 1 | 0 | 0: too large | 0 |

#### Step 2. Read bits in the same order

`11100000`.

#### Step 3. Reconstruct the decimal value

128 + 64 + 32 = 224.

**Final answer:** `11100000`

#### What this result means

Keep exactly eight positions when writing an IPv4 octet.

---

## M2 · Powers of two, percentages and the meaning of e

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/basics--powers/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/basics/powers

Prerequisites for CN M2

**Definition.** A power describes repeated multiplication. The number e is approximately 2.718281828; e raised to a negative power is a positive number below 1.

**Simple meaning.** 2 ki power bits ke combinations batati hai; e ki negative power ALOHA ki collision probability mein aati hai.

## Understand it step by step

1. 2⁰ = 1; 2¹ = 2; 2² = 4; 2³ = 8. Each additional binary bit doubles the number of combinations. Six host bits give 2⁶ = 64 addresses.
2. A negative exponent means reciprocal: e⁻¹ = 1/e ≈ 0.367879. It does not mean −e.
3. A fraction 0.2 corresponds to 20%: multiply by 100. To convert 20% to a fraction, divide by 100.
4. For ALOHA, calculate the exponent first, then e raised to that exponent, then multiply by G. Keep at least six significant figures during working.

| Power | Value |
| --- | --- |
| 20 | 1 |
| 21 | 2 |
| 22 | 4 |
| 23 | 8 |
| 24 | 16 |
| 25 | 32 |
| 26 | 64 |
| 27 | 128 |
| 28 | 256 |
| 29 | 512 |
| 210 | 1024 |
| 211 | 2048 |
| 212 | 4096 |
| 213 | 8192 |
| 214 | 16384 |
| 215 | 32768 |
| 216 | 65536 |

#### Practical example

At G=0.5 in Pure ALOHA, −2G = −1. Hence e⁻²ᴳ = e⁻¹ = 0.367879 and 0.5×0.367879 = 0.183940, or 18.394%.

### Practice question. Explain why 2⁶ gives 64 combinations and express 0.18394 as a percentage. [3 practice marks]

#### Answer

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%.

#### Practical example

At G=0.5 in Pure ALOHA, −2G = −1. Hence e⁻²ᴳ = e⁻¹ = 0.367879 and 0.5×0.367879 = 0.183940, or 18.394%.

**Yaad rakho:** Minus exponent andar hai; final exponential positive rehta hai.

---

## M2 · Calculator steps for ALOHA and subnetting

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/basics--calculator/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/basics/calculator

Prerequisites for CN M2

Use the normal calculation mode. Exact menu names vary across fx-991ES-family models; the mathematics below is the same. The **eˣ** function is usually the shifted function of **ln**. The **EXP/×10ˣ** key enters scientific notation and is not eˣ.

## Example 1 · e to a negative power

1. Enter eˣ with exponent (−1). Use the negative-number key or a clear parenthesised negative exponent.
2. Evaluate: e⁻¹ ≈ 0.3678794412.
3. Multiply by 0.5: 0.1839397206. Multiply by 100 only if a percentage is requested.

## Example 2 · host combinations

1. For /26, subtract: 32−26 = 6 host bits.
2. Enter 2 raised to 6: 64 total addresses.
3. If ordinary usable host addresses are asked, subtract 2: 62.

## Example 3 · frame time

1. A 200-bit frame at 200 kbps means 200/(200×10³).
2. Use parentheses around the denominator. Result: 0.001 seconds.
3. Multiply by 1,000 to express milliseconds: 1 ms.

**Yaad rakho:** eˣ aur ×10ˣ alag keys/functions hain. Brackets se denominator safe rakho.

---

## M2 · How to read a routing graph

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/basics--graphs/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/basics/graphs

Prerequisites for CN M2

**Definition.** 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.

**Simple meaning.** Circle router hai, line link hai, number us link ka cost. Arrow ulta mat chalna.

Swipe across the diagram to read its labels ↔

![Directed path cost: arrows determine permitted travel](https://deep-learning-study-room.vercel.app/cn/fig/graph-basics.ebd9ed3bc9.svg)

Diagram: Directed path cost: arrows determine permitted travel. Labels: Directed path cost: arrows determine permitted travel | Directed path cost: arrows determine permitted travel | A | B | C | 4 | 3 | 10 | Direct A→C = 10; via B = 4 + 3 = 7. Choose cost 7. | No reverse travel is implied by a directed arrow.

How to read a routing graph

## Understand it step by step

1. 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.
2. The cost of a path is the sum of its edge costs. A→B→C with costs 4 and 3 has total 7.
3. A tentative distance is the best route found so far; it can still improve. A predecessor records the previous vertex on that route.
4. ∞ means no route has been discovered yet. For arithmetic in the table, ∞ plus a finite number stays ∞.

#### Practical example

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.

### Practice question. What is the difference between hop count and a weighted path cost? [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Shortest = smallest cost, zaroori nahi fewest arrows.

---

## M2 · Pure ALOHA: transmit first, retry if necessary

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/aloha--pure/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/aloha/pure

Unit 3 · confirmed M2 starting point

**Definition.** 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.

**Simple meaning.** Frame ready → bhej do. Collision hua → random wait karke retry.

Swipe across the diagram to read its labels ↔

![Pure ALOHA: arbitrary start times can overlap](https://deep-learning-study-room.vercel.app/cn/fig/pure-aloha.8aa7732ee2.svg)

Diagram: Pure ALOHA: arbitrary start times can overlap. Labels: Pure ALOHA: arbitrary start times can overlap | Pure ALOHA: arbitrary start times can overlap | Station A | Station B | Frame A | Frame B | Overlap: both fail in the basic collision model | A retry begins after a random waiting interval.

Pure ALOHA: transmit first, retry if necessary

## Understand it step by step

1. Several stations share the same channel. Pure ALOHA does not first check whether the channel is idle.
2. A station transmits immediately. In the basic collision-channel model, any overlapping frame makes the involved frames unsuccessful.
3. 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.
4. The station waits a random backoff time and retries. If every station used the same fixed delay, they could collide again together.

#### Practical example

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.

### Practice question. Explain Pure ALOHA and state its main limitation. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Pure = kisi bhi time start; retry ka wait random.

---

## M2 · Why Pure ALOHA has a 2T vulnerable period

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/aloha--vulnerable/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/aloha/vulnerable

Unit 3 · confirmed M2 starting point

**Definition.** The vulnerable period is the interval of start times of other frames that would cause a collision with a chosen frame.

**Simple meaning.** Apne frame se ek frame-time pehle start hua frame bhi takra sakta hai, aur baad mein bhi.

Swipe across the diagram to read its labels ↔

![Pure ALOHA: interfering starts from −T to +T](https://deep-learning-study-room.vercel.app/cn/fig/vulnerable.e2a01a5ab7.svg)

Diagram: Pure ALOHA: interfering starts from −T to +T. Labels: Pure ALOHA: interfering starts from −T to +T | Pure ALOHA: interfering starts from −T to +T | −T | 0 | +T | Our frame: 0 to T | Vulnerable start-time interval length = 2T

Why Pure ALOHA has a 2T vulnerable period

## Understand it step by step

1. Let your frame start at time 0 and finish at T. All frames have the same transmission duration T.
2. Another frame starting between −T and 0 is still being transmitted when your frame begins.
3. Another frame starting between 0 and T begins before your frame ends.
4. Therefore interfering start times occupy an interval of length 2T. Exact boundary contact is treated as non-overlap in this idealized timing model.

#### Practical example

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.

### Practice question. Why is the vulnerable time of Pure ALOHA twice the frame transmission time? [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Pure: before T + after T = 2T.

---

## M2 · Slotted ALOHA: starts only at slot boundaries

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/aloha--slotted/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/aloha/slotted

Unit 3 · confirmed M2 starting point

**Definition.** 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.

**Simple meaning.** Frame ready hai tab bhi next slot ki start-line ka wait karo.

Swipe across the diagram to read its labels ↔

![Slotted ALOHA: one frame duration per slot](https://deep-learning-study-room.vercel.app/cn/fig/slotted-aloha.fbfbef9647.svg)

Diagram: Slotted ALOHA: one frame duration per slot. Labels: Slotted ALOHA: one frame duration per slot | Slotted ALOHA: one frame duration per slot | 0T | 1T | 2T | 3T | 4T | 5T | Station A | Station B | A1 | A2 | B1 | B2 | A2 and B1 choose the same slot: collision. Starts stay aligned.

Slotted ALOHA: starts only at slot boundaries

## Understand it step by step

1. All stations agree on slot boundaries; time synchronization is required.
2. A station with a frame waits for a slot boundary before starting. A slot can be idle, successful or a collision.
3. Exactly one station transmitting in a slot produces success in the ideal model. Two or more simultaneous attempts collide.
4. Frames cannot partially overlap adjacent slots under the assumptions. The vulnerable interval is T instead of 2T. Randomized retries are still needed.

#### Practical example

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.

### Practice question. Compare Pure ALOHA and Slotted ALOHA. [3 practice marks]

#### Answer

| Feature | Pure | Slotted |
| --- | --- | --- |
| Start time | Any time | Slot boundary only |
| Synchronization | No common slots required | Required |
| Vulnerable period | 2T | T |
| Maximum S | 1/(2e) ≈ 0.184 | 1/e ≈ 0.368 |
| G at maximum | 0.5 | 1 |

#### Practical example

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.

**Yaad rakho:** Slotted = aligned starts; collision risk half-window, not zero.

---

## M2 · G, S and throughput: which number are you finding?

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/aloha--formulas/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/aloha/formulas

Unit 3 · confirmed M2 starting point

**Definition.** 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.

**Simple meaning.** G = kitne attempts; S = unmein successful output per frame-time. Dono same nahi.

Swipe across the diagram to read its labels ↔

![ALOHA: too many attempts eventually reduce successful output](https://deep-learning-study-room.vercel.app/cn/fig/aloha-curve.58889b65f2.svg)

Diagram: ALOHA: too many attempts eventually reduce successful output. Labels: ALOHA: too many attempts eventually reduce successful output | ALOHA: too many attempts eventually reduce successful output | 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 0.1 | 0.2 | 0.3 | 0.4 | Slotted max ≈ 0.368 at G=1 | Pure max ≈ 0.184 at G=0.5 | G: aggregate attempts per frame time | S

G, S and throughput: which number are you finding?

## Understand it step by step

1. 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.
2. 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.
3. Pure ALOHA uses S=Ge⁻²ᴳ; Slotted ALOHA uses S=Ge⁻ᴳ. Do not use arrival rate in frames/s directly in the exponent.
4. 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.
5. 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.



$$
T=L/R,\qquad G=\lambda T
$$





$$
S_{\mathrm{pure}}=G e^{-2G}
$$





$$
S_{\mathrm{slotted}}=G e^{-G}
$$





$$
\text{successful frames/s}=S/T
$$





$$
\text{successful frame bits/s}=SR
$$



#### Practical example

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.

### Practice question. Write the throughput expressions of Pure and Slotted ALOHA, defining G and S. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** P mein pair: −2G; S mein single: −G.

## Important conversion in the faculty examples

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 ≈ **183.94 frames/s**.

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 **151.63 frames/s**. Use the definitions and units above.

---

## M2 · Pure ALOHA · load example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/aloha--pure-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/aloha/pure-1

Unit 3 · confirmed M2 starting point

### Practice question. In a Pure ALOHA system, the offered load is G=0.25. Find normalized throughput, percentage throughput, and the theoretical maximum. [3 practice marks]

#### Answer

## Given

Protocol = Pure ALOHA; G = 0.25 attempts/frame time.

## To find

S, 100S and the maximum possible S.

## Formula and why



$$
S=G e^{-2G}
$$



Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.

## Step-by-step solution

#### Step 1. Calculate the exponent

−2 × 0.25 = -0.5.

#### Step 2. Evaluate the exponential



$$
e^{-0.5} \approx 0.606530660
$$



#### Step 3. Multiply by G

S = 0.25 × 0.606530660 ≈ 0.151632665 successful frames/frame time.

#### Step 4. Convert to percentage

0.151632665 × 100 ≈ 15.1633%.

#### Step 5. State the maximum separately

The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.

**Final answer:** S ≈ 0.151633; percentage ≈ 15.1633%; Smax ≈ 0.183940 at G=0.5.

#### What this result means

A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.

---

## M2 · Pure ALOHA · load example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/aloha--pure-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/aloha/pure-2

Unit 3 · confirmed M2 starting point

### Practice question. In a Pure ALOHA system, the offered load is G=0.5. Find normalized throughput, percentage throughput, and the theoretical maximum. [3 practice marks]

#### Answer

## Given

Protocol = Pure ALOHA; G = 0.5 attempts/frame time.

## To find

S, 100S and the maximum possible S.

## Formula and why



$$
S=G e^{-2G}
$$



Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.

## Step-by-step solution

#### Step 1. Calculate the exponent

−2 × 0.5 = -1.

#### Step 2. Evaluate the exponential



$$
e^{-1} \approx 0.367879441
$$



#### Step 3. Multiply by G

S = 0.5 × 0.367879441 ≈ 0.183939721 successful frames/frame time.

#### Step 4. Convert to percentage

0.183939721 × 100 ≈ 18.3940%.

#### Step 5. State the maximum separately

The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.

**Final answer:** S ≈ 0.183940; percentage ≈ 18.3940%; Smax ≈ 0.183940 at G=0.5.

#### What this result means

A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.

---

## M2 · Pure ALOHA · load example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/aloha--pure-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/aloha/pure-3

Unit 3 · confirmed M2 starting point

### Practice question. In a Pure ALOHA system, the offered load is G=1. Find normalized throughput, percentage throughput, and the theoretical maximum. [3 practice marks]

#### Answer

## Given

Protocol = Pure ALOHA; G = 1 attempts/frame time.

## To find

S, 100S and the maximum possible S.

## Formula and why



$$
S=G e^{-2G}
$$



Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.

## Step-by-step solution

#### Step 1. Calculate the exponent

−2 × 1 = -2.

#### Step 2. Evaluate the exponential



$$
e^{-2} \approx 0.135335283
$$



#### Step 3. Multiply by G

S = 1 × 0.135335283 ≈ 0.135335283 successful frames/frame time.

#### Step 4. Convert to percentage

0.135335283 × 100 ≈ 13.5335%.

#### Step 5. State the maximum separately

The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.

**Final answer:** S ≈ 0.135335; percentage ≈ 13.5335%; Smax ≈ 0.183940 at G=0.5.

#### What this result means

A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.

---

## M2 · Slotted ALOHA · load example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/aloha--slotted-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/aloha/slotted-1

Unit 3 · confirmed M2 starting point

### Practice question. In a Slotted ALOHA system, the offered load is G=0.25. Find normalized throughput, percentage throughput, and the theoretical maximum. [3 practice marks]

#### Answer

## Given

Protocol = Slotted ALOHA; G = 0.25 attempts/frame time.

## To find

S, 100S and the maximum possible S.

## Formula and why



$$
S=G e^{-G}
$$



Select the formula from the protocol name. The exponent is −G because Slotted ALOHA has a T vulnerable period.

## Step-by-step solution

#### Step 1. Calculate the exponent

−1 × 0.25 = -0.25.

#### Step 2. Evaluate the exponential



$$
e^{-0.25} \approx 0.778800783
$$



#### Step 3. Multiply by G

S = 0.25 × 0.778800783 ≈ 0.194700196 successful frames/frame time.

#### Step 4. Convert to percentage

0.194700196 × 100 ≈ 19.4700%.

#### Step 5. State the maximum separately

The maximum is 1/(1e) ≈ 0.367879 = 36.7879%, at G=1.

**Final answer:** S ≈ 0.194700; percentage ≈ 19.4700%; Smax ≈ 0.367879 at G=1.

#### What this result means

A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.

---

## M2 · Slotted ALOHA · load example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/aloha--slotted-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/aloha/slotted-2

Unit 3 · confirmed M2 starting point

### Practice question. In a Slotted ALOHA system, the offered load is G=1. Find normalized throughput, percentage throughput, and the theoretical maximum. [3 practice marks]

#### Answer

## Given

Protocol = Slotted ALOHA; G = 1 attempts/frame time.

## To find

S, 100S and the maximum possible S.

## Formula and why



$$
S=G e^{-G}
$$



Select the formula from the protocol name. The exponent is −G because Slotted ALOHA has a T vulnerable period.

## Step-by-step solution

#### Step 1. Calculate the exponent

−1 × 1 = -1.

#### Step 2. Evaluate the exponential



$$
e^{-1} \approx 0.367879441
$$



#### Step 3. Multiply by G

S = 1 × 0.367879441 ≈ 0.367879441 successful frames/frame time.

#### Step 4. Convert to percentage

0.367879441 × 100 ≈ 36.7879%.

#### Step 5. State the maximum separately

The maximum is 1/(1e) ≈ 0.367879 = 36.7879%, at G=1.

**Final answer:** S ≈ 0.367879; percentage ≈ 36.7879%; Smax ≈ 0.367879 at G=1.

#### What this result means

A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.

---

## M2 · Slotted ALOHA · load example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/aloha--slotted-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/aloha/slotted-3

Unit 3 · confirmed M2 starting point

### Practice question. In a Slotted ALOHA system, the offered load is G=2. Find normalized throughput, percentage throughput, and the theoretical maximum. [3 practice marks]

#### Answer

## Given

Protocol = Slotted ALOHA; G = 2 attempts/frame time.

## To find

S, 100S and the maximum possible S.

## Formula and why



$$
S=G e^{-G}
$$



Select the formula from the protocol name. The exponent is −G because Slotted ALOHA has a T vulnerable period.

## Step-by-step solution

#### Step 1. Calculate the exponent

−1 × 2 = -2.

#### Step 2. Evaluate the exponential



$$
e^{-2} \approx 0.135335283
$$



#### Step 3. Multiply by G

S = 2 × 0.135335283 ≈ 0.270670566 successful frames/frame time.

#### Step 4. Convert to percentage

0.270670566 × 100 ≈ 27.0671%.

#### Step 5. State the maximum separately

The maximum is 1/(1e) ≈ 0.367879 = 36.7879%, at G=1.

**Final answer:** S ≈ 0.270671; percentage ≈ 27.0671%; Smax ≈ 0.367879 at G=1.

#### What this result means

A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.

---

## M2 · Frames/s to throughput · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/aloha--rate-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/aloha/rate-1

Unit 3 · confirmed M2 starting point

### 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. [3 practice marks]

#### Answer

## Given

| Symbol | Given |
| --- | --- |
| L | 200 bits |
| R | 200 kbps = 200,000 bits/s |
| λ | 1000 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-2G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 200/200,000 = 0.001 s = 1 ms.

#### Step 2. Offered load

G = 1000 × 0.001 = 1 attempts/frame time.

#### Step 3. Exponent and exponential

−2G = -2; e to that power ≈ 0.135335283.

#### Step 4. Normalized throughput

S = 1 × 0.135335283 ≈ 0.135335283.

#### Step 5. Successful frames each second

S/T = 0.135335283/0.001 ≈ 135.335283 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.135335283 × 200,000 ≈ 27067.056647 bits/s ≈ 27.067057 kbps.

**Final answer:** G=1, S≈0.135335, successful rate≈135.335 frames/s = 27.067 kbps.

#### What this result means

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 λ.

---

## M2 · Frames/s to throughput · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/aloha--rate-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/aloha/rate-2

Unit 3 · confirmed M2 starting point

### 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. [3 practice marks]

#### Answer

## Given

| Symbol | Given |
| --- | --- |
| L | 200 bits |
| R | 200 kbps = 200,000 bits/s |
| λ | 500 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-2G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 200/200,000 = 0.001 s = 1 ms.

#### Step 2. Offered load

G = 500 × 0.001 = 0.5 attempts/frame time.

#### Step 3. Exponent and exponential

−2G = -1; e to that power ≈ 0.367879441.

#### Step 4. Normalized throughput

S = 0.5 × 0.367879441 ≈ 0.183939721.

#### Step 5. Successful frames each second

S/T = 0.183939721/0.001 ≈ 183.939721 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.183939721 × 200,000 ≈ 36787.944117 bits/s ≈ 36.787944 kbps.

**Final answer:** G=0.5, S≈0.183940, successful rate≈183.940 frames/s = 36.788 kbps.

#### What this result means

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 λ.

---

## M2 · Frames/s to throughput · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/aloha--rate-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/aloha/rate-3

Unit 3 · confirmed M2 starting point

### 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. [3 practice marks]

#### Answer

## Given

| Symbol | Given |
| --- | --- |
| L | 200 bits |
| R | 200 kbps = 200,000 bits/s |
| λ | 250 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-2G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 200/200,000 = 0.001 s = 1 ms.

#### Step 2. Offered load

G = 250 × 0.001 = 0.25 attempts/frame time.

#### Step 3. Exponent and exponential

−2G = -0.5; e to that power ≈ 0.606530660.

#### Step 4. Normalized throughput

S = 0.25 × 0.606530660 ≈ 0.151632665.

#### Step 5. Successful frames each second

S/T = 0.151632665/0.001 ≈ 151.632665 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.151632665 × 200,000 ≈ 30326.532986 bits/s ≈ 30.326533 kbps.

**Final answer:** G=0.25, S≈0.151633, successful rate≈151.633 frames/s = 30.327 kbps.

#### What this result means

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 λ.

---

## M2 · Frames/s to throughput · example 4

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/aloha--rate-4/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/aloha/rate-4

Unit 3 · confirmed M2 starting point

### 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. [3 practice marks]

#### Answer

## Given

| Symbol | Given |
| --- | --- |
| L | 400 bits |
| R | 200 kbps = 200,000 bits/s |
| λ | 500 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 400/200,000 = 0.002 s = 2 ms.

#### Step 2. Offered load

G = 500 × 0.002 = 1 attempts/frame time.

#### Step 3. Exponent and exponential

−1G = -1; e to that power ≈ 0.367879441.

#### Step 4. Normalized throughput

S = 1 × 0.367879441 ≈ 0.367879441.

#### Step 5. Successful frames each second

S/T = 0.367879441/0.002 ≈ 183.939721 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.367879441 × 200,000 ≈ 73575.888234 bits/s ≈ 73.575888 kbps.

**Final answer:** G=1, S≈0.367879, successful rate≈183.940 frames/s = 73.576 kbps.

#### What this result means

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 λ.

---

## M2 · Frames/s to throughput · example 5

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/aloha--rate-5/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/aloha/rate-5

Unit 3 · confirmed M2 starting point

### 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. [3 practice marks]

#### Answer

## Given

| Symbol | Given |
| --- | --- |
| L | 1600 bits |
| R | 800 kbps = 800,000 bits/s |
| λ | 250 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 1600/800,000 = 0.002 s = 2 ms.

#### Step 2. Offered load

G = 250 × 0.002 = 0.5 attempts/frame time.

#### Step 3. Exponent and exponential

−1G = -0.5; e to that power ≈ 0.606530660.

#### Step 4. Normalized throughput

S = 0.5 × 0.606530660 ≈ 0.303265330.

#### Step 5. Successful frames each second

S/T = 0.303265330/0.002 ≈ 151.632665 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.303265330 × 800,000 ≈ 242612.263885 bits/s ≈ 242.612264 kbps.

**Final answer:** G=0.5, S≈0.303265, successful rate≈151.633 frames/s = 242.612 kbps.

#### What this result means

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 λ.

---

## M2 · Why the two maximum throughputs differ

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/aloha--maxima/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/aloha/maxima

Unit 3 · confirmed M2 starting point

A small offered load leaves many opportunities unused. A very large load creates many collisions. The best point balances those effects.

## Pure ALOHA



$$
\frac{dS}{dG}=e^{-2G}(1-2G)
$$



1. The exponential is positive. For the slope to be zero, 1−2G must be zero.
2. 1−2G=0 gives G=0.5.
3. Substitute: S=0.5e⁻¹=1/(2e)≈0.18394. The slope is positive before G=0.5 and negative after it.

## Slotted ALOHA



$$
\frac{dS}{dG}=e^{-G}(1-G)
$$



1. Set 1−G=0, giving G=1.
2. Substitute: S=e⁻¹=1/e≈0.367879.
3. The slope changes from positive to negative, so this is the maximum.

**Yaad rakho:** Pure optimum: G half, maximum half of 1/e. Slotted optimum: G one, maximum 1/e.

---

## M2 · Carrier sensing: why listening does not remove every collision

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/csma--sense/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/csma/sense

Unit 3 · after ALOHA

**Definition.** Carrier Sense Multiple Access (CSMA) requires a station to sense the shared medium before transmitting.

**Simple meaning.** Pehle suno, phir bhejo; lekin door ka signal pahunchne mein time leta hai.

Swipe across the diagram to read its labels ↔

![An idle observation is only local](https://deep-learning-study-room.vercel.app/cn/fig/csma-propagation.df55cdec46.svg)

Diagram: An idle observation is only local. Labels: An idle observation is only local | An idle observation is only local | 1. A starts transmitting | Its signal begins moving toward B. | 2. Before A’s signal arrives, B hears silence | B may start a transmission under its access rule. | 3. The signals overlap | Propagation delay permits a collision despite carrier sensing.

Carrier sensing: why listening does not remove every collision

## Understand it step by step

1. If the channel is busy, the station follows its waiting/persistence rule. If idle, it may transmit according to that rule.
2. The channel state is observed locally. A distant station may have started, but its signal has not arrived yet because propagation takes time.
3. Two stations can therefore both observe an idle medium and begin transmitting. CSMA reduces avoidable collisions but does not guarantee zero collisions.

#### Practical example

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.

### Practice question. Why can collisions occur in CSMA even after a station senses an idle channel? [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Idle yahan hai; remote signal abhi raste mein ho sakta hai.

---

## M2 · 1-persistent, non-persistent and p-persistent CSMA

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/csma--persistence/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/csma/persistence

Unit 3 · after ALOHA

**Definition.** Persistence specifies how a station behaves after observing that the medium is busy or becomes idle.

**Simple meaning.** 1 = turant; non = random wait; p = probability ke basis pe start.

Swipe across the diagram to read its labels ↔

![CSMA persistence: what happens after carrier sensing?](https://deep-learning-study-room.vercel.app/cn/fig/persistence.528dafcd8a.svg)

Diagram: CSMA persistence: what happens after carrier sensing?. Labels: CSMA persistence: what happens after carrier sensing? | CSMA persistence: what happens after carrier sensing? | 1-persistent | Busy: keep listening. Idle: transmit immediately. | Non-persistent | Busy: random wait, then sense again. Idle: transmit. | p-persistent | Eligible idle slot: transmit with probability p; defer with probability 1−p.

1-persistent, non-persistent and p-persistent CSMA

## Understand it step by step

1. 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.
2. 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.
3. 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.

| Rule | When idle | When busy | Trade-off |
| --- | --- | --- | --- |
| 1-persistent | Transmit immediately | Keep listening; transmit as soon as idle | Low idle delay, but waiting stations may start together |
| Non-persistent | Transmit | Wait a random time, then sense again | Less synchronized contention; may leave avoidable idle time |
| p-persistent (slotted) | Transmit with probability p; defer a slot with probability 1−p | Wait until available, then resume the probabilistic slot rule | Controls contention; needs slots and a choice of p |

#### Practical example

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.

### Practice question. Compare the three persistence strategies in CSMA. [3 practice marks]

#### Answer

| Rule | When idle | When busy | Trade-off |
| --- | --- | --- | --- |
| 1-persistent | Transmit immediately | Keep listening; transmit as soon as idle | Low idle delay, but waiting stations may start together |
| Non-persistent | Transmit | Wait a random time, then sense again | Less synchronized contention; may leave avoidable idle time |
| p-persistent (slotted) | Transmit with probability p; defer a slot with probability 1−p | Wait until available, then resume the probabilistic slot rule | Controls contention; needs slots and a choice of p |

#### Practical example

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.

**Yaad rakho:** 1 = start now; non = wait then listen; p = chance per idle slot.

---

## M2 · CSMA/CD: detect a collision while transmitting

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/csma--cd/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/csma/cd

Unit 3 · after ALOHA

**Definition.** CSMA with Collision Detection monitors the medium during transmission, aborts a detected collision and retries after a randomized backoff.

**Simple meaning.** CD = takkar detect hui toh transmission rok do.

Swipe across the diagram to read its labels ↔

![CSMA/CD: sender must still be sending after a round trip](https://deep-learning-study-room.vercel.app/cn/fig/collision-roundtrip.42358ec7bf.svg)

Diagram: CSMA/CD: sender must still be sending after a round trip. Labels: CSMA/CD: sender must still be sending after a round trip | CSMA/CD: sender must still be sending after a round trip | Station A | Station B | Signal travels: Tp | Collision indication returns: Tp | Worst-case timing bound: Tframe ≥ 2Tp, so Lmin ≥ 2RTp

CSMA/CD: detect a collision while transmitting

## Understand it step by step

1. Sense the channel. In traditional shared half-duplex Ethernet, begin transmission when permitted by the access rule.
2. Continue monitoring while transmitting. If a collision is detected, send the collision/jam indication and abort the current frame.
3. Choose a random delay using binary exponential backoff; then attempt again subject to the access rules.
4. The sender must still be transmitting when a worst-case collision indication returns. Hence the ideal timing requirement is Tframe ≥ 2Tp.
5. Modern switched full-duplex Ethernet links do not use collision-based CSMA/CD access. Keep the historical/shared-medium assumptions explicit.



$$
T_{\mathrm{frame}}\geq 2T_p
$$





$$
L_{\min}\geq 2RT_p
$$



#### Practical example

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.

### Practice question. Explain CSMA/CD and the reason for a minimum frame size. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Detect karna hai toh sender tab tak bhej raha hona chahiye.

---

## M2 · Collision detection · minimum size 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/csma--minframe-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/csma/minframe-1

Unit 3 · after ALOHA

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

R=10 Mbps; Tp=25.6 μs.

## To find

Lmin in bits and the minimum whole-byte length.

## Formula and why



$$
L_{\min}=\lceil 2RT_p\rceil
$$



The frame must last at least a round trip. Convert Mbps to bits/s and μs to seconds before multiplying.

## Step-by-step solution

#### Step 1. Convert the quantities

R=10,000,000 bits/s; Tp=0.0000256 s.

#### Step 2. Find round-trip delay

2Tp=2×25.6=51.2 μs.

#### Step 3. Multiply rate by duration

Lmin=2×10,000,000×0.0000256=512 bits.

#### Step 4. Convert bits to whole bytes

512/8=64; round upward if needed → 64 bytes.

**Final answer:** 512 bits, or at least 64 whole bytes.

#### What this result means

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.

---

## M2 · Collision detection · minimum size 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/csma--minframe-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/csma/minframe-2

Unit 3 · after ALOHA

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

R=100 Mbps; Tp=2 μs.

## To find

Lmin in bits and the minimum whole-byte length.

## Formula and why



$$
L_{\min}=\lceil 2RT_p\rceil
$$



The frame must last at least a round trip. Convert Mbps to bits/s and μs to seconds before multiplying.

## Step-by-step solution

#### Step 1. Convert the quantities

R=100,000,000 bits/s; Tp=0.000002 s.

#### Step 2. Find round-trip delay

2Tp=2×2=4 μs.

#### Step 3. Multiply rate by duration

Lmin=2×100,000,000×0.000002=400 bits.

#### Step 4. Convert bits to whole bytes

400/8=50; round upward if needed → 50 bytes.

**Final answer:** 400 bits, or at least 50 whole bytes.

#### What this result means

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.

---

## M2 · Collision detection · minimum size 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/csma--minframe-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/csma/minframe-3

Unit 3 · after ALOHA

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

R=10 Mbps; Tp=10 μs.

## To find

Lmin in bits and the minimum whole-byte length.

## Formula and why



$$
L_{\min}=\lceil 2RT_p\rceil
$$



The frame must last at least a round trip. Convert Mbps to bits/s and μs to seconds before multiplying.

## Step-by-step solution

#### Step 1. Convert the quantities

R=10,000,000 bits/s; Tp=0.00001 s.

#### Step 2. Find round-trip delay

2Tp=2×10=20 μs.

#### Step 3. Multiply rate by duration

Lmin=2×10,000,000×0.00001=200 bits.

#### Step 4. Convert bits to whole bytes

200/8=25; round upward if needed → 25 bytes.

**Final answer:** 200 bits, or at least 25 whole bytes.

#### What this result means

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.

---

## M2 · Binary exponential backoff

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/csma--backoff/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/csma/backoff

Unit 3 · after ALOHA

**Definition.** Binary exponential backoff enlarges the range of possible random waiting slots after repeated collisions, reducing the chance of the same stations colliding again.

**Simple meaning.** Collision zyada → random wait ka range bada.

## Understand it step by step

1. Let n be the collision count for the current frame. In classic Ethernet, use k=min(n,10).
2. Choose an integer K uniformly from 0 through 2ᵏ−1. Both endpoints belong to the range.
3. Wait K slot times before the permitted retry. A larger range does not force every station to wait longer; K may still be zero.
4. 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.



$$
k=\min(n,10),\qquad K\in\{0,1,\ldots,2^k-1\}
$$





$$
T_{\mathrm{backoff}}=K T_{\mathrm{slot}}
$$



#### Practical example

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.

### Practice question. Describe binary exponential backoff and give the possible K values after three collisions. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** 2ᵏ choices hain, isliye last value 2ᵏ−1.

---

## M2 · Backoff · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/csma--backoff-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/csma/backoff-1

Unit 3 · after ALOHA

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

n=2; K=3; Tslot=51.2 μs.

## To find

The random range and the delay for the selected K.

## Formula and why



$$
k=\min(n,10),\quad K_{\max}=2^k-1
$$





$$
T=KT_{\mathrm{slot}}
$$



Count starts at zero for K. The selected K must fit the allowed range.

## Step-by-step solution

#### Step 1. Determine exponent

k=min(2,10)=2.

#### Step 2. Find the range

22=4; largest K=4−1=3. Range: 0 to 3.

#### Step 3. Validate selected K

3 is within 0…3.

#### Step 4. Calculate delay

3×51.2=153.6 μs.

**Final answer:** K may be 0…3; selected delay=153.6 μs.

#### What this result means

The range is not the actual delay. Use the stated selected K to calculate the delay.

---

## M2 · Backoff · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/csma--backoff-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/csma/backoff-2

Unit 3 · after ALOHA

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

n=3; K=5; Tslot=51.2 μs.

## To find

The random range and the delay for the selected K.

## Formula and why



$$
k=\min(n,10),\quad K_{\max}=2^k-1
$$





$$
T=KT_{\mathrm{slot}}
$$



Count starts at zero for K. The selected K must fit the allowed range.

## Step-by-step solution

#### Step 1. Determine exponent

k=min(3,10)=3.

#### Step 2. Find the range

23=8; largest K=8−1=7. Range: 0 to 7.

#### Step 3. Validate selected K

5 is within 0…7.

#### Step 4. Calculate delay

5×51.2=256 μs.

**Final answer:** K may be 0…7; selected delay=256 μs.

#### What this result means

The range is not the actual delay. Use the stated selected K to calculate the delay.

---

## M2 · Backoff · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/csma--backoff-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/csma/backoff-3

Unit 3 · after ALOHA

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

n=5; K=17; Tslot=5.12 μs.

## To find

The random range and the delay for the selected K.

## Formula and why



$$
k=\min(n,10),\quad K_{\max}=2^k-1
$$





$$
T=KT_{\mathrm{slot}}
$$



Count starts at zero for K. The selected K must fit the allowed range.

## Step-by-step solution

#### Step 1. Determine exponent

k=min(5,10)=5.

#### Step 2. Find the range

25=32; largest K=32−1=31. Range: 0 to 31.

#### Step 3. Validate selected K

17 is within 0…31.

#### Step 4. Calculate delay

17×5.12=87.04 μs.

**Final answer:** K may be 0…31; selected delay=87.04 μs.

#### What this result means

The range is not the actual delay. Use the stated selected K to calculate the delay.

---

## M2 · CSMA/CA: reduce collision risk before sending

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/csma--ca/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/csma/ca

Unit 3 · after ALOHA

**Definition.** 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.

**Simple meaning.** CA = pehle collision avoid karne ki koshish; guarantee nahi.

Swipe across the diagram to read its labels ↔

![CSMA/CA: optional reservation, data, acknowledgement](https://deep-learning-study-room.vercel.app/cn/fig/ca-sequence.566280e50f.svg)

Diagram: CSMA/CA: optional reservation, data, acknowledgement. Labels: CSMA/CA: optional reservation, data, acknowledgement | CSMA/CA: optional reservation, data, acknowledgement | Sender | Receiver | RTS (optional reservation) | CTS | DATA | ACK | Before data access: carrier sensing and a random backoff. | A busy medium freezes the eligible backoff countdown.

CSMA/CA: reduce collision risk before sending

## Understand it step by step

1. A wireless station senses the medium and follows the required interframe waiting and contention rules.
2. 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.
3. When its counter reaches zero, it transmits. A unicast receiver normally sends an ACK after successful reception. Missing ACK triggers retry logic.
4. 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.
5. Wireless stations cannot generally rely on Ethernet-style collision detection while transmitting. Collision avoidance does not eliminate all losses or collisions.

#### Practical example

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.

### Practice question. Explain CSMA/CA and distinguish it from CSMA/CD. [3 practice marks]

#### Answer

| Aspect | CSMA/CD | CSMA/CA |
| --- | --- | --- |
| Main action | Detect and abort a collision during sending | Reduce collision risk before sending |
| Typical teaching context | Shared half-duplex wired Ethernet | Wi-Fi contention access |
| Mechanisms | Carrier sensing, detection/jam, backoff | Carrier sensing, random backoff, ACK; optional RTS/CTS |

#### Practical example

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.

**Yaad rakho:** CD = detect during; CA = avoid before.

---

## M2 · Hidden terminals and RTS/CTS

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/csma--hidden/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/csma/hidden

Unit 3 · after ALOHA

**Definition.** Hidden terminals are stations that cannot sense each other but whose transmissions can interfere at a common receiver.

**Simple meaning.** A aur C ek dusre ko nahi sunte, par dono B ko bhej rahe hain.

Swipe across the diagram to read its labels ↔

![Hidden terminals: A and C cannot sense each other](https://deep-learning-study-room.vercel.app/cn/fig/hidden-terminal.1ffcf794d5.svg)

Diagram: Hidden terminals: A and C cannot sense each other. Labels: Hidden terminals: A and C cannot sense each other | Hidden terminals: A and C cannot sense each other | A | B | C | Common receiver B hears both | B’s CTS can make a hidden sender defer. Collisions remain possible.

Hidden terminals and RTS/CTS

## Understand it step by step

1. Suppose A and C are outside each other’s sensing range, but B can receive both.
2. A senses no signal from C and may transmit; C may make the same decision. Their frames can collide at B.
3. 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.
4. RTS frames can themselves collide and wireless conditions still matter. Describe RTS/CTS as mitigation, not an absolute guarantee.

#### Practical example

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.

### Practice question. Explain the hidden-terminal problem and how RTS/CTS helps. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Hidden: senders invisible to each other, receiver common.

---

## M2 · Circuit, message and packet switching

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/switching--types/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/switching/types

Unit 4 · Network Layer

**Definition.** Switching selects how data passes through intermediate network nodes from a source to a destination.

**Simple meaning.** Raasta reserve karna, poora message ruk-ruk ke bhejna, ya chhote packets bhejna—yeh teen ideas hain.

Swipe across the diagram to read its labels ↔

![Three switching techniques: what is forwarded?](https://deep-learning-study-room.vercel.app/cn/fig/switching.2b51f856d9.svg)

Diagram: Three switching techniques: what is forwarded?. Labels: Three switching techniques: what is forwarded? | Three switching techniques: what is forwarded? | 1. Circuit: reserve a path, then stream data | Setup → reserved capacity → data transfer → release. | 2. Message: store the entire message at each node | Large forwarding unit; no packet-level pipeline. | 3. Packet: divide, then forward packet by packet | Shared links can simultaneously carry different packets.

Circuit, message and packet switching

## Understand it step by step

1. **Circuit switching:** establish a circuit, reserve resources, transfer data, then release the circuit. Capacity is dedicated even during a silent period.
2. **Message switching:** each intermediate node receives the entire message before forwarding it. Large messages require large buffers and can delay later messages.
3. **Packet switching:** divide data into smaller packets. Nodes forward packets individually; different links can carry successive packets at the same time.
4. 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.

| Aspect | Circuit switching | Message switching | Packet switching |
| --- | --- | --- | --- |
| Unit handled | Continuous stream on established circuit | Whole message | Small packets |
| Resource use | Capacity reserved along a circuit | Shared; message stored at each intermediate node | Shared; each packet stored/forwarded in this model |
| Setup | Required before data transfer | No circuit setup required | Datagram: no connection setup; virtual circuit: setup |
| Delay | Setup delay, then relatively predictable service | Large store-and-forward delay for long messages | Variable delay; packet pipeline can reduce completion time |
| Main limitation | Reserved capacity can be idle | Large buffers; unsuitable for tight delay needs | Headers, possible queueing/loss; datagrams may reorder |

#### Practical example

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.

### Practice question. Compare circuit, message and packet switching and recommend a method for bursty office data. [3 practice marks]

#### Answer

| Aspect | Circuit switching | Message switching | Packet switching |
| --- | --- | --- | --- |
| Unit handled | Continuous stream on established circuit | Whole message | Small packets |
| Resource use | Capacity reserved along a circuit | Shared; message stored at each intermediate node | Shared; each packet stored/forwarded in this model |
| Setup | Required before data transfer | No circuit setup required | Datagram: no connection setup; virtual circuit: setup |
| Delay | Setup delay, then relatively predictable service | Large store-and-forward delay for long messages | Variable delay; packet pipeline can reduce completion time |
| Main limitation | Reserved capacity can be idle | Large buffers; unsuitable for tight delay needs | Headers, possible queueing/loss; datagrams may reorder |

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.

#### Practical example

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.

**Yaad rakho:** Circuit reserves; message waits whole; packets pipeline.

---

## M2 · Datagram versus virtual-circuit packet switching

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/switching--datagram/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/switching/datagram

Unit 4 · Network Layer

**Definition.** Datagram switching routes each packet independently; virtual-circuit switching first establishes a logical path and forwarding state for a flow.

**Simple meaning.** Datagram mein har packet ka decision; virtual circuit mein pehle logical route set.

## Understand it step by step

1. In a datagram network, each packet carries enough destination information for independent forwarding. Packets may take different routes as forwarding conditions change.
2. In a virtual-circuit network, a setup phase establishes a logical path. Packets normally carry a short connection identifier meaningful to that network.
3. A virtual circuit is not automatically a physical dedicated circuit. Capacity can still be shared with other virtual circuits.
4. Ordering and service guarantees depend on the actual protocol. Do not assume that merely saying “virtual circuit” guarantees loss-free delivery.

#### Practical example

IP illustrates datagram service: a router forwards each received packet using its forwarding table. A textbook virtual-circuit example is an ATM connection.

### Practice question. Differentiate datagram and virtual-circuit packet switching. [3 practice marks]

#### Answer

| Feature | Datagram | Virtual circuit |
| --- | --- | --- |
| Setup | Usually none at network layer | Logical connection setup |
| Forwarding information | Destination address | Virtual-circuit identifier |
| Router state | No per-connection state required for basic IP forwarding | Connection/path state maintained |
| Path | May vary | Established logical path until changed |

#### Practical example

IP illustrates datagram service: a router forwards each received packet using its forwarding table. A textbook virtual-circuit example is an ATM connection.

**Yaad rakho:** Virtual circuit bhi packet switching ho sakta hai.

---

## M2 · Store-and-forward and pipelining

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/switching--pipeline/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/switching/pipeline

Unit 4 · Network Layer

**Optional worked extension.** 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.

**Definition.** 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.

**Simple meaning.** Pehla packet next link pe jaa raha hai, tab doosra packet first link pe aa sakta hai.

Swipe across the diagram to read its labels ↔

![Packet pipeline: successive packets use different links](https://deep-learning-study-room.vercel.app/cn/fig/pipeline.a023f04605.svg)

Diagram: Packet pipeline: successive packets use different links. Labels: Packet pipeline: successive packets use different links | Packet pipeline: successive packets use different links | Equal serialization intervals; propagation omitted in this sketch. | Link 1 | P1 | P2 | P3 | Link 2 | P1 | P2 | P3 | Link 3 | P1 | P2 | P3 | For h links and k equal packets: h + k − 1 packet times.

Store-and-forward and pipelining

## Understand it step by step

1. 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.
2. 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.
3. 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.
4. Count links, not routers: three intermediate routers between source and destination create four links. Include packet headers in L if the question supplies them.



$$
T_{\mathrm{message}}=hM/R+h\tau
$$





$$
T_{\mathrm{packet}}=(h+k-1)L/R+h\tau
$$



#### Practical example

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.

### Practice question. Explain why packet switching can deliver a large message faster than message switching. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** First packet h times; remaining packets one time each.

---

## M2 · Compare completion times · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/switching--delay-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/switching/delay-1

Unit 4 · Network Layer

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

| Given | Value |
| --- | --- |
| M | 12000 bits |
| h | 3 |
| k | 6 |
| R | 1,000,000 bits/s |
| τ | 0.002 s/link |
| Circuit setup | 0.01 s |

## To find

Time until the final data bit reaches the destination in each method.

## Formula and why



$$
T_m=hM/R+h\tau
$$





$$
T_p=(h+k-1)L/R+h\tau
$$





$$
T_c=T_{\mathrm{setup}}+M/R+h\tau
$$



Message switching repeats whole-message serialization at every hop. Packet switching pipelines equal packets. A circuit streams bits through the established equal-rate path.

## Step-by-step solution

#### Step 1. Find packet size

L=M/k=12000/6=2000 bits.

#### Step 2. Whole-message completion

3×12000/1,000,000 + 3×0.002 = 0.042000 s = 42 ms.

#### Step 3. One packet transmission time

L/R=2000/1,000,000=0.002 s.

#### Step 4. Pipelined packet completion

(3+6−1)×0.002+3×0.002=0.022000 s = 22 ms.

#### Step 5. Circuit completion

0.01+12000/1,000,000+3×0.002=0.028000 s = 28 ms.

**Final answer:** Message=42 ms; packets=22 ms; circuit=28 ms.

#### What this result means

These values depend on the given setup, rates and ideal pipeline. Do not claim that one technique is always faster in every network.

---

## M2 · Compare completion times · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/switching--delay-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/switching/delay-2

Unit 4 · Network Layer

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

| Given | Value |
| --- | --- |
| M | 8000 bits |
| h | 2 |
| k | 4 |
| R | 1,000,000 bits/s |
| τ | 0.001 s/link |
| Circuit setup | 0.005 s |

## To find

Time until the final data bit reaches the destination in each method.

## Formula and why



$$
T_m=hM/R+h\tau
$$





$$
T_p=(h+k-1)L/R+h\tau
$$





$$
T_c=T_{\mathrm{setup}}+M/R+h\tau
$$



Message switching repeats whole-message serialization at every hop. Packet switching pipelines equal packets. A circuit streams bits through the established equal-rate path.

## Step-by-step solution

#### Step 1. Find packet size

L=M/k=8000/4=2000 bits.

#### Step 2. Whole-message completion

2×8000/1,000,000 + 2×0.001 = 0.018000 s = 18 ms.

#### Step 3. One packet transmission time

L/R=2000/1,000,000=0.002 s.

#### Step 4. Pipelined packet completion

(2+4−1)×0.002+2×0.001=0.012000 s = 12 ms.

#### Step 5. Circuit completion

0.005+8000/1,000,000+2×0.001=0.015000 s = 15 ms.

**Final answer:** Message=18 ms; packets=12 ms; circuit=15 ms.

#### What this result means

These values depend on the given setup, rates and ideal pipeline. Do not claim that one technique is always faster in every network.

---

## M2 · Packet pipeline with header overhead

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/switching--headers/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/switching/headers

Unit 4 · Network Layer

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

M=12,000 bits; payload=1,000 bits; header=100 bits; h=4; R=1,000,000 bits/s; τ=0.001 s.

## To find

k, L, total serialized bits on one link and completion time.

## Formula and why



$$
k=M/P,\quad L=P+H
$$





$$
T=(h+k-1)L/R+h\tau
$$



The payload determines packet count; payload plus header determines packet transmission time.

## Step-by-step solution

#### Step 1. Count packets

k=12,000/1,000=12.

#### Step 2. Add the header to each packet

L=1,000+100=1,100 bits.

#### Step 3. Count all bits sent on one link

12×1,100=13,200 bits, of which 1,200 are headers.

#### Step 4. Find one packet time

1,100/1,000,000=0.0011 s.

#### Step 5. Apply the pipeline

(4+12−1)×0.0011+4×0.001=0.0205 s=20.5 ms.

**Final answer:** 12 packets; 1,100 bits each; 13,200 bits on one link; completion=20.5 ms.

#### What this result means

Packet headers consume link capacity. Ignoring them gives an unrealistically small completion time for this question.

---

## M2 · IPv4 addresses: four octets, one 32-bit value

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv4--structure/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv4/structure

Unit 4 · IPv4 addressing

**Definition.** An IPv4 address is a 32-bit logical address, conventionally written as four decimal octets separated by dots.

**Simple meaning.** IP ke chaar boxes hain; har box 8 bits ka, value 0 se 255.

Swipe across the diagram to read its labels ↔

![IPv4 /26: 26 network bits and 6 host bits](https://deep-learning-study-room.vercel.app/cn/fig/ipv4-prefix.d99075bfca.svg)

Diagram: IPv4 /26: 26 network bits and 6 host bits. Labels: IPv4 /26: 26 network bits and 6 host bits | IPv4 /26: 26 network bits and 6 host bits | Octet 1 | 192 | Octet 2 | 168 | Octet 3 | 10 | Octet 4 | 77 | 8 bits 8 bits 8 bits 2 + 6 bits | 26 network bits | 6 host bits | The slash counts prefix bits, not octets or addresses.

IPv4 addresses: four octets, one 32-bit value

## Understand it step by step

1. An octet contains eight bits. Its smallest value is 00000000₂=0 and its largest is 11111111₂=255.
2. An address such as 192.168.10.77 has four octets. The dots are separators, not decimal points in a single decimal fraction.
3. 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.
4. 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.

#### Practical example

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.

### Practice question. Explain dotted-decimal IPv4 notation and the meaning of /26. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** 4 octets × 8 bits = 32; slash = network bits.

---

## M2 · Classful addressing: historical default boundaries

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv4--classes/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv4/classes

Unit 4 · IPv4 addressing

**Definition.** Classful addressing divides the IPv4 address space into historical classes with fixed default network boundaries for Classes A, B and C.

**Simple meaning.** Class first octet se; modern subnet given slash se.

## Understand it step by step

1. 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.
2. Class D addresses identify multicast groups; Class E is reserved/experimental space rather than an ordinary unicast class.
3. Not all numerically class-shaped addresses can be assigned to normal hosts. For example, 127/8 is loopback and 0/8 has special meanings.
4. In a classless question, use the stated /p. An address that looks Class C can be part of a /26 subnet.

| Class | First octet | Default / purpose |
| --- | --- | --- |
| A | 0–127; ordinary historical assignments 1–126 | /8; special ranges exist |
| B | 128–191 | /16 |
| C | 192–223 | /24 |
| D | 224–239 | Multicast |
| E | 240–255 | Reserved/experimental; special addresses exist |

#### Practical example

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.

### Practice question. State the default prefixes of Classes A, B and C and explain their relation to CIDR. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Class pehchaan sakte ho; calculation mein given slash follow karo.

---

## M2 · Private, loopback and special IPv4 addresses

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv4--special/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv4/special

Unit 4 · IPv4 addressing

**Definition.** Private IPv4 ranges are address blocks reserved for use within private networks rather than ordinary public Internet routing.

**Simple meaning.** Private IP ghar/college ke andar reuse ho sakta hai; globally unique public IP jaisa treat mat karo.

## Understand it step by step

1. 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.
2. 127.0.0.0/8 is loopback; 127.0.0.1 commonly refers to the local host itself.
3. 169.254.0.0/16 is IPv4 link-local space. It is not one of the three RFC 1918 private blocks.
4. 255.255.255.255 is a limited broadcast address. A subnet-directed broadcast has all its host bits set to 1.
5. 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.

#### Practical example

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.

### Practice question. List the three private IPv4 address ranges and give an example. [3 practice marks]

#### Answer

| Prefix | Range |
| --- | --- |
| 10.0.0.0/8 | 10.0.0.0–10.255.255.255 |
| 172.16.0.0/12 | 172.16.0.0–172.31.255.255 |
| 192.168.0.0/16 | 192.168.0.0–192.168.255.255 |

For example, 192.168.1.10 can be used in a private LAN.

#### Practical example

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.

**Yaad rakho:** 10 full; 172 only 16–31; 192.168 full.

---

## M2 · Subnet masks: 1 keeps a network bit; 0 marks a host bit

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv4--mask/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv4/mask

Unit 4 · IPv4 addressing

**Definition.** A subnet mask is a 32-bit value with contiguous leading 1s for network-prefix positions and trailing 0s for host positions.

**Simple meaning.** Mask mein 1 = network part rakhna; 0 = host part zero karna.

Swipe across the diagram to read its labels ↔

![Bitwise AND: 77 AND 192 = 64](https://deep-learning-study-room.vercel.app/cn/fig/mask-and.3b9a8ff9ea.svg)

Diagram: Bitwise AND: 77 AND 192 = 64. Labels: Bitwise AND: 77 AND 192 = 64 | Bitwise AND: 77 AND 192 = 64 | IP octet 77 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | Mask octet 192 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | Network octet 64 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | Only 1 AND 1 produces 1. Every host position becomes 0.

Subnet masks: 1 keeps a network bit; 0 marks a host bit

## Understand it step by step

1. For /26, write 26 ones followed by 6 zeroes: 11111111.11111111.11111111.11000000.
2. Convert each octet: 255.255.255.(128+64)=255.255.255.192.
3. Bitwise AND operates on matching bit positions. Only 1 AND 1 equals 1; all other combinations equal 0.
4. Applying address AND mask keeps the network prefix and clears the host bits. This gives the first/network address of the block.

| A | B | A AND B |
| --- | --- | --- |
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |



$$
\text{Network address}=\text{IP address AND subnet mask}
$$



#### Practical example

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.

### Practice question. How does a subnet mask determine the network address? [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** AND: dono 1 ho tabhi output 1.

---

## M2 · Prefix to mask · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv4--mask-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv4/mask-1

Unit 4 · IPv4 addressing

### Practice question. Convert /26 into a dotted-decimal subnet mask. State host bits and total address count. [3 practice marks]

#### Answer

## Given

Prefix length p=26.

## To find

Mask, h and N.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$



A prefix contains p leading ones; total combinations depend on the remaining host bits.

## Step-by-step solution

#### Step 1. Write the bits

26 ones followed by 6 zeroes: `11111111.11111111.11111111.11000000`.

#### Step 2. Convert every octet

| Mask bits | Decimal |
| --- | --- |
| 11111111 | 255 |
| 11111111 | 255 |
| 11111111 | 255 |
| 11000000 | 192 |

#### Step 3. Calculate host positions

h=32−26=6.

#### Step 4. Count total addresses

N=26=64.

**Final answer:** Mask=255.255.255.192; host bits=6; total addresses=64.

#### What this result means

The mask tells which bits belong to the network; the last mask octet is not the number of hosts.

---

## M2 · Prefix to mask · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv4--mask-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv4/mask-2

Unit 4 · IPv4 addressing

### Practice question. Convert /20 into a dotted-decimal subnet mask. State host bits and total address count. [3 practice marks]

#### Answer

## Given

Prefix length p=20.

## To find

Mask, h and N.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$



A prefix contains p leading ones; total combinations depend on the remaining host bits.

## Step-by-step solution

#### Step 1. Write the bits

20 ones followed by 12 zeroes: `11111111.11111111.11110000.00000000`.

#### Step 2. Convert every octet

| Mask bits | Decimal |
| --- | --- |
| 11111111 | 255 |
| 11111111 | 255 |
| 11110000 | 240 |
| 00000000 | 0 |

#### Step 3. Calculate host positions

h=32−20=12.

#### Step 4. Count total addresses

N=212=4,096.

**Final answer:** Mask=255.255.240.0; host bits=12; total addresses=4,096.

#### What this result means

The mask tells which bits belong to the network; the last mask octet is not the number of hosts.

---

## M2 · Prefix to mask · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv4--mask-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv4/mask-3

Unit 4 · IPv4 addressing

### Practice question. Convert /27 into a dotted-decimal subnet mask. State host bits and total address count. [3 practice marks]

#### Answer

## Given

Prefix length p=27.

## To find

Mask, h and N.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$



A prefix contains p leading ones; total combinations depend on the remaining host bits.

## Step-by-step solution

#### Step 1. Write the bits

27 ones followed by 5 zeroes: `11111111.11111111.11111111.11100000`.

#### Step 2. Convert every octet

| Mask bits | Decimal |
| --- | --- |
| 11111111 | 255 |
| 11111111 | 255 |
| 11111111 | 255 |
| 11100000 | 224 |

#### Step 3. Calculate host positions

h=32−27=5.

#### Step 4. Count total addresses

N=25=32.

**Final answer:** Mask=255.255.255.224; host bits=5; total addresses=32.

#### What this result means

The mask tells which bits belong to the network; the last mask octet is not the number of hosts.

---

## M2 · Prefix to mask · example 4

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv4--mask-4/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv4/mask-4

Unit 4 · IPv4 addressing

### Practice question. Convert /23 into a dotted-decimal subnet mask. State host bits and total address count. [3 practice marks]

#### Answer

## Given

Prefix length p=23.

## To find

Mask, h and N.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$



A prefix contains p leading ones; total combinations depend on the remaining host bits.

## Step-by-step solution

#### Step 1. Write the bits

23 ones followed by 9 zeroes: `11111111.11111111.11111110.00000000`.

#### Step 2. Convert every octet

| Mask bits | Decimal |
| --- | --- |
| 11111111 | 255 |
| 11111111 | 255 |
| 11111110 | 254 |
| 00000000 | 0 |

#### Step 3. Calculate host positions

h=32−23=9.

#### Step 4. Count total addresses

N=29=512.

**Final answer:** Mask=255.255.254.0; host bits=9; total addresses=512.

#### What this result means

The mask tells which bits belong to the network; the last mask octet is not the number of hosts.

---

## M2 · One method for every ordinary IPv4 block question

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/subnets--method/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/subnets/method

Unit 4 · masks, subnetting and CIDR

**Definition.** 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.

**Simple meaning.** Pehle block nikalo; phir first aur last. Uske baad hosts.

Swipe across the diagram to read its labels ↔

![A /24 split into four /26 blocks](https://deep-learning-study-room.vercel.app/cn/fig/subnet-blocks.67a24f46fc.svg)

Diagram: A /24 split into four /26 blocks. Labels: A /24 split into four /26 blocks | A /24 split into four /26 blocks | 1. /26 | First: .0 Last: .63 | Usable: .1 to .62 | 2. /26 | First: .64 Last: .127 | Usable: .65 to .126 | 3. /26 | First: .128 Last: .191 | Usable: .129 to .190 | 4. /26 | First: .192 Last: .255 | Usable: .193 to .254 | Each block: 64 total addresses; 62 ordinary usable hosts. | An address ending in .77 belongs to the .64–.127 block.

One method for every ordinary IPv4 block question

## Understand it step by step

1. Read /p. Host bits h=32−p. Total addresses N=2ʰ, not N−2.
2. Build the mask. Find the first octet that is not 255; block step there is 256−that mask octet.
3. Round that address octet down to a multiple of the step. Preserve preceding octets and set later octets to 0 for the network address.
4. 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.
5. 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.



$$
N=2^{32-p}
$$





$$
\text{block step}=256-\text{changing mask octet}
$$





$$
\text{ordinary usable hosts}=2^h-2
$$



#### Practical example

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.

### Practice question. Distinguish total addresses from usable host addresses in a /26 subnet. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Total mein sab count; usable mein boundary ke 2 minus.

---

## M2 · Complete block · 192.168.10.77/26

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/subnets--block-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/subnets/block-1

Unit 4 · masks, subnetting and CIDR

### Practice question. For the IPv4 address 192.168.10.77/26, determine the mask, network address, broadcast address, total addresses and usable host range. [3 practice marks]

#### Answer

## Given

IP/prefix = `192.168.10.77/26`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−26=6; N=26=64.

#### Step 2. Construct the mask

Mask=`255.255.255.192`; binary=`11111111.11111111.11111111.11000000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 77 lies in 64…127.

#### Step 4. Form the first/network address

Keep earlier octets; place 64 in octet 4; set any later octets to zero. Network=**192.168.10.64**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 11000000 | 11111111 | 11000000 | 192 |
| 2 | 10101000 | 11111111 | 10101000 | 168 |
| 3 | 00001010 | 11111111 | 00001010 | 10 |
| 4 | 01001101 | 11000000 | 01000000 | 64 |

#### Step 6. Form the last/broadcast address

Use 127 in the changing octet and 255 in any later octets. Broadcast=**192.168.10.127**.

#### Step 7. State usable hosts

First usable=192.168.10.65; last usable=192.168.10.126; count=64−2=62.

**Final answer:** Network 192.168.10.64; broadcast 192.168.10.127; 64 total, 62 ordinary usable; range 192.168.10.65–192.168.10.126.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## M2 · Complete block · 200.140.64.48/26

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/subnets--block-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/subnets/block-2

Unit 4 · masks, subnetting and CIDR

### Practice question. For the IPv4 address 200.140.64.48/26, determine the mask, network address, broadcast address, total addresses and usable host range. [3 practice marks]

#### Answer

## Given

IP/prefix = `200.140.64.48/26`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−26=6; N=26=64.

#### Step 2. Construct the mask

Mask=`255.255.255.192`; binary=`11111111.11111111.11111111.11000000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 48 lies in 0…63.

#### Step 4. Form the first/network address

Keep earlier octets; place 0 in octet 4; set any later octets to zero. Network=**200.140.64.0**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 11001000 | 11111111 | 11001000 | 200 |
| 2 | 10001100 | 11111111 | 10001100 | 140 |
| 3 | 01000000 | 11111111 | 01000000 | 64 |
| 4 | 00110000 | 11000000 | 00000000 | 0 |

#### Step 6. Form the last/broadcast address

Use 63 in the changing octet and 255 in any later octets. Broadcast=**200.140.64.63**.

#### Step 7. State usable hosts

First usable=200.140.64.1; last usable=200.140.64.62; count=64−2=62.

**Final answer:** Network 200.140.64.0; broadcast 200.140.64.63; 64 total, 62 ordinary usable; range 200.140.64.1–200.140.64.62.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## M2 · Complete block · 193.20.35.40/26

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/subnets--block-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/subnets/block-3

Unit 4 · masks, subnetting and CIDR

### Practice question. For the IPv4 address 193.20.35.40/26, determine the mask, network address, broadcast address, total addresses and usable host range. [3 practice marks]

#### Answer

## Given

IP/prefix = `193.20.35.40/26`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−26=6; N=26=64.

#### Step 2. Construct the mask

Mask=`255.255.255.192`; binary=`11111111.11111111.11111111.11000000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 40 lies in 0…63.

#### Step 4. Form the first/network address

Keep earlier octets; place 0 in octet 4; set any later octets to zero. Network=**193.20.35.0**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 11000001 | 11111111 | 11000001 | 193 |
| 2 | 00010100 | 11111111 | 00010100 | 20 |
| 3 | 00100011 | 11111111 | 00100011 | 35 |
| 4 | 00101000 | 11000000 | 00000000 | 0 |

#### Step 6. Form the last/broadcast address

Use 63 in the changing octet and 255 in any later octets. Broadcast=**193.20.35.63**.

#### Step 7. State usable hosts

First usable=193.20.35.1; last usable=193.20.35.62; count=64−2=62.

**Final answer:** Network 193.20.35.0; broadcast 193.20.35.63; 64 total, 62 ordinary usable; range 193.20.35.1–193.20.35.62.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## M2 · Complete block · 192.168.1.150/27

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/subnets--block-4/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/subnets/block-4

Unit 4 · masks, subnetting and CIDR

### Practice question. For the IPv4 address 192.168.1.150/27, determine the mask, network address, broadcast address, total addresses and usable host range. [3 practice marks]

#### Answer

## Given

IP/prefix = `192.168.1.150/27`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−27=5; N=25=32.

#### Step 2. Construct the mask

Mask=`255.255.255.224`; binary=`11111111.11111111.11111111.11100000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 224, so step=256−224=32. The IP value 150 lies in 128…159.

#### Step 4. Form the first/network address

Keep earlier octets; place 128 in octet 4; set any later octets to zero. Network=**192.168.1.128**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 11000000 | 11111111 | 11000000 | 192 |
| 2 | 10101000 | 11111111 | 10101000 | 168 |
| 3 | 00000001 | 11111111 | 00000001 | 1 |
| 4 | 10010110 | 11100000 | 10000000 | 128 |

#### Step 6. Form the last/broadcast address

Use 159 in the changing octet and 255 in any later octets. Broadcast=**192.168.1.159**.

#### Step 7. State usable hosts

First usable=192.168.1.129; last usable=192.168.1.158; count=32−2=30.

**Final answer:** Network 192.168.1.128; broadcast 192.168.1.159; 32 total, 30 ordinary usable; range 192.168.1.129–192.168.1.158.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## M2 · Complete block · 10.4.9.55/28

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/subnets--block-5/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/subnets/block-5

Unit 4 · masks, subnetting and CIDR

### Practice question. For the IPv4 address 10.4.9.55/28, determine the mask, network address, broadcast address, total addresses and usable host range. [3 practice marks]

#### Answer

## Given

IP/prefix = `10.4.9.55/28`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−28=4; N=24=16.

#### Step 2. Construct the mask

Mask=`255.255.255.240`; binary=`11111111.11111111.11111111.11110000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 240, so step=256−240=16. The IP value 55 lies in 48…63.

#### Step 4. Form the first/network address

Keep earlier octets; place 48 in octet 4; set any later octets to zero. Network=**10.4.9.48**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 00001010 | 11111111 | 00001010 | 10 |
| 2 | 00000100 | 11111111 | 00000100 | 4 |
| 3 | 00001001 | 11111111 | 00001001 | 9 |
| 4 | 00110111 | 11110000 | 00110000 | 48 |

#### Step 6. Form the last/broadcast address

Use 63 in the changing octet and 255 in any later octets. Broadcast=**10.4.9.63**.

#### Step 7. State usable hosts

First usable=10.4.9.49; last usable=10.4.9.62; count=16−2=14.

**Final answer:** Network 10.4.9.48; broadcast 10.4.9.63; 16 total, 14 ordinary usable; range 10.4.9.49–10.4.9.62.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## M2 · Complete block · 172.16.35.123/20

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/subnets--block-6/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/subnets/block-6

Unit 4 · masks, subnetting and CIDR

### Practice question. For the IPv4 address 172.16.35.123/20, determine the mask, network address, broadcast address, total addresses and usable host range. [3 practice marks]

#### Answer

## Given

IP/prefix = `172.16.35.123/20`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−20=12; N=212=4,096.

#### Step 2. Construct the mask

Mask=`255.255.240.0`; binary=`11111111.11111111.11110000.00000000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 3. Its mask value is 240, so step=256−240=16. The IP value 35 lies in 32…47.

#### Step 4. Form the first/network address

Keep earlier octets; place 32 in octet 3; set any later octets to zero. Network=**172.16.32.0**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 10101100 | 11111111 | 10101100 | 172 |
| 2 | 00010000 | 11111111 | 00010000 | 16 |
| 3 | 00100011 | 11110000 | 00100000 | 32 |
| 4 | 01111011 | 00000000 | 00000000 | 0 |

#### Step 6. Form the last/broadcast address

Use 47 in the changing octet and 255 in any later octets. Broadcast=**172.16.47.255**.

#### Step 7. State usable hosts

First usable=172.16.32.1; last usable=172.16.47.254; count=4096−2=4094.

**Final answer:** 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.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## M2 · Complete block · 10.20.5.130/23

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/subnets--block-7/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/subnets/block-7

Unit 4 · masks, subnetting and CIDR

### Practice question. For the IPv4 address 10.20.5.130/23, determine the mask, network address, broadcast address, total addresses and usable host range. [3 practice marks]

#### Answer

## Given

IP/prefix = `10.20.5.130/23`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−23=9; N=29=512.

#### Step 2. Construct the mask

Mask=`255.255.254.0`; binary=`11111111.11111111.11111110.00000000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 3. Its mask value is 254, so step=256−254=2. The IP value 5 lies in 4…5.

#### Step 4. Form the first/network address

Keep earlier octets; place 4 in octet 3; set any later octets to zero. Network=**10.20.4.0**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 00001010 | 11111111 | 00001010 | 10 |
| 2 | 00010100 | 11111111 | 00010100 | 20 |
| 3 | 00000101 | 11111110 | 00000100 | 4 |
| 4 | 10000010 | 00000000 | 00000000 | 0 |

#### Step 6. Form the last/broadcast address

Use 5 in the changing octet and 255 in any later octets. Broadcast=**10.20.5.255**.

#### Step 7. State usable hosts

First usable=10.20.4.1; last usable=10.20.5.254; count=512−2=510.

**Final answer:** Network 10.20.4.0; broadcast 10.20.5.255; 512 total, 510 ordinary usable; range 10.20.4.1–10.20.5.254.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## M2 · Complete block · 192.168.2.129/25

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/subnets--block-8/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/subnets/block-8

Unit 4 · masks, subnetting and CIDR

### Practice question. For the IPv4 address 192.168.2.129/25, determine the mask, network address, broadcast address, total addresses and usable host range. [3 practice marks]

#### Answer

## Given

IP/prefix = `192.168.2.129/25`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−25=7; N=27=128.

#### Step 2. Construct the mask

Mask=`255.255.255.128`; binary=`11111111.11111111.11111111.10000000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 128, so step=256−128=128. The IP value 129 lies in 128…255.

#### Step 4. Form the first/network address

Keep earlier octets; place 128 in octet 4; set any later octets to zero. Network=**192.168.2.128**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 11000000 | 11111111 | 11000000 | 192 |
| 2 | 10101000 | 11111111 | 10101000 | 168 |
| 3 | 00000010 | 11111111 | 00000010 | 2 |
| 4 | 10000001 | 10000000 | 10000000 | 128 |

#### Step 6. Form the last/broadcast address

Use 255 in the changing octet and 255 in any later octets. Broadcast=**192.168.2.255**.

#### Step 7. State usable hosts

First usable=192.168.2.129; last usable=192.168.2.254; count=128−2=126.

**Final answer:** Network 192.168.2.128; broadcast 192.168.2.255; 128 total, 126 ordinary usable; range 192.168.2.129–192.168.2.254.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## M2 · Complete block · 192.0.2.6/30

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/subnets--block-9/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/subnets/block-9

Unit 4 · masks, subnetting and CIDR

### Practice question. For the IPv4 address 192.0.2.6/30, determine the mask, network address, broadcast address, total addresses and usable host range. [3 practice marks]

#### Answer

## Given

IP/prefix = `192.0.2.6/30`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−30=2; N=22=4.

#### Step 2. Construct the mask

Mask=`255.255.255.252`; binary=`11111111.11111111.11111111.11111100`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 252, so step=256−252=4. The IP value 6 lies in 4…7.

#### Step 4. Form the first/network address

Keep earlier octets; place 4 in octet 4; set any later octets to zero. Network=**192.0.2.4**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 11000000 | 11111111 | 11000000 | 192 |
| 2 | 00000000 | 11111111 | 00000000 | 0 |
| 3 | 00000010 | 11111111 | 00000010 | 2 |
| 4 | 00000110 | 11111100 | 00000100 | 4 |

#### Step 6. Form the last/broadcast address

Use 7 in the changing octet and 255 in any later octets. Broadcast=**192.0.2.7**.

#### Step 7. State usable hosts

First usable=192.0.2.5; last usable=192.0.2.6; count=4−2=2.

**Final answer:** Network 192.0.2.4; broadcast 192.0.2.7; 4 total, 2 ordinary usable; range 192.0.2.5–192.0.2.6.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## M2 · Why /31 and /32 do not use the ordinary minus-two rule

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/subnets--exceptions/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/subnets/exceptions

Unit 4 · masks, subnetting and CIDR

**Definition.** 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.

**Simple meaning.** Minus 2 har slash pe blindly mat lagao.

## Understand it step by step

1. Ordinary subnet questions reserve the all-zero and all-one host patterns, giving 2ʰ−2 usable hosts.
2. 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.
3. A /32 contains exactly one address. It is useful for identifying a specific interface/host route; it is not a multi-host broadcast subnet.

#### Practical example

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.

### Practice question. Explain why subtracting two usable addresses is inappropriate for a /31 point-to-point link. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** /31 special link; /32 single address.

---

## M2 · Hosts to prefix · 25 hosts

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/subnets--hosts-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/subnets/hosts-1

Unit 4 · masks, subnetting and CIDR

### Practice question. Choose the smallest ordinary IPv4 subnet supporting at least 25 usable hosts. Find prefix, mask and unused usable capacity. [3 practice marks]

#### Answer

## Given

Required usable hosts H=25.

## To find

The smallest sufficient subnet, expressed as /p and mask.

## Formula and why



$$
2^h-2\geq H,\qquad p=32-h
$$



Host demand excludes network and broadcast, so use the usable-host inequality. Choose the smallest h that satisfies it.

## Step-by-step solution

#### Step 1. Test the previous smaller power

With h=4, usable=24−2=14, which is less than 25.

#### Step 2. Test the next power

With h=5, usable=25−2=30, which is sufficient.

#### Step 3. Convert host bits to prefix

p=32−5=27; mask=255.255.255.224.

#### Step 4. Count spare usable addresses

30−25=5.

**Final answer:** /27, mask 255.255.255.224; 30 usable, 5 spare usable addresses.

#### What this result means

A requirement of 64 usable hosts cannot fit into a 64-total-address block: only 62 would be usable.

---

## M2 · Hosts to prefix · 64 hosts

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/subnets--hosts-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/subnets/hosts-2

Unit 4 · masks, subnetting and CIDR

### Practice question. Choose the smallest ordinary IPv4 subnet supporting at least 64 usable hosts. Find prefix, mask and unused usable capacity. [3 practice marks]

#### Answer

## Given

Required usable hosts H=64.

## To find

The smallest sufficient subnet, expressed as /p and mask.

## Formula and why



$$
2^h-2\geq H,\qquad p=32-h
$$



Host demand excludes network and broadcast, so use the usable-host inequality. Choose the smallest h that satisfies it.

## Step-by-step solution

#### Step 1. Test the previous smaller power

With h=6, usable=26−2=62, which is less than 64.

#### Step 2. Test the next power

With h=7, usable=27−2=126, which is sufficient.

#### Step 3. Convert host bits to prefix

p=32−7=25; mask=255.255.255.128.

#### Step 4. Count spare usable addresses

126−64=62.

**Final answer:** /25, mask 255.255.255.128; 126 usable, 62 spare usable addresses.

#### What this result means

A requirement of 64 usable hosts cannot fit into a 64-total-address block: only 62 would be usable.

---

## M2 · Hosts to prefix · 1000 hosts

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/subnets--hosts-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/subnets/hosts-3

Unit 4 · masks, subnetting and CIDR

### Practice question. Choose the smallest ordinary IPv4 subnet supporting at least 1000 usable hosts. Find prefix, mask and unused usable capacity. [3 practice marks]

#### Answer

## Given

Required usable hosts H=1000.

## To find

The smallest sufficient subnet, expressed as /p and mask.

## Formula and why



$$
2^h-2\geq H,\qquad p=32-h
$$



Host demand excludes network and broadcast, so use the usable-host inequality. Choose the smallest h that satisfies it.

## Step-by-step solution

#### Step 1. Test the previous smaller power

With h=9, usable=29−2=510, which is less than 1000.

#### Step 2. Test the next power

With h=10, usable=210−2=1022, which is sufficient.

#### Step 3. Convert host bits to prefix

p=32−10=22; mask=255.255.252.0.

#### Step 4. Count spare usable addresses

1022−1000=22.

**Final answer:** /22, mask 255.255.252.0; 1022 usable, 22 spare usable addresses.

#### What this result means

A requirement of 64 usable hosts cannot fit into a 64-total-address block: only 62 would be usable.

---

## M2 · Equal-size subnet design · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/subnets--split-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/subnets/split-1

Unit 4 · masks, subnetting and CIDR

### 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. [3 practice marks]

#### Answer

## Given

Parent=192.168.8.0/24; required equal-size subnets=4.

## To find

Borrowed bits, new mask/prefix and complete subnet ranges.

## Formula and why



$$
2^s\geq N_{\mathrm{subnets}}
$$





$$
p_{\mathrm{new}}=p_{\mathrm{old}}+s
$$



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.

## Step-by-step solution

#### Step 1. Choose borrowed bits

s=2, because 22=4 is the smallest power of two at least 4.

#### Step 2. Find the new prefix and size

/24+2=/26; mask=255.255.255.192. Each subnet contains 64 total and 62 usable addresses.

#### Step 3. List each subnet

| Subnet | First/network | Last/broadcast | Usable range |
| --- | --- | --- | --- |
| 192.168.8.0/26 | 192.168.8.0 | 192.168.8.63 | 192.168.8.1–192.168.8.62 |
| 192.168.8.64/26 | 192.168.8.64 | 192.168.8.127 | 192.168.8.65–192.168.8.126 |
| 192.168.8.128/26 | 192.168.8.128 | 192.168.8.191 | 192.168.8.129–192.168.8.190 |
| 192.168.8.192/26 | 192.168.8.192 | 192.168.8.255 | 192.168.8.193–192.168.8.254 |

#### Step 4. State spare subnet capacity

4 available−4 required=0 extra equal-size subnet(s).

**Final answer:** /26; 4 subnets; 62 usable hosts each.

#### What this result means

Borrowing more network bits creates more but smaller subnets.

---

## M2 · Equal-size subnet design · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/subnets--split-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/subnets/split-2

Unit 4 · masks, subnetting and CIDR

### 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. [3 practice marks]

#### Answer

## Given

Parent=172.16.0.0/16; required equal-size subnets=8.

## To find

Borrowed bits, new mask/prefix and complete subnet ranges.

## Formula and why



$$
2^s\geq N_{\mathrm{subnets}}
$$





$$
p_{\mathrm{new}}=p_{\mathrm{old}}+s
$$



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.

## Step-by-step solution

#### Step 1. Choose borrowed bits

s=3, because 23=8 is the smallest power of two at least 8.

#### Step 2. Find the new prefix and size

/16+3=/19; mask=255.255.224.0. Each subnet contains 8192 total and 8190 usable addresses.

#### Step 3. List each subnet

| Subnet | First/network | Last/broadcast | Usable range |
| --- | --- | --- | --- |
| 172.16.0.0/19 | 172.16.0.0 | 172.16.31.255 | 172.16.0.1–172.16.31.254 |
| 172.16.32.0/19 | 172.16.32.0 | 172.16.63.255 | 172.16.32.1–172.16.63.254 |
| 172.16.64.0/19 | 172.16.64.0 | 172.16.95.255 | 172.16.64.1–172.16.95.254 |
| 172.16.96.0/19 | 172.16.96.0 | 172.16.127.255 | 172.16.96.1–172.16.127.254 |
| 172.16.128.0/19 | 172.16.128.0 | 172.16.159.255 | 172.16.128.1–172.16.159.254 |
| 172.16.160.0/19 | 172.16.160.0 | 172.16.191.255 | 172.16.160.1–172.16.191.254 |
| 172.16.192.0/19 | 172.16.192.0 | 172.16.223.255 | 172.16.192.1–172.16.223.254 |
| 172.16.224.0/19 | 172.16.224.0 | 172.16.255.255 | 172.16.224.1–172.16.255.254 |

#### Step 4. State spare subnet capacity

8 available−8 required=0 extra equal-size subnet(s).

**Final answer:** /19; 8 subnets; 8190 usable hosts each.

#### What this result means

Borrowing more network bits creates more but smaller subnets.

---

## M2 · Equal-size subnet design · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/subnets--split-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/subnets/split-3

Unit 4 · masks, subnetting and CIDR

### 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. [3 practice marks]

#### Answer

## Given

Parent=10.0.0.0/24; required equal-size subnets=6.

## To find

Borrowed bits, new mask/prefix and complete subnet ranges.

## Formula and why



$$
2^s\geq N_{\mathrm{subnets}}
$$





$$
p_{\mathrm{new}}=p_{\mathrm{old}}+s
$$



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.

## Step-by-step solution

#### Step 1. Choose borrowed bits

s=3, because 23=8 is the smallest power of two at least 6.

#### Step 2. Find the new prefix and size

/24+3=/27; mask=255.255.255.224. Each subnet contains 32 total and 30 usable addresses.

#### Step 3. List each subnet

| Subnet | First/network | Last/broadcast | Usable range |
| --- | --- | --- | --- |
| 10.0.0.0/27 | 10.0.0.0 | 10.0.0.31 | 10.0.0.1–10.0.0.30 |
| 10.0.0.32/27 | 10.0.0.32 | 10.0.0.63 | 10.0.0.33–10.0.0.62 |
| 10.0.0.64/27 | 10.0.0.64 | 10.0.0.95 | 10.0.0.65–10.0.0.94 |
| 10.0.0.96/27 | 10.0.0.96 | 10.0.0.127 | 10.0.0.97–10.0.0.126 |
| 10.0.0.128/27 | 10.0.0.128 | 10.0.0.159 | 10.0.0.129–10.0.0.158 |
| 10.0.0.160/27 | 10.0.0.160 | 10.0.0.191 | 10.0.0.161–10.0.0.190 |
| 10.0.0.192/27 | 10.0.0.192 | 10.0.0.223 | 10.0.0.193–10.0.0.222 |
| 10.0.0.224/27 | 10.0.0.224 | 10.0.0.255 | 10.0.0.225–10.0.0.254 |

#### Step 4. State spare subnet capacity

8 available−6 required=2 extra equal-size subnet(s).

**Final answer:** /27; 8 subnets; 30 usable hosts each.

#### What this result means

Borrowing more network bits creates more but smaller subnets.

---

## M2 · CIDR and VLSM: two related but different ideas

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/cidr--meaning/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/cidr/meaning

Unit 4 · classless addressing

**Definition.** CIDR expresses address blocks using an explicit prefix length; VLSM uses different subnet prefix lengths to match different size requirements within an allocated block.

**Simple meaning.** CIDR = slash se block; VLSM = departments ko need ke hisaab se different block sizes.

## Understand it step by step

1. 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.
2. The prefix gives contiguous network bits. A noncontiguous mask such as 255.0.255.0 is not a normal CIDR prefix mask.
3. VLSM avoids making every department as large as the largest one. Allocate larger requirements first, then fit smaller aligned blocks into remaining space.
4. Distinguish **addresses** from **usable hosts**. A lab requiring 128 total addresses gets /25; a lab requiring 128 ordinary usable hosts needs /24.

#### Practical example

A department with 100 hosts can receive /25, while one with 10 hosts can receive /28. Giving both /25 would leave more unused addresses.

### Practice question. Explain CIDR and the advantage of VLSM. [3 practice marks]

#### Answer

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.

#### Practical example

A department with 100 hosts can receive /25, while one with 10 hosts can receive /28. Giving both /25 would leave more unused addresses.

**Yaad rakho:** Hosts bola toh +2 allowance; addresses bola toh total count directly.

---

## M2 · Complete VLSM allocation · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/cidr--vlsm-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/cidr/vlsm-1

Unit 4 · classless addressing

### 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. [3 practice marks]

#### Answer

## Given

| Department | Usable hosts |
| --- | --- |
| A | 100 |
| B | 50 |
| C | 25 |
| D | 10 |

## To find

An aligned subnet for each department, usable ranges, broadcasts and remaining addresses.

## Formula and why



$$
2^h-2\geq H,\quad p=32-h
$$



Choose the smallest sufficient subnet per requirement. Align each start to its block size and never overlap a previously assigned range.

## Step-by-step solution

#### Step 1. Sort the host requirements

A (100) → B (50) → C (25) → D (10)

#### Step 2. A · choose and allocate

100 hosts require 27−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.

#### Step 3. B · choose and allocate

50 hosts require 26−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.

#### Step 4. C · choose and allocate

25 hosts require 25−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.

#### Step 5. D · choose and allocate

10 hosts require 24−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.

#### Step 6. Write the complete allocation

| Group | Hosts | Network/prefix | Mask | Usable range | Broadcast | Spare usable |
| --- | --- | --- | --- | --- | --- | --- |
| A | 100 | 192.168.10.0/25 | 255.255.255.128 | 192.168.10.1–192.168.10.126 | 192.168.10.127 | 26 |
| B | 50 | 192.168.10.128/26 | 255.255.255.192 | 192.168.10.129–192.168.10.190 | 192.168.10.191 | 12 |
| C | 25 | 192.168.10.192/27 | 255.255.255.224 | 192.168.10.193–192.168.10.222 | 192.168.10.223 | 5 |
| D | 10 | 192.168.10.224/28 | 255.255.255.240 | 192.168.10.225–192.168.10.238 | 192.168.10.239 | 4 |

#### Step 7. Count addresses reserved and left

Reserved=128+64+32+16=240. Parent total=256. Unallocated=256−240=16.

**Final answer:** 240 total addresses reserved; 16 unallocated. The table gives one valid complete allocation.

#### What this result means

Unused usable capacity inside assigned subnets is different from unallocated address space outside those subnets.

---

## M2 · Complete VLSM allocation · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/cidr--vlsm-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/cidr/vlsm-2

Unit 4 · classless addressing

### 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. [3 practice marks]

#### Answer

## Given

| Department | Usable hosts |
| --- | --- |
| Research | 60 |
| Admin | 25 |
| IoT | 12 |

## To find

An aligned subnet for each department, usable ranges, broadcasts and remaining addresses.

## Formula and why



$$
2^h-2\geq H,\quad p=32-h
$$



Choose the smallest sufficient subnet per requirement. Align each start to its block size and never overlap a previously assigned range.

## Step-by-step solution

#### Step 1. Sort the host requirements

Research (60) → Admin (25) → IoT (12)

#### Step 2. Research · choose and allocate

60 hosts require 26−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.

#### Step 3. Admin · choose and allocate

25 hosts require 25−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.

#### Step 4. IoT · choose and allocate

12 hosts require 24−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.

#### Step 5. Write the complete allocation

| Group | Hosts | Network/prefix | Mask | Usable range | Broadcast | Spare usable |
| --- | --- | --- | --- | --- | --- | --- |
| Research | 60 | 10.0.0.0/26 | 255.255.255.192 | 10.0.0.1–10.0.0.62 | 10.0.0.63 | 2 |
| Admin | 25 | 10.0.0.64/27 | 255.255.255.224 | 10.0.0.65–10.0.0.94 | 10.0.0.95 | 5 |
| IoT | 12 | 10.0.0.96/28 | 255.255.255.240 | 10.0.0.97–10.0.0.110 | 10.0.0.111 | 2 |

#### Step 6. Count addresses reserved and left

Reserved=64+32+16=112. Parent total=256. Unallocated=256−112=144.

**Final answer:** 112 total addresses reserved; 144 unallocated. The table gives one valid complete allocation.

#### What this result means

Unused usable capacity inside assigned subnets is different from unallocated address space outside those subnets.

---

## M2 · Complete VLSM allocation · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/cidr--vlsm-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/cidr/vlsm-3

Unit 4 · classless addressing

### 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. [3 practice marks]

#### Answer

## Given

| Department | Usable hosts |
| --- | --- |
| Lab | 200 |
| Staff | 100 |
| Guests | 50 |

## To find

An aligned subnet for each department, usable ranges, broadcasts and remaining addresses.

## Formula and why



$$
2^h-2\geq H,\quad p=32-h
$$



Choose the smallest sufficient subnet per requirement. Align each start to its block size and never overlap a previously assigned range.

## Step-by-step solution

#### Step 1. Sort the host requirements

Lab (200) → Staff (100) → Guests (50)

#### Step 2. Lab · choose and allocate

200 hosts require 28−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.

#### Step 3. Staff · choose and allocate

100 hosts require 27−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.

#### Step 4. Guests · choose and allocate

50 hosts require 26−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.

#### Step 5. Write the complete allocation

| Group | Hosts | Network/prefix | Mask | Usable range | Broadcast | Spare usable |
| --- | --- | --- | --- | --- | --- | --- |
| Lab | 200 | 172.16.8.0/24 | 255.255.255.0 | 172.16.8.1–172.16.8.254 | 172.16.8.255 | 54 |
| Staff | 100 | 172.16.9.0/25 | 255.255.255.128 | 172.16.9.1–172.16.9.126 | 172.16.9.127 | 26 |
| Guests | 50 | 172.16.9.128/26 | 255.255.255.192 | 172.16.9.129–172.16.9.190 | 172.16.9.191 | 12 |

#### Step 6. Count addresses reserved and left

Reserved=256+128+64=448. Parent total=512. Unallocated=512−448=64.

**Final answer:** 448 total addresses reserved; 64 unallocated. The table gives one valid complete allocation.

#### What this result means

Unused usable capacity inside assigned subnets is different from unallocated address space outside those subnets.

---

## M2 · Route aggregation: combine only a valid aligned block

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/cidr--aggregation/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/cidr/aggregation

Unit 4 · classless addressing

**Definition.** Route aggregation represents several contiguous networks by a shorter common prefix, reducing the number of advertised routing entries.

**Simple meaning.** Side-by-side blocks ko ek larger boundary mein summarize karo; gap chhupana nahi.

## Understand it step by step

1. For exact aggregation into one prefix, the component range must fill a correctly aligned power-of-two block.
2. If four consecutive /24 networks begin at a third-octet multiple of four, their exact aggregate is /22.
3. Find common leading address bits or verify alignment numerically. Consecutive networks do not always form one exact aggregate.
4. An aggregate that covers extra addresses is broader than the exact assigned range. State that explicitly instead of pretending every included address was allocated.

#### Practical example

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.

### Practice question. State two conditions for exact aggregation of equal-sized IPv4 blocks. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Consecutive + power of two + aligned start.

---

## M2 · Exact route aggregation · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/cidr--aggregate-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/cidr/aggregate-1

Unit 4 · classless addressing

### 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. [3 practice marks]

#### Answer

## Given

- 192.168.4.0/24
- 192.168.5.0/24
- 192.168.6.0/24
- 192.168.7.0/24

## To find

One prefix covering exactly the same address range.

## Formula and why



$$
\text{total addresses}=\sum_i N_i
$$





$$
p=32-\log_2(N)
$$



Adding sizes gives the candidate prefix. Contiguity and start-boundary alignment must also be satisfied.

## Step-by-step solution

#### Step 1. Determine each block size

Each input block has 256 addresses.

#### Step 2. Add the address counts

4×256=1024.

#### Step 3. Find host bits and prefix

1024=210; prefix=32−10=/22.

#### Step 4. Verify the exact range

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.

**Final answer:** 192.168.4.0/22

#### What this result means

An aggregate should not silently advertise an unrelated network.

---

## M2 · Exact route aggregation · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/cidr--aggregate-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/cidr/aggregate-2

Unit 4 · classless addressing

### Practice question. Find a single exact CIDR aggregate for these networks: 10.20.0.0/25, 10.20.0.128/25. [3 practice marks]

#### Answer

## Given

- 10.20.0.0/25
- 10.20.0.128/25

## To find

One prefix covering exactly the same address range.

## Formula and why



$$
\text{total addresses}=\sum_i N_i
$$





$$
p=32-\log_2(N)
$$



Adding sizes gives the candidate prefix. Contiguity and start-boundary alignment must also be satisfied.

## Step-by-step solution

#### Step 1. Determine each block size

Each input block has 128 addresses.

#### Step 2. Add the address counts

2×128=256.

#### Step 3. Find host bits and prefix

256=28; prefix=32−8=/24.

#### Step 4. Verify the exact range

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.

**Final answer:** 10.20.0.0/24

#### What this result means

An aggregate should not silently advertise an unrelated network.

---

## M2 · Exact route aggregation · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/cidr--aggregate-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/cidr/aggregate-3

Unit 4 · classless addressing

### Practice question. Find a single exact CIDR aggregate for these networks: 172.16.8.0/23, 172.16.10.0/23. [3 practice marks]

#### Answer

## Given

- 172.16.8.0/23
- 172.16.10.0/23

## To find

One prefix covering exactly the same address range.

## Formula and why



$$
\text{total addresses}=\sum_i N_i
$$





$$
p=32-\log_2(N)
$$



Adding sizes gives the candidate prefix. Contiguity and start-boundary alignment must also be satisfied.

## Step-by-step solution

#### Step 1. Determine each block size

Each input block has 512 addresses.

#### Step 2. Add the address counts

2×512=1024.

#### Step 3. Find host bits and prefix

1024=210; prefix=32−10=/22.

#### Step 4. Verify the exact range

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.

**Final answer:** 172.16.8.0/22

#### What this result means

An aggregate should not silently advertise an unrelated network.

---

## M2 · Longest-prefix match: choose the most specific matching route

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/cidr--forwarding/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/cidr/forwarding

Unit 4 · classless addressing

**Definition.** Longest-prefix matching selects the matching forwarding-table entry with the greatest number of prefix bits.

**Simple meaning.** Pehle match check; matching entries mein sabse bada slash choose.

## Understand it step by step

1. Compare the destination with each route’s address range. A larger prefix that does not contain the destination is irrelevant.
2. Among matching prefixes, choose the longest, such as /24 rather than /16.
3. The default route /0 matches every IPv4 destination but loses to any more specific matching entry.
4. The result tells the outgoing interface or next hop. It does not change the destination IP address.

#### Practical example

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.

### Practice question. What is longest-prefix matching? Give an example. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Bada slash only among matches.

---

## M2 · Forwarding table · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/cidr--match-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/cidr/match-1

Unit 4 · classless addressing

### Practice question. Using the table below, choose the next hop for destination 10.1.2.150 by longest-prefix matching. [3 practice marks]

#### Answer

## Given

| Network/prefix | Next hop |
| --- | --- |
| 0.0.0.0/0 | R0 |
| 10.0.0.0/8 | R1 |
| 10.1.0.0/16 | R2 |
| 10.1.2.0/24 | R3 |
| 10.1.2.128/25 | R4 |

Destination=10.1.2.150

## To find

The matching entries and selected next hop.

## Formula and why

Choose the largest prefix length among entries containing the destination.

Prefix length is considered only after confirming an address-range match.

## Step-by-step solution

#### Step 1. Check every route

| Route | Destination inside? |
| --- | --- |
| 0.0.0.0/0 | Yes |
| 10.0.0.0/8 | Yes |
| 10.1.0.0/16 | Yes |
| 10.1.2.0/24 | Yes |
| 10.1.2.128/25 | Yes |

#### Step 2. Compare matching lengths

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.

#### Step 3. Read the next hop

10.1.2.128/25 uses R4.

**Final answer:** Forward via R4 using 10.1.2.128/25.

#### What this result means

A default route is used when no more specific entry matches.

---

## M2 · Forwarding table · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/cidr--match-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/cidr/match-2

Unit 4 · classless addressing

### Practice question. Using the table below, choose the next hop for destination 10.1.2.77 by longest-prefix matching. [3 practice marks]

#### Answer

## Given

| Network/prefix | Next hop |
| --- | --- |
| 0.0.0.0/0 | R0 |
| 10.0.0.0/8 | R1 |
| 10.1.0.0/16 | R2 |
| 10.1.2.0/24 | R3 |
| 10.1.2.128/25 | R4 |

Destination=10.1.2.77

## To find

The matching entries and selected next hop.

## Formula and why

Choose the largest prefix length among entries containing the destination.

Prefix length is considered only after confirming an address-range match.

## Step-by-step solution

#### Step 1. Check every route

| Route | Destination inside? |
| --- | --- |
| 0.0.0.0/0 | Yes |
| 10.0.0.0/8 | Yes |
| 10.1.0.0/16 | Yes |
| 10.1.2.0/24 | Yes |
| 10.1.2.128/25 | No |

#### Step 2. Compare matching lengths

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.

#### Step 3. Read the next hop

10.1.2.0/24 uses R3.

**Final answer:** Forward via R3 using 10.1.2.0/24.

#### What this result means

A default route is used when no more specific entry matches.

---

## M2 · Forwarding table · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/cidr--match-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/cidr/match-3

Unit 4 · classless addressing

### Practice question. Using the table below, choose the next hop for destination 192.0.2.9 by longest-prefix matching. [3 practice marks]

#### Answer

## Given

| Network/prefix | Next hop |
| --- | --- |
| 0.0.0.0/0 | R0 |
| 10.0.0.0/8 | R1 |
| 10.1.0.0/16 | R2 |
| 10.1.2.0/24 | R3 |
| 10.1.2.128/25 | R4 |

Destination=192.0.2.9

## To find

The matching entries and selected next hop.

## Formula and why

Choose the largest prefix length among entries containing the destination.

Prefix length is considered only after confirming an address-range match.

## Step-by-step solution

#### Step 1. Check every route

| Route | Destination inside? |
| --- | --- |
| 0.0.0.0/0 | Yes |
| 10.0.0.0/8 | No |
| 10.1.0.0/16 | No |
| 10.1.2.0/24 | No |
| 10.1.2.128/25 | No |

#### Step 2. Compare matching lengths

0.0.0.0/0. The longest is 0.0.0.0/0.

#### Step 3. Read the next hop

0.0.0.0/0 uses R0.

**Final answer:** Forward via R0 using 0.0.0.0/0.

#### What this result means

A default route is used when no more specific entry matches.

---

## M2 · IPv6: eight hexadecimal groups

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv6--structure/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv6/structure

Unit 4 · IPv6

**Definition.** IPv6 uses 128-bit addresses, conventionally represented by eight groups of four hexadecimal digits separated by colons.

**Simple meaning.** IPv4 mein 4 decimal boxes; IPv6 mein 8 hexadecimal groups.

Swipe across the diagram to read its labels ↔

![IPv6: 8 groups × 16 bits = 128 bits](https://deep-learning-study-room.vercel.app/cn/fig/ipv6-address.25497337ae.svg)

Diagram: IPv6: 8 groups × 16 bits = 128 bits. Labels: IPv6: 8 groups × 16 bits = 128 bits | IPv6: 8 groups × 16 bits = 128 bits | 2001 | 16 bits | 0db8 | 16 bits | 0000 | 16 bits | 0000 | 16 bits | 0000 | 16 bits | 0000 | 16 bits | 0000 | 16 bits | 0001 | 16 bits | One hexadecimal digit = 4 bits; one four-digit group = 16 bits. | Compact form: 2001:db8::1

IPv6: eight hexadecimal groups

## Understand it step by step

1. 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.
2. Four hex digits represent 16 bits, called one hextet/group. Eight groups represent 8×16=128 bits.
3. Leading zeroes within a group may be omitted: 00ab becomes ab, but ab00 must not become ab.
4. A run of all-zero groups may be abbreviated by :: once in an address. Using :: twice makes the missing group counts ambiguous.

| Hex | Decimal | Four bits |
| --- | --- | --- |
| 0 | 0 | 0000 |
| 1 | 1 | 0001 |
| 2 | 2 | 0010 |
| 3 | 3 | 0011 |
| 4 | 4 | 0100 |
| 5 | 5 | 0101 |
| 6 | 6 | 0110 |
| 7 | 7 | 0111 |
| 8 | 8 | 1000 |
| 9 | 9 | 1001 |
| a | 10 | 1010 |
| b | 11 | 1011 |
| c | 12 | 1100 |
| d | 13 | 1101 |
| e | 14 | 1110 |
| f | 15 | 1111 |

#### Practical example

2001:0db8:0000:0000:0000:0000:0000:0001 contains eight groups. A compact representation is 2001:db8::1.

### Practice question. Describe the format of an IPv6 address and two abbreviation rules. [3 practice marks]

#### Answer

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.

#### Practical example

2001:0db8:0000:0000:0000:0000:0000:0001 contains eight groups. A compact representation is 2001:db8::1.

**Yaad rakho:** 8 groups × 4 hex digits × 4 bits = 128.

---

## M2 · Expand :: by counting visible groups

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv6--expansion/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv6/expansion

Unit 4 · IPv6

**Definition.** IPv6 expansion restores exactly eight groups, each written with four hexadecimal digits.

**Simple meaning.** Visible groups count karo; 8 mein se minus; utne zero groups :: ki jagah.

## Understand it step by step

1. Count groups on the left of :: and on its right. The double colon itself is not an additional visible group.
2. Missing zero groups = 8−visible groups. Insert them at the location of ::.
3. Pad every group on the left with zeroes until it has four digits. Do not pad on the right.
4. Count the final result: exactly eight groups must appear. A written group “0” already counts as one visible group.

#### Practical example

In 0:15::1:12:1213, five groups are visible: 0,15,1,12,1213. Therefore :: supplies three groups of 0000, not four.

### Practice question. Explain how to expand an abbreviated IPv6 address containing ::. [3 practice marks]

#### Answer

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.

#### Practical example

In 0:15::1:12:1213, five groups are visible: 0,15,1,12,1213. Therefore :: supplies three groups of 0000, not four.

**Yaad rakho:** Already-written 0 ko bhi count karna.

---

## M2 · Expand IPv6 · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv6--expand-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv6/expand-1

Unit 4 · IPv6

### Practice question. Expand the IPv6 address 0:15::1:12:1213 into eight groups of four hexadecimal digits. [3 practice marks]

#### Answer

## Given

Given address: `0:15::1:12:1213`.

## To find

The full 128-bit address in eight-group hexadecimal notation.

## Formula and why



$$
\text{missing groups}=8-\text{visible groups}
$$



A written 0 is a visible group. :: represents only the omitted all-zero groups.

## Step-by-step solution

#### Step 1. Count groups on both sides

Left: 0, 15 (2 group(s)). Right: 1, 12, 1213 (3 group(s)).

#### Step 2. Calculate omitted groups

Visible=2+3=5. Missing=8−5=3.

#### Step 3. Insert the groups

`0:15:0:0:0:1:12:1213`.

#### Step 4. Pad each group on the left

| Group number | Four-digit group |
| --- | --- |
| 1 | 0000 |
| 2 | 0015 |
| 3 | 0000 |
| 4 | 0000 |
| 5 | 0000 |
| 6 | 0001 |
| 7 | 0012 |
| 8 | 1213 |

#### Step 5. Write all eight in order

`0000:0015:0000:0000:0000:0001:0012:1213`.

**Final answer:** `0000:0015:0000:0000:0000:0001:0012:1213`

#### What this result means

Leading zeros change the spelling, not the address value. The final group count is eight.

---

## M2 · Expand IPv6 · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv6--expand-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv6/expand-2

Unit 4 · IPv6

### Practice question. Expand the IPv6 address 2001:db8:0:1::9 into eight groups of four hexadecimal digits. [3 practice marks]

#### Answer

## Given

Given address: `2001:db8:0:1::9`.

## To find

The full 128-bit address in eight-group hexadecimal notation.

## Formula and why



$$
\text{missing groups}=8-\text{visible groups}
$$



A written 0 is a visible group. :: represents only the omitted all-zero groups.

## Step-by-step solution

#### Step 1. Count groups on both sides

Left: 2001, db8, 0, 1 (4 group(s)). Right: 9 (1 group(s)).

#### Step 2. Calculate omitted groups

Visible=4+1=5. Missing=8−5=3.

#### Step 3. Insert the groups

`2001:db8:0:1:0:0:0:9`.

#### Step 4. Pad each group on the left

| Group number | Four-digit group |
| --- | --- |
| 1 | 2001 |
| 2 | 0db8 |
| 3 | 0000 |
| 4 | 0001 |
| 5 | 0000 |
| 6 | 0000 |
| 7 | 0000 |
| 8 | 0009 |

#### Step 5. Write all eight in order

`2001:0db8:0000:0001:0000:0000:0000:0009`.

**Final answer:** `2001:0db8:0000:0001:0000:0000:0000:0009`

#### What this result means

Leading zeros change the spelling, not the address value. The final group count is eight.

---

## M2 · Expand IPv6 · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv6--expand-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv6/expand-3

Unit 4 · IPv6

### Practice question. Expand the IPv6 address ::1 into eight groups of four hexadecimal digits. [3 practice marks]

#### Answer

## Given

Given address: `::1`.

## To find

The full 128-bit address in eight-group hexadecimal notation.

## Formula and why



$$
\text{missing groups}=8-\text{visible groups}
$$



A written 0 is a visible group. :: represents only the omitted all-zero groups.

## Step-by-step solution

#### Step 1. Count groups on both sides

Left: none (0 group(s)). Right: 1 (1 group(s)).

#### Step 2. Calculate omitted groups

Visible=0+1=1. Missing=8−1=7.

#### Step 3. Insert the groups

`0:0:0:0:0:0:0:1`.

#### Step 4. Pad each group on the left

| Group number | Four-digit group |
| --- | --- |
| 1 | 0000 |
| 2 | 0000 |
| 3 | 0000 |
| 4 | 0000 |
| 5 | 0000 |
| 6 | 0000 |
| 7 | 0000 |
| 8 | 0001 |

#### Step 5. Write all eight in order

`0000:0000:0000:0000:0000:0000:0000:0001`.

**Final answer:** `0000:0000:0000:0000:0000:0000:0000:0001`

#### What this result means

Leading zeros change the spelling, not the address value. The final group count is eight.

---

## M2 · Expand IPv6 · example 4

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv6--expand-4/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv6/expand-4

Unit 4 · IPv6

### Practice question. Expand the IPv6 address fe80::abcd:ef12 into eight groups of four hexadecimal digits. [3 practice marks]

#### Answer

## Given

Given address: `fe80::abcd:ef12`.

## To find

The full 128-bit address in eight-group hexadecimal notation.

## Formula and why



$$
\text{missing groups}=8-\text{visible groups}
$$



A written 0 is a visible group. :: represents only the omitted all-zero groups.

## Step-by-step solution

#### Step 1. Count groups on both sides

Left: fe80 (1 group(s)). Right: abcd, ef12 (2 group(s)).

#### Step 2. Calculate omitted groups

Visible=1+2=3. Missing=8−3=5.

#### Step 3. Insert the groups

`fe80:0:0:0:0:0:abcd:ef12`.

#### Step 4. Pad each group on the left

| Group number | Four-digit group |
| --- | --- |
| 1 | fe80 |
| 2 | 0000 |
| 3 | 0000 |
| 4 | 0000 |
| 5 | 0000 |
| 6 | 0000 |
| 7 | abcd |
| 8 | ef12 |

#### Step 5. Write all eight in order

`fe80:0000:0000:0000:0000:0000:abcd:ef12`.

**Final answer:** `fe80:0000:0000:0000:0000:0000:abcd:ef12`

#### What this result means

Leading zeros change the spelling, not the address value. The final group count is eight.

---

## M2 · Write the shortest standard IPv6 representation

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv6--compression/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv6/compression

Unit 4 · IPv6

**Definition.** Canonical IPv6 text formatting removes leading zeros and compresses the longest eligible run of consecutive zero groups.

**Simple meaning.** Group ke left wale zero hatao; sabse lambi zero-chain ko :: banao.

## Understand it step by step

1. Remove leading zeroes from each group, retaining one zero if the whole group is zero. Use lowercase hex letters for canonical text.
2. Select the longest run of consecutive zero groups. If two runs tie, compress the leftmost run.
3. For the recommended canonical form, do not use :: to compress just one zero group.
4. Use :: only once. Expanding your compressed result should recover the original address.

#### Practical example

2001:0db8:0000:0000:0012:0000:0000:0001 has two equal two-zero runs. Compress the first: 2001:db8::12:0:0:1.

### Practice question. State the canonical rule when two zero runs have equal length in IPv6. [3 practice marks]

#### Answer

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.

#### Practical example

2001:0db8:0000:0000:0012:0000:0000:0001 has two equal two-zero runs. Compress the first: 2001:db8::12:0:0:1.

**Yaad rakho:** Longest first; tie hua toh leftmost.

---

## M2 · Compress IPv6 · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv6--compress-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv6/compress-1

Unit 4 · IPv6

### Practice question. Write 2001:0db8:0000:0000:0012:0000:0000:0001 in canonical compressed IPv6 notation. [3 practice marks]

#### Answer

## Given

`2001:0db8:0000:0000:0012:0000:0000:0001`.

## To find

A canonical shortened spelling of the same address.

## Formula and why

Remove leading zeroes; compress the longest run of at least two zero groups; choose the leftmost tied run.

These rules preserve all 128 bits while removing redundant writing.

## Step-by-step solution

#### Step 1. Shorten individual groups

`2001:db8:0:0:12:0:0:1`.

#### Step 2. Locate zero runs

groups 3–4: 2 zero group(s); groups 6–7: 2 zero group(s).

#### Step 3. Select an eligible run

Compress groups 3–4.

#### Step 4. Write the result

`2001:db8::12:0:0:1`.

**Final answer:** `2001:db8::12:0:0:1`

#### What this result means

The address remains unchanged; only its representation is shortened.

---

## M2 · Compress IPv6 · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv6--compress-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv6/compress-2

Unit 4 · IPv6

### Practice question. Write 2001:0db8:0000:0001:0002:0003:0004:0005 in canonical compressed IPv6 notation. [3 practice marks]

#### Answer

## Given

`2001:0db8:0000:0001:0002:0003:0004:0005`.

## To find

A canonical shortened spelling of the same address.

## Formula and why

Remove leading zeroes; compress the longest run of at least two zero groups; choose the leftmost tied run.

These rules preserve all 128 bits while removing redundant writing.

## Step-by-step solution

#### Step 1. Shorten individual groups

`2001:db8:0:1:2:3:4:5`.

#### Step 2. Locate zero runs

groups 3–3: 1 zero group(s).

#### Step 3. Select an eligible run

No run has two or more groups, so do not use ::.

#### Step 4. Write the result

`2001:db8:0:1:2:3:4:5`.

**Final answer:** `2001:db8:0:1:2:3:4:5`

#### What this result means

The address remains unchanged; only its representation is shortened.

---

## M2 · Compress IPv6 · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv6--compress-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv6/compress-3

Unit 4 · IPv6

### Practice question. Write 0000:0000:0000:0000:0000:0000:0000:0000 in canonical compressed IPv6 notation. [3 practice marks]

#### Answer

## Given

`0000:0000:0000:0000:0000:0000:0000:0000`.

## To find

A canonical shortened spelling of the same address.

## Formula and why

Remove leading zeroes; compress the longest run of at least two zero groups; choose the leftmost tied run.

These rules preserve all 128 bits while removing redundant writing.

## Step-by-step solution

#### Step 1. Shorten individual groups

`0:0:0:0:0:0:0:0`.

#### Step 2. Locate zero runs

groups 1–8: 8 zero group(s).

#### Step 3. Select an eligible run

Compress groups 1–8.

#### Step 4. Write the result

`::`.

**Final answer:** `::`

#### What this result means

The address remains unchanged; only its representation is shortened.

---

## M2 · IPv6 base header: every field and its purpose

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv6--header/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv6/header

Unit 4 · IPv6

**Definition.** 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.

**Simple meaning.** Base header fixed 40 bytes; extra information extension headers mein.

Swipe across the diagram to read its labels ↔

![IPv6 base header · each horizontal row is 32 bits wide](https://deep-learning-study-room.vercel.app/cn/fig/ipv6-header.aef1bfbac7.svg)

Diagram: IPv6 base header · each horizontal row is 32 bits wide. Labels: IPv6 base header · each horizontal row is 32 bits wide | IPv6 base header · each horizontal row is 32 bits wide | Version | 4 | Traffic Class | 8 | Flow Label · 20 | Payload Length · 16 | Next Header | 8 | Hop Limit | 8 | Source address · 128 bits (four rows) | Destination address · 128 bits (four rows)

IPv6 base header: every field and its purpose

## Understand it step by step

1. 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.
2. The first two rows together contribute 64 bits; source and destination contribute 256 bits. Total=320 bits=40 bytes.
3. Payload Length counts bytes after the base header, including extension headers when present. It does not include the base 40 bytes.
4. Next Header permits chaining: a base header may point to an extension, which points to another extension or TCP/UDP.
5. 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.

| Field | Bits | Purpose |
| --- | --- | --- |
| Version | 4 | Value 6 |
| Traffic Class | 8 | Traffic treatment/congestion-related marking |
| Flow Label | 20 | Identifies a flow for appropriate handling |
| Payload Length | 16 | Bytes after the base header; includes extension headers when present |
| Next Header | 8 | Type of the next extension header or upper-layer protocol |
| Hop Limit | 8 | Decremented on forwarding; limits packet lifetime in hops |
| Source address | 128 | Sending interface address |
| Destination address | 128 | Destination address |

#### Practical example

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.

### Practice question. Draw the IPv6 base header and explain its fields. [3 practice marks]

#### Answer

Swipe across the diagram to read its labels ↔

![IPv6 base header · each horizontal row is 32 bits wide](https://deep-learning-study-room.vercel.app/cn/fig/ipv6-header.aef1bfbac7.svg)

Diagram: IPv6 base header · each horizontal row is 32 bits wide. Labels: IPv6 base header · each horizontal row is 32 bits wide | IPv6 base header · each horizontal row is 32 bits wide | Version | 4 | Traffic Class | 8 | Flow Label · 20 | Payload Length · 16 | Next Header | 8 | Hop Limit | 8 | Source address · 128 bits (four rows) | Destination address · 128 bits (four rows)

IPv6 base header: 40 bytes.

| Field | Bits | Purpose |
| --- | --- | --- |
| Version | 4 | Value 6 |
| Traffic Class | 8 | Traffic treatment/congestion-related marking |
| Flow Label | 20 | Identifies a flow for appropriate handling |
| Payload Length | 16 | Bytes after the base header; includes extension headers when present |
| Next Header | 8 | Type of the next extension header or upper-layer protocol |
| Hop Limit | 8 | Decremented on forwarding; limits packet lifetime in hops |
| Source address | 128 | Sending interface address |
| Destination address | 128 | Destination address |

#### Practical example

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.

**Yaad rakho:** IPv6: 40 fixed; payload field excludes those 40.

---

## M2 · IPv4 versus IPv6 headers and address types

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv6--compare/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv6/compare

Unit 4 · IPv6

**Definition.** IPv6 extends address size and reorganizes IP forwarding information into a fixed base header with extension headers.

**Simple meaning.** Sirf address bada nahi; header ka arrangement bhi badla.

## Understand it step by step

1. IPv6 uses unicast, multicast and anycast addressing; it does not use IPv4-style broadcast addressing.
2. Unicast identifies an interface; multicast addresses a group; anycast reaches one appropriate member of a group sharing an address, according to routing.
3. ::1 is loopback. fe80::/10 is link-local space. ff00::/8 identifies multicast. These serve different purposes.
4. IPv6 neighbour discovery replaces IPv4 ARP mechanisms. Do not write that IPv6 uses ARP to map its addresses.
5. IPv6 is not automatically encrypted or secure merely because it has a larger address space. Security depends on the mechanisms deployed.

| Feature | IPv4 | IPv6 |
| --- | --- | --- |
| Address width | 32 bits | 128 bits |
| Base/header size | 20–60 bytes depending on options | 40-byte fixed base header |
| Length field | Total length includes IPv4 header | Payload Length excludes 40-byte base header |
| Lifetime field | TTL | Hop Limit |
| Following protocol | Protocol field | Next Header; may identify an extension |
| Header checksum | Present | No base-header checksum |
| Options | Inside IPv4 header | Typically extension headers |
| Fragmentation fields | In IPv4 header; routers may fragment if permitted | Fragment extension header; fragmentation by source, not routers |

#### Practical example

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.

### Practice question. Compare the IPv4 and IPv6 packet headers. [3 practice marks]

#### Answer

| Feature | IPv4 | IPv6 |
| --- | --- | --- |
| Address width | 32 bits | 128 bits |
| Base/header size | 20–60 bytes depending on options | 40-byte fixed base header |
| Length field | Total length includes IPv4 header | Payload Length excludes 40-byte base header |
| Lifetime field | TTL | Hop Limit |
| Following protocol | Protocol field | Next Header; may identify an extension |
| Header checksum | Present | No base-header checksum |
| Options | Inside IPv4 header | Typically extension headers |
| Fragmentation fields | In IPv4 header; routers may fragment if permitted | Fragment extension header; fragmentation by source, not routers |

#### Practical example

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.

**Yaad rakho:** v4 total length; v6 payload length.

---

## M2 · IPv6 packet length · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv6--length-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv6/length-1

Unit 4 · IPv6

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

Base=40 bytes; extensions=0 bytes; upper-layer content=1000 bytes. Ordinary non-jumbo packet.

## To find

Payload Length and total bytes.

## Formula and why



$$
P=E+D,\qquad T=40+P
$$



Payload begins immediately after the IPv6 base header. Extensions are part of that payload.

## Step-by-step solution

#### Step 1. Calculate payload

P=0+1000=1000 bytes.

#### Step 2. Add the base header

T=40+1000=1040 bytes.

#### Step 3. Identify the stored field

The Payload Length field stores 1000, not 1040.

**Final answer:** Payload Length=1000; total=1040 bytes.

#### What this result means

Do not count the base header twice or leave extension-header bytes out of the payload length.

---

## M2 · IPv6 packet length · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv6--length-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv6/length-2

Unit 4 · IPv6

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

Base=40 bytes; extensions=24 bytes; upper-layer content=1200 bytes. Ordinary non-jumbo packet.

## To find

Payload Length and total bytes.

## Formula and why



$$
P=E+D,\qquad T=40+P
$$



Payload begins immediately after the IPv6 base header. Extensions are part of that payload.

## Step-by-step solution

#### Step 1. Calculate payload

P=24+1200=1224 bytes.

#### Step 2. Add the base header

T=40+1224=1264 bytes.

#### Step 3. Identify the stored field

The Payload Length field stores 1224, not 1264.

**Final answer:** Payload Length=1224; total=1264 bytes.

#### What this result means

Do not count the base header twice or leave extension-header bytes out of the payload length.

---

## M2 · IPv6 packet length · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv6--length-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/ipv6/length-3

Unit 4 · IPv6

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

Base=40 bytes; extensions=40 bytes; upper-layer content=500 bytes. Ordinary non-jumbo packet.

## To find

Payload Length and total bytes.

## Formula and why



$$
P=E+D,\qquad T=40+P
$$



Payload begins immediately after the IPv6 base header. Extensions are part of that payload.

## Step-by-step solution

#### Step 1. Calculate payload

P=40+500=540 bytes.

#### Step 2. Add the base header

T=40+540=580 bytes.

#### Step 3. Identify the stored field

The Payload Length field stores 540, not 580.

**Final answer:** Payload Length=540; total=580 bytes.

#### What this result means

Do not count the base header twice or leave extension-header bytes out of the payload length.

---

## M2 · ARP: find the local next-hop MAC address

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/mapping--arp/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/mapping/arp

Unit 4 · address mapping and configuration

**Definition.** Address Resolution Protocol (ARP) resolves a known IPv4 address to a link-layer hardware address on the local network.

**Simple meaning.** IP pata hai; local delivery ke liye MAC chahiye.

Swipe across the diagram to read its labels ↔

![ARP resolves the selected local next hop](https://deep-learning-study-room.vercel.app/cn/fig/arp.c8af39ddb3.svg)

Diagram: ARP resolves the selected local next hop. Labels: ARP resolves the selected local next hop | ARP resolves the selected local next hop | 1. Decide local destination or gateway | Compare the destination with the local prefix. | 2. Look in the ARP cache | If the next-hop mapping is missing, send a local broadcast request. | 3. Receive the mapping | The address owner normally replies with its hardware address. | 4. Build the local frame | Use that MAC for the next link; retain the final destination IP.

ARP: find the local next-hop MAC address

## Understand it step by step

1. 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.
2. Check the ARP cache. If the next-hop mapping is absent, broadcast an ARP request on the local link.
3. The owner of the requested IPv4 address normally replies with its hardware address. The sender caches the mapping and constructs its data frame.
4. 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.

#### Practical example

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.

### Practice question. Explain the working of ARP with a suitable example. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Remote packet ka next-hop MAC gateway ka hota hai.

---

## M2 · ARP decision · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/mapping--next-hop-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/mapping/next-hop-1

Unit 4 · address mapping and configuration

### 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. [3 practice marks]

#### Answer

## Given

H=192.168.1.10/24; gateway=192.168.1.1; destination=192.168.1.20.

## To find

Local/remote decision and ARP target.

## Formula and why

Compare source and destination network prefixes using the source mask. ARP resolves the selected local next-hop IP.

The IP destination stays the final destination; the Ethernet next-hop address depends on whether that destination is local.

## Step-by-step solution

#### Step 1. Determine H’s subnet

With /24, H is in 192.168.1.0–192.168.1.255.

#### Step 2. Compare the destination

192.168.1.20 is inside that block, so delivery is local.

#### Step 3. Select ARP target

Resolve 192.168.1.20 using ARP.

#### Step 4. Separate packet and frame destinations

IP destination remains 192.168.1.20; frame destination is that host’s MAC.

**Final answer:** ARP target: 192.168.1.20.

#### What this result means

ARP is a local-link operation. A remote packet is sent to a local router for its next step.

---

## M2 · ARP decision · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/mapping--next-hop-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/mapping/next-hop-2

Unit 4 · address mapping and configuration

### 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. [3 practice marks]

#### Answer

## Given

H=192.168.1.10/24; gateway=192.168.1.1; destination=203.0.113.7.

## To find

Local/remote decision and ARP target.

## Formula and why

Compare source and destination network prefixes using the source mask. ARP resolves the selected local next-hop IP.

The IP destination stays the final destination; the Ethernet next-hop address depends on whether that destination is local.

## Step-by-step solution

#### Step 1. Determine H’s subnet

With /24, H is in 192.168.1.0–192.168.1.255.

#### Step 2. Compare the destination

203.0.113.7 is outside that block, so use a router.

#### Step 3. Select ARP target

Resolve 192.168.1.1 using ARP.

#### Step 4. Separate packet and frame destinations

IP destination remains 203.0.113.7; frame destination is the gateway’s MAC.

**Final answer:** ARP target: 192.168.1.1.

#### What this result means

ARP is a local-link operation. A remote packet is sent to a local router for its next step.

---

## M2 · ARP decision · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/mapping--next-hop-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/mapping/next-hop-3

Unit 4 · address mapping and configuration

### 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. [3 practice marks]

#### Answer

## Given

H=192.168.1.10/24; gateway=192.168.1.1; destination=192.168.2.20.

## To find

Local/remote decision and ARP target.

## Formula and why

Compare source and destination network prefixes using the source mask. ARP resolves the selected local next-hop IP.

The IP destination stays the final destination; the Ethernet next-hop address depends on whether that destination is local.

## Step-by-step solution

#### Step 1. Determine H’s subnet

With /24, H is in 192.168.1.0–192.168.1.255.

#### Step 2. Compare the destination

192.168.2.20 is outside that block, so use a router.

#### Step 3. Select ARP target

Resolve 192.168.1.1 using ARP.

#### Step 4. Separate packet and frame destinations

IP destination remains 192.168.2.20; frame destination is the gateway’s MAC.

**Final answer:** ARP target: 192.168.1.1.

#### What this result means

ARP is a local-link operation. A remote packet is sent to a local router for its next step.

---

## M2 · RARP: the reverse historical mapping

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/mapping--rarp/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/mapping/rarp

Unit 4 · address mapping and configuration

**Definition.** Reverse ARP (RARP) allows a client that knows its hardware address to obtain its IPv4 address from a RARP server.

**Simple meaning.** ARP: IP se MAC. RARP: MAC se IP.

## Understand it step by step

1. Historically, a diskless machine could know its hardware address but need its configured IP address during boot.
2. It broadcasts a RARP request containing its hardware address. A server consults a configured mapping and returns an IP address.
3. RARP supplies much less configuration than DHCP and operates at the local link level. It is mainly a historical protocol in this syllabus.
4. Do not describe RARP as finding an arbitrary remote host by name; DNS is a different service and outside this M2 portion.

#### Practical example

A diskless workstation with a pre-registered hardware address could use RARP to learn its assigned IPv4 address from a local RARP server.

### Practice question. Differentiate ARP and RARP. [3 practice marks]

#### Answer

| Protocol | Known | Needed | Use |
| --- | --- | --- | --- |
| ARP | Local next-hop IPv4 | MAC/hardware address | Local frame delivery |
| RARP | Client hardware address | Client IPv4 | Historical boot-time assignment |

#### Practical example

A diskless workstation with a pre-registered hardware address could use RARP to learn its assigned IPv4 address from a local RARP server.

**Yaad rakho:** RARP reverse karta hai; DHCP configuration badhata hai.

---

## M2 · DHCP: automatic configuration through DORA

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/mapping--dhcp/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/mapping/dhcp

Unit 4 · address mapping and configuration

**Definition.** Dynamic Host Configuration Protocol (DHCP) provides IP configuration parameters to clients and can lease reusable addresses for limited periods.

**Simple meaning.** DORA = Discover, Offer, Request, Acknowledge.

Swipe across the diagram to read its labels ↔

![DHCP initial allocation: DORA](https://deep-learning-study-room.vercel.app/cn/fig/dhcp.510e8eca42.svg)

Diagram: DHCP initial allocation: DORA. Labels: DHCP initial allocation: DORA | DHCP initial allocation: DORA | Client | Server | DISCOVER | OFFER | REQUEST | ACK | Client asks → server offers → client chooses → server confirms.

DHCP: automatic configuration through DORA

## Understand it step by step

1. **Discover:** a new client looks for DHCP servers. With no configured IPv4 address, it commonly starts from 0.0.0.0 and uses broadcast discovery.
2. **Offer:** a server offers an address and configuration, such as subnet mask, lease information and other options.
3. **Request:** the client indicates the selected offer and requested address. In initial allocation this also informs other servers of its choice.
4. **Acknowledge:** the selected server confirms the lease/configuration. The client can then use the address after the required checks.
5. 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.

#### Practical example

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.

### Practice question. Explain the four initial DHCP messages and state its purpose. [3 practice marks]

#### Answer

1. DHCPDISCOVER: client searches for a server.
2. DHCPOFFER: server proposes an address/configuration.
3. DHCPREQUEST: client requests the chosen allocation.
4. DHCPACK: server confirms the lease.

DHCP reduces manual configuration and supports controlled address reuse through leases.

#### Practical example

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.

**Yaad rakho:** Discover–Offer–Request–ACK; pehle D, phir O, phir R, phir A.

---

## M2 · DHCP leases, renewal and a relay

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/mapping--lease/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/mapping/lease

Unit 4 · address mapping and configuration

**Optional worked extension.** 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.

**Definition.** A DHCP lease grants use of an address for a specified lifetime; renewal extends that permission, while a relay supports communication across subnets.

**Simple meaning.** Address permanent gift nahi: time-limited lease, phir renew.

## Understand it step by step

1. In ordinary DHCPv4 defaults, renewal begins at T1=50% of the lease and rebinding at T2=87.5%, unless the server supplies different values.
2. At T1 a client attempts renewal with its original server. At T2 it can seek renewal from any suitable server.
3. If the lease expires without extension, the client must stop using the leased address. Successful renewal restarts the relevant lease timing.
4. A relay forwards DHCP messages between subnets. It is not the same as a router forwarding every broadcast indiscriminately.

#### Practical example

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.

### Practice question. What is a DHCP lease? Why is a DHCP relay used? [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Lease = limited time; relay = subnet ke paar DHCP support.

---

## M2 · DHCP timer example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/mapping--lease-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/mapping/lease-1

Unit 4 · address mapping and configuration

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

Lease duration L=8 h; use default fractional timers.

## To find

T1 and T2 as elapsed times.

## Formula and why



$$
T_1=0.5L,\qquad T_2=0.875L
$$



Use these defaults only when the server/question has not specified other timer values.

## Step-by-step solution

#### Step 1. Renewal timer

T1=0.5×8=4 h.

#### Step 2. Rebinding timer

T2=0.875×8=7 h.

#### Step 3. Place them before expiry

4 h < 7 h < 8 h.

**Final answer:** T1=4 h; T2=7 h.

#### What this result means

These are elapsed times, not wall-clock times. Add them to the stated acquisition time only when a clock time is requested.

---

## M2 · DHCP timer example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/mapping--lease-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/mapping/lease-2

Unit 4 · address mapping and configuration

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

Lease duration L=16 h; use default fractional timers.

## To find

T1 and T2 as elapsed times.

## Formula and why



$$
T_1=0.5L,\qquad T_2=0.875L
$$



Use these defaults only when the server/question has not specified other timer values.

## Step-by-step solution

#### Step 1. Renewal timer

T1=0.5×16=8 h.

#### Step 2. Rebinding timer

T2=0.875×16=14 h.

#### Step 3. Place them before expiry

8 h < 14 h < 16 h.

**Final answer:** T1=8 h; T2=14 h.

#### What this result means

These are elapsed times, not wall-clock times. Add them to the stated acquisition time only when a clock time is requested.

---

## M2 · DHCP timer example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/mapping--lease-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/mapping/lease-3

Unit 4 · address mapping and configuration

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

Lease duration L=24 h; use default fractional timers.

## To find

T1 and T2 as elapsed times.

## Formula and why



$$
T_1=0.5L,\qquad T_2=0.875L
$$



Use these defaults only when the server/question has not specified other timer values.

## Step-by-step solution

#### Step 1. Renewal timer

T1=0.5×24=12 h.

#### Step 2. Rebinding timer

T2=0.875×24=21 h.

#### Step 3. Place them before expiry

12 h < 21 h < 24 h.

**Final answer:** T1=12 h; T2=21 h.

#### What this result means

These are elapsed times, not wall-clock times. Add them to the stated acquisition time only when a clock time is requested.

---

## M2 · Routing, forwarding, distance and next hop

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/routing--vocabulary/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/routing/vocabulary

Unit 4 · shortest paths and routing tables

**Definition.** Routing discovers or computes paths through a network; forwarding uses a table to send an individual packet toward the selected next hop.

**Simple meaning.** Routing table banata hai; forwarding us table ko use karta hai.

## Understand it step by step

1. A route contains a destination prefix and an outgoing interface or next hop. A metric measures the desirability/cost of that route.
2. 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.
3. A shortest-path algorithm maintains a tentative distance from the source to each vertex. Start the source at 0 and all others at ∞.
4. 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.
5. A next hop is the first router after the source on that path. It is different from a final destination’s immediate predecessor.

#### Practical example

For path A→C→D→G, G’s predecessor is D, but A’s next hop toward G is C.

### Practice question. Differentiate routing and forwarding, with an example. [3 practice marks]

#### Answer

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.

#### Practical example

For path A→C→D→G, G’s predecessor is D, but A’s next hop toward G is C.

**Yaad rakho:** Predecessor = pichhla node; next hop = source ke baad pehla node.

---

## M2 · Relaxation: replace an old route only when the candidate is cheaper

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/routing--relaxation/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/routing/relaxation

Unit 4 · shortest paths and routing tables

**Definition.** 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.

**Simple meaning.** Purana cost versus u tak ka cost + u→v edge. Jo chhota, woh rakho.

## Understand it step by step

1. Suppose d[u]=4, edge cost w(u,v)=3, and current d[v]=10. The candidate via u is 4+3=7.
2. Because 7<10, replace d[v] with 7 and set predecessor[v]=u.
3. 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.
4. If u is unreachable (d[u]=∞), it cannot yet provide a finite route to v.



$$
d[v]\leftarrow\min\bigl(d[v],d[u]+w(u,v)\bigr)
$$



#### Practical example

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.

### Practice question. What does edge relaxation mean in a shortest-path algorithm? [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Add path + edge, compare, then replace only if smaller.

---

## M2 · One edge relaxation · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/routing--relax-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/routing/relax-1

Unit 4 · shortest paths and routing tables

### 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. [3 practice marks]

#### Answer

## Given

d[U]=4; w(U,V)=3; old d[V]=10.

## To find

New d[V] and predecessor action.

## Formula and why



$$
c=d[U]+w(U,V),\quad d[V]_{\mathrm{new}}=\min(d[V]_{\mathrm{old}},c)
$$



The candidate contains both the cost to U and the final edge to V.

## Step-by-step solution

#### Step 1. Compute candidate

4+(3)=7.

#### Step 2. Compare with old distance

min(10,7)=7.

#### Step 3. Update the predecessor if improved

Set predecessor[V]=U.

**Final answer:** New d[V]=7.

#### What this result means

A negative edge weight is allowed in Bellman–Ford exercises, but not in the standard Dijkstra method taught here.

---

## M2 · One edge relaxation · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/routing--relax-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/routing/relax-2

Unit 4 · shortest paths and routing tables

### 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. [3 practice marks]

#### Answer

## Given

d[U]=5; w(U,V)=4; old d[V]=7.

## To find

New d[V] and predecessor action.

## Formula and why



$$
c=d[U]+w(U,V),\quad d[V]_{\mathrm{new}}=\min(d[V]_{\mathrm{old}},c)
$$



The candidate contains both the cost to U and the final edge to V.

## Step-by-step solution

#### Step 1. Compute candidate

5+(4)=9.

#### Step 2. Compare with old distance

min(7,9)=7.

#### Step 3. Update the predecessor if improved

Keep the existing predecessor; the candidate does not improve the route.

**Final answer:** New d[V]=7.

#### What this result means

A negative edge weight is allowed in Bellman–Ford exercises, but not in the standard Dijkstra method taught here.

---

## M2 · One edge relaxation · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/routing--relax-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/routing/relax-3

Unit 4 · shortest paths and routing tables

### 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. [3 practice marks]

#### Answer

## Given

d[U]=6; w(U,V)=-2; old d[V]=9.

## To find

New d[V] and predecessor action.

## Formula and why



$$
c=d[U]+w(U,V),\quad d[V]_{\mathrm{new}}=\min(d[V]_{\mathrm{old}},c)
$$



The candidate contains both the cost to U and the final edge to V.

## Step-by-step solution

#### Step 1. Compute candidate

6+(-2)=4.

#### Step 2. Compare with old distance

min(9,4)=4.

#### Step 3. Update the predecessor if improved

Set predecessor[V]=U.

**Final answer:** New d[V]=4.

#### What this result means

A negative edge weight is allowed in Bellman–Ford exercises, but not in the standard Dijkstra method taught here.

---

## M2 · Dijkstra: settle the closest unfinished vertex

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/routing--dijkstra/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/routing/dijkstra

Unit 4 · shortest paths and routing tables

**Definition.** Dijkstra’s algorithm finds shortest paths from a source in a graph whose edge weights are nonnegative.

**Simple meaning.** Sabse chhota unfinished distance select karo, phir uske neighbours improve karo.

## Understand it step by step

1. Initialize source distance 0, all others ∞, and no predecessors. No vertex is settled initially.
2. Select an unsettled vertex with minimum tentative distance. With nonnegative edges, its distance can now be finalized.
3. Relax each relevant outgoing edge: compare old distance with selected distance plus edge cost.
4. Repeat selection and relaxation. If all remaining distances are ∞, the remaining vertices are unreachable from the source.
5. Trace predecessors for the required destination. Always preserve arrow direction. Standard Dijkstra is not valid for graphs with negative edge costs.

#### Practical example

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.

### Practice question. Describe Dijkstra’s shortest-path algorithm and its restriction. [3 practice marks]

#### Answer

1. Set source to 0 and other distances to infinity.
2. Repeatedly choose the unsettled vertex with minimum tentative distance.
3. Settle it and relax its outgoing edges.
4. Recover paths using predecessors.

The standard algorithm requires nonnegative edge weights.

#### Practical example

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.

**Yaad rakho:** Minimum tentative total choose; negative edges pe Dijkstra nahi.

---

## M2 · Dijkstra · complete example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/routing--dijkstra-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/routing/dijkstra-1

Unit 4 · shortest paths and routing tables

### 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. [3 practice marks]

#### Answer

## Given

| Edge | Cost |
| --- | --- |
| A→B | 4 |
| A→C | 2 |
| C→B | 1 |
| B→D | 3 |
| C→D | 7 |

Source=A; target=D. Edges are directed; do not add reverse edges.

## To find

The path A to D, its total cost and intermediate work.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.

Swipe across the diagram to read its labels ↔

![Dijkstra · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/dijkstra-1.973d01595e.svg)

Diagram: Dijkstra · given directed graph. Labels: Dijkstra · given directed graph | Dijkstra · given directed graph | A | A | B | B | A->B | 4 | C | C | A->C | 2 | D | D | B->D | 3 | C->B | 1 | C->D | 7

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

d[A]=0; every other distance=∞. No predecessors are known.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Tentative |
| B | ∞ | — | Tentative |
| C | ∞ | — | Tentative |
| D | ∞ | — | Tentative |

#### Step 2. Settle A at distance 0

Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| A→B | ∞ | 0+(4)=4 | Improve to 4; predecessor=A |
| A→C | ∞ | 0+(2)=2 | Improve to 2; predecessor=A |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 4 | A | Tentative |
| C | 2 | A | Tentative |
| D | ∞ | — | Tentative |

#### Step 3. Settle C at distance 2

Unsettled candidates before selection: B=4, C=2, D=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| C→B | 4 | 2+(1)=3 | Improve to 3; predecessor=C |
| C→D | ∞ | 2+(7)=9 | Improve to 9; predecessor=C |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | C | Tentative |
| C | 2 | A | Settled |
| D | 9 | C | Tentative |

#### Step 4. Settle B at distance 3

Unsettled candidates before selection: B=3, D=9. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| B→D | 9 | 3+(3)=6 | Improve to 6; predecessor=B |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | C | Settled |
| C | 2 | A | Settled |
| D | 6 | B | Tentative |

#### Step 5. Settle D at distance 6

Unsettled candidates before selection: D=6. Select the minimum; ties use alphabetical order.

No outgoing edges to relax.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | C | Settled |
| C | 2 | A | Settled |
| D | 6 | B | Settled |

#### Step 6. Recover the path

Trace backwards: D ← B ← C ← A. Reverse it: A → C → B → D.

Edge sum: 2 + 1 + 3 = 6.

**Final answer:** A → C → B → D; cost=6.

#### What this result means

The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.

---

## M2 · Dijkstra · complete example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/routing--dijkstra-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/routing/dijkstra-2

Unit 4 · shortest paths and routing tables

### 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. [3 practice marks]

#### Answer

## Given

| Edge | Cost |
| --- | --- |
| A—B | 2 |
| A—C | 5 |
| B—C | 1 |
| B—D | 4 |
| C—D | 1 |
| D—E | 3 |
| C—E | 8 |

Source=A; target=E. Each edge can be traversed in either direction.

## To find

The path A to E, its total cost and intermediate work.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.

Swipe across the diagram to read its labels ↔

![Dijkstra · given undirected graph](https://deep-learning-study-room.vercel.app/cn/fig/dijkstra-2.170b001531.svg)

Diagram: Dijkstra · given undirected graph. Labels: Dijkstra · given undirected graph | Dijkstra · given undirected graph | A | A | B | B | A--B | 2 | C | C | A--C | 5 | B--C | 1 | D | D | B--D | 4 | C--D | 1 | E | E | C--E | 8 | D--E | 3

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

d[A]=0; every other distance=∞. No predecessors are known.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Tentative |
| B | ∞ | — | Tentative |
| C | ∞ | — | Tentative |
| D | ∞ | — | Tentative |
| E | ∞ | — | Tentative |

#### Step 2. Settle A at distance 0

Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞, E=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| A→B | ∞ | 0+(2)=2 | Improve to 2; predecessor=A |
| A→C | ∞ | 0+(5)=5 | Improve to 5; predecessor=A |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 2 | A | Tentative |
| C | 5 | A | Tentative |
| D | ∞ | — | Tentative |
| E | ∞ | — | Tentative |

#### Step 3. Settle B at distance 2

Unsettled candidates before selection: B=2, C=5, D=∞, E=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| B→C | 5 | 2+(1)=3 | Improve to 3; predecessor=B |
| B→D | ∞ | 2+(4)=6 | Improve to 6; predecessor=B |
| B→A | 0 | 2+(2)=4 | Already settled; retain |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 2 | A | Settled |
| C | 3 | B | Tentative |
| D | 6 | B | Tentative |
| E | ∞ | — | Tentative |

#### Step 4. Settle C at distance 3

Unsettled candidates before selection: C=3, D=6, E=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| C→D | 6 | 3+(1)=4 | Improve to 4; predecessor=C |
| C→E | ∞ | 3+(8)=11 | Improve to 11; predecessor=C |
| C→A | 0 | 3+(5)=8 | Already settled; retain |
| C→B | 2 | 3+(1)=4 | Already settled; retain |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 2 | A | Settled |
| C | 3 | B | Settled |
| D | 4 | C | Tentative |
| E | 11 | C | Tentative |

#### Step 5. Settle D at distance 4

Unsettled candidates before selection: D=4, E=11. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| D→E | 11 | 4+(3)=7 | Improve to 7; predecessor=D |
| D→B | 2 | 4+(4)=8 | Already settled; retain |
| D→C | 3 | 4+(1)=5 | Already settled; retain |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 2 | A | Settled |
| C | 3 | B | Settled |
| D | 4 | C | Settled |
| E | 7 | D | Tentative |

#### Step 6. Settle E at distance 7

Unsettled candidates before selection: E=7. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| E→D | 4 | 7+(3)=10 | Already settled; retain |
| E→C | 3 | 7+(8)=15 | Already settled; retain |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 2 | A | Settled |
| C | 3 | B | Settled |
| D | 4 | C | Settled |
| E | 7 | D | Settled |

#### Step 7. Recover the path

Trace backwards: E ← D ← C ← B ← A. Reverse it: A → B → C → D → E.

Edge sum: 2 + 1 + 1 + 3 = 7.

**Final answer:** A → B → C → D → E; cost=7.

#### What this result means

The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.

---

## M2 · Dijkstra · complete example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/routing--dijkstra-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/routing/dijkstra-3

Unit 4 · shortest paths and routing tables

### 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. [3 practice marks]

#### Answer

## Given

| Edge | Cost |
| --- | --- |
| A→B | 3 |
| A→C | 3 |
| B→D | 2 |
| C→D | 2 |

Source=A; target=E. Edges are directed; do not add reverse edges.

## To find

The path A to E, its total cost and intermediate work.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.

Swipe across the diagram to read its labels ↔

![Dijkstra · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/dijkstra-3.312b4c0fd9.svg)

Diagram: Dijkstra · given directed graph. Labels: Dijkstra · given directed graph | Dijkstra · given directed graph | A | A | B | B | A->B | 3 | C | C | A->C | 3 | D | D | B->D | 2 | C->D | 2 | E | E

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

d[A]=0; every other distance=∞. No predecessors are known.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Tentative |
| B | ∞ | — | Tentative |
| C | ∞ | — | Tentative |
| D | ∞ | — | Tentative |
| E | ∞ | — | Tentative |

#### Step 2. Settle A at distance 0

Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞, E=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| A→B | ∞ | 0+(3)=3 | Improve to 3; predecessor=A |
| A→C | ∞ | 0+(3)=3 | Improve to 3; predecessor=A |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | A | Tentative |
| C | 3 | A | Tentative |
| D | ∞ | — | Tentative |
| E | ∞ | — | Tentative |

#### Step 3. Settle B at distance 3

Unsettled candidates before selection: B=3, C=3, D=∞, E=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| B→D | ∞ | 3+(2)=5 | Improve to 5; predecessor=B |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | A | Settled |
| C | 3 | A | Tentative |
| D | 5 | B | Tentative |
| E | ∞ | — | Tentative |

#### Step 4. Settle C at distance 3

Unsettled candidates before selection: C=3, D=5, E=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| C→D | 5 | 3+(2)=5 | Retain 5 (equal cost) |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | A | Settled |
| C | 3 | A | Settled |
| D | 5 | B | Tentative |
| E | ∞ | — | Tentative |

#### Step 5. Settle D at distance 5

Unsettled candidates before selection: D=5, E=∞. Select the minimum; ties use alphabetical order.

No outgoing edges to relax.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | A | Settled |
| C | 3 | A | Settled |
| D | 5 | B | Settled |
| E | ∞ | — | Tentative |

#### Step 6. Stop at unreachable vertices

Every remaining tentative distance is ∞. No path from the source reaches these vertices.

#### Step 7. Recover the path

There is no finite path to recover.

**Final answer:** E is unreachable from A.

#### What this result means

The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.

---

## M2 · Bellman–Ford: repeat relaxation across all edges

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/routing--bellman/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/routing/bellman

Unit 4 · shortest paths and routing tables

**Definition.** Bellman–Ford computes single-source shortest paths by repeatedly relaxing every edge. It supports negative edge weights and detects reachable negative cycles.

**Simple meaning.** Har edge ko baar-baar relax; negative edge chalega, negative cycle problem hai.

## Understand it step by step

1. Initialize source 0 and all other distances ∞.
2. 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.
3. 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.
4. If a full pass makes no change, all distances have stabilized and the algorithm may stop early.
5. 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.

#### Practical example

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.

### Practice question. Explain Bellman–Ford and how it differs from Dijkstra. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Pass = all edges once. Negative edge ≠ negative cycle.

---

## M2 · Bellman–Ford · complete example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/routing--bellman-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/routing/bellman-1

Unit 4 · shortest paths and routing tables

### 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. [3 practice marks]

#### Answer

## Given

| Directed edge | Weight |
| --- | --- |
| A→B | 4 |
| A→C | 5 |
| B→C | -2 |
| C→D | 3 |

## To find

The shortest route and cost, with complete passes and a negative-cycle check.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



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.

Swipe across the diagram to read its labels ↔

![Bellman–Ford · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/bellman-1.1bf4232fcf.svg)

Diagram: Bellman–Ford · given directed graph. Labels: Bellman–Ford · given directed graph | Bellman–Ford · given directed graph | A | A | B | B | A->B | 4 | C | C | A->C | 5 | B->C | -2 | D | D | C->D | 3

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

4 vertices → at most 3 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.

#### Step 2. Pass 1: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | ∞ | 0+(4)=4 | 4 | Update; predecessor=A |
| A→C | ∞ | 0+(5)=5 | 5 | Update; predecessor=A |
| B→C | 5 | 4+(-2)=2 | 2 | Update; predecessor=B |
| C→D | ∞ | 2+(3)=5 | 5 | Update; predecessor=C |

| Vertex | A | B | C | D |
| --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 4 | 2 | 5 |
| Predecessor | — | A | B | C |

#### Step 3. Pass 2: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | 4 | 0+(4)=4 | 4 | No improvement |
| A→C | 2 | 0+(5)=5 | 2 | No improvement |
| B→C | 2 | 4+(-2)=2 | 2 | No improvement |
| C→D | 5 | 2+(3)=5 | 5 | No improvement |

| Vertex | A | B | C | D |
| --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 4 | 2 | 5 |
| Predecessor | — | A | B | C |

#### Step 4. Stop after an unchanged pass

This entire pass changed no distance. Further identical relaxation passes will not improve anything.

#### Step 5. Recover and total the path

Backward predecessors: D ← C ← B ← A. Forward route: A → B → C → D.

Cost = (4) + (-2) + (3) = 5. No edge can now improve its destination label.

**Final answer:** A → B → C → D; shortest cost=5.

#### What this result means

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.

---

## M2 · Bellman–Ford · complete example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/routing--bellman-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/routing/bellman-2

Unit 4 · shortest paths and routing tables

### 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. [3 practice marks]

#### Answer

## Given

| Directed edge | Weight |
| --- | --- |
| C→D | 2 |
| B→C | 1 |
| A→B | 3 |
| A→D | 12 |

## To find

The shortest route and cost, with complete passes and a negative-cycle check.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



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.

Swipe across the diagram to read its labels ↔

![Bellman–Ford · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/bellman-2.9bfc43d501.svg)

Diagram: Bellman–Ford · given directed graph. Labels: Bellman–Ford · given directed graph | Bellman–Ford · given directed graph | A | A | B | B | A->B | 3 | D | D | A->D | 12 | C | C | B->C | 1 | C->D | 2

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

4 vertices → at most 3 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.

#### Step 2. Pass 1: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| C→D | ∞ | ∞+(2)=∞ | ∞ | No improvement |
| B→C | ∞ | ∞+(1)=∞ | ∞ | No improvement |
| A→B | ∞ | 0+(3)=3 | 3 | Update; predecessor=A |
| A→D | ∞ | 0+(12)=12 | 12 | Update; predecessor=A |

| Vertex | A | B | C | D |
| --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 3 | ∞ | 12 |
| Predecessor | — | A | — | A |

#### Step 3. Pass 2: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| C→D | 12 | ∞+(2)=∞ | 12 | No improvement |
| B→C | ∞ | 3+(1)=4 | 4 | Update; predecessor=B |
| A→B | 3 | 0+(3)=3 | 3 | No improvement |
| A→D | 12 | 0+(12)=12 | 12 | No improvement |

| Vertex | A | B | C | D |
| --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 3 | 4 | 12 |
| Predecessor | — | A | B | A |

#### Step 4. Pass 3: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| C→D | 12 | 4+(2)=6 | 6 | Update; predecessor=C |
| B→C | 4 | 3+(1)=4 | 4 | No improvement |
| A→B | 3 | 0+(3)=3 | 3 | No improvement |
| A→D | 6 | 0+(12)=12 | 6 | No improvement |

| Vertex | A | B | C | D |
| --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 3 | 4 | 6 |
| Predecessor | — | A | B | C |

#### Step 5. Recover and total the path

Backward predecessors: D ← C ← B ← A. Forward route: A → B → C → D.

Cost = (3) + (1) + (2) = 6. No edge can now improve its destination label.

**Final answer:** A → B → C → D; shortest cost=6.

#### What this result means

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.

---

## M2 · Bellman–Ford · negative-cycle example

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/routing--bellman-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/routing/bellman-3

Unit 4 · shortest paths and routing tables

### 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. [3 practice marks]

#### Answer

## Given

| Directed edge | Weight |
| --- | --- |
| A→B | 1 |
| B→C | -2 |
| C→B | -1 |

## To find

The shortest route and cost, with complete passes and a negative-cycle check.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



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.

Swipe across the diagram to read its labels ↔

![Bellman–Ford · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/bellman-3.b876d89f79.svg)

Diagram: Bellman–Ford · given directed graph. Labels: Bellman–Ford · given directed graph | Bellman–Ford · given directed graph | A | A | B | B | A->B | 1 | C | C | B->C | -2 | C->B | -1

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

3 vertices → at most 2 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.

#### Step 2. Pass 1: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | ∞ | 0+(1)=1 | 1 | Update; predecessor=A |
| B→C | ∞ | 1+(-2)=-1 | -1 | Update; predecessor=B |
| C→B | 1 | -1+(-1)=-2 | -2 | Update; predecessor=C |

| Vertex | A | B | C |
| --- | --- | --- | --- |
| End-of-pass distance | 0 | -2 | -1 |
| Predecessor | — | C | B |

#### Step 3. Pass 2: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | -2 | 0+(1)=1 | -2 | No improvement |
| B→C | -1 | -2+(-2)=-4 | -4 | Update; predecessor=B |
| C→B | -2 | -4+(-1)=-5 | -5 | Update; predecessor=C |

| Vertex | A | B | C |
| --- | --- | --- | --- |
| End-of-pass distance | 0 | -5 | -4 |
| Predecessor | — | C | B |

#### Step 4. Detect a reachable negative cycle

After the allowed main passes, an edge still improves:

| Edge | Candidate | Current distance |
| --- | --- | --- |
| B→C | -7 | -4 |

A reachable negative cycle exists. Do not present the changing distance labels as finite shortest-path answers.

**Final answer:** A reachable negative cycle prevents a finite shortest distance for vertices reachable from that cycle.

#### What this result means

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.

---

## M2 · Distance-vector routing: learn costs through neighbours

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/protocols--distance-vector/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/protocols/distance-vector

Unit 4 · routing protocols

**Definition.** Distance-vector routing represents each destination by an estimated distance and next hop, updating those estimates using neighbouring routers’ advertised distances.

**Simple meaning.** Neighbour ke destination-cost mein apna neighbour-link cost add karo.

Swipe across the diagram to read its labels ↔

![Distance vector: add your local cost to the advertisement](https://deep-learning-study-room.vercel.app/cn/fig/distance-vector.8f3c90bc87.svg)

Diagram: Distance vector: add your local cost to the advertisement. Labels: Distance vector: add your local cost to the advertisement | Distance vector: add your local cost to the advertisement | X | B | C | link cost 1 | link cost 2 | B advertises Z=4 | via B: 1+4=5 | C advertises Z=2 | via C: 2+2=4 | Choose C: total cost 4 is smaller than total cost 5.

Distance-vector routing: learn costs through neighbours

## Understand it step by step

1. 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.
2. The route to y through v costs c(x,v)+Dᵥ(y). Compare candidates from neighbours and choose the minimum permitted route.
3. The update is the distributed Bellman–Ford idea. Ordinary distance-vector exchanges do not send the full network topology map.
4. After changes, routers may temporarily hold inconsistent information. Routing loops and count-to-infinity are possible; mitigation depends on the protocol.



$$
\text{candidate via neighbour}=\text{link cost}+\text{advertised distance}
$$



#### Practical example

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.

### Practice question. Explain the distance-vector update rule. [3 practice marks]

#### Answer



$$
D_x(y)=\min_{v\in N(x)}\{c(x,v)+D_v(y)\}
$$



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.

#### Practical example

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.

**Yaad rakho:** Neighbour ka distance + neighbour tak apna distance.

---

## M2 · Distance-vector update · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/protocols--dv-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/protocols/dv-1

Unit 4 · routing protocols

### 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. [3 practice marks]

#### Answer

## Given

| Neighbour | X-to-neighbour cost | Advertised distance to Z |
| --- | --- | --- |
| B | 1 | 4 |
| C | 2 | 2 |
| D | 3 | 5 |

## To find

Candidates and the minimum total route cost.

## Formula and why



$$
C_v=c(X,v)+D_v(Z)
$$



The advertisement starts from the neighbour, so the local link to that neighbour must be added.

## Step-by-step solution

#### Step 1. Compute every candidate

| Via | Addition | Total |
| --- | --- | --- |
| B | 1+4 | 5 |
| C | 2+2 | 4 |
| D | 3+5 | 8 |

#### Step 2. Select the minimum

min(5, 4, 8)=4.

#### Step 3. Read all tied next hops

C is the minimum-cost neighbour.

**Final answer:** Cost=4; best next hop(s): C.

#### What this result means

Do not choose solely by the neighbour’s advertised distance; the link to that neighbour also costs something.

---

## M2 · Distance-vector update · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/protocols--dv-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/protocols/dv-2

Unit 4 · routing protocols

### 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. [3 practice marks]

#### Answer

## Given

| Neighbour | X-to-neighbour cost | Advertised distance to Z |
| --- | --- | --- |
| B | 2 | 1 |
| C | 1 | 4 |
| D | 5 | 0 |

## To find

Candidates and the minimum total route cost.

## Formula and why



$$
C_v=c(X,v)+D_v(Z)
$$



The advertisement starts from the neighbour, so the local link to that neighbour must be added.

## Step-by-step solution

#### Step 1. Compute every candidate

| Via | Addition | Total |
| --- | --- | --- |
| B | 2+1 | 3 |
| C | 1+4 | 5 |
| D | 5+0 | 5 |

#### Step 2. Select the minimum

min(3, 5, 5)=3.

#### Step 3. Read all tied next hops

B is the minimum-cost neighbour.

**Final answer:** Cost=3; best next hop(s): B.

#### What this result means

Do not choose solely by the neighbour’s advertised distance; the link to that neighbour also costs something.

---

## M2 · Distance-vector update · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/protocols--dv-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/protocols/dv-3

Unit 4 · routing protocols

### 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. [3 practice marks]

#### Answer

## Given

| Neighbour | X-to-neighbour cost | Advertised distance to Z |
| --- | --- | --- |
| B | 3 | 2 |
| C | 2 | 3 |
| D | 4 | 4 |

## To find

Candidates and the minimum total route cost.

## Formula and why



$$
C_v=c(X,v)+D_v(Z)
$$



The advertisement starts from the neighbour, so the local link to that neighbour must be added.

## Step-by-step solution

#### Step 1. Compute every candidate

| Via | Addition | Total |
| --- | --- | --- |
| B | 3+2 | 5 |
| C | 2+3 | 5 |
| D | 4+4 | 8 |

#### Step 2. Select the minimum

min(5, 5, 8)=5.

#### Step 3. Read all tied next hops

B, C are tied; a protocol may use a defined tie rule or equal-cost multipath.

**Final answer:** Cost=5; best next hop(s): B, C.

#### What this result means

Do not choose solely by the neighbour’s advertised distance; the link to that neighbour also costs something.

---

## M2 · RIP: hop counts, updates and the value 16

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/protocols--rip/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/protocols/rip

Unit 4 · routing protocols

**Definition.** Routing Information Protocol (RIP) is an interior distance-vector routing protocol that uses a bounded metric, commonly hop count, to select routes.

**Simple meaning.** RIP mein hops count; 15 tak reachable, 16 means unreachable.

## Understand it step by step

1. RIPv2 uses distance-vector updates and carries subnet-mask information, allowing classless routes.
2. 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.
3. 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.
4. 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.

#### Practical example

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.

### Practice question. State the routing method, metric and main limitations of RIP. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** RIP: neighbour distances; 16 is infinity.

---

## M2 · Count-to-infinity and loop-mitigation methods

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/protocols--loops/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/protocols/loops

Unit 4 · routing protocols

**Definition.** 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.

**Simple meaning.** Dono neighbour ek dusre ko bol rahe: mere through jao—par actual route gaya.

## Understand it step by step

1. Before failure, B reaches a destination through A. After A loses the route, B may still advertise an old finite distance.
2. 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.
3. **Split horizon:** do not advertise a learned route back on the interface from which it was learned.
4. **Poison reverse:** advertise that reverse direction with an unreachable metric. **Route poisoning:** mark a failed destination unreachable. Triggered updates spread changes sooner.
5. These methods reduce common failure modes but do not constitute a universal proof that every multi-router loop is impossible.

#### Practical example

In RIP, a poisoned route is sent with metric 16. Receiving routers treat it as unreachable rather than a new usable longer route.

### Practice question. Explain split horizon and poison reverse. [3 practice marks]

#### Answer

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.

#### Practical example

In RIP, a poisoned route is sent with metric 16. Receiving routers treat it as unreachable rather than a new usable longer route.

**Yaad rakho:** Split: wapas mat bolo. Poison reverse: wapas bolo, par unreachable.

---

## M2 · Link-state routing: share a map, calculate locally

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/protocols--link-state/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/protocols/link-state

Unit 4 · routing protocols

**Definition.** Link-state routing distributes information about routers’ local links so that routers can build a topology database and compute shortest paths independently.

**Simple meaning.** Distance vector mein neighbour ka answer; link state mein topology map.

Swipe across the diagram to read its labels ↔

![Link-state routing: from local links to a shortest-path tree](https://deep-learning-study-room.vercel.app/cn/fig/link-state.bbee3173ec.svg)

Diagram: Link-state routing: from local links to a shortest-path tree. Labels: Link-state routing: from local links to a shortest-path tree | Link-state routing: from local links to a shortest-path tree | 1. Discover neighbours and costs | Each router measures or configures its local link information. | 2. Flood link-state information | Routers share topology information within the routing scope. | 3. Maintain the topology database | New information updates the shared view after convergence. | 4. Run Dijkstra from this router | Add link costs; install the resulting next hops.

Link-state routing: share a map, calculate locally

## Understand it step by step

1. Discover neighbours and determine local link costs.
2. Create link-state information and flood it through the appropriate routing scope. Sequence/age mechanisms keep newer information identifiable.
3. Routers in the same area build a consistent link-state database after convergence.
4. Each router runs a shortest-path computation, commonly Dijkstra, rooted at itself and installs resulting routes.
5. 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.

#### Practical example

Routers A and B can share the same topology database while calculating different next hops because their shortest-path trees have different roots.

### Practice question. Explain the steps of link-state routing. [3 practice marks]

#### Answer

1. Discover neighbours and link costs.
2. Generate and flood link-state information.
3. Maintain a topology database.
4. Run a shortest-path algorithm from the local router.
5. Install next hops and update after changes.

#### Practical example

Routers A and B can share the same topology database while calculating different next hops because their shortest-path trees have different roots.

**Yaad rakho:** Same map, different root, different tree.

---

## M2 · OSPF: link-state shortest paths within an autonomous system

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/protocols--ospf/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/protocols/ospf

Unit 4 · routing protocols

**Definition.** Open Shortest Path First (OSPF) is an interior link-state routing protocol that selects routes using shortest-path calculations and additive link costs.

**Simple meaning.** OSPF = link-state map + Dijkstra + summed costs.

## Understand it step by step

1. Routers discover and maintain neighbour relationships using Hello packets and exchange link-state information.
2. 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.
3. 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.
4. OSPFv2 is the IPv4 protocol in the supplied paper; it is carried directly in IP protocol number 89, not TCP/UDP port 89.
5. 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.

#### Practical example

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.

### Practice question. Summarize how OSPF determines the best route. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** OSPF cost add karo; sirf hops nahi.

---

## M2 · The five OSPF packet types

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/protocols--ospf-packets/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/protocols/ospf-packets

Unit 4 · routing protocols

**Definition.** OSPFv2 uses five packet types for neighbour maintenance and reliable exchange of link-state database information.

**Simple meaning.** Hello → database summary → request → update → acknowledgement; har packet ka kaam alag.

Swipe across the diagram to read its labels ↔

![OSPFv2: five distinct packet types](https://deep-learning-study-room.vercel.app/cn/fig/ospf-packets.6093f0d178.svg)

Diagram: OSPFv2: five distinct packet types. Labels: OSPFv2: five distinct packet types | OSPFv2: five distinct packet types | 1. Hello | Discover and maintain neighbour relationships. | 2. Database Description | Summarize link-state database contents. | 3. Link State Request | Ask for particular missing or newer LSAs. | 4. Link State Update | Carry one or more LSAs. | 5. Link State Acknowledgment | Acknowledge receipt of LSAs.

The five OSPF packet types

## Understand it step by step

1. Hello packets establish/maintain neighbour relationships; they are not the complete topology database.
2. Database Description packets list summaries, allowing neighbours to identify differences.
3. Link State Request asks for required LSAs; Link State Update transports LSAs. An LSU packet may contain more than one LSA.
4. Link State Acknowledgment acknowledges LSAs. An LSA is a topology-information item, not a sixth OSPF packet type.

| Packet type | What it does | Simple example |
| --- | --- | --- |
| Hello | Discover/maintain neighbours and exchange relationship parameters | Are we still neighbours? |
| Database Description (DD/DBD) | Summarize link-state database contents during synchronization | Here are the LSA headers I have |
| Link State Request (LSR) | Ask for specific missing/newer link-state information | Please send this LSA |
| Link State Update (LSU) | Carry one or more LSAs | Here is the requested or newly flooded link-state information |
| Link State Acknowledgment (LSAck) | Acknowledge receipt of LSAs | I received these LSAs |

#### Practical example

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.

### Practice question. List and explain the five types of OSPF packets. [3 practice marks]

#### Answer

| Packet type | What it does | Simple example |
| --- | --- | --- |
| Hello | Discover/maintain neighbours and exchange relationship parameters | Are we still neighbours? |
| Database Description (DD/DBD) | Summarize link-state database contents during synchronization | Here are the LSA headers I have |
| Link State Request (LSR) | Ask for specific missing/newer link-state information | Please send this LSA |
| Link State Update (LSU) | Carry one or more LSAs | Here is the requested or newly flooded link-state information |
| Link State Acknowledgment (LSAck) | Acknowledge receipt of LSAs | I received these LSAs |

#### Practical example

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.

**Yaad rakho:** H–D–R–U–A: Hello, Description, Request, Update, Ack.

---

## M2 · RIP versus OSPF; Bellman–Ford versus Dijkstra

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/protocols--comparison/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/protocols/comparison

Unit 4 · routing protocols

**Definition.** RIP and OSPF are routing protocols; Bellman–Ford and Dijkstra are algorithms underlying different route-computation approaches.

**Simple meaning.** Protocol message bhejta hai; algorithm route calculate karta hai.

## Understand it step by step

1. RIP uses distance-vector information and a bounded hop metric. OSPF distributes link-state information and computes paths using additive costs.
2. A generic Bellman–Ford graph exercise can contain negative weights; RIP’s ordinary hop-count metric does not.
3. Dijkstra assumes nonnegative edge weights. Do not select it for the negative-weight re-exam graph simply because the question says “routing”.
4. State whether a drawn graph is directed or undirected before solving. Both algorithms can be applied to appropriate directed graphs.

#### Practical example

The December paper explicitly gives positive directed edges and asks for Dijkstra. The February paper includes negative directed edges and asks for Bellman–Ford.

### Practice question. Compare RIP and OSPF on three points. [3 practice marks]

#### Answer

| Feature | RIP | OSPF |
| --- | --- | --- |
| Family | Distance vector | Link state |
| Typical metric | Hop count; 16 unreachable | Sum of configured link costs |
| Knowledge exchanged | Destination distances via neighbours | Link-state information |
| Algorithm connection | Distributed Bellman–Ford idea | Dijkstra shortest paths |
| Scale design | Small/simple networks; limited diameter | Area-based scalable design |

#### Practical example

The December paper explicitly gives positive directed edges and asks for Dijkstra. The February paper includes negative directed edges and asks for Bellman–Ford.

**Yaad rakho:** Distance vector → RIP; link state → OSPF.

---

## M2 · IPv4 header fields needed for the IPv6 comparison

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/packet-support--ipv4-header/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/packet-support/ipv4-header

Unit 4 support · header comparison; fragmentation is additional practice

**Definition.** An IPv4 datagram contains a variable-length header followed by payload. The header supplies addressing, forwarding and fragmentation information.

**Simple meaning.** Header delivery instructions hai; payload actual carried content.

Swipe across the diagram to read its labels ↔

![IPv4 header · field widths in bits](https://deep-learning-study-room.vercel.app/cn/fig/ipv4-header.5d41e2a297.svg)

Diagram: IPv4 header · field widths in bits. Labels: IPv4 header · field widths in bits | IPv4 header · field widths in bits | Version | 4 | IHL | 4 | DS field | 8 | Total Length · 16 | Identification · 16 | Flags | 3 | Fragment Offset · 13 | TTL | 8 | Protocol | 8 | Header Checksum · 16 | Source address · 32 bits | Destination address · 32 bits | Options + padding, if present

IPv4 header fields needed for the IPv6 comparison

## Understand it step by step

1. 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.
2. Total Length includes both the IPv4 header and its payload. Identification, flags and fragment offset support fragmentation/reassembly.
3. TTL limits lifetime; Protocol identifies the upper-layer protocol. Header Checksum protects the IPv4 header, not the entire payload.
4. Source and destination are 32-bit IPv4 addresses. IPv6 changes their width and reorganizes several of these fields.

#### Practical example

An IPv4 packet with Total Length=1,000 bytes and IHL=5 has a 20-byte header and 980-byte payload.

### Practice question. Distinguish IPv4 Total Length, IHL and Protocol. [3 practice marks]

#### Answer

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.

#### Practical example

An IPv4 packet with Total Length=1,000 bytes and IHL=5 has a 20-byte header and 980-byte payload.

**Yaad rakho:** IHL words ×4 = bytes; total minus header = payload.

---

## M2 · IPv4 header-length example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/packet-support--ihl-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/packet-support/ihl-1

Unit 4 support · header comparison; fragmentation is additional practice

**Optional worked extension.** 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.

### Practice question. An IPv4 packet has IHL=5 and Total Length=1000 bytes. Find header and payload sizes. [3 practice marks]

#### Answer

## Given

IHL=5; Total Length=1000 bytes.

## To find

Header bytes and payload bytes.

## Formula and why



$$
H=4\,\mathrm{IHL},\qquad P=T-H
$$



IHL counts 32-bit words; each word is 4 bytes.

## Step-by-step solution

#### Step 1. Convert IHL to bytes

H=4×5=20 bytes.

#### Step 2. Subtract the header

P=1000−20=980 bytes.

#### Step 3. Add back the parts

20+980=1000 bytes.

**Final answer:** Header=20 bytes; payload=980 bytes.

#### What this result means

IPv4 Total Length includes its own header. IPv6 Payload Length uses a different convention.

---

## M2 · IPv4 header-length example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/packet-support--ihl-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/packet-support/ihl-2

Unit 4 support · header comparison; fragmentation is additional practice

**Optional worked extension.** 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.

### Practice question. An IPv4 packet has IHL=6 and Total Length=1200 bytes. Find header and payload sizes. [3 practice marks]

#### Answer

## Given

IHL=6; Total Length=1200 bytes.

## To find

Header bytes and payload bytes.

## Formula and why



$$
H=4\,\mathrm{IHL},\qquad P=T-H
$$



IHL counts 32-bit words; each word is 4 bytes.

## Step-by-step solution

#### Step 1. Convert IHL to bytes

H=4×6=24 bytes.

#### Step 2. Subtract the header

P=1200−24=1176 bytes.

#### Step 3. Add back the parts

24+1176=1200 bytes.

**Final answer:** Header=24 bytes; payload=1176 bytes.

#### What this result means

IPv4 Total Length includes its own header. IPv6 Payload Length uses a different convention.

---

## M2 · IPv4 header-length example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/packet-support--ihl-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/packet-support/ihl-3

Unit 4 support · header comparison; fragmentation is additional practice

**Optional worked extension.** 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.

### Practice question. An IPv4 packet has IHL=8 and Total Length=800 bytes. Find header and payload sizes. [3 practice marks]

#### Answer

## Given

IHL=8; Total Length=800 bytes.

## To find

Header bytes and payload bytes.

## Formula and why



$$
H=4\,\mathrm{IHL},\qquad P=T-H
$$



IHL counts 32-bit words; each word is 4 bytes.

## Step-by-step solution

#### Step 1. Convert IHL to bytes

H=4×8=32 bytes.

#### Step 2. Subtract the header

P=800−32=768 bytes.

#### Step 3. Add back the parts

32+768=800 bytes.

**Final answer:** Header=32 bytes; payload=768 bytes.

#### What this result means

IPv4 Total Length includes its own header. IPv6 Payload Length uses a different convention.

---

## M2 · IPv4 fragmentation · optional extension

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/packet-support--fragmentation/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/packet-support/fragmentation

Unit 4 support · header comparison; fragmentation is additional practice

**Optional worked extension.** 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.

**Definition.** IPv4 fragmentation divides a packet that exceeds an outgoing link’s MTU into smaller fragments, when fragmentation is permitted.

**Simple meaning.** MTU se packet bada hai toh allowed case mein fragments; offset original payload mein position batata hai.

## Understand it step by step

1. This is supporting practice, not an explicitly listed numerical in the supplied current syllabus or these two papers. Finish the confirmed core first.
2. 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.
3. Every non-final fragment’s payload must be a multiple of 8 bytes. Its payload capacity is 8×floor((MTU−H)/8).
4. 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.
5. If DF is set, a router cannot fragment the IPv4 packet; IPv6 routers do not fragment packets either. Reassembly is at the destination.

#### Practical example

A fragment with offset 185 starts at byte 185×8=1,480 of the original payload, counting from byte zero.

### Practice question. What is the unit of IPv4 fragment offset and what does MF indicate? [3 practice marks]

#### Answer

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.

#### Practical example

A fragment with offset 185 starts at byte 185×8=1,480 of the original payload, counting from byte zero.

**Yaad rakho:** Offset ×8 = starting payload byte.

---

## M2 · Optional fragmentation · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/packet-support--fragment-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/packet-support/fragment-1

Unit 4 support · header comparison; fragmentation is additional practice

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

Total=4000; H=20; MTU=1500 bytes; DF=0.

## To find

All fragments and their header-related values.

## Formula and why



$$
P=T-H
$$





$$
P_{\max}=8\left\lfloor\frac{\mathrm{MTU}-H}{8}\right\rfloor
$$





$$
\mathrm{offset}=\mathrm{preceding\ payload\ bytes}/8
$$



Subtract the header before splitting the original payload. Round non-final fragment payload capacity down to a multiple of eight.

## Step-by-step solution

#### Step 1. Original payload

4000−20=3980 bytes.

#### Step 2. Non-final payload capacity

MTU−H=1500−20=1480. Floor((1480)/8)×8=1480 bytes.

#### Step 3. Allocate each fragment

| Fragment | Payload bytes | Total bytes | Starting byte | Offset /8 | MF |
| --- | --- | --- | --- | --- | --- |
| 1 | 1480 | 1500 | 0 | 0 | 1 |
| 2 | 1480 | 1500 | 1480 | 185 | 1 |
| 3 | 1020 | 1040 | 2960 | 370 | 0 |

#### Step 4. Verify no payload is lost

1480+1480+1020=3980 bytes. Every total length is at most 1500.

**Final answer:** 3 fragments; lengths, offsets and MF are listed in the table.

#### What this result means

Only payload positions determine offsets; repeating a header does not move the offset of later original data.

---

## M2 · Optional fragmentation · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/packet-support--fragment-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/packet-support/fragment-2

Unit 4 support · header comparison; fragmentation is additional practice

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

Total=2000; H=20; MTU=620 bytes; DF=0.

## To find

All fragments and their header-related values.

## Formula and why



$$
P=T-H
$$





$$
P_{\max}=8\left\lfloor\frac{\mathrm{MTU}-H}{8}\right\rfloor
$$





$$
\mathrm{offset}=\mathrm{preceding\ payload\ bytes}/8
$$



Subtract the header before splitting the original payload. Round non-final fragment payload capacity down to a multiple of eight.

## Step-by-step solution

#### Step 1. Original payload

2000−20=1980 bytes.

#### Step 2. Non-final payload capacity

MTU−H=620−20=600. Floor((600)/8)×8=600 bytes.

#### Step 3. Allocate each fragment

| Fragment | Payload bytes | Total bytes | Starting byte | Offset /8 | MF |
| --- | --- | --- | --- | --- | --- |
| 1 | 600 | 620 | 0 | 0 | 1 |
| 2 | 600 | 620 | 600 | 75 | 1 |
| 3 | 600 | 620 | 1200 | 150 | 1 |
| 4 | 180 | 200 | 1800 | 225 | 0 |

#### Step 4. Verify no payload is lost

600+600+600+180=1980 bytes. Every total length is at most 620.

**Final answer:** 4 fragments; lengths, offsets and MF are listed in the table.

#### What this result means

Only payload positions determine offsets; repeating a header does not move the offset of later original data.

---

## M2 · Optional fragmentation · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/read/packet-support--fragment-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/read/packet-support/fragment-3

Unit 4 support · header comparison; fragmentation is additional practice

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

Total=1500; H=20; MTU=600 bytes; DF=0.

## To find

All fragments and their header-related values.

## Formula and why



$$
P=T-H
$$





$$
P_{\max}=8\left\lfloor\frac{\mathrm{MTU}-H}{8}\right\rfloor
$$





$$
\mathrm{offset}=\mathrm{preceding\ payload\ bytes}/8
$$



Subtract the header before splitting the original payload. Round non-final fragment payload capacity down to a multiple of eight.

## Step-by-step solution

#### Step 1. Original payload

1500−20=1480 bytes.

#### Step 2. Non-final payload capacity

MTU−H=600−20=580. Floor((580)/8)×8=576 bytes.

#### Step 3. Allocate each fragment

| Fragment | Payload bytes | Total bytes | Starting byte | Offset /8 | MF |
| --- | --- | --- | --- | --- | --- |
| 1 | 576 | 596 | 0 | 0 | 1 |
| 2 | 576 | 596 | 576 | 72 | 1 |
| 3 | 328 | 348 | 1152 | 144 | 0 |

#### Step 4. Verify no payload is lost

576+576+328=1480 bytes. Every total length is at most 600.

**Final answer:** 3 fragments; lengths, offsets and MF are listed in the table.

#### What this result means

Only payload positions determine offsets; repeating a header does not move the offset of later original data.

---

## M2 · Delays, units and packet pipeline

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/formulas/formulas--units/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/formulas/formulas/units

M2 · symbols explained; worked examples linked below

Supporting formula collection. Use the compact TEE formula sheet first; the full calculation set below is not an observed-paper requirement.



$$
T_f=L/R
$$



L=bits, R=bits/s, Tf=seconds. Use for serialization.



$$
T_p=d/v
$$



d=distance, v=propagation speed. Use consistent distance units.



$$
T=(h+k-1)L/R+h\tau
$$



h equal-rate store-and-forward links, k equal packets, L total bits/packet; τ per-link propagation. No queueing or processing.

## Learn it with complete solutions

[Three worked delay examples](https://deep-learning-study-room.vercel.app/read/cn/m2/read/basics--delay-1/)

---

## M2 · ALOHA formulas and maximum values

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/formulas/formulas--aloha/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/formulas/formulas/aloha

M2 · symbols explained; worked examples linked below



$$
G=\lambda T_f
$$



λ=aggregate attempts/s; G=attempts/frame time.



$$
S_{\mathrm{pure}}=Ge^{-2G}
$$



Maximum 1/(2e)≈0.18394 at G=0.5.



$$
S_{\mathrm{slotted}}=Ge^{-G}
$$



Maximum 1/e≈0.367879 at G=1.



$$
F_{\mathrm{success}}=S/T_f
$$



Convert normalized S into successful frames/s.



$$
B_{\mathrm{success}}=SR
$$



Successful full-frame bits/s; not necessarily application payload goodput.



$$
P(\mathrm{success\ per\ attempt})=S/G
$$



For G>0. Do not confuse this probability with normalized throughput S.

## Learn it with complete solutions

[Five fully worked rate questions](https://deep-learning-study-room.vercel.app/read/cn/m2/read/aloha--rate-1/)

---

## M2 · Collision timing and backoff

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/formulas/formulas--csma/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/formulas/formulas/csma

M2 · symbols explained; worked examples linked below



$$
L_{\min}\geq 2RT_p
$$



R=bits/s; Tp=one-way seconds. Theoretical collision-detection bound.



$$
k=\min(n,10),\quad 0\leq K\leq 2^k-1
$$



n collisions; K selected integer for classic Ethernet backoff.



$$
T_{\mathrm{backoff}}=KT_{\mathrm{slot}}
$$



Multiply selected K by slot duration, retaining units.

## Learn it with complete solutions

[Minimum-frame examples](https://deep-learning-study-room.vercel.app/read/cn/m2/read/csma--minframe-1/)

---

## M2 · Masks and address blocks

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/formulas/formulas--ipv4/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/formulas/formulas/ipv4

M2 · symbols explained; worked examples linked below



$$
h=32-p,\quad N=2^h
$$



p=prefix bits, h=host bits, N=total addresses.



$$
U=2^h-2
$$



Ordinary usable-host count. /31 point-to-point and /32 are exceptions.



$$
\text{step}=256-M
$$



M is the first mask octet not equal to 255.



$$
\text{network}=\text{address AND mask}
$$



Bitwise AND keeps network bits and clears host bits.



$$
\text{broadcast}=\text{network}+(N-1)
$$



Use full address arithmetic, not an overflowing final octet.

## Learn it with complete solutions

[Nine complete address-block examples](https://deep-learning-study-room.vercel.app/read/cn/m2/read/subnets--block-1/)

---

## M2 · Host sizing, VLSM and aggregation

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/formulas/formulas--design/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/formulas/formulas/design

M2 · symbols explained; worked examples linked below



$$
2^h-2\geq H
$$



H requested usable hosts. Smallest sufficient h gives smallest ordinary subnet.



$$
2^s\geq K,\quad p_{new}=p_{old}+s
$$



K equal subnets required; s borrowed bits. Do not subtract two from modern subnet count.



$$
p=32-\log_2(N)
$$



For a power-of-two total address requirement, subject to boundary alignment.

## Learn it with complete solutions

[Three full VLSM designs](https://deep-learning-study-room.vercel.app/read/cn/m2/read/cidr--vlsm-1/)

---

## M2 · IPv6 and packet lengths

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/formulas/formulas--ipv6/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/formulas/formulas/ipv6

M2 · symbols explained; worked examples linked below

Supporting formula collection. Use the compact TEE formula sheet first; the full calculation set below is not an observed-paper requirement.



$$
\text{omitted groups}=8-\text{visible groups}
$$



Count every written group, including a written 0.



$$
\mathrm{IPv6\ total}=40+\mathrm{payload\ length}
$$



Payload includes extension headers, excludes the base 40 bytes.



$$
\mathrm{IPv4\ header\ bytes}=4\,\mathrm{IHL}
$$



IHL is in 32-bit words.



$$
\mathrm{IPv4\ payload}=\mathrm{Total\ Length}-4\,\mathrm{IHL}
$$



IPv4 Total Length includes the IPv4 header.

## Learn it with complete solutions

[Four IPv6 expansions](https://deep-learning-study-room.vercel.app/read/cn/m2/read/ipv6--expand-1/)

---

## M2 · Routing updates and path costs

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/formulas/formulas--routing/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/formulas/formulas/routing

M2 · symbols explained; worked examples linked below



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



Old destination distance versus cost to u plus edge u→v.



$$
D_x(y)=\min_{v\in N(x)}\{c(x,v)+D_v(y)\}
$$



Distance vector: local link cost plus neighbour advertisement.



$$
\mathrm{RIP\ metric}=\min(16,\mathrm{link\ cost}+\mathrm{advertisement})
$$



16 represents unreachable. Ordinary hop increments commonly equal 1.

## Learn it with complete solutions

[Full Dijkstra solution](https://deep-learning-study-room.vercel.app/read/cn/m2/read/routing--dijkstra-1/)

---

## M2 · Use the actual papers without mixing portions

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/papers/pyq-guide--index/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/papers/pyq-guide/index

Two supplied TEE papers · only the current M2 topics

The supplied ZIPs contain the **5 December 2025 final** and **4 February 2026 re-exam**, 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.

| Paper | Matching questions | Recurring work |
| --- | --- | --- |
| 5 Dec 2025 | Q1(c), Q1(d), Q2(b), Q3(b), Q4(a), Q6(b), Q7(a) | Slotted ALOHA, address block, switching, OSPF packets, IPv6, CSMA, Dijkstra |
| 4 Feb 2026 | Q1(c), Q1(d), Q2(b), Q3(b), Q4(a), Q6(b), Q7(a) | Pure ALOHA, address block, allocation, OSPF, IPv6 header, throughput rates, Bellman–Ford |

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.

---

## M2 · Q1C · Slotted ALOHA throughput

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/papers/paper-2025-final--q1c/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/papers/paper-2025-final/q1c

Actual TEE paper · current-M2 matching parts; original marks

### 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? [5 marks]

#### Answer

## Given

Protocol = Slotted ALOHA; G = 1 attempts/frame time.

## To find

S, 100S and the maximum possible S.

## Formula and why



$$
S=G e^{-G}
$$



Select the formula from the protocol name. The exponent is −G because Slotted ALOHA has a T vulnerable period.

## Step-by-step solution

#### Step 1. Calculate the exponent

−1 × 1 = -1.

#### Step 2. Evaluate the exponential



$$
e^{-1} \approx 0.367879441
$$



#### Step 3. Multiply by G

S = 1 × 0.367879441 ≈ 0.367879441 successful frames/frame time.

#### Step 4. Convert to percentage

0.367879441 × 100 ≈ 36.7879%.

#### Step 5. State the maximum separately

The maximum is 1/(1e) ≈ 0.367879 = 36.7879%, at G=1.

**Final answer:** S ≈ 0.367879; percentage ≈ 36.7879%; Smax ≈ 0.367879 at G=1.

#### What this result means

A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.

---

## M2 · Q1D · Address block /26

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/papers/paper-2025-final--q1d/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/papers/paper-2025-final/q1d

Actual TEE paper · current-M2 matching parts; original marks

### 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. [5 marks]

#### Answer

## Given

IP/prefix = `200.140.64.48/26`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−26=6; N=26=64.

#### Step 2. Construct the mask

Mask=`255.255.255.192`; binary=`11111111.11111111.11111111.11000000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 48 lies in 0…63.

#### Step 4. Form the first/network address

Keep earlier octets; place 0 in octet 4; set any later octets to zero. Network=**200.140.64.0**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 11001000 | 11111111 | 11001000 | 200 |
| 2 | 10001100 | 11111111 | 10001100 | 140 |
| 3 | 01000000 | 11111111 | 01000000 | 64 |
| 4 | 00110000 | 11000000 | 00000000 | 0 |

#### Step 6. Form the last/broadcast address

Use 63 in the changing octet and 255 in any later octets. Broadcast=**200.140.64.63**.

#### Step 7. State usable hosts

First usable=200.140.64.1; last usable=200.140.64.62; count=64−2=62.

**Final answer:** Network 200.140.64.0; broadcast 200.140.64.63; 64 total, 62 ordinary usable; range 200.140.64.1–200.140.64.62.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## M2 · Q2B · Choose a switching technique

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/papers/paper-2025-final--q2b/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/papers/paper-2025-final/q2b

Actual TEE paper · current-M2 matching parts; original marks

### 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. [10 marks]

#### Answer

Swipe across the diagram to read its labels ↔

![Three switching techniques: what is forwarded?](https://deep-learning-study-room.vercel.app/cn/fig/switching.2b51f856d9.svg)

Diagram: Three switching techniques: what is forwarded?. Labels: Three switching techniques: what is forwarded? | Three switching techniques: what is forwarded? | 1. Circuit: reserve a path, then stream data | Setup → reserved capacity → data transfer → release. | 2. Message: store the entire message at each node | Large forwarding unit; no packet-level pipeline. | 3. Packet: divide, then forward packet by packet | Shared links can simultaneously carry different packets.

The three forwarding units and resource choices.

## Circuit switching

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.

## Message switching

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.

## Packet switching

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.

| Aspect | Circuit switching | Message switching | Packet switching |
| --- | --- | --- | --- |
| Unit handled | Continuous stream on established circuit | Whole message | Small packets |
| Resource use | Capacity reserved along a circuit | Shared; message stored at each intermediate node | Shared; each packet stored/forwarded in this model |
| Setup | Required before data transfer | No circuit setup required | Datagram: no connection setup; virtual circuit: setup |
| Delay | Setup delay, then relatively predictable service | Large store-and-forward delay for long messages | Variable delay; packet pipeline can reduce completion time |
| Main limitation | Reserved capacity can be idle | Large buffers; unsuitable for tight delay needs | Headers, possible queueing/loss; datagrams may reorder |

## Recommendation

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.

#### Practical example

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.

---

## M2 · Q3B · Five OSPF packet types

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/papers/paper-2025-final--q3b/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/papers/paper-2025-final/q3b

Actual TEE paper · current-M2 matching parts; original marks

### Actual PYQ. Explain the different types of OSPF packets used for communication between routers. [5 marks]

#### Answer

Swipe across the diagram to read its labels ↔

![OSPFv2: five distinct packet types](https://deep-learning-study-room.vercel.app/cn/fig/ospf-packets.6093f0d178.svg)

Diagram: OSPFv2: five distinct packet types. Labels: OSPFv2: five distinct packet types | OSPFv2: five distinct packet types | 1. Hello | Discover and maintain neighbour relationships. | 2. Database Description | Summarize link-state database contents. | 3. Link State Request | Ask for particular missing or newer LSAs. | 4. Link State Update | Carry one or more LSAs. | 5. Link State Acknowledgment | Acknowledge receipt of LSAs.

Five OSPFv2 packet types.

| Packet type | What it does | Simple example |
| --- | --- | --- |
| Hello | Discover/maintain neighbours and exchange relationship parameters | Are we still neighbours? |
| Database Description (DD/DBD) | Summarize link-state database contents during synchronization | Here are the LSA headers I have |
| Link State Request (LSR) | Ask for specific missing/newer link-state information | Please send this LSA |
| Link State Update (LSU) | Carry one or more LSAs | Here is the requested or newly flooded link-state information |
| Link State Acknowledgment (LSAck) | Acknowledge receipt of LSAs | I received these LSAs |

Database Description packets carry summaries; Link State Update packets carry LSAs themselves. Do not confuse an LSA type with an OSPF packet type.

#### Practical example

After seeing a missing LSA in a database summary, a router sends an LSR, receives an LSU containing it and sends an LSAck.

---

## M2 · Q4A · IPv6 expansion and headers

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/papers/paper-2025-final--q4a/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/papers/paper-2025-final/q4a

Actual TEE paper · current-M2 matching parts; original marks

### 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. [10 marks]

#### Answer

## Given

Given address: `0:15::1:12:1213`.

## To find

The full 128-bit address in eight-group hexadecimal notation.

## Formula and why



$$
\text{missing groups}=8-\text{visible groups}
$$



A written 0 is a visible group. :: represents only the omitted all-zero groups.

## Step-by-step solution

#### Step 1. Count groups on both sides

Left: 0, 15 (2 group(s)). Right: 1, 12, 1213 (3 group(s)).

#### Step 2. Calculate omitted groups

Visible=2+3=5. Missing=8−5=3.

#### Step 3. Insert the groups

`0:15:0:0:0:1:12:1213`.

#### Step 4. Pad each group on the left

| Group number | Four-digit group |
| --- | --- |
| 1 | 0000 |
| 2 | 0015 |
| 3 | 0000 |
| 4 | 0000 |
| 5 | 0000 |
| 6 | 0001 |
| 7 | 0012 |
| 8 | 1213 |

#### Step 5. Write all eight in order

`0000:0015:0000:0000:0000:0001:0012:1213`.

**Final answer:** `0000:0015:0000:0000:0000:0001:0012:1213`

#### What this result means

Leading zeros change the spelling, not the address value. The final group count is eight.

## Header comparison

| Feature | IPv4 | IPv6 |
| --- | --- | --- |
| Address width | 32 bits | 128 bits |
| Base/header size | 20–60 bytes depending on options | 40-byte fixed base header |
| Length field | Total length includes IPv4 header | Payload Length excludes 40-byte base header |
| Lifetime field | TTL | Hop Limit |
| Following protocol | Protocol field | Next Header; may identify an extension |
| Header checksum | Present | No base-header checksum |
| Options | Inside IPv4 header | Typically extension headers |
| Fragmentation fields | In IPv4 header; routers may fragment if permitted | Fragment extension header; fragmentation by source, not routers |

Swipe across the diagram to read its labels ↔

![IPv6 base header · each horizontal row is 32 bits wide](https://deep-learning-study-room.vercel.app/cn/fig/ipv6-header.aef1bfbac7.svg)

Diagram: IPv6 base header · each horizontal row is 32 bits wide. Labels: IPv6 base header · each horizontal row is 32 bits wide | IPv6 base header · each horizontal row is 32 bits wide | Version | 4 | Traffic Class | 8 | Flow Label · 20 | Payload Length · 16 | Next Header | 8 | Hop Limit | 8 | Source address · 128 bits (four rows) | Destination address · 128 bits (four rows)

Fixed IPv6 base header.

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.

---

## M2 · Q6B · Three CSMA persistence rules

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/papers/paper-2025-final--q6b/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/papers/paper-2025-final/q6b

Actual TEE paper · current-M2 matching parts; original marks

### Actual PYQ. Compare 1-persistent, non-persistent, and p-persistent CSMA strategies with diagrammatic representations. [5 marks]

#### Answer

Swipe across the diagram to read its labels ↔

![CSMA persistence: what happens after carrier sensing?](https://deep-learning-study-room.vercel.app/cn/fig/persistence.528dafcd8a.svg)

Diagram: CSMA persistence: what happens after carrier sensing?. Labels: CSMA persistence: what happens after carrier sensing? | CSMA persistence: what happens after carrier sensing? | 1-persistent | Busy: keep listening. Idle: transmit immediately. | Non-persistent | Busy: random wait, then sense again. Idle: transmit. | p-persistent | Eligible idle slot: transmit with probability p; defer with probability 1−p.

Different decisions after sensing the channel.

| Rule | When idle | When busy | Trade-off |
| --- | --- | --- | --- |
| 1-persistent | Transmit immediately | Keep listening; transmit as soon as idle | Low idle delay, but waiting stations may start together |
| Non-persistent | Transmit | Wait a random time, then sense again | Less synchronized contention; may leave avoidable idle time |
| p-persistent (slotted) | Transmit with probability p; defer a slot with probability 1−p | Wait until available, then resume the probabilistic slot rule | Controls contention; needs slots and a choice of 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.

#### Practical example

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.

---

## M2 · Q7A · Dijkstra · full directed graph

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/papers/paper-2025-final--q7a/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/papers/paper-2025-final/q7a

Actual TEE paper · current-M2 matching parts; original marks

### 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. [10 marks]

#### Answer

## Given

| Edge | Cost |
| --- | --- |
| 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 |

Source=A; target=G. Edges are directed; do not add reverse edges.

## To find

The path A to G, its total cost and intermediate work.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.

Swipe across the diagram to read its labels ↔

![Dijkstra · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/dijkstra-pyq.ffe6efac11.svg)

Diagram: Dijkstra · given directed graph. Labels: Dijkstra · given directed graph | Dijkstra · given directed graph | A | A | B | B | A->B | 4 | C | C | A->C | 2 | B->C | 5 | D | D | B->D | 10 | C->D | 3 | E | E | C->E | 4 | D->E | 1 | F | F | D->F | 2 | E->F | 3 | G | G | F->G | 5

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

d[A]=0; every other distance=∞. No predecessors are known.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Tentative |
| B | ∞ | — | Tentative |
| C | ∞ | — | Tentative |
| D | ∞ | — | Tentative |
| E | ∞ | — | Tentative |
| F | ∞ | — | Tentative |
| G | ∞ | — | Tentative |

#### Step 2. Settle A at distance 0

Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞, E=∞, F=∞, G=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| A→B | ∞ | 0+(4)=4 | Improve to 4; predecessor=A |
| A→C | ∞ | 0+(2)=2 | Improve to 2; predecessor=A |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 4 | A | Tentative |
| C | 2 | A | Tentative |
| D | ∞ | — | Tentative |
| E | ∞ | — | Tentative |
| F | ∞ | — | Tentative |
| G | ∞ | — | Tentative |

#### Step 3. Settle C at distance 2

Unsettled candidates before selection: B=4, C=2, D=∞, E=∞, F=∞, G=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| C→D | ∞ | 2+(3)=5 | Improve to 5; predecessor=C |
| C→E | ∞ | 2+(4)=6 | Improve to 6; predecessor=C |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 4 | A | Tentative |
| C | 2 | A | Settled |
| D | 5 | C | Tentative |
| E | 6 | C | Tentative |
| F | ∞ | — | Tentative |
| G | ∞ | — | Tentative |

#### Step 4. Settle B at distance 4

Unsettled candidates before selection: B=4, D=5, E=6, F=∞, G=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| B→C | 2 | 4+(5)=9 | Already settled; retain |
| B→D | 5 | 4+(10)=14 | Retain 5 |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 4 | A | Settled |
| C | 2 | A | Settled |
| D | 5 | C | Tentative |
| E | 6 | C | Tentative |
| F | ∞ | — | Tentative |
| G | ∞ | — | Tentative |

#### Step 5. Settle D at distance 5

Unsettled candidates before selection: D=5, E=6, F=∞, G=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| D→E | 6 | 5+(1)=6 | Retain 6 (equal cost) |
| D→F | ∞ | 5+(2)=7 | Improve to 7; predecessor=D |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 4 | A | Settled |
| C | 2 | A | Settled |
| D | 5 | C | Settled |
| E | 6 | C | Tentative |
| F | 7 | D | Tentative |
| G | ∞ | — | Tentative |

#### Step 6. Settle E at distance 6

Unsettled candidates before selection: E=6, F=7, G=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| E→F | 7 | 6+(3)=9 | Retain 7 |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 4 | A | Settled |
| C | 2 | A | Settled |
| D | 5 | C | Settled |
| E | 6 | C | Settled |
| F | 7 | D | Tentative |
| G | ∞ | — | Tentative |

#### Step 7. Settle F at distance 7

Unsettled candidates before selection: F=7, G=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| F→G | ∞ | 7+(5)=12 | Improve to 12; predecessor=F |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 4 | A | Settled |
| C | 2 | A | Settled |
| D | 5 | C | Settled |
| E | 6 | C | Settled |
| F | 7 | D | Settled |
| G | 12 | F | Tentative |

#### Step 8. Settle G at distance 12

Unsettled candidates before selection: G=12. Select the minimum; ties use alphabetical order.

No outgoing edges to relax.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 4 | A | Settled |
| C | 2 | A | Settled |
| D | 5 | C | Settled |
| E | 6 | C | Settled |
| F | 7 | D | Settled |
| G | 12 | F | Settled |

#### Step 9. Recover the path

Trace backwards: G ← F ← D ← C ← A. Reverse it: A → C → D → F → G.

Edge sum: 2 + 3 + 2 + 5 = 12.

**Final answer:** A → C → D → F → G; cost=12.

#### What this result means

The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.

Swipe across the diagram to read its labels ↔

![Dijkstra · final route and distances](https://deep-learning-study-room.vercel.app/cn/fig/dijkstra-pyq-solution.d92888ba14.svg)

Diagram: Dijkstra · final route and distances. Labels: Dijkstra · final route and distances | Dijkstra · final route and distances | A | A | 0 | B | B | 4 | A->B | 4 | C | C | 2 | A->C | 2 | B->C | 5 | D | D | 5 | B->D | 10 | C->D | 3 | E | E | 6 | C->E | 4 | D->E | 1 | F | F | 7 | D->F | 2 | E->F | 3 | G | G | 12 | F->G | 5

Highlighted final route: A→C→D→F→G; total cost 12.

---

## M2 · Q1C · Pure ALOHA throughput

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/papers/paper-2026-reexam--q1c/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/papers/paper-2026-reexam/q1c

Actual TEE paper · current-M2 matching parts; original marks

### 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? [5 marks]

#### Answer

## Given

Protocol = Pure ALOHA; G = 0.5 attempts/frame time.

## To find

S, 100S and the maximum possible S.

## Formula and why



$$
S=G e^{-2G}
$$



Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.

## Step-by-step solution

#### Step 1. Calculate the exponent

−2 × 0.5 = -1.

#### Step 2. Evaluate the exponential



$$
e^{-1} \approx 0.367879441
$$



#### Step 3. Multiply by G

S = 0.5 × 0.367879441 ≈ 0.183939721 successful frames/frame time.

#### Step 4. Convert to percentage

0.183939721 × 100 ≈ 18.3940%.

#### Step 5. State the maximum separately

The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.

**Final answer:** S ≈ 0.183940; percentage ≈ 18.3940%; Smax ≈ 0.183940 at G=0.5.

#### What this result means

A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.

---

## M2 · Q1D · Address block /26

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/papers/paper-2026-reexam--q1d/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/papers/paper-2026-reexam/q1d

Actual TEE paper · current-M2 matching parts; original marks

### 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. [5 marks]

#### Answer

## Given

IP/prefix = `193.20.35.40/26`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−26=6; N=26=64.

#### Step 2. Construct the mask

Mask=`255.255.255.192`; binary=`11111111.11111111.11111111.11000000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 40 lies in 0…63.

#### Step 4. Form the first/network address

Keep earlier octets; place 0 in octet 4; set any later octets to zero. Network=**193.20.35.0**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 11000001 | 11111111 | 11000001 | 193 |
| 2 | 00010100 | 11111111 | 00010100 | 20 |
| 3 | 00100011 | 11111111 | 00100011 | 35 |
| 4 | 00101000 | 11000000 | 00000000 | 0 |

#### Step 6. Form the last/broadcast address

Use 63 in the changing octet and 255 in any later octets. Broadcast=**193.20.35.63**.

#### Step 7. State usable hosts

First usable=193.20.35.1; last usable=193.20.35.62; count=64−2=62.

**Final answer:** Network 193.20.35.0; broadcast 193.20.35.63; 64 total, 62 ordinary usable; range 193.20.35.1–193.20.35.62.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## M2 · Q2B · Department and lab allocation

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/papers/paper-2026-reexam--q2b/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/papers/paper-2026-reexam/q2b

Actual TEE paper · current-M2 matching parts; original marks

### 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. [10 marks]

#### Answer

## Given

| Department | Labs | Total addresses per lab |
| --- | --- | --- |
| A | 32 | 128 |
| B | 64 | 64 |
| C | 16 | 512 |

Parent: 172.16.0.0/16 with 65,536 addresses.

## To find

Lab prefixes, department ranges and unused total addresses.

## Formula and why



$$
p=32-\log_2(N_{\mathrm{addresses\ per\ lab}})
$$





$$
N_{\mathrm{department}}=N_{\mathrm{labs}}N_{\mathrm{addresses\ per\ lab}}
$$



The question requests addresses, not usable hosts. Therefore do not add two before selecting each lab size.

## Step-by-step solution

#### Step 1. Department A size

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.

#### Step 2. Department B size

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.

#### Step 3. Department C size

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.

#### Step 4. List every lab allocation

| Lab | Prefix | First address | Last address |
| --- | --- | --- | --- |
| A1 | 172.16.0.0/25 | 172.16.0.0 | 172.16.0.127 |
| A2 | 172.16.0.128/25 | 172.16.0.128 | 172.16.0.255 |
| A3 | 172.16.1.0/25 | 172.16.1.0 | 172.16.1.127 |
| A4 | 172.16.1.128/25 | 172.16.1.128 | 172.16.1.255 |
| A5 | 172.16.2.0/25 | 172.16.2.0 | 172.16.2.127 |
| A6 | 172.16.2.128/25 | 172.16.2.128 | 172.16.2.255 |
| A7 | 172.16.3.0/25 | 172.16.3.0 | 172.16.3.127 |
| A8 | 172.16.3.128/25 | 172.16.3.128 | 172.16.3.255 |
| A9 | 172.16.4.0/25 | 172.16.4.0 | 172.16.4.127 |
| A10 | 172.16.4.128/25 | 172.16.4.128 | 172.16.4.255 |
| A11 | 172.16.5.0/25 | 172.16.5.0 | 172.16.5.127 |
| A12 | 172.16.5.128/25 | 172.16.5.128 | 172.16.5.255 |
| A13 | 172.16.6.0/25 | 172.16.6.0 | 172.16.6.127 |
| A14 | 172.16.6.128/25 | 172.16.6.128 | 172.16.6.255 |
| A15 | 172.16.7.0/25 | 172.16.7.0 | 172.16.7.127 |
| A16 | 172.16.7.128/25 | 172.16.7.128 | 172.16.7.255 |
| A17 | 172.16.8.0/25 | 172.16.8.0 | 172.16.8.127 |
| A18 | 172.16.8.128/25 | 172.16.8.128 | 172.16.8.255 |
| A19 | 172.16.9.0/25 | 172.16.9.0 | 172.16.9.127 |
| A20 | 172.16.9.128/25 | 172.16.9.128 | 172.16.9.255 |
| A21 | 172.16.10.0/25 | 172.16.10.0 | 172.16.10.127 |
| A22 | 172.16.10.128/25 | 172.16.10.128 | 172.16.10.255 |
| A23 | 172.16.11.0/25 | 172.16.11.0 | 172.16.11.127 |
| A24 | 172.16.11.128/25 | 172.16.11.128 | 172.16.11.255 |
| A25 | 172.16.12.0/25 | 172.16.12.0 | 172.16.12.127 |
| A26 | 172.16.12.128/25 | 172.16.12.128 | 172.16.12.255 |
| A27 | 172.16.13.0/25 | 172.16.13.0 | 172.16.13.127 |
| A28 | 172.16.13.128/25 | 172.16.13.128 | 172.16.13.255 |
| A29 | 172.16.14.0/25 | 172.16.14.0 | 172.16.14.127 |
| A30 | 172.16.14.128/25 | 172.16.14.128 | 172.16.14.255 |
| A31 | 172.16.15.0/25 | 172.16.15.0 | 172.16.15.127 |
| A32 | 172.16.15.128/25 | 172.16.15.128 | 172.16.15.255 |
| B1 | 172.16.16.0/26 | 172.16.16.0 | 172.16.16.63 |
| B2 | 172.16.16.64/26 | 172.16.16.64 | 172.16.16.127 |
| B3 | 172.16.16.128/26 | 172.16.16.128 | 172.16.16.191 |
| B4 | 172.16.16.192/26 | 172.16.16.192 | 172.16.16.255 |
| B5 | 172.16.17.0/26 | 172.16.17.0 | 172.16.17.63 |
| B6 | 172.16.17.64/26 | 172.16.17.64 | 172.16.17.127 |
| B7 | 172.16.17.128/26 | 172.16.17.128 | 172.16.17.191 |
| B8 | 172.16.17.192/26 | 172.16.17.192 | 172.16.17.255 |
| B9 | 172.16.18.0/26 | 172.16.18.0 | 172.16.18.63 |
| B10 | 172.16.18.64/26 | 172.16.18.64 | 172.16.18.127 |
| B11 | 172.16.18.128/26 | 172.16.18.128 | 172.16.18.191 |
| B12 | 172.16.18.192/26 | 172.16.18.192 | 172.16.18.255 |
| B13 | 172.16.19.0/26 | 172.16.19.0 | 172.16.19.63 |
| B14 | 172.16.19.64/26 | 172.16.19.64 | 172.16.19.127 |
| B15 | 172.16.19.128/26 | 172.16.19.128 | 172.16.19.191 |
| B16 | 172.16.19.192/26 | 172.16.19.192 | 172.16.19.255 |
| B17 | 172.16.20.0/26 | 172.16.20.0 | 172.16.20.63 |
| B18 | 172.16.20.64/26 | 172.16.20.64 | 172.16.20.127 |
| B19 | 172.16.20.128/26 | 172.16.20.128 | 172.16.20.191 |
| B20 | 172.16.20.192/26 | 172.16.20.192 | 172.16.20.255 |
| B21 | 172.16.21.0/26 | 172.16.21.0 | 172.16.21.63 |
| B22 | 172.16.21.64/26 | 172.16.21.64 | 172.16.21.127 |
| B23 | 172.16.21.128/26 | 172.16.21.128 | 172.16.21.191 |
| B24 | 172.16.21.192/26 | 172.16.21.192 | 172.16.21.255 |
| B25 | 172.16.22.0/26 | 172.16.22.0 | 172.16.22.63 |
| B26 | 172.16.22.64/26 | 172.16.22.64 | 172.16.22.127 |
| B27 | 172.16.22.128/26 | 172.16.22.128 | 172.16.22.191 |
| B28 | 172.16.22.192/26 | 172.16.22.192 | 172.16.22.255 |
| B29 | 172.16.23.0/26 | 172.16.23.0 | 172.16.23.63 |
| B30 | 172.16.23.64/26 | 172.16.23.64 | 172.16.23.127 |
| B31 | 172.16.23.128/26 | 172.16.23.128 | 172.16.23.191 |
| B32 | 172.16.23.192/26 | 172.16.23.192 | 172.16.23.255 |
| B33 | 172.16.24.0/26 | 172.16.24.0 | 172.16.24.63 |
| B34 | 172.16.24.64/26 | 172.16.24.64 | 172.16.24.127 |
| B35 | 172.16.24.128/26 | 172.16.24.128 | 172.16.24.191 |
| B36 | 172.16.24.192/26 | 172.16.24.192 | 172.16.24.255 |
| B37 | 172.16.25.0/26 | 172.16.25.0 | 172.16.25.63 |
| B38 | 172.16.25.64/26 | 172.16.25.64 | 172.16.25.127 |
| B39 | 172.16.25.128/26 | 172.16.25.128 | 172.16.25.191 |
| B40 | 172.16.25.192/26 | 172.16.25.192 | 172.16.25.255 |
| B41 | 172.16.26.0/26 | 172.16.26.0 | 172.16.26.63 |
| B42 | 172.16.26.64/26 | 172.16.26.64 | 172.16.26.127 |
| B43 | 172.16.26.128/26 | 172.16.26.128 | 172.16.26.191 |
| B44 | 172.16.26.192/26 | 172.16.26.192 | 172.16.26.255 |
| B45 | 172.16.27.0/26 | 172.16.27.0 | 172.16.27.63 |
| B46 | 172.16.27.64/26 | 172.16.27.64 | 172.16.27.127 |
| B47 | 172.16.27.128/26 | 172.16.27.128 | 172.16.27.191 |
| B48 | 172.16.27.192/26 | 172.16.27.192 | 172.16.27.255 |
| B49 | 172.16.28.0/26 | 172.16.28.0 | 172.16.28.63 |
| B50 | 172.16.28.64/26 | 172.16.28.64 | 172.16.28.127 |
| B51 | 172.16.28.128/26 | 172.16.28.128 | 172.16.28.191 |
| B52 | 172.16.28.192/26 | 172.16.28.192 | 172.16.28.255 |
| B53 | 172.16.29.0/26 | 172.16.29.0 | 172.16.29.63 |
| B54 | 172.16.29.64/26 | 172.16.29.64 | 172.16.29.127 |
| B55 | 172.16.29.128/26 | 172.16.29.128 | 172.16.29.191 |
| B56 | 172.16.29.192/26 | 172.16.29.192 | 172.16.29.255 |
| B57 | 172.16.30.0/26 | 172.16.30.0 | 172.16.30.63 |
| B58 | 172.16.30.64/26 | 172.16.30.64 | 172.16.30.127 |
| B59 | 172.16.30.128/26 | 172.16.30.128 | 172.16.30.191 |
| B60 | 172.16.30.192/26 | 172.16.30.192 | 172.16.30.255 |
| B61 | 172.16.31.0/26 | 172.16.31.0 | 172.16.31.63 |
| B62 | 172.16.31.64/26 | 172.16.31.64 | 172.16.31.127 |
| B63 | 172.16.31.128/26 | 172.16.31.128 | 172.16.31.191 |
| B64 | 172.16.31.192/26 | 172.16.31.192 | 172.16.31.255 |
| C1 | 172.16.32.0/23 | 172.16.32.0 | 172.16.33.255 |
| C2 | 172.16.34.0/23 | 172.16.34.0 | 172.16.35.255 |
| C3 | 172.16.36.0/23 | 172.16.36.0 | 172.16.37.255 |
| C4 | 172.16.38.0/23 | 172.16.38.0 | 172.16.39.255 |
| C5 | 172.16.40.0/23 | 172.16.40.0 | 172.16.41.255 |
| C6 | 172.16.42.0/23 | 172.16.42.0 | 172.16.43.255 |
| C7 | 172.16.44.0/23 | 172.16.44.0 | 172.16.45.255 |
| C8 | 172.16.46.0/23 | 172.16.46.0 | 172.16.47.255 |
| C9 | 172.16.48.0/23 | 172.16.48.0 | 172.16.49.255 |
| C10 | 172.16.50.0/23 | 172.16.50.0 | 172.16.51.255 |
| C11 | 172.16.52.0/23 | 172.16.52.0 | 172.16.53.255 |
| C12 | 172.16.54.0/23 | 172.16.54.0 | 172.16.55.255 |
| C13 | 172.16.56.0/23 | 172.16.56.0 | 172.16.57.255 |
| C14 | 172.16.58.0/23 | 172.16.58.0 | 172.16.59.255 |
| C15 | 172.16.60.0/23 | 172.16.60.0 | 172.16.61.255 |
| C16 | 172.16.62.0/23 | 172.16.62.0 | 172.16.63.255 |

#### Step 5. Calculate total allocation

4,096+4,096+8,192=16,384 addresses.

#### Step 6. Calculate unused space

65,536−16,384=49,152 addresses remain unallocated, from 172.16.64.0 through 172.16.255.255.

**Final answer:** A: /25 per lab; B: /26 per lab; C: /23 per lab. 49,152 total addresses remain unallocated.

#### What this result means

The three department blocks are aligned and non-overlapping. If these had been usable-host requirements, the per-lab prefixes would have been different.

---

## M2 · Q3B · How OSPF chooses a path

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/papers/paper-2026-reexam--q3b/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/papers/paper-2026-reexam/q3b

Actual TEE paper · current-M2 matching parts; original marks

### Actual PYQ. Summarize how OSPF determines the best path to a destination network. [5 marks]

#### Answer

Swipe across the diagram to read its labels ↔

![Link-state routing: from local links to a shortest-path tree](https://deep-learning-study-room.vercel.app/cn/fig/link-state.bbee3173ec.svg)

Diagram: Link-state routing: from local links to a shortest-path tree. Labels: Link-state routing: from local links to a shortest-path tree | Link-state routing: from local links to a shortest-path tree | 1. Discover neighbours and costs | Each router measures or configures its local link information. | 2. Flood link-state information | Routers share topology information within the routing scope. | 3. Maintain the topology database | New information updates the shared view after convergence. | 4. Run Dijkstra from this router | Add link costs; install the resulting next hops.

Build the topology, then calculate the route.

1. Discover/maintain neighbours and determine local link costs.
2. Exchange link-state information and synchronize the database within the appropriate area.
3. Run Dijkstra’s shortest-path algorithm with the current router as the root.
4. Add outgoing link costs along candidate paths and select minimum-cost routes.
5. Install next-hop information; recalculate when relevant topology information changes.

#### Practical example

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.

---

## M2 · Q4A · IPv6 packet format

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/papers/paper-2026-reexam--q4a/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/papers/paper-2026-reexam/q4a

Actual TEE paper · current-M2 matching parts; original marks

### Actual PYQ. Construct the IPv6 packet format and explain the purpose of each field. [10 marks]

#### Answer

Swipe across the diagram to read its labels ↔

![IPv6 base header · each horizontal row is 32 bits wide](https://deep-learning-study-room.vercel.app/cn/fig/ipv6-header.aef1bfbac7.svg)

Diagram: IPv6 base header · each horizontal row is 32 bits wide. Labels: IPv6 base header · each horizontal row is 32 bits wide | IPv6 base header · each horizontal row is 32 bits wide | Version | 4 | Traffic Class | 8 | Flow Label · 20 | Payload Length · 16 | Next Header | 8 | Hop Limit | 8 | Source address · 128 bits (four rows) | Destination address · 128 bits (four rows)

Eight base-header fields occupy 320 bits = 40 bytes.

| Field | Bits | Purpose |
| --- | --- | --- |
| Version | 4 | Value 6 |
| Traffic Class | 8 | Traffic treatment/congestion-related marking |
| Flow Label | 20 | Identifies a flow for appropriate handling |
| Payload Length | 16 | Bytes after the base header; includes extension headers when present |
| Next Header | 8 | Type of the next extension header or upper-layer protocol |
| Hop Limit | 8 | Decremented on forwarding; limits packet lifetime in hops |
| Source address | 128 | Sending interface address |
| Destination address | 128 | Destination address |

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.

#### Practical example

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.

---

## M2 · Q6B · ALOHA at three attempt rates

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/papers/paper-2026-reexam--q6b/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/papers/paper-2026-reexam/q6b

Actual TEE paper · current-M2 matching parts; original marks

### 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? [5 marks]

#### Answer

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.

## Case a · 1000 frames/s

## Given

| Symbol | Given |
| --- | --- |
| L | 200 bits |
| R | 200 kbps = 200,000 bits/s |
| λ | 1000 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-2G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 200/200,000 = 0.001 s = 1 ms.

#### Step 2. Offered load

G = 1000 × 0.001 = 1 attempts/frame time.

#### Step 3. Exponent and exponential

−2G = -2; e to that power ≈ 0.135335283.

#### Step 4. Normalized throughput

S = 1 × 0.135335283 ≈ 0.135335283.

#### Step 5. Successful frames each second

S/T = 0.135335283/0.001 ≈ 135.335283 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.135335283 × 200,000 ≈ 27067.056647 bits/s ≈ 27.067057 kbps.

**Final answer:** G=1, S≈0.135335, successful rate≈135.335 frames/s = 27.067 kbps.

#### What this result means

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 λ.

## Case b · 500 frames/s

## Given

| Symbol | Given |
| --- | --- |
| L | 200 bits |
| R | 200 kbps = 200,000 bits/s |
| λ | 500 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-2G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 200/200,000 = 0.001 s = 1 ms.

#### Step 2. Offered load

G = 500 × 0.001 = 0.5 attempts/frame time.

#### Step 3. Exponent and exponential

−2G = -1; e to that power ≈ 0.367879441.

#### Step 4. Normalized throughput

S = 0.5 × 0.367879441 ≈ 0.183939721.

#### Step 5. Successful frames each second

S/T = 0.183939721/0.001 ≈ 183.939721 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.183939721 × 200,000 ≈ 36787.944117 bits/s ≈ 36.787944 kbps.

**Final answer:** G=0.5, S≈0.183940, successful rate≈183.940 frames/s = 36.788 kbps.

#### What this result means

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 λ.

## Case c · 250 frames/s

## Given

| Symbol | Given |
| --- | --- |
| L | 200 bits |
| R | 200 kbps = 200,000 bits/s |
| λ | 250 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-2G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 200/200,000 = 0.001 s = 1 ms.

#### Step 2. Offered load

G = 250 × 0.001 = 0.25 attempts/frame time.

#### Step 3. Exponent and exponential

−2G = -0.5; e to that power ≈ 0.606530660.

#### Step 4. Normalized throughput

S = 0.25 × 0.606530660 ≈ 0.151632665.

#### Step 5. Successful frames each second

S/T = 0.151632665/0.001 ≈ 151.632665 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.151632665 × 200,000 ≈ 30326.532986 bits/s ≈ 30.326533 kbps.

**Final answer:** G=0.25, S≈0.151633, successful rate≈151.633 frames/s = 30.327 kbps.

#### What this result means

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 λ.

---

## M2 · Q7A · Bellman–Ford · full directed graph

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/papers/paper-2026-reexam--q7a/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/papers/paper-2026-reexam/q7a

Actual TEE paper · current-M2 matching parts; original marks

### 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. [10 marks]

#### Answer

## Given

| Directed edge | Weight |
| --- | --- |
| 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 |

## To find

The shortest route and cost, with complete passes and a negative-cycle check.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



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.

Swipe across the diagram to read its labels ↔

![Bellman–Ford · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/bellman-pyq.8245b97635.svg)

Diagram: Bellman–Ford · given directed graph. Labels: Bellman–Ford · given directed graph | Bellman–Ford · given directed graph | A | A | B | B | A->B | 7 | C | C | A->C | 6 | D | D | A->D | 5 | E | E | B->E | -2 | C->B | -2 | C->E | 1 | D->C | -2 | F | F | D->F | 3 | G | G | E->G | 5 | F->G | 4

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

7 vertices → at most 6 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.

#### Step 2. Pass 1: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | ∞ | 0+(7)=7 | 7 | Update; predecessor=A |
| A→C | ∞ | 0+(6)=6 | 6 | Update; predecessor=A |
| A→D | ∞ | 0+(5)=5 | 5 | Update; predecessor=A |
| B→E | ∞ | 7+(-2)=5 | 5 | Update; predecessor=B |
| D→C | 6 | 5+(-2)=3 | 3 | Update; predecessor=D |
| C→B | 7 | 3+(-2)=1 | 1 | Update; predecessor=C |
| C→E | 5 | 3+(1)=4 | 4 | Update; predecessor=C |
| E→G | ∞ | 4+(5)=9 | 9 | Update; predecessor=E |
| D→F | ∞ | 5+(3)=8 | 8 | Update; predecessor=D |
| F→G | 9 | 8+(4)=12 | 9 | No improvement |

| Vertex | A | B | C | D | E | F | G |
| --- | --- | --- | --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 1 | 3 | 5 | 4 | 8 | 9 |
| Predecessor | — | C | D | A | C | D | E |

#### Step 3. Pass 2: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | 1 | 0+(7)=7 | 1 | No improvement |
| A→C | 3 | 0+(6)=6 | 3 | No improvement |
| A→D | 5 | 0+(5)=5 | 5 | No improvement |
| B→E | 4 | 1+(-2)=-1 | -1 | Update; predecessor=B |
| D→C | 3 | 5+(-2)=3 | 3 | No improvement |
| C→B | 1 | 3+(-2)=1 | 1 | No improvement |
| C→E | -1 | 3+(1)=4 | -1 | No improvement |
| E→G | 9 | -1+(5)=4 | 4 | Update; predecessor=E |
| D→F | 8 | 5+(3)=8 | 8 | No improvement |
| F→G | 4 | 8+(4)=12 | 4 | No improvement |

| Vertex | A | B | C | D | E | F | G |
| --- | --- | --- | --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 1 | 3 | 5 | -1 | 8 | 4 |
| Predecessor | — | C | D | A | B | D | E |

#### Step 4. Pass 3: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | 1 | 0+(7)=7 | 1 | No improvement |
| A→C | 3 | 0+(6)=6 | 3 | No improvement |
| A→D | 5 | 0+(5)=5 | 5 | No improvement |
| B→E | -1 | 1+(-2)=-1 | -1 | No improvement |
| D→C | 3 | 5+(-2)=3 | 3 | No improvement |
| C→B | 1 | 3+(-2)=1 | 1 | No improvement |
| C→E | -1 | 3+(1)=4 | -1 | No improvement |
| E→G | 4 | -1+(5)=4 | 4 | No improvement |
| D→F | 8 | 5+(3)=8 | 8 | No improvement |
| F→G | 4 | 8+(4)=12 | 4 | No improvement |

| Vertex | A | B | C | D | E | F | G |
| --- | --- | --- | --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 1 | 3 | 5 | -1 | 8 | 4 |
| Predecessor | — | C | D | A | B | D | E |

#### Step 5. Stop after an unchanged pass

This entire pass changed no distance. Further identical relaxation passes will not improve anything.

#### Step 6. Recover and total the path

Backward predecessors: G ← E ← B ← C ← D ← A. Forward route: A → D → C → B → E → G.

Cost = (5) + (-2) + (-2) + (-2) + (5) = 4. No edge can now improve its destination label.

**Final answer:** A → D → C → B → E → G; shortest cost=4.

#### What this result means

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.

Swipe across the diagram to read its labels ↔

![Bellman–Ford · final route and distances](https://deep-learning-study-room.vercel.app/cn/fig/bellman-pyq-solution.9ae8451e95.svg)

Diagram: Bellman–Ford · final route and distances. Labels: Bellman–Ford · final route and distances | Bellman–Ford · final route and distances | A | A | 0 | B | B | 1 | A->B | 7 | C | C | 3 | A->C | 6 | D | D | 5 | A->D | 5 | E | E | -1 | B->E | -2 | C->B | -2 | C->E | 1 | D->C | -2 | F | F | 8 | D->F | 3 | G | G | 4 | E->G | 5 | F->G | 4

Highlighted route A→D→C→B→E→G, cost 5−2−2−2+5=4.

---

## M2 · Three complete practice papers

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/mocks/mock-start--pattern/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/mocks/mock-start/pattern

10 marks attempted · 2+2 compulsory and any two 3-mark questions

Each paper contains five question parts. **Q1(a) and Q1(b) are compulsory, 2 marks each. Choose any two of Q2, Q3 and Q4, 3 marks each.** All five answers are supplied immediately below their questions so you can also learn the optional question you did not attempt.

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.

1. Write the question number and list the given quantities with units.
2. State the formula or rule and why it fits this question.
3. Show each conversion, substitution, comparison and update separately.
4. End with the answer and its unit/address prefix/path.

Paper A emphasizes ALOHA, blocks and Dijkstra. Paper B includes IPv6, VLSM and Bellman–Ford. Paper C emphasizes access protocols, DHCP and route decisions.

---

## M2 · Q1A · Carrier sensing and collisions

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/mocks/mock-a--q1a/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/mocks/mock-a/q1a

Q1(a)+Q1(b) compulsory; choose any two of Q2/Q3/Q4 · 10 marks attempted

### Question. Why does carrier sensing reduce but not eliminate collisions? [2 practice marks]

#### Answer

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.

#### Practical example

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.

---

## M2 · Q1B · Host bits and address counts

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/mocks/mock-a--q1b/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/mocks/mock-a/q1b

Q1(a)+Q1(b) compulsory; choose any two of Q2/Q3/Q4 · 10 marks attempted

### Question. For IPv4 /27, find the number of host bits, total addresses and ordinary usable host addresses. [2 practice marks]

#### Answer

## Given

p=27; ordinary IPv4 broadcast subnet.

## To find

h, total and usable counts.

## Formula and why



$$
h=32-p,\quad N=2^h,\quad U=N-2
$$



Two boundary addresses are reserved under these ordinary rules.

## Step-by-step solution

1. Host bits: 32−27=5.
2. Total addresses: 2⁵=32.
3. Usable hosts: 32−2=30.

**Final answer:** 5 host bits, 32 total, 30 usable.

#### Practical example

A request for 32 usable devices would need a larger subnet.

---

## M2 · Q2 · Pure ALOHA throughput

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/mocks/mock-a--q2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/mocks/mock-a/q2

Q1(a)+Q1(b) compulsory; choose any two of Q2/Q3/Q4 · 10 marks attempted

### 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. [3 practice marks]

#### Answer

## Given

| Symbol | Given |
| --- | --- |
| L | 500 bits |
| R | 500 kbps = 500,000 bits/s |
| λ | 500 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-2G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 500/500,000 = 0.001 s = 1 ms.

#### Step 2. Offered load

G = 500 × 0.001 = 0.5 attempts/frame time.

#### Step 3. Exponent and exponential

−2G = -1; e to that power ≈ 0.367879441.

#### Step 4. Normalized throughput

S = 0.5 × 0.367879441 ≈ 0.183939721.

#### Step 5. Successful frames each second

S/T = 0.183939721/0.001 ≈ 183.939721 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.183939721 × 500,000 ≈ 91969.860293 bits/s ≈ 91.969860 kbps.

**Final answer:** G=0.5, S≈0.183940, successful rate≈183.940 frames/s = 91.970 kbps.

#### What this result means

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 λ.

---

## M2 · Q3 · Find the complete /27 block

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/mocks/mock-a--q3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/mocks/mock-a/q3

Q1(a)+Q1(b) compulsory; choose any two of Q2/Q3/Q4 · 10 marks attempted

### Question. Find the network address, broadcast address and usable host range of 192.168.5.197/27. [3 practice marks]

#### Answer

## Given

IP/prefix = `192.168.5.197/27`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−27=5; N=25=32.

#### Step 2. Construct the mask

Mask=`255.255.255.224`; binary=`11111111.11111111.11111111.11100000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 224, so step=256−224=32. The IP value 197 lies in 192…223.

#### Step 4. Form the first/network address

Keep earlier octets; place 192 in octet 4; set any later octets to zero. Network=**192.168.5.192**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 11000000 | 11111111 | 11000000 | 192 |
| 2 | 10101000 | 11111111 | 10101000 | 168 |
| 3 | 00000101 | 11111111 | 00000101 | 5 |
| 4 | 11000101 | 11100000 | 11000000 | 192 |

#### Step 6. Form the last/broadcast address

Use 223 in the changing octet and 255 in any later octets. Broadcast=**192.168.5.223**.

#### Step 7. State usable hosts

First usable=192.168.5.193; last usable=192.168.5.222; count=32−2=30.

**Final answer:** Network 192.168.5.192; broadcast 192.168.5.223; 32 total, 30 ordinary usable; range 192.168.5.193–192.168.5.222.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## M2 · Q4 · Dijkstra shortest path

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/mocks/mock-a--q4/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/mocks/mock-a/q4

Q1(a)+Q1(b) compulsory; choose any two of Q2/Q3/Q4 · 10 marks attempted

### 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. [3 practice marks]

#### Answer

## Given

| Edge | Cost |
| --- | --- |
| A→B | 2 |
| A→C | 6 |
| B→C | 1 |
| B→D | 7 |
| C→D | 2 |

Source=A; target=D. Edges are directed; do not add reverse edges.

## To find

The path A to D, its total cost and intermediate work.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.

Swipe across the diagram to read its labels ↔

![Dijkstra · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/dijkstra-mock.f988abf338.svg)

Diagram: Dijkstra · given directed graph. Labels: Dijkstra · given directed graph | Dijkstra · given directed graph | A | A | B | B | A->B | 2 | C | C | A->C | 6 | B->C | 1 | D | D | B->D | 7 | C->D | 2

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

d[A]=0; every other distance=∞. No predecessors are known.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Tentative |
| B | ∞ | — | Tentative |
| C | ∞ | — | Tentative |
| D | ∞ | — | Tentative |

#### Step 2. Settle A at distance 0

Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| A→B | ∞ | 0+(2)=2 | Improve to 2; predecessor=A |
| A→C | ∞ | 0+(6)=6 | Improve to 6; predecessor=A |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 2 | A | Tentative |
| C | 6 | A | Tentative |
| D | ∞ | — | Tentative |

#### Step 3. Settle B at distance 2

Unsettled candidates before selection: B=2, C=6, D=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| B→C | 6 | 2+(1)=3 | Improve to 3; predecessor=B |
| B→D | ∞ | 2+(7)=9 | Improve to 9; predecessor=B |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 2 | A | Settled |
| C | 3 | B | Tentative |
| D | 9 | B | Tentative |

#### Step 4. Settle C at distance 3

Unsettled candidates before selection: C=3, D=9. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| C→D | 9 | 3+(2)=5 | Improve to 5; predecessor=C |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 2 | A | Settled |
| C | 3 | B | Settled |
| D | 5 | C | Tentative |

#### Step 5. Settle D at distance 5

Unsettled candidates before selection: D=5. Select the minimum; ties use alphabetical order.

No outgoing edges to relax.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 2 | A | Settled |
| C | 3 | B | Settled |
| D | 5 | C | Settled |

#### Step 6. Recover the path

Trace backwards: D ← C ← B ← A. Reverse it: A → B → C → D.

Edge sum: 2 + 1 + 2 = 5.

**Final answer:** A → B → C → D; cost=5.

#### What this result means

The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.

---

## M2 · Q1A · ARP versus RARP

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/mocks/mock-b--q1a/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/mocks/mock-b/q1a

Q1(a)+Q1(b) compulsory; choose any two of Q2/Q3/Q4 · 10 marks attempted

### Question. Distinguish ARP and RARP with one use of each. [2 practice marks]

#### Answer

| Protocol | Known | Needed | Use |
| --- | --- | --- | --- |
| ARP | Local next-hop IPv4 | MAC/hardware address | Local frame delivery |
| RARP | Client hardware address | Client IPv4 | Historical boot-time assignment |

#### Practical example

A diskless workstation with a pre-registered hardware address could use RARP to learn its assigned IPv4 address from a local RARP server.

---

## M2 · Q1B · Expand an IPv6 address

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/mocks/mock-b--q1b/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/mocks/mock-b/q1b

Q1(a)+Q1(b) compulsory; choose any two of Q2/Q3/Q4 · 10 marks attempted

### Question. Expand 2001:db8::10 into full IPv6 notation and state the number of groups replaced by ::. [2 practice marks]

#### Answer

## Given

Given address: `2001:db8::10`.

## To find

The full 128-bit address in eight-group hexadecimal notation.

## Formula and why



$$
\text{missing groups}=8-\text{visible groups}
$$



A written 0 is a visible group. :: represents only the omitted all-zero groups.

## Step-by-step solution

#### Step 1. Count groups on both sides

Left: 2001, db8 (2 group(s)). Right: 10 (1 group(s)).

#### Step 2. Calculate omitted groups

Visible=2+1=3. Missing=8−3=5.

#### Step 3. Insert the groups

`2001:db8:0:0:0:0:0:10`.

#### Step 4. Pad each group on the left

| Group number | Four-digit group |
| --- | --- |
| 1 | 2001 |
| 2 | 0db8 |
| 3 | 0000 |
| 4 | 0000 |
| 5 | 0000 |
| 6 | 0000 |
| 7 | 0000 |
| 8 | 0010 |

#### Step 5. Write all eight in order

`2001:0db8:0000:0000:0000:0000:0000:0010`.

**Final answer:** `2001:0db8:0000:0000:0000:0000:0000:0010`

#### What this result means

Leading zeros change the spelling, not the address value. The final group count is eight.

---

## M2 · Q2 · Allocate three VLSM blocks

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/mocks/mock-b--q2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/mocks/mock-b/q2

Q1(a)+Q1(b) compulsory; choose any two of Q2/Q3/Q4 · 10 marks attempted

### 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. [3 practice marks]

#### Answer

## Given

| Department | Usable hosts |
| --- | --- |
| A | 60 |
| B | 30 |
| C | 12 |

## To find

An aligned subnet for each department, usable ranges, broadcasts and remaining addresses.

## Formula and why



$$
2^h-2\geq H,\quad p=32-h
$$



Choose the smallest sufficient subnet per requirement. Align each start to its block size and never overlap a previously assigned range.

## Step-by-step solution

#### Step 1. Sort the host requirements

A (60) → B (30) → C (12)

#### Step 2. A · choose and allocate

60 hosts require 26−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.

#### Step 3. B · choose and allocate

30 hosts require 25−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.

#### Step 4. C · choose and allocate

12 hosts require 24−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.

#### Step 5. Write the complete allocation

| Group | Hosts | Network/prefix | Mask | Usable range | Broadcast | Spare usable |
| --- | --- | --- | --- | --- | --- | --- |
| A | 60 | 192.168.40.0/26 | 255.255.255.192 | 192.168.40.1–192.168.40.62 | 192.168.40.63 | 2 |
| B | 30 | 192.168.40.64/27 | 255.255.255.224 | 192.168.40.65–192.168.40.94 | 192.168.40.95 | 0 |
| C | 12 | 192.168.40.96/28 | 255.255.255.240 | 192.168.40.97–192.168.40.110 | 192.168.40.111 | 2 |

#### Step 6. Count addresses reserved and left

Reserved=64+32+16=112. Parent total=256. Unallocated=256−112=144.

**Final answer:** 112 total addresses reserved; 144 unallocated. The table gives one valid complete allocation.

#### What this result means

Unused usable capacity inside assigned subnets is different from unallocated address space outside those subnets.

---

## M2 · Q3 · Bellman–Ford shortest path

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/mocks/mock-b--q3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/mocks/mock-b/q3

Q1(a)+Q1(b) compulsory; choose any two of Q2/Q3/Q4 · 10 marks attempted

### 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. [3 practice marks]

#### Answer

## Given

| Directed edge | Weight |
| --- | --- |
| A→B | 5 |
| A→C | 8 |
| B→C | -3 |
| C→D | 4 |
| B→D | 7 |

## To find

The shortest route and cost, with complete passes and a negative-cycle check.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



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.

Swipe across the diagram to read its labels ↔

![Bellman–Ford · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/bellman-mock.47d822ce76.svg)

Diagram: Bellman–Ford · given directed graph. Labels: Bellman–Ford · given directed graph | Bellman–Ford · given directed graph | A | A | B | B | A->B | 5 | C | C | A->C | 8 | B->C | -3 | D | D | B->D | 7 | C->D | 4

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

4 vertices → at most 3 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.

#### Step 2. Pass 1: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | ∞ | 0+(5)=5 | 5 | Update; predecessor=A |
| A→C | ∞ | 0+(8)=8 | 8 | Update; predecessor=A |
| B→C | 8 | 5+(-3)=2 | 2 | Update; predecessor=B |
| C→D | ∞ | 2+(4)=6 | 6 | Update; predecessor=C |
| B→D | 6 | 5+(7)=12 | 6 | No improvement |

| Vertex | A | B | C | D |
| --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 5 | 2 | 6 |
| Predecessor | — | A | B | C |

#### Step 3. Pass 2: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | 5 | 0+(5)=5 | 5 | No improvement |
| A→C | 2 | 0+(8)=8 | 2 | No improvement |
| B→C | 2 | 5+(-3)=2 | 2 | No improvement |
| C→D | 6 | 2+(4)=6 | 6 | No improvement |
| B→D | 6 | 5+(7)=12 | 6 | No improvement |

| Vertex | A | B | C | D |
| --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 5 | 2 | 6 |
| Predecessor | — | A | B | C |

#### Step 4. Stop after an unchanged pass

This entire pass changed no distance. Further identical relaxation passes will not improve anything.

#### Step 5. Recover and total the path

Backward predecessors: D ← C ← B ← A. Forward route: A → B → C → D.

Cost = (5) + (-3) + (4) = 6. No edge can now improve its destination label.

**Final answer:** A → B → C → D; shortest cost=6.

#### What this result means

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.

---

## M2 · Q4 · OSPF operation and packets

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/mocks/mock-b--q4/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/mocks/mock-b/q4

Q1(a)+Q1(b) compulsory; choose any two of Q2/Q3/Q4 · 10 marks attempted

### Question. Explain how OSPF learns the topology and selects a route. Name its five packet types. [3 practice marks]

#### Answer

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.

#### Practical example

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.

Five packet types: Hello, Database Description, Link State Request, Link State Update and Link State Acknowledgment.

---

## M2 · Q1A · Pure versus Slotted ALOHA

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/mocks/mock-c--q1a/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/mocks/mock-c/q1a

Q1(a)+Q1(b) compulsory; choose any two of Q2/Q3/Q4 · 10 marks attempted

### Question. Compare Pure ALOHA and Slotted ALOHA in terms of start time, vulnerable period and maximum throughput. [2 practice marks]

#### Answer

| Feature | Pure | Slotted |
| --- | --- | --- |
| Start time | Any time | Slot boundary only |
| Synchronization | No common slots required | Required |
| Vulnerable period | 2T | T |
| Maximum S | 1/(2e) ≈ 0.184 | 1/e ≈ 0.368 |
| G at maximum | 0.5 | 1 |

#### Practical example

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.

---

## M2 · Q1B · DHCP purpose and messages

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/mocks/mock-c--q1b/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/mocks/mock-c/q1b

Q1(a)+Q1(b) compulsory; choose any two of Q2/Q3/Q4 · 10 marks attempted

### Question. State the purpose of DHCP and list its four initial allocation messages in order. [2 practice marks]

#### Answer

1. DHCPDISCOVER: client searches for a server.
2. DHCPOFFER: server proposes an address/configuration.
3. DHCPREQUEST: client requests the chosen allocation.
4. DHCPACK: server confirms the lease.

DHCP reduces manual configuration and supports controlled address reuse through leases.

#### Practical example

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.

---

## M2 · Q2 · CSMA/CD minimum frame

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/mocks/mock-c--q2/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/mocks/mock-c/q2

Q1(a)+Q1(b) compulsory; choose any two of Q2/Q3/Q4 · 10 marks attempted

### 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. [3 practice marks]

#### Answer

## Given

R=100 Mbps; Tp=2 μs.

## To find

Lmin in bits and the minimum whole-byte length.

## Formula and why



$$
L_{\min}=\lceil 2RT_p\rceil
$$



The frame must last at least a round trip. Convert Mbps to bits/s and μs to seconds before multiplying.

## Step-by-step solution

#### Step 1. Convert the quantities

R=100,000,000 bits/s; Tp=0.000002 s.

#### Step 2. Find round-trip delay

2Tp=2×2=4 μs.

#### Step 3. Multiply rate by duration

Lmin=2×100,000,000×0.000002=400 bits.

#### Step 4. Convert bits to whole bytes

400/8=50; round upward if needed → 50 bytes.

**Final answer:** 400 bits, or at least 50 whole bytes.

#### What this result means

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.

---

## M2 · Q3 · Longest-prefix matching

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/mocks/mock-c--q3/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/mocks/mock-c/q3

Q1(a)+Q1(b) compulsory; choose any two of Q2/Q3/Q4 · 10 marks attempted

### 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. [3 practice marks]

#### Answer

## Given

| Prefix | Next hop |
| --- | --- |
| 0.0.0.0/0 | A |
| 172.16.0.0/16 | B |
| 172.16.8.0/21 | C |

Destination=172.16.10.45.

## To find

Most specific matching next hop.

## Formula and why

Choose the largest matching prefix length; an entry that does not contain the destination is ineligible.

## Step-by-step solution

1. /0 matches all destinations.
2. /16 covers 172.16.0.0–172.16.255.255, so it matches.
3. /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.
4. Of /0, /16 and /21, /21 is longest.

**Final answer:** next hop C via 172.16.8.0/21.

#### Practical example

The longest match gives the more specific destination region.

---

## M2 · Q4 · RIP metric and next hop

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/mocks/mock-c--q4/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/mocks/mock-c/q4

Q1(a)+Q1(b) compulsory; choose any two of Q2/Q3/Q4 · 10 marks attempted

### 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. [3 practice marks]

#### Answer

## Given

B advertises 15; C advertises 4; each local cost=1. RIP infinity=16.

## To find

Candidate metrics and usable next hop.

## Formula and why



$$
\text{candidate}=\min(16,1+\text{advertised metric})
$$



RIP caps its metric at 16, representing unreachable.

## Step-by-step solution

1. Via B: min(16,1+15)=16 → unreachable.
2. Via C: min(16,1+4)=5 → reachable.
3. Select C, the finite lower-metric route.

**Final answer:** route via C at metric 5; B’s route is unreachable.

#### Practical example

Metric 16 is not a valid 16-hop route.

---

## M2 · What to revise before the paper

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/revision/revision--order/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/revision/revision/order

M2 · use after the lessons and worked examples

Revise the methods in this sequence; keep every answer tied to its question and units.

1. ALOHA: identify Pure/Slotted → L/R → λT → exponential → S → requested rate units.
2. CSMA: listening does not eliminate propagation-window collisions. CD detects; CA reduces risk.
3. Subnet: prefix → host bits → mask → changing-octet block → network/broadcast → usable hosts.
4. Allocation: addresses or hosts? Equal subnets or VLSM? Largest first, aligned start, no overlap.
5. IPv6: count visible groups → insert to reach eight → pad. Header is 40 bytes; payload excludes those 40.
6. Routing: direction and weights → select Dijkstra or Bellman–Ford → record updates → recover path.
7. Theory: switching comparison, ARP/RARP/DHCP, RIP, OSPF and five OSPF packets.

**Yaad rakho:** Numerical mein units, prefix, arrow aur requested quantity pehle circle karo.

---

## M2 · The mistakes that change a correct method into a wrong answer

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/revision/revision--traps/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/revision/revision/traps

M2 · use after the lessons and worked examples

| Trap | Correct action |
| --- | --- |
| Use 500 frames/s directly as G | First multiply by frame time |
| S and success probability treated as identical | Success probability per attempt is S/G |
| kbps converted using 1024 | Use decimal network rates unless explicitly specified otherwise |
| All subnet blocks assumed to change only last octet | Locate changing mask octet; /20 changes the third |
| First address means first usable | First address is network; first usable is network+1 |
| Subtract two from requested total addresses | Only ordinary usable-host count excludes the boundary two |
| Any consecutive networks aggregated blindly | Check power-of-two size and alignment |
| Two :: compressions in one IPv6 address | Use :: at most once |
| Dijkstra used on negative edges | Use Bellman–Ford when appropriate |
| Undirected reverse edges added to directed PYQ | Follow printed arrows only |
| All Bellman–Ford passes treated as identical conventions | State in-place or previous-pass method; do not mix |
| RIP metric 16 described as reachable | 16 means unreachable |
| ARP asked for remote server MAC | Resolve local gateway/next-hop MAC |

---

## M2 · Short theory answer frames

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/revision/revision--theory/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/revision/revision/theory

M2 · use after the lessons and worked examples

| Question type | Answer structure |
| --- | --- |
| Define protocol | One precise definition → central mechanism → one correct example |
| Compare two protocols | Two-column table with distinct comparable points → application |
| Explain ARP or DHCP | Purpose → actors → ordered messages → result |
| Explain routing algorithm | Initialization → update/selection rule → repeat/stop → path extraction |
| Draw a header | Label fields and widths → explain field meanings → length convention |

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.

---

## M2 · Sources, exclusions and corrections

Canonical: https://deep-learning-study-room.vercel.app/read/cn/m2/about/about--sources/

Reader: https://deep-learning-study-room.vercel.app/cn/#m2/about/about/sources

CN M2 · source mapping

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.

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.

## Corrections and conventions

- The syllabus’s “CDMA/CA” is treated as the standard CSMA/CA collision-avoidance topic, consistent with the surrounding random-access list.
- 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.
- ALOHA results are explicitly tied to the equal-frame Poisson collision model. Offered traffic, normalized throughput, successful frames/s and success probability are distinguished.
- Bellman–Ford solutions declare an in-place edge order; intermediate tables can differ under another valid convention.
- Subnet host-count exceptions /31 and /32 are kept separate from ordinary broadcast-subnet calculations.
- Fragmentation and DHCP timer arithmetic are supporting extensions; prioritize the explicitly named core topics first.

## Primary technical references

- [MIT OpenCourseWare · random access](https://ocw.mit.edu/courses/16-36-communication-systems-engineering-spring-2009/bd06e398d455db074059d50f6abc953e_MIT16_36s09_lec21_22.pdf)
- [Cisco · Ethernet collision and duplex mechanisms](https://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1904.html)
- [RFC 4632 · CIDR](https://www.rfc-editor.org/rfc/rfc4632)
- [RFC 5952 · canonical IPv6 representation](https://www.rfc-editor.org/rfc/rfc5952)
- [RFC 8200 · IPv6 packet format](https://www.rfc-editor.org/rfc/rfc8200)
- [RFC 3021 · /31 point-to-point addressing](https://www.rfc-editor.org/rfc/rfc3021)
- [RFC 826 · ARP](https://www.rfc-editor.org/rfc/rfc826)
- [RFC 903 · RARP](https://www.rfc-editor.org/rfc/rfc903)
- [RFC 2131 · DHCP](https://www.rfc-editor.org/rfc/rfc2131)
- [RFC 2453 · RIPv2](https://www.rfc-editor.org/rfc/rfc2453)
- [RFC 2328 · OSPFv2](https://www.rfc-editor.org/rfc/rfc2328)

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.

---

## TEE · Full CN TEE reading order

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/tee-start--plan/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/tee-start/plan

TEE · Units 1–6 · current syllabus 702AI0C023

## Prepare the question forms that the available papers actually use

| Part / actual marks | Observed family | What to practise |
| --- | --- | --- |
| Q1(a–b) · 5+5 | Network design and reference models | Concepts, comparison and labelled diagram |
| Q1(c–d) · 5+5 | ALOHA and IPv4 address block | Formula, substitution, throughput; network/last address/count |
| Q2(a) · 10 | Block coding/Hamming distance or CRC | Explanation plus complete bit-level calculation |
| Q2(b) · 10 | Switching recommendation or subnet allocation | Compare mechanisms or show aligned allocation |
| Q3 · 5+5+10 | Network classification/topologies, OSPF, HTTP/DNS | Theory, stages and diagrams |
| Q4 · 10+10 | IPv6 and UDP/TCP | Address expansion/header diagram; protocol working |
| Q5 · 10+10 | SR/GBN and SMTP/FTP | Window/ACK diagrams; ordered application flow |
| Q6 · 5+5+10 | Media, random access, transport/congestion | Media theory; CSMA comparison or ALOHA rates; theory comparison |
| Q7 · 10+10 | Dijkstra/Bellman–Ford and buckets | Full graph iterations; bucket diagram/working/limitations |

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.

**Study all six units of the AY 2026–27 syllabus, course 702AI0C023.** 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.

| Unit | Scope | Syllabus hours |
| --- | --- | --- |
| 1 | Networks, peer-to-peer/client-server, classifications, topologies | 2 |
| 2 | OSI/TCP-IP models and transmission media | 2 |
| 3 | Error detection/correction, block coding, Hamming distance, CRC, ARQ, random access | 7 |
| 4 | Switching, IPv4/subnetting/CIDR, IPv6, ARP/RARP/DHCP, RIP/Bellman–Ford/link state/Dijkstra/OSPF | 9 |
| 5 | Process communication, UDP/TCP/SCTP, congestion control, QoS and buckets | 6 |
| 6 | HTTP, DNS, FTP and SMTP | 4 |

## What the supplied papers establish

The final paper dated **5 December 2025** and re-exam dated **4 February 2026**, course 702AI0C007, both allow **3 hours for 100 marks**. 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.

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.

## Use the course in three passes

1. 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.
2. Solve both actual papers. Their original marks and complete question wording/data are kept with answers immediately below.
3. Attempt a complete mock: Q1 plus four whole questions. Then revise formula conditions, protocol sequences and common mistakes.

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.

---

## TEE · Device, link, frame, packet and router

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/basics--network/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/basics/network

TEE prerequisites

**Definition.** A computer network is a collection of interconnected devices that exchange data using agreed communication rules called protocols.

**Simple meaning.** Device number bhejta hai; link usko carry karta hai; protocol batata hai kaise bhejna hai.

Swipe across the diagram to read its labels ↔

![One packet travels through several local links](https://deep-learning-study-room.vercel.app/cn/fig/journey.a5c52083fd.svg)

Diagram: One packet travels through several local links. Labels: One packet travels through several local links | One packet travels through several local links | 1. Host creates an IP packet | Destination IP identifies where the packet is going. | 2. Local frame carries it to the next hop | The next-hop MAC address is used on the current Ethernet link. | 3. Router selects another next hop | It uses the destination prefix and its forwarding table. | 4. A new local frame carries the packet onward | The link-layer addresses belong to the new link.

Device, link, frame, packet and router

## Understand it step by step

1. A **host** is an end device such as a laptop. A **link** is the wired or wireless connection over which data travels.
2. A **bit** is 0 or 1. A **frame** is the data-link unit carried over one link. A **packet** is the network-layer unit, such as an IP packet. A packet is normally carried inside a frame.
3. A **switch** forwards Ethernet frames within a local network using MAC addresses. A **router** forwards IP packets between networks using destination IP addresses.
4. 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.

#### Practical example

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.

### Practice question. Distinguish a frame, a packet and the role of a router. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Frame = ek link; packet = networks ke paar.

---

## TEE · Bits, bytes and rate: read the units first

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/basics--bits/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/basics/bits

TEE prerequisites

**Definition.** A bit is one binary digit. A byte contains eight bits. A data rate measures the number of bits transmitted per second.

**Simple meaning.** Capital B = byte; small b = bit. Size aur speed ki units same karo.

## Understand it step by step

1. 1 byte = 8 bits. Therefore 100 bytes = 800 bits.
2. 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.
3. 1 second = 1,000 ms = 1,000,000 μs. A millisecond is 0.001 s; a microsecond is 0.000001 s.
4. 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.



$$
T_{\mathrm{frame}}=\frac{L}{R}
$$





$$
T_p=\frac{d}{v}
$$



#### Practical example

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.

### Practice question. Explain the difference between transmission delay and propagation delay. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Bits / bits-per-second = seconds; metres / metres-per-second = seconds.

---

## TEE · Delay example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/basics--delay-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/basics/delay-1

TEE prerequisites

### 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. [3 practice marks]

#### Answer

## Given

| Quantity | Value |
| --- | --- |
| Frame length | 1000 bytes |
| Rate | 2 Mbps |
| Link length | 2,000 m |
| Signal speed | 200,000,000 m/s |

## To find

The two separate delays, in seconds and microseconds.

## Formula and why



$$
T_{\mathrm{frame}}=L/R
$$





$$
T_p=d/v
$$



L must be in bits and R in bits/s. Link length and signal speed must use the same distance unit.

## Step-by-step solution

#### Step 1. Convert bytes to bits

1000 × 8 = 8,000 bits.

#### Step 2. Convert the rate

2 × 1,000,000 = 2,000,000 bits/s.

#### Step 3. Divide for transmission time

8,000 ÷ 2,000,000 = 0.004000 s = 4000 μs.

#### Step 4. Divide for propagation time

2,000 ÷ 200,000,000 = 0.000010 s = 10 μs.

**Final answer:** Transmission = 4000 μs; propagation = 10 μs.

#### What this result means

These are different physical delays. Do not add a round-trip factor unless the question asks for a round trip.

---

## TEE · Delay example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/basics--delay-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/basics/delay-2

TEE prerequisites

### 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. [3 practice marks]

#### Answer

## Given

| Quantity | Value |
| --- | --- |
| Frame length | 500 bytes |
| Rate | 10 Mbps |
| Link length | 10,000 m |
| Signal speed | 200,000,000 m/s |

## To find

The two separate delays, in seconds and microseconds.

## Formula and why



$$
T_{\mathrm{frame}}=L/R
$$





$$
T_p=d/v
$$



L must be in bits and R in bits/s. Link length and signal speed must use the same distance unit.

## Step-by-step solution

#### Step 1. Convert bytes to bits

500 × 8 = 4,000 bits.

#### Step 2. Convert the rate

10 × 1,000,000 = 10,000,000 bits/s.

#### Step 3. Divide for transmission time

4,000 ÷ 10,000,000 = 0.000400 s = 400 μs.

#### Step 4. Divide for propagation time

10,000 ÷ 200,000,000 = 0.000050 s = 50 μs.

**Final answer:** Transmission = 400 μs; propagation = 50 μs.

#### What this result means

These are different physical delays. Do not add a round-trip factor unless the question asks for a round trip.

---

## TEE · Delay example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/basics--delay-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/basics/delay-3

TEE prerequisites

### 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. [3 practice marks]

#### Answer

## Given

| Quantity | Value |
| --- | --- |
| Frame length | 1500 bytes |
| Rate | 100 Mbps |
| Link length | 100,000 m |
| Signal speed | 250,000,000 m/s |

## To find

The two separate delays, in seconds and microseconds.

## Formula and why



$$
T_{\mathrm{frame}}=L/R
$$





$$
T_p=d/v
$$



L must be in bits and R in bits/s. Link length and signal speed must use the same distance unit.

## Step-by-step solution

#### Step 1. Convert bytes to bits

1500 × 8 = 12,000 bits.

#### Step 2. Convert the rate

100 × 1,000,000 = 100,000,000 bits/s.

#### Step 3. Divide for transmission time

12,000 ÷ 100,000,000 = 0.000120 s = 120 μs.

#### Step 4. Divide for propagation time

100,000 ÷ 250,000,000 = 0.000400 s = 400 μs.

**Final answer:** Transmission = 120 μs; propagation = 400 μs.

#### What this result means

These are different physical delays. Do not add a round-trip factor unless the question asks for a round trip.

---

## TEE · Binary place values: why the rightmost place is 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/basics--binary/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/basics/binary

TEE prerequisites

**Definition.** 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).

**Simple meaning.** Right se 1 shuru karo; left jaate hi har box double: 1, 2, 4, 8…

Swipe across the diagram to read its labels ↔

![Binary positions: each move left doubles the value](https://deep-learning-study-room.vercel.app/cn/fig/binary.f629a09a71.svg)

Diagram: Binary positions: each move left doubles the value. Labels: Binary positions: each move left doubles the value | Binary positions: each move left doubles the value | 128 | pos 7 | 1 | 128 | 64 | pos 6 | 0 | 0 | 32 | pos 5 | 1 | 32 | 16 | pos 4 | 0 | 0 | 8 | pos 3 | 0 | 0 | 4 | pos 2 | 1 | 4 | 2 | pos 1 | 1 | 2 | 1 | pos 0 | 0 | 0 | Bits × place values → 128 + 0 + 32 + 0 + 0 + 4 + 2 + 0 = 166 | Rightmost: position 0 → 2⁰ = 1. Leading zeroes add nothing.

Binary place values: why the rightmost place is 1

## Understand it step by step

1. Decimal 352 means 3×100 + 5×10 + 2×1. The position supplies the value; the digit supplies the multiplier.
2. Binary follows the same idea, but the place values are 1, 2, 4, 8, 16, 32, 64, 128 instead of 1, 10, 100.
3. 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.
4. 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.

#### Practical example

In 00000101, the 1s sit above 4 and 1, so the value is 4+1 = 5. The 0 above 2 contributes 0, not 2.

### Practice question. Explain how a binary octet is converted to decimal. [3 practice marks]

#### Answer

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.

#### Practical example

In 00000101, the 1s sit above 4 and 1, so the value is 4+1 = 5. The 0 above 2 contributes 0, not 2.

**Yaad rakho:** Position ka weight likho; jahan 1 hai bas woh add karo.

---

## TEE · Binary to decimal · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/basics--binary-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/basics/binary-1

TEE prerequisites

### Practice question. Convert the 8-bit binary number 00000101 to decimal. [3 practice marks]

#### Answer

## Given

Binary octet = `00000101`.

## To find

Its decimal value.

## Formula and why



$$
\text{Decimal value}=\sum_{k=0}^{7} b_k2^k
$$



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.

## Step-by-step solution

#### Step 1. Write all eight place values

| Position from right | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Place value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Bit | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 |

#### Step 2. Multiply each bit by its place value

| Place value | Bit | Product |
| --- | --- | --- |
| 128 | 0 | 128 × 0 = 0 |
| 64 | 0 | 64 × 0 = 0 |
| 32 | 0 | 32 × 0 = 0 |
| 16 | 0 | 16 × 0 = 0 |
| 8 | 0 | 8 × 0 = 0 |
| 4 | 1 | 4 × 1 = 4 |
| 2 | 0 | 2 × 0 = 0 |
| 1 | 1 | 1 × 1 = 1 |

#### Step 3. Add the products

0 + 0 + 0 + 0 + 0 + 4 + 0 + 1 = 5.

**Final answer:** 5

#### What this result means

The eight boxes encode one value: 5. Leading zeroes do not change it.

---

## TEE · Binary to decimal · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/basics--binary-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/basics/binary-2

TEE prerequisites

### Practice question. Convert the 8-bit binary number 10100110 to decimal. [3 practice marks]

#### Answer

## Given

Binary octet = `10100110`.

## To find

Its decimal value.

## Formula and why



$$
\text{Decimal value}=\sum_{k=0}^{7} b_k2^k
$$



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.

## Step-by-step solution

#### Step 1. Write all eight place values

| Position from right | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Place value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Bit | 1 | 0 | 1 | 0 | 0 | 1 | 1 | 0 |

#### Step 2. Multiply each bit by its place value

| Place value | Bit | Product |
| --- | --- | --- |
| 128 | 1 | 128 × 1 = 128 |
| 64 | 0 | 64 × 0 = 0 |
| 32 | 1 | 32 × 1 = 32 |
| 16 | 0 | 16 × 0 = 0 |
| 8 | 0 | 8 × 0 = 0 |
| 4 | 1 | 4 × 1 = 4 |
| 2 | 1 | 2 × 1 = 2 |
| 1 | 0 | 1 × 0 = 0 |

#### Step 3. Add the products

128 + 0 + 32 + 0 + 0 + 4 + 2 + 0 = 166.

**Final answer:** 166

#### What this result means

The eight boxes encode one value: 166. Leading zeroes do not change it.

---

## TEE · Binary to decimal · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/basics--binary-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/basics/binary-3

TEE prerequisites

### Practice question. Convert the 8-bit binary number 11100000 to decimal. [3 practice marks]

#### Answer

## Given

Binary octet = `11100000`.

## To find

Its decimal value.

## Formula and why



$$
\text{Decimal value}=\sum_{k=0}^{7} b_k2^k
$$



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.

## Step-by-step solution

#### Step 1. Write all eight place values

| Position from right | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Place value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Bit | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 |

#### Step 2. Multiply each bit by its place value

| Place value | Bit | Product |
| --- | --- | --- |
| 128 | 1 | 128 × 1 = 128 |
| 64 | 1 | 64 × 1 = 64 |
| 32 | 1 | 32 × 1 = 32 |
| 16 | 0 | 16 × 0 = 0 |
| 8 | 0 | 8 × 0 = 0 |
| 4 | 0 | 4 × 0 = 0 |
| 2 | 0 | 2 × 0 = 0 |
| 1 | 0 | 1 × 0 = 0 |

#### Step 3. Add the products

128 + 64 + 32 + 0 + 0 + 0 + 0 + 0 = 224.

**Final answer:** 224

#### What this result means

The eight boxes encode one value: 224. Leading zeroes do not change it.

---

## TEE · Binary to decimal · example 4

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/basics--binary-4/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/basics/binary-4

TEE prerequisites

### Practice question. Convert the 8-bit binary number 11000000 to decimal. [3 practice marks]

#### Answer

## Given

Binary octet = `11000000`.

## To find

Its decimal value.

## Formula and why



$$
\text{Decimal value}=\sum_{k=0}^{7} b_k2^k
$$



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.

## Step-by-step solution

#### Step 1. Write all eight place values

| Position from right | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Place value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Bit | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |

#### Step 2. Multiply each bit by its place value

| Place value | Bit | Product |
| --- | --- | --- |
| 128 | 1 | 128 × 1 = 128 |
| 64 | 1 | 64 × 1 = 64 |
| 32 | 0 | 32 × 0 = 0 |
| 16 | 0 | 16 × 0 = 0 |
| 8 | 0 | 8 × 0 = 0 |
| 4 | 0 | 4 × 0 = 0 |
| 2 | 0 | 2 × 0 = 0 |
| 1 | 0 | 1 × 0 = 0 |

#### Step 3. Add the products

128 + 64 + 0 + 0 + 0 + 0 + 0 + 0 = 192.

**Final answer:** 192

#### What this result means

The eight boxes encode one value: 192. Leading zeroes do not change it.

---

## TEE · Decimal to binary · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/basics--decimal-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/basics/decimal-1

TEE prerequisites

### Practice question. Write decimal 13 as an 8-bit binary octet. [3 practice marks]

#### Answer

## Given

Decimal value = 13.

## To find

Eight bits, including leading zeroes.

## Formula and why

Use the weights 128,64,32,16,8,4,2,1.

At each weight, write 1 and subtract if the remaining value is at least that weight; otherwise write 0.

## Step-by-step solution

#### Step 1. Choose each bit

| Weight | Remaining before | Bit decision | Remaining after |
| --- | --- | --- | --- |
| 128 | 13 | 0: too large | 13 |
| 64 | 13 | 0: too large | 13 |
| 32 | 13 | 0: too large | 13 |
| 16 | 13 | 0: too large | 13 |
| 8 | 13 | 1: subtract | 5 |
| 4 | 5 | 1: subtract | 1 |
| 2 | 1 | 0: too large | 1 |
| 1 | 1 | 1: subtract | 0 |

#### Step 2. Read bits in the same order

`00001101`.

#### Step 3. Reconstruct the decimal value

8 + 4 + 1 = 13.

**Final answer:** `00001101`

#### What this result means

Keep exactly eight positions when writing an IPv4 octet.

---

## TEE · Decimal to binary · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/basics--decimal-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/basics/decimal-2

TEE prerequisites

### Practice question. Write decimal 192 as an 8-bit binary octet. [3 practice marks]

#### Answer

## Given

Decimal value = 192.

## To find

Eight bits, including leading zeroes.

## Formula and why

Use the weights 128,64,32,16,8,4,2,1.

At each weight, write 1 and subtract if the remaining value is at least that weight; otherwise write 0.

## Step-by-step solution

#### Step 1. Choose each bit

| Weight | Remaining before | Bit decision | Remaining after |
| --- | --- | --- | --- |
| 128 | 192 | 1: subtract | 64 |
| 64 | 64 | 1: subtract | 0 |
| 32 | 0 | 0: too large | 0 |
| 16 | 0 | 0: too large | 0 |
| 8 | 0 | 0: too large | 0 |
| 4 | 0 | 0: too large | 0 |
| 2 | 0 | 0: too large | 0 |
| 1 | 0 | 0: too large | 0 |

#### Step 2. Read bits in the same order

`11000000`.

#### Step 3. Reconstruct the decimal value

128 + 64 = 192.

**Final answer:** `11000000`

#### What this result means

Keep exactly eight positions when writing an IPv4 octet.

---

## TEE · Decimal to binary · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/basics--decimal-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/basics/decimal-3

TEE prerequisites

### Practice question. Write decimal 224 as an 8-bit binary octet. [3 practice marks]

#### Answer

## Given

Decimal value = 224.

## To find

Eight bits, including leading zeroes.

## Formula and why

Use the weights 128,64,32,16,8,4,2,1.

At each weight, write 1 and subtract if the remaining value is at least that weight; otherwise write 0.

## Step-by-step solution

#### Step 1. Choose each bit

| Weight | Remaining before | Bit decision | Remaining after |
| --- | --- | --- | --- |
| 128 | 224 | 1: subtract | 96 |
| 64 | 96 | 1: subtract | 32 |
| 32 | 32 | 1: subtract | 0 |
| 16 | 0 | 0: too large | 0 |
| 8 | 0 | 0: too large | 0 |
| 4 | 0 | 0: too large | 0 |
| 2 | 0 | 0: too large | 0 |
| 1 | 0 | 0: too large | 0 |

#### Step 2. Read bits in the same order

`11100000`.

#### Step 3. Reconstruct the decimal value

128 + 64 + 32 = 224.

**Final answer:** `11100000`

#### What this result means

Keep exactly eight positions when writing an IPv4 octet.

---

## TEE · Powers of two, percentages and the meaning of e

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/basics--powers/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/basics/powers

TEE prerequisites

**Definition.** A power describes repeated multiplication. The number e is approximately 2.718281828; e raised to a negative power is a positive number below 1.

**Simple meaning.** 2 ki power bits ke combinations batati hai; e ki negative power ALOHA ki collision probability mein aati hai.

## Understand it step by step

1. 2⁰ = 1; 2¹ = 2; 2² = 4; 2³ = 8. Each additional binary bit doubles the number of combinations. Six host bits give 2⁶ = 64 addresses.
2. A negative exponent means reciprocal: e⁻¹ = 1/e ≈ 0.367879. It does not mean −e.
3. A fraction 0.2 corresponds to 20%: multiply by 100. To convert 20% to a fraction, divide by 100.
4. For ALOHA, calculate the exponent first, then e raised to that exponent, then multiply by G. Keep at least six significant figures during working.

| Power | Value |
| --- | --- |
| 20 | 1 |
| 21 | 2 |
| 22 | 4 |
| 23 | 8 |
| 24 | 16 |
| 25 | 32 |
| 26 | 64 |
| 27 | 128 |
| 28 | 256 |
| 29 | 512 |
| 210 | 1024 |
| 211 | 2048 |
| 212 | 4096 |
| 213 | 8192 |
| 214 | 16384 |
| 215 | 32768 |
| 216 | 65536 |

#### Practical example

At G=0.5 in Pure ALOHA, −2G = −1. Hence e⁻²ᴳ = e⁻¹ = 0.367879 and 0.5×0.367879 = 0.183940, or 18.394%.

### Practice question. Explain why 2⁶ gives 64 combinations and express 0.18394 as a percentage. [3 practice marks]

#### Answer

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%.

#### Practical example

At G=0.5 in Pure ALOHA, −2G = −1. Hence e⁻²ᴳ = e⁻¹ = 0.367879 and 0.5×0.367879 = 0.183940, or 18.394%.

**Yaad rakho:** Minus exponent andar hai; final exponential positive rehta hai.

---

## TEE · Calculator steps for ALOHA and subnetting

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/basics--calculator/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/basics/calculator

TEE prerequisites

Use the normal calculation mode. Exact menu names vary across fx-991ES-family models; the mathematics below is the same. The **eˣ** function is usually the shifted function of **ln**. The **EXP/×10ˣ** key enters scientific notation and is not eˣ.

## Example 1 · e to a negative power

1. Enter eˣ with exponent (−1). Use the negative-number key or a clear parenthesised negative exponent.
2. Evaluate: e⁻¹ ≈ 0.3678794412.
3. Multiply by 0.5: 0.1839397206. Multiply by 100 only if a percentage is requested.

## Example 2 · host combinations

1. For /26, subtract: 32−26 = 6 host bits.
2. Enter 2 raised to 6: 64 total addresses.
3. If ordinary usable host addresses are asked, subtract 2: 62.

## Example 3 · frame time

1. A 200-bit frame at 200 kbps means 200/(200×10³).
2. Use parentheses around the denominator. Result: 0.001 seconds.
3. Multiply by 1,000 to express milliseconds: 1 ms.

**Yaad rakho:** eˣ aur ×10ˣ alag keys/functions hain. Brackets se denominator safe rakho.

---

## TEE · How to read a routing graph

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/basics--graphs/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/basics/graphs

TEE prerequisites

**Definition.** 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.

**Simple meaning.** Circle router hai, line link hai, number us link ka cost. Arrow ulta mat chalna.

Swipe across the diagram to read its labels ↔

![Directed path cost: arrows determine permitted travel](https://deep-learning-study-room.vercel.app/cn/fig/graph-basics.ebd9ed3bc9.svg)

Diagram: Directed path cost: arrows determine permitted travel. Labels: Directed path cost: arrows determine permitted travel | Directed path cost: arrows determine permitted travel | A | B | C | 4 | 3 | 10 | Direct A→C = 10; via B = 4 + 3 = 7. Choose cost 7. | No reverse travel is implied by a directed arrow.

How to read a routing graph

## Understand it step by step

1. 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.
2. The cost of a path is the sum of its edge costs. A→B→C with costs 4 and 3 has total 7.
3. A tentative distance is the best route found so far; it can still improve. A predecessor records the previous vertex on that route.
4. ∞ means no route has been discovered yet. For arithmetic in the table, ∞ plus a finite number stays ∞.

#### Practical example

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.

### Practice question. What is the difference between hop count and a weighted path cost? [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Shortest = smallest cost, zaroori nahi fewest arrows.

---

## TEE · What a network is and how networks are classified

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/introduction--network-types/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/introduction/network-types

TEE · Unit 1 · current syllabus 702AI0C023

### Practice question. Define a computer network. Explain LAN, MAN, PAN, WAN and ARPANET with examples. [5 practice marks]

#### Answer

A **computer network** 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.

| Type | Meaning and scope | Example |
| --- | --- | --- |
| PAN | Personal Area Network: a person’s nearby devices | Phone linked to earbuds |
| LAN | Local Area Network: a building or local campus network under local administration | Laboratory Ethernet/Wi-Fi |
| MAN | Metropolitan Area Network: interconnects sites across a town/city | City-wide institutional network |
| WAN | Wide Area Network: connects geographically separated networks over regional/global links | Branches in different cities |
| ARPANET | Historical packet-switched research network; a major predecessor of the Internet | Early interconnected research institutions; not a modern geographic size category |

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.

#### Practical example

A student uses a PAN for earbuds, a LAN in the lab and a WAN when accessing a distant university service.

**Yaad rakho:** PAN personal, LAN local, MAN city, WAN wide.

---

## TEE · Client-server and peer-to-peer

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/introduction--models/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/introduction/models

TEE · Unit 1 · current syllabus 702AI0C023

### Practice question. An organization plans an online collaboration platform. Explain how client-server and peer-to-peer designs affect performance, scalability and reliability. [5 practice marks]

#### Answer

In a **client-server** design, users’ clients contact designated service processes. In **peer-to-peer (P2P)**, participating hosts can supply and consume resources. These are application organizations, not different physical cable types.

Swipe across the diagram to read its labels ↔

![Client-server and peer-to-peer organization](https://deep-learning-study-room.vercel.app/cn/fig/tee-client-peer.a7c6f1b535.svg)

Diagram: Client-server and peer-to-peer organization. Labels: Client-server and peer-to-peer organization | Client-server and peer-to-peer organization | Client-server | Peer-to-peer | Server | C1 | C2 | P1 | P2 | P3 | Peers can supply and consume. A central service can be replicated.

Central service versus cooperating peers.

| Point | Client-server | Peer-to-peer |
| --- | --- | --- |
| Roles | Clients request; designated servers provide services | Peers can both request and provide resources |
| Control | Central policies, accounts and backups are easier to coordinate | Control and copies distributed among peers |
| Performance | Predictable with adequate server capacity; server may bottleneck | Resources grow with peers, but peer capacity/availability vary |
| Scalability | Scale servers, replicas, caching and load distribution | More peers can contribute capacity; coordination becomes harder |
| Reliability | One unreplicated server is a failure point; replication helps | Loss of one peer need not stop system if useful replicas remain |
| Security | Central access control and monitoring | Trust and consistent access policy are harder |
| Best fit | Managed collaboration, databases, login services | Distributed content sharing among participating peers |

## Apply to the platform

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.

#### Practical example

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.

**Yaad rakho:** Server mein service central; peers dono roles karte hain.

---

## TEE · Network topologies and choosing a layout

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/introduction--topologies/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/introduction/topologies

TEE · Unit 1 · current syllabus 702AI0C023

### Practice question. Define network topology. Explain star and bus topologies with diagrams, advantages and disadvantages; compare ring and mesh. [5 practice marks]

#### Answer

**Topology** 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.

Swipe across the diagram to read its labels ↔

![Four physical network topologies](https://deep-learning-study-room.vercel.app/cn/fig/tee-topologies.d9e18f041b.svg)

Diagram: Four physical network topologies. Labels: Four physical network topologies | Four physical network topologies | Star | Bus | Ring | Full mesh: 4 nodes, 6 links | S | Links show arrangement. Actual access rules are a separate concept.

Star, bus, ring and full mesh; edges depict physical connections.

| Topology | Structure | Benefit | Limitation |
| --- | --- | --- | --- |
| Bus | Devices share a common backbone | Simple small shared-medium layout | Backbone fault affects segment; collisions possible on classic shared bus |
| Star | Each device connects to a central switch/hub | Easy expansion and fault isolation | Central-device failure affects star; more cabling |
| Ring | Each node connected to two neighbours in a ring | Structured traversal; token-based variants coordinate access | Simple single-ring break can disrupt operation unless protected |
| Full mesh | Every pair has a direct link | Redundant paths and direct connectivity | Expensive ports/cabling: n(n−1)/2 undirected links |
| Tree/hybrid | Hierarchical stars or combined topologies | Scales into buildings/floors | Upper-level faults affect dependent branches |

#### Practical example

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.

**Yaad rakho:** Layout draw karo, then one strength and one failure case.

---

## TEE · OSI layers and encapsulation

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/physical--osi/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/physical/osi

TEE · Unit 2 · current syllabus 702AI0C023

### Practice question. Draw the OSI reference model and explain the function of each layer. [7 practice marks]

#### Answer

The **Open Systems Interconnection (OSI)** 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.

Swipe across the diagram to read its labels ↔

![OSI layers mapped to the four-layer TCP/IP model](https://deep-learning-study-room.vercel.app/cn/fig/tee-models.5bff0518c8.svg)

Diagram: OSI layers mapped to the four-layer TCP/IP model. Labels: OSI layers mapped to the four-layer TCP/IP model | OSI layers mapped to the four-layer TCP/IP model | 7 Application | 6 Presentation | 5 Session | 4 Transport | 3 Network | 2 Data link | 1 Physical | Application | HTTP, DNS, FTP, SMTP | Transport | Internet | Link / network access | Includes physical access | Some textbooks split link into data link + physical: five layers.

OSI seven-layer model mapped to the four-layer TCP/IP model.

| Layer | Task | Example |
| --- | --- | --- |
| 7 Application | Services used by network applications | HTTP, DNS, FTP, SMTP |
| 6 Presentation | Representation, encoding and application data transformations | Character encoding, serialization; encryption as a conceptual function |
| 5 Session | Manage dialogue and synchronization/checkpoints | Session establishment and resumption concepts |
| 4 Transport | Process delivery; reliability/flow control where supplied | TCP, UDP, SCTP; ports |
| 3 Network | Logical addressing and routing across networks | IP; routers |
| 2 Data link | Framing, local link addressing, medium access and error detection | Ethernet/Wi-Fi; MAC addresses |
| 1 Physical | Transmit signal symbols/bits through a medium | Electrical, optical or radio signals |

## Encapsulation and delivery

1. Application creates data. Transport adds a transport header: TCP segment or UDP datagram.
2. IP adds its header to form a packet. The link adds a header and usually a trailer to form a frame.
3. The physical layer carries signals. The destination reverses the process and sends the data to the receiving process.
4. 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.

#### Practical example

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.

**Yaad rakho:** Application se physical tak wrap; receiver par unwrap.

---

## TEE · TCP/IP layers and comparison with OSI

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/physical--tcpip/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/physical/tcpip

TEE · Unit 2 · current syllabus 702AI0C023

### Practice question. Draw the TCP/IP reference model, explain all layers and compare it with OSI on five points. [5 practice marks]

#### Answer

The **TCP/IP model** 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.

Swipe across the diagram to read its labels ↔

![OSI layers mapped to the four-layer TCP/IP model](https://deep-learning-study-room.vercel.app/cn/fig/tee-models.5bff0518c8.svg)

Diagram: OSI layers mapped to the four-layer TCP/IP model. Labels: OSI layers mapped to the four-layer TCP/IP model | OSI layers mapped to the four-layer TCP/IP model | 7 Application | 6 Presentation | 5 Session | 4 Transport | 3 Network | 2 Data link | 1 Physical | Application | HTTP, DNS, FTP, SMTP | Transport | Internet | Link / network access | Includes physical access | Some textbooks split link into data link + physical: five layers.

Four TCP/IP layers; the link layer includes the physical medium.

| TCP/IP layer | Function | Examples |
| --- | --- | --- |
| Application | Defines application message formats and exchanges for Web access, naming, email and file transfer; includes presentation/session functions as needed | HTTP, DNS, SMTP, FTP |
| Transport | End-to-end process communication | TCP, UDP, SCTP |
| Internet | IP addressing, routing and best-effort datagrams | IPv4/IPv6 |
| Link/network access | Local delivery and physical access | Ethernet/Wi-Fi and their medium |

| Point | OSI | TCP/IP |
| --- | --- | --- |
| Layer count | Seven | Four here; five-layer teaching variant splits link |
| Upper functions | Application, presentation, session separated | Grouped under application |
| Lower functions | Data link and physical separated | Grouped under link/network access |
| Purpose | General reference architecture | Architecture of deployed Internet protocol family |
| Network service | Reference model can describe different services | Internet layer uses connectionless IP |
| Transport | Conceptual transport service | TCP reliable byte stream; UDP datagrams; SCTP messages |

#### Practical example

An application can use UDP without changing the IP or Ethernet layers. Layering lets one protocol vary without redesigning every network function.

**Yaad rakho:** OSI 7; TCP/IP four mein upper three merge, lower two merge.

---

## TEE · Guided and unguided transmission media

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/physical--media/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/physical/media

TEE · Unit 2 · current syllabus 702AI0C023

### Practice question. Classify transmission media. Explain the main wired and wireless media and give two characteristics of each unguided type. [5 practice marks]

#### Answer

**Guided media** constrain signals to a physical path: twisted pair, coaxial cable and optical fiber. **Unguided media** 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.

Swipe across the diagram to read its labels ↔

![Transmission media: guided and unguided](https://deep-learning-study-room.vercel.app/cn/fig/tee-media.aff26cd0b5.svg)

Diagram: Transmission media: guided and unguided. Labels: Transmission media: guided and unguided | Transmission media: guided and unguided | Guided: a physical path | Twisted pair: electrical pairs. Coaxial: shielded conductor. Fiber: light through a protected core. | Unguided: waves in free space | Radio, terrestrial/satellite microwave, and infrared. Range and interference depend on the system. | Campus combination | Fiber backbone + copper access links + managed wireless mobility. Security and reliability need | configuration.

Transmission media classification.

| Medium | Two key characteristics | Limitations / use |
| --- | --- | --- |
| Twisted pair | Electrical signal; pairs twisted to reduce interference | Low-cost LAN access; distance/noise limits depend on category and design |
| Coaxial cable | Shielded central conductor; greater shielding than basic unshielded pair | Bulkier; cable broadband and legacy shared LANs |
| Optical fiber | Light in glass/plastic; high capacity with immunity to electromagnetic interference | Transceivers and careful splicing/bend control needed; backbone links |
| Radio waves | Wireless propagation; many bands support broad/non-line-of-sight coverage | Interference, shared spectrum and security configuration matter; Wi-Fi/mobile |
| Terrestrial microwave | Directional antennas; typically line of sight | Alignment and obstructions matter; point-to-point backhaul |
| Satellite microwave | Wide coverage through relay in space | Cost and latency depend strongly on orbit/system; remote connectivity |
| Infrared | Short-range light; usually blocked by walls | Limited coverage; short-range indoor/remote-control links |

#### Practical example

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.

**Yaad rakho:** Guided = cable path; unguided = free-space waves.

---

## TEE · Optical fiber: advantages and limits

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/physical--fiber/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/physical/fiber

TEE · Unit 2 · current syllabus 702AI0C023

### Practice question. How is transmission media classified? List the advantages and disadvantages of optical fiber. [5 practice marks]

#### Answer

Transmission media are classified into guided media (twisted pair, coaxial cable, optical fiber) and unguided media (radio, microwave, infrared).

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.

| Advantages | Disadvantages / design costs |
| --- | --- |
| High data capacity and low attenuation over suitable links | Optical transceivers, connectors and splicing add cost/skill requirements |
| Immune to electromagnetic interference; no electrical crosstalk | Tight bends, dirty connectors and poor installation increase loss |
| Electrical isolation between buildings | Fiber is mechanically sensitive and requires appropriate protection |
| Harder to tap casually than an unprotected radio channel | It is not automatically confidential; encryption/access control remain necessary |

#### Practical example

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.

**Yaad rakho:** Fiber light carry karta hai; immunity means no EMI, not no security risk.

---

## TEE · Apply wired and wireless concepts to a campus

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/physical--campus/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/physical/campus

TEE · Unit 2 · current syllabus 702AI0C023

### Practice question. A university plans a campus network. Explain how wired and wireless communication can be used with respect to speed, reliability and security. [5 practice marks]

#### Answer

| Criterion | Wired campus links | Wireless campus access |
| --- | --- | --- |
| Speed/capacity | Dedicated switch ports and fiber backbones can provide high, predictable capacity | Capacity shared over radio; performance depends on contention, coverage and interference |
| Reliability | Stable when cables/ports and redundant uplinks are healthy | Mobility and flexible access; radio interference and coverage holes can cause variability |
| Security | Physical access control helps, but ports still need authentication/segmentation | Use authenticated encryption and managed access; radio extends beyond rooms |
| Deployment | Cabling cost and fixed access points | Supports mobile users and faster coverage changes |
| Recommended role | Servers, laboratories, inter-building backbone | Students’ phones/laptops, roaming and guest access |

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.

#### Practical example

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.

**Yaad rakho:** Backbone stable cable; mobile users radio; security dono mein configure karo.

---

## TEE · Error detection, correction and block coding

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/error-control--principles/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/error-control/principles

TEE · Unit 3 before ALOHA · current syllabus 702AI0C023

### Practice question. Explain error detection and error correction. How does block coding add redundancy? [5 practice marks]

#### Answer

A transmission error changes one or more bits. A **single-bit error** flips one bit. A **burst error** 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.

## Block coding

1. Divide data into fixed k-bit datawords. Map each one to an n-bit codeword, with n greater than k.
2. The n−k redundant bits create separation between valid codewords. There are 2k valid codewords, a subset of the 2n possible n-bit patterns, for an injective binary block code.
3. 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.
4. Error-control protocols may combine detection with retransmission (ARQ), or use sufficient coding redundancy for forward error correction (FEC).



$$
R_c=k/n,\quad r=n-k
$$



#### Practical example

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.

**Yaad rakho:** Detection asks error hua? Correction asks kaunsa correct word?

---

## TEE · Parity and the limits of redundancy

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/error-control--parity/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/error-control/parity

TEE · Unit 3 before ALOHA · current syllabus 702AI0C023

### Practice question. Explain even parity and why it can detect a single-bit error but cannot detect every error. [5 practice marks]

#### Answer

With **even parity**, 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.

| Data | Number of 1s | Even-parity bit | Codeword |
| --- | --- | --- | --- |
| 1011 | 3 | 1 | 10111 |
| 1100 | 2 | 0 | 11000 |
| 0000 | 0 | 0 | 00000 |

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.

#### Practical example

Codeword 11000 can change to 10100 by two flips. Both have two 1s, so the parity test misses this corruption.

**Yaad rakho:** Odd flips parity badalta; even flips bach sakte hain.

---

## TEE · Hamming distance and guaranteed capability

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/error-control--hamming-distance/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/error-control/hamming-distance

TEE · Unit 3 before ALOHA · current syllabus 702AI0C023

### Practice question. Define Hamming distance and minimum distance. Derive the guaranteed detection and correction capability of a block code. [5 practice marks]

#### Answer

**Hamming distance** d(a,b) is the number of positions where two equal-length bit strings differ. XOR the strings and count the 1s. **Minimum distance** dmin is the smallest distance between distinct valid codewords; do not use the largest pairwise distance.



$$
d(a,b)=\mathrm{weight}(a\oplus b)
$$





$$
s_{\max}=d_{\min}-1,\qquad t_{\max}=\left\lfloor\frac{d_{\min}-1}{2}\right\rfloor
$$



1. Detection: fewer than dmin flips cannot transform one valid codeword into another, so all such errors are detected.
2. Correction: radius-t error regions around different codewords must not overlap. Therefore 2t < dmin, or dmin ≥ 2t+1.
3. 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.

#### Practical example

The repetition code {000,111} has distance 3. If 001 arrives and at most one flip occurred, 000 is the unique nearest codeword.

**Yaad rakho:** XOR ones count; minimum minus one detect, half floor correct.

---

## TEE · Hamming-distance working · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/error-control--distance-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/error-control/distance-1

TEE · Unit 3 before ALOHA · current syllabus 702AI0C023

### 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. [5 practice marks]

#### Answer

## Given

| Codeword | Bits |
| --- | --- |
| C1 | 1001101 |
| C2 | 1110001 |
| C3 | 1010101 |

## To find

All pair distances, dmin and the maximum guaranteed numbers of errors.

## Formula and why



$$
d(a,b)=\mathrm{weight}(a\oplus b)
$$





$$
s=d_{\min}-1,\quad t=\lfloor(d_{\min}-1)/2\rfloor
$$



XOR exposes differing positions. Use the closest codeword pair, because it is the weakest separation in the code.

## Step-by-step solution

#### Step 1. XOR every distinct pair

| Pair | First | Second | XOR | Distance |
| --- | --- | --- | --- | --- |
| C1 vs C2 | 1001101 | 1110001 | 0111100 | 4 |
| C1 vs C3 | 1001101 | 1010101 | 0011000 | 2 |
| C2 vs C3 | 1110001 | 1010101 | 0100100 | 2 |

#### Step 2. Take the minimum

dmin = min(4, 2, 2) = 2.

#### Step 3. Calculate the guarantees

Detect = 2−1 = 1; correct = floor((2−1)/2) = 0.

#### Step 4. Justify geometrically

2 bit changes can reach another valid codeword, so only 1 are guaranteed detectable. Correction regions require 2t < 2.

**Final answer:** dmin=2; detect up to 1 errors; correct up to 0 errors.

#### What this result means

A distance of one particular pair does not set the whole-code capability unless it is the minimum.

---

## TEE · Hamming-distance working · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/error-control--distance-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/error-control/distance-2

TEE · Unit 3 before ALOHA · current syllabus 702AI0C023

### 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. [5 practice marks]

#### Answer

## Given

| Codeword | Bits |
| --- | --- |
| C1 | 000 |
| C2 | 111 |

## To find

All pair distances, dmin and the maximum guaranteed numbers of errors.

## Formula and why



$$
d(a,b)=\mathrm{weight}(a\oplus b)
$$





$$
s=d_{\min}-1,\quad t=\lfloor(d_{\min}-1)/2\rfloor
$$



XOR exposes differing positions. Use the closest codeword pair, because it is the weakest separation in the code.

## Step-by-step solution

#### Step 1. XOR every distinct pair

| Pair | First | Second | XOR | Distance |
| --- | --- | --- | --- | --- |
| C1 vs C2 | 000 | 111 | 111 | 3 |

#### Step 2. Take the minimum

dmin = min(3) = 3.

#### Step 3. Calculate the guarantees

Detect = 3−1 = 2; correct = floor((3−1)/2) = 1.

#### Step 4. Justify geometrically

3 bit changes can reach another valid codeword, so only 2 are guaranteed detectable. Correction regions require 2t < 3.

**Final answer:** dmin=3; detect up to 2 errors; correct up to 1 errors.

#### What this result means

A distance of one particular pair does not set the whole-code capability unless it is the minimum.

---

## TEE · Hamming-distance working · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/error-control--distance-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/error-control/distance-3

TEE · Unit 3 before ALOHA · current syllabus 702AI0C023

### 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. [5 practice marks]

#### Answer

## Given

| Codeword | Bits |
| --- | --- |
| C1 | 00000 |
| C2 | 11110 |
| C3 | 00111 |

## To find

All pair distances, dmin and the maximum guaranteed numbers of errors.

## Formula and why



$$
d(a,b)=\mathrm{weight}(a\oplus b)
$$





$$
s=d_{\min}-1,\quad t=\lfloor(d_{\min}-1)/2\rfloor
$$



XOR exposes differing positions. Use the closest codeword pair, because it is the weakest separation in the code.

## Step-by-step solution

#### Step 1. XOR every distinct pair

| Pair | First | Second | XOR | Distance |
| --- | --- | --- | --- | --- |
| C1 vs C2 | 00000 | 11110 | 11110 | 4 |
| C1 vs C3 | 00000 | 00111 | 00111 | 3 |
| C2 vs C3 | 11110 | 00111 | 11001 | 3 |

#### Step 2. Take the minimum

dmin = min(4, 3, 3) = 3.

#### Step 3. Calculate the guarantees

Detect = 3−1 = 2; correct = floor((3−1)/2) = 1.

#### Step 4. Justify geometrically

3 bit changes can reach another valid codeword, so only 2 are guaranteed detectable. Correction regions require 2t < 3.

**Final answer:** dmin=3; detect up to 2 errors; correct up to 1 errors.

#### What this result means

A distance of one particular pair does not set the whole-code capability unless it is the minimum.

---

## TEE · CRC: polynomial division without carries

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/error-control--crc/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/error-control/crc

TEE · Unit 3 before ALOHA · current syllabus 702AI0C023

### Practice question. Explain CRC generation and checking. What does a zero remainder prove? [5 practice marks]

#### Answer

A **Cyclic Redundancy Check (CRC)** 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.



$$
T(x)=x^rM(x)\oplus R(x),\quad R(x)=x^rM(x)\bmod G(x)
$$



1. Convert each polynomial coefficient into a bit, including zero coefficients for missing powers.
2. Append r zero bits to the message, because multiplying by x^r shifts it left r places.
3. 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.
4. Replace the appended zeros with the remainder. The resulting transmitted frame is divisible by the generator.
5. 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.

Swipe across the diagram to read its labels ↔

![CRC sender and receiver](https://deep-learning-study-room.vercel.app/cn/fig/tee-crc.24705171b3.svg)

Diagram: CRC sender and receiver. Labels: CRC sender and receiver | CRC sender and receiver | Message M and degree-r generator G | Write every coefficient, append r zeros to the message. | Sender: XOR long division | Divide the augmented message by G. Keep an r-bit remainder R. | Transmit message followed by remainder | T = shifted message XOR R. The full frame is divisible by G. | Receiver: divide the received complete frame | Nonzero remainder detects corruption. Zero means no detected error; some error patterns can pass.

Sender appends remainder; receiver checks divisibility.

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.

#### Practical example

Generator 1101 has degree 3, so append three zeros, not four. A 3-bit remainder such as 001 must keep its leading zeros.

**Yaad rakho:** CRC mein subtract bhi XOR; receiver par full frame divide.

---

## TEE · CRC worked division · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/error-control--crc-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/error-control/crc-1

TEE · Unit 3 before ALOHA · current syllabus 702AI0C023

### 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. [7 practice marks]

#### Answer

## Given

Message=110010; generator=1101; generator degree r=3. This is textbook systematic CRC with zero initial remainder and no reflection/final XOR.

## To find

Exactly r CRC bits, the transmitted frame and receiver syndromes.

## Formula and why



$$
R=(M\,2^r)\bmod_2 G,\qquad T=(M\,2^r)\oplus R
$$



Modulo-2 division uses aligned XOR, not ordinary decimal division.

## Step-by-step solution

#### Step 1. Preserve all polynomial coefficients

Message bits=110010; generator bits=1101. Leading exponent is 3, so CRC length is 3.

#### Step 2. Append zeros

110010 followed by 3 zeros = 110010000.

#### Step 3. Perform each nonzero XOR subtraction

| Before | Aligned generator | After XOR |
| --- | --- | --- |
| 110010000 | 110100000 | 000110000 |
| 000110000 | 000110100 | 000000100 |

Remainder padded to 3 bits = **100**. Leading zero columns need no subtraction.

#### Step 4. Construct the transmitted frame

Message + CRC = 110010 + 100 = **110010100**.

#### Step 5. Check the full frame

| Before | Aligned generator | After XOR |
| --- | --- | --- |
| 110010100 | 110100000 | 000110100 |
| 000110100 | 000110100 | 000000000 |

Receiver remainder = 000; the uncorrupted frame passes.

#### Step 6. Demonstrate detection

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.

**Final answer:** CRC=100; transmitted frame=110010100; uncorrupted receiver remainder=000.

#### What this result means

Some software CRCs use different initial/reflection/final conventions; this answer follows the polynomial-division question’s stated textbook model.

---

## TEE · CRC worked division · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/error-control--crc-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/error-control/crc-2

TEE · Unit 3 before ALOHA · current syllabus 702AI0C023

### 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. [7 practice marks]

#### Answer

## Given

Message=1001; generator=1011; generator degree r=3. This is textbook systematic CRC with zero initial remainder and no reflection/final XOR.

## To find

Exactly r CRC bits, the transmitted frame and receiver syndromes.

## Formula and why



$$
R=(M\,2^r)\bmod_2 G,\qquad T=(M\,2^r)\oplus R
$$



Modulo-2 division uses aligned XOR, not ordinary decimal division.

## Step-by-step solution

#### Step 1. Preserve all polynomial coefficients

Message bits=1001; generator bits=1011. Leading exponent is 3, so CRC length is 3.

#### Step 2. Append zeros

1001 followed by 3 zeros = 1001000.

#### Step 3. Perform each nonzero XOR subtraction

| Before | Aligned generator | After XOR |
| --- | --- | --- |
| 1001000 | 1011000 | 0010000 |
| 0010000 | 0010110 | 0000110 |

Remainder padded to 3 bits = **110**. Leading zero columns need no subtraction.

#### Step 4. Construct the transmitted frame

Message + CRC = 1001 + 110 = **1001110**.

#### Step 5. Check the full frame

| Before | Aligned generator | After XOR |
| --- | --- | --- |
| 1001110 | 1011000 | 0010110 |
| 0010110 | 0010110 | 0000000 |

Receiver remainder = 000; the uncorrupted frame passes.

#### Step 6. Demonstrate detection

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.

**Final answer:** CRC=110; transmitted frame=1001110; uncorrupted receiver remainder=000.

#### What this result means

Some software CRCs use different initial/reflection/final conventions; this answer follows the polynomial-division question’s stated textbook model.

---

## TEE · CRC worked division · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/error-control--crc-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/error-control/crc-3

TEE · Unit 3 before ALOHA · current syllabus 702AI0C023

### 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. [7 practice marks]

#### Answer

## Given

Message=101101; generator=10011; generator degree r=4. This is textbook systematic CRC with zero initial remainder and no reflection/final XOR.

## To find

Exactly r CRC bits, the transmitted frame and receiver syndromes.

## Formula and why



$$
R=(M\,2^r)\bmod_2 G,\qquad T=(M\,2^r)\oplus R
$$



Modulo-2 division uses aligned XOR, not ordinary decimal division.

## Step-by-step solution

#### Step 1. Preserve all polynomial coefficients

Message bits=101101; generator bits=10011. Leading exponent is 4, so CRC length is 4.

#### Step 2. Append zeros

101101 followed by 4 zeros = 1011010000.

#### Step 3. Perform each nonzero XOR subtraction

| Before | Aligned generator | After XOR |
| --- | --- | --- |
| 1011010000 | 1001100000 | 0010110000 |
| 0010110000 | 0010011000 | 0000101000 |
| 0000101000 | 0000100110 | 0000001110 |

Remainder padded to 4 bits = **1110**. Leading zero columns need no subtraction.

#### Step 4. Construct the transmitted frame

Message + CRC = 101101 + 1110 = **1011011110**.

#### Step 5. Check the full frame

| Before | Aligned generator | After XOR |
| --- | --- | --- |
| 1011011110 | 1001100000 | 0010111110 |
| 0010111110 | 0010011000 | 0000100110 |
| 0000100110 | 0000100110 | 0000000000 |

Receiver remainder = 0000; the uncorrupted frame passes.

#### Step 6. Demonstrate detection

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.

**Final answer:** CRC=1110; transmitted frame=1011011110; uncorrupted receiver remainder=0000.

#### What this result means

Some software CRCs use different initial/reflection/final conventions; this answer follows the polynomial-division question’s stated textbook model.

---

## TEE · CRC worked division · example 4

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/error-control--crc-4/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/error-control/crc-4

TEE · Unit 3 before ALOHA · current syllabus 702AI0C023

### 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. [7 practice marks]

#### Answer

## Given

Message=1010; generator=1011; generator degree r=3. This is textbook systematic CRC with zero initial remainder and no reflection/final XOR.

## To find

Exactly r CRC bits, the transmitted frame and receiver syndromes.

## Formula and why



$$
R=(M\,2^r)\bmod_2 G,\qquad T=(M\,2^r)\oplus R
$$



Modulo-2 division uses aligned XOR, not ordinary decimal division.

## Step-by-step solution

#### Step 1. Preserve all polynomial coefficients

Message bits=1010; generator bits=1011. Leading exponent is 3, so CRC length is 3.

#### Step 2. Append zeros

1010 followed by 3 zeros = 1010000.

#### Step 3. Perform each nonzero XOR subtraction

| Before | Aligned generator | After XOR |
| --- | --- | --- |
| 1010000 | 1011000 | 0001000 |
| 0001000 | 0001011 | 0000011 |

Remainder padded to 3 bits = **011**. Leading zero columns need no subtraction.

#### Step 4. Construct the transmitted frame

Message + CRC = 1010 + 011 = **1010011**.

#### Step 5. Check the full frame

| Before | Aligned generator | After XOR |
| --- | --- | --- |
| 1010011 | 1011000 | 0001011 |
| 0001011 | 0001011 | 0000000 |

Receiver remainder = 000; the uncorrupted frame passes.

#### Step 6. Demonstrate detection

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.

**Final answer:** CRC=011; transmitted frame=1010011; uncorrupted receiver remainder=000.

#### What this result means

Some software CRCs use different initial/reflection/final conventions; this answer follows the polynomial-division question’s stated textbook model.

---

## TEE · Flow control is different from error control

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/arq--flow-error/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/arq/flow-error

TEE · Unit 3 before ALOHA · current syllabus 702AI0C023

### Practice question. Distinguish flow control from error control. Explain the building blocks of ARQ. [5 practice marks]

#### Answer

**Flow control** prevents a fast sender from overwhelming receiver buffers. **Error control** handles damaged, lost and duplicate frames so that the intended data can be delivered reliably. **ARQ** means Automatic Repeat reQuest: retransmission is triggered by feedback or a timer.

| Mechanism | Purpose |
| --- | --- |
| CRC/checksum | Detect corrupted frames; alone does not recover them |
| Sequence number | Identify data and reject duplicates |
| ACK | Confirm accepted data; state cumulative or individual convention |
| Timer | Recover when either data or its ACK disappears |
| Window | Bound the outstanding unacknowledged data |
| Buffer | Hold unacknowledged sender copies; receiver buffers depend on protocol |

#### Practical example

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.

**Yaad rakho:** Flow receiver speed; error lost/corrupt/duplicate recovery.

---

## TEE · Stop-and-Wait ARQ and lost ACKs

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/arq--stopwait/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/arq/stopwait

TEE · Unit 3 before ALOHA · current syllabus 702AI0C023

### Practice question. Explain Stop-and-Wait ARQ with normal transmission, lost data and lost ACK cases. [7 practice marks]

#### Answer

**Stop-and-Wait ARQ** 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.

Swipe across the diagram to read its labels ↔

![Stop-and-Wait: lost ACK and duplicate rejection](https://deep-learning-study-room.vercel.app/cn/fig/tee-stopwait.a99281ab96.svg)

Diagram: Stop-and-Wait: lost ACK and duplicate rejection. Labels: Stop-and-Wait: lost ACK and duplicate rejection | Stop-and-Wait: lost ACK and duplicate rejection | Sender | Receiver | Frame 0 → accepted, delivered once | ACK 1 lost on return path | Timeout: resend frame 0 → duplicate | Repeat ACK 1; duplicate not delivered | Frame 1 → next new frame | ACK k means next expected sequence k in this diagram.

Lost ACK causes a duplicate transmission, not duplicate delivery.

1. Use alternating sequence numbers 0 and 1. The receiver remembers the next expected number. Here ACK k means the next sequence expected.
2. Normal: send frame 0, receiver accepts it and sends ACK 1; sender then sends frame 1.
3. Damaged/lost data: receiver cannot accept the missing valid frame. The sender eventually times out and retransmits.
4. 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.
5. A damaged ACK must not advance the sender. The timer provides eventual recovery. Waiting each round trip limits utilization on high-delay links.

#### Practical example

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.

**Yaad rakho:** One frame outstanding; duplicate ko acknowledge karo, deliver dobara nahi.

---

## TEE · Go-Back-N with window 7: three complete cases

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/arq--gbn/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/arq/gbn

TEE · Unit 3 before ALOHA · current syllabus 702AI0C023

### 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. [10 practice marks]

#### Answer

**Go-Back-N (GBN) ARQ** pipelines up to W outstanding frames. For m-bit sequence numbers, textbook GBN uses W ≤ 2m−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”.

Swipe across the diagram to read its labels ↔

![GBN W=7: loss and cumulative ACKs](https://deep-learning-study-room.vercel.app/cn/fig/tee-gbn.5f577a6979.svg)

Diagram: GBN W=7: loss and cumulative ACKs. Labels: GBN W=7: loss and cumulative ACKs | GBN W=7: loss and cumulative ACKs | Sender | Receiver | Frames 0,1 → accept in order | ACK 2: next expected is 2 | Frame 2 lost | Frames 3,4,5,6 → discard out of order | ACK 2 repeated | Timer for 2 expires: resend 2,3,4,5,6 | ACK 7: frames through 6 accepted | Receiver window = [2] while waiting; no out-of-order buffering. | Sender retains all unacknowledged frames from base 2 onward.

GBN example: frame 2 lost; frames 3–6 discarded; timeout resends 2–6.

1. 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.
2. Normal: after receiving 0 and 1, cumulative ACK 2 advances the sender base to 2. The sender can fill newly opened window slots.
3. 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.
4. 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.
5. 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.

#### Practical example

With W=7, loss of frame 2 can waste successful receptions of 3…6. GBN trades simple receiver buffering for extra retransmission after loss.

Swipe across the diagram to read its labels ↔

![GBN W=7: normal window movement](https://deep-learning-study-room.vercel.app/cn/fig/tee-gbn-normal.144a24ea80.svg)

Diagram: GBN W=7: normal window movement. Labels: GBN W=7: normal window movement | GBN W=7: normal window movement | Sender | Receiver | Frame 0 from sender window [0…6] | ACK 1 → sender window [1…7] | Frame 1 arrives; receiver now expects 2 | ACK 2 → sender window [2…7,0] | Receiver window progresses [0] → [1] → [2]. | Sequence labels wrap modulo 8; sender window contains 7 slots.

Normal transmission: both windows advance as frames are cumulatively acknowledged.

Swipe across the diagram to read its labels ↔

![GBN: a later cumulative ACK covers a lost ACK](https://deep-learning-study-room.vercel.app/cn/fig/tee-gbn-ack.713dc9972e.svg)

Diagram: GBN: a later cumulative ACK covers a lost ACK. Labels: GBN: a later cumulative ACK covers a lost ACK | GBN: a later cumulative ACK covers a lost ACK | Sender | Receiver | Frame 0 accepted; receiver expects 1 | ACK 1 is lost | Frame 1 accepted; receiver expects 2 | ACK 2 arrives before timeout | Sender advances base to 2; continues | ACK 2 confirms frames 0 and 1; no retransmission needed. | Without a later useful ACK, oldest-frame timeout triggers resend.

A later cumulative ACK can cover an earlier lost ACK.

**Yaad rakho:** GBN receiver one; gap ke baad discard; timeout pe outstanding suffix repeat.

---

## TEE · Selective Repeat: window bound and buffering

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/arq--sr/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/arq/sr

TEE · Unit 3 before ALOHA · current syllabus 702AI0C023

### 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. [10 practice marks]

#### Answer

**Selective Repeat (SR) ARQ** 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.

Swipe across the diagram to read its labels ↔

![SR W=4: individual ACKs and buffering](https://deep-learning-study-room.vercel.app/cn/fig/tee-sr.5ae2b52b45.svg)

Diagram: SR W=4: individual ACKs and buffering. Labels: SR W=4: individual ACKs and buffering | SR W=4: individual ACKs and buffering | Sender | Receiver | Frames 0,1 → accept and deliver | ACK 0 and ACK 1 individually | Frame 2 lost; frame 3 arrives | ACK 3; keep frame 3 in buffer | Timer for frame 2: resend only 2 | ACK 2; deliver 2, then buffered 3 | Sequence space 0…7; equal windows at most 4. | ACK i means that specific frame i was accepted.

SR buffers 3 while waiting for 2; only 2 is retransmitted.

1. For m=3 there are eight sequence numbers, 0…7. With equal sender and receiver windows, maximum W=23−1=4. Both windows begin at 0 and span 0…3.
2. 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.
3. Although 3 is acknowledged, the sender’s base cannot jump over missing 2. A timer for 2 expires; only frame 2 is retransmitted.
4. 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.
5. 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.
6. A repeated old frame can be acknowledged again without delivering it twice. SR needs more receiver storage and per-frame tracking than GBN.



$$
W_s=W_r\le 2^{m-1}
$$



#### Practical example

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.

**Yaad rakho:** SR selective resend; half sequence space keeps old and new separate.

---

## TEE · Compare all three ARQ protocols

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/arq--comparison/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/arq/comparison

TEE · Unit 3 before ALOHA · current syllabus 702AI0C023

### Practice question. Compare Stop-and-Wait, Go-Back-N and Selective Repeat ARQ. [5 practice marks]

#### Answer

| Property | Stop-and-Wait | Go-Back-N | Selective Repeat |
| --- | --- | --- | --- |
| Outstanding sender frames | 1 | Up to 2^m−1 | Up to 2^(m−1), equal windows |
| Receiver window | 1 | 1 | Same maximum as sender in standard equal-window SR |
| ACK convention used here | Next expected | Cumulative, next expected | Individual frame accepted |
| Out-of-order data | Not delivered | Discarded | Buffered within valid window |
| After timeout | Repeat the one frame | Repeat outstanding frames from base | Repeat only timed-out frame |
| Buffer/tracking cost | Low | Sender window; simple receiver | Sender and receiver windows; per-frame tracking |
| Tradeoff | Simple but idle during RTT | Good pipelining, waste after loss | Efficient loss recovery, greater complexity |

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.

#### Practical example

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.

---

## TEE · ARQ sequence/window arithmetic · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/arq--windows-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/arq/windows-1

TEE · Unit 3 before ALOHA · current syllabus 702AI0C023

### 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. [5 practice marks]

#### Answer

## Given

m=3; standard GBN and equal sender/receiver SR windows.

## To find

Sequence count and allowed windows.

## Formula and why



$$
N=2^m,\quad W_{GBN}\le 2^m-1,\quad W_{SR}\le 2^{m-1}
$$



GBN needs one unused sequence value; SR keeps old and new receive windows disjoint.

## Step-by-step solution

#### Step 1. Count sequence numbers

23=8, numbered 0…7.

#### Step 2. Apply GBN rule

Sender maximum=8−1=7; receiver window=1.

#### Step 3. Apply SR rule

Equal sender and receiver maxima=8/2=4.

**Final answer:** 8 sequence numbers; GBN sender 7, receiver 1; SR sender/receiver 4 each.

#### What this result means

The largest sequence number is one less than the sequence-space size. Do not confuse these quantities.

---

## TEE · ARQ sequence/window arithmetic · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/arq--windows-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/arq/windows-2

TEE · Unit 3 before ALOHA · current syllabus 702AI0C023

### 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. [5 practice marks]

#### Answer

## Given

m=4; standard GBN and equal sender/receiver SR windows.

## To find

Sequence count and allowed windows.

## Formula and why



$$
N=2^m,\quad W_{GBN}\le 2^m-1,\quad W_{SR}\le 2^{m-1}
$$



GBN needs one unused sequence value; SR keeps old and new receive windows disjoint.

## Step-by-step solution

#### Step 1. Count sequence numbers

24=16, numbered 0…15.

#### Step 2. Apply GBN rule

Sender maximum=16−1=15; receiver window=1.

#### Step 3. Apply SR rule

Equal sender and receiver maxima=16/2=8.

**Final answer:** 16 sequence numbers; GBN sender 15, receiver 1; SR sender/receiver 8 each.

#### What this result means

The largest sequence number is one less than the sequence-space size. Do not confuse these quantities.

---

## TEE · ARQ sequence/window arithmetic · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/arq--windows-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/arq/windows-3

TEE · Unit 3 before ALOHA · current syllabus 702AI0C023

### 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. [5 practice marks]

#### Answer

## Given

m=5; standard GBN and equal sender/receiver SR windows.

## To find

Sequence count and allowed windows.

## Formula and why



$$
N=2^m,\quad W_{GBN}\le 2^m-1,\quad W_{SR}\le 2^{m-1}
$$



GBN needs one unused sequence value; SR keeps old and new receive windows disjoint.

## Step-by-step solution

#### Step 1. Count sequence numbers

25=32, numbered 0…31.

#### Step 2. Apply GBN rule

Sender maximum=32−1=31; receiver window=1.

#### Step 3. Apply SR rule

Equal sender and receiver maxima=32/2=16.

**Final answer:** 32 sequence numbers; GBN sender 31, receiver 1; SR sender/receiver 16 each.

#### What this result means

The largest sequence number is one less than the sequence-space size. Do not confuse these quantities.

---

## TEE · Pure ALOHA: transmit first, retry if necessary

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--pure/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/aloha/pure

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** 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.

**Simple meaning.** Frame ready → bhej do. Collision hua → random wait karke retry.

Swipe across the diagram to read its labels ↔

![Pure ALOHA: arbitrary start times can overlap](https://deep-learning-study-room.vercel.app/cn/fig/pure-aloha.8aa7732ee2.svg)

Diagram: Pure ALOHA: arbitrary start times can overlap. Labels: Pure ALOHA: arbitrary start times can overlap | Pure ALOHA: arbitrary start times can overlap | Station A | Station B | Frame A | Frame B | Overlap: both fail in the basic collision model | A retry begins after a random waiting interval.

Pure ALOHA: transmit first, retry if necessary

## Understand it step by step

1. Several stations share the same channel. Pure ALOHA does not first check whether the channel is idle.
2. A station transmits immediately. In the basic collision-channel model, any overlapping frame makes the involved frames unsuccessful.
3. 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.
4. The station waits a random backoff time and retries. If every station used the same fixed delay, they could collide again together.

#### Practical example

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.

### Practice question. Explain Pure ALOHA and state its main limitation. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Pure = kisi bhi time start; retry ka wait random.

---

## TEE · Why Pure ALOHA has a 2T vulnerable period

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--vulnerable/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/aloha/vulnerable

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** The vulnerable period is the interval of start times of other frames that would cause a collision with a chosen frame.

**Simple meaning.** Apne frame se ek frame-time pehle start hua frame bhi takra sakta hai, aur baad mein bhi.

Swipe across the diagram to read its labels ↔

![Pure ALOHA: interfering starts from −T to +T](https://deep-learning-study-room.vercel.app/cn/fig/vulnerable.e2a01a5ab7.svg)

Diagram: Pure ALOHA: interfering starts from −T to +T. Labels: Pure ALOHA: interfering starts from −T to +T | Pure ALOHA: interfering starts from −T to +T | −T | 0 | +T | Our frame: 0 to T | Vulnerable start-time interval length = 2T

Why Pure ALOHA has a 2T vulnerable period

## Understand it step by step

1. Let your frame start at time 0 and finish at T. All frames have the same transmission duration T.
2. Another frame starting between −T and 0 is still being transmitted when your frame begins.
3. Another frame starting between 0 and T begins before your frame ends.
4. Therefore interfering start times occupy an interval of length 2T. Exact boundary contact is treated as non-overlap in this idealized timing model.

#### Practical example

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.

### Practice question. Why is the vulnerable time of Pure ALOHA twice the frame transmission time? [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Pure: before T + after T = 2T.

---

## TEE · Slotted ALOHA: starts only at slot boundaries

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--slotted/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/aloha/slotted

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** 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.

**Simple meaning.** Frame ready hai tab bhi next slot ki start-line ka wait karo.

Swipe across the diagram to read its labels ↔

![Slotted ALOHA: one frame duration per slot](https://deep-learning-study-room.vercel.app/cn/fig/slotted-aloha.fbfbef9647.svg)

Diagram: Slotted ALOHA: one frame duration per slot. Labels: Slotted ALOHA: one frame duration per slot | Slotted ALOHA: one frame duration per slot | 0T | 1T | 2T | 3T | 4T | 5T | Station A | Station B | A1 | A2 | B1 | B2 | A2 and B1 choose the same slot: collision. Starts stay aligned.

Slotted ALOHA: starts only at slot boundaries

## Understand it step by step

1. All stations agree on slot boundaries; time synchronization is required.
2. A station with a frame waits for a slot boundary before starting. A slot can be idle, successful or a collision.
3. Exactly one station transmitting in a slot produces success in the ideal model. Two or more simultaneous attempts collide.
4. Frames cannot partially overlap adjacent slots under the assumptions. The vulnerable interval is T instead of 2T. Randomized retries are still needed.

#### Practical example

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.

### Practice question. Compare Pure ALOHA and Slotted ALOHA. [3 practice marks]

#### Answer

| Feature | Pure | Slotted |
| --- | --- | --- |
| Start time | Any time | Slot boundary only |
| Synchronization | No common slots required | Required |
| Vulnerable period | 2T | T |
| Maximum S | 1/(2e) ≈ 0.184 | 1/e ≈ 0.368 |
| G at maximum | 0.5 | 1 |

#### Practical example

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.

**Yaad rakho:** Slotted = aligned starts; collision risk half-window, not zero.

---

## TEE · G, S and throughput: which number are you finding?

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--formulas/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/aloha/formulas

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** 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.

**Simple meaning.** G = kitne attempts; S = unmein successful output per frame-time. Dono same nahi.

Swipe across the diagram to read its labels ↔

![ALOHA: too many attempts eventually reduce successful output](https://deep-learning-study-room.vercel.app/cn/fig/aloha-curve.58889b65f2.svg)

Diagram: ALOHA: too many attempts eventually reduce successful output. Labels: ALOHA: too many attempts eventually reduce successful output | ALOHA: too many attempts eventually reduce successful output | 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 0.1 | 0.2 | 0.3 | 0.4 | Slotted max ≈ 0.368 at G=1 | Pure max ≈ 0.184 at G=0.5 | G: aggregate attempts per frame time | S

G, S and throughput: which number are you finding?

## Understand it step by step

1. 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.
2. 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.
3. Pure ALOHA uses S=Ge⁻²ᴳ; Slotted ALOHA uses S=Ge⁻ᴳ. Do not use arrival rate in frames/s directly in the exponent.
4. 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.
5. 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.



$$
T=L/R,\qquad G=\lambda T
$$





$$
S_{\mathrm{pure}}=G e^{-2G}
$$





$$
S_{\mathrm{slotted}}=G e^{-G}
$$





$$
\text{successful frames/s}=S/T
$$





$$
\text{successful frame bits/s}=SR
$$



#### Practical example

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.

### Practice question. Write the throughput expressions of Pure and Slotted ALOHA, defining G and S. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** P mein pair: −2G; S mein single: −G.

## Important conversion in the faculty examples

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 ≈ **183.94 frames/s**.

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 **151.63 frames/s**. Use the definitions and units above.

---

## TEE · Pure ALOHA · load example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--pure-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/aloha/pure-1

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. In a Pure ALOHA system, the offered load is G=0.25. Find normalized throughput, percentage throughput, and the theoretical maximum. [3 practice marks]

#### Answer

## Given

Protocol = Pure ALOHA; G = 0.25 attempts/frame time.

## To find

S, 100S and the maximum possible S.

## Formula and why



$$
S=G e^{-2G}
$$



Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.

## Step-by-step solution

#### Step 1. Calculate the exponent

−2 × 0.25 = -0.5.

#### Step 2. Evaluate the exponential



$$
e^{-0.5} \approx 0.606530660
$$



#### Step 3. Multiply by G

S = 0.25 × 0.606530660 ≈ 0.151632665 successful frames/frame time.

#### Step 4. Convert to percentage

0.151632665 × 100 ≈ 15.1633%.

#### Step 5. State the maximum separately

The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.

**Final answer:** S ≈ 0.151633; percentage ≈ 15.1633%; Smax ≈ 0.183940 at G=0.5.

#### What this result means

A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.

---

## TEE · Pure ALOHA · load example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--pure-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/aloha/pure-2

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. In a Pure ALOHA system, the offered load is G=0.5. Find normalized throughput, percentage throughput, and the theoretical maximum. [3 practice marks]

#### Answer

## Given

Protocol = Pure ALOHA; G = 0.5 attempts/frame time.

## To find

S, 100S and the maximum possible S.

## Formula and why



$$
S=G e^{-2G}
$$



Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.

## Step-by-step solution

#### Step 1. Calculate the exponent

−2 × 0.5 = -1.

#### Step 2. Evaluate the exponential



$$
e^{-1} \approx 0.367879441
$$



#### Step 3. Multiply by G

S = 0.5 × 0.367879441 ≈ 0.183939721 successful frames/frame time.

#### Step 4. Convert to percentage

0.183939721 × 100 ≈ 18.3940%.

#### Step 5. State the maximum separately

The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.

**Final answer:** S ≈ 0.183940; percentage ≈ 18.3940%; Smax ≈ 0.183940 at G=0.5.

#### What this result means

A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.

---

## TEE · Pure ALOHA · load example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--pure-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/aloha/pure-3

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. In a Pure ALOHA system, the offered load is G=1. Find normalized throughput, percentage throughput, and the theoretical maximum. [3 practice marks]

#### Answer

## Given

Protocol = Pure ALOHA; G = 1 attempts/frame time.

## To find

S, 100S and the maximum possible S.

## Formula and why



$$
S=G e^{-2G}
$$



Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.

## Step-by-step solution

#### Step 1. Calculate the exponent

−2 × 1 = -2.

#### Step 2. Evaluate the exponential



$$
e^{-2} \approx 0.135335283
$$



#### Step 3. Multiply by G

S = 1 × 0.135335283 ≈ 0.135335283 successful frames/frame time.

#### Step 4. Convert to percentage

0.135335283 × 100 ≈ 13.5335%.

#### Step 5. State the maximum separately

The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.

**Final answer:** S ≈ 0.135335; percentage ≈ 13.5335%; Smax ≈ 0.183940 at G=0.5.

#### What this result means

A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.

---

## TEE · Slotted ALOHA · load example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--slotted-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/aloha/slotted-1

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. In a Slotted ALOHA system, the offered load is G=0.25. Find normalized throughput, percentage throughput, and the theoretical maximum. [3 practice marks]

#### Answer

## Given

Protocol = Slotted ALOHA; G = 0.25 attempts/frame time.

## To find

S, 100S and the maximum possible S.

## Formula and why



$$
S=G e^{-G}
$$



Select the formula from the protocol name. The exponent is −G because Slotted ALOHA has a T vulnerable period.

## Step-by-step solution

#### Step 1. Calculate the exponent

−1 × 0.25 = -0.25.

#### Step 2. Evaluate the exponential



$$
e^{-0.25} \approx 0.778800783
$$



#### Step 3. Multiply by G

S = 0.25 × 0.778800783 ≈ 0.194700196 successful frames/frame time.

#### Step 4. Convert to percentage

0.194700196 × 100 ≈ 19.4700%.

#### Step 5. State the maximum separately

The maximum is 1/(1e) ≈ 0.367879 = 36.7879%, at G=1.

**Final answer:** S ≈ 0.194700; percentage ≈ 19.4700%; Smax ≈ 0.367879 at G=1.

#### What this result means

A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.

---

## TEE · Slotted ALOHA · load example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--slotted-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/aloha/slotted-2

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. In a Slotted ALOHA system, the offered load is G=1. Find normalized throughput, percentage throughput, and the theoretical maximum. [3 practice marks]

#### Answer

## Given

Protocol = Slotted ALOHA; G = 1 attempts/frame time.

## To find

S, 100S and the maximum possible S.

## Formula and why



$$
S=G e^{-G}
$$



Select the formula from the protocol name. The exponent is −G because Slotted ALOHA has a T vulnerable period.

## Step-by-step solution

#### Step 1. Calculate the exponent

−1 × 1 = -1.

#### Step 2. Evaluate the exponential



$$
e^{-1} \approx 0.367879441
$$



#### Step 3. Multiply by G

S = 1 × 0.367879441 ≈ 0.367879441 successful frames/frame time.

#### Step 4. Convert to percentage

0.367879441 × 100 ≈ 36.7879%.

#### Step 5. State the maximum separately

The maximum is 1/(1e) ≈ 0.367879 = 36.7879%, at G=1.

**Final answer:** S ≈ 0.367879; percentage ≈ 36.7879%; Smax ≈ 0.367879 at G=1.

#### What this result means

A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.

---

## TEE · Slotted ALOHA · load example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--slotted-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/aloha/slotted-3

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. In a Slotted ALOHA system, the offered load is G=2. Find normalized throughput, percentage throughput, and the theoretical maximum. [3 practice marks]

#### Answer

## Given

Protocol = Slotted ALOHA; G = 2 attempts/frame time.

## To find

S, 100S and the maximum possible S.

## Formula and why



$$
S=G e^{-G}
$$



Select the formula from the protocol name. The exponent is −G because Slotted ALOHA has a T vulnerable period.

## Step-by-step solution

#### Step 1. Calculate the exponent

−1 × 2 = -2.

#### Step 2. Evaluate the exponential



$$
e^{-2} \approx 0.135335283
$$



#### Step 3. Multiply by G

S = 2 × 0.135335283 ≈ 0.270670566 successful frames/frame time.

#### Step 4. Convert to percentage

0.270670566 × 100 ≈ 27.0671%.

#### Step 5. State the maximum separately

The maximum is 1/(1e) ≈ 0.367879 = 36.7879%, at G=1.

**Final answer:** S ≈ 0.270671; percentage ≈ 27.0671%; Smax ≈ 0.367879 at G=1.

#### What this result means

A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.

---

## TEE · Frames/s to throughput · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--rate-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/aloha/rate-1

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

| Symbol | Given |
| --- | --- |
| L | 200 bits |
| R | 200 kbps = 200,000 bits/s |
| λ | 1000 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-2G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 200/200,000 = 0.001 s = 1 ms.

#### Step 2. Offered load

G = 1000 × 0.001 = 1 attempts/frame time.

#### Step 3. Exponent and exponential

−2G = -2; e to that power ≈ 0.135335283.

#### Step 4. Normalized throughput

S = 1 × 0.135335283 ≈ 0.135335283.

#### Step 5. Successful frames each second

S/T = 0.135335283/0.001 ≈ 135.335283 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.135335283 × 200,000 ≈ 27067.056647 bits/s ≈ 27.067057 kbps.

**Final answer:** G=1, S≈0.135335, successful rate≈135.335 frames/s = 27.067 kbps.

#### What this result means

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 λ.

---

## TEE · Frames/s to throughput · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--rate-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/aloha/rate-2

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

| Symbol | Given |
| --- | --- |
| L | 200 bits |
| R | 200 kbps = 200,000 bits/s |
| λ | 500 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-2G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 200/200,000 = 0.001 s = 1 ms.

#### Step 2. Offered load

G = 500 × 0.001 = 0.5 attempts/frame time.

#### Step 3. Exponent and exponential

−2G = -1; e to that power ≈ 0.367879441.

#### Step 4. Normalized throughput

S = 0.5 × 0.367879441 ≈ 0.183939721.

#### Step 5. Successful frames each second

S/T = 0.183939721/0.001 ≈ 183.939721 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.183939721 × 200,000 ≈ 36787.944117 bits/s ≈ 36.787944 kbps.

**Final answer:** G=0.5, S≈0.183940, successful rate≈183.940 frames/s = 36.788 kbps.

#### What this result means

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 λ.

---

## TEE · Frames/s to throughput · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--rate-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/aloha/rate-3

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

| Symbol | Given |
| --- | --- |
| L | 200 bits |
| R | 200 kbps = 200,000 bits/s |
| λ | 250 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-2G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 200/200,000 = 0.001 s = 1 ms.

#### Step 2. Offered load

G = 250 × 0.001 = 0.25 attempts/frame time.

#### Step 3. Exponent and exponential

−2G = -0.5; e to that power ≈ 0.606530660.

#### Step 4. Normalized throughput

S = 0.25 × 0.606530660 ≈ 0.151632665.

#### Step 5. Successful frames each second

S/T = 0.151632665/0.001 ≈ 151.632665 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.151632665 × 200,000 ≈ 30326.532986 bits/s ≈ 30.326533 kbps.

**Final answer:** G=0.25, S≈0.151633, successful rate≈151.633 frames/s = 30.327 kbps.

#### What this result means

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 λ.

---

## TEE · Frames/s to throughput · example 4

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--rate-4/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/aloha/rate-4

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

| Symbol | Given |
| --- | --- |
| L | 400 bits |
| R | 200 kbps = 200,000 bits/s |
| λ | 500 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 400/200,000 = 0.002 s = 2 ms.

#### Step 2. Offered load

G = 500 × 0.002 = 1 attempts/frame time.

#### Step 3. Exponent and exponential

−1G = -1; e to that power ≈ 0.367879441.

#### Step 4. Normalized throughput

S = 1 × 0.367879441 ≈ 0.367879441.

#### Step 5. Successful frames each second

S/T = 0.367879441/0.002 ≈ 183.939721 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.367879441 × 200,000 ≈ 73575.888234 bits/s ≈ 73.575888 kbps.

**Final answer:** G=1, S≈0.367879, successful rate≈183.940 frames/s = 73.576 kbps.

#### What this result means

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 λ.

---

## TEE · Frames/s to throughput · example 5

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--rate-5/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/aloha/rate-5

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

| Symbol | Given |
| --- | --- |
| L | 1600 bits |
| R | 800 kbps = 800,000 bits/s |
| λ | 250 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 1600/800,000 = 0.002 s = 2 ms.

#### Step 2. Offered load

G = 250 × 0.002 = 0.5 attempts/frame time.

#### Step 3. Exponent and exponential

−1G = -0.5; e to that power ≈ 0.606530660.

#### Step 4. Normalized throughput

S = 0.5 × 0.606530660 ≈ 0.303265330.

#### Step 5. Successful frames each second

S/T = 0.303265330/0.002 ≈ 151.632665 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.303265330 × 800,000 ≈ 242612.263885 bits/s ≈ 242.612264 kbps.

**Final answer:** G=0.5, S≈0.303265, successful rate≈151.633 frames/s = 242.612 kbps.

#### What this result means

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 λ.

---

## TEE · Why the two maximum throughputs differ

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--maxima/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/aloha/maxima

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

A small offered load leaves many opportunities unused. A very large load creates many collisions. The best point balances those effects.

## Pure ALOHA



$$
\frac{dS}{dG}=e^{-2G}(1-2G)
$$



1. The exponential is positive. For the slope to be zero, 1−2G must be zero.
2. 1−2G=0 gives G=0.5.
3. Substitute: S=0.5e⁻¹=1/(2e)≈0.18394. The slope is positive before G=0.5 and negative after it.

## Slotted ALOHA



$$
\frac{dS}{dG}=e^{-G}(1-G)
$$



1. Set 1−G=0, giving G=1.
2. Substitute: S=e⁻¹=1/e≈0.367879.
3. The slope changes from positive to negative, so this is the maximum.

**Yaad rakho:** Pure optimum: G half, maximum half of 1/e. Slotted optimum: G one, maximum 1/e.

---

## TEE · Carrier sensing: why listening does not remove every collision

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/csma--sense/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/csma/sense

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Carrier Sense Multiple Access (CSMA) requires a station to sense the shared medium before transmitting.

**Simple meaning.** Pehle suno, phir bhejo; lekin door ka signal pahunchne mein time leta hai.

Swipe across the diagram to read its labels ↔

![An idle observation is only local](https://deep-learning-study-room.vercel.app/cn/fig/csma-propagation.df55cdec46.svg)

Diagram: An idle observation is only local. Labels: An idle observation is only local | An idle observation is only local | 1. A starts transmitting | Its signal begins moving toward B. | 2. Before A’s signal arrives, B hears silence | B may start a transmission under its access rule. | 3. The signals overlap | Propagation delay permits a collision despite carrier sensing.

Carrier sensing: why listening does not remove every collision

## Understand it step by step

1. If the channel is busy, the station follows its waiting/persistence rule. If idle, it may transmit according to that rule.
2. The channel state is observed locally. A distant station may have started, but its signal has not arrived yet because propagation takes time.
3. Two stations can therefore both observe an idle medium and begin transmitting. CSMA reduces avoidable collisions but does not guarantee zero collisions.

#### Practical example

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.

### Practice question. Why can collisions occur in CSMA even after a station senses an idle channel? [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Idle yahan hai; remote signal abhi raste mein ho sakta hai.

---

## TEE · 1-persistent, non-persistent and p-persistent CSMA

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/csma--persistence/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/csma/persistence

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Persistence specifies how a station behaves after observing that the medium is busy or becomes idle.

**Simple meaning.** 1 = turant; non = random wait; p = probability ke basis pe start.

Swipe across the diagram to read its labels ↔

![CSMA persistence: what happens after carrier sensing?](https://deep-learning-study-room.vercel.app/cn/fig/persistence.528dafcd8a.svg)

Diagram: CSMA persistence: what happens after carrier sensing?. Labels: CSMA persistence: what happens after carrier sensing? | CSMA persistence: what happens after carrier sensing? | 1-persistent | Busy: keep listening. Idle: transmit immediately. | Non-persistent | Busy: random wait, then sense again. Idle: transmit. | p-persistent | Eligible idle slot: transmit with probability p; defer with probability 1−p.

1-persistent, non-persistent and p-persistent CSMA

## Understand it step by step

1. 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.
2. 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.
3. 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.

| Rule | When idle | When busy | Trade-off |
| --- | --- | --- | --- |
| 1-persistent | Transmit immediately | Keep listening; transmit as soon as idle | Low idle delay, but waiting stations may start together |
| Non-persistent | Transmit | Wait a random time, then sense again | Less synchronized contention; may leave avoidable idle time |
| p-persistent (slotted) | Transmit with probability p; defer a slot with probability 1−p | Wait until available, then resume the probabilistic slot rule | Controls contention; needs slots and a choice of p |

#### Practical example

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.

### Practice question. Compare the three persistence strategies in CSMA. [3 practice marks]

#### Answer

| Rule | When idle | When busy | Trade-off |
| --- | --- | --- | --- |
| 1-persistent | Transmit immediately | Keep listening; transmit as soon as idle | Low idle delay, but waiting stations may start together |
| Non-persistent | Transmit | Wait a random time, then sense again | Less synchronized contention; may leave avoidable idle time |
| p-persistent (slotted) | Transmit with probability p; defer a slot with probability 1−p | Wait until available, then resume the probabilistic slot rule | Controls contention; needs slots and a choice of p |

#### Practical example

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.

**Yaad rakho:** 1 = start now; non = wait then listen; p = chance per idle slot.

---

## TEE · CSMA/CD: detect a collision while transmitting

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/csma--cd/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/csma/cd

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** CSMA with Collision Detection monitors the medium during transmission, aborts a detected collision and retries after a randomized backoff.

**Simple meaning.** CD = takkar detect hui toh transmission rok do.

Swipe across the diagram to read its labels ↔

![CSMA/CD: sender must still be sending after a round trip](https://deep-learning-study-room.vercel.app/cn/fig/collision-roundtrip.42358ec7bf.svg)

Diagram: CSMA/CD: sender must still be sending after a round trip. Labels: CSMA/CD: sender must still be sending after a round trip | CSMA/CD: sender must still be sending after a round trip | Station A | Station B | Signal travels: Tp | Collision indication returns: Tp | Worst-case timing bound: Tframe ≥ 2Tp, so Lmin ≥ 2RTp

CSMA/CD: detect a collision while transmitting

## Understand it step by step

1. Sense the channel. In traditional shared half-duplex Ethernet, begin transmission when permitted by the access rule.
2. Continue monitoring while transmitting. If a collision is detected, send the collision/jam indication and abort the current frame.
3. Choose a random delay using binary exponential backoff; then attempt again subject to the access rules.
4. The sender must still be transmitting when a worst-case collision indication returns. Hence the ideal timing requirement is Tframe ≥ 2Tp.
5. Modern switched full-duplex Ethernet links do not use collision-based CSMA/CD access. Keep the historical/shared-medium assumptions explicit.



$$
T_{\mathrm{frame}}\geq 2T_p
$$





$$
L_{\min}\geq 2RT_p
$$



#### Practical example

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.

### Practice question. Explain CSMA/CD and the reason for a minimum frame size. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Detect karna hai toh sender tab tak bhej raha hona chahiye.

---

## TEE · Binary exponential backoff

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/csma--backoff/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/csma/backoff

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Binary exponential backoff enlarges the range of possible random waiting slots after repeated collisions, reducing the chance of the same stations colliding again.

**Simple meaning.** Collision zyada → random wait ka range bada.

## Understand it step by step

1. Let n be the collision count for the current frame. In classic Ethernet, use k=min(n,10).
2. Choose an integer K uniformly from 0 through 2ᵏ−1. Both endpoints belong to the range.
3. Wait K slot times before the permitted retry. A larger range does not force every station to wait longer; K may still be zero.
4. 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.



$$
k=\min(n,10),\qquad K\in\{0,1,\ldots,2^k-1\}
$$





$$
T_{\mathrm{backoff}}=K T_{\mathrm{slot}}
$$



#### Practical example

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.

### Practice question. Describe binary exponential backoff and give the possible K values after three collisions. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** 2ᵏ choices hain, isliye last value 2ᵏ−1.

---

## TEE · CSMA/CA: reduce collision risk before sending

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/csma--ca/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/csma/ca

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** 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.

**Simple meaning.** CA = pehle collision avoid karne ki koshish; guarantee nahi.

Swipe across the diagram to read its labels ↔

![CSMA/CA: optional reservation, data, acknowledgement](https://deep-learning-study-room.vercel.app/cn/fig/ca-sequence.566280e50f.svg)

Diagram: CSMA/CA: optional reservation, data, acknowledgement. Labels: CSMA/CA: optional reservation, data, acknowledgement | CSMA/CA: optional reservation, data, acknowledgement | Sender | Receiver | RTS (optional reservation) | CTS | DATA | ACK | Before data access: carrier sensing and a random backoff. | A busy medium freezes the eligible backoff countdown.

CSMA/CA: reduce collision risk before sending

## Understand it step by step

1. A wireless station senses the medium and follows the required interframe waiting and contention rules.
2. 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.
3. When its counter reaches zero, it transmits. A unicast receiver normally sends an ACK after successful reception. Missing ACK triggers retry logic.
4. 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.
5. Wireless stations cannot generally rely on Ethernet-style collision detection while transmitting. Collision avoidance does not eliminate all losses or collisions.

#### Practical example

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.

### Practice question. Explain CSMA/CA and distinguish it from CSMA/CD. [3 practice marks]

#### Answer

| Aspect | CSMA/CD | CSMA/CA |
| --- | --- | --- |
| Main action | Detect and abort a collision during sending | Reduce collision risk before sending |
| Typical teaching context | Shared half-duplex wired Ethernet | Wi-Fi contention access |
| Mechanisms | Carrier sensing, detection/jam, backoff | Carrier sensing, random backoff, ACK; optional RTS/CTS |

#### Practical example

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.

**Yaad rakho:** CD = detect during; CA = avoid before.

---

## TEE · Hidden terminals and RTS/CTS

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/csma--hidden/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/csma/hidden

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Hidden terminals are stations that cannot sense each other but whose transmissions can interfere at a common receiver.

**Simple meaning.** A aur C ek dusre ko nahi sunte, par dono B ko bhej rahe hain.

Swipe across the diagram to read its labels ↔

![Hidden terminals: A and C cannot sense each other](https://deep-learning-study-room.vercel.app/cn/fig/hidden-terminal.1ffcf794d5.svg)

Diagram: Hidden terminals: A and C cannot sense each other. Labels: Hidden terminals: A and C cannot sense each other | Hidden terminals: A and C cannot sense each other | A | B | C | Common receiver B hears both | B’s CTS can make a hidden sender defer. Collisions remain possible.

Hidden terminals and RTS/CTS

## Understand it step by step

1. Suppose A and C are outside each other’s sensing range, but B can receive both.
2. A senses no signal from C and may transmit; C may make the same decision. Their frames can collide at B.
3. 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.
4. RTS frames can themselves collide and wireless conditions still matter. Describe RTS/CTS as mitigation, not an absolute guarantee.

#### Practical example

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.

### Practice question. Explain the hidden-terminal problem and how RTS/CTS helps. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Hidden: senders invisible to each other, receiver common.

---

## TEE · Circuit, message and packet switching

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/switching--types/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/switching/types

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Switching selects how data passes through intermediate network nodes from a source to a destination.

**Simple meaning.** Raasta reserve karna, poora message ruk-ruk ke bhejna, ya chhote packets bhejna—yeh teen ideas hain.

Swipe across the diagram to read its labels ↔

![Three switching techniques: what is forwarded?](https://deep-learning-study-room.vercel.app/cn/fig/switching.2b51f856d9.svg)

Diagram: Three switching techniques: what is forwarded?. Labels: Three switching techniques: what is forwarded? | Three switching techniques: what is forwarded? | 1. Circuit: reserve a path, then stream data | Setup → reserved capacity → data transfer → release. | 2. Message: store the entire message at each node | Large forwarding unit; no packet-level pipeline. | 3. Packet: divide, then forward packet by packet | Shared links can simultaneously carry different packets.

Circuit, message and packet switching

## Understand it step by step

1. **Circuit switching:** establish a circuit, reserve resources, transfer data, then release the circuit. Capacity is dedicated even during a silent period.
2. **Message switching:** each intermediate node receives the entire message before forwarding it. Large messages require large buffers and can delay later messages.
3. **Packet switching:** divide data into smaller packets. Nodes forward packets individually; different links can carry successive packets at the same time.
4. 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.

| Aspect | Circuit switching | Message switching | Packet switching |
| --- | --- | --- | --- |
| Unit handled | Continuous stream on established circuit | Whole message | Small packets |
| Resource use | Capacity reserved along a circuit | Shared; message stored at each intermediate node | Shared; each packet stored/forwarded in this model |
| Setup | Required before data transfer | No circuit setup required | Datagram: no connection setup; virtual circuit: setup |
| Delay | Setup delay, then relatively predictable service | Large store-and-forward delay for long messages | Variable delay; packet pipeline can reduce completion time |
| Main limitation | Reserved capacity can be idle | Large buffers; unsuitable for tight delay needs | Headers, possible queueing/loss; datagrams may reorder |

#### Practical example

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.

### Practice question. Compare circuit, message and packet switching and recommend a method for bursty office data. [3 practice marks]

#### Answer

| Aspect | Circuit switching | Message switching | Packet switching |
| --- | --- | --- | --- |
| Unit handled | Continuous stream on established circuit | Whole message | Small packets |
| Resource use | Capacity reserved along a circuit | Shared; message stored at each intermediate node | Shared; each packet stored/forwarded in this model |
| Setup | Required before data transfer | No circuit setup required | Datagram: no connection setup; virtual circuit: setup |
| Delay | Setup delay, then relatively predictable service | Large store-and-forward delay for long messages | Variable delay; packet pipeline can reduce completion time |
| Main limitation | Reserved capacity can be idle | Large buffers; unsuitable for tight delay needs | Headers, possible queueing/loss; datagrams may reorder |

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.

#### Practical example

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.

**Yaad rakho:** Circuit reserves; message waits whole; packets pipeline.

---

## TEE · Datagram versus virtual-circuit packet switching

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/switching--datagram/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/switching/datagram

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Datagram switching routes each packet independently; virtual-circuit switching first establishes a logical path and forwarding state for a flow.

**Simple meaning.** Datagram mein har packet ka decision; virtual circuit mein pehle logical route set.

## Understand it step by step

1. In a datagram network, each packet carries enough destination information for independent forwarding. Packets may take different routes as forwarding conditions change.
2. In a virtual-circuit network, a setup phase establishes a logical path. Packets normally carry a short connection identifier meaningful to that network.
3. A virtual circuit is not automatically a physical dedicated circuit. Capacity can still be shared with other virtual circuits.
4. Ordering and service guarantees depend on the actual protocol. Do not assume that merely saying “virtual circuit” guarantees loss-free delivery.

#### Practical example

IP illustrates datagram service: a router forwards each received packet using its forwarding table. A textbook virtual-circuit example is an ATM connection.

### Practice question. Differentiate datagram and virtual-circuit packet switching. [3 practice marks]

#### Answer

| Feature | Datagram | Virtual circuit |
| --- | --- | --- |
| Setup | Usually none at network layer | Logical connection setup |
| Forwarding information | Destination address | Virtual-circuit identifier |
| Router state | No per-connection state required for basic IP forwarding | Connection/path state maintained |
| Path | May vary | Established logical path until changed |

#### Practical example

IP illustrates datagram service: a router forwards each received packet using its forwarding table. A textbook virtual-circuit example is an ATM connection.

**Yaad rakho:** Virtual circuit bhi packet switching ho sakta hai.

---

## TEE · IPv4 addresses: four octets, one 32-bit value

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv4--structure/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv4/structure

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** An IPv4 address is a 32-bit logical address, conventionally written as four decimal octets separated by dots.

**Simple meaning.** IP ke chaar boxes hain; har box 8 bits ka, value 0 se 255.

Swipe across the diagram to read its labels ↔

![IPv4 /26: 26 network bits and 6 host bits](https://deep-learning-study-room.vercel.app/cn/fig/ipv4-prefix.d99075bfca.svg)

Diagram: IPv4 /26: 26 network bits and 6 host bits. Labels: IPv4 /26: 26 network bits and 6 host bits | IPv4 /26: 26 network bits and 6 host bits | Octet 1 | 192 | Octet 2 | 168 | Octet 3 | 10 | Octet 4 | 77 | 8 bits 8 bits 8 bits 2 + 6 bits | 26 network bits | 6 host bits | The slash counts prefix bits, not octets or addresses.

IPv4 addresses: four octets, one 32-bit value

## Understand it step by step

1. An octet contains eight bits. Its smallest value is 00000000₂=0 and its largest is 11111111₂=255.
2. An address such as 192.168.10.77 has four octets. The dots are separators, not decimal points in a single decimal fraction.
3. 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.
4. 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.

#### Practical example

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.

### Practice question. Explain dotted-decimal IPv4 notation and the meaning of /26. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** 4 octets × 8 bits = 32; slash = network bits.

---

## TEE · Classful addressing: historical default boundaries

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv4--classes/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv4/classes

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Classful addressing divides the IPv4 address space into historical classes with fixed default network boundaries for Classes A, B and C.

**Simple meaning.** Class first octet se; modern subnet given slash se.

## Understand it step by step

1. 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.
2. Class D addresses identify multicast groups; Class E is reserved/experimental space rather than an ordinary unicast class.
3. Not all numerically class-shaped addresses can be assigned to normal hosts. For example, 127/8 is loopback and 0/8 has special meanings.
4. In a classless question, use the stated /p. An address that looks Class C can be part of a /26 subnet.

| Class | First octet | Default / purpose |
| --- | --- | --- |
| A | 0–127; ordinary historical assignments 1–126 | /8; special ranges exist |
| B | 128–191 | /16 |
| C | 192–223 | /24 |
| D | 224–239 | Multicast |
| E | 240–255 | Reserved/experimental; special addresses exist |

#### Practical example

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.

### Practice question. State the default prefixes of Classes A, B and C and explain their relation to CIDR. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Class pehchaan sakte ho; calculation mein given slash follow karo.

---

## TEE · Private, loopback and special IPv4 addresses

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv4--special/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv4/special

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Private IPv4 ranges are address blocks reserved for use within private networks rather than ordinary public Internet routing.

**Simple meaning.** Private IP ghar/college ke andar reuse ho sakta hai; globally unique public IP jaisa treat mat karo.

## Understand it step by step

1. 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.
2. 127.0.0.0/8 is loopback; 127.0.0.1 commonly refers to the local host itself.
3. 169.254.0.0/16 is IPv4 link-local space. It is not one of the three RFC 1918 private blocks.
4. 255.255.255.255 is a limited broadcast address. A subnet-directed broadcast has all its host bits set to 1.
5. 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.

#### Practical example

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.

### Practice question. List the three private IPv4 address ranges and give an example. [3 practice marks]

#### Answer

| Prefix | Range |
| --- | --- |
| 10.0.0.0/8 | 10.0.0.0–10.255.255.255 |
| 172.16.0.0/12 | 172.16.0.0–172.31.255.255 |
| 192.168.0.0/16 | 192.168.0.0–192.168.255.255 |

For example, 192.168.1.10 can be used in a private LAN.

#### Practical example

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.

**Yaad rakho:** 10 full; 172 only 16–31; 192.168 full.

---

## TEE · Subnet masks: 1 keeps a network bit; 0 marks a host bit

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv4--mask/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv4/mask

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** A subnet mask is a 32-bit value with contiguous leading 1s for network-prefix positions and trailing 0s for host positions.

**Simple meaning.** Mask mein 1 = network part rakhna; 0 = host part zero karna.

Swipe across the diagram to read its labels ↔

![Bitwise AND: 77 AND 192 = 64](https://deep-learning-study-room.vercel.app/cn/fig/mask-and.3b9a8ff9ea.svg)

Diagram: Bitwise AND: 77 AND 192 = 64. Labels: Bitwise AND: 77 AND 192 = 64 | Bitwise AND: 77 AND 192 = 64 | IP octet 77 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | Mask octet 192 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | Network octet 64 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | Only 1 AND 1 produces 1. Every host position becomes 0.

Subnet masks: 1 keeps a network bit; 0 marks a host bit

## Understand it step by step

1. For /26, write 26 ones followed by 6 zeroes: 11111111.11111111.11111111.11000000.
2. Convert each octet: 255.255.255.(128+64)=255.255.255.192.
3. Bitwise AND operates on matching bit positions. Only 1 AND 1 equals 1; all other combinations equal 0.
4. Applying address AND mask keeps the network prefix and clears the host bits. This gives the first/network address of the block.

| A | B | A AND B |
| --- | --- | --- |
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |



$$
\text{Network address}=\text{IP address AND subnet mask}
$$



#### Practical example

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.

### Practice question. How does a subnet mask determine the network address? [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** AND: dono 1 ho tabhi output 1.

---

## TEE · Prefix to mask · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv4--mask-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv4/mask-1

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. Convert /26 into a dotted-decimal subnet mask. State host bits and total address count. [3 practice marks]

#### Answer

## Given

Prefix length p=26.

## To find

Mask, h and N.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$



A prefix contains p leading ones; total combinations depend on the remaining host bits.

## Step-by-step solution

#### Step 1. Write the bits

26 ones followed by 6 zeroes: `11111111.11111111.11111111.11000000`.

#### Step 2. Convert every octet

| Mask bits | Decimal |
| --- | --- |
| 11111111 | 255 |
| 11111111 | 255 |
| 11111111 | 255 |
| 11000000 | 192 |

#### Step 3. Calculate host positions

h=32−26=6.

#### Step 4. Count total addresses

N=26=64.

**Final answer:** Mask=255.255.255.192; host bits=6; total addresses=64.

#### What this result means

The mask tells which bits belong to the network; the last mask octet is not the number of hosts.

---

## TEE · Prefix to mask · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv4--mask-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv4/mask-2

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. Convert /20 into a dotted-decimal subnet mask. State host bits and total address count. [3 practice marks]

#### Answer

## Given

Prefix length p=20.

## To find

Mask, h and N.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$



A prefix contains p leading ones; total combinations depend on the remaining host bits.

## Step-by-step solution

#### Step 1. Write the bits

20 ones followed by 12 zeroes: `11111111.11111111.11110000.00000000`.

#### Step 2. Convert every octet

| Mask bits | Decimal |
| --- | --- |
| 11111111 | 255 |
| 11111111 | 255 |
| 11110000 | 240 |
| 00000000 | 0 |

#### Step 3. Calculate host positions

h=32−20=12.

#### Step 4. Count total addresses

N=212=4,096.

**Final answer:** Mask=255.255.240.0; host bits=12; total addresses=4,096.

#### What this result means

The mask tells which bits belong to the network; the last mask octet is not the number of hosts.

---

## TEE · Prefix to mask · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv4--mask-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv4/mask-3

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. Convert /27 into a dotted-decimal subnet mask. State host bits and total address count. [3 practice marks]

#### Answer

## Given

Prefix length p=27.

## To find

Mask, h and N.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$



A prefix contains p leading ones; total combinations depend on the remaining host bits.

## Step-by-step solution

#### Step 1. Write the bits

27 ones followed by 5 zeroes: `11111111.11111111.11111111.11100000`.

#### Step 2. Convert every octet

| Mask bits | Decimal |
| --- | --- |
| 11111111 | 255 |
| 11111111 | 255 |
| 11111111 | 255 |
| 11100000 | 224 |

#### Step 3. Calculate host positions

h=32−27=5.

#### Step 4. Count total addresses

N=25=32.

**Final answer:** Mask=255.255.255.224; host bits=5; total addresses=32.

#### What this result means

The mask tells which bits belong to the network; the last mask octet is not the number of hosts.

---

## TEE · Prefix to mask · example 4

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv4--mask-4/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv4/mask-4

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. Convert /23 into a dotted-decimal subnet mask. State host bits and total address count. [3 practice marks]

#### Answer

## Given

Prefix length p=23.

## To find

Mask, h and N.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$



A prefix contains p leading ones; total combinations depend on the remaining host bits.

## Step-by-step solution

#### Step 1. Write the bits

23 ones followed by 9 zeroes: `11111111.11111111.11111110.00000000`.

#### Step 2. Convert every octet

| Mask bits | Decimal |
| --- | --- |
| 11111111 | 255 |
| 11111111 | 255 |
| 11111110 | 254 |
| 00000000 | 0 |

#### Step 3. Calculate host positions

h=32−23=9.

#### Step 4. Count total addresses

N=29=512.

**Final answer:** Mask=255.255.254.0; host bits=9; total addresses=512.

#### What this result means

The mask tells which bits belong to the network; the last mask octet is not the number of hosts.

---

## TEE · One method for every ordinary IPv4 block question

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/subnets--method/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/subnets/method

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** 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.

**Simple meaning.** Pehle block nikalo; phir first aur last. Uske baad hosts.

Swipe across the diagram to read its labels ↔

![A /24 split into four /26 blocks](https://deep-learning-study-room.vercel.app/cn/fig/subnet-blocks.67a24f46fc.svg)

Diagram: A /24 split into four /26 blocks. Labels: A /24 split into four /26 blocks | A /24 split into four /26 blocks | 1. /26 | First: .0 Last: .63 | Usable: .1 to .62 | 2. /26 | First: .64 Last: .127 | Usable: .65 to .126 | 3. /26 | First: .128 Last: .191 | Usable: .129 to .190 | 4. /26 | First: .192 Last: .255 | Usable: .193 to .254 | Each block: 64 total addresses; 62 ordinary usable hosts. | An address ending in .77 belongs to the .64–.127 block.

One method for every ordinary IPv4 block question

## Understand it step by step

1. Read /p. Host bits h=32−p. Total addresses N=2ʰ, not N−2.
2. Build the mask. Find the first octet that is not 255; block step there is 256−that mask octet.
3. Round that address octet down to a multiple of the step. Preserve preceding octets and set later octets to 0 for the network address.
4. 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.
5. 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.



$$
N=2^{32-p}
$$





$$
\text{block step}=256-\text{changing mask octet}
$$





$$
\text{ordinary usable hosts}=2^h-2
$$



#### Practical example

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.

### Practice question. Distinguish total addresses from usable host addresses in a /26 subnet. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Total mein sab count; usable mein boundary ke 2 minus.

---

## TEE · Complete block · 192.168.10.77/26

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/subnets--block-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/subnets/block-1

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. For the IPv4 address 192.168.10.77/26, determine the mask, network address, broadcast address, total addresses and usable host range. [3 practice marks]

#### Answer

## Given

IP/prefix = `192.168.10.77/26`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−26=6; N=26=64.

#### Step 2. Construct the mask

Mask=`255.255.255.192`; binary=`11111111.11111111.11111111.11000000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 77 lies in 64…127.

#### Step 4. Form the first/network address

Keep earlier octets; place 64 in octet 4; set any later octets to zero. Network=**192.168.10.64**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 11000000 | 11111111 | 11000000 | 192 |
| 2 | 10101000 | 11111111 | 10101000 | 168 |
| 3 | 00001010 | 11111111 | 00001010 | 10 |
| 4 | 01001101 | 11000000 | 01000000 | 64 |

#### Step 6. Form the last/broadcast address

Use 127 in the changing octet and 255 in any later octets. Broadcast=**192.168.10.127**.

#### Step 7. State usable hosts

First usable=192.168.10.65; last usable=192.168.10.126; count=64−2=62.

**Final answer:** Network 192.168.10.64; broadcast 192.168.10.127; 64 total, 62 ordinary usable; range 192.168.10.65–192.168.10.126.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## TEE · Complete block · 200.140.64.48/26

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/subnets--block-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/subnets/block-2

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. For the IPv4 address 200.140.64.48/26, determine the mask, network address, broadcast address, total addresses and usable host range. [3 practice marks]

#### Answer

## Given

IP/prefix = `200.140.64.48/26`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−26=6; N=26=64.

#### Step 2. Construct the mask

Mask=`255.255.255.192`; binary=`11111111.11111111.11111111.11000000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 48 lies in 0…63.

#### Step 4. Form the first/network address

Keep earlier octets; place 0 in octet 4; set any later octets to zero. Network=**200.140.64.0**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 11001000 | 11111111 | 11001000 | 200 |
| 2 | 10001100 | 11111111 | 10001100 | 140 |
| 3 | 01000000 | 11111111 | 01000000 | 64 |
| 4 | 00110000 | 11000000 | 00000000 | 0 |

#### Step 6. Form the last/broadcast address

Use 63 in the changing octet and 255 in any later octets. Broadcast=**200.140.64.63**.

#### Step 7. State usable hosts

First usable=200.140.64.1; last usable=200.140.64.62; count=64−2=62.

**Final answer:** Network 200.140.64.0; broadcast 200.140.64.63; 64 total, 62 ordinary usable; range 200.140.64.1–200.140.64.62.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## TEE · Complete block · 193.20.35.40/26

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/subnets--block-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/subnets/block-3

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. For the IPv4 address 193.20.35.40/26, determine the mask, network address, broadcast address, total addresses and usable host range. [3 practice marks]

#### Answer

## Given

IP/prefix = `193.20.35.40/26`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−26=6; N=26=64.

#### Step 2. Construct the mask

Mask=`255.255.255.192`; binary=`11111111.11111111.11111111.11000000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 40 lies in 0…63.

#### Step 4. Form the first/network address

Keep earlier octets; place 0 in octet 4; set any later octets to zero. Network=**193.20.35.0**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 11000001 | 11111111 | 11000001 | 193 |
| 2 | 00010100 | 11111111 | 00010100 | 20 |
| 3 | 00100011 | 11111111 | 00100011 | 35 |
| 4 | 00101000 | 11000000 | 00000000 | 0 |

#### Step 6. Form the last/broadcast address

Use 63 in the changing octet and 255 in any later octets. Broadcast=**193.20.35.63**.

#### Step 7. State usable hosts

First usable=193.20.35.1; last usable=193.20.35.62; count=64−2=62.

**Final answer:** Network 193.20.35.0; broadcast 193.20.35.63; 64 total, 62 ordinary usable; range 193.20.35.1–193.20.35.62.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## TEE · Complete block · 192.168.1.150/27

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/subnets--block-4/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/subnets/block-4

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. For the IPv4 address 192.168.1.150/27, determine the mask, network address, broadcast address, total addresses and usable host range. [3 practice marks]

#### Answer

## Given

IP/prefix = `192.168.1.150/27`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−27=5; N=25=32.

#### Step 2. Construct the mask

Mask=`255.255.255.224`; binary=`11111111.11111111.11111111.11100000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 224, so step=256−224=32. The IP value 150 lies in 128…159.

#### Step 4. Form the first/network address

Keep earlier octets; place 128 in octet 4; set any later octets to zero. Network=**192.168.1.128**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 11000000 | 11111111 | 11000000 | 192 |
| 2 | 10101000 | 11111111 | 10101000 | 168 |
| 3 | 00000001 | 11111111 | 00000001 | 1 |
| 4 | 10010110 | 11100000 | 10000000 | 128 |

#### Step 6. Form the last/broadcast address

Use 159 in the changing octet and 255 in any later octets. Broadcast=**192.168.1.159**.

#### Step 7. State usable hosts

First usable=192.168.1.129; last usable=192.168.1.158; count=32−2=30.

**Final answer:** Network 192.168.1.128; broadcast 192.168.1.159; 32 total, 30 ordinary usable; range 192.168.1.129–192.168.1.158.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## TEE · Complete block · 10.4.9.55/28

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/subnets--block-5/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/subnets/block-5

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. For the IPv4 address 10.4.9.55/28, determine the mask, network address, broadcast address, total addresses and usable host range. [3 practice marks]

#### Answer

## Given

IP/prefix = `10.4.9.55/28`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−28=4; N=24=16.

#### Step 2. Construct the mask

Mask=`255.255.255.240`; binary=`11111111.11111111.11111111.11110000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 240, so step=256−240=16. The IP value 55 lies in 48…63.

#### Step 4. Form the first/network address

Keep earlier octets; place 48 in octet 4; set any later octets to zero. Network=**10.4.9.48**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 00001010 | 11111111 | 00001010 | 10 |
| 2 | 00000100 | 11111111 | 00000100 | 4 |
| 3 | 00001001 | 11111111 | 00001001 | 9 |
| 4 | 00110111 | 11110000 | 00110000 | 48 |

#### Step 6. Form the last/broadcast address

Use 63 in the changing octet and 255 in any later octets. Broadcast=**10.4.9.63**.

#### Step 7. State usable hosts

First usable=10.4.9.49; last usable=10.4.9.62; count=16−2=14.

**Final answer:** Network 10.4.9.48; broadcast 10.4.9.63; 16 total, 14 ordinary usable; range 10.4.9.49–10.4.9.62.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## TEE · Complete block · 172.16.35.123/20

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/subnets--block-6/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/subnets/block-6

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. For the IPv4 address 172.16.35.123/20, determine the mask, network address, broadcast address, total addresses and usable host range. [3 practice marks]

#### Answer

## Given

IP/prefix = `172.16.35.123/20`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−20=12; N=212=4,096.

#### Step 2. Construct the mask

Mask=`255.255.240.0`; binary=`11111111.11111111.11110000.00000000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 3. Its mask value is 240, so step=256−240=16. The IP value 35 lies in 32…47.

#### Step 4. Form the first/network address

Keep earlier octets; place 32 in octet 3; set any later octets to zero. Network=**172.16.32.0**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 10101100 | 11111111 | 10101100 | 172 |
| 2 | 00010000 | 11111111 | 00010000 | 16 |
| 3 | 00100011 | 11110000 | 00100000 | 32 |
| 4 | 01111011 | 00000000 | 00000000 | 0 |

#### Step 6. Form the last/broadcast address

Use 47 in the changing octet and 255 in any later octets. Broadcast=**172.16.47.255**.

#### Step 7. State usable hosts

First usable=172.16.32.1; last usable=172.16.47.254; count=4096−2=4094.

**Final answer:** 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.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## TEE · Complete block · 10.20.5.130/23

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/subnets--block-7/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/subnets/block-7

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. For the IPv4 address 10.20.5.130/23, determine the mask, network address, broadcast address, total addresses and usable host range. [3 practice marks]

#### Answer

## Given

IP/prefix = `10.20.5.130/23`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−23=9; N=29=512.

#### Step 2. Construct the mask

Mask=`255.255.254.0`; binary=`11111111.11111111.11111110.00000000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 3. Its mask value is 254, so step=256−254=2. The IP value 5 lies in 4…5.

#### Step 4. Form the first/network address

Keep earlier octets; place 4 in octet 3; set any later octets to zero. Network=**10.20.4.0**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 00001010 | 11111111 | 00001010 | 10 |
| 2 | 00010100 | 11111111 | 00010100 | 20 |
| 3 | 00000101 | 11111110 | 00000100 | 4 |
| 4 | 10000010 | 00000000 | 00000000 | 0 |

#### Step 6. Form the last/broadcast address

Use 5 in the changing octet and 255 in any later octets. Broadcast=**10.20.5.255**.

#### Step 7. State usable hosts

First usable=10.20.4.1; last usable=10.20.5.254; count=512−2=510.

**Final answer:** Network 10.20.4.0; broadcast 10.20.5.255; 512 total, 510 ordinary usable; range 10.20.4.1–10.20.5.254.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## TEE · Complete block · 192.168.2.129/25

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/subnets--block-8/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/subnets/block-8

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. For the IPv4 address 192.168.2.129/25, determine the mask, network address, broadcast address, total addresses and usable host range. [3 practice marks]

#### Answer

## Given

IP/prefix = `192.168.2.129/25`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−25=7; N=27=128.

#### Step 2. Construct the mask

Mask=`255.255.255.128`; binary=`11111111.11111111.11111111.10000000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 128, so step=256−128=128. The IP value 129 lies in 128…255.

#### Step 4. Form the first/network address

Keep earlier octets; place 128 in octet 4; set any later octets to zero. Network=**192.168.2.128**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 11000000 | 11111111 | 11000000 | 192 |
| 2 | 10101000 | 11111111 | 10101000 | 168 |
| 3 | 00000010 | 11111111 | 00000010 | 2 |
| 4 | 10000001 | 10000000 | 10000000 | 128 |

#### Step 6. Form the last/broadcast address

Use 255 in the changing octet and 255 in any later octets. Broadcast=**192.168.2.255**.

#### Step 7. State usable hosts

First usable=192.168.2.129; last usable=192.168.2.254; count=128−2=126.

**Final answer:** Network 192.168.2.128; broadcast 192.168.2.255; 128 total, 126 ordinary usable; range 192.168.2.129–192.168.2.254.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## TEE · Complete block · 192.0.2.6/30

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/subnets--block-9/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/subnets/block-9

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. For the IPv4 address 192.0.2.6/30, determine the mask, network address, broadcast address, total addresses and usable host range. [3 practice marks]

#### Answer

## Given

IP/prefix = `192.0.2.6/30`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−30=2; N=22=4.

#### Step 2. Construct the mask

Mask=`255.255.255.252`; binary=`11111111.11111111.11111111.11111100`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 252, so step=256−252=4. The IP value 6 lies in 4…7.

#### Step 4. Form the first/network address

Keep earlier octets; place 4 in octet 4; set any later octets to zero. Network=**192.0.2.4**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 11000000 | 11111111 | 11000000 | 192 |
| 2 | 00000000 | 11111111 | 00000000 | 0 |
| 3 | 00000010 | 11111111 | 00000010 | 2 |
| 4 | 00000110 | 11111100 | 00000100 | 4 |

#### Step 6. Form the last/broadcast address

Use 7 in the changing octet and 255 in any later octets. Broadcast=**192.0.2.7**.

#### Step 7. State usable hosts

First usable=192.0.2.5; last usable=192.0.2.6; count=4−2=2.

**Final answer:** Network 192.0.2.4; broadcast 192.0.2.7; 4 total, 2 ordinary usable; range 192.0.2.5–192.0.2.6.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## TEE · Why /31 and /32 do not use the ordinary minus-two rule

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/subnets--exceptions/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/subnets/exceptions

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** 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.

**Simple meaning.** Minus 2 har slash pe blindly mat lagao.

## Understand it step by step

1. Ordinary subnet questions reserve the all-zero and all-one host patterns, giving 2ʰ−2 usable hosts.
2. 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.
3. A /32 contains exactly one address. It is useful for identifying a specific interface/host route; it is not a multi-host broadcast subnet.

#### Practical example

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.

### Practice question. Explain why subtracting two usable addresses is inappropriate for a /31 point-to-point link. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** /31 special link; /32 single address.

---

## TEE · Hosts to prefix · 25 hosts

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/subnets--hosts-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/subnets/hosts-1

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. Choose the smallest ordinary IPv4 subnet supporting at least 25 usable hosts. Find prefix, mask and unused usable capacity. [3 practice marks]

#### Answer

## Given

Required usable hosts H=25.

## To find

The smallest sufficient subnet, expressed as /p and mask.

## Formula and why



$$
2^h-2\geq H,\qquad p=32-h
$$



Host demand excludes network and broadcast, so use the usable-host inequality. Choose the smallest h that satisfies it.

## Step-by-step solution

#### Step 1. Test the previous smaller power

With h=4, usable=24−2=14, which is less than 25.

#### Step 2. Test the next power

With h=5, usable=25−2=30, which is sufficient.

#### Step 3. Convert host bits to prefix

p=32−5=27; mask=255.255.255.224.

#### Step 4. Count spare usable addresses

30−25=5.

**Final answer:** /27, mask 255.255.255.224; 30 usable, 5 spare usable addresses.

#### What this result means

A requirement of 64 usable hosts cannot fit into a 64-total-address block: only 62 would be usable.

---

## TEE · Hosts to prefix · 64 hosts

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/subnets--hosts-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/subnets/hosts-2

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. Choose the smallest ordinary IPv4 subnet supporting at least 64 usable hosts. Find prefix, mask and unused usable capacity. [3 practice marks]

#### Answer

## Given

Required usable hosts H=64.

## To find

The smallest sufficient subnet, expressed as /p and mask.

## Formula and why



$$
2^h-2\geq H,\qquad p=32-h
$$



Host demand excludes network and broadcast, so use the usable-host inequality. Choose the smallest h that satisfies it.

## Step-by-step solution

#### Step 1. Test the previous smaller power

With h=6, usable=26−2=62, which is less than 64.

#### Step 2. Test the next power

With h=7, usable=27−2=126, which is sufficient.

#### Step 3. Convert host bits to prefix

p=32−7=25; mask=255.255.255.128.

#### Step 4. Count spare usable addresses

126−64=62.

**Final answer:** /25, mask 255.255.255.128; 126 usable, 62 spare usable addresses.

#### What this result means

A requirement of 64 usable hosts cannot fit into a 64-total-address block: only 62 would be usable.

---

## TEE · Hosts to prefix · 1000 hosts

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/subnets--hosts-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/subnets/hosts-3

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. Choose the smallest ordinary IPv4 subnet supporting at least 1000 usable hosts. Find prefix, mask and unused usable capacity. [3 practice marks]

#### Answer

## Given

Required usable hosts H=1000.

## To find

The smallest sufficient subnet, expressed as /p and mask.

## Formula and why



$$
2^h-2\geq H,\qquad p=32-h
$$



Host demand excludes network and broadcast, so use the usable-host inequality. Choose the smallest h that satisfies it.

## Step-by-step solution

#### Step 1. Test the previous smaller power

With h=9, usable=29−2=510, which is less than 1000.

#### Step 2. Test the next power

With h=10, usable=210−2=1022, which is sufficient.

#### Step 3. Convert host bits to prefix

p=32−10=22; mask=255.255.252.0.

#### Step 4. Count spare usable addresses

1022−1000=22.

**Final answer:** /22, mask 255.255.252.0; 1022 usable, 22 spare usable addresses.

#### What this result means

A requirement of 64 usable hosts cannot fit into a 64-total-address block: only 62 would be usable.

---

## TEE · Equal-size subnet design · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/subnets--split-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/subnets/split-1

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

Parent=192.168.8.0/24; required equal-size subnets=4.

## To find

Borrowed bits, new mask/prefix and complete subnet ranges.

## Formula and why



$$
2^s\geq N_{\mathrm{subnets}}
$$





$$
p_{\mathrm{new}}=p_{\mathrm{old}}+s
$$



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.

## Step-by-step solution

#### Step 1. Choose borrowed bits

s=2, because 22=4 is the smallest power of two at least 4.

#### Step 2. Find the new prefix and size

/24+2=/26; mask=255.255.255.192. Each subnet contains 64 total and 62 usable addresses.

#### Step 3. List each subnet

| Subnet | First/network | Last/broadcast | Usable range |
| --- | --- | --- | --- |
| 192.168.8.0/26 | 192.168.8.0 | 192.168.8.63 | 192.168.8.1–192.168.8.62 |
| 192.168.8.64/26 | 192.168.8.64 | 192.168.8.127 | 192.168.8.65–192.168.8.126 |
| 192.168.8.128/26 | 192.168.8.128 | 192.168.8.191 | 192.168.8.129–192.168.8.190 |
| 192.168.8.192/26 | 192.168.8.192 | 192.168.8.255 | 192.168.8.193–192.168.8.254 |

#### Step 4. State spare subnet capacity

4 available−4 required=0 extra equal-size subnet(s).

**Final answer:** /26; 4 subnets; 62 usable hosts each.

#### What this result means

Borrowing more network bits creates more but smaller subnets.

---

## TEE · Equal-size subnet design · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/subnets--split-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/subnets/split-2

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

Parent=172.16.0.0/16; required equal-size subnets=8.

## To find

Borrowed bits, new mask/prefix and complete subnet ranges.

## Formula and why



$$
2^s\geq N_{\mathrm{subnets}}
$$





$$
p_{\mathrm{new}}=p_{\mathrm{old}}+s
$$



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.

## Step-by-step solution

#### Step 1. Choose borrowed bits

s=3, because 23=8 is the smallest power of two at least 8.

#### Step 2. Find the new prefix and size

/16+3=/19; mask=255.255.224.0. Each subnet contains 8192 total and 8190 usable addresses.

#### Step 3. List each subnet

| Subnet | First/network | Last/broadcast | Usable range |
| --- | --- | --- | --- |
| 172.16.0.0/19 | 172.16.0.0 | 172.16.31.255 | 172.16.0.1–172.16.31.254 |
| 172.16.32.0/19 | 172.16.32.0 | 172.16.63.255 | 172.16.32.1–172.16.63.254 |
| 172.16.64.0/19 | 172.16.64.0 | 172.16.95.255 | 172.16.64.1–172.16.95.254 |
| 172.16.96.0/19 | 172.16.96.0 | 172.16.127.255 | 172.16.96.1–172.16.127.254 |
| 172.16.128.0/19 | 172.16.128.0 | 172.16.159.255 | 172.16.128.1–172.16.159.254 |
| 172.16.160.0/19 | 172.16.160.0 | 172.16.191.255 | 172.16.160.1–172.16.191.254 |
| 172.16.192.0/19 | 172.16.192.0 | 172.16.223.255 | 172.16.192.1–172.16.223.254 |
| 172.16.224.0/19 | 172.16.224.0 | 172.16.255.255 | 172.16.224.1–172.16.255.254 |

#### Step 4. State spare subnet capacity

8 available−8 required=0 extra equal-size subnet(s).

**Final answer:** /19; 8 subnets; 8190 usable hosts each.

#### What this result means

Borrowing more network bits creates more but smaller subnets.

---

## TEE · Equal-size subnet design · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/subnets--split-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/subnets/split-3

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

Parent=10.0.0.0/24; required equal-size subnets=6.

## To find

Borrowed bits, new mask/prefix and complete subnet ranges.

## Formula and why



$$
2^s\geq N_{\mathrm{subnets}}
$$





$$
p_{\mathrm{new}}=p_{\mathrm{old}}+s
$$



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.

## Step-by-step solution

#### Step 1. Choose borrowed bits

s=3, because 23=8 is the smallest power of two at least 6.

#### Step 2. Find the new prefix and size

/24+3=/27; mask=255.255.255.224. Each subnet contains 32 total and 30 usable addresses.

#### Step 3. List each subnet

| Subnet | First/network | Last/broadcast | Usable range |
| --- | --- | --- | --- |
| 10.0.0.0/27 | 10.0.0.0 | 10.0.0.31 | 10.0.0.1–10.0.0.30 |
| 10.0.0.32/27 | 10.0.0.32 | 10.0.0.63 | 10.0.0.33–10.0.0.62 |
| 10.0.0.64/27 | 10.0.0.64 | 10.0.0.95 | 10.0.0.65–10.0.0.94 |
| 10.0.0.96/27 | 10.0.0.96 | 10.0.0.127 | 10.0.0.97–10.0.0.126 |
| 10.0.0.128/27 | 10.0.0.128 | 10.0.0.159 | 10.0.0.129–10.0.0.158 |
| 10.0.0.160/27 | 10.0.0.160 | 10.0.0.191 | 10.0.0.161–10.0.0.190 |
| 10.0.0.192/27 | 10.0.0.192 | 10.0.0.223 | 10.0.0.193–10.0.0.222 |
| 10.0.0.224/27 | 10.0.0.224 | 10.0.0.255 | 10.0.0.225–10.0.0.254 |

#### Step 4. State spare subnet capacity

8 available−6 required=2 extra equal-size subnet(s).

**Final answer:** /27; 8 subnets; 30 usable hosts each.

#### What this result means

Borrowing more network bits creates more but smaller subnets.

---

## TEE · CIDR and VLSM: two related but different ideas

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/cidr--meaning/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/cidr/meaning

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** CIDR expresses address blocks using an explicit prefix length; VLSM uses different subnet prefix lengths to match different size requirements within an allocated block.

**Simple meaning.** CIDR = slash se block; VLSM = departments ko need ke hisaab se different block sizes.

## Understand it step by step

1. 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.
2. The prefix gives contiguous network bits. A noncontiguous mask such as 255.0.255.0 is not a normal CIDR prefix mask.
3. VLSM avoids making every department as large as the largest one. Allocate larger requirements first, then fit smaller aligned blocks into remaining space.
4. Distinguish **addresses** from **usable hosts**. A lab requiring 128 total addresses gets /25; a lab requiring 128 ordinary usable hosts needs /24.

#### Practical example

A department with 100 hosts can receive /25, while one with 10 hosts can receive /28. Giving both /25 would leave more unused addresses.

### Practice question. Explain CIDR and the advantage of VLSM. [3 practice marks]

#### Answer

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.

#### Practical example

A department with 100 hosts can receive /25, while one with 10 hosts can receive /28. Giving both /25 would leave more unused addresses.

**Yaad rakho:** Hosts bola toh +2 allowance; addresses bola toh total count directly.

---

## TEE · Complete VLSM allocation · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/cidr--vlsm-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/cidr/vlsm-1

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

| Department | Usable hosts |
| --- | --- |
| A | 100 |
| B | 50 |
| C | 25 |
| D | 10 |

## To find

An aligned subnet for each department, usable ranges, broadcasts and remaining addresses.

## Formula and why



$$
2^h-2\geq H,\quad p=32-h
$$



Choose the smallest sufficient subnet per requirement. Align each start to its block size and never overlap a previously assigned range.

## Step-by-step solution

#### Step 1. Sort the host requirements

A (100) → B (50) → C (25) → D (10)

#### Step 2. A · choose and allocate

100 hosts require 27−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.

#### Step 3. B · choose and allocate

50 hosts require 26−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.

#### Step 4. C · choose and allocate

25 hosts require 25−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.

#### Step 5. D · choose and allocate

10 hosts require 24−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.

#### Step 6. Write the complete allocation

| Group | Hosts | Network/prefix | Mask | Usable range | Broadcast | Spare usable |
| --- | --- | --- | --- | --- | --- | --- |
| A | 100 | 192.168.10.0/25 | 255.255.255.128 | 192.168.10.1–192.168.10.126 | 192.168.10.127 | 26 |
| B | 50 | 192.168.10.128/26 | 255.255.255.192 | 192.168.10.129–192.168.10.190 | 192.168.10.191 | 12 |
| C | 25 | 192.168.10.192/27 | 255.255.255.224 | 192.168.10.193–192.168.10.222 | 192.168.10.223 | 5 |
| D | 10 | 192.168.10.224/28 | 255.255.255.240 | 192.168.10.225–192.168.10.238 | 192.168.10.239 | 4 |

#### Step 7. Count addresses reserved and left

Reserved=128+64+32+16=240. Parent total=256. Unallocated=256−240=16.

**Final answer:** 240 total addresses reserved; 16 unallocated. The table gives one valid complete allocation.

#### What this result means

Unused usable capacity inside assigned subnets is different from unallocated address space outside those subnets.

---

## TEE · Complete VLSM allocation · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/cidr--vlsm-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/cidr/vlsm-2

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

| Department | Usable hosts |
| --- | --- |
| Research | 60 |
| Admin | 25 |
| IoT | 12 |

## To find

An aligned subnet for each department, usable ranges, broadcasts and remaining addresses.

## Formula and why



$$
2^h-2\geq H,\quad p=32-h
$$



Choose the smallest sufficient subnet per requirement. Align each start to its block size and never overlap a previously assigned range.

## Step-by-step solution

#### Step 1. Sort the host requirements

Research (60) → Admin (25) → IoT (12)

#### Step 2. Research · choose and allocate

60 hosts require 26−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.

#### Step 3. Admin · choose and allocate

25 hosts require 25−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.

#### Step 4. IoT · choose and allocate

12 hosts require 24−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.

#### Step 5. Write the complete allocation

| Group | Hosts | Network/prefix | Mask | Usable range | Broadcast | Spare usable |
| --- | --- | --- | --- | --- | --- | --- |
| Research | 60 | 10.0.0.0/26 | 255.255.255.192 | 10.0.0.1–10.0.0.62 | 10.0.0.63 | 2 |
| Admin | 25 | 10.0.0.64/27 | 255.255.255.224 | 10.0.0.65–10.0.0.94 | 10.0.0.95 | 5 |
| IoT | 12 | 10.0.0.96/28 | 255.255.255.240 | 10.0.0.97–10.0.0.110 | 10.0.0.111 | 2 |

#### Step 6. Count addresses reserved and left

Reserved=64+32+16=112. Parent total=256. Unallocated=256−112=144.

**Final answer:** 112 total addresses reserved; 144 unallocated. The table gives one valid complete allocation.

#### What this result means

Unused usable capacity inside assigned subnets is different from unallocated address space outside those subnets.

---

## TEE · Complete VLSM allocation · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/cidr--vlsm-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/cidr/vlsm-3

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

| Department | Usable hosts |
| --- | --- |
| Lab | 200 |
| Staff | 100 |
| Guests | 50 |

## To find

An aligned subnet for each department, usable ranges, broadcasts and remaining addresses.

## Formula and why



$$
2^h-2\geq H,\quad p=32-h
$$



Choose the smallest sufficient subnet per requirement. Align each start to its block size and never overlap a previously assigned range.

## Step-by-step solution

#### Step 1. Sort the host requirements

Lab (200) → Staff (100) → Guests (50)

#### Step 2. Lab · choose and allocate

200 hosts require 28−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.

#### Step 3. Staff · choose and allocate

100 hosts require 27−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.

#### Step 4. Guests · choose and allocate

50 hosts require 26−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.

#### Step 5. Write the complete allocation

| Group | Hosts | Network/prefix | Mask | Usable range | Broadcast | Spare usable |
| --- | --- | --- | --- | --- | --- | --- |
| Lab | 200 | 172.16.8.0/24 | 255.255.255.0 | 172.16.8.1–172.16.8.254 | 172.16.8.255 | 54 |
| Staff | 100 | 172.16.9.0/25 | 255.255.255.128 | 172.16.9.1–172.16.9.126 | 172.16.9.127 | 26 |
| Guests | 50 | 172.16.9.128/26 | 255.255.255.192 | 172.16.9.129–172.16.9.190 | 172.16.9.191 | 12 |

#### Step 6. Count addresses reserved and left

Reserved=256+128+64=448. Parent total=512. Unallocated=512−448=64.

**Final answer:** 448 total addresses reserved; 64 unallocated. The table gives one valid complete allocation.

#### What this result means

Unused usable capacity inside assigned subnets is different from unallocated address space outside those subnets.

---

## TEE · Route aggregation: combine only a valid aligned block

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/cidr--aggregation/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/cidr/aggregation

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Route aggregation represents several contiguous networks by a shorter common prefix, reducing the number of advertised routing entries.

**Simple meaning.** Side-by-side blocks ko ek larger boundary mein summarize karo; gap chhupana nahi.

## Understand it step by step

1. For exact aggregation into one prefix, the component range must fill a correctly aligned power-of-two block.
2. If four consecutive /24 networks begin at a third-octet multiple of four, their exact aggregate is /22.
3. Find common leading address bits or verify alignment numerically. Consecutive networks do not always form one exact aggregate.
4. An aggregate that covers extra addresses is broader than the exact assigned range. State that explicitly instead of pretending every included address was allocated.

#### Practical example

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.

### Practice question. State two conditions for exact aggregation of equal-sized IPv4 blocks. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Consecutive + power of two + aligned start.

---

## TEE · Exact route aggregation · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/cidr--aggregate-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/cidr/aggregate-1

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

- 192.168.4.0/24
- 192.168.5.0/24
- 192.168.6.0/24
- 192.168.7.0/24

## To find

One prefix covering exactly the same address range.

## Formula and why



$$
\text{total addresses}=\sum_i N_i
$$





$$
p=32-\log_2(N)
$$



Adding sizes gives the candidate prefix. Contiguity and start-boundary alignment must also be satisfied.

## Step-by-step solution

#### Step 1. Determine each block size

Each input block has 256 addresses.

#### Step 2. Add the address counts

4×256=1024.

#### Step 3. Find host bits and prefix

1024=210; prefix=32−10=/22.

#### Step 4. Verify the exact range

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.

**Final answer:** 192.168.4.0/22

#### What this result means

An aggregate should not silently advertise an unrelated network.

---

## TEE · Exact route aggregation · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/cidr--aggregate-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/cidr/aggregate-2

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. Find a single exact CIDR aggregate for these networks: 10.20.0.0/25, 10.20.0.128/25. [3 practice marks]

#### Answer

## Given

- 10.20.0.0/25
- 10.20.0.128/25

## To find

One prefix covering exactly the same address range.

## Formula and why



$$
\text{total addresses}=\sum_i N_i
$$





$$
p=32-\log_2(N)
$$



Adding sizes gives the candidate prefix. Contiguity and start-boundary alignment must also be satisfied.

## Step-by-step solution

#### Step 1. Determine each block size

Each input block has 128 addresses.

#### Step 2. Add the address counts

2×128=256.

#### Step 3. Find host bits and prefix

256=28; prefix=32−8=/24.

#### Step 4. Verify the exact range

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.

**Final answer:** 10.20.0.0/24

#### What this result means

An aggregate should not silently advertise an unrelated network.

---

## TEE · Exact route aggregation · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/cidr--aggregate-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/cidr/aggregate-3

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. Find a single exact CIDR aggregate for these networks: 172.16.8.0/23, 172.16.10.0/23. [3 practice marks]

#### Answer

## Given

- 172.16.8.0/23
- 172.16.10.0/23

## To find

One prefix covering exactly the same address range.

## Formula and why



$$
\text{total addresses}=\sum_i N_i
$$





$$
p=32-\log_2(N)
$$



Adding sizes gives the candidate prefix. Contiguity and start-boundary alignment must also be satisfied.

## Step-by-step solution

#### Step 1. Determine each block size

Each input block has 512 addresses.

#### Step 2. Add the address counts

2×512=1024.

#### Step 3. Find host bits and prefix

1024=210; prefix=32−10=/22.

#### Step 4. Verify the exact range

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.

**Final answer:** 172.16.8.0/22

#### What this result means

An aggregate should not silently advertise an unrelated network.

---

## TEE · Longest-prefix match: choose the most specific matching route

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/cidr--forwarding/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/cidr/forwarding

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Longest-prefix matching selects the matching forwarding-table entry with the greatest number of prefix bits.

**Simple meaning.** Pehle match check; matching entries mein sabse bada slash choose.

## Understand it step by step

1. Compare the destination with each route’s address range. A larger prefix that does not contain the destination is irrelevant.
2. Among matching prefixes, choose the longest, such as /24 rather than /16.
3. The default route /0 matches every IPv4 destination but loses to any more specific matching entry.
4. The result tells the outgoing interface or next hop. It does not change the destination IP address.

#### Practical example

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.

### Practice question. What is longest-prefix matching? Give an example. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Bada slash only among matches.

---

## TEE · Forwarding table · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/cidr--match-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/cidr/match-1

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. Using the table below, choose the next hop for destination 10.1.2.150 by longest-prefix matching. [3 practice marks]

#### Answer

## Given

| Network/prefix | Next hop |
| --- | --- |
| 0.0.0.0/0 | R0 |
| 10.0.0.0/8 | R1 |
| 10.1.0.0/16 | R2 |
| 10.1.2.0/24 | R3 |
| 10.1.2.128/25 | R4 |

Destination=10.1.2.150

## To find

The matching entries and selected next hop.

## Formula and why

Choose the largest prefix length among entries containing the destination.

Prefix length is considered only after confirming an address-range match.

## Step-by-step solution

#### Step 1. Check every route

| Route | Destination inside? |
| --- | --- |
| 0.0.0.0/0 | Yes |
| 10.0.0.0/8 | Yes |
| 10.1.0.0/16 | Yes |
| 10.1.2.0/24 | Yes |
| 10.1.2.128/25 | Yes |

#### Step 2. Compare matching lengths

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.

#### Step 3. Read the next hop

10.1.2.128/25 uses R4.

**Final answer:** Forward via R4 using 10.1.2.128/25.

#### What this result means

A default route is used when no more specific entry matches.

---

## TEE · Forwarding table · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/cidr--match-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/cidr/match-2

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. Using the table below, choose the next hop for destination 10.1.2.77 by longest-prefix matching. [3 practice marks]

#### Answer

## Given

| Network/prefix | Next hop |
| --- | --- |
| 0.0.0.0/0 | R0 |
| 10.0.0.0/8 | R1 |
| 10.1.0.0/16 | R2 |
| 10.1.2.0/24 | R3 |
| 10.1.2.128/25 | R4 |

Destination=10.1.2.77

## To find

The matching entries and selected next hop.

## Formula and why

Choose the largest prefix length among entries containing the destination.

Prefix length is considered only after confirming an address-range match.

## Step-by-step solution

#### Step 1. Check every route

| Route | Destination inside? |
| --- | --- |
| 0.0.0.0/0 | Yes |
| 10.0.0.0/8 | Yes |
| 10.1.0.0/16 | Yes |
| 10.1.2.0/24 | Yes |
| 10.1.2.128/25 | No |

#### Step 2. Compare matching lengths

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.

#### Step 3. Read the next hop

10.1.2.0/24 uses R3.

**Final answer:** Forward via R3 using 10.1.2.0/24.

#### What this result means

A default route is used when no more specific entry matches.

---

## TEE · Forwarding table · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/cidr--match-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/cidr/match-3

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. Using the table below, choose the next hop for destination 192.0.2.9 by longest-prefix matching. [3 practice marks]

#### Answer

## Given

| Network/prefix | Next hop |
| --- | --- |
| 0.0.0.0/0 | R0 |
| 10.0.0.0/8 | R1 |
| 10.1.0.0/16 | R2 |
| 10.1.2.0/24 | R3 |
| 10.1.2.128/25 | R4 |

Destination=192.0.2.9

## To find

The matching entries and selected next hop.

## Formula and why

Choose the largest prefix length among entries containing the destination.

Prefix length is considered only after confirming an address-range match.

## Step-by-step solution

#### Step 1. Check every route

| Route | Destination inside? |
| --- | --- |
| 0.0.0.0/0 | Yes |
| 10.0.0.0/8 | No |
| 10.1.0.0/16 | No |
| 10.1.2.0/24 | No |
| 10.1.2.128/25 | No |

#### Step 2. Compare matching lengths

0.0.0.0/0. The longest is 0.0.0.0/0.

#### Step 3. Read the next hop

0.0.0.0/0 uses R0.

**Final answer:** Forward via R0 using 0.0.0.0/0.

#### What this result means

A default route is used when no more specific entry matches.

---

## TEE · IPv6: eight hexadecimal groups

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv6--structure/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv6/structure

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** IPv6 uses 128-bit addresses, conventionally represented by eight groups of four hexadecimal digits separated by colons.

**Simple meaning.** IPv4 mein 4 decimal boxes; IPv6 mein 8 hexadecimal groups.

Swipe across the diagram to read its labels ↔

![IPv6: 8 groups × 16 bits = 128 bits](https://deep-learning-study-room.vercel.app/cn/fig/ipv6-address.25497337ae.svg)

Diagram: IPv6: 8 groups × 16 bits = 128 bits. Labels: IPv6: 8 groups × 16 bits = 128 bits | IPv6: 8 groups × 16 bits = 128 bits | 2001 | 16 bits | 0db8 | 16 bits | 0000 | 16 bits | 0000 | 16 bits | 0000 | 16 bits | 0000 | 16 bits | 0000 | 16 bits | 0001 | 16 bits | One hexadecimal digit = 4 bits; one four-digit group = 16 bits. | Compact form: 2001:db8::1

IPv6: eight hexadecimal groups

## Understand it step by step

1. 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.
2. Four hex digits represent 16 bits, called one hextet/group. Eight groups represent 8×16=128 bits.
3. Leading zeroes within a group may be omitted: 00ab becomes ab, but ab00 must not become ab.
4. A run of all-zero groups may be abbreviated by :: once in an address. Using :: twice makes the missing group counts ambiguous.

| Hex | Decimal | Four bits |
| --- | --- | --- |
| 0 | 0 | 0000 |
| 1 | 1 | 0001 |
| 2 | 2 | 0010 |
| 3 | 3 | 0011 |
| 4 | 4 | 0100 |
| 5 | 5 | 0101 |
| 6 | 6 | 0110 |
| 7 | 7 | 0111 |
| 8 | 8 | 1000 |
| 9 | 9 | 1001 |
| a | 10 | 1010 |
| b | 11 | 1011 |
| c | 12 | 1100 |
| d | 13 | 1101 |
| e | 14 | 1110 |
| f | 15 | 1111 |

#### Practical example

2001:0db8:0000:0000:0000:0000:0000:0001 contains eight groups. A compact representation is 2001:db8::1.

### Practice question. Describe the format of an IPv6 address and two abbreviation rules. [3 practice marks]

#### Answer

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.

#### Practical example

2001:0db8:0000:0000:0000:0000:0000:0001 contains eight groups. A compact representation is 2001:db8::1.

**Yaad rakho:** 8 groups × 4 hex digits × 4 bits = 128.

---

## TEE · Expand :: by counting visible groups

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv6--expansion/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv6/expansion

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** IPv6 expansion restores exactly eight groups, each written with four hexadecimal digits.

**Simple meaning.** Visible groups count karo; 8 mein se minus; utne zero groups :: ki jagah.

## Understand it step by step

1. Count groups on the left of :: and on its right. The double colon itself is not an additional visible group.
2. Missing zero groups = 8−visible groups. Insert them at the location of ::.
3. Pad every group on the left with zeroes until it has four digits. Do not pad on the right.
4. Count the final result: exactly eight groups must appear. A written group “0” already counts as one visible group.

#### Practical example

In 0:15::1:12:1213, five groups are visible: 0,15,1,12,1213. Therefore :: supplies three groups of 0000, not four.

### Practice question. Explain how to expand an abbreviated IPv6 address containing ::. [3 practice marks]

#### Answer

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.

#### Practical example

In 0:15::1:12:1213, five groups are visible: 0,15,1,12,1213. Therefore :: supplies three groups of 0000, not four.

**Yaad rakho:** Already-written 0 ko bhi count karna.

---

## TEE · Expand IPv6 · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv6--expand-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv6/expand-1

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. Expand the IPv6 address 0:15::1:12:1213 into eight groups of four hexadecimal digits. [3 practice marks]

#### Answer

## Given

Given address: `0:15::1:12:1213`.

## To find

The full 128-bit address in eight-group hexadecimal notation.

## Formula and why



$$
\text{missing groups}=8-\text{visible groups}
$$



A written 0 is a visible group. :: represents only the omitted all-zero groups.

## Step-by-step solution

#### Step 1. Count groups on both sides

Left: 0, 15 (2 group(s)). Right: 1, 12, 1213 (3 group(s)).

#### Step 2. Calculate omitted groups

Visible=2+3=5. Missing=8−5=3.

#### Step 3. Insert the groups

`0:15:0:0:0:1:12:1213`.

#### Step 4. Pad each group on the left

| Group number | Four-digit group |
| --- | --- |
| 1 | 0000 |
| 2 | 0015 |
| 3 | 0000 |
| 4 | 0000 |
| 5 | 0000 |
| 6 | 0001 |
| 7 | 0012 |
| 8 | 1213 |

#### Step 5. Write all eight in order

`0000:0015:0000:0000:0000:0001:0012:1213`.

**Final answer:** `0000:0015:0000:0000:0000:0001:0012:1213`

#### What this result means

Leading zeros change the spelling, not the address value. The final group count is eight.

---

## TEE · Expand IPv6 · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv6--expand-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv6/expand-2

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. Expand the IPv6 address 2001:db8:0:1::9 into eight groups of four hexadecimal digits. [3 practice marks]

#### Answer

## Given

Given address: `2001:db8:0:1::9`.

## To find

The full 128-bit address in eight-group hexadecimal notation.

## Formula and why



$$
\text{missing groups}=8-\text{visible groups}
$$



A written 0 is a visible group. :: represents only the omitted all-zero groups.

## Step-by-step solution

#### Step 1. Count groups on both sides

Left: 2001, db8, 0, 1 (4 group(s)). Right: 9 (1 group(s)).

#### Step 2. Calculate omitted groups

Visible=4+1=5. Missing=8−5=3.

#### Step 3. Insert the groups

`2001:db8:0:1:0:0:0:9`.

#### Step 4. Pad each group on the left

| Group number | Four-digit group |
| --- | --- |
| 1 | 2001 |
| 2 | 0db8 |
| 3 | 0000 |
| 4 | 0001 |
| 5 | 0000 |
| 6 | 0000 |
| 7 | 0000 |
| 8 | 0009 |

#### Step 5. Write all eight in order

`2001:0db8:0000:0001:0000:0000:0000:0009`.

**Final answer:** `2001:0db8:0000:0001:0000:0000:0000:0009`

#### What this result means

Leading zeros change the spelling, not the address value. The final group count is eight.

---

## TEE · Expand IPv6 · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv6--expand-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv6/expand-3

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. Expand the IPv6 address ::1 into eight groups of four hexadecimal digits. [3 practice marks]

#### Answer

## Given

Given address: `::1`.

## To find

The full 128-bit address in eight-group hexadecimal notation.

## Formula and why



$$
\text{missing groups}=8-\text{visible groups}
$$



A written 0 is a visible group. :: represents only the omitted all-zero groups.

## Step-by-step solution

#### Step 1. Count groups on both sides

Left: none (0 group(s)). Right: 1 (1 group(s)).

#### Step 2. Calculate omitted groups

Visible=0+1=1. Missing=8−1=7.

#### Step 3. Insert the groups

`0:0:0:0:0:0:0:1`.

#### Step 4. Pad each group on the left

| Group number | Four-digit group |
| --- | --- |
| 1 | 0000 |
| 2 | 0000 |
| 3 | 0000 |
| 4 | 0000 |
| 5 | 0000 |
| 6 | 0000 |
| 7 | 0000 |
| 8 | 0001 |

#### Step 5. Write all eight in order

`0000:0000:0000:0000:0000:0000:0000:0001`.

**Final answer:** `0000:0000:0000:0000:0000:0000:0000:0001`

#### What this result means

Leading zeros change the spelling, not the address value. The final group count is eight.

---

## TEE · Expand IPv6 · example 4

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv6--expand-4/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv6/expand-4

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. Expand the IPv6 address fe80::abcd:ef12 into eight groups of four hexadecimal digits. [3 practice marks]

#### Answer

## Given

Given address: `fe80::abcd:ef12`.

## To find

The full 128-bit address in eight-group hexadecimal notation.

## Formula and why



$$
\text{missing groups}=8-\text{visible groups}
$$



A written 0 is a visible group. :: represents only the omitted all-zero groups.

## Step-by-step solution

#### Step 1. Count groups on both sides

Left: fe80 (1 group(s)). Right: abcd, ef12 (2 group(s)).

#### Step 2. Calculate omitted groups

Visible=1+2=3. Missing=8−3=5.

#### Step 3. Insert the groups

`fe80:0:0:0:0:0:abcd:ef12`.

#### Step 4. Pad each group on the left

| Group number | Four-digit group |
| --- | --- |
| 1 | fe80 |
| 2 | 0000 |
| 3 | 0000 |
| 4 | 0000 |
| 5 | 0000 |
| 6 | 0000 |
| 7 | abcd |
| 8 | ef12 |

#### Step 5. Write all eight in order

`fe80:0000:0000:0000:0000:0000:abcd:ef12`.

**Final answer:** `fe80:0000:0000:0000:0000:0000:abcd:ef12`

#### What this result means

Leading zeros change the spelling, not the address value. The final group count is eight.

---

## TEE · Write the shortest standard IPv6 representation

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv6--compression/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv6/compression

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Canonical IPv6 text formatting removes leading zeros and compresses the longest eligible run of consecutive zero groups.

**Simple meaning.** Group ke left wale zero hatao; sabse lambi zero-chain ko :: banao.

## Understand it step by step

1. Remove leading zeroes from each group, retaining one zero if the whole group is zero. Use lowercase hex letters for canonical text.
2. Select the longest run of consecutive zero groups. If two runs tie, compress the leftmost run.
3. For the recommended canonical form, do not use :: to compress just one zero group.
4. Use :: only once. Expanding your compressed result should recover the original address.

#### Practical example

2001:0db8:0000:0000:0012:0000:0000:0001 has two equal two-zero runs. Compress the first: 2001:db8::12:0:0:1.

### Practice question. State the canonical rule when two zero runs have equal length in IPv6. [3 practice marks]

#### Answer

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.

#### Practical example

2001:0db8:0000:0000:0012:0000:0000:0001 has two equal two-zero runs. Compress the first: 2001:db8::12:0:0:1.

**Yaad rakho:** Longest first; tie hua toh leftmost.

---

## TEE · Compress IPv6 · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv6--compress-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv6/compress-1

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. Write 2001:0db8:0000:0000:0012:0000:0000:0001 in canonical compressed IPv6 notation. [3 practice marks]

#### Answer

## Given

`2001:0db8:0000:0000:0012:0000:0000:0001`.

## To find

A canonical shortened spelling of the same address.

## Formula and why

Remove leading zeroes; compress the longest run of at least two zero groups; choose the leftmost tied run.

These rules preserve all 128 bits while removing redundant writing.

## Step-by-step solution

#### Step 1. Shorten individual groups

`2001:db8:0:0:12:0:0:1`.

#### Step 2. Locate zero runs

groups 3–4: 2 zero group(s); groups 6–7: 2 zero group(s).

#### Step 3. Select an eligible run

Compress groups 3–4.

#### Step 4. Write the result

`2001:db8::12:0:0:1`.

**Final answer:** `2001:db8::12:0:0:1`

#### What this result means

The address remains unchanged; only its representation is shortened.

---

## TEE · Compress IPv6 · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv6--compress-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv6/compress-2

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. Write 2001:0db8:0000:0001:0002:0003:0004:0005 in canonical compressed IPv6 notation. [3 practice marks]

#### Answer

## Given

`2001:0db8:0000:0001:0002:0003:0004:0005`.

## To find

A canonical shortened spelling of the same address.

## Formula and why

Remove leading zeroes; compress the longest run of at least two zero groups; choose the leftmost tied run.

These rules preserve all 128 bits while removing redundant writing.

## Step-by-step solution

#### Step 1. Shorten individual groups

`2001:db8:0:1:2:3:4:5`.

#### Step 2. Locate zero runs

groups 3–3: 1 zero group(s).

#### Step 3. Select an eligible run

No run has two or more groups, so do not use ::.

#### Step 4. Write the result

`2001:db8:0:1:2:3:4:5`.

**Final answer:** `2001:db8:0:1:2:3:4:5`

#### What this result means

The address remains unchanged; only its representation is shortened.

---

## TEE · Compress IPv6 · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv6--compress-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv6/compress-3

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### Practice question. Write 0000:0000:0000:0000:0000:0000:0000:0000 in canonical compressed IPv6 notation. [3 practice marks]

#### Answer

## Given

`0000:0000:0000:0000:0000:0000:0000:0000`.

## To find

A canonical shortened spelling of the same address.

## Formula and why

Remove leading zeroes; compress the longest run of at least two zero groups; choose the leftmost tied run.

These rules preserve all 128 bits while removing redundant writing.

## Step-by-step solution

#### Step 1. Shorten individual groups

`0:0:0:0:0:0:0:0`.

#### Step 2. Locate zero runs

groups 1–8: 8 zero group(s).

#### Step 3. Select an eligible run

Compress groups 1–8.

#### Step 4. Write the result

`::`.

**Final answer:** `::`

#### What this result means

The address remains unchanged; only its representation is shortened.

---

## TEE · IPv6 base header: every field and its purpose

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv6--header/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv6/header

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** 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.

**Simple meaning.** Base header fixed 40 bytes; extra information extension headers mein.

Swipe across the diagram to read its labels ↔

![IPv6 base header · each horizontal row is 32 bits wide](https://deep-learning-study-room.vercel.app/cn/fig/ipv6-header.aef1bfbac7.svg)

Diagram: IPv6 base header · each horizontal row is 32 bits wide. Labels: IPv6 base header · each horizontal row is 32 bits wide | IPv6 base header · each horizontal row is 32 bits wide | Version | 4 | Traffic Class | 8 | Flow Label · 20 | Payload Length · 16 | Next Header | 8 | Hop Limit | 8 | Source address · 128 bits (four rows) | Destination address · 128 bits (four rows)

IPv6 base header: every field and its purpose

## Understand it step by step

1. 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.
2. The first two rows together contribute 64 bits; source and destination contribute 256 bits. Total=320 bits=40 bytes.
3. Payload Length counts bytes after the base header, including extension headers when present. It does not include the base 40 bytes.
4. Next Header permits chaining: a base header may point to an extension, which points to another extension or TCP/UDP.
5. 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.

| Field | Bits | Purpose |
| --- | --- | --- |
| Version | 4 | Value 6 |
| Traffic Class | 8 | Traffic treatment/congestion-related marking |
| Flow Label | 20 | Identifies a flow for appropriate handling |
| Payload Length | 16 | Bytes after the base header; includes extension headers when present |
| Next Header | 8 | Type of the next extension header or upper-layer protocol |
| Hop Limit | 8 | Decremented on forwarding; limits packet lifetime in hops |
| Source address | 128 | Sending interface address |
| Destination address | 128 | Destination address |

#### Practical example

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.

### Practice question. Draw the IPv6 base header and explain its fields. [3 practice marks]

#### Answer

Swipe across the diagram to read its labels ↔

![IPv6 base header · each horizontal row is 32 bits wide](https://deep-learning-study-room.vercel.app/cn/fig/ipv6-header.aef1bfbac7.svg)

Diagram: IPv6 base header · each horizontal row is 32 bits wide. Labels: IPv6 base header · each horizontal row is 32 bits wide | IPv6 base header · each horizontal row is 32 bits wide | Version | 4 | Traffic Class | 8 | Flow Label · 20 | Payload Length · 16 | Next Header | 8 | Hop Limit | 8 | Source address · 128 bits (four rows) | Destination address · 128 bits (four rows)

IPv6 base header: 40 bytes.

| Field | Bits | Purpose |
| --- | --- | --- |
| Version | 4 | Value 6 |
| Traffic Class | 8 | Traffic treatment/congestion-related marking |
| Flow Label | 20 | Identifies a flow for appropriate handling |
| Payload Length | 16 | Bytes after the base header; includes extension headers when present |
| Next Header | 8 | Type of the next extension header or upper-layer protocol |
| Hop Limit | 8 | Decremented on forwarding; limits packet lifetime in hops |
| Source address | 128 | Sending interface address |
| Destination address | 128 | Destination address |

#### Practical example

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.

**Yaad rakho:** IPv6: 40 fixed; payload field excludes those 40.

---

## TEE · IPv4 versus IPv6 headers and address types

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv6--compare/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/ipv6/compare

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** IPv6 extends address size and reorganizes IP forwarding information into a fixed base header with extension headers.

**Simple meaning.** Sirf address bada nahi; header ka arrangement bhi badla.

## Understand it step by step

1. IPv6 uses unicast, multicast and anycast addressing; it does not use IPv4-style broadcast addressing.
2. Unicast identifies an interface; multicast addresses a group; anycast reaches one appropriate member of a group sharing an address, according to routing.
3. ::1 is loopback. fe80::/10 is link-local space. ff00::/8 identifies multicast. These serve different purposes.
4. IPv6 neighbour discovery replaces IPv4 ARP mechanisms. Do not write that IPv6 uses ARP to map its addresses.
5. IPv6 is not automatically encrypted or secure merely because it has a larger address space. Security depends on the mechanisms deployed.

| Feature | IPv4 | IPv6 |
| --- | --- | --- |
| Address width | 32 bits | 128 bits |
| Base/header size | 20–60 bytes depending on options | 40-byte fixed base header |
| Length field | Total length includes IPv4 header | Payload Length excludes 40-byte base header |
| Lifetime field | TTL | Hop Limit |
| Following protocol | Protocol field | Next Header; may identify an extension |
| Header checksum | Present | No base-header checksum |
| Options | Inside IPv4 header | Typically extension headers |
| Fragmentation fields | In IPv4 header; routers may fragment if permitted | Fragment extension header; fragmentation by source, not routers |

#### Practical example

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.

### Practice question. Compare the IPv4 and IPv6 packet headers. [3 practice marks]

#### Answer

| Feature | IPv4 | IPv6 |
| --- | --- | --- |
| Address width | 32 bits | 128 bits |
| Base/header size | 20–60 bytes depending on options | 40-byte fixed base header |
| Length field | Total length includes IPv4 header | Payload Length excludes 40-byte base header |
| Lifetime field | TTL | Hop Limit |
| Following protocol | Protocol field | Next Header; may identify an extension |
| Header checksum | Present | No base-header checksum |
| Options | Inside IPv4 header | Typically extension headers |
| Fragmentation fields | In IPv4 header; routers may fragment if permitted | Fragment extension header; fragmentation by source, not routers |

#### Practical example

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.

**Yaad rakho:** v4 total length; v6 payload length.

---

## TEE · ARP: find the local next-hop MAC address

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/mapping--arp/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/mapping/arp

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Address Resolution Protocol (ARP) resolves a known IPv4 address to a link-layer hardware address on the local network.

**Simple meaning.** IP pata hai; local delivery ke liye MAC chahiye.

Swipe across the diagram to read its labels ↔

![ARP resolves the selected local next hop](https://deep-learning-study-room.vercel.app/cn/fig/arp.c8af39ddb3.svg)

Diagram: ARP resolves the selected local next hop. Labels: ARP resolves the selected local next hop | ARP resolves the selected local next hop | 1. Decide local destination or gateway | Compare the destination with the local prefix. | 2. Look in the ARP cache | If the next-hop mapping is missing, send a local broadcast request. | 3. Receive the mapping | The address owner normally replies with its hardware address. | 4. Build the local frame | Use that MAC for the next link; retain the final destination IP.

ARP: find the local next-hop MAC address

## Understand it step by step

1. 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.
2. Check the ARP cache. If the next-hop mapping is absent, broadcast an ARP request on the local link.
3. The owner of the requested IPv4 address normally replies with its hardware address. The sender caches the mapping and constructs its data frame.
4. 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.

#### Practical example

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.

### Practice question. Explain the working of ARP with a suitable example. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Remote packet ka next-hop MAC gateway ka hota hai.

---

## TEE · ARP decision · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/mapping--next-hop-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/mapping/next-hop-1

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

H=192.168.1.10/24; gateway=192.168.1.1; destination=192.168.1.20.

## To find

Local/remote decision and ARP target.

## Formula and why

Compare source and destination network prefixes using the source mask. ARP resolves the selected local next-hop IP.

The IP destination stays the final destination; the Ethernet next-hop address depends on whether that destination is local.

## Step-by-step solution

#### Step 1. Determine H’s subnet

With /24, H is in 192.168.1.0–192.168.1.255.

#### Step 2. Compare the destination

192.168.1.20 is inside that block, so delivery is local.

#### Step 3. Select ARP target

Resolve 192.168.1.20 using ARP.

#### Step 4. Separate packet and frame destinations

IP destination remains 192.168.1.20; frame destination is that host’s MAC.

**Final answer:** ARP target: 192.168.1.20.

#### What this result means

ARP is a local-link operation. A remote packet is sent to a local router for its next step.

---

## TEE · ARP decision · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/mapping--next-hop-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/mapping/next-hop-2

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

H=192.168.1.10/24; gateway=192.168.1.1; destination=203.0.113.7.

## To find

Local/remote decision and ARP target.

## Formula and why

Compare source and destination network prefixes using the source mask. ARP resolves the selected local next-hop IP.

The IP destination stays the final destination; the Ethernet next-hop address depends on whether that destination is local.

## Step-by-step solution

#### Step 1. Determine H’s subnet

With /24, H is in 192.168.1.0–192.168.1.255.

#### Step 2. Compare the destination

203.0.113.7 is outside that block, so use a router.

#### Step 3. Select ARP target

Resolve 192.168.1.1 using ARP.

#### Step 4. Separate packet and frame destinations

IP destination remains 203.0.113.7; frame destination is the gateway’s MAC.

**Final answer:** ARP target: 192.168.1.1.

#### What this result means

ARP is a local-link operation. A remote packet is sent to a local router for its next step.

---

## TEE · ARP decision · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/mapping--next-hop-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/mapping/next-hop-3

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

H=192.168.1.10/24; gateway=192.168.1.1; destination=192.168.2.20.

## To find

Local/remote decision and ARP target.

## Formula and why

Compare source and destination network prefixes using the source mask. ARP resolves the selected local next-hop IP.

The IP destination stays the final destination; the Ethernet next-hop address depends on whether that destination is local.

## Step-by-step solution

#### Step 1. Determine H’s subnet

With /24, H is in 192.168.1.0–192.168.1.255.

#### Step 2. Compare the destination

192.168.2.20 is outside that block, so use a router.

#### Step 3. Select ARP target

Resolve 192.168.1.1 using ARP.

#### Step 4. Separate packet and frame destinations

IP destination remains 192.168.2.20; frame destination is the gateway’s MAC.

**Final answer:** ARP target: 192.168.1.1.

#### What this result means

ARP is a local-link operation. A remote packet is sent to a local router for its next step.

---

## TEE · RARP: the reverse historical mapping

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/mapping--rarp/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/mapping/rarp

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Reverse ARP (RARP) allows a client that knows its hardware address to obtain its IPv4 address from a RARP server.

**Simple meaning.** ARP: IP se MAC. RARP: MAC se IP.

## Understand it step by step

1. Historically, a diskless machine could know its hardware address but need its configured IP address during boot.
2. It broadcasts a RARP request containing its hardware address. A server consults a configured mapping and returns an IP address.
3. RARP supplies much less configuration than DHCP and operates at the local link level. It is mainly a historical protocol in this syllabus.
4. Do not describe RARP as finding an arbitrary remote host by name; DNS is a different service and outside this M2 portion.

#### Practical example

A diskless workstation with a pre-registered hardware address could use RARP to learn its assigned IPv4 address from a local RARP server.

### Practice question. Differentiate ARP and RARP. [3 practice marks]

#### Answer

| Protocol | Known | Needed | Use |
| --- | --- | --- | --- |
| ARP | Local next-hop IPv4 | MAC/hardware address | Local frame delivery |
| RARP | Client hardware address | Client IPv4 | Historical boot-time assignment |

#### Practical example

A diskless workstation with a pre-registered hardware address could use RARP to learn its assigned IPv4 address from a local RARP server.

**Yaad rakho:** RARP reverse karta hai; DHCP configuration badhata hai.

---

## TEE · DHCP: automatic configuration through DORA

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/mapping--dhcp/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/mapping/dhcp

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Dynamic Host Configuration Protocol (DHCP) provides IP configuration parameters to clients and can lease reusable addresses for limited periods.

**Simple meaning.** DORA = Discover, Offer, Request, Acknowledge.

Swipe across the diagram to read its labels ↔

![DHCP initial allocation: DORA](https://deep-learning-study-room.vercel.app/cn/fig/dhcp.510e8eca42.svg)

Diagram: DHCP initial allocation: DORA. Labels: DHCP initial allocation: DORA | DHCP initial allocation: DORA | Client | Server | DISCOVER | OFFER | REQUEST | ACK | Client asks → server offers → client chooses → server confirms.

DHCP: automatic configuration through DORA

## Understand it step by step

1. **Discover:** a new client looks for DHCP servers. With no configured IPv4 address, it commonly starts from 0.0.0.0 and uses broadcast discovery.
2. **Offer:** a server offers an address and configuration, such as subnet mask, lease information and other options.
3. **Request:** the client indicates the selected offer and requested address. In initial allocation this also informs other servers of its choice.
4. **Acknowledge:** the selected server confirms the lease/configuration. The client can then use the address after the required checks.
5. 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.

#### Practical example

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.

### Practice question. Explain the four initial DHCP messages and state its purpose. [3 practice marks]

#### Answer

1. DHCPDISCOVER: client searches for a server.
2. DHCPOFFER: server proposes an address/configuration.
3. DHCPREQUEST: client requests the chosen allocation.
4. DHCPACK: server confirms the lease.

DHCP reduces manual configuration and supports controlled address reuse through leases.

#### Practical example

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.

**Yaad rakho:** Discover–Offer–Request–ACK; pehle D, phir O, phir R, phir A.

---

## TEE · Routing, forwarding, distance and next hop

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/routing--vocabulary/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/routing/vocabulary

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Routing discovers or computes paths through a network; forwarding uses a table to send an individual packet toward the selected next hop.

**Simple meaning.** Routing table banata hai; forwarding us table ko use karta hai.

## Understand it step by step

1. A route contains a destination prefix and an outgoing interface or next hop. A metric measures the desirability/cost of that route.
2. 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.
3. A shortest-path algorithm maintains a tentative distance from the source to each vertex. Start the source at 0 and all others at ∞.
4. 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.
5. A next hop is the first router after the source on that path. It is different from a final destination’s immediate predecessor.

#### Practical example

For path A→C→D→G, G’s predecessor is D, but A’s next hop toward G is C.

### Practice question. Differentiate routing and forwarding, with an example. [3 practice marks]

#### Answer

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.

#### Practical example

For path A→C→D→G, G’s predecessor is D, but A’s next hop toward G is C.

**Yaad rakho:** Predecessor = pichhla node; next hop = source ke baad pehla node.

---

## TEE · Relaxation: replace an old route only when the candidate is cheaper

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/routing--relaxation/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/routing/relaxation

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** 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.

**Simple meaning.** Purana cost versus u tak ka cost + u→v edge. Jo chhota, woh rakho.

## Understand it step by step

1. Suppose d[u]=4, edge cost w(u,v)=3, and current d[v]=10. The candidate via u is 4+3=7.
2. Because 7<10, replace d[v] with 7 and set predecessor[v]=u.
3. 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.
4. If u is unreachable (d[u]=∞), it cannot yet provide a finite route to v.



$$
d[v]\leftarrow\min\bigl(d[v],d[u]+w(u,v)\bigr)
$$



#### Practical example

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.

### Practice question. What does edge relaxation mean in a shortest-path algorithm? [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Add path + edge, compare, then replace only if smaller.

---

## TEE · One edge relaxation · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/routing--relax-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/routing/relax-1

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

d[U]=4; w(U,V)=3; old d[V]=10.

## To find

New d[V] and predecessor action.

## Formula and why



$$
c=d[U]+w(U,V),\quad d[V]_{\mathrm{new}}=\min(d[V]_{\mathrm{old}},c)
$$



The candidate contains both the cost to U and the final edge to V.

## Step-by-step solution

#### Step 1. Compute candidate

4+(3)=7.

#### Step 2. Compare with old distance

min(10,7)=7.

#### Step 3. Update the predecessor if improved

Set predecessor[V]=U.

**Final answer:** New d[V]=7.

#### What this result means

A negative edge weight is allowed in Bellman–Ford exercises, but not in the standard Dijkstra method taught here.

---

## TEE · One edge relaxation · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/routing--relax-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/routing/relax-2

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

d[U]=5; w(U,V)=4; old d[V]=7.

## To find

New d[V] and predecessor action.

## Formula and why



$$
c=d[U]+w(U,V),\quad d[V]_{\mathrm{new}}=\min(d[V]_{\mathrm{old}},c)
$$



The candidate contains both the cost to U and the final edge to V.

## Step-by-step solution

#### Step 1. Compute candidate

5+(4)=9.

#### Step 2. Compare with old distance

min(7,9)=7.

#### Step 3. Update the predecessor if improved

Keep the existing predecessor; the candidate does not improve the route.

**Final answer:** New d[V]=7.

#### What this result means

A negative edge weight is allowed in Bellman–Ford exercises, but not in the standard Dijkstra method taught here.

---

## TEE · One edge relaxation · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/routing--relax-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/routing/relax-3

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

d[U]=6; w(U,V)=-2; old d[V]=9.

## To find

New d[V] and predecessor action.

## Formula and why



$$
c=d[U]+w(U,V),\quad d[V]_{\mathrm{new}}=\min(d[V]_{\mathrm{old}},c)
$$



The candidate contains both the cost to U and the final edge to V.

## Step-by-step solution

#### Step 1. Compute candidate

6+(-2)=4.

#### Step 2. Compare with old distance

min(9,4)=4.

#### Step 3. Update the predecessor if improved

Set predecessor[V]=U.

**Final answer:** New d[V]=4.

#### What this result means

A negative edge weight is allowed in Bellman–Ford exercises, but not in the standard Dijkstra method taught here.

---

## TEE · Dijkstra: settle the closest unfinished vertex

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/routing--dijkstra/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/routing/dijkstra

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Dijkstra’s algorithm finds shortest paths from a source in a graph whose edge weights are nonnegative.

**Simple meaning.** Sabse chhota unfinished distance select karo, phir uske neighbours improve karo.

## Understand it step by step

1. Initialize source distance 0, all others ∞, and no predecessors. No vertex is settled initially.
2. Select an unsettled vertex with minimum tentative distance. With nonnegative edges, its distance can now be finalized.
3. Relax each relevant outgoing edge: compare old distance with selected distance plus edge cost.
4. Repeat selection and relaxation. If all remaining distances are ∞, the remaining vertices are unreachable from the source.
5. Trace predecessors for the required destination. Always preserve arrow direction. Standard Dijkstra is not valid for graphs with negative edge costs.

#### Practical example

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.

### Practice question. Describe Dijkstra’s shortest-path algorithm and its restriction. [3 practice marks]

#### Answer

1. Set source to 0 and other distances to infinity.
2. Repeatedly choose the unsettled vertex with minimum tentative distance.
3. Settle it and relax its outgoing edges.
4. Recover paths using predecessors.

The standard algorithm requires nonnegative edge weights.

#### Practical example

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.

**Yaad rakho:** Minimum tentative total choose; negative edges pe Dijkstra nahi.

---

## TEE · Dijkstra · complete example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/routing--dijkstra-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/routing/dijkstra-1

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

| Edge | Cost |
| --- | --- |
| A→B | 4 |
| A→C | 2 |
| C→B | 1 |
| B→D | 3 |
| C→D | 7 |

Source=A; target=D. Edges are directed; do not add reverse edges.

## To find

The path A to D, its total cost and intermediate work.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.

Swipe across the diagram to read its labels ↔

![Dijkstra · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/dijkstra-1.973d01595e.svg)

Diagram: Dijkstra · given directed graph. Labels: Dijkstra · given directed graph | Dijkstra · given directed graph | A | A | B | B | A->B | 4 | C | C | A->C | 2 | D | D | B->D | 3 | C->B | 1 | C->D | 7

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

d[A]=0; every other distance=∞. No predecessors are known.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Tentative |
| B | ∞ | — | Tentative |
| C | ∞ | — | Tentative |
| D | ∞ | — | Tentative |

#### Step 2. Settle A at distance 0

Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| A→B | ∞ | 0+(4)=4 | Improve to 4; predecessor=A |
| A→C | ∞ | 0+(2)=2 | Improve to 2; predecessor=A |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 4 | A | Tentative |
| C | 2 | A | Tentative |
| D | ∞ | — | Tentative |

#### Step 3. Settle C at distance 2

Unsettled candidates before selection: B=4, C=2, D=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| C→B | 4 | 2+(1)=3 | Improve to 3; predecessor=C |
| C→D | ∞ | 2+(7)=9 | Improve to 9; predecessor=C |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | C | Tentative |
| C | 2 | A | Settled |
| D | 9 | C | Tentative |

#### Step 4. Settle B at distance 3

Unsettled candidates before selection: B=3, D=9. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| B→D | 9 | 3+(3)=6 | Improve to 6; predecessor=B |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | C | Settled |
| C | 2 | A | Settled |
| D | 6 | B | Tentative |

#### Step 5. Settle D at distance 6

Unsettled candidates before selection: D=6. Select the minimum; ties use alphabetical order.

No outgoing edges to relax.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | C | Settled |
| C | 2 | A | Settled |
| D | 6 | B | Settled |

#### Step 6. Recover the path

Trace backwards: D ← B ← C ← A. Reverse it: A → C → B → D.

Edge sum: 2 + 1 + 3 = 6.

**Final answer:** A → C → B → D; cost=6.

#### What this result means

The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.

---

## TEE · Dijkstra · complete example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/routing--dijkstra-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/routing/dijkstra-2

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

| Edge | Cost |
| --- | --- |
| A—B | 2 |
| A—C | 5 |
| B—C | 1 |
| B—D | 4 |
| C—D | 1 |
| D—E | 3 |
| C—E | 8 |

Source=A; target=E. Each edge can be traversed in either direction.

## To find

The path A to E, its total cost and intermediate work.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.

Swipe across the diagram to read its labels ↔

![Dijkstra · given undirected graph](https://deep-learning-study-room.vercel.app/cn/fig/dijkstra-2.170b001531.svg)

Diagram: Dijkstra · given undirected graph. Labels: Dijkstra · given undirected graph | Dijkstra · given undirected graph | A | A | B | B | A--B | 2 | C | C | A--C | 5 | B--C | 1 | D | D | B--D | 4 | C--D | 1 | E | E | C--E | 8 | D--E | 3

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

d[A]=0; every other distance=∞. No predecessors are known.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Tentative |
| B | ∞ | — | Tentative |
| C | ∞ | — | Tentative |
| D | ∞ | — | Tentative |
| E | ∞ | — | Tentative |

#### Step 2. Settle A at distance 0

Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞, E=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| A→B | ∞ | 0+(2)=2 | Improve to 2; predecessor=A |
| A→C | ∞ | 0+(5)=5 | Improve to 5; predecessor=A |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 2 | A | Tentative |
| C | 5 | A | Tentative |
| D | ∞ | — | Tentative |
| E | ∞ | — | Tentative |

#### Step 3. Settle B at distance 2

Unsettled candidates before selection: B=2, C=5, D=∞, E=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| B→C | 5 | 2+(1)=3 | Improve to 3; predecessor=B |
| B→D | ∞ | 2+(4)=6 | Improve to 6; predecessor=B |
| B→A | 0 | 2+(2)=4 | Already settled; retain |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 2 | A | Settled |
| C | 3 | B | Tentative |
| D | 6 | B | Tentative |
| E | ∞ | — | Tentative |

#### Step 4. Settle C at distance 3

Unsettled candidates before selection: C=3, D=6, E=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| C→D | 6 | 3+(1)=4 | Improve to 4; predecessor=C |
| C→E | ∞ | 3+(8)=11 | Improve to 11; predecessor=C |
| C→A | 0 | 3+(5)=8 | Already settled; retain |
| C→B | 2 | 3+(1)=4 | Already settled; retain |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 2 | A | Settled |
| C | 3 | B | Settled |
| D | 4 | C | Tentative |
| E | 11 | C | Tentative |

#### Step 5. Settle D at distance 4

Unsettled candidates before selection: D=4, E=11. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| D→E | 11 | 4+(3)=7 | Improve to 7; predecessor=D |
| D→B | 2 | 4+(4)=8 | Already settled; retain |
| D→C | 3 | 4+(1)=5 | Already settled; retain |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 2 | A | Settled |
| C | 3 | B | Settled |
| D | 4 | C | Settled |
| E | 7 | D | Tentative |

#### Step 6. Settle E at distance 7

Unsettled candidates before selection: E=7. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| E→D | 4 | 7+(3)=10 | Already settled; retain |
| E→C | 3 | 7+(8)=15 | Already settled; retain |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 2 | A | Settled |
| C | 3 | B | Settled |
| D | 4 | C | Settled |
| E | 7 | D | Settled |

#### Step 7. Recover the path

Trace backwards: E ← D ← C ← B ← A. Reverse it: A → B → C → D → E.

Edge sum: 2 + 1 + 1 + 3 = 7.

**Final answer:** A → B → C → D → E; cost=7.

#### What this result means

The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.

---

## TEE · Dijkstra · complete example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/routing--dijkstra-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/routing/dijkstra-3

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

| Edge | Cost |
| --- | --- |
| A→B | 3 |
| A→C | 3 |
| B→D | 2 |
| C→D | 2 |

Source=A; target=E. Edges are directed; do not add reverse edges.

## To find

The path A to E, its total cost and intermediate work.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.

Swipe across the diagram to read its labels ↔

![Dijkstra · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/dijkstra-3.312b4c0fd9.svg)

Diagram: Dijkstra · given directed graph. Labels: Dijkstra · given directed graph | Dijkstra · given directed graph | A | A | B | B | A->B | 3 | C | C | A->C | 3 | D | D | B->D | 2 | C->D | 2 | E | E

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

d[A]=0; every other distance=∞. No predecessors are known.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Tentative |
| B | ∞ | — | Tentative |
| C | ∞ | — | Tentative |
| D | ∞ | — | Tentative |
| E | ∞ | — | Tentative |

#### Step 2. Settle A at distance 0

Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞, E=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| A→B | ∞ | 0+(3)=3 | Improve to 3; predecessor=A |
| A→C | ∞ | 0+(3)=3 | Improve to 3; predecessor=A |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | A | Tentative |
| C | 3 | A | Tentative |
| D | ∞ | — | Tentative |
| E | ∞ | — | Tentative |

#### Step 3. Settle B at distance 3

Unsettled candidates before selection: B=3, C=3, D=∞, E=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| B→D | ∞ | 3+(2)=5 | Improve to 5; predecessor=B |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | A | Settled |
| C | 3 | A | Tentative |
| D | 5 | B | Tentative |
| E | ∞ | — | Tentative |

#### Step 4. Settle C at distance 3

Unsettled candidates before selection: C=3, D=5, E=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| C→D | 5 | 3+(2)=5 | Retain 5 (equal cost) |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | A | Settled |
| C | 3 | A | Settled |
| D | 5 | B | Tentative |
| E | ∞ | — | Tentative |

#### Step 5. Settle D at distance 5

Unsettled candidates before selection: D=5, E=∞. Select the minimum; ties use alphabetical order.

No outgoing edges to relax.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | A | Settled |
| C | 3 | A | Settled |
| D | 5 | B | Settled |
| E | ∞ | — | Tentative |

#### Step 6. Stop at unreachable vertices

Every remaining tentative distance is ∞. No path from the source reaches these vertices.

#### Step 7. Recover the path

There is no finite path to recover.

**Final answer:** E is unreachable from A.

#### What this result means

The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.

---

## TEE · Bellman–Ford: repeat relaxation across all edges

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/routing--bellman/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/routing/bellman

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Bellman–Ford computes single-source shortest paths by repeatedly relaxing every edge. It supports negative edge weights and detects reachable negative cycles.

**Simple meaning.** Har edge ko baar-baar relax; negative edge chalega, negative cycle problem hai.

## Understand it step by step

1. Initialize source 0 and all other distances ∞.
2. 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.
3. 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.
4. If a full pass makes no change, all distances have stabilized and the algorithm may stop early.
5. 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.

#### Practical example

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.

### Practice question. Explain Bellman–Ford and how it differs from Dijkstra. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Pass = all edges once. Negative edge ≠ negative cycle.

---

## TEE · Bellman–Ford · complete example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/routing--bellman-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/routing/bellman-1

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

| Directed edge | Weight |
| --- | --- |
| A→B | 4 |
| A→C | 5 |
| B→C | -2 |
| C→D | 3 |

## To find

The shortest route and cost, with complete passes and a negative-cycle check.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



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.

Swipe across the diagram to read its labels ↔

![Bellman–Ford · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/bellman-1.1bf4232fcf.svg)

Diagram: Bellman–Ford · given directed graph. Labels: Bellman–Ford · given directed graph | Bellman–Ford · given directed graph | A | A | B | B | A->B | 4 | C | C | A->C | 5 | B->C | -2 | D | D | C->D | 3

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

4 vertices → at most 3 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.

#### Step 2. Pass 1: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | ∞ | 0+(4)=4 | 4 | Update; predecessor=A |
| A→C | ∞ | 0+(5)=5 | 5 | Update; predecessor=A |
| B→C | 5 | 4+(-2)=2 | 2 | Update; predecessor=B |
| C→D | ∞ | 2+(3)=5 | 5 | Update; predecessor=C |

| Vertex | A | B | C | D |
| --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 4 | 2 | 5 |
| Predecessor | — | A | B | C |

#### Step 3. Pass 2: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | 4 | 0+(4)=4 | 4 | No improvement |
| A→C | 2 | 0+(5)=5 | 2 | No improvement |
| B→C | 2 | 4+(-2)=2 | 2 | No improvement |
| C→D | 5 | 2+(3)=5 | 5 | No improvement |

| Vertex | A | B | C | D |
| --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 4 | 2 | 5 |
| Predecessor | — | A | B | C |

#### Step 4. Stop after an unchanged pass

This entire pass changed no distance. Further identical relaxation passes will not improve anything.

#### Step 5. Recover and total the path

Backward predecessors: D ← C ← B ← A. Forward route: A → B → C → D.

Cost = (4) + (-2) + (3) = 5. No edge can now improve its destination label.

**Final answer:** A → B → C → D; shortest cost=5.

#### What this result means

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.

---

## TEE · Bellman–Ford · complete example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/routing--bellman-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/routing/bellman-2

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

| Directed edge | Weight |
| --- | --- |
| C→D | 2 |
| B→C | 1 |
| A→B | 3 |
| A→D | 12 |

## To find

The shortest route and cost, with complete passes and a negative-cycle check.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



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.

Swipe across the diagram to read its labels ↔

![Bellman–Ford · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/bellman-2.9bfc43d501.svg)

Diagram: Bellman–Ford · given directed graph. Labels: Bellman–Ford · given directed graph | Bellman–Ford · given directed graph | A | A | B | B | A->B | 3 | D | D | A->D | 12 | C | C | B->C | 1 | C->D | 2

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

4 vertices → at most 3 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.

#### Step 2. Pass 1: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| C→D | ∞ | ∞+(2)=∞ | ∞ | No improvement |
| B→C | ∞ | ∞+(1)=∞ | ∞ | No improvement |
| A→B | ∞ | 0+(3)=3 | 3 | Update; predecessor=A |
| A→D | ∞ | 0+(12)=12 | 12 | Update; predecessor=A |

| Vertex | A | B | C | D |
| --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 3 | ∞ | 12 |
| Predecessor | — | A | — | A |

#### Step 3. Pass 2: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| C→D | 12 | ∞+(2)=∞ | 12 | No improvement |
| B→C | ∞ | 3+(1)=4 | 4 | Update; predecessor=B |
| A→B | 3 | 0+(3)=3 | 3 | No improvement |
| A→D | 12 | 0+(12)=12 | 12 | No improvement |

| Vertex | A | B | C | D |
| --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 3 | 4 | 12 |
| Predecessor | — | A | B | A |

#### Step 4. Pass 3: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| C→D | 12 | 4+(2)=6 | 6 | Update; predecessor=C |
| B→C | 4 | 3+(1)=4 | 4 | No improvement |
| A→B | 3 | 0+(3)=3 | 3 | No improvement |
| A→D | 6 | 0+(12)=12 | 6 | No improvement |

| Vertex | A | B | C | D |
| --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 3 | 4 | 6 |
| Predecessor | — | A | B | C |

#### Step 5. Recover and total the path

Backward predecessors: D ← C ← B ← A. Forward route: A → B → C → D.

Cost = (3) + (1) + (2) = 6. No edge can now improve its destination label.

**Final answer:** A → B → C → D; shortest cost=6.

#### What this result means

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.

---

## TEE · Bellman–Ford · negative-cycle example

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/routing--bellman-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/routing/bellman-3

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

| Directed edge | Weight |
| --- | --- |
| A→B | 1 |
| B→C | -2 |
| C→B | -1 |

## To find

The shortest route and cost, with complete passes and a negative-cycle check.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



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.

Swipe across the diagram to read its labels ↔

![Bellman–Ford · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/bellman-3.b876d89f79.svg)

Diagram: Bellman–Ford · given directed graph. Labels: Bellman–Ford · given directed graph | Bellman–Ford · given directed graph | A | A | B | B | A->B | 1 | C | C | B->C | -2 | C->B | -1

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

3 vertices → at most 2 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.

#### Step 2. Pass 1: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | ∞ | 0+(1)=1 | 1 | Update; predecessor=A |
| B→C | ∞ | 1+(-2)=-1 | -1 | Update; predecessor=B |
| C→B | 1 | -1+(-1)=-2 | -2 | Update; predecessor=C |

| Vertex | A | B | C |
| --- | --- | --- | --- |
| End-of-pass distance | 0 | -2 | -1 |
| Predecessor | — | C | B |

#### Step 3. Pass 2: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | -2 | 0+(1)=1 | -2 | No improvement |
| B→C | -1 | -2+(-2)=-4 | -4 | Update; predecessor=B |
| C→B | -2 | -4+(-1)=-5 | -5 | Update; predecessor=C |

| Vertex | A | B | C |
| --- | --- | --- | --- |
| End-of-pass distance | 0 | -5 | -4 |
| Predecessor | — | C | B |

#### Step 4. Detect a reachable negative cycle

After the allowed main passes, an edge still improves:

| Edge | Candidate | Current distance |
| --- | --- | --- |
| B→C | -7 | -4 |

A reachable negative cycle exists. Do not present the changing distance labels as finite shortest-path answers.

**Final answer:** A reachable negative cycle prevents a finite shortest distance for vertices reachable from that cycle.

#### What this result means

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.

---

## TEE · Distance-vector routing: learn costs through neighbours

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/protocols--distance-vector/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/protocols/distance-vector

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Distance-vector routing represents each destination by an estimated distance and next hop, updating those estimates using neighbouring routers’ advertised distances.

**Simple meaning.** Neighbour ke destination-cost mein apna neighbour-link cost add karo.

Swipe across the diagram to read its labels ↔

![Distance vector: add your local cost to the advertisement](https://deep-learning-study-room.vercel.app/cn/fig/distance-vector.8f3c90bc87.svg)

Diagram: Distance vector: add your local cost to the advertisement. Labels: Distance vector: add your local cost to the advertisement | Distance vector: add your local cost to the advertisement | X | B | C | link cost 1 | link cost 2 | B advertises Z=4 | via B: 1+4=5 | C advertises Z=2 | via C: 2+2=4 | Choose C: total cost 4 is smaller than total cost 5.

Distance-vector routing: learn costs through neighbours

## Understand it step by step

1. 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.
2. The route to y through v costs c(x,v)+Dᵥ(y). Compare candidates from neighbours and choose the minimum permitted route.
3. The update is the distributed Bellman–Ford idea. Ordinary distance-vector exchanges do not send the full network topology map.
4. After changes, routers may temporarily hold inconsistent information. Routing loops and count-to-infinity are possible; mitigation depends on the protocol.



$$
\text{candidate via neighbour}=\text{link cost}+\text{advertised distance}
$$



#### Practical example

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.

### Practice question. Explain the distance-vector update rule. [3 practice marks]

#### Answer



$$
D_x(y)=\min_{v\in N(x)}\{c(x,v)+D_v(y)\}
$$



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.

#### Practical example

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.

**Yaad rakho:** Neighbour ka distance + neighbour tak apna distance.

---

## TEE · Distance-vector update · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/protocols--dv-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/protocols/dv-1

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

| Neighbour | X-to-neighbour cost | Advertised distance to Z |
| --- | --- | --- |
| B | 1 | 4 |
| C | 2 | 2 |
| D | 3 | 5 |

## To find

Candidates and the minimum total route cost.

## Formula and why



$$
C_v=c(X,v)+D_v(Z)
$$



The advertisement starts from the neighbour, so the local link to that neighbour must be added.

## Step-by-step solution

#### Step 1. Compute every candidate

| Via | Addition | Total |
| --- | --- | --- |
| B | 1+4 | 5 |
| C | 2+2 | 4 |
| D | 3+5 | 8 |

#### Step 2. Select the minimum

min(5, 4, 8)=4.

#### Step 3. Read all tied next hops

C is the minimum-cost neighbour.

**Final answer:** Cost=4; best next hop(s): C.

#### What this result means

Do not choose solely by the neighbour’s advertised distance; the link to that neighbour also costs something.

---

## TEE · Distance-vector update · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/protocols--dv-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/protocols/dv-2

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

| Neighbour | X-to-neighbour cost | Advertised distance to Z |
| --- | --- | --- |
| B | 2 | 1 |
| C | 1 | 4 |
| D | 5 | 0 |

## To find

Candidates and the minimum total route cost.

## Formula and why



$$
C_v=c(X,v)+D_v(Z)
$$



The advertisement starts from the neighbour, so the local link to that neighbour must be added.

## Step-by-step solution

#### Step 1. Compute every candidate

| Via | Addition | Total |
| --- | --- | --- |
| B | 2+1 | 3 |
| C | 1+4 | 5 |
| D | 5+0 | 5 |

#### Step 2. Select the minimum

min(3, 5, 5)=3.

#### Step 3. Read all tied next hops

B is the minimum-cost neighbour.

**Final answer:** Cost=3; best next hop(s): B.

#### What this result means

Do not choose solely by the neighbour’s advertised distance; the link to that neighbour also costs something.

---

## TEE · Distance-vector update · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/protocols--dv-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/protocols/dv-3

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

### 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. [3 practice marks]

#### Answer

## Given

| Neighbour | X-to-neighbour cost | Advertised distance to Z |
| --- | --- | --- |
| B | 3 | 2 |
| C | 2 | 3 |
| D | 4 | 4 |

## To find

Candidates and the minimum total route cost.

## Formula and why



$$
C_v=c(X,v)+D_v(Z)
$$



The advertisement starts from the neighbour, so the local link to that neighbour must be added.

## Step-by-step solution

#### Step 1. Compute every candidate

| Via | Addition | Total |
| --- | --- | --- |
| B | 3+2 | 5 |
| C | 2+3 | 5 |
| D | 4+4 | 8 |

#### Step 2. Select the minimum

min(5, 5, 8)=5.

#### Step 3. Read all tied next hops

B, C are tied; a protocol may use a defined tie rule or equal-cost multipath.

**Final answer:** Cost=5; best next hop(s): B, C.

#### What this result means

Do not choose solely by the neighbour’s advertised distance; the link to that neighbour also costs something.

---

## TEE · RIP: hop counts, updates and the value 16

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/protocols--rip/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/protocols/rip

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Routing Information Protocol (RIP) is an interior distance-vector routing protocol that uses a bounded metric, commonly hop count, to select routes.

**Simple meaning.** RIP mein hops count; 15 tak reachable, 16 means unreachable.

## Understand it step by step

1. RIPv2 uses distance-vector updates and carries subnet-mask information, allowing classless routes.
2. 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.
3. 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.
4. 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.

#### Practical example

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.

### Practice question. State the routing method, metric and main limitations of RIP. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** RIP: neighbour distances; 16 is infinity.

---

## TEE · Count-to-infinity and loop-mitigation methods

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/protocols--loops/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/protocols/loops

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** 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.

**Simple meaning.** Dono neighbour ek dusre ko bol rahe: mere through jao—par actual route gaya.

## Understand it step by step

1. Before failure, B reaches a destination through A. After A loses the route, B may still advertise an old finite distance.
2. 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.
3. **Split horizon:** do not advertise a learned route back on the interface from which it was learned.
4. **Poison reverse:** advertise that reverse direction with an unreachable metric. **Route poisoning:** mark a failed destination unreachable. Triggered updates spread changes sooner.
5. These methods reduce common failure modes but do not constitute a universal proof that every multi-router loop is impossible.

#### Practical example

In RIP, a poisoned route is sent with metric 16. Receiving routers treat it as unreachable rather than a new usable longer route.

### Practice question. Explain split horizon and poison reverse. [3 practice marks]

#### Answer

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.

#### Practical example

In RIP, a poisoned route is sent with metric 16. Receiving routers treat it as unreachable rather than a new usable longer route.

**Yaad rakho:** Split: wapas mat bolo. Poison reverse: wapas bolo, par unreachable.

---

## TEE · Link-state routing: share a map, calculate locally

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/protocols--link-state/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/protocols/link-state

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Link-state routing distributes information about routers’ local links so that routers can build a topology database and compute shortest paths independently.

**Simple meaning.** Distance vector mein neighbour ka answer; link state mein topology map.

Swipe across the diagram to read its labels ↔

![Link-state routing: from local links to a shortest-path tree](https://deep-learning-study-room.vercel.app/cn/fig/link-state.bbee3173ec.svg)

Diagram: Link-state routing: from local links to a shortest-path tree. Labels: Link-state routing: from local links to a shortest-path tree | Link-state routing: from local links to a shortest-path tree | 1. Discover neighbours and costs | Each router measures or configures its local link information. | 2. Flood link-state information | Routers share topology information within the routing scope. | 3. Maintain the topology database | New information updates the shared view after convergence. | 4. Run Dijkstra from this router | Add link costs; install the resulting next hops.

Link-state routing: share a map, calculate locally

## Understand it step by step

1. Discover neighbours and determine local link costs.
2. Create link-state information and flood it through the appropriate routing scope. Sequence/age mechanisms keep newer information identifiable.
3. Routers in the same area build a consistent link-state database after convergence.
4. Each router runs a shortest-path computation, commonly Dijkstra, rooted at itself and installs resulting routes.
5. 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.

#### Practical example

Routers A and B can share the same topology database while calculating different next hops because their shortest-path trees have different roots.

### Practice question. Explain the steps of link-state routing. [3 practice marks]

#### Answer

1. Discover neighbours and link costs.
2. Generate and flood link-state information.
3. Maintain a topology database.
4. Run a shortest-path algorithm from the local router.
5. Install next hops and update after changes.

#### Practical example

Routers A and B can share the same topology database while calculating different next hops because their shortest-path trees have different roots.

**Yaad rakho:** Same map, different root, different tree.

---

## TEE · OSPF: link-state shortest paths within an autonomous system

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/protocols--ospf/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/protocols/ospf

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** Open Shortest Path First (OSPF) is an interior link-state routing protocol that selects routes using shortest-path calculations and additive link costs.

**Simple meaning.** OSPF = link-state map + Dijkstra + summed costs.

## Understand it step by step

1. Routers discover and maintain neighbour relationships using Hello packets and exchange link-state information.
2. 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.
3. 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.
4. OSPFv2 is the IPv4 protocol in the supplied paper; it is carried directly in IP protocol number 89, not TCP/UDP port 89.
5. 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.

#### Practical example

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.

### Practice question. Summarize how OSPF determines the best route. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** OSPF cost add karo; sirf hops nahi.

---

## TEE · The five OSPF packet types

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/protocols--ospf-packets/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/protocols/ospf-packets

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** OSPFv2 uses five packet types for neighbour maintenance and reliable exchange of link-state database information.

**Simple meaning.** Hello → database summary → request → update → acknowledgement; har packet ka kaam alag.

Swipe across the diagram to read its labels ↔

![OSPFv2: five distinct packet types](https://deep-learning-study-room.vercel.app/cn/fig/ospf-packets.6093f0d178.svg)

Diagram: OSPFv2: five distinct packet types. Labels: OSPFv2: five distinct packet types | OSPFv2: five distinct packet types | 1. Hello | Discover and maintain neighbour relationships. | 2. Database Description | Summarize link-state database contents. | 3. Link State Request | Ask for particular missing or newer LSAs. | 4. Link State Update | Carry one or more LSAs. | 5. Link State Acknowledgment | Acknowledge receipt of LSAs.

The five OSPF packet types

## Understand it step by step

1. Hello packets establish/maintain neighbour relationships; they are not the complete topology database.
2. Database Description packets list summaries, allowing neighbours to identify differences.
3. Link State Request asks for required LSAs; Link State Update transports LSAs. An LSU packet may contain more than one LSA.
4. Link State Acknowledgment acknowledges LSAs. An LSA is a topology-information item, not a sixth OSPF packet type.

| Packet type | What it does | Simple example |
| --- | --- | --- |
| Hello | Discover/maintain neighbours and exchange relationship parameters | Are we still neighbours? |
| Database Description (DD/DBD) | Summarize link-state database contents during synchronization | Here are the LSA headers I have |
| Link State Request (LSR) | Ask for specific missing/newer link-state information | Please send this LSA |
| Link State Update (LSU) | Carry one or more LSAs | Here is the requested or newly flooded link-state information |
| Link State Acknowledgment (LSAck) | Acknowledge receipt of LSAs | I received these LSAs |

#### Practical example

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.

### Practice question. List and explain the five types of OSPF packets. [3 practice marks]

#### Answer

| Packet type | What it does | Simple example |
| --- | --- | --- |
| Hello | Discover/maintain neighbours and exchange relationship parameters | Are we still neighbours? |
| Database Description (DD/DBD) | Summarize link-state database contents during synchronization | Here are the LSA headers I have |
| Link State Request (LSR) | Ask for specific missing/newer link-state information | Please send this LSA |
| Link State Update (LSU) | Carry one or more LSAs | Here is the requested or newly flooded link-state information |
| Link State Acknowledgment (LSAck) | Acknowledge receipt of LSAs | I received these LSAs |

#### Practical example

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.

**Yaad rakho:** H–D–R–U–A: Hello, Description, Request, Update, Ack.

---

## TEE · RIP versus OSPF; Bellman–Ford versus Dijkstra

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/protocols--comparison/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/protocols/comparison

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** RIP and OSPF are routing protocols; Bellman–Ford and Dijkstra are algorithms underlying different route-computation approaches.

**Simple meaning.** Protocol message bhejta hai; algorithm route calculate karta hai.

## Understand it step by step

1. RIP uses distance-vector information and a bounded hop metric. OSPF distributes link-state information and computes paths using additive costs.
2. A generic Bellman–Ford graph exercise can contain negative weights; RIP’s ordinary hop-count metric does not.
3. Dijkstra assumes nonnegative edge weights. Do not select it for the negative-weight re-exam graph simply because the question says “routing”.
4. State whether a drawn graph is directed or undirected before solving. Both algorithms can be applied to appropriate directed graphs.

#### Practical example

The December paper explicitly gives positive directed edges and asks for Dijkstra. The February paper includes negative directed edges and asks for Bellman–Ford.

### Practice question. Compare RIP and OSPF on three points. [3 practice marks]

#### Answer

| Feature | RIP | OSPF |
| --- | --- | --- |
| Family | Distance vector | Link state |
| Typical metric | Hop count; 16 unreachable | Sum of configured link costs |
| Knowledge exchanged | Destination distances via neighbours | Link-state information |
| Algorithm connection | Distributed Bellman–Ford idea | Dijkstra shortest paths |
| Scale design | Small/simple networks; limited diameter | Area-based scalable design |

#### Practical example

The December paper explicitly gives positive directed edges and asks for Dijkstra. The February paper includes negative directed edges and asks for Bellman–Ford.

**Yaad rakho:** Distance vector → RIP; link state → OSPF.

---

## TEE · IPv4 header fields needed for the IPv6 comparison

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/packet-support--ipv4-header/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/packet-support/ipv4-header

TEE · shared foundations and Units 3–4 · current syllabus 702AI0C023

**Definition.** An IPv4 datagram contains a variable-length header followed by payload. The header supplies addressing, forwarding and fragmentation information.

**Simple meaning.** Header delivery instructions hai; payload actual carried content.

Swipe across the diagram to read its labels ↔

![IPv4 header · field widths in bits](https://deep-learning-study-room.vercel.app/cn/fig/ipv4-header.5d41e2a297.svg)

Diagram: IPv4 header · field widths in bits. Labels: IPv4 header · field widths in bits | IPv4 header · field widths in bits | Version | 4 | IHL | 4 | DS field | 8 | Total Length · 16 | Identification · 16 | Flags | 3 | Fragment Offset · 13 | TTL | 8 | Protocol | 8 | Header Checksum · 16 | Source address · 32 bits | Destination address · 32 bits | Options + padding, if present

IPv4 header fields needed for the IPv6 comparison

## Understand it step by step

1. 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.
2. Total Length includes both the IPv4 header and its payload. Identification, flags and fragment offset support fragmentation/reassembly.
3. TTL limits lifetime; Protocol identifies the upper-layer protocol. Header Checksum protects the IPv4 header, not the entire payload.
4. Source and destination are 32-bit IPv4 addresses. IPv6 changes their width and reorganizes several of these fields.

#### Practical example

An IPv4 packet with Total Length=1,000 bytes and IHL=5 has a 20-byte header and 980-byte payload.

### Practice question. Distinguish IPv4 Total Length, IHL and Protocol. [3 practice marks]

#### Answer

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.

#### Practical example

An IPv4 packet with Total Length=1,000 bytes and IHL=5 has a 20-byte header and 980-byte payload.

**Yaad rakho:** IHL words ×4 = bytes; total minus header = payload.

---

## TEE · Process-to-process communication, ports and sockets

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/transport--process/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/transport/process

TEE · Unit 5 · current syllabus 702AI0C023

### Practice question. Explain process-to-process communication and transport-layer multiplexing/demultiplexing. [5 practice marks]

#### Answer

IP delivers a packet toward a host interface. The transport layer delivers application data to a **process endpoint**, 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.

Swipe across the diagram to read its labels ↔

![Transport: from hosts to application processes](https://deep-learning-study-room.vercel.app/cn/fig/tee-ports.f496c69028.svg)

Diagram: Transport: from hosts to application processes. Labels: Transport: from hosts to application processes | Transport: from hosts to application processes | Host address selects the machine/interface | Example destination: 198.51.100.20. | Protocol + destination port select service | TCP port 443 and UDP port 53 identify different transport endpoints. | Demultiplex to the right socket | TCP clients share server port 443; their address/port tuples distinguish the connections.

Several applications share IP connectivity; ports separate their transport endpoints.

1. At the sender, transport multiplexing accepts data from several application sockets and adds the appropriate header.
2. A server normally listens on a known service port; a client commonly chooses a temporary local port.
3. At the receiver, demultiplexing uses protocol/header information to deliver data to the appropriate socket.
4. 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.

| Identifier | Purpose |
| --- | --- |
| MAC address | Delivery on a local link |
| IP address | Network-layer interface/addressing |
| Port number | Transport-layer application endpoint |
| Domain name | Application-level naming resolved through DNS |

#### Practical example

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.

**Yaad rakho:** IP host tak; port process tak.

---

## TEE · UDP services, operation and header

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/transport--udp/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/transport/udp

TEE · Unit 5 · current syllabus 702AI0C023

### Practice question. Describe UDP in detail with a labelled header diagram. Explain its services and operation. [10 practice marks]

#### Answer

**User Datagram Protocol (UDP)** provides connectionless, message-oriented process delivery. One send creates a datagram; message boundaries are retained. UDP has an **8-byte header**, 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.

Swipe across the diagram to read its labels ↔

![UDP header: each row contains 32 bits](https://deep-learning-study-room.vercel.app/cn/fig/tee-udp.b14cba3c28.svg)

Diagram: UDP header: each row contains 32 bits. Labels: UDP header: each row contains 32 bits | UDP header: each row contains 32 bits | Source port · 16 | Destination port · 16 | Length · 16 | Checksum · 16 | Total 8 bytes. Length = header + UDP payload.

UDP fixed header: four 16-bit fields, eight bytes total.

| UDP field | Width | Purpose |
| --- | --- | --- |
| Source port | 16 bits | Sending endpoint; a zero value can indicate no reply port when unused |
| Destination port | 16 bits | Receiving application endpoint |
| Length | 16 bits | UDP header plus UDP payload; minimum 8 bytes |
| Checksum | 16 bits | Error detection over UDP and an IP pseudo-header; not retransmission |

## Operation and services

1. 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.
2. The receiving UDP layer validates the length/checksum as applicable and uses the destination endpoint to deliver the datagram.
3. 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.
4. UDP checksum zero can mean checksum omitted in IPv4. IPv6 ordinarily requires the UDP checksum; specialized exceptions are outside this syllabus.

#### Practical example

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.

**Yaad rakho:** UDP datagram preserve; reliability automatic nahi.

---

## TEE · TCP features and segment structure

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/transport--tcp/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/transport/tcp

TEE · Unit 5 · current syllabus 702AI0C023

### Practice question. Explain TCP features and draw its segment header. [10 practice marks]

#### Answer

**Transmission Control Protocol (TCP)** 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.

- Connection-oriented: state is established between endpoints before ordinary data transfer.
- Reliable, ordered **byte stream**: sequence numbers, acknowledgements and retransmission handle loss; application message boundaries are not preserved.
- Full duplex: each direction has its own byte sequence and ACK information.
- Receiver flow control: advertised receive window limits data the receiver can accept.
- Congestion control: the sender also limits sending based on network conditions.
- Checksum detects corruption; ports multiplex connections. Reliability does not equal encryption.
- Segmentation divides stream bytes into transport segments; buffering and retransmission reconstruct the ordered stream.

Swipe across the diagram to read its labels ↔

![TCP header: minimum 20 bytes](https://deep-learning-study-room.vercel.app/cn/fig/tee-tcp.81a8dfb693.svg)

Diagram: TCP header: minimum 20 bytes. Labels: TCP header: minimum 20 bytes | TCP header: minimum 20 bytes | Source port · 16 | Destination port · 16 | Sequence number · 32 | Acknowledgement number · 32 | Offset / reserved / flags · 16 | Receive window · 16 | Checksum · 16 | Urgent pointer · 16 | Options + padding, if present | Data offset counts 32-bit words; minimum value 5.

TCP base header; optional fields follow the minimum 20 bytes.

| Field | Meaning |
| --- | --- |
| Source/destination ports (16 each) | Identify process endpoints |
| Sequence number (32) | First data-byte number in this segment; SYN/FIN also occupy sequence space |
| Acknowledgement number (32) | Next sequence number expected when ACK flag is set |
| Data offset (4) | TCP header length in 32-bit words; minimum 5 → 20 bytes |
| Flags | SYN establishes; ACK validates acknowledgement; FIN closes a sending direction; RST aborts; others have defined purposes |
| Window (16 base field) | Advertised receive window; scaling can be negotiated |
| Checksum (16) | Covers TCP header/data and pseudo-header |
| Urgent pointer (16) | Used with URG for the urgent indication |
| Options/padding | Optional features such as MSS; align header to 32-bit words |

#### Practical example

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.

**Yaad rakho:** TCP bytes count karta hai; writes ke borders preserve nahi.

---

## TEE · TCP connection, data and termination

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/transport--handshake/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/transport/handshake

TEE · Unit 5 · current syllabus 702AI0C023

### Practice question. What is TCP three-way handshaking? Explain establishment, data transfer and termination with labelled diagrams. [10 practice marks]

#### Answer

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.

Swipe across the diagram to read its labels ↔

![TCP: handshake, data and orderly close](https://deep-learning-study-room.vercel.app/cn/fig/tee-handshake.e053246177.svg)

Diagram: TCP: handshake, data and orderly close. Labels: TCP: handshake, data and orderly close | TCP: handshake, data and orderly close | Client | Server | SYN Seq=1000 | SYN+ACK Seq=5000, Ack=1001 | ACK Seq=1001, Ack=5001 | 200 data bytes: Seq=1001, last=1200 | ACK=1201 (next expected byte) | FIN Seq=1201 | ACK=1202; server may still send | FIN Seq=5001 (no server data here) | ACK=5002; common active-close TIME-WAIT | Pure ACK uses no sequence space. SYN and FIN each use one.

SYN and FIN each consume one sequence number; pure ACK consumes none.

| Step | Segment | Meaning |
| --- | --- | --- |
| 1 Client → server | SYN, Seq=1000 | Client proposes its starting sequence |
| 2 Server → client | SYN+ACK, Seq=5000, Ack=1001 | Server acknowledges client SYN and supplies its own start |
| 3 Client → server | ACK, Seq=1001, Ack=5001 | Client acknowledges server SYN; connection is established |

## Data transfer

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.

## Orderly termination

1. Assume client’s next data sequence is 1201. It sends FIN with Seq=1201, meaning it has finished sending.
2. Server sends ACK=1202. The connection is half closed: the server can still send data until its application finishes.
3. Assume server has sent no data since the handshake. It sends FIN with Seq=5001.
4. 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.
5. 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.

#### Practical example

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.

**Yaad rakho:** SYN plus one, FIN plus one; ACK next expected byte.

---

## TEE · UDP versus TCP versus SCTP

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/transport--comparison/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/transport/comparison

TEE · Unit 5 · current syllabus 702AI0C023

### Practice question. Compare UDP, TCP and SCTP on at least eight points. [10 practice marks]

#### Answer

| Point | UDP | TCP | SCTP |
| --- | --- | --- | --- |
| Service unit | Datagram; preserves messages | Byte stream; no message boundaries | Messages carried in chunks; preserves boundaries |
| Connection setup | No protocol handshake | Connection; usual three-way SYN exchange | Association; four-message cookie exchange |
| Reliability | No delivery/order guarantee | Reliable ordered stream | Reliable messages; ordered per stream by default, unordered option |
| Ordering scope | None supplied | One ordered byte stream per direction | Multiple streams; per-stream order avoids blocking every stream on one stream’s ordering gap |
| Flow control | Not supplied by UDP | Receiver-advertised window | Receiver flow control |
| Congestion control | Not supplied by UDP | Yes | Yes |
| Multihoming | No built-in association failover | Classic TCP uses one address pair | Association can bind multiple addresses; built-in path failover |
| Header | 8 bytes | Minimum 20 bytes | 12-byte common header plus chunks |
| Typical use | DNS, real-time applications with their own controls | Web over HTTP/1.1 or HTTP/2, reliable byte transfers | Telecom signalling and multi-stream message applications |
| Performance claim | Low protocol overhead, not automatically fastest overall | Recovery/ordering have costs and benefits | Extra capabilities; no universal speed ranking |

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.

#### Practical example

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.

**Yaad rakho:** UDP messages simple; TCP byte stream; SCTP reliable message streams.

---

## TEE · SCTP association, chunks and multiple streams

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/transport--sctp/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/transport/sctp

TEE · Unit 5 · current syllabus 702AI0C023

### Practice question. Explain SCTP, its association setup, multistreaming and multihoming. [7 practice marks]

#### Answer

**Stream Control Transmission Protocol (SCTP)** is a reliable message-oriented transport. A relationship between endpoints is an **association**. Its packets contain a common header followed by chunks, which carry data or control information.

Swipe across the diagram to read its labels ↔

![SCTP association setup](https://deep-learning-study-room.vercel.app/cn/fig/tee-sctp.55048562bb.svg)

Diagram: SCTP association setup. Labels: SCTP association setup | SCTP association setup | Endpoint A | Endpoint B | INIT | INIT ACK + state cookie | COOKIE ECHO | COOKIE ACK | Stream 0 ordered messages; stream 1 separately ordered messages. | Multihoming supplies alternate paths, not automatic rate addition.

SCTP four-message association setup and independent ordered streams.

1. 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.
2. 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.
3. 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.
4. Multihoming lets endpoints advertise multiple addresses, supporting alternate paths and failover. Standard multihoming does not automatically mean all paths’ bandwidth is aggregated.
5. SCTP supplies retransmission, selective acknowledgements, receiver flow control and congestion control. Its common header is 12 bytes; chunks add their own headers and data.

#### Practical example

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.

**Yaad rakho:** SCTP association: streams separate order, addresses provide failover.

---

## TEE · Open-loop and closed-loop congestion control

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/congestion--policies/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/congestion/policies

TEE · Unit 5 · current syllabus 702AI0C023

### Practice question. Explain open-loop and closed-loop congestion control. Describe at least two policies from each and distinguish congestion from flow control. [10 practice marks]

#### Answer

**Congestion** 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. **Flow control** protects a receiver; congestion control protects the network.

Swipe across the diagram to read its labels ↔

![Two congestion-control approaches](https://deep-learning-study-room.vercel.app/cn/fig/tee-congestion.c27c2303bb.svg)

Diagram: Two congestion-control approaches. Labels: Two congestion-control approaches | Two congestion-control approaches | Open loop: prevent overload | Admission rules and retransmission/window/ACK policies reduce avoidable traffic before congestion | feedback. | Closed loop: observe and signal | Detect queues, loss or explicit congestion marks; return feedback toward the sender. | Change behaviour | Reduce offered load or change resource use. Receiver flow control addresses a different bottleneck.

Open-loop prevention and closed-loop feedback.

| Approach | Policy / mechanism | How it helps |
| --- | --- | --- |
| Open loop: prevent congestion without runtime congestion feedback | Retransmission policy | Carefully chosen timers/selective retransmission avoid needless extra traffic |
| Open loop | Window policy | Limit outstanding data and avoid excessive retransmission after loss |
| Open loop | Acknowledgement policy | Avoid unnecessarily frequent ACK traffic while retaining correct recovery |
| Open loop | Admission policy | Refuse new load when reserved capacity is insufficient |
| Closed loop: measure and react to congestion | Backpressure | A congested node tells upstream nodes to reduce/stop sending, possibly propagating hop by hop |
| Closed loop | Choke/control signalling | A congested node sends explicit feedback to the source |
| Closed loop | Implicit signalling | A sender infers congestion from loss/delay and changes its sending behaviour |
| Closed loop | Explicit marking | Network marks congestion (for example ECN); endpoints react to returned information |

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.

#### Practical example

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.

**Yaad rakho:** Open loop pehle prevent; closed loop feedback se react.

---

## TEE · TCP congestion window and classic control phases

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/congestion--tcp-control/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/congestion/tcp-control

TEE · Unit 5 · current syllabus 702AI0C023

### Practice question. Explain the congestion window and the basic slow-start/congestion-avoidance idea in TCP. [5 practice marks]

#### Answer

A TCP sender is limited by receiver capacity and network capacity. The **receive window rwnd** comes from the receiver; the **congestion window cwnd** is maintained by the sender. Roughly, allowed outstanding data is min(rwnd,cwnd), with the existing bytes in flight subtracted before sending new bytes.



$$
\mathrm{new\ allowance}=\max(0,\min(rwnd,cwnd)-\mathrm{bytes\ in\ flight})
$$



1. In classic slow start, cwnd grows rapidly as ACKs arrive; under a simplified round-based model it approximately doubles each RTT.
2. At the slow-start threshold, congestion avoidance grows more cautiously; classic additive increase is approximately one MSS per RTT.
3. 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.
4. Fast retransmit can infer a missing segment from duplicate ACK evidence. It is distinct from waiting for a retransmission timeout.
5. 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.

#### Practical example

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.

---

## TEE · QoS metrics and improving techniques

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/congestion--qos/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/congestion/qos

TEE · Unit 5 · current syllabus 702AI0C023

### Practice question. Define QoS, explain its parameters and describe techniques used to improve it. [7 practice marks]

#### Answer

**Quality of Service (QoS)** 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.

| Technique | Mechanism | Tradeoff |
| --- | --- | --- |
| Scheduling | FIFO, priority or fair/weighted queues choose which packet transmits next | Strict priority may starve lower classes; fair scheduling balances shares |
| Traffic shaping | Delay departures to match a profile | Smooths load but adds queueing delay |
| Policing | Measure compliance; mark/drop nonconforming packets according to policy | Controls excess traffic but can lose packets |
| Admission control | Accept new flows only when resources can support them | Protects existing service by refusing excess demand |
| Resource allocation/reservation | Assign bandwidth/buffer/service resources | Requires capacity planning and coordination |
| Classification/marking | Identify traffic classes and carry service markings | Marking alone does not create capacity or guarantees |

#### Practical example

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.

**Yaad rakho:** Bandwidth, delay, jitter, loss; requirement ke hisaab se policy.

---

## TEE · Leaky-bucket operation and tradeoffs

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/congestion--leaky/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/congestion/leaky

TEE · Unit 5 · current syllabus 702AI0C023

### Practice question. Draw and explain the leaky-bucket algorithm. Is it always better than a token bucket? [10 practice marks]

#### Answer

In the textbook **leaky-bucket queue/shaper** 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.

Swipe across the diagram to read its labels ↔

![Leaky-bucket data queue](https://deep-learning-study-room.vercel.app/cn/fig/tee-leaky.77bdbcf957.svg)

Diagram: Leaky-bucket data queue. Labels: Leaky-bucket data queue | Leaky-bucket data queue | Bursty arrivals enter finite buffer B | Accept packets that fit; the stated queue model drops overflow. | Queue drains at configured rate r | Send while data exists. An empty queue produces no packets. | Smoother departure stream | Buffering adds delay; idle service cannot be saved for a later burst.

Finite data buffer smooths a burst into a bounded departure rate.

1. Choose buffer capacity B and output service rate r in consistent units.
2. Admit arrivals that fit. Drop/mark overflow according to the stated implementation; this queue example drops the excess.
3. Drain at rate r while the queue is nonempty. Idle time does not accumulate permission for a later faster burst.
4. The result is smoothed output. Larger buffers accommodate larger bursts but can increase waiting delay.

| Advantage | Limitation |
| --- | --- |
| Simple bound on output rate | Bursts may overflow or suffer delay |
| Reduces short-term output variation | Unused idle service cannot be saved |
| Useful for predictable traffic shaping | No end-to-end delay/loss guarantee by itself |

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.

#### Practical example

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.

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.

**Yaad rakho:** Leaky bucket stores data; idle service save nahi hota.

---

## TEE · Token-bucket operation and limitations

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/congestion--token/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/congestion/token

TEE · Unit 5 · current syllabus 702AI0C023

### Practice question. Draw and explain the token-bucket algorithm. State at least two limitations. [10 practice marks]

#### Answer

A **token bucket** 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.

Swipe across the diagram to read its labels ↔

![Token bucket: permission is separate from data](https://deep-learning-study-room.vercel.app/cn/fig/tee-token.c3ff1dbf76.svg)

Diagram: Token bucket: permission is separate from data. Labels: Token bucket: permission is separate from data | Token bucket: permission is separate from data | Token generator adds r tokens per second | Store at most B tokens; extra tokens disappear when the bucket is full. | Packet of L bytes requests L tokens | Enough tokens: deduct L and permit transmission, subject to link speed. | Insufficient tokens: policy matters | Shaper buffers/waits. Policer marks or drops according to policy. | Saved tokens permit bounded bursts | Initially full: allowance over t ≤ B + rt. This alone is not an end-to-end QoS guarantee.

Tokens store permission; the separate data queue stores packets.

1. Initialize a stated token count, often B for a full bucket. Add rΔt tokens over elapsed time, capped at B.
2. 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.
3. If tokens are insufficient, a **shaper** waits/buffers until enough are available. A **policer** marks or drops nonconforming traffic according to policy. Token shortage does not universally mean drop.
4. Over interval t, a full token bucket bounds admitted data by B+rt. Actual output is also limited by link capacity and packet scheduling.
5. Unlike the queue-style leaky bucket, token storage allows limited bursts after idle time. It bounds average rate and burst size separately.



$$
\mathrm{admitted\ data}(t)\le B+rt
$$



| Limitation | Reason |
| --- | --- |
| Bursts can still congest downstream queues | Local conformance does not ensure every later link has capacity |
| Parameters must match traffic and link requirements | A small B delays/drops legitimate packets; a large B permits disruptive bursts |
| No complete QoS guarantee alone | Admission, scheduling and end-to-end capacity may still be needed |

#### Practical example

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.

**Yaad rakho:** Token permission store hota hai; actual packet alag queue mein.

---

## TEE · Leaky bucket versus token bucket

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/congestion--bucket-compare/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/congestion/bucket-compare

TEE · Unit 5 · current syllabus 702AI0C023

### Practice question. Compare the leaky-bucket queue model and token bucket and recommend a use for each. [5 practice marks]

#### Answer

| Point | Leaky data queue | Token bucket |
| --- | --- | --- |
| Stored state | Queued data | Tokens representing permission |
| Idle period | Empty queue; unused service lost | Tokens accumulate up to B |
| Output burst | Smoothed by configured service rate | Allowed if enough tokens and physical capacity exist |
| Overflow/shortage | Finite queue can overflow | Shaper waits; policer may mark/drop |
| Main parameters | Queue capacity and drain rate | Token capacity and generation rate |
| Useful when | A smoother output profile is required | Average rate plus burst allowance is required |

#### Practical example

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.

---

## TEE · WWW and the complete HTTP request journey

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/applications--http/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/applications/http

TEE · Unit 6 · current syllabus 702AI0C023

### 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. [10 practice marks]

#### Answer

The **World Wide Web (WWW)** 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. **HTTP** defines request/response semantics between these components. The Web is one application of the Internet, not a synonym for the entire Internet.

Swipe across the diagram to read its labels ↔

![Opening a plain HTTP/1.1 URL](https://deep-learning-study-room.vercel.app/cn/fig/tee-http.de65bc75dd.svg)

Diagram: Opening a plain HTTP/1.1 URL. Labels: Opening a plain HTTP/1.1 URL | Opening a plain HTTP/1.1 URL | Browser parses http://www.example.com/ | Scheme=http, host=www.example.com, path=/, default port=80. | DNS resolves the host | A cached or newly resolved address identifies the target endpoint. | TCP establishes the connection | For this HTTP/1.1 example, client connects to server port 80. | HTTP request → HTTP response | GET / with Host header → status, headers and representation body. | Browser parses and displays | HTML may refer to extra objects, each needing retrieval or cache lookup.

URL → DNS → connection → HTTP request/response → displayed document.

1. Interpret the URL **http://www.example.com/**: 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.
2. Resolve the hostname using DNS, often via cached results and a recursive resolver. DNS finds an address; it does not download the Web page.
3. 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.
4. 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.
5. 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.
6. The browser parses HTML, retrieves referenced objects as needed and renders the page. Caching may avoid transfers; persistent connections can serve multiple requests.

| Message component | Purpose |
| --- | --- |
| Request method / target | Requested action and resource; GET retrieves a representation, POST submits data for processing |
| Headers | Metadata, routing context, representation preferences and cache/connection information |
| Status code | Result class: 2xx success, 3xx redirection, 4xx client error, 5xx server error |
| Body | Representation or submitted content when present |

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.

#### Practical example

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.

**Yaad rakho:** DNS address dhoondta; HTTP resource mangta; browser render karta.

---

## TEE · HTTP methods, status, persistence and HTTPS

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/applications--http-state/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/applications/http-state

TEE · Unit 6 · current syllabus 702AI0C023

### Practice question. Explain HTTP request/response structure, persistent connections, status codes and the role of HTTPS. [5 practice marks]

#### Answer

| Concept | Explanation | Example |
| --- | --- | --- |
| GET | Retrieve the selected representation | Read a page |
| POST | Ask the resource to process submitted content | Submit a form |
| PUT / DELETE | Replace target representation / request removal according to server semantics | Update/delete an API resource |
| 200 / 301 / 404 / 500 | Success / permanent redirect / not found / server error | Read status before interpreting body |
| Persistent connection | Reuse a connection for multiple exchanges | Avoid repeated TCP setup for each image |
| Cookie/session token | Carry an identifier so the application can relate requests | Remain signed in |
| HTTPS | HTTP protected by authenticated encryption through TLS in common deployments | Protect credentials and content in transit |

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.

#### Practical example

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.

---

## TEE · DNS hierarchy, delegation and uniqueness

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/applications--dns/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/applications/dns

TEE · Unit 6 · current syllabus 702AI0C023

### Practice question. With a neat diagram, explain the hierarchical domain namespace in DNS and how it ensures unique domain names. [10 practice marks]

#### Answer

The **Domain Name System (DNS)** 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.

Swipe across the diagram to read its labels ↔

![DNS namespace: full label paths are unique](https://deep-learning-study-room.vercel.app/cn/fig/tee-dns.f5345fe9fb.svg)

Diagram: DNS namespace: full label paths are unique. Labels: DNS namespace: full label paths are unique | DNS namespace: full label paths are unique | Root . | com | org | example.com | example.org | www.example.com | www.example.org | Same local label “www”; different full names, so no collision.

Root, top-level domains, delegated domain and host labels.

| Level | Example | Meaning |
| --- | --- | --- |
| Root | . | Top of the namespace |
| Top-level domain (TLD) | com, org, in | A child zone below the root |
| Registered/delegated domain | example.com | Name under a parent such as com |
| Subdomain/host label | www.example.com | A label below example.com; a name may own different record types |

## Why names remain unique

1. 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.
2. 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.
3. 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.
4. 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.

## Resolution

1. A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.
2. 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.
3. 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.

#### Practical example

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.

**Yaad rakho:** Full path unique; www label akela unique nahi.

---

## TEE · DNS records, recursive/iterative queries and caching

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/applications--dns-records/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/applications/dns-records

TEE · Unit 6 · current syllabus 702AI0C023

### Practice question. Explain common DNS resource records, recursive versus iterative queries and caching. [5 practice marks]

#### Answer

| Record | Purpose | Example meaning |
| --- | --- | --- |
| A | IPv4 address | Name → IPv4 address |
| AAAA | IPv6 address | Name → IPv6 address |
| NS | Authoritative server names for a zone/delegation | Which nameservers serve the zone |
| CNAME | Alias to another canonical name | Alias → target name; not an IP address |
| MX | Mail exchanger preference and hostname | Where email for a domain should be routed |
| PTR | Reverse-mapping pointer | Address-related reverse name → domain name |
| SOA | Zone administrative/version/timing information | Start of authority for zone data |

## TTL is a record field, not a record type

The **time to live (TTL)** 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.

#### Practical example

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.

In a **recursive query**, the queried resolver is asked to obtain a final answer or error for the client. With **iterative resolution**, 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.

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.

#### Practical example

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.

---

## TEE · FTP control/data connections and active/passive modes

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/applications--ftp/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/applications/ftp

TEE · Unit 6 · current syllabus 702AI0C023

### Practice question. Explain FTP and the functions of its control and data connections. Illustrate the transfer process. [10 practice marks]

#### Answer

**File Transfer Protocol (FTP)** 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.

Swipe across the diagram to read its labels ↔

![FTP: separate control and data connections](https://deep-learning-study-room.vercel.app/cn/fig/tee-ftp.1b305fa997.svg)

Diagram: FTP: separate control and data connections. Labels: FTP: separate control and data connections | FTP: separate control and data connections | Client → server TCP port 21 | Control: USER, PASS, CWD, TYPE, RETR/STOR/LIST, QUIT; server replies. | Active mode: server initiates data | Client provides a listening endpoint; traditional server data source port is 20. | Passive mode: client initiates data | Server advertises an endpoint; client connects to that selected port. | Data connection carries file/listing bytes | Command channel stays separate; another operation can open another data connection.

Control connection on server port 21; active/passive data connection roles differ.

| Connection | Function | Lifetime / ports |
| --- | --- | --- |
| Control | Commands and replies: USER, PASS, CWD, TYPE, LIST, RETR, STOR, QUIT | Client connects to server TCP port 21; normally kept for the session |
| Data | File contents and directory listing data | Opened as needed; separate from command channel |

## How a transfer works

1. Client opens the control connection and exchanges server greeting, login commands and replies. Plain FTP sends credentials/data without encryption.
2. Client chooses transfer settings such as binary/image mode for arbitrary bytes, and requests the needed working directory/operation.
3. In **active FTP**, the client provides a listening endpoint and the server initiates the data connection, traditionally from server port 20.
4. In **passive FTP**, 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.
5. 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.
6. QUIT ends the control session.

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.

#### Practical example

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.

**Yaad rakho:** Control commands, data file; passive mein client dono connect karta.

---

## TEE · SMTP phases, commands and email flow

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/applications--smtp/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/applications/smtp

TEE · Unit 6 · current syllabus 702AI0C023

### Practice question. Explain SMTP and its role in email. Describe communication phases and typical commands with a labelled client-server diagram. [10 practice marks]

#### Answer

**Simple Mail Transfer Protocol (SMTP)** 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.

Swipe across the diagram to read its labels ↔

![SMTP: envelope, message and completion](https://deep-learning-study-room.vercel.app/cn/fig/tee-smtp.c6f99877c4.svg)

Diagram: SMTP: envelope, message and completion. Labels: SMTP: envelope, message and completion | SMTP: envelope, message and completion | SMTP sender | Receiving server | 220 greeting | EHLO sender.example | 250 capabilities | MAIL FROM:<sender@example.com> | RCPT TO:<receiver@example.org> | DATA (after successful envelope replies) | 354 start mail input | Headers + blank line + body + dot line | 250 accepted; then QUIT / server 221 | SMTP submits/relays. Inbox reading uses IMAP/POP or webmail. | Envelope MAIL/RCPT differs from visible From/To headers.

Submission/relay use SMTP; reading an inbox uses a separate access protocol.

| Phase | Typical exchange | Purpose |
| --- | --- | --- |
| Connection and greeting | Server 220; client EHLO (HELO for basic SMTP); server 250 capabilities | Identify peers and learn supported extensions |
| Envelope transfer | MAIL FROM:<sender>; RCPT TO:<recipient>; 250 replies | Declare return path and one or more delivery recipients |
| Message transfer | DATA; server 354; headers + blank line + body; single dot line; server 250 | Transmit the message after server permission; completion reply accepts responsibility |
| Termination | QUIT; server 221 | Close the SMTP session cleanly |

## Message flow and important details

1. 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.
2. The sending server resolves the recipient domain’s MX records, connects to an appropriate mail server and carries out the SMTP exchange.
3. MAIL FROM and RCPT TO are the **envelope**; visible From/To headers inside DATA are message content and can differ. Multiple RCPT TO commands can name several recipients.
4. 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.
5. 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.
6. The recipient reads stored mail using an access protocol such as IMAP/POP3 or webmail. SMTP is not the mailbox-retrieval protocol.

#### Practical example

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.

**Yaad rakho:** SMTP send/relay; inbox read IMAP/POP/webmail.

---

## TEE · Compare the four application protocols

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/read/applications--protocol-summary/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/read/applications/protocol-summary

TEE · Unit 6 · current syllabus 702AI0C023

### Practice question. Compare HTTP, DNS, FTP and SMTP in terms of purpose, operation and common ports. [5 practice marks]

#### Answer

| Protocol | Purpose | Communication pattern | Common transport/port |
| --- | --- | --- | --- |
| HTTP | Transfer Web resource representations | Client requests; server responds | Plain HTTP/1.1 TCP 80; HTTPS commonly 443; version/transport matters |
| DNS | Resolve names and other naming records | Queries, referrals, answers and caching | UDP/TCP 53 in classic DNS |
| FTP | Transfer files and listings | Persistent command channel plus separate data connection | TCP control 21; active data traditionally 20, passive chosen port |
| SMTP | Submit/relay email | Greeting, envelope, DATA, termination; queued relay | TCP 25 relay; 587 submission |

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.

#### Practical example

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.

---

## TEE · ALOHA formulas and maximum values

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/formulas/formulas--aloha/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/formulas/formulas/aloha

Core units, ALOHA, address and routing rules; illustrative values are practice



$$
G=\lambda T_f
$$



λ=aggregate attempts/s; G=attempts/frame time.



$$
S_{\mathrm{pure}}=Ge^{-2G}
$$



Maximum 1/(2e)≈0.18394 at G=0.5.



$$
S_{\mathrm{slotted}}=Ge^{-G}
$$



Maximum 1/e≈0.367879 at G=1.



$$
F_{\mathrm{success}}=S/T_f
$$



Convert normalized S into successful frames/s.



$$
B_{\mathrm{success}}=SR
$$



Successful full-frame bits/s; not necessarily application payload goodput.



$$
P(\mathrm{success\ per\ attempt})=S/G
$$



For G>0. Do not confuse this probability with normalized throughput S.

## Learn it with complete solutions

[Five fully worked rate questions](https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--rate-1/)

---

## TEE · Masks and address blocks

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/formulas/formulas--ipv4/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/formulas/formulas/ipv4

Core units, ALOHA, address and routing rules; illustrative values are practice



$$
h=32-p,\quad N=2^h
$$



p=prefix bits, h=host bits, N=total addresses.



$$
U=2^h-2
$$



Ordinary usable-host count. /31 point-to-point and /32 are exceptions.



$$
\text{step}=256-M
$$



M is the first mask octet not equal to 255.



$$
\text{network}=\text{address AND mask}
$$



Bitwise AND keeps network bits and clears host bits.



$$
\text{broadcast}=\text{network}+(N-1)
$$



Use full address arithmetic, not an overflowing final octet.

## Learn it with complete solutions

[Nine complete address-block examples](https://deep-learning-study-room.vercel.app/read/cn/tee/read/subnets--block-1/)

---

## TEE · Host sizing, VLSM and aggregation

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/formulas/formulas--design/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/formulas/formulas/design

Core units, ALOHA, address and routing rules; illustrative values are practice



$$
2^h-2\geq H
$$



H requested usable hosts. Smallest sufficient h gives smallest ordinary subnet.



$$
2^s\geq K,\quad p_{new}=p_{old}+s
$$



K equal subnets required; s borrowed bits. Do not subtract two from modern subnet count.



$$
p=32-\log_2(N)
$$



For a power-of-two total address requirement, subject to boundary alignment.

## Learn it with complete solutions

[Three full VLSM designs](https://deep-learning-study-room.vercel.app/read/cn/tee/read/cidr--vlsm-1/)

---

## TEE · Routing updates and path costs

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/formulas/formulas--routing/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/formulas/formulas/routing

Core units, ALOHA, address and routing rules; illustrative values are practice



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



Old destination distance versus cost to u plus edge u→v.



$$
D_x(y)=\min_{v\in N(x)}\{c(x,v)+D_v(y)\}
$$



Distance vector: local link cost plus neighbour advertisement.



$$
\mathrm{RIP\ metric}=\min(16,\mathrm{link\ cost}+\mathrm{advertisement})
$$



16 represents unreachable. Ordinary hop increments commonly equal 1.

## Learn it with complete solutions

[Full Dijkstra solution](https://deep-learning-study-room.vercel.app/read/cn/tee/read/routing--dijkstra-1/)

---

## TEE · Full forms and one-line meanings

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/formulas/tee-formulas--full-forms/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/formulas/tee-formulas/full-forms

TEE · Complete six-unit quick reference · current syllabus 702AI0C023

| Term | Full form | Meaning |
| --- | --- | --- |
| OSI | Open Systems Interconnection | Seven-layer reference model |
| TCP/IP | Transmission Control Protocol / Internet Protocol | Internet protocol suite |
| LAN / MAN / PAN / WAN | Local / Metropolitan / Personal / Wide Area Network | Network-scope classifications |
| ARPANET | Advanced Research Projects Agency Network | Historical packet network |
| CRC | Cyclic Redundancy Check | Polynomial error detection |
| ARQ | Automatic Repeat reQuest | Feedback/timer-based retransmission |
| GBN / SR | Go-Back-N / Selective Repeat | Sliding-window ARQ strategies |
| FEC | Forward Error Correction | Recover using coding redundancy |
| CSMA | Carrier Sense Multiple Access | Sense medium before access |
| CD / CA | Collision Detection / Collision Avoidance | Two different medium-access strategies |
| CIDR | Classless Inter-Domain Routing | Prefix-based allocation and aggregation |
| VLSM | Variable Length Subnet Mask | Different subnet sizes within a block |
| ARP / RARP | Address Resolution Protocol / Reverse ARP | Local IPv4-to-hardware mapping / historical reverse mapping |
| DHCP | Dynamic Host Configuration Protocol | Leased network configuration |
| RIP | Routing Information Protocol | Distance-vector protocol using hop metric |
| OSPF | Open Shortest Path First | Link-state interior routing protocol |
| LSA | Link State Advertisement | Topology information advertised in link-state routing |
| UDP | User Datagram Protocol | Connectionless datagram transport |
| SCTP | Stream Control Transmission Protocol | Reliable message-oriented multi-stream transport |
| QoS | Quality of Service | Bandwidth, delay, jitter, loss properties |
| RTT / MSS | Round-Trip Time / Maximum Segment Size | Round-trip delay / TCP data-size parameter |
| HTTP / WWW | Hypertext Transfer Protocol / World Wide Web | Web request-response protocol / linked-resource system |
| DNS | Domain Name System | Distributed hierarchical naming |
| FTP | File Transfer Protocol | Separate file-control and data connections |
| SMTP | Simple Mail Transfer Protocol | Mail submission/relay |
| TTL | Time To Live | Meaning depends on context: IP lifetime field or DNS cache duration |
| ACK / SYN / FIN | Acknowledgement / Synchronize / Finish | TCP control concepts; SYN and FIN consume sequence space |

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.

---

## TEE · Protocol facts worth writing accurately

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/formulas/tee-formulas--protocol-facts/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/formulas/tee-formulas/protocol-facts

TEE · Complete six-unit quick reference · current syllabus 702AI0C023

| Topic | Exact fact |
| --- | --- |
| OSI / TCP-IP | Seven OSI layers; four TCP/IP layers here; five-layer teaching model splits link |
| CRC | Zero syndrome means no error detected, not certainty of no errors |
| GBN / SR ACK | This course: GBN ACK k=next expected; SR ACK k=individual frame accepted |
| IPv4 / IPv6 | 32-/128-bit addresses; IPv6 base header 40 bytes; no IPv6 broadcast |
| UDP / TCP / SCTP | UDP 8-byte header; TCP minimum 20; SCTP common 12 plus chunks |
| TCP data | Bytes counted; ACK next expected; SYN and FIN each consume one; pure ACK none |
| RIP | Metric 16 means unreachable; 15 is highest reachable hop metric |
| OSPF | Hello, Database Description, Link State Request, Link State Update, Link State Acknowledgment |
| HTTP | Default plain HTTP port 80; HTTPS commonly 443; HTTP/3 uses QUIC/UDP |
| DNS | Classic DNS uses UDP and TCP 53, not UDP only |
| FTP | Control TCP 21; active data traditionally server 20; passive port negotiated |
| SMTP | Server relay TCP 25; submission commonly 587; SMTP does not retrieve inboxes |
| Token shortage | Shaper delays; policer applies mark/drop policy; behaviour must be specified |

---

## TEE · Paper-backed coding formulas

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/formulas/tee-formulas--exam-coding/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/formulas/tee-formulas/exam-coding

TEE · Complete six-unit quick reference · current syllabus 702AI0C023

Question families present in the supplied papers: final Q2(a), re-exam Q2(a).



$$
r=n-k,\quad R_c=k/n
$$



k data bits, n codeword bits, r redundant bits; coding rate is dimensionless.



$$
d(a,b)=\operatorname{weight}(a\oplus b)
$$



Count differing bit positions in equal-length words.



$$
s=d_{\min}-1,\quad t=\lfloor(d_{\min}-1)/2\rfloor
$$



Separate maximum guaranteed detection and correction counts; all distinct pairs define dmin.



$$
R(x)=x^rM(x)\bmod G(x),\quad T=x^rM\oplus R
$$



Generator degree r; append r zeros and use modulo-2 XOR division. Receiver divides T directly.

---

## TEE · Paper-backed ARQ window formulas

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/formulas/tee-formulas--exam-arq/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/formulas/tee-formulas/exam-arq

TEE · Complete six-unit quick reference · current syllabus 702AI0C023

Question families present in the supplied papers: final Q5(a); re-exam Q5(a) explains GBN.



$$
N=2^m,\quad W_{GBN}\le N-1,\quad W_{R,GBN}=1
$$



m sequence bits; sequence numbers 0…N−1. GBN receiver accepts only next in order.



$$
W_{S,SR}=W_{R,SR}\le N/2
$$



Standard equal-window SR bound; prevent successive windows overlapping.

---

## TEE · Frame time for ALOHA

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/formulas/tee-formulas--exam-units/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/formulas/tee-formulas/exam-units

TEE · Complete six-unit quick reference · current syllabus 702AI0C023



$$
T_f=L/R
$$



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.

[Worked ALOHA rate example](https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--rate-1/)

---

## TEE · IPv6 expansion and header facts

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/formulas/tee-formulas--exam-headers/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/formulas/tee-formulas/exam-headers

TEE · Complete six-unit quick reference · current syllabus 702AI0C023



$$
\mathrm{omitted\ groups}=8-\mathrm{visible\ groups}
$$



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.

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.

[Worked IPv6 expansion](https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv6--expand-1/)

---

## TEE · Read the original TEE instructions first

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-pyq-guide--pattern/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-pyq-guide/pattern

TEE · Latest papers first; older variants mapped to current syllabus

## The two latest 2025–26 papers

Both supplied original question papers contain three pages, are for 100 marks and allow three hours. **Q1 is compulsory; attempt any four of Q2–Q7. Every whole question is 20 marks.** All 18 parts of each paper are solved here, including the choices you would not attempt in one sitting.

| Whole question | Part marks | Total |
| --- | --- | --- |
| Q1 | 5+5+5+5 | 20 |
| Q2 | 10+10 | 20 |
| Q3 | 5+5+10 | 20 |
| Q4 | 10+10 | 20 |
| Q5 | 10+10 | 20 |
| Q6 | 5+5+10 | 20 |
| Q7 | 10+10 | 20 |

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.

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.

## Older papers and distinct variants

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.

---

## TEE · Source answer-key corrections that affect exam working

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-pyq-guide--corrections/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-pyq-guide/corrections

TEE · Latest papers first; older variants mapped to current syllabus

| Source | Problem | Verified treatment |
| --- | --- | --- |
| Final Q4(a), IPv6 | Scheme prose says four omitted groups although five groups are visible | :: inserts three groups; full address 0000:0015:0000:0000:0000:0001:0012:1213 |
| Re-exam Q2(a), CRC | Scheme gives CRC 100 but once prints transmitted frame 110010111 | CRC is 100 and frame is 110010100; receiver division is zero |
| Re-exam Q6(b), ALOHA | Scheme multiplies offered frames/s by normalized S for the 500 and 250 cases | Successful frames/s = S/T = offered rate × e^(−2G); results approximately 183.94 and 151.63 frames/s |
| Re-exam Q6(c), transport comparison | Scheme implies a universal UDP/TCP/SCTP speed ranking | Explain overhead/features; real performance depends on workload and network |
| Bucket descriptions | Output described as constant regardless of whether data exists | A data queue drains at configured rate only while nonempty; no packets are created |
| Current syllabus Unit 3 | Printed CDMA/CA in the random-access list | Teach standard CSMA/CA and disclose the apparent typo; CDMA is a separate method |

The question paper fixes the question. An inconsistent scheme is not copied into a solved answer. Arithmetic checks and protocol references support the corrections.

---

## TEE · Every paper: question, unit, marks and solved answer

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-pyq-guide--question-map/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-pyq-guide/question-map

TEE · Latest papers first; older variants mapped to current syllabus

## Use this map with the solved papers

Each row links directly to the full question and its answer. **Offered marks** count all printed choices; **attempted marks** 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.

**Types:** Numerical = calculations; Theory = explain/compare; Mixed = calculations with explanation; Case = apply or design a system. A case can contain substantial calculation.

## 2026-02-04 · Re-examination · current 2025–26 paper

**100 marks to attempt; 140 marks offered.** Q1 compulsory; choose any four complete questions from Q2–Q7. Each whole question carries 20 marks.

**Offered marks by current unit:** 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.

| Question | Marks | Current unit and topic | Type | Answer |
| --- | --- | --- | --- | --- |
| **Q1(a)** | 5 | Unit 1 · Client-server and peer-to-peer models | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q1a/) |
| **Q1(b)** | 5 | Unit 2 · TCP/IP reference model | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q1b/) |
| **Q1(c)** | 5 | Unit 3 · Pure ALOHA throughput | Mixed | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q1c/) |
| **Q1(d)** | 5 | Unit 4 · IPv4 CIDR address block | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q1d/) |
| **Q2(a)** | 10 | Unit 3 · CRC polynomial division | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q2a/) |
| **Q2(b)** | 10 | Unit 4 · VLSM subnet allocation | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q2b/) |
| **Q3(a)** | 5 | Unit 1 · Network definition and topology | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q3a/) |
| **Q3(b)** | 5 | Unit 4 · OSPF shortest-path calculation | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q3b/) |
| **Q3(c)** | 10 | Unit 6 · DNS namespace and resolution | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q3c/) |
| **Q4(a)** | 10 | Unit 4 · IPv6 packet header | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q4a/) |
| **Q4(b)** | 10 | Unit 5 · TCP connection lifecycle | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q4b/) |
| **Q5(a)** | 10 | Unit 3 · Go-Back-N normal, loss and ACK cases | Mixed | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q5a/) |
| **Q5(b)** | 10 | Unit 6 · FTP control/data connections | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q5b/) |
| **Q6(a)** | 5 | Unit 2 · Guided/unguided media and optical fibre | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q6a/) |
| **Q6(b)** | 5 | Unit 3 · Pure ALOHA at three offered loads | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q6b/) |
| **Q6(c)** | 10 | Unit 5 · UDP, TCP and SCTP comparison | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q6c/) |
| **Q7(a)** | 10 | Unit 4 · Bellman-Ford shortest path | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q7a/) |
| **Q7(b)** | 10 | Unit 5 · Leaky bucket versus token bucket | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q7b/) |

## 2025-12-05 · Final examination · current 2025–26 paper

**100 marks to attempt; 140 marks offered.** Q1 compulsory; choose any four complete questions from Q2–Q7. Each whole question carries 20 marks.

**Offered marks by current unit:** 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.

| Question | Marks | Current unit and topic | Type | Answer |
| --- | --- | --- | --- | --- |
| **Q1(a)** | 5 | Unit 2 · Wired and wireless media | Case | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q1a/) |
| **Q1(b)** | 5 | Unit 2 · OSI and TCP/IP models | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q1b/) |
| **Q1(c)** | 5 | Unit 3 · Slotted ALOHA throughput | Mixed | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q1c/) |
| **Q1(d)** | 5 | Unit 4 · IPv4 CIDR address block | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q1d/) |
| **Q2(a)** | 10 i: 2; ii: 2; iii: 2; iv: 4 | Unit 3 · Block coding and Hamming distance | Mixed | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q2a/) |
| **Q2(b)** | 10 | Unit 4 · Circuit, message and packet switching | Case | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q2b/) |
| **Q3(a)** | 5 | Unit 1 · Network classifications and ARPANET | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q3a/) |
| **Q3(b)** | 5 | Unit 4 · OSPF packet types | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q3b/) |
| **Q3(c)** | 10 | Unit 6 · WWW and HTTP | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q3c/) |
| **Q4(a)** | 10 | Unit 4 · IPv6 expansion and header | Mixed | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q4a/) |
| **Q4(b)** | 10 | Unit 5 · UDP and TCP | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q4b/) |
| **Q5(a)** | 10 | Unit 3 · Selective Repeat sequence space and windows | Mixed | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q5a/) |
| **Q5(b)** | 10 | Unit 6 · SMTP phases | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q5b/) |
| **Q6(a)** | 5 | Unit 2 · Unguided transmission media | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q6a/) |
| **Q6(b)** | 5 | Unit 3 · CSMA persistence | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q6b/) |
| **Q6(c)** | 10 | Unit 5 · Open-loop and closed-loop congestion control | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q6c/) |
| **Q7(a)** | 10 | Unit 4 · Dijkstra shortest path | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q7a/) |
| **Q7(b)** | 10 | Unit 5 · Token bucket | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q7b/) |

## 2025-12-05 · Re-examination · 2022-23

**100 marks to attempt; 140 marks offered.** Q1 compulsory; attempt any four of Q2–Q7. All whole questions carry 20 marks. 2022-23

**Offered marks by current unit:** Unit 1: 20, Unit 3: 30, Unit 4: 40, Unit 5: 25, Unit 6: 10. Unspecified internal task marks are not split or guessed.

| Question | Marks | Current unit and topic | Type | Answer |
| --- | --- | --- | --- | --- |
| **Q1(a)** | 5 | Unit 1 · Network definition | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q1a/) |
| **Q1(b)** | 5 | Unit 3 · Error control | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q1b/) |
| **Q1(c)** | 5 | Unit 4 · Classful IPv4 | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q1c/) |
| **Q1(d)** | 5 | Unit 5 · UDP features | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q1d/) |
| **Q2(a)** | 10 | Unit 1 · Network topologies | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q2a/) |
| **Q2(b)** | 10 | Unit 3 · Stop-and-Wait versus Go-Back-N | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q2b/) |
| **Q3(a)** | 10 | FDMA and TDMA outside current syllabus | Theory | excluded: outside current syllabus |
| **Q3(b)** | 10 i: 5; ii: 5 | Unit 4 · Classful net/host IDs and /26 host | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q3b/) |
| **Q4(a)** | 10 | Unit 3 · CSMA persistence and CSMA/CD | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q4a/) |
| **Q4(b)** | 10 | Unit 4 · OSPF and link types | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q4b/) |
| **Q5(a)** | 10 | Unit 4 · Dijkstra algorithm | Mixed | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q5a/) |
| **Q5(b)** | 10 | Unit 5 · Congestion control | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q5b/) |
| **Q6(a)** | 10 | Unit 5 · TCP phases | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q6a/) |
| **Q6(b)** | 10 | Unit 6 · DNS hierarchy and resolution | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q6b/) |
| **Q7(a)** | 5 | Unit 1 · Network classifications | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q7a/) |
| **Q7(b)** | 5 | Unit 3 · Block coding | Mixed | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q7b/) |
| **Q7(c)** | 5 | Unit 4 · ARP | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q7c/) |
| **Q7(d)** | 5 | Unit 6 · SMTP and SNMP partly current syllabus | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q7d/) |

## 2025-02-19 · Re-examination · 2023-24 / 2024-25

**100 marks to attempt; 140 marks offered.** Q1 compulsory; attempt any four of Q2–Q7. All whole questions carry 20 marks. 2023-24 / 2024-25

**Offered marks by current unit:** 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.

| Question | Marks | Current unit and topic | Type | Answer |
| --- | --- | --- | --- | --- |
| **Q1(a)** | 5 | Unit 2 · TCP/IP network and transport layers | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q1a/) |
| **Q1(b)** | 5 | Unit 3 · Stop-and-Wait losses | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q1b/) |
| **Q1(c)** | 5 | Unit 5 · SCTP services | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q1c/) |
| **Q1(d)** | 5 | Unit 4 · Message versus packet switching | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q1d/) |
| **Q2(a)** | 10 | Unit 1 · Star and mesh | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q2a/) |
| **Q2(b)** | 10 | Unit 3 · CSMA/CA and RTS/CTS | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q2b/) |
| **Q3(a)** | 10 | Unit 5 · TCP connection lifecycle | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q3a/) |
| **Q3(b)** | 10 | Unit 4 · VLSM customer allocation | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q3b/) |
| **Q4(a)** | 10 | Unit 6 · DNS resolution | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q4a/) |
| **Q4(b)** | 10 | Unit 4 · RIP route updates | Mixed | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q4b/) |
| **Q5(a)** | 10 | Unit 3 · Pure versus slotted ALOHA | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q5a/) |
| **Q5(b)** | 10 | Unit 5 · Congestion policies | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q5b/) |
| **Q6(a)** | 10 | Unit 4 · Dijkstra six-node graph | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q6a/) |
| **Q6(b)** | 10 | Unit 3 · CRC | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q6b/) |
| **Q7(a)** | 5 | Unit 2 · Guided versus unguided media | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q7a/) |
| **Q7(b)** | 5 | Unit 4 · IPv4 /26 block | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q7b/) |
| **Q7(c)** | 10 | Unit 6 · FTP connections | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q7c/) |

**Source qualification:** The PDF has four pages; the fourth is blank. The handwritten date ends in 2025 over a printed 2024 template.

## 2024-12-06 · Final / re-examination · Final 2024-25 / Re-exam 2023-24

**100 marks to attempt; 140 marks offered.** Q1 compulsory; attempt any four of Q2–Q7. All whole questions carry 20 marks. Final 2024-25 / Re-exam 2023-24

**Offered marks by current unit:** 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.

| Question | Marks | Current unit and topic | Type | Answer |
| --- | --- | --- | --- | --- |
| **Q1(a)** | 5 | Unit 1 · LAN MAN WAN | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q1a/) |
| **Q1(b)** | 5 | Unit 3 · Selective Repeat versus Go-Back-N | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q1b/) |
| **Q1(c)** | 5 | Unit 5 · TCP versus UDP | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q1c/) |
| **Q1(d)** | 5 | Unit 4 · DHCP | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q1d/) |
| **Q2(a)** | 10 | Unit 2 · OSI model | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q2a/) |
| **Q2(b)** | 10 | Unit 3 · CSMA/CD | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q2b/) |
| **Q3(a)** | 10 | Unit 6 · SMTP phases | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q3a/) |
| **Q3(b)** | 10 | Unit 4 · OSPF and link types | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q3b/) |
| **Q4(a)** | 10 | Unit 3 · CRC and corrupted frame | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q4a/) |
| **Q4(b)** | 10 | Unit 5 · UDP and applications | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q4b/) |
| **Q5(a)** | 5 | Unit 1 · Network models | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q5a/) |
| **Q5(b)** | 5 | Unit 6 · DNS hierarchy | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q5b/) |
| **Q5(c)** | 10 | Unit 4 · Bellman-Ford example | Mixed | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q5c/) |
| **Q6(a)** | 10 | Unit 3 · Pure ALOHA rates | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q6a/) |
| **Q6(b)** | 10 | Unit 4 · VLSM groups | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q6b/) |
| **Q7(a)** | 10 | Unit 5 · Leaky versus token bucket | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q7a/) |
| **Q7(b)** | 5 | Unit 6 · HTTP | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q7b/) |
| **Q7(c)** | 5 | Unit 4 · Distance vector versus link state | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q7c/) |

## 2024-12-06 · Final / re-examination · AI-only Sem V variant

**100 marks to attempt; 140 marks offered.** Q1 compulsory; attempt any four remaining complete questions. AI-only Sem V variant

**Offered marks by current unit:** Unit 3: 25, Unit 4: 50, Unit 5: 10, Unit 6: 25. Unspecified internal task marks are not split or guessed.

| Question | Marks | Current unit and topic | Type | Answer |
| --- | --- | --- | --- | --- |
| **Q1(a)** | 5 | Unit 4 · Mission-critical switching choice | Case | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q1a/) |
| **Q1(b)** | 5 | Unit 4 · Store-and-forward delay | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q1b/) |
| **Q1(c)** | 5 | Unit 4 · Classful versus classless addressing | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q1c/) |
| **Q1(d)** | 5 | BGP AS-PATH outside current syllabus | Theory | excluded: outside current syllabus |
| **Q2(a)** | 10 | Unit 6 · Webmail and POP3 protocol journey | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q2a/) |
| **Q2(b)** | 5 | CDN Bring Home outside current syllabus | Theory | excluded: outside current syllabus |
| **Q2(c)** | 5 | Unit 4 · ARP response destination | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q2c/) |
| **Q3(a)** | 10 | Unit 4 · Store-and-forward caravan | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q3a/) |
| **Q3(b)** | 5 | Unit 4 · Count to infinity | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q3b/) |
| **Q3(c)** | 5 | Unit 5 · Reliable application over UDP | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q3c/) |
| **Q4(a)** | 5 | Unit 3 · CRC codeword | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q4a/) |
| **Q4(b)** | 5 | Unit 5 · Internet checksum | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q4b/) |
| **Q4(c)** | 10 | Unit 3 · Hamming generation and correction | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q4c/) |
| **Q5(a)** | 10 | Unit 6 · Persistent HTTP cache delay | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q5a/) |
| **Q5(b)** | 5 | Unit 6 · Iterative DNS resolution | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q5b/) |
| **Q5(c)** | 5 | Unit 4 · Longest-prefix matching | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q5c/) |
| **Q6(a)** | 5 | Unit 4 · Classful network and host portions | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q6a/) |
| **Q6(b)** | 5 | Unit 3 · CSMA without collision detection | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q6b/) |
| **Q6(c)** | 5 | Unit 4 · Recovering unknown routing weights | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q6c/) |
| **Q6(d)** | 5 | Unit 3 · ALOHA comparison | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q6d/) |
| **Q7(a)** | 10 | Learning-switch tables, mislabeled ARP outside current syllabus | Theory | excluded: outside current syllabus |
| **Q7(b)** | 10 | NAT four packet stages outside current syllabus | Theory | excluded: outside current syllabus |

## 2024-02-06 · Re-examination · 2022-23

**100 marks to attempt; 140 marks offered.** Q1 compulsory; attempt any four of Q2–Q7. All whole questions carry 20 marks. 2022-23

**Offered marks by current unit:** 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.

| Question | Marks | Current unit and topic | Type | Answer |
| --- | --- | --- | --- | --- |
| **Q1(a)** | 5 | Unit 5 · TCP versus UDP | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q1a/) |
| **Q1(b)** | 5 | Unit 2 · Guided media | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q1b/) |
| **Q1(c)** | 5 | Unit 3 · CSMA persistence | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q1c/) |
| **Q1(d)** | 5 | Unit 4 · Circuit versus packet switching | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q1d/) |
| **Q2(a)** | 10 | Unit 5 · QoS and scheduling | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q2a/) |
| **Q2(b)** | 10 | Unit 3 · Slotted ALOHA rates | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q2b/) |
| **Q3(a)** | 10 | Unit 3 · CSMA/CA | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q3a/) |
| **Q3(b)** | 10 | Unit 4 · RIP and timers | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q3b/) |
| **Q4(a)** | 10 | Unit 5 · TCP lifecycle | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q4a/) |
| **Q4(b)** | 10 | Unit 6 · DNS resolution | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q4b/) |
| **Q5(a)** | 10 | Unit 3 · Go-Back-N scenarios | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q5a/) |
| **Q5(b)** | 5 | Unit 6 · FTP connections | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q5b/) |
| **Q5(c)** | 5 | Unit 4 · DHCP dynamic allocation | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q5c/) |
| **Q6(a)** | 10 | Unit 4 · VLSM and noncanonical block address | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q6a/) |
| **Q6(b)** | 5 | Unit 6 · SMTP | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q6b/) |
| **Q6(c)** | 5 | Unit 2 · TCP/IP layers | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q6c/) |
| **Q7(a)** | 10 | Unit 4 · Dijkstra graph | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q7a/) |
| **Q7(b)** | 10 | Unit 1 · Four network topologies | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q7b/) |

## 2024-02-06 · Re-examination · AI-only Sem V variant

**100 marks to attempt; 140 marks offered.** Q1 compulsory; attempt any four remaining complete questions. AI-only Sem V variant

**Offered marks by current unit:** Unit 3: 35, Unit 4: 40, Unit 5: 15, Unit 6: 15. Unspecified internal task marks are not split or guessed.

| Question | Marks | Current unit and topic | Type | Answer |
| --- | --- | --- | --- | --- |
| **Q1(a)** | 5 | Unit 4 · Subnet mask | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q1a/) |
| **Q1(b)** | 5 | Unit 5 · Additional shared bottleneck | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q1b/) |
| **Q1(c)** | 5 | Unit 6 · HTTP/1.1 delay | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q1c/) |
| **Q1(d)** | 5 | Confidentiality versus integrity outside current syllabus | Theory | excluded: outside current syllabus |
| **Q2(a)** | 10 | Unit 4 · Dijkstra from w | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q2a/) |
| **Q2(b)** | 5 | Unit 5 · Telnet connection ports | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q2b/) |
| **Q2(c)** | 5 | SDN routing application outside current syllabus | Theory | excluded: outside current syllabus |
| **Q3(a)** | 5 | Unit 3 · rdt3.0 error recovery | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q3a/) |
| **Q3(b)** | 5 | Unit 6 · DNS cache popularity | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q3b/) |
| **Q3(c)** | 5 | TLS impersonation outside current syllabus | Theory | excluded: outside current syllabus |
| **Q3(d)** | 5 | TLS nonces outside current syllabus | Theory | excluded: outside current syllabus |
| **Q4(a)** | 10 | Unit 4 · Distance vector at z | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q4a/) |
| **Q4(b)** | 5 | Cryptographic attack models outside current syllabus | Theory | excluded: outside current syllabus |
| **Q4(c)** | 5 | CDN design outside current syllabus | Theory | excluded: outside current syllabus |
| **Q5(a)** | 10 | Unit 3 · Hamming error detection | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q5a/) |
| **Q5(b)** | 5 | Unit 3 · CRC and damaged message | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q5b/) |
| **Q5(c)** | 5 | Unit 5 · 8-bit checksum | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q5c/) |
| **Q6(a)** | 5 | Unit 3 · Pure ALOHA timeline | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q6a/) |
| **Q6(b)** | 5 | Unit 4 · Distance-vector link change | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q6b/) |
| **Q6(c)** | 5 | Polling and token passing outside current syllabus | Theory | excluded: outside current syllabus |
| **Q6(d)** | 5 | Unit 4 · Classful and IPv6 addresses | Mixed | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q6d/) |
| **Q7(a)** | 5 | Unit 4 · Network delay components | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q7a/) |
| **Q7(b)** | 5 | Unit 6 · Webmail to IMAP recipient | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q7b/) |
| **Q7(c)** | 10 | Unit 3 · Selective Repeat implementation | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q7c/) |

## 2023-11-22 · Final / re-examination · Final 2023-24 / Re-exam 2022-23

**100 marks to attempt; 140 marks offered.** Q1 compulsory; attempt any four of Q2–Q7. All whole questions carry 20 marks. Final 2023-24 / Re-exam 2022-23

**Offered marks by current unit:** 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.

| Question | Marks | Current unit and topic | Type | Answer |
| --- | --- | --- | --- | --- |
| **Q1(a)** | 5 | Unit 1 · Network classification | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q1a/) |
| **Q1(b)** | 5 | Unit 3 · ALOHA and vulnerable periods | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q1b/) |
| **Q1(c)** | 5 | Unit 4 · Classful addressing | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q1c/) |
| **Q1(d)** | 5 | Unit 5 · UDP applications | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q1d/) |
| **Q2(a)** | 10 | Unit 6 · SMTP phases | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q2a/) |
| **Q2(b)** | 10 | Unit 2 · OSI layers | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q2b/) |
| **Q3(a)** | 5 | Unit 1 · Network models | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q3a/) |
| **Q3(b)** | 10 | Unit 3 · CSMA/CD | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q3b/) |
| **Q3(c)** | 5 | Unit 4 · OSPF routing | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q3c/) |
| **Q4(a)** | 10 | Unit 5 · Traffic shaping buckets | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q4a/) |
| **Q4(b)** | 10 | Unit 3 · Selective Repeat scenarios | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q4b/) |
| **Q5(a)** | 10 | Unit 4 · VLSM two groups | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q5a/) |
| **Q5(b)** | 5 | Unit 6 · FTP | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q5b/) |
| **Q5(c)** | 5 | Unit 4 · ARP | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q5c/) |
| **Q6(a)** | 10 | Unit 3 · CRC | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q6a/) |
| **Q6(b)** | 5 | Unit 4 · IPv4 /26 block | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q6b/) |
| **Q6(c)** | 5 | Unit 6 · DNS hierarchy | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q6c/) |
| **Q7(a)** | 10 | Unit 4 · Bellman-Ford directed graph | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q7a/) |
| **Q7(b)** | 10 | Unit 5 · Congestion control | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q7b/) |

**Source qualification:** Header says 02 pages, but the paper continues through printed Page 3 of 3; all three are included.

## 2023-11-22 · Final / re-examination · AI-only Sem V variant; incomplete recovered scan

**100 marks to attempt; 105 printed marks recovered; complete offered total unknown.** Q1 compulsory; attempt any four remaining complete questions. AI-only Sem V variant; incomplete recovered scan

**Offered marks by current unit:** Unit 3: 25, Unit 4: 20, Unit 5: 10, Unit 6: 10. Unspecified internal task marks are not split or guessed.

| Question | Marks | Current unit and topic | Type | Answer |
| --- | --- | --- | --- | --- |
| **Q1(a)** | 5 | Unit 4 · Subnetting and masks | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q1a/) |
| **Q1(b)** | 5 | Unit 5 · Shared bottleneck throughput | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q1b/) |
| **Q1(c)** | 5 | Unit 6 · HTTP/1.0 delay | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q1c/) |
| **Q1(d)** | 5 | Cryptographic hash versus checksum outside current syllabus | Theory | excluded: outside current syllabus |
| **Q2(a)** | 10 | Unit 3 · Hamming error correction | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q2a/) |
| **Q2(b)** | 5 | Unit 3 · CRC encoding | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q2b/) |
| **Q2(c)** | 5 | Unit 3 · Framing | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q2c/) |
| **Q3(a)** | 5 | Unit 3 · Alternating-bit state transitions | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q3a/) |
| **Q3(b)** | 5 | Stateful packet filtering outside current syllabus | Theory | excluded: outside current syllabus |
| **Q3(c)** | 5 | Unit 6 · DNS cache inference | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q3c/) |
| **Q3(d)** | 5 | Unit 4 · IPv4 address classes | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q3d/) |
| **Q4(a)** | 10 | Unit 4 · Dijkstra from u | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q4a/) |
| **Q4(b)** | 5 | Unit 5 · TCP socket port numbers | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q4b/) |
| **Q4(c)** | 5 | SDN control-plane layers outside current syllabus | Theory | excluded: outside current syllabus |
| **Q5(a)** | 10 | BGP topology views outside current syllabus | Theory | excluded: outside current syllabus |
| **Q5(b)** | 5 | Symmetric and public-key cryptography outside current syllabus | Theory | excluded: outside current syllabus |
| **Q5(c)** | 5 | CDN placement and server selection outside current syllabus | Theory | excluded: outside current syllabus |
| **Q6(a)** | 5 | Unit 3 · Incomplete multiple-access question source incomplete | Numerical | unavailable: missing source continuation |

**Source qualification:** 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.

## 2023-01-27 · Re-examination · AI-only Sem V

**100 marks to attempt; 140 marks offered.** Q1 compulsory; attempt any four remaining complete questions. AI-only Sem V

**Offered marks by current unit:** Unit 3: 39, Unit 4: 20, Unit 5: 26, Unit 6: 25. Unspecified internal task marks are not split or guessed.

| Question | Marks | Current unit and topic | Type | Answer |
| --- | --- | --- | --- | --- |
| **Q1(a)** | 5 | Unit 5 · Shared bottleneck throughput | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q1a/) |
| **Q1(b)** | 5 | Unit 3 · Ideal broadcast channel and slotted ALOHA | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q1b/) |
| **Q1(c)** | 5 | Unit 5 · Round-robin scheduling | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q1c/) |
| **Q1(d)** | 5 | Unit 5 · TCP congestion control | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q1d/) |
| **Q2(a)** | 10 | Unit 6 · Persistent HTTP delay | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q2a/) |
| **Q2(b)(i)** | 5 | Unit 3 · Block-code received words | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q2bi/) |
| **Q2(b)(ii)** | 5 | Unit 3 · CRC and syndrome | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q2bii/) |
| **Q3(a)** | 10 | Unit 4 · Dijkstra from u | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q3a/) |
| **Q3(b)(i)** | 4 | Unit 3 · Why rdt3.0 needs a timer | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q3bi/) |
| **Q3(b)(ii)** | 6 | Unit 5 · Internet checksum | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q3bii/) |
| **Q4(a)** | 10 | Unit 3 · Alternating-bit data and ACK sequence | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q4a/) |
| **Q4(b)** | 10 | Unit 6 · HTTP/2 multiplexing versus HTTP/1.1 | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q4b/) |
| **Q5(a)** | 10 | BGP export policy outside current syllabus | Theory | excluded: outside current syllabus |
| **Q5(b)(i)** | 5 | HFC access outside current syllabus | Theory | excluded: outside current syllabus |
| **Q5(b)(ii)** | 5 | Wireless access technologies outside current syllabus | Theory | excluded: outside current syllabus |
| **Q6(a)** | 10 | Unit 3 · Slotted ALOHA arrival timeline | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q6a/) |
| **Q6(b)** | 10 | Unit 4 · ISP VLSM allocation | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q6b/) |
| **Q7(a)** | 5 | TDM versus FDM outside current syllabus | Theory | excluded: outside current syllabus |
| **Q7(b)** | 5 | Unit 6 · HTTP state | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q7b/) |
| **Q7(c)** | 5 | Unit 5 · TCP server sockets | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q7c/) |
| **Q7(d)** | 5 | NAT translated flow outside current syllabus | Theory | excluded: outside current syllabus |

## 2022-11-16 · Final examination · AI-only Sem V

**100 marks to attempt; 140 marks offered.** Q1 compulsory; attempt any four remaining complete questions. AI-only Sem V

**Offered marks by current unit:** Unit 2: 5, Unit 3: 35, Unit 4: 35, Unit 5: 20, Unit 6: 15. Unspecified internal task marks are not split or guessed.

| Question | Marks | Current unit and topic | Type | Answer |
| --- | --- | --- | --- | --- |
| **Q1(a)** | 5 | Unit 4 · Store-and-forward delay | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q1a/) |
| **Q1(b)** | 5 | Token passing and ideal broadcast access outside current syllabus | Theory | excluded: outside current syllabus |
| **Q1(c)** | 5 | Unit 5 · Priority scheduling | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q1c/) |
| **Q1(d)** | 5 | Unit 5 · TCP flow control | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q1d/) |
| **Q2(a)** | 10 | Unit 6 · HTTP delay comparison | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q2a/) |
| **Q2(b)(i)** | 4 | Unit 3 · Block coding capacity | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q2bi/) |
| **Q2(b)(ii)** | 6 | Unit 3 · CRC encoder and decoder | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q2bii/) |
| **Q3(a)** | 10 | Unit 4 · Dijkstra from t | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q3a/) |
| **Q3(b)(i)** | 5 | Unit 5 · UDP checksum limitations | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q3bi/) |
| **Q3(b)(ii)** | 5 | Unit 5 · TCP demultiplexing | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q3bii/) |
| **Q4(a)** | 10 | Unit 3 · rdt3.0 global transition sequence | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q4a/) |
| **Q4(b)(i)** | 5 | CDN placement outside current syllabus | Theory | excluded: outside current syllabus |
| **Q4(b)(ii)** | 5 | CDN server selection outside current syllabus | Theory | excluded: outside current syllabus |
| **Q5(a)** | 10 | BGP path views outside current syllabus | Theory | excluded: outside current syllabus |
| **Q5(b)(i)** | 5 | Access technologies outside current syllabus | Theory | excluded: outside current syllabus |
| **Q5(b)(ii)** | 5 | Unit 2 · Ethernet physical media | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q5bii/) |
| **Q6(a)** | 10 | Unit 3 · CSMA/CD arrival timeline | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q6a/) |
| **Q6(b)(i)** | 5 | Unit 4 · Classful addresses and masks | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q6bi/) |
| **Q6(b)(ii)** | 5 | Unit 4 · CIDR block | Numerical | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q6bii/) |
| **Q7(a)** | 5 | Unit 4 · Circuit switching advantage | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q7a/) |
| **Q7(b)** | 5 | Unit 6 · HTTP cookies | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q7b/) |
| **Q7(c)** | 5 | Unit 3 · Selective Repeat | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q7c/) |
| **Q7(d)** | 5 | Unit 4 · Destination-based forwarding | Theory | [Full solution](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q7d/) |

## What this evidence does and does not establish

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.

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.

---

## TEE · Q1A · Wired and wireless campus

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q1a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-final/q1a

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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. [5 marks]

#### Answer

| Criterion | Wired campus links | Wireless campus access |
| --- | --- | --- |
| Speed/capacity | Dedicated switch ports and fiber backbones can provide high, predictable capacity | Capacity shared over radio; performance depends on contention, coverage and interference |
| Reliability | Stable when cables/ports and redundant uplinks are healthy | Mobility and flexible access; radio interference and coverage holes can cause variability |
| Security | Physical access control helps, but ports still need authentication/segmentation | Use authenticated encryption and managed access; radio extends beyond rooms |
| Deployment | Cabling cost and fixed access points | Supports mobile users and faster coverage changes |
| Recommended role | Servers, laboratories, inter-building backbone | Students’ phones/laptops, roaming and guest access |

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.

#### Practical example

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.

Source: Final · 5 December 2025, original question paper page 1. Original marks retained; solution independently authored.

---

## TEE · Q1B · OSI and TCP/IP comparison

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q1b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-final/q1b

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### Actual PYQ · Q1B. Compare and contrast the TCP/IP model with the OSI model on any five points. [5 marks]

#### Answer

The **TCP/IP model** 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.

Swipe across the diagram to read its labels ↔

![OSI layers mapped to the four-layer TCP/IP model](https://deep-learning-study-room.vercel.app/cn/fig/tee-models.5bff0518c8.svg)

Diagram: OSI layers mapped to the four-layer TCP/IP model. Labels: OSI layers mapped to the four-layer TCP/IP model | OSI layers mapped to the four-layer TCP/IP model | 7 Application | 6 Presentation | 5 Session | 4 Transport | 3 Network | 2 Data link | 1 Physical | Application | HTTP, DNS, FTP, SMTP | Transport | Internet | Link / network access | Includes physical access | Some textbooks split link into data link + physical: five layers.

Four TCP/IP layers; the link layer includes the physical medium.

| TCP/IP layer | Function | Examples |
| --- | --- | --- |
| Application | Defines application message formats and exchanges for Web access, naming, email and file transfer; includes presentation/session functions as needed | HTTP, DNS, SMTP, FTP |
| Transport | End-to-end process communication | TCP, UDP, SCTP |
| Internet | IP addressing, routing and best-effort datagrams | IPv4/IPv6 |
| Link/network access | Local delivery and physical access | Ethernet/Wi-Fi and their medium |

| Point | OSI | TCP/IP |
| --- | --- | --- |
| Layer count | Seven | Four here; five-layer teaching variant splits link |
| Upper functions | Application, presentation, session separated | Grouped under application |
| Lower functions | Data link and physical separated | Grouped under link/network access |
| Purpose | General reference architecture | Architecture of deployed Internet protocol family |
| Network service | Reference model can describe different services | Internet layer uses connectionless IP |
| Transport | Conceptual transport service | TCP reliable byte stream; UDP datagrams; SCTP messages |

#### Practical example

An application can use UDP without changing the IP or Ethernet layers. Layering lets one protocol vary without redesigning every network function.

Source: Final · 5 December 2025, original question paper page 1. Original marks retained; solution independently authored.

---

## TEE · Q1C · Slotted ALOHA

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q1c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-final/q1c

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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? [5 marks]

#### Answer

## Given

Protocol = Slotted ALOHA; G = 1 attempts/frame time.

## To find

S, 100S and the maximum possible S.

## Formula and why



$$
S=G e^{-G}
$$



Select the formula from the protocol name. The exponent is −G because Slotted ALOHA has a T vulnerable period.

## Step-by-step solution

#### Step 1. Calculate the exponent

−1 × 1 = -1.

#### Step 2. Evaluate the exponential



$$
e^{-1} \approx 0.367879441
$$



#### Step 3. Multiply by G

S = 1 × 0.367879441 ≈ 0.367879441 successful frames/frame time.

#### Step 4. Convert to percentage

0.367879441 × 100 ≈ 36.7879%.

#### Step 5. State the maximum separately

The maximum is 1/(1e) ≈ 0.367879 = 36.7879%, at G=1.

**Final answer:** S ≈ 0.367879; percentage ≈ 36.7879%; Smax ≈ 0.367879 at G=1.

#### What this result means

A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.

Source: Final · 5 December 2025, original question paper page 1. Original marks retained; solution independently authored.

---

## TEE · Q1D · IPv4 address block

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q1d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-final/q1d

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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. [5 marks]

#### Answer

## Given

IP/prefix = `200.140.64.48/26`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−26=6; N=26=64.

#### Step 2. Construct the mask

Mask=`255.255.255.192`; binary=`11111111.11111111.11111111.11000000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 48 lies in 0…63.

#### Step 4. Form the first/network address

Keep earlier octets; place 0 in octet 4; set any later octets to zero. Network=**200.140.64.0**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 11001000 | 11111111 | 11001000 | 200 |
| 2 | 10001100 | 11111111 | 10001100 | 140 |
| 3 | 01000000 | 11111111 | 01000000 | 64 |
| 4 | 00110000 | 11000000 | 00000000 | 0 |

#### Step 6. Form the last/broadcast address

Use 63 in the changing octet and 255 in any later octets. Broadcast=**200.140.64.63**.

#### Step 7. State usable hosts

First usable=200.140.64.1; last usable=200.140.64.62; count=64−2=62.

**Final answer:** Network 200.140.64.0; broadcast 200.140.64.63; 64 total, 62 ordinary usable; range 200.140.64.1–200.140.64.62.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

Source: Final · 5 December 2025, original question paper page 1. Original marks retained; solution independently authored.

---

## TEE · Q2A · Block coding and all pairwise distances

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q2a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-final/q2a

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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) [10 marks]

#### Answer

**(i) Block coding.** 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.

## Given

| Codeword | Bits |
| --- | --- |
| C1 | 1001101 |
| C2 | 1110001 |
| C3 | 1010101 |

## To find

All pair distances, dmin and the maximum guaranteed numbers of errors.

## Formula and why



$$
d(a,b)=\mathrm{weight}(a\oplus b)
$$





$$
s=d_{\min}-1,\quad t=\lfloor(d_{\min}-1)/2\rfloor
$$



XOR exposes differing positions. Use the closest codeword pair, because it is the weakest separation in the code.

## Step-by-step solution

#### Step 1. XOR every distinct pair

| Pair | First | Second | XOR | Distance |
| --- | --- | --- | --- | --- |
| C1 vs C2 | 1001101 | 1110001 | 0111100 | 4 |
| C1 vs C3 | 1001101 | 1010101 | 0011000 | 2 |
| C2 vs C3 | 1110001 | 1010101 | 0100100 | 2 |

#### Step 2. Take the minimum

dmin = min(4, 2, 2) = 2.

#### Step 3. Calculate the guarantees

Detect = 2−1 = 1; correct = floor((2−1)/2) = 0.

#### Step 4. Justify geometrically

2 bit changes can reach another valid codeword, so only 1 are guaranteed detectable. Correction regions require 2t < 2.

**Final answer:** dmin=2; detect up to 1 errors; correct up to 0 errors.

#### What this result means

A distance of one particular pair does not set the whole-code capability unless it is the minimum.

Source: Final · 5 December 2025, original question paper page 1. Original marks retained; solution independently authored.

---

## TEE · Q2B · Choose a switching technique

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q2b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-final/q2b

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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. [10 marks]

#### Answer

Swipe across the diagram to read its labels ↔

![Three switching techniques: what is forwarded?](https://deep-learning-study-room.vercel.app/cn/fig/switching.2b51f856d9.svg)

Diagram: Three switching techniques: what is forwarded?. Labels: Three switching techniques: what is forwarded? | Three switching techniques: what is forwarded? | 1. Circuit: reserve a path, then stream data | Setup → reserved capacity → data transfer → release. | 2. Message: store the entire message at each node | Large forwarding unit; no packet-level pipeline. | 3. Packet: divide, then forward packet by packet | Shared links can simultaneously carry different packets.

The three forwarding units and resource choices.

## Circuit switching

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.

## Message switching

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.

## Packet switching

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.

| Aspect | Circuit switching | Message switching | Packet switching |
| --- | --- | --- | --- |
| Unit handled | Continuous stream on established circuit | Whole message | Small packets |
| Resource use | Capacity reserved along a circuit | Shared; message stored at each intermediate node | Shared; each packet stored/forwarded in this model |
| Setup | Required before data transfer | No circuit setup required | Datagram: no connection setup; virtual circuit: setup |
| Delay | Setup delay, then relatively predictable service | Large store-and-forward delay for long messages | Variable delay; packet pipeline can reduce completion time |
| Main limitation | Reserved capacity can be idle | Large buffers; unsuitable for tight delay needs | Headers, possible queueing/loss; datagrams may reorder |

## Recommendation

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.

#### Practical example

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.

Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q3A · LAN, MAN, PAN, WAN, ARPANET

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q3a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-final/q3a

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### Actual PYQ · Q3A. Explain the following: (a) LAN (b) MAN (c) PAN (d) WAN (e) ARPANET. [5 marks]

#### Answer

| Type | Meaning and scope | Example |
| --- | --- | --- |
| PAN | Personal Area Network: a person’s nearby devices | Phone linked to earbuds |
| LAN | Local Area Network: a building or local campus network under local administration | Laboratory Ethernet/Wi-Fi |
| MAN | Metropolitan Area Network: interconnects sites across a town/city | City-wide institutional network |
| WAN | Wide Area Network: connects geographically separated networks over regional/global links | Branches in different cities |
| ARPANET | Historical packet-switched research network; a major predecessor of the Internet | Early interconnected research institutions; not a modern geographic size category |

#### Practical example

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.

Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q3B · OSPF packet types

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q3b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-final/q3b

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### Actual PYQ · Q3B. Explain the different types of OSPF packets used for communication between routers. [5 marks]

#### Answer

Swipe across the diagram to read its labels ↔

![OSPFv2: five distinct packet types](https://deep-learning-study-room.vercel.app/cn/fig/ospf-packets.6093f0d178.svg)

Diagram: OSPFv2: five distinct packet types. Labels: OSPFv2: five distinct packet types | OSPFv2: five distinct packet types | 1. Hello | Discover and maintain neighbour relationships. | 2. Database Description | Summarize link-state database contents. | 3. Link State Request | Ask for particular missing or newer LSAs. | 4. Link State Update | Carry one or more LSAs. | 5. Link State Acknowledgment | Acknowledge receipt of LSAs.

Five OSPFv2 packet types.

| Packet type | What it does | Simple example |
| --- | --- | --- |
| Hello | Discover/maintain neighbours and exchange relationship parameters | Are we still neighbours? |
| Database Description (DD/DBD) | Summarize link-state database contents during synchronization | Here are the LSA headers I have |
| Link State Request (LSR) | Ask for specific missing/newer link-state information | Please send this LSA |
| Link State Update (LSU) | Carry one or more LSAs | Here is the requested or newly flooded link-state information |
| Link State Acknowledgment (LSAck) | Acknowledge receipt of LSAs | I received these LSAs |

Database Description packets carry summaries; Link State Update packets carry LSAs themselves. Do not confuse an LSA type with an OSPF packet type.

#### Practical example

After seeing a missing LSA in a database summary, a router sends an LSR, receives an LSU containing it and sends an LSAck.

Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q3C · WWW and HTTP

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q3c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-final/q3c

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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. [10 marks]

#### Answer

The **World Wide Web (WWW)** 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. **HTTP** defines request/response semantics between these components. The Web is one application of the Internet, not a synonym for the entire Internet.

Swipe across the diagram to read its labels ↔

![Opening a plain HTTP/1.1 URL](https://deep-learning-study-room.vercel.app/cn/fig/tee-http.de65bc75dd.svg)

Diagram: Opening a plain HTTP/1.1 URL. Labels: Opening a plain HTTP/1.1 URL | Opening a plain HTTP/1.1 URL | Browser parses http://www.example.com/ | Scheme=http, host=www.example.com, path=/, default port=80. | DNS resolves the host | A cached or newly resolved address identifies the target endpoint. | TCP establishes the connection | For this HTTP/1.1 example, client connects to server port 80. | HTTP request → HTTP response | GET / with Host header → status, headers and representation body. | Browser parses and displays | HTML may refer to extra objects, each needing retrieval or cache lookup.

URL → DNS → connection → HTTP request/response → displayed document.

1. Interpret the URL **http://www.example.com/**: 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.
2. Resolve the hostname using DNS, often via cached results and a recursive resolver. DNS finds an address; it does not download the Web page.
3. 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.
4. 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.
5. 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.
6. The browser parses HTML, retrieves referenced objects as needed and renders the page. Caching may avoid transfers; persistent connections can serve multiple requests.

| Message component | Purpose |
| --- | --- |
| Request method / target | Requested action and resource; GET retrieves a representation, POST submits data for processing |
| Headers | Metadata, routing context, representation preferences and cache/connection information |
| Status code | Result class: 2xx success, 3xx redirection, 4xx client error, 5xx server error |
| Body | Representation or submitted content when present |

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.

#### Practical example

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.

Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q4A · IPv6 expansion and headers

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q4a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-final/q4a

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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. [10 marks]

#### Answer

## Given

Given address: `0:15::1:12:1213`.

## To find

The full 128-bit address in eight-group hexadecimal notation.

## Formula and why



$$
\text{missing groups}=8-\text{visible groups}
$$



A written 0 is a visible group. :: represents only the omitted all-zero groups.

## Step-by-step solution

#### Step 1. Count groups on both sides

Left: 0, 15 (2 group(s)). Right: 1, 12, 1213 (3 group(s)).

#### Step 2. Calculate omitted groups

Visible=2+3=5. Missing=8−5=3.

#### Step 3. Insert the groups

`0:15:0:0:0:1:12:1213`.

#### Step 4. Pad each group on the left

| Group number | Four-digit group |
| --- | --- |
| 1 | 0000 |
| 2 | 0015 |
| 3 | 0000 |
| 4 | 0000 |
| 5 | 0000 |
| 6 | 0001 |
| 7 | 0012 |
| 8 | 1213 |

#### Step 5. Write all eight in order

`0000:0015:0000:0000:0000:0001:0012:1213`.

**Final answer:** `0000:0015:0000:0000:0000:0001:0012:1213`

#### What this result means

Leading zeros change the spelling, not the address value. The final group count is eight.

## Header comparison

| Feature | IPv4 | IPv6 |
| --- | --- | --- |
| Address width | 32 bits | 128 bits |
| Base/header size | 20–60 bytes depending on options | 40-byte fixed base header |
| Length field | Total length includes IPv4 header | Payload Length excludes 40-byte base header |
| Lifetime field | TTL | Hop Limit |
| Following protocol | Protocol field | Next Header; may identify an extension |
| Header checksum | Present | No base-header checksum |
| Options | Inside IPv4 header | Typically extension headers |
| Fragmentation fields | In IPv4 header; routers may fragment if permitted | Fragment extension header; fragmentation by source, not routers |

Swipe across the diagram to read its labels ↔

![IPv6 base header · each horizontal row is 32 bits wide](https://deep-learning-study-room.vercel.app/cn/fig/ipv6-header.aef1bfbac7.svg)

Diagram: IPv6 base header · each horizontal row is 32 bits wide. Labels: IPv6 base header · each horizontal row is 32 bits wide | IPv6 base header · each horizontal row is 32 bits wide | Version | 4 | Traffic Class | 8 | Flow Label · 20 | Payload Length · 16 | Next Header | 8 | Hop Limit | 8 | Source address · 128 bits (four rows) | Destination address · 128 bits (four rows)

Fixed IPv6 base header.

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.

Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q4B · UDP and TCP

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q4b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-final/q4b

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### Actual PYQ · Q4B. Describe the User Datagram Protocol (UDP) in detail with a suitable diagram. Also explain how it differs from TCP. [10 marks]

#### Answer

**User Datagram Protocol (UDP)** provides connectionless, message-oriented process delivery. One send creates a datagram; message boundaries are retained. UDP has an **8-byte header**, 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.

Swipe across the diagram to read its labels ↔

![UDP header: each row contains 32 bits](https://deep-learning-study-room.vercel.app/cn/fig/tee-udp.b14cba3c28.svg)

Diagram: UDP header: each row contains 32 bits. Labels: UDP header: each row contains 32 bits | UDP header: each row contains 32 bits | Source port · 16 | Destination port · 16 | Length · 16 | Checksum · 16 | Total 8 bytes. Length = header + UDP payload.

UDP fixed header: four 16-bit fields, eight bytes total.

| UDP field | Width | Purpose |
| --- | --- | --- |
| Source port | 16 bits | Sending endpoint; a zero value can indicate no reply port when unused |
| Destination port | 16 bits | Receiving application endpoint |
| Length | 16 bits | UDP header plus UDP payload; minimum 8 bytes |
| Checksum | 16 bits | Error detection over UDP and an IP pseudo-header; not retransmission |

## Operation and services

1. 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.
2. The receiving UDP layer validates the length/checksum as applicable and uses the destination endpoint to deliver the datagram.
3. 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.
4. UDP checksum zero can mean checksum omitted in IPv4. IPv6 ordinarily requires the UDP checksum; specialized exceptions are outside this syllabus.

#### Practical example

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.

## Comparison with TCP

| Point | UDP | TCP |
| --- | --- | --- |
| Setup | Connectionless | Three-way establishment |
| Data | Message/datagram boundaries | Ordered byte stream |
| Recovery | No built-in retransmission | ACKs, timers and retransmission |
| Control | No built-in flow/congestion control | Receive window and congestion window |
| Header | 8 bytes | At least 20 bytes |
| Use | Applications tolerant of loss or managing their own recovery | Reliable ordered byte transfer |

Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q5A · Selective Repeat with three bits

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q5a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-final/q5a

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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. [10 marks]

#### Answer

**Selective Repeat (SR) ARQ** 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.

Swipe across the diagram to read its labels ↔

![SR W=4: individual ACKs and buffering](https://deep-learning-study-room.vercel.app/cn/fig/tee-sr.5ae2b52b45.svg)

Diagram: SR W=4: individual ACKs and buffering. Labels: SR W=4: individual ACKs and buffering | SR W=4: individual ACKs and buffering | Sender | Receiver | Frames 0,1 → accept and deliver | ACK 0 and ACK 1 individually | Frame 2 lost; frame 3 arrives | ACK 3; keep frame 3 in buffer | Timer for frame 2: resend only 2 | ACK 2; deliver 2, then buffered 3 | Sequence space 0…7; equal windows at most 4. | ACK i means that specific frame i was accepted.

SR buffers 3 while waiting for 2; only 2 is retransmitted.

1. For m=3 there are eight sequence numbers, 0…7. With equal sender and receiver windows, maximum W=23−1=4. Both windows begin at 0 and span 0…3.
2. 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.
3. Although 3 is acknowledged, the sender’s base cannot jump over missing 2. A timer for 2 expires; only frame 2 is retransmitted.
4. 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.
5. 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.
6. A repeated old frame can be acknowledged again without delivering it twice. SR needs more receiver storage and per-frame tracking than GBN.



$$
W_s=W_r\le 2^{m-1}
$$



#### Practical example

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.

Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q5B · SMTP phases

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q5b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-final/q5b

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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. [10 marks]

#### Answer

**Simple Mail Transfer Protocol (SMTP)** 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.

Swipe across the diagram to read its labels ↔

![SMTP: envelope, message and completion](https://deep-learning-study-room.vercel.app/cn/fig/tee-smtp.c6f99877c4.svg)

Diagram: SMTP: envelope, message and completion. Labels: SMTP: envelope, message and completion | SMTP: envelope, message and completion | SMTP sender | Receiving server | 220 greeting | EHLO sender.example | 250 capabilities | MAIL FROM:<sender@example.com> | RCPT TO:<receiver@example.org> | DATA (after successful envelope replies) | 354 start mail input | Headers + blank line + body + dot line | 250 accepted; then QUIT / server 221 | SMTP submits/relays. Inbox reading uses IMAP/POP or webmail. | Envelope MAIL/RCPT differs from visible From/To headers.

Submission/relay use SMTP; reading an inbox uses a separate access protocol.

| Phase | Typical exchange | Purpose |
| --- | --- | --- |
| Connection and greeting | Server 220; client EHLO (HELO for basic SMTP); server 250 capabilities | Identify peers and learn supported extensions |
| Envelope transfer | MAIL FROM:<sender>; RCPT TO:<recipient>; 250 replies | Declare return path and one or more delivery recipients |
| Message transfer | DATA; server 354; headers + blank line + body; single dot line; server 250 | Transmit the message after server permission; completion reply accepts responsibility |
| Termination | QUIT; server 221 | Close the SMTP session cleanly |

## Message flow and important details

1. 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.
2. The sending server resolves the recipient domain’s MX records, connects to an appropriate mail server and carries out the SMTP exchange.
3. MAIL FROM and RCPT TO are the **envelope**; visible From/To headers inside DATA are message content and can differ. Multiple RCPT TO commands can name several recipients.
4. 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.
5. 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.
6. The recipient reads stored mail using an access protocol such as IMAP/POP3 or webmail. SMTP is not the mailbox-retrieval protocol.

#### Practical example

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.

Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q6A · Unguided media

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q6a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-final/q6a

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### Actual PYQ · Q6A. List different types of unguided transmission media and write any two characteristics of each. [5 marks]

#### Answer

| Type | Characteristic 1 | Characteristic 2 |
| --- | --- | --- |
| Radio | Can provide broad-area/mobility support depending on band | Shared spectrum/interference and obstacles affect reception |
| Terrestrial microwave | Directional, usually line of sight | Needs antenna alignment; obstructions/weather can matter |
| Satellite microwave | Relay covers large or remote areas | Delay/capacity depend strongly on orbit/system |
| Infrared | Short range and generally blocked by opaque walls | Limited room-scale coverage reduces inter-room interference |

Many classifications group satellite links under microwave rather than making a separate spectral category. State that grouping consistently.

#### Practical example

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.

Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q6B · CSMA persistence

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q6b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-final/q6b

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### Actual PYQ · Q6B. Compare 1-persistent, non-persistent, and p-persistent CSMA strategies with diagrammatic representations. [5 marks]

#### Answer

Swipe across the diagram to read its labels ↔

![CSMA persistence: what happens after carrier sensing?](https://deep-learning-study-room.vercel.app/cn/fig/persistence.528dafcd8a.svg)

Diagram: CSMA persistence: what happens after carrier sensing?. Labels: CSMA persistence: what happens after carrier sensing? | CSMA persistence: what happens after carrier sensing? | 1-persistent | Busy: keep listening. Idle: transmit immediately. | Non-persistent | Busy: random wait, then sense again. Idle: transmit. | p-persistent | Eligible idle slot: transmit with probability p; defer with probability 1−p.

Different decisions after sensing the channel.

| Rule | When idle | When busy | Trade-off |
| --- | --- | --- | --- |
| 1-persistent | Transmit immediately | Keep listening; transmit as soon as idle | Low idle delay, but waiting stations may start together |
| Non-persistent | Transmit | Wait a random time, then sense again | Less synchronized contention; may leave avoidable idle time |
| p-persistent (slotted) | Transmit with probability p; defer a slot with probability 1−p | Wait until available, then resume the probabilistic slot rule | Controls contention; needs slots and a choice of 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.

#### Practical example

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.

Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q6C · Open-loop and closed-loop control

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q6c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-final/q6c

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### Actual PYQ · Q6C. Explain open-loop and closed-loop congestion control policy in transmission control protocol. Describe any two policies from each type. [10 marks]

#### Answer

**Congestion** 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. **Flow control** protects a receiver; congestion control protects the network.

Swipe across the diagram to read its labels ↔

![Two congestion-control approaches](https://deep-learning-study-room.vercel.app/cn/fig/tee-congestion.c27c2303bb.svg)

Diagram: Two congestion-control approaches. Labels: Two congestion-control approaches | Two congestion-control approaches | Open loop: prevent overload | Admission rules and retransmission/window/ACK policies reduce avoidable traffic before congestion | feedback. | Closed loop: observe and signal | Detect queues, loss or explicit congestion marks; return feedback toward the sender. | Change behaviour | Reduce offered load or change resource use. Receiver flow control addresses a different bottleneck.

Open-loop prevention and closed-loop feedback.

| Approach | Policy / mechanism | How it helps |
| --- | --- | --- |
| Open loop: prevent congestion without runtime congestion feedback | Retransmission policy | Carefully chosen timers/selective retransmission avoid needless extra traffic |
| Open loop | Window policy | Limit outstanding data and avoid excessive retransmission after loss |
| Open loop | Acknowledgement policy | Avoid unnecessarily frequent ACK traffic while retaining correct recovery |
| Open loop | Admission policy | Refuse new load when reserved capacity is insufficient |
| Closed loop: measure and react to congestion | Backpressure | A congested node tells upstream nodes to reduce/stop sending, possibly propagating hop by hop |
| Closed loop | Choke/control signalling | A congested node sends explicit feedback to the source |
| Closed loop | Implicit signalling | A sender infers congestion from loss/delay and changes its sending behaviour |
| Closed loop | Explicit marking | Network marks congestion (for example ECN); endpoints react to returned information |

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.

#### Practical example

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.

Source: Final · 5 December 2025, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q7A · Dijkstra with all intermediate steps

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q7a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-final/q7a

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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. [10 marks]

#### Answer

## Given

| Edge | Cost |
| --- | --- |
| 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 |

Source=A; target=G. Edges are directed; do not add reverse edges.

## To find

The path A to G, its total cost and intermediate work.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.

Swipe across the diagram to read its labels ↔

![Dijkstra · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/dijkstra-pyq.ffe6efac11.svg)

Diagram: Dijkstra · given directed graph. Labels: Dijkstra · given directed graph | Dijkstra · given directed graph | A | A | B | B | A->B | 4 | C | C | A->C | 2 | B->C | 5 | D | D | B->D | 10 | C->D | 3 | E | E | C->E | 4 | D->E | 1 | F | F | D->F | 2 | E->F | 3 | G | G | F->G | 5

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

d[A]=0; every other distance=∞. No predecessors are known.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Tentative |
| B | ∞ | — | Tentative |
| C | ∞ | — | Tentative |
| D | ∞ | — | Tentative |
| E | ∞ | — | Tentative |
| F | ∞ | — | Tentative |
| G | ∞ | — | Tentative |

#### Step 2. Settle A at distance 0

Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞, E=∞, F=∞, G=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| A→B | ∞ | 0+(4)=4 | Improve to 4; predecessor=A |
| A→C | ∞ | 0+(2)=2 | Improve to 2; predecessor=A |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 4 | A | Tentative |
| C | 2 | A | Tentative |
| D | ∞ | — | Tentative |
| E | ∞ | — | Tentative |
| F | ∞ | — | Tentative |
| G | ∞ | — | Tentative |

#### Step 3. Settle C at distance 2

Unsettled candidates before selection: B=4, C=2, D=∞, E=∞, F=∞, G=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| C→D | ∞ | 2+(3)=5 | Improve to 5; predecessor=C |
| C→E | ∞ | 2+(4)=6 | Improve to 6; predecessor=C |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 4 | A | Tentative |
| C | 2 | A | Settled |
| D | 5 | C | Tentative |
| E | 6 | C | Tentative |
| F | ∞ | — | Tentative |
| G | ∞ | — | Tentative |

#### Step 4. Settle B at distance 4

Unsettled candidates before selection: B=4, D=5, E=6, F=∞, G=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| B→C | 2 | 4+(5)=9 | Already settled; retain |
| B→D | 5 | 4+(10)=14 | Retain 5 |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 4 | A | Settled |
| C | 2 | A | Settled |
| D | 5 | C | Tentative |
| E | 6 | C | Tentative |
| F | ∞ | — | Tentative |
| G | ∞ | — | Tentative |

#### Step 5. Settle D at distance 5

Unsettled candidates before selection: D=5, E=6, F=∞, G=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| D→E | 6 | 5+(1)=6 | Retain 6 (equal cost) |
| D→F | ∞ | 5+(2)=7 | Improve to 7; predecessor=D |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 4 | A | Settled |
| C | 2 | A | Settled |
| D | 5 | C | Settled |
| E | 6 | C | Tentative |
| F | 7 | D | Tentative |
| G | ∞ | — | Tentative |

#### Step 6. Settle E at distance 6

Unsettled candidates before selection: E=6, F=7, G=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| E→F | 7 | 6+(3)=9 | Retain 7 |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 4 | A | Settled |
| C | 2 | A | Settled |
| D | 5 | C | Settled |
| E | 6 | C | Settled |
| F | 7 | D | Tentative |
| G | ∞ | — | Tentative |

#### Step 7. Settle F at distance 7

Unsettled candidates before selection: F=7, G=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| F→G | ∞ | 7+(5)=12 | Improve to 12; predecessor=F |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 4 | A | Settled |
| C | 2 | A | Settled |
| D | 5 | C | Settled |
| E | 6 | C | Settled |
| F | 7 | D | Settled |
| G | 12 | F | Tentative |

#### Step 8. Settle G at distance 12

Unsettled candidates before selection: G=12. Select the minimum; ties use alphabetical order.

No outgoing edges to relax.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 4 | A | Settled |
| C | 2 | A | Settled |
| D | 5 | C | Settled |
| E | 6 | C | Settled |
| F | 7 | D | Settled |
| G | 12 | F | Settled |

#### Step 9. Recover the path

Trace backwards: G ← F ← D ← C ← A. Reverse it: A → C → D → F → G.

Edge sum: 2 + 3 + 2 + 5 = 12.

**Final answer:** A → C → D → F → G; cost=12.

#### What this result means

The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.

Swipe across the diagram to read its labels ↔

![Dijkstra · final route and distances](https://deep-learning-study-room.vercel.app/cn/fig/dijkstra-pyq-solution.d92888ba14.svg)

Diagram: Dijkstra · final route and distances. Labels: Dijkstra · final route and distances | Dijkstra · final route and distances | A | A | 0 | B | B | 4 | A->B | 4 | C | C | 2 | A->C | 2 | B->C | 5 | D | D | 5 | B->D | 10 | C->D | 3 | E | E | 6 | C->E | 4 | D->E | 1 | F | F | 7 | D->F | 2 | E->F | 3 | G | G | 12 | F->G | 5

Highlighted final route: A→C→D→F→G; total cost 12.

Source: Final · 5 December 2025, original question paper page 3. Original marks retained; solution independently authored.

---

## TEE · Q7B · Token bucket

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-final--q7b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-final/q7b

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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. [10 marks]

#### Answer

A **token bucket** 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.

Swipe across the diagram to read its labels ↔

![Token bucket: permission is separate from data](https://deep-learning-study-room.vercel.app/cn/fig/tee-token.c3ff1dbf76.svg)

Diagram: Token bucket: permission is separate from data. Labels: Token bucket: permission is separate from data | Token bucket: permission is separate from data | Token generator adds r tokens per second | Store at most B tokens; extra tokens disappear when the bucket is full. | Packet of L bytes requests L tokens | Enough tokens: deduct L and permit transmission, subject to link speed. | Insufficient tokens: policy matters | Shaper buffers/waits. Policer marks or drops according to policy. | Saved tokens permit bounded bursts | Initially full: allowance over t ≤ B + rt. This alone is not an end-to-end QoS guarantee.

Tokens store permission; the separate data queue stores packets.

1. Initialize a stated token count, often B for a full bucket. Add rΔt tokens over elapsed time, capped at B.
2. 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.
3. If tokens are insufficient, a **shaper** waits/buffers until enough are available. A **policer** marks or drops nonconforming traffic according to policy. Token shortage does not universally mean drop.
4. Over interval t, a full token bucket bounds admitted data by B+rt. Actual output is also limited by link capacity and packet scheduling.
5. Unlike the queue-style leaky bucket, token storage allows limited bursts after idle time. It bounds average rate and burst size separately.



$$
\mathrm{admitted\ data}(t)\le B+rt
$$



| Limitation | Reason |
| --- | --- |
| Bursts can still congest downstream queues | Local conformance does not ensure every later link has capacity |
| Parameters must match traffic and link requirements | A small B delays/drops legitimate packets; a large B permits disruptive bursts |
| No complete QoS guarantee alone | Admission, scheduling and end-to-end capacity may still be needed |

#### Practical example

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.

Source: Final · 5 December 2025, original question paper page 3. Original marks retained; solution independently authored.

---

## TEE · Q1A · Client-server and peer-to-peer

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q1a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-reexam/q1a

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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. [5 marks]

#### Answer

In a **client-server** design, users’ clients contact designated service processes. In **peer-to-peer (P2P)**, participating hosts can supply and consume resources. These are application organizations, not different physical cable types.

Swipe across the diagram to read its labels ↔

![Client-server and peer-to-peer organization](https://deep-learning-study-room.vercel.app/cn/fig/tee-client-peer.a7c6f1b535.svg)

Diagram: Client-server and peer-to-peer organization. Labels: Client-server and peer-to-peer organization | Client-server and peer-to-peer organization | Client-server | Peer-to-peer | Server | C1 | C2 | P1 | P2 | P3 | Peers can supply and consume. A central service can be replicated.

Central service versus cooperating peers.

| Point | Client-server | Peer-to-peer |
| --- | --- | --- |
| Roles | Clients request; designated servers provide services | Peers can both request and provide resources |
| Control | Central policies, accounts and backups are easier to coordinate | Control and copies distributed among peers |
| Performance | Predictable with adequate server capacity; server may bottleneck | Resources grow with peers, but peer capacity/availability vary |
| Scalability | Scale servers, replicas, caching and load distribution | More peers can contribute capacity; coordination becomes harder |
| Reliability | One unreplicated server is a failure point; replication helps | Loss of one peer need not stop system if useful replicas remain |
| Security | Central access control and monitoring | Trust and consistent access policy are harder |
| Best fit | Managed collaboration, databases, login services | Distributed content sharing among participating peers |

## Apply to the platform

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.

#### Practical example

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.

Source: Re-exam · 4 February 2026, original question paper page 1. Original marks retained; solution independently authored.

---

## TEE · Q1B · TCP/IP reference model

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q1b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-reexam/q1b

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### Actual PYQ · Q1B. Draw the labelled diagram of the TCP/IP reference model and explain the task of all layers. [5 marks]

#### Answer

Swipe across the diagram to read its labels ↔

![OSI layers mapped to the four-layer TCP/IP model](https://deep-learning-study-room.vercel.app/cn/fig/tee-models.5bff0518c8.svg)

Diagram: OSI layers mapped to the four-layer TCP/IP model. Labels: OSI layers mapped to the four-layer TCP/IP model | OSI layers mapped to the four-layer TCP/IP model | 7 Application | 6 Presentation | 5 Session | 4 Transport | 3 Network | 2 Data link | 1 Physical | Application | HTTP, DNS, FTP, SMTP | Transport | Internet | Link / network access | Includes physical access | Some textbooks split link into data link + physical: five layers.

TCP/IP model and its OSI mapping.

| Layer | Task | Examples |
| --- | --- | --- |
| Application | Defines application message formats and exchanges for Web access, naming, email and file transfer; includes presentation/session functions as needed | HTTP, DNS, SMTP, FTP |
| Transport | End-to-end process communication | TCP, UDP, SCTP |
| Internet | IP addressing, routing and best-effort datagrams | IPv4/IPv6 |
| Link/network access | Local delivery and physical access | Ethernet/Wi-Fi and their medium |

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.

#### Practical example

An HTTP request goes through application → transport TCP → internet IP → link Ethernet/Wi-Fi. Each layer contributes a different delivery function.

Source: Re-exam · 4 February 2026, original question paper page 1. Original marks retained; solution independently authored.

---

## TEE · Q1C · Pure ALOHA

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q1c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-reexam/q1c

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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? [5 marks]

#### Answer

## Given

Protocol = Pure ALOHA; G = 0.5 attempts/frame time.

## To find

S, 100S and the maximum possible S.

## Formula and why



$$
S=G e^{-2G}
$$



Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.

## Step-by-step solution

#### Step 1. Calculate the exponent

−2 × 0.5 = -1.

#### Step 2. Evaluate the exponential



$$
e^{-1} \approx 0.367879441
$$



#### Step 3. Multiply by G

S = 0.5 × 0.367879441 ≈ 0.183939721 successful frames/frame time.

#### Step 4. Convert to percentage

0.183939721 × 100 ≈ 18.3940%.

#### Step 5. State the maximum separately

The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.

**Final answer:** S ≈ 0.183940; percentage ≈ 18.3940%; Smax ≈ 0.183940 at G=0.5.

#### What this result means

A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.

Source: Re-exam · 4 February 2026, original question paper page 1. Original marks retained; solution independently authored.

---

## TEE · Q1D · IPv4 address block

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q1d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-reexam/q1d

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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. [5 marks]

#### Answer

## Given

IP/prefix = `193.20.35.40/26`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−26=6; N=26=64.

#### Step 2. Construct the mask

Mask=`255.255.255.192`; binary=`11111111.11111111.11111111.11000000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 192, so step=256−192=64. The IP value 40 lies in 0…63.

#### Step 4. Form the first/network address

Keep earlier octets; place 0 in octet 4; set any later octets to zero. Network=**193.20.35.0**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 11000001 | 11111111 | 11000001 | 193 |
| 2 | 00010100 | 11111111 | 00010100 | 20 |
| 3 | 00100011 | 11111111 | 00100011 | 35 |
| 4 | 00101000 | 11000000 | 00000000 | 0 |

#### Step 6. Form the last/broadcast address

Use 63 in the changing octet and 255 in any later octets. Broadcast=**193.20.35.63**.

#### Step 7. State usable hosts

First usable=193.20.35.1; last usable=193.20.35.62; count=64−2=62.

**Final answer:** Network 193.20.35.0; broadcast 193.20.35.63; 64 total, 62 ordinary usable; range 193.20.35.1–193.20.35.62.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

Source: Re-exam · 4 February 2026, original question paper page 1. Original marks retained; solution independently authored.

---

## TEE · Q2A · CRC polynomial division

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q2a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-reexam/q2a

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### Actual PYQ · Q2A. Consider a message represented by the polynomial M(x)=x5+x4+x. Consider a generating polynomial G(x)=x3+x2+1. Generate a 3-bit CRC and show the transmitted frame. How is error detected by CRC? [10 marks]

#### Answer

## Given

Message=110010; generator=1101; generator degree r=3. This is textbook systematic CRC with zero initial remainder and no reflection/final XOR.

## To find

Exactly r CRC bits, the transmitted frame and receiver syndromes.

## Formula and why



$$
R=(M\,2^r)\bmod_2 G,\qquad T=(M\,2^r)\oplus R
$$



Modulo-2 division uses aligned XOR, not ordinary decimal division.

## Step-by-step solution

#### Step 1. Preserve all polynomial coefficients

Message bits=110010; generator bits=1101. Leading exponent is 3, so CRC length is 3.

#### Step 2. Append zeros

110010 followed by 3 zeros = 110010000.

#### Step 3. Perform each nonzero XOR subtraction

| Before | Aligned generator | After XOR |
| --- | --- | --- |
| 110010000 | 110100000 | 000110000 |
| 000110000 | 000110100 | 000000100 |

Remainder padded to 3 bits = **100**. Leading zero columns need no subtraction.

#### Step 4. Construct the transmitted frame

Message + CRC = 110010 + 100 = **110010100**.

#### Step 5. Check the full frame

| Before | Aligned generator | After XOR |
| --- | --- | --- |
| 110010100 | 110100000 | 000110100 |
| 000110100 | 000110100 | 000000000 |

Receiver remainder = 000; the uncorrupted frame passes.

#### Step 6. Demonstrate detection

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.

**Final answer:** CRC=100; transmitted frame=110010100; uncorrupted receiver remainder=000.

#### What this result means

Some software CRCs use different initial/reflection/final conventions; this answer follows the polynomial-division question’s stated textbook model.

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.

Source: Re-exam · 4 February 2026, original question paper page 1. Original marks retained; solution independently authored.

---

## TEE · Q2B · Department subnet allocation

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q2b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-reexam/q2b

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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. [10 marks]

#### Answer

## Given

| Department | Labs | Total addresses per lab |
| --- | --- | --- |
| A | 32 | 128 |
| B | 64 | 64 |
| C | 16 | 512 |

Parent: 172.16.0.0/16 with 65,536 addresses.

## To find

Lab prefixes, department ranges and unused total addresses.

## Formula and why



$$
p=32-\log_2(N_{\mathrm{addresses\ per\ lab}})
$$





$$
N_{\mathrm{department}}=N_{\mathrm{labs}}N_{\mathrm{addresses\ per\ lab}}
$$



The question requests addresses, not usable hosts. Therefore do not add two before selecting each lab size.

## Step-by-step solution

#### Step 1. Department A size

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.

#### Step 2. Department B size

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.

#### Step 3. Department C size

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.

#### Step 4. List every lab allocation

| Lab | Prefix | First address | Last address |
| --- | --- | --- | --- |
| A1 | 172.16.0.0/25 | 172.16.0.0 | 172.16.0.127 |
| A2 | 172.16.0.128/25 | 172.16.0.128 | 172.16.0.255 |
| A3 | 172.16.1.0/25 | 172.16.1.0 | 172.16.1.127 |
| A4 | 172.16.1.128/25 | 172.16.1.128 | 172.16.1.255 |
| A5 | 172.16.2.0/25 | 172.16.2.0 | 172.16.2.127 |
| A6 | 172.16.2.128/25 | 172.16.2.128 | 172.16.2.255 |
| A7 | 172.16.3.0/25 | 172.16.3.0 | 172.16.3.127 |
| A8 | 172.16.3.128/25 | 172.16.3.128 | 172.16.3.255 |
| A9 | 172.16.4.0/25 | 172.16.4.0 | 172.16.4.127 |
| A10 | 172.16.4.128/25 | 172.16.4.128 | 172.16.4.255 |
| A11 | 172.16.5.0/25 | 172.16.5.0 | 172.16.5.127 |
| A12 | 172.16.5.128/25 | 172.16.5.128 | 172.16.5.255 |
| A13 | 172.16.6.0/25 | 172.16.6.0 | 172.16.6.127 |
| A14 | 172.16.6.128/25 | 172.16.6.128 | 172.16.6.255 |
| A15 | 172.16.7.0/25 | 172.16.7.0 | 172.16.7.127 |
| A16 | 172.16.7.128/25 | 172.16.7.128 | 172.16.7.255 |
| A17 | 172.16.8.0/25 | 172.16.8.0 | 172.16.8.127 |
| A18 | 172.16.8.128/25 | 172.16.8.128 | 172.16.8.255 |
| A19 | 172.16.9.0/25 | 172.16.9.0 | 172.16.9.127 |
| A20 | 172.16.9.128/25 | 172.16.9.128 | 172.16.9.255 |
| A21 | 172.16.10.0/25 | 172.16.10.0 | 172.16.10.127 |
| A22 | 172.16.10.128/25 | 172.16.10.128 | 172.16.10.255 |
| A23 | 172.16.11.0/25 | 172.16.11.0 | 172.16.11.127 |
| A24 | 172.16.11.128/25 | 172.16.11.128 | 172.16.11.255 |
| A25 | 172.16.12.0/25 | 172.16.12.0 | 172.16.12.127 |
| A26 | 172.16.12.128/25 | 172.16.12.128 | 172.16.12.255 |
| A27 | 172.16.13.0/25 | 172.16.13.0 | 172.16.13.127 |
| A28 | 172.16.13.128/25 | 172.16.13.128 | 172.16.13.255 |
| A29 | 172.16.14.0/25 | 172.16.14.0 | 172.16.14.127 |
| A30 | 172.16.14.128/25 | 172.16.14.128 | 172.16.14.255 |
| A31 | 172.16.15.0/25 | 172.16.15.0 | 172.16.15.127 |
| A32 | 172.16.15.128/25 | 172.16.15.128 | 172.16.15.255 |
| B1 | 172.16.16.0/26 | 172.16.16.0 | 172.16.16.63 |
| B2 | 172.16.16.64/26 | 172.16.16.64 | 172.16.16.127 |
| B3 | 172.16.16.128/26 | 172.16.16.128 | 172.16.16.191 |
| B4 | 172.16.16.192/26 | 172.16.16.192 | 172.16.16.255 |
| B5 | 172.16.17.0/26 | 172.16.17.0 | 172.16.17.63 |
| B6 | 172.16.17.64/26 | 172.16.17.64 | 172.16.17.127 |
| B7 | 172.16.17.128/26 | 172.16.17.128 | 172.16.17.191 |
| B8 | 172.16.17.192/26 | 172.16.17.192 | 172.16.17.255 |
| B9 | 172.16.18.0/26 | 172.16.18.0 | 172.16.18.63 |
| B10 | 172.16.18.64/26 | 172.16.18.64 | 172.16.18.127 |
| B11 | 172.16.18.128/26 | 172.16.18.128 | 172.16.18.191 |
| B12 | 172.16.18.192/26 | 172.16.18.192 | 172.16.18.255 |
| B13 | 172.16.19.0/26 | 172.16.19.0 | 172.16.19.63 |
| B14 | 172.16.19.64/26 | 172.16.19.64 | 172.16.19.127 |
| B15 | 172.16.19.128/26 | 172.16.19.128 | 172.16.19.191 |
| B16 | 172.16.19.192/26 | 172.16.19.192 | 172.16.19.255 |
| B17 | 172.16.20.0/26 | 172.16.20.0 | 172.16.20.63 |
| B18 | 172.16.20.64/26 | 172.16.20.64 | 172.16.20.127 |
| B19 | 172.16.20.128/26 | 172.16.20.128 | 172.16.20.191 |
| B20 | 172.16.20.192/26 | 172.16.20.192 | 172.16.20.255 |
| B21 | 172.16.21.0/26 | 172.16.21.0 | 172.16.21.63 |
| B22 | 172.16.21.64/26 | 172.16.21.64 | 172.16.21.127 |
| B23 | 172.16.21.128/26 | 172.16.21.128 | 172.16.21.191 |
| B24 | 172.16.21.192/26 | 172.16.21.192 | 172.16.21.255 |
| B25 | 172.16.22.0/26 | 172.16.22.0 | 172.16.22.63 |
| B26 | 172.16.22.64/26 | 172.16.22.64 | 172.16.22.127 |
| B27 | 172.16.22.128/26 | 172.16.22.128 | 172.16.22.191 |
| B28 | 172.16.22.192/26 | 172.16.22.192 | 172.16.22.255 |
| B29 | 172.16.23.0/26 | 172.16.23.0 | 172.16.23.63 |
| B30 | 172.16.23.64/26 | 172.16.23.64 | 172.16.23.127 |
| B31 | 172.16.23.128/26 | 172.16.23.128 | 172.16.23.191 |
| B32 | 172.16.23.192/26 | 172.16.23.192 | 172.16.23.255 |
| B33 | 172.16.24.0/26 | 172.16.24.0 | 172.16.24.63 |
| B34 | 172.16.24.64/26 | 172.16.24.64 | 172.16.24.127 |
| B35 | 172.16.24.128/26 | 172.16.24.128 | 172.16.24.191 |
| B36 | 172.16.24.192/26 | 172.16.24.192 | 172.16.24.255 |
| B37 | 172.16.25.0/26 | 172.16.25.0 | 172.16.25.63 |
| B38 | 172.16.25.64/26 | 172.16.25.64 | 172.16.25.127 |
| B39 | 172.16.25.128/26 | 172.16.25.128 | 172.16.25.191 |
| B40 | 172.16.25.192/26 | 172.16.25.192 | 172.16.25.255 |
| B41 | 172.16.26.0/26 | 172.16.26.0 | 172.16.26.63 |
| B42 | 172.16.26.64/26 | 172.16.26.64 | 172.16.26.127 |
| B43 | 172.16.26.128/26 | 172.16.26.128 | 172.16.26.191 |
| B44 | 172.16.26.192/26 | 172.16.26.192 | 172.16.26.255 |
| B45 | 172.16.27.0/26 | 172.16.27.0 | 172.16.27.63 |
| B46 | 172.16.27.64/26 | 172.16.27.64 | 172.16.27.127 |
| B47 | 172.16.27.128/26 | 172.16.27.128 | 172.16.27.191 |
| B48 | 172.16.27.192/26 | 172.16.27.192 | 172.16.27.255 |
| B49 | 172.16.28.0/26 | 172.16.28.0 | 172.16.28.63 |
| B50 | 172.16.28.64/26 | 172.16.28.64 | 172.16.28.127 |
| B51 | 172.16.28.128/26 | 172.16.28.128 | 172.16.28.191 |
| B52 | 172.16.28.192/26 | 172.16.28.192 | 172.16.28.255 |
| B53 | 172.16.29.0/26 | 172.16.29.0 | 172.16.29.63 |
| B54 | 172.16.29.64/26 | 172.16.29.64 | 172.16.29.127 |
| B55 | 172.16.29.128/26 | 172.16.29.128 | 172.16.29.191 |
| B56 | 172.16.29.192/26 | 172.16.29.192 | 172.16.29.255 |
| B57 | 172.16.30.0/26 | 172.16.30.0 | 172.16.30.63 |
| B58 | 172.16.30.64/26 | 172.16.30.64 | 172.16.30.127 |
| B59 | 172.16.30.128/26 | 172.16.30.128 | 172.16.30.191 |
| B60 | 172.16.30.192/26 | 172.16.30.192 | 172.16.30.255 |
| B61 | 172.16.31.0/26 | 172.16.31.0 | 172.16.31.63 |
| B62 | 172.16.31.64/26 | 172.16.31.64 | 172.16.31.127 |
| B63 | 172.16.31.128/26 | 172.16.31.128 | 172.16.31.191 |
| B64 | 172.16.31.192/26 | 172.16.31.192 | 172.16.31.255 |
| C1 | 172.16.32.0/23 | 172.16.32.0 | 172.16.33.255 |
| C2 | 172.16.34.0/23 | 172.16.34.0 | 172.16.35.255 |
| C3 | 172.16.36.0/23 | 172.16.36.0 | 172.16.37.255 |
| C4 | 172.16.38.0/23 | 172.16.38.0 | 172.16.39.255 |
| C5 | 172.16.40.0/23 | 172.16.40.0 | 172.16.41.255 |
| C6 | 172.16.42.0/23 | 172.16.42.0 | 172.16.43.255 |
| C7 | 172.16.44.0/23 | 172.16.44.0 | 172.16.45.255 |
| C8 | 172.16.46.0/23 | 172.16.46.0 | 172.16.47.255 |
| C9 | 172.16.48.0/23 | 172.16.48.0 | 172.16.49.255 |
| C10 | 172.16.50.0/23 | 172.16.50.0 | 172.16.51.255 |
| C11 | 172.16.52.0/23 | 172.16.52.0 | 172.16.53.255 |
| C12 | 172.16.54.0/23 | 172.16.54.0 | 172.16.55.255 |
| C13 | 172.16.56.0/23 | 172.16.56.0 | 172.16.57.255 |
| C14 | 172.16.58.0/23 | 172.16.58.0 | 172.16.59.255 |
| C15 | 172.16.60.0/23 | 172.16.60.0 | 172.16.61.255 |
| C16 | 172.16.62.0/23 | 172.16.62.0 | 172.16.63.255 |

#### Step 5. Calculate total allocation

4,096+4,096+8,192=16,384 addresses.

#### Step 6. Calculate unused space

65,536−16,384=49,152 addresses remain unallocated, from 172.16.64.0 through 172.16.255.255.

**Final answer:** A: /25 per lab; B: /26 per lab; C: /23 per lab. 49,152 total addresses remain unallocated.

#### What this result means

The three department blocks are aligned and non-overlapping. If these had been usable-host requirements, the per-lab prefixes would have been different.

Source: Re-exam · 4 February 2026, original question paper page 1. Original marks retained; solution independently authored.

---

## TEE · Q3A · Network definition and topologies

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q3a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-reexam/q3a

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### Actual PYQ · Q3A. Define computer networks. Discuss any two types of network topologies in computer networks with suitable diagrams. [5 marks]

#### Answer

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.

Swipe across the diagram to read its labels ↔

![Four physical network topologies](https://deep-learning-study-room.vercel.app/cn/fig/tee-topologies.d9e18f041b.svg)

Diagram: Four physical network topologies. Labels: Four physical network topologies | Four physical network topologies | Star | Bus | Ring | Full mesh: 4 nodes, 6 links | S | Links show arrangement. Actual access rules are a separate concept.

Use the star and bus panels for the two requested examples.

1. **Star:** 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.
2. **Bus:** 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.

#### Practical example

For a modern lab, a switched star supports easy port management; a bus is useful as a comparison of shared-medium organization.

Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q3B · OSPF best path

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q3b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-reexam/q3b

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### Actual PYQ · Q3B. Summarize how OSPF determines the best path to a destination network. [5 marks]

#### Answer

Swipe across the diagram to read its labels ↔

![Link-state routing: from local links to a shortest-path tree](https://deep-learning-study-room.vercel.app/cn/fig/link-state.bbee3173ec.svg)

Diagram: Link-state routing: from local links to a shortest-path tree. Labels: Link-state routing: from local links to a shortest-path tree | Link-state routing: from local links to a shortest-path tree | 1. Discover neighbours and costs | Each router measures or configures its local link information. | 2. Flood link-state information | Routers share topology information within the routing scope. | 3. Maintain the topology database | New information updates the shared view after convergence. | 4. Run Dijkstra from this router | Add link costs; install the resulting next hops.

Build the topology, then calculate the route.

1. Discover/maintain neighbours and determine local link costs.
2. Exchange link-state information and synchronize the database within the appropriate area.
3. Run Dijkstra’s shortest-path algorithm with the current router as the root.
4. Add outgoing link costs along candidate paths and select minimum-cost routes.
5. Install next-hop information; recalculate when relevant topology information changes.

#### Practical example

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.

Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q3C · DNS namespace

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q3c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-reexam/q3c

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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. [10 marks]

#### Answer

The **Domain Name System (DNS)** 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.

Swipe across the diagram to read its labels ↔

![DNS namespace: full label paths are unique](https://deep-learning-study-room.vercel.app/cn/fig/tee-dns.f5345fe9fb.svg)

Diagram: DNS namespace: full label paths are unique. Labels: DNS namespace: full label paths are unique | DNS namespace: full label paths are unique | Root . | com | org | example.com | example.org | www.example.com | www.example.org | Same local label “www”; different full names, so no collision.

Root, top-level domains, delegated domain and host labels.

| Level | Example | Meaning |
| --- | --- | --- |
| Root | . | Top of the namespace |
| Top-level domain (TLD) | com, org, in | A child zone below the root |
| Registered/delegated domain | example.com | Name under a parent such as com |
| Subdomain/host label | www.example.com | A label below example.com; a name may own different record types |

## Why names remain unique

1. 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.
2. 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.
3. 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.
4. 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.

## Resolution

1. A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.
2. 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.
3. 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.

#### Practical example

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.

Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q4A · IPv6 packet format

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q4a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-reexam/q4a

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### Actual PYQ · Q4A. Construct the IPv6 packet format and explain the purpose of each field. [10 marks]

#### Answer

Swipe across the diagram to read its labels ↔

![IPv6 base header · each horizontal row is 32 bits wide](https://deep-learning-study-room.vercel.app/cn/fig/ipv6-header.aef1bfbac7.svg)

Diagram: IPv6 base header · each horizontal row is 32 bits wide. Labels: IPv6 base header · each horizontal row is 32 bits wide | IPv6 base header · each horizontal row is 32 bits wide | Version | 4 | Traffic Class | 8 | Flow Label · 20 | Payload Length · 16 | Next Header | 8 | Hop Limit | 8 | Source address · 128 bits (four rows) | Destination address · 128 bits (four rows)

Eight base-header fields occupy 320 bits = 40 bytes.

| Field | Bits | Purpose |
| --- | --- | --- |
| Version | 4 | Value 6 |
| Traffic Class | 8 | Traffic treatment/congestion-related marking |
| Flow Label | 20 | Identifies a flow for appropriate handling |
| Payload Length | 16 | Bytes after the base header; includes extension headers when present |
| Next Header | 8 | Type of the next extension header or upper-layer protocol |
| Hop Limit | 8 | Decremented on forwarding; limits packet lifetime in hops |
| Source address | 128 | Sending interface address |
| Destination address | 128 | Destination address |

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.

#### Practical example

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.

Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q4B · TCP connection lifecycle

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q4b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-reexam/q4b

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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. [10 marks]

#### Answer

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.

Swipe across the diagram to read its labels ↔

![TCP: handshake, data and orderly close](https://deep-learning-study-room.vercel.app/cn/fig/tee-handshake.e053246177.svg)

Diagram: TCP: handshake, data and orderly close. Labels: TCP: handshake, data and orderly close | TCP: handshake, data and orderly close | Client | Server | SYN Seq=1000 | SYN+ACK Seq=5000, Ack=1001 | ACK Seq=1001, Ack=5001 | 200 data bytes: Seq=1001, last=1200 | ACK=1201 (next expected byte) | FIN Seq=1201 | ACK=1202; server may still send | FIN Seq=5001 (no server data here) | ACK=5002; common active-close TIME-WAIT | Pure ACK uses no sequence space. SYN and FIN each use one.

SYN and FIN each consume one sequence number; pure ACK consumes none.

| Step | Segment | Meaning |
| --- | --- | --- |
| 1 Client → server | SYN, Seq=1000 | Client proposes its starting sequence |
| 2 Server → client | SYN+ACK, Seq=5000, Ack=1001 | Server acknowledges client SYN and supplies its own start |
| 3 Client → server | ACK, Seq=1001, Ack=5001 | Client acknowledges server SYN; connection is established |

## Data transfer

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.

## Orderly termination

1. Assume client’s next data sequence is 1201. It sends FIN with Seq=1201, meaning it has finished sending.
2. Server sends ACK=1202. The connection is half closed: the server can still send data until its application finishes.
3. Assume server has sent no data since the handshake. It sends FIN with Seq=5001.
4. 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.
5. 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.

#### Practical example

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.

Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q5A · Go-Back-N three cases

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q5a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-reexam/q5a

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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. [10 marks]

#### Answer

**Go-Back-N (GBN) ARQ** pipelines up to W outstanding frames. For m-bit sequence numbers, textbook GBN uses W ≤ 2m−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”.

Swipe across the diagram to read its labels ↔

![GBN W=7: loss and cumulative ACKs](https://deep-learning-study-room.vercel.app/cn/fig/tee-gbn.5f577a6979.svg)

Diagram: GBN W=7: loss and cumulative ACKs. Labels: GBN W=7: loss and cumulative ACKs | GBN W=7: loss and cumulative ACKs | Sender | Receiver | Frames 0,1 → accept in order | ACK 2: next expected is 2 | Frame 2 lost | Frames 3,4,5,6 → discard out of order | ACK 2 repeated | Timer for 2 expires: resend 2,3,4,5,6 | ACK 7: frames through 6 accepted | Receiver window = [2] while waiting; no out-of-order buffering. | Sender retains all unacknowledged frames from base 2 onward.

GBN example: frame 2 lost; frames 3–6 discarded; timeout resends 2–6.

1. 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.
2. Normal: after receiving 0 and 1, cumulative ACK 2 advances the sender base to 2. The sender can fill newly opened window slots.
3. 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.
4. 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.
5. 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.

#### Practical example

With W=7, loss of frame 2 can waste successful receptions of 3…6. GBN trades simple receiver buffering for extra retransmission after loss.

Swipe across the diagram to read its labels ↔

![GBN W=7: normal window movement](https://deep-learning-study-room.vercel.app/cn/fig/tee-gbn-normal.144a24ea80.svg)

Diagram: GBN W=7: normal window movement. Labels: GBN W=7: normal window movement | GBN W=7: normal window movement | Sender | Receiver | Frame 0 from sender window [0…6] | ACK 1 → sender window [1…7] | Frame 1 arrives; receiver now expects 2 | ACK 2 → sender window [2…7,0] | Receiver window progresses [0] → [1] → [2]. | Sequence labels wrap modulo 8; sender window contains 7 slots.

Normal transmission: both windows advance as frames are cumulatively acknowledged.

Swipe across the diagram to read its labels ↔

![GBN: a later cumulative ACK covers a lost ACK](https://deep-learning-study-room.vercel.app/cn/fig/tee-gbn-ack.713dc9972e.svg)

Diagram: GBN: a later cumulative ACK covers a lost ACK. Labels: GBN: a later cumulative ACK covers a lost ACK | GBN: a later cumulative ACK covers a lost ACK | Sender | Receiver | Frame 0 accepted; receiver expects 1 | ACK 1 is lost | Frame 1 accepted; receiver expects 2 | ACK 2 arrives before timeout | Sender advances base to 2; continues | ACK 2 confirms frames 0 and 1; no retransmission needed. | Without a later useful ACK, oldest-frame timeout triggers resend.

A later cumulative ACK can cover an earlier lost ACK.

Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q5B · FTP connections

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q5b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-reexam/q5b

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### Actual PYQ · Q5B. Explain what FTP is and describe the functions of the control connection and the data connection. [10 marks]

#### Answer

**File Transfer Protocol (FTP)** 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.

Swipe across the diagram to read its labels ↔

![FTP: separate control and data connections](https://deep-learning-study-room.vercel.app/cn/fig/tee-ftp.1b305fa997.svg)

Diagram: FTP: separate control and data connections. Labels: FTP: separate control and data connections | FTP: separate control and data connections | Client → server TCP port 21 | Control: USER, PASS, CWD, TYPE, RETR/STOR/LIST, QUIT; server replies. | Active mode: server initiates data | Client provides a listening endpoint; traditional server data source port is 20. | Passive mode: client initiates data | Server advertises an endpoint; client connects to that selected port. | Data connection carries file/listing bytes | Command channel stays separate; another operation can open another data connection.

Control connection on server port 21; active/passive data connection roles differ.

| Connection | Function | Lifetime / ports |
| --- | --- | --- |
| Control | Commands and replies: USER, PASS, CWD, TYPE, LIST, RETR, STOR, QUIT | Client connects to server TCP port 21; normally kept for the session |
| Data | File contents and directory listing data | Opened as needed; separate from command channel |

## How a transfer works

1. Client opens the control connection and exchanges server greeting, login commands and replies. Plain FTP sends credentials/data without encryption.
2. Client chooses transfer settings such as binary/image mode for arbitrary bytes, and requests the needed working directory/operation.
3. In **active FTP**, the client provides a listening endpoint and the server initiates the data connection, traditionally from server port 20.
4. In **passive FTP**, 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.
5. 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.
6. QUIT ends the control session.

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.

#### Practical example

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.

Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q6A · Media classification and fiber

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q6a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-reexam/q6a

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### Actual PYQ · Q6A. How is transmission media classified? List advantages and disadvantages of optical fiber. [5 marks]

#### Answer

Transmission media are classified into guided media (twisted pair, coaxial cable, optical fiber) and unguided media (radio, microwave, infrared).

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.

| Advantages | Disadvantages / design costs |
| --- | --- |
| High data capacity and low attenuation over suitable links | Optical transceivers, connectors and splicing add cost/skill requirements |
| Immune to electromagnetic interference; no electrical crosstalk | Tight bends, dirty connectors and poor installation increase loss |
| Electrical isolation between buildings | Fiber is mechanically sensitive and requires appropriate protection |
| Harder to tap casually than an unprotected radio channel | It is not automatically confidential; encryption/access control remain necessary |

#### Practical example

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.

Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q6B · ALOHA at three rates

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q6b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-reexam/q6b

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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? [5 marks]

#### Answer

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.

## Case a · 1000 frames/s

## Given

| Symbol | Given |
| --- | --- |
| L | 200 bits |
| R | 200 kbps = 200,000 bits/s |
| λ | 1000 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-2G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 200/200,000 = 0.001 s = 1 ms.

#### Step 2. Offered load

G = 1000 × 0.001 = 1 attempts/frame time.

#### Step 3. Exponent and exponential

−2G = -2; e to that power ≈ 0.135335283.

#### Step 4. Normalized throughput

S = 1 × 0.135335283 ≈ 0.135335283.

#### Step 5. Successful frames each second

S/T = 0.135335283/0.001 ≈ 135.335283 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.135335283 × 200,000 ≈ 27067.056647 bits/s ≈ 27.067057 kbps.

**Final answer:** G=1, S≈0.135335, successful rate≈135.335 frames/s = 27.067 kbps.

#### What this result means

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 λ.

## Case b · 500 frames/s

## Given

| Symbol | Given |
| --- | --- |
| L | 200 bits |
| R | 200 kbps = 200,000 bits/s |
| λ | 500 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-2G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 200/200,000 = 0.001 s = 1 ms.

#### Step 2. Offered load

G = 500 × 0.001 = 0.5 attempts/frame time.

#### Step 3. Exponent and exponential

−2G = -1; e to that power ≈ 0.367879441.

#### Step 4. Normalized throughput

S = 0.5 × 0.367879441 ≈ 0.183939721.

#### Step 5. Successful frames each second

S/T = 0.183939721/0.001 ≈ 183.939721 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.183939721 × 200,000 ≈ 36787.944117 bits/s ≈ 36.787944 kbps.

**Final answer:** G=0.5, S≈0.183940, successful rate≈183.940 frames/s = 36.788 kbps.

#### What this result means

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 λ.

## Case c · 250 frames/s

## Given

| Symbol | Given |
| --- | --- |
| L | 200 bits |
| R | 200 kbps = 200,000 bits/s |
| λ | 250 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-2G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 200/200,000 = 0.001 s = 1 ms.

#### Step 2. Offered load

G = 250 × 0.001 = 0.25 attempts/frame time.

#### Step 3. Exponent and exponential

−2G = -0.5; e to that power ≈ 0.606530660.

#### Step 4. Normalized throughput

S = 0.25 × 0.606530660 ≈ 0.151632665.

#### Step 5. Successful frames each second

S/T = 0.151632665/0.001 ≈ 151.632665 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.151632665 × 200,000 ≈ 30326.532986 bits/s ≈ 30.326533 kbps.

**Final answer:** G=0.25, S≈0.151633, successful rate≈151.633 frames/s = 30.327 kbps.

#### What this result means

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 λ.

Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q6C · UDP TCP SCTP comparison

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q6c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-reexam/q6c

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### Actual PYQ · Q6C. Compare UDP, TCP and SCTP with appropriate points (any eight points). [10 marks]

#### Answer

| Point | UDP | TCP | SCTP |
| --- | --- | --- | --- |
| Service unit | Datagram; preserves messages | Byte stream; no message boundaries | Messages carried in chunks; preserves boundaries |
| Connection setup | No protocol handshake | Connection; usual three-way SYN exchange | Association; four-message cookie exchange |
| Reliability | No delivery/order guarantee | Reliable ordered stream | Reliable messages; ordered per stream by default, unordered option |
| Ordering scope | None supplied | One ordered byte stream per direction | Multiple streams; per-stream order avoids blocking every stream on one stream’s ordering gap |
| Flow control | Not supplied by UDP | Receiver-advertised window | Receiver flow control |
| Congestion control | Not supplied by UDP | Yes | Yes |
| Multihoming | No built-in association failover | Classic TCP uses one address pair | Association can bind multiple addresses; built-in path failover |
| Header | 8 bytes | Minimum 20 bytes | 12-byte common header plus chunks |
| Typical use | DNS, real-time applications with their own controls | Web over HTTP/1.1 or HTTP/2, reliable byte transfers | Telecom signalling and multi-stream message applications |
| Performance claim | Low protocol overhead, not automatically fastest overall | Recovery/ordering have costs and benefits | Extra capabilities; no universal speed ranking |

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.

#### Practical example

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.

Source: Re-exam · 4 February 2026, original question paper page 2. Original marks retained; solution independently authored.

---

## TEE · Q7A · Bellman–Ford intermediate steps

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q7a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-reexam/q7a

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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. [10 marks]

#### Answer

## Given

| Directed edge | Weight |
| --- | --- |
| 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 |

## To find

The shortest route and cost, with complete passes and a negative-cycle check.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



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.

Swipe across the diagram to read its labels ↔

![Bellman–Ford · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/bellman-pyq.8245b97635.svg)

Diagram: Bellman–Ford · given directed graph. Labels: Bellman–Ford · given directed graph | Bellman–Ford · given directed graph | A | A | B | B | A->B | 7 | C | C | A->C | 6 | D | D | A->D | 5 | E | E | B->E | -2 | C->B | -2 | C->E | 1 | D->C | -2 | F | F | D->F | 3 | G | G | E->G | 5 | F->G | 4

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

7 vertices → at most 6 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.

#### Step 2. Pass 1: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | ∞ | 0+(7)=7 | 7 | Update; predecessor=A |
| A→C | ∞ | 0+(6)=6 | 6 | Update; predecessor=A |
| A→D | ∞ | 0+(5)=5 | 5 | Update; predecessor=A |
| B→E | ∞ | 7+(-2)=5 | 5 | Update; predecessor=B |
| D→C | 6 | 5+(-2)=3 | 3 | Update; predecessor=D |
| C→B | 7 | 3+(-2)=1 | 1 | Update; predecessor=C |
| C→E | 5 | 3+(1)=4 | 4 | Update; predecessor=C |
| E→G | ∞ | 4+(5)=9 | 9 | Update; predecessor=E |
| D→F | ∞ | 5+(3)=8 | 8 | Update; predecessor=D |
| F→G | 9 | 8+(4)=12 | 9 | No improvement |

| Vertex | A | B | C | D | E | F | G |
| --- | --- | --- | --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 1 | 3 | 5 | 4 | 8 | 9 |
| Predecessor | — | C | D | A | C | D | E |

#### Step 3. Pass 2: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | 1 | 0+(7)=7 | 1 | No improvement |
| A→C | 3 | 0+(6)=6 | 3 | No improvement |
| A→D | 5 | 0+(5)=5 | 5 | No improvement |
| B→E | 4 | 1+(-2)=-1 | -1 | Update; predecessor=B |
| D→C | 3 | 5+(-2)=3 | 3 | No improvement |
| C→B | 1 | 3+(-2)=1 | 1 | No improvement |
| C→E | -1 | 3+(1)=4 | -1 | No improvement |
| E→G | 9 | -1+(5)=4 | 4 | Update; predecessor=E |
| D→F | 8 | 5+(3)=8 | 8 | No improvement |
| F→G | 4 | 8+(4)=12 | 4 | No improvement |

| Vertex | A | B | C | D | E | F | G |
| --- | --- | --- | --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 1 | 3 | 5 | -1 | 8 | 4 |
| Predecessor | — | C | D | A | B | D | E |

#### Step 4. Pass 3: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | 1 | 0+(7)=7 | 1 | No improvement |
| A→C | 3 | 0+(6)=6 | 3 | No improvement |
| A→D | 5 | 0+(5)=5 | 5 | No improvement |
| B→E | -1 | 1+(-2)=-1 | -1 | No improvement |
| D→C | 3 | 5+(-2)=3 | 3 | No improvement |
| C→B | 1 | 3+(-2)=1 | 1 | No improvement |
| C→E | -1 | 3+(1)=4 | -1 | No improvement |
| E→G | 4 | -1+(5)=4 | 4 | No improvement |
| D→F | 8 | 5+(3)=8 | 8 | No improvement |
| F→G | 4 | 8+(4)=12 | 4 | No improvement |

| Vertex | A | B | C | D | E | F | G |
| --- | --- | --- | --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 1 | 3 | 5 | -1 | 8 | 4 |
| Predecessor | — | C | D | A | B | D | E |

#### Step 5. Stop after an unchanged pass

This entire pass changed no distance. Further identical relaxation passes will not improve anything.

#### Step 6. Recover and total the path

Backward predecessors: G ← E ← B ← C ← D ← A. Forward route: A → D → C → B → E → G.

Cost = (5) + (-2) + (-2) + (-2) + (5) = 4. No edge can now improve its destination label.

**Final answer:** A → D → C → B → E → G; shortest cost=4.

#### What this result means

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.

Swipe across the diagram to read its labels ↔

![Bellman–Ford · final route and distances](https://deep-learning-study-room.vercel.app/cn/fig/bellman-pyq-solution.9ae8451e95.svg)

Diagram: Bellman–Ford · final route and distances. Labels: Bellman–Ford · final route and distances | Bellman–Ford · final route and distances | A | A | 0 | B | B | 1 | A->B | 7 | C | C | 3 | A->C | 6 | D | D | 5 | A->D | 5 | E | E | -1 | B->E | -2 | C->B | -2 | C->E | 1 | D->C | -2 | F | F | 8 | D->F | 3 | G | G | 4 | E->G | 5 | F->G | 4

Highlighted route A→D→C→B→E→G, cost 5−2−2−2+5=4.

Source: Re-exam · 4 February 2026, original question paper page 3. Original marks retained; solution independently authored.

---

## TEE · Q7B · Leaky bucket and comparison

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-paper-reexam--q7b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/tee-paper-reexam/q7b

TEE · Actual TEE paper · all questions · current syllabus 702AI0C023

### 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. [10 marks]

#### Answer

In the textbook **leaky-bucket queue/shaper** 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.

Swipe across the diagram to read its labels ↔

![Leaky-bucket data queue](https://deep-learning-study-room.vercel.app/cn/fig/tee-leaky.77bdbcf957.svg)

Diagram: Leaky-bucket data queue. Labels: Leaky-bucket data queue | Leaky-bucket data queue | Bursty arrivals enter finite buffer B | Accept packets that fit; the stated queue model drops overflow. | Queue drains at configured rate r | Send while data exists. An empty queue produces no packets. | Smoother departure stream | Buffering adds delay; idle service cannot be saved for a later burst.

Finite data buffer smooths a burst into a bounded departure rate.

1. Choose buffer capacity B and output service rate r in consistent units.
2. Admit arrivals that fit. Drop/mark overflow according to the stated implementation; this queue example drops the excess.
3. Drain at rate r while the queue is nonempty. Idle time does not accumulate permission for a later faster burst.
4. The result is smoothed output. Larger buffers accommodate larger bursts but can increase waiting delay.

| Advantage | Limitation |
| --- | --- |
| Simple bound on output rate | Bursts may overflow or suffer delay |
| Reduces short-term output variation | Unused idle service cannot be saved |
| Useful for predictable traffic shaping | No end-to-end delay/loss guarantee by itself |

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.

#### Practical example

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.

## Justified comparison

| Point | Leaky data queue | Token bucket |
| --- | --- | --- |
| Stored state | Queued data | Tokens representing permission |
| Idle period | Empty queue; unused service lost | Tokens accumulate up to B |
| Output burst | Smoothed by configured service rate | Allowed if enough tokens and physical capacity exist |
| Overflow/shortage | Finite queue can overflow | Shaper waits; policer may mark/drop |
| Main parameters | Queue capacity and drain rate | Token capacity and generation rate |
| Useful when | A smoother output profile is required | Average rate plus burst allowance is required |

#### Practical example

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.

Neither is always advantageous. Choose leaky queue shaping for smooth departures; choose token bucket when controlled bursts after idle time are desirable.

Source: Re-exam · 4 February 2026, original question paper page 3. Original marks retained; solution independently authored.

---

## TEE · Q1(a) · Network definition

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q1a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q1a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q1(a). What is computer Network. Draw a schematic diagram of it. [5 marks]

### Answer

A **computer network** 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.

| Type | Meaning and scope | Example |
| --- | --- | --- |
| PAN | Personal Area Network: a person’s nearby devices | Phone linked to earbuds |
| LAN | Local Area Network: a building or local campus network under local administration | Laboratory Ethernet/Wi-Fi |
| MAN | Metropolitan Area Network: interconnects sites across a town/city | City-wide institutional network |
| WAN | Wide Area Network: connects geographically separated networks over regional/global links | Branches in different cities |
| ARPANET | Historical packet-switched research network; a major predecessor of the Internet | Early interconnected research institutions; not a modern geographic size category |

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.

#### Practical example

A student uses a PAN for earbuds, a LAN in the lab and a WAN when accessing a distant university service.

**Yaad rakho:** PAN personal, LAN local, MAN city, WAN wide.

```
Host A ─┐
        ├─ Switch ─ Router ─ Other network
Host B ─┘
```

The hosts exchange application data; the switch forwards local frames; the router connects different IP networks.

---

## TEE · Q1(b) · Error control

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q1b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q1b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q1(b). What is error control. What are the different methods defined for error control. [5 marks]

### Answer

A transmission error changes one or more bits. A **single-bit error** flips one bit. A **burst error** 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.

## Block coding

1. Divide data into fixed k-bit datawords. Map each one to an n-bit codeword, with n greater than k.
2. The n−k redundant bits create separation between valid codewords. There are 2k valid codewords, a subset of the 2n possible n-bit patterns, for an injective binary block code.
3. 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.
4. Error-control protocols may combine detection with retransmission (ARQ), or use sufficient coding redundancy for forward error correction (FEC).



$$
R_c=k/n,\quad r=n-k
$$



#### Practical example

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.

**Yaad rakho:** Detection asks error hua? Correction asks kaunsa correct word?

---

## TEE · Q1(c) · Classful IPv4

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q1c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q1c

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q1(c). Explain the classes of IP address. [5 marks]

### Answer

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.

| Class | First octet | Default mask | Network / host split | Purpose |
| --- | --- | --- | --- | --- |
| A | 1–126 (ordinary unicast) | 255.0.0.0 (/8) | 8 / 24 bits | Large historical unicast networks; 0 and 127 reserved |
| B | 128–191 | 255.255.0.0 (/16) | 16 / 16 bits | Medium historical unicast networks |
| C | 192–223 | 255.255.255.0 (/24) | 24 / 8 bits | Small historical unicast networks |
| D | 224–239 | No unicast default mask | Not network/host class split | Multicast |
| E | 240–255 | No unicast default mask | Not normal unicast allocation | Reserved/experimental; special addresses exist |

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.

---

## TEE · Q1(d) · UDP features

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q1d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q1d

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q1(d). What are the features of UDP. [5 marks]

### Answer

**User Datagram Protocol (UDP)** provides connectionless, message-oriented process delivery. One send creates a datagram; message boundaries are retained. UDP has an **8-byte header**, 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.

Swipe across the diagram to read its labels ↔

![UDP header: each row contains 32 bits](https://deep-learning-study-room.vercel.app/cn/fig/tee-udp.b14cba3c28.svg)

Diagram: UDP header: each row contains 32 bits. Labels: UDP header: each row contains 32 bits | UDP header: each row contains 32 bits | Source port · 16 | Destination port · 16 | Length · 16 | Checksum · 16 | Total 8 bytes. Length = header + UDP payload.

UDP fixed header: four 16-bit fields, eight bytes total.

| UDP field | Width | Purpose |
| --- | --- | --- |
| Source port | 16 bits | Sending endpoint; a zero value can indicate no reply port when unused |
| Destination port | 16 bits | Receiving application endpoint |
| Length | 16 bits | UDP header plus UDP payload; minimum 8 bytes |
| Checksum | 16 bits | Error detection over UDP and an IP pseudo-header; not retransmission |

## Operation and services

1. 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.
2. The receiving UDP layer validates the length/checksum as applicable and uses the destination endpoint to deliver the datagram.
3. 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.
4. UDP checksum zero can mean checksum omitted in IPv4. IPv6 ordinarily requires the UDP checksum; specialized exceptions are outside this syllabus.

#### Practical example

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.

**Yaad rakho:** UDP datagram preserve; reliability automatic nahi.

---

## TEE · Q2(a) · Network topologies

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q2a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q2a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [10 marks]

### Answer

**Topology** 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.

Swipe across the diagram to read its labels ↔

![Four physical network topologies](https://deep-learning-study-room.vercel.app/cn/fig/tee-topologies.d9e18f041b.svg)

Diagram: Four physical network topologies. Labels: Four physical network topologies | Four physical network topologies | Star | Bus | Ring | Full mesh: 4 nodes, 6 links | S | Links show arrangement. Actual access rules are a separate concept.

Star, bus, ring and full mesh; edges depict physical connections.

| Topology | Structure | Benefit | Limitation |
| --- | --- | --- | --- |
| Bus | Devices share a common backbone | Simple small shared-medium layout | Backbone fault affects segment; collisions possible on classic shared bus |
| Star | Each device connects to a central switch/hub | Easy expansion and fault isolation | Central-device failure affects star; more cabling |
| Ring | Each node connected to two neighbours in a ring | Structured traversal; token-based variants coordinate access | Simple single-ring break can disrupt operation unless protected |
| Full mesh | Every pair has a direct link | Redundant paths and direct connectivity | Expensive ports/cabling: n(n−1)/2 undirected links |
| Tree/hybrid | Hierarchical stars or combined topologies | Scales into buildings/floors | Upper-level faults affect dependent branches |

#### Practical example

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.

**Yaad rakho:** Layout draw karo, then one strength and one failure case.

### Two advantages and two disadvantages of each topology

| Topology / example | Advantage 1 | Advantage 2 | Disadvantage 1 | Disadvantage 2 |
| --- | --- | --- | --- | --- |
| Star: switched computer laboratory | A device can be added on a spare central port without rebuilding the whole topology | A single access-cable fault normally isolates only its attached device | Central-switch failure affects all attached devices unless redundant | A separate cable and switch port are needed per device |
| Bus: legacy coaxial Ethernet | Uses little cable in a small linear layout | No central switch is required in the simple shared-bus design | A backbone fault can disable the segment | Shared bandwidth, contention and fault diagnosis become difficult as it grows |
| Ring: token-based ring | Controlled token access avoids data collisions among compliant stations | Token rotation gives stations an organized opportunity to transmit | A break can interrupt an unprotected single ring | Adding/removing a node can disrupt a simple ring |
| Mesh: redundant router backbone | Alternate links preserve connectivity after some link failures | Direct pairwise links can carry separate exchanges without a shared central bottleneck | A full mesh needs n(n−1)/2 links and many ports | Configuration, cabling and maintenance become complex |

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.

---

## TEE · Q2(b) · Stop-and-Wait versus Go-Back-N

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q2b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q2b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q2(b). Explain the stop and Wait ARQ and the Go Back N ARQ method. Which method is superior and why? [10 marks]

### Answer

**Stop-and-Wait ARQ** 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.

Swipe across the diagram to read its labels ↔

![Stop-and-Wait: lost ACK and duplicate rejection](https://deep-learning-study-room.vercel.app/cn/fig/tee-stopwait.a99281ab96.svg)

Diagram: Stop-and-Wait: lost ACK and duplicate rejection. Labels: Stop-and-Wait: lost ACK and duplicate rejection | Stop-and-Wait: lost ACK and duplicate rejection | Sender | Receiver | Frame 0 → accepted, delivered once | ACK 1 lost on return path | Timeout: resend frame 0 → duplicate | Repeat ACK 1; duplicate not delivered | Frame 1 → next new frame | ACK k means next expected sequence k in this diagram.

Lost ACK causes a duplicate transmission, not duplicate delivery.

1. Use alternating sequence numbers 0 and 1. The receiver remembers the next expected number. Here ACK k means the next sequence expected.
2. Normal: send frame 0, receiver accepts it and sends ACK 1; sender then sends frame 1.
3. Damaged/lost data: receiver cannot accept the missing valid frame. The sender eventually times out and retransmits.
4. 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.
5. A damaged ACK must not advance the sender. The timer provides eventual recovery. Waiting each round trip limits utilization on high-delay links.

#### Practical example

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.

**Yaad rakho:** One frame outstanding; duplicate ko acknowledge karo, deliver dobara nahi.

**Go-Back-N (GBN) ARQ** pipelines up to W outstanding frames. For m-bit sequence numbers, textbook GBN uses W ≤ 2m−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”.

Swipe across the diagram to read its labels ↔

![GBN W=7: loss and cumulative ACKs](https://deep-learning-study-room.vercel.app/cn/fig/tee-gbn.5f577a6979.svg)

Diagram: GBN W=7: loss and cumulative ACKs. Labels: GBN W=7: loss and cumulative ACKs | GBN W=7: loss and cumulative ACKs | Sender | Receiver | Frames 0,1 → accept in order | ACK 2: next expected is 2 | Frame 2 lost | Frames 3,4,5,6 → discard out of order | ACK 2 repeated | Timer for 2 expires: resend 2,3,4,5,6 | ACK 7: frames through 6 accepted | Receiver window = [2] while waiting; no out-of-order buffering. | Sender retains all unacknowledged frames from base 2 onward.

GBN example: frame 2 lost; frames 3–6 discarded; timeout resends 2–6.

1. 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.
2. Normal: after receiving 0 and 1, cumulative ACK 2 advances the sender base to 2. The sender can fill newly opened window slots.
3. 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.
4. 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.
5. 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.

#### Practical example

With W=7, loss of frame 2 can waste successful receptions of 3…6. GBN trades simple receiver buffering for extra retransmission after loss.

Swipe across the diagram to read its labels ↔

![GBN W=7: normal window movement](https://deep-learning-study-room.vercel.app/cn/fig/tee-gbn-normal.144a24ea80.svg)

Diagram: GBN W=7: normal window movement. Labels: GBN W=7: normal window movement | GBN W=7: normal window movement | Sender | Receiver | Frame 0 from sender window [0…6] | ACK 1 → sender window [1…7] | Frame 1 arrives; receiver now expects 2 | ACK 2 → sender window [2…7,0] | Receiver window progresses [0] → [1] → [2]. | Sequence labels wrap modulo 8; sender window contains 7 slots.

Normal transmission: both windows advance as frames are cumulatively acknowledged.

Swipe across the diagram to read its labels ↔

![GBN: a later cumulative ACK covers a lost ACK](https://deep-learning-study-room.vercel.app/cn/fig/tee-gbn-ack.713dc9972e.svg)

Diagram: GBN: a later cumulative ACK covers a lost ACK. Labels: GBN: a later cumulative ACK covers a lost ACK | GBN: a later cumulative ACK covers a lost ACK | Sender | Receiver | Frame 0 accepted; receiver expects 1 | ACK 1 is lost | Frame 1 accepted; receiver expects 2 | ACK 2 arrives before timeout | Sender advances base to 2; continues | ACK 2 confirms frames 0 and 1; no retransmission needed. | Without a later useful ACK, oldest-frame timeout triggers resend.

A later cumulative ACK can cover an earlier lost ACK.

**Yaad rakho:** GBN receiver one; gap ke baad discard; timeout pe outstanding suffix repeat.

| Property | Stop-and-Wait | Go-Back-N | Selective Repeat |
| --- | --- | --- | --- |
| Outstanding sender frames | 1 | Up to 2^m−1 | Up to 2^(m−1), equal windows |
| Receiver window | 1 | 1 | Same maximum as sender in standard equal-window SR |
| ACK convention used here | Next expected | Cumulative, next expected | Individual frame accepted |
| Out-of-order data | Not delivered | Discarded | Buffered within valid window |
| After timeout | Repeat the one frame | Repeat outstanding frames from base | Repeat only timed-out frame |
| Buffer/tracking cost | Low | Sender window; simple receiver | Sender and receiver windows; per-frame tracking |
| Tradeoff | Simple but idle during RTT | Good pipelining, waste after loss | Efficient loss recovery, greater complexity |

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.

#### Practical example

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.

### Which is superior, and why?

**Go-Back-N is usually superior in link utilization when propagation delay is significant:** 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.

---

## TEE · Q3(a) · FDMA and TDMA

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q3a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q3a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q3(a). Explain and compare the FDMA and TDMA techniques. [10 marks]

### Answer

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.

---

## TEE · Q3(b) · Classful net/host IDs and /26 host

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q3b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q3b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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] [10 marks]

### Answer

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.

| Class | First octet | Default mask | Network / host split | Purpose |
| --- | --- | --- | --- | --- |
| A | 1–126 (ordinary unicast) | 255.0.0.0 (/8) | 8 / 24 bits | Large historical unicast networks; 0 and 127 reserved |
| B | 128–191 | 255.255.0.0 (/16) | 16 / 16 bits | Medium historical unicast networks |
| C | 192–223 | 255.255.255.0 (/24) | 24 / 8 bits | Small historical unicast networks |
| D | 224–239 | No unicast default mask | Not network/host class split | Multicast |
| E | 240–255 | No unicast default mask | Not normal unicast allocation | Reserved/experimental; special addresses exist |

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.

### Classful split

| Address | Class and mask | Network ID | Host ID |
| --- | --- | --- | --- |
| 114.34.2.8 | A /8 | 114.0.0.0 | 34.2.8 (24-bit host portion) |
| 208.34.54.12 | C /24 | 208.34.54.0 | 12 (8-bit host portion) |

### Last valid host of 165.21.80.128/26

### Given

165.21.80.128/26

### To find

First and last addresses and total block size.

### Formula and why



$$
N=2^{32-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.

### Step 1. Find host bits

32 − 26 = 6. N = 64.

### Step 2. Locate the aligned block

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.

### Step 3. Write the result

First = **165.21.80.128**; last = **165.21.80.191**; total = **64** addresses. Usual usable host range: 165.21.80.129–165.21.80.190.

**Asked host answer: 165.21.80.190**; .191 is broadcast, not a usable host.

---

## TEE · Q4(a) · CSMA persistence and CSMA/CD

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q4a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q4a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q4(a). Explain the persistence method defined in CSMA. In which way these methods are used in CSMA/CD. [10 marks]

### Answer

**Definition.** Persistence specifies how a station behaves after observing that the medium is busy or becomes idle.

**Simple meaning.** 1 = turant; non = random wait; p = probability ke basis pe start.

Swipe across the diagram to read its labels ↔

![CSMA persistence: what happens after carrier sensing?](https://deep-learning-study-room.vercel.app/cn/fig/persistence.528dafcd8a.svg)

Diagram: CSMA persistence: what happens after carrier sensing?. Labels: CSMA persistence: what happens after carrier sensing? | CSMA persistence: what happens after carrier sensing? | 1-persistent | Busy: keep listening. Idle: transmit immediately. | Non-persistent | Busy: random wait, then sense again. Idle: transmit. | p-persistent | Eligible idle slot: transmit with probability p; defer with probability 1−p.

1-persistent, non-persistent and p-persistent CSMA

## Understand it step by step

1. 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.
2. 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.
3. 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.

| Rule | When idle | When busy | Trade-off |
| --- | --- | --- | --- |
| 1-persistent | Transmit immediately | Keep listening; transmit as soon as idle | Low idle delay, but waiting stations may start together |
| Non-persistent | Transmit | Wait a random time, then sense again | Less synchronized contention; may leave avoidable idle time |
| p-persistent (slotted) | Transmit with probability p; defer a slot with probability 1−p | Wait until available, then resume the probabilistic slot rule | Controls contention; needs slots and a choice of p |

#### Practical example

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.

**Yaad rakho:** 1 = start now; non = wait then listen; p = chance per idle slot.

**Definition.** CSMA with Collision Detection monitors the medium during transmission, aborts a detected collision and retries after a randomized backoff.

**Simple meaning.** CD = takkar detect hui toh transmission rok do.

Swipe across the diagram to read its labels ↔

![CSMA/CD: sender must still be sending after a round trip](https://deep-learning-study-room.vercel.app/cn/fig/collision-roundtrip.42358ec7bf.svg)

Diagram: CSMA/CD: sender must still be sending after a round trip. Labels: CSMA/CD: sender must still be sending after a round trip | CSMA/CD: sender must still be sending after a round trip | Station A | Station B | Signal travels: Tp | Collision indication returns: Tp | Worst-case timing bound: Tframe ≥ 2Tp, so Lmin ≥ 2RTp

CSMA/CD: detect a collision while transmitting

## Understand it step by step

1. Sense the channel. In traditional shared half-duplex Ethernet, begin transmission when permitted by the access rule.
2. Continue monitoring while transmitting. If a collision is detected, send the collision/jam indication and abort the current frame.
3. Choose a random delay using binary exponential backoff; then attempt again subject to the access rules.
4. The sender must still be transmitting when a worst-case collision indication returns. Hence the ideal timing requirement is Tframe ≥ 2Tp.
5. Modern switched full-duplex Ethernet links do not use collision-based CSMA/CD access. Keep the historical/shared-medium assumptions explicit.



$$
T_{\mathrm{frame}}\geq 2T_p
$$





$$
L_{\min}\geq 2RT_p
$$



#### Practical example

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.

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.

**Yaad rakho:** Detect karna hai toh sender tab tak bhej raha hona chahiye.

### Persistence decision flows

```
1-persistent:
Ready → sense → busy? yes → sense again
                      no → transmit immediately

p-persistent (slotted medium):
Ready → sense → busy? yes → wait and sense
                      no → draw random decision
                    probability p → transmit
                  probability 1−p → wait one slot → sense again
```

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.

---

## TEE · Q4(b) · OSPF and link types

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q4b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q4b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q4(b). Explain OSPF protocol and the types of links used in OSPF to establish the communication. [10 marks]

### Answer

**Definition.** Open Shortest Path First (OSPF) is an interior link-state routing protocol that selects routes using shortest-path calculations and additive link costs.

**Simple meaning.** OSPF = link-state map + Dijkstra + summed costs.

## Understand it step by step

1. Routers discover and maintain neighbour relationships using Hello packets and exchange link-state information.
2. 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.
3. 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.
4. OSPFv2 is the IPv4 protocol in the supplied paper; it is carried directly in IP protocol number 89, not TCP/UDP port 89.
5. 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.

#### Practical example

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.

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.

**Yaad rakho:** OSPF cost add karo; sirf hops nahi.

### Link types represented in an OSPF topology

| Type | Meaning | Diagram |
| --- | --- | --- |
| Point-to-point | Direct connection between two routers | R1 — R2 |
| Transit network | Multiaccess network through which routers communicate; a designated router helps represent it | R1 — LAN — R2 (also R3) |
| Stub network | Network reachable through one router, with no onward transit via another router | R1 — end-host LAN |
| Virtual link | Logical OSPF backbone connection through a transit area | Area 0 — R1 ⋯ transit area ⋯ R2 — Area 0 |

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.

---

## TEE · Q5(a) · Dijkstra algorithm

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q5a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q5a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q5(a). Explain the Dijkstra’s algorithm with an example. [10 marks]

### Answer

**Definition.** Dijkstra’s algorithm finds shortest paths from a source in a graph whose edge weights are nonnegative.

**Simple meaning.** Sabse chhota unfinished distance select karo, phir uske neighbours improve karo.

## Understand it step by step

1. Initialize source distance 0, all others ∞, and no predecessors. No vertex is settled initially.
2. Select an unsettled vertex with minimum tentative distance. With nonnegative edges, its distance can now be finalized.
3. Relax each relevant outgoing edge: compare old distance with selected distance plus edge cost.
4. Repeat selection and relaxation. If all remaining distances are ∞, the remaining vertices are unreachable from the source.
5. Trace predecessors for the required destination. Always preserve arrow direction. Standard Dijkstra is not valid for graphs with negative edge costs.

#### Practical example

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.

1. Set source to 0 and other distances to infinity.
2. Repeatedly choose the unsettled vertex with minimum tentative distance.
3. Settle it and relax its outgoing edges.
4. Recover paths using predecessors.

The standard algorithm requires nonnegative edge weights.

**Yaad rakho:** Minimum tentative total choose; negative edges pe Dijkstra nahi.

## Given

| Edge | Cost |
| --- | --- |
| A→B | 4 |
| A→C | 2 |
| C→B | 1 |
| B→D | 3 |
| C→D | 7 |

Source=A; target=D. Edges are directed; do not add reverse edges.

## To find

The path A to D, its total cost and intermediate work.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.

Swipe across the diagram to read its labels ↔

![Dijkstra · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/dijkstra-1.973d01595e.svg)

Diagram: Dijkstra · given directed graph. Labels: Dijkstra · given directed graph | Dijkstra · given directed graph | A | A | B | B | A->B | 4 | C | C | A->C | 2 | D | D | B->D | 3 | C->B | 1 | C->D | 7

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

d[A]=0; every other distance=∞. No predecessors are known.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Tentative |
| B | ∞ | — | Tentative |
| C | ∞ | — | Tentative |
| D | ∞ | — | Tentative |

#### Step 2. Settle A at distance 0

Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| A→B | ∞ | 0+(4)=4 | Improve to 4; predecessor=A |
| A→C | ∞ | 0+(2)=2 | Improve to 2; predecessor=A |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 4 | A | Tentative |
| C | 2 | A | Tentative |
| D | ∞ | — | Tentative |

#### Step 3. Settle C at distance 2

Unsettled candidates before selection: B=4, C=2, D=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| C→B | 4 | 2+(1)=3 | Improve to 3; predecessor=C |
| C→D | ∞ | 2+(7)=9 | Improve to 9; predecessor=C |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | C | Tentative |
| C | 2 | A | Settled |
| D | 9 | C | Tentative |

#### Step 4. Settle B at distance 3

Unsettled candidates before selection: B=3, D=9. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| B→D | 9 | 3+(3)=6 | Improve to 6; predecessor=B |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | C | Settled |
| C | 2 | A | Settled |
| D | 6 | B | Tentative |

#### Step 5. Settle D at distance 6

Unsettled candidates before selection: D=6. Select the minimum; ties use alphabetical order.

No outgoing edges to relax.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | C | Settled |
| C | 2 | A | Settled |
| D | 6 | B | Settled |

#### Step 6. Recover the path

Trace backwards: D ← B ← C ← A. Reverse it: A → C → B → D.

Edge sum: 2 + 1 + 3 = 6.

**Final answer:** A → C → B → D; cost=6.

#### What this result means

The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.

---

## TEE · Q5(b) · Congestion control

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q5b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q5b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q5(b). Explain the different configuration of congestion control mechanism. Explain in detail with examples. [10 marks]

### Answer

**Congestion** 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. **Flow control** protects a receiver; congestion control protects the network.

Swipe across the diagram to read its labels ↔

![Two congestion-control approaches](https://deep-learning-study-room.vercel.app/cn/fig/tee-congestion.c27c2303bb.svg)

Diagram: Two congestion-control approaches. Labels: Two congestion-control approaches | Two congestion-control approaches | Open loop: prevent overload | Admission rules and retransmission/window/ACK policies reduce avoidable traffic before congestion | feedback. | Closed loop: observe and signal | Detect queues, loss or explicit congestion marks; return feedback toward the sender. | Change behaviour | Reduce offered load or change resource use. Receiver flow control addresses a different bottleneck.

Open-loop prevention and closed-loop feedback.

| Approach | Policy / mechanism | How it helps |
| --- | --- | --- |
| Open loop: prevent congestion without runtime congestion feedback | Retransmission policy | Carefully chosen timers/selective retransmission avoid needless extra traffic |
| Open loop | Window policy | Limit outstanding data and avoid excessive retransmission after loss |
| Open loop | Acknowledgement policy | Avoid unnecessarily frequent ACK traffic while retaining correct recovery |
| Open loop | Admission policy | Refuse new load when reserved capacity is insufficient |
| Closed loop: measure and react to congestion | Backpressure | A congested node tells upstream nodes to reduce/stop sending, possibly propagating hop by hop |
| Closed loop | Choke/control signalling | A congested node sends explicit feedback to the source |
| Closed loop | Implicit signalling | A sender infers congestion from loss/delay and changes its sending behaviour |
| Closed loop | Explicit marking | Network marks congestion (for example ECN); endpoints react to returned information |

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.

#### Practical example

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.

**Yaad rakho:** Open loop pehle prevent; closed loop feedback se react.

---

## TEE · Q6(a) · TCP phases

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q6a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q6a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q6(a). How to establish communication in TCP. What are the different phases of it. Explain in detail. [10 marks]

### Answer

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.

Swipe across the diagram to read its labels ↔

![TCP: handshake, data and orderly close](https://deep-learning-study-room.vercel.app/cn/fig/tee-handshake.e053246177.svg)

Diagram: TCP: handshake, data and orderly close. Labels: TCP: handshake, data and orderly close | TCP: handshake, data and orderly close | Client | Server | SYN Seq=1000 | SYN+ACK Seq=5000, Ack=1001 | ACK Seq=1001, Ack=5001 | 200 data bytes: Seq=1001, last=1200 | ACK=1201 (next expected byte) | FIN Seq=1201 | ACK=1202; server may still send | FIN Seq=5001 (no server data here) | ACK=5002; common active-close TIME-WAIT | Pure ACK uses no sequence space. SYN and FIN each use one.

SYN and FIN each consume one sequence number; pure ACK consumes none.

| Step | Segment | Meaning |
| --- | --- | --- |
| 1 Client → server | SYN, Seq=1000 | Client proposes its starting sequence |
| 2 Server → client | SYN+ACK, Seq=5000, Ack=1001 | Server acknowledges client SYN and supplies its own start |
| 3 Client → server | ACK, Seq=1001, Ack=5001 | Client acknowledges server SYN; connection is established |

## Data transfer

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.

## Orderly termination

1. Assume client’s next data sequence is 1201. It sends FIN with Seq=1201, meaning it has finished sending.
2. Server sends ACK=1202. The connection is half closed: the server can still send data until its application finishes.
3. Assume server has sent no data since the handshake. It sends FIN with Seq=5001.
4. 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.
5. 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.

#### Practical example

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.

**Yaad rakho:** SYN plus one, FIN plus one; ACK next expected byte.

---

## TEE · Q6(b) · DNS hierarchy and resolution

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q6b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q6b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q6(b). Explain the DNS hierarchy and its working principle. Give example to support your answer. [10 marks]

### Answer

The **Domain Name System (DNS)** 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.

Swipe across the diagram to read its labels ↔

![DNS namespace: full label paths are unique](https://deep-learning-study-room.vercel.app/cn/fig/tee-dns.f5345fe9fb.svg)

Diagram: DNS namespace: full label paths are unique. Labels: DNS namespace: full label paths are unique | DNS namespace: full label paths are unique | Root . | com | org | example.com | example.org | www.example.com | www.example.org | Same local label “www”; different full names, so no collision.

Root, top-level domains, delegated domain and host labels.

| Level | Example | Meaning |
| --- | --- | --- |
| Root | . | Top of the namespace |
| Top-level domain (TLD) | com, org, in | A child zone below the root |
| Registered/delegated domain | example.com | Name under a parent such as com |
| Subdomain/host label | www.example.com | A label below example.com; a name may own different record types |

## Why names remain unique

1. 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.
2. 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.
3. 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.
4. 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.

## Resolution

1. A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.
2. 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.
3. 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.

#### Practical example

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.

**Yaad rakho:** Full path unique; www label akela unique nahi.

### Worked resolution example: www.xyz.com

```
Client → recursive resolver → root (.)
                           → .com TLD
                           → authoritative server for xyz.com
Client ← final A/AAAA answer ← resolver
```

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.

---

## TEE · Q7(a) · Network classifications

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q7a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q7a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q7(a). List and compare the different types of computer networks. [5 marks]

### Answer

A **computer network** 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.

| Type | Meaning and scope | Example |
| --- | --- | --- |
| PAN | Personal Area Network: a person’s nearby devices | Phone linked to earbuds |
| LAN | Local Area Network: a building or local campus network under local administration | Laboratory Ethernet/Wi-Fi |
| MAN | Metropolitan Area Network: interconnects sites across a town/city | City-wide institutional network |
| WAN | Wide Area Network: connects geographically separated networks over regional/global links | Branches in different cities |
| ARPANET | Historical packet-switched research network; a major predecessor of the Internet | Early interconnected research institutions; not a modern geographic size category |

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.

#### Practical example

A student uses a PAN for earbuds, a LAN in the lab and a WAN when accessing a distant university service.

**Yaad rakho:** PAN personal, LAN local, MAN city, WAN wide.

---

## TEE · Q7(b) · Block coding

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q7b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q7b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q7(b). Explain block codes in detail with an example. [5 marks]

### Answer

A transmission error changes one or more bits. A **single-bit error** flips one bit. A **burst error** 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.

## Block coding

1. Divide data into fixed k-bit datawords. Map each one to an n-bit codeword, with n greater than k.
2. The n−k redundant bits create separation between valid codewords. There are 2k valid codewords, a subset of the 2n possible n-bit patterns, for an injective binary block code.
3. 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.
4. Error-control protocols may combine detection with retransmission (ARQ), or use sufficient coding redundancy for forward error correction (FEC).



$$
R_c=k/n,\quad r=n-k
$$



#### Practical example

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.

**Yaad rakho:** Detection asks error hua? Correction asks kaunsa correct word?

**Hamming distance** d(a,b) is the number of positions where two equal-length bit strings differ. XOR the strings and count the 1s. **Minimum distance** dmin is the smallest distance between distinct valid codewords; do not use the largest pairwise distance.



$$
d(a,b)=\mathrm{weight}(a\oplus b)
$$





$$
s_{\max}=d_{\min}-1,\qquad t_{\max}=\left\lfloor\frac{d_{\min}-1}{2}\right\rfloor
$$



1. Detection: fewer than dmin flips cannot transform one valid codeword into another, so all such errors are detected.
2. Correction: radius-t error regions around different codewords must not overlap. Therefore 2t < dmin, or dmin ≥ 2t+1.
3. 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.

#### Practical example

The repetition code {000,111} has distance 3. If 001 arrives and at most one flip occurred, 000 is the unique nearest codeword.

**Yaad rakho:** XOR ones count; minimum minus one detect, half floor correct.

---

## TEE · Q7(c) · ARP

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q7c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q7c

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q7(c). Explain the method of Address Resolution protocol. [5 marks]

### Answer

**Definition.** Address Resolution Protocol (ARP) resolves a known IPv4 address to a link-layer hardware address on the local network.

**Simple meaning.** IP pata hai; local delivery ke liye MAC chahiye.

Swipe across the diagram to read its labels ↔

![ARP resolves the selected local next hop](https://deep-learning-study-room.vercel.app/cn/fig/arp.c8af39ddb3.svg)

Diagram: ARP resolves the selected local next hop. Labels: ARP resolves the selected local next hop | ARP resolves the selected local next hop | 1. Decide local destination or gateway | Compare the destination with the local prefix. | 2. Look in the ARP cache | If the next-hop mapping is missing, send a local broadcast request. | 3. Receive the mapping | The address owner normally replies with its hardware address. | 4. Build the local frame | Use that MAC for the next link; retain the final destination IP.

ARP: find the local next-hop MAC address

## Understand it step by step

1. 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.
2. Check the ARP cache. If the next-hop mapping is absent, broadcast an ARP request on the local link.
3. The owner of the requested IPv4 address normally replies with its hardware address. The sender caches the mapping and constructs its data frame.
4. 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.

#### Practical example

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.

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.

**Yaad rakho:** Remote packet ka next-hop MAC gateway ka hota hai.

---

## TEE · Q7(d) · SMTP and SNMP

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-legacy-reexam--q7d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-legacy-reexam/q7d

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q7(d). What are the features of SMTP and SNMP protocol. [5 marks]

### Answer

**Simple Mail Transfer Protocol (SMTP)** 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.

Swipe across the diagram to read its labels ↔

![SMTP: envelope, message and completion](https://deep-learning-study-room.vercel.app/cn/fig/tee-smtp.c6f99877c4.svg)

Diagram: SMTP: envelope, message and completion. Labels: SMTP: envelope, message and completion | SMTP: envelope, message and completion | SMTP sender | Receiving server | 220 greeting | EHLO sender.example | 250 capabilities | MAIL FROM:<sender@example.com> | RCPT TO:<receiver@example.org> | DATA (after successful envelope replies) | 354 start mail input | Headers + blank line + body + dot line | 250 accepted; then QUIT / server 221 | SMTP submits/relays. Inbox reading uses IMAP/POP or webmail. | Envelope MAIL/RCPT differs from visible From/To headers.

Submission/relay use SMTP; reading an inbox uses a separate access protocol.

| Phase | Typical exchange | Purpose |
| --- | --- | --- |
| Connection and greeting | Server 220; client EHLO (HELO for basic SMTP); server 250 capabilities | Identify peers and learn supported extensions |
| Envelope transfer | MAIL FROM:<sender>; RCPT TO:<recipient>; 250 replies | Declare return path and one or more delivery recipients |
| Message transfer | DATA; server 354; headers + blank line + body; single dot line; server 250 | Transmit the message after server permission; completion reply accepts responsibility |
| Termination | QUIT; server 221 | Close the SMTP session cleanly |

## Message flow and important details

1. 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.
2. The sending server resolves the recipient domain’s MX records, connects to an appropriate mail server and carries out the SMTP exchange.
3. MAIL FROM and RCPT TO are the **envelope**; visible From/To headers inside DATA are message content and can differ. Multiple RCPT TO commands can name several recipients.
4. 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.
5. 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.
6. The recipient reads stored mail using an access protocol such as IMAP/POP3 or webmail. SMTP is not the mailbox-retrieval protocol.

#### Practical example

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.

**Yaad rakho:** SMTP send/relay; inbox read IMAP/POP/webmail.

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.

---

## TEE · Q1(a) · LAN MAN WAN

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q1a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-final/q1a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q1(a). Describe and differentiate between LAN, MAN, WAN with examples. [5 marks]

### Answer

A **computer network** 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.

| Type | Meaning and scope | Example |
| --- | --- | --- |
| PAN | Personal Area Network: a person’s nearby devices | Phone linked to earbuds |
| LAN | Local Area Network: a building or local campus network under local administration | Laboratory Ethernet/Wi-Fi |
| MAN | Metropolitan Area Network: interconnects sites across a town/city | City-wide institutional network |
| WAN | Wide Area Network: connects geographically separated networks over regional/global links | Branches in different cities |
| ARPANET | Historical packet-switched research network; a major predecessor of the Internet | Early interconnected research institutions; not a modern geographic size category |

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.

#### Practical example

A student uses a PAN for earbuds, a LAN in the lab and a WAN when accessing a distant university service.

**Yaad rakho:** PAN personal, LAN local, MAN city, WAN wide.

---

## TEE · Q1(b) · Selective Repeat versus Go-Back-N

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q1b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-final/q1b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q1(b). Compare and contrast Selective Repeat and Go Back N protocol. (Any 5 points) [5 marks]

### Answer

| Property | Stop-and-Wait | Go-Back-N | Selective Repeat |
| --- | --- | --- | --- |
| Outstanding sender frames | 1 | Up to 2^m−1 | Up to 2^(m−1), equal windows |
| Receiver window | 1 | 1 | Same maximum as sender in standard equal-window SR |
| ACK convention used here | Next expected | Cumulative, next expected | Individual frame accepted |
| Out-of-order data | Not delivered | Discarded | Buffered within valid window |
| After timeout | Repeat the one frame | Repeat outstanding frames from base | Repeat only timed-out frame |
| Buffer/tracking cost | Low | Sender window; simple receiver | Sender and receiver windows; per-frame tracking |
| Tradeoff | Simple but idle during RTT | Good pipelining, waste after loss | Efficient loss recovery, greater complexity |

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.

#### Practical example

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.

---

## TEE · Q1(c) · TCP versus UDP

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q1c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-final/q1c

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q1(c). Compare TCP and UDP. (Any 5 points for each) [5 marks]

### Answer

| Point | UDP | TCP | SCTP |
| --- | --- | --- | --- |
| Service unit | Datagram; preserves messages | Byte stream; no message boundaries | Messages carried in chunks; preserves boundaries |
| Connection setup | No protocol handshake | Connection; usual three-way SYN exchange | Association; four-message cookie exchange |
| Reliability | No delivery/order guarantee | Reliable ordered stream | Reliable messages; ordered per stream by default, unordered option |
| Ordering scope | None supplied | One ordered byte stream per direction | Multiple streams; per-stream order avoids blocking every stream on one stream’s ordering gap |
| Flow control | Not supplied by UDP | Receiver-advertised window | Receiver flow control |
| Congestion control | Not supplied by UDP | Yes | Yes |
| Multihoming | No built-in association failover | Classic TCP uses one address pair | Association can bind multiple addresses; built-in path failover |
| Header | 8 bytes | Minimum 20 bytes | 12-byte common header plus chunks |
| Typical use | DNS, real-time applications with their own controls | Web over HTTP/1.1 or HTTP/2, reliable byte transfers | Telecom signalling and multi-stream message applications |
| Performance claim | Low protocol overhead, not automatically fastest overall | Recovery/ordering have costs and benefits | Extra capabilities; no universal speed ranking |

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.

#### Practical example

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.

**Yaad rakho:** UDP messages simple; TCP byte stream; SCTP reliable message streams.

---

## TEE · Q1(d) · DHCP

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q1d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-final/q1d

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q1(d). Explain the usage and functionality of DHCP protocol. [5 marks]

### Answer

**Definition.** Dynamic Host Configuration Protocol (DHCP) provides IP configuration parameters to clients and can lease reusable addresses for limited periods.

**Simple meaning.** DORA = Discover, Offer, Request, Acknowledge.

Swipe across the diagram to read its labels ↔

![DHCP initial allocation: DORA](https://deep-learning-study-room.vercel.app/cn/fig/dhcp.510e8eca42.svg)

Diagram: DHCP initial allocation: DORA. Labels: DHCP initial allocation: DORA | DHCP initial allocation: DORA | Client | Server | DISCOVER | OFFER | REQUEST | ACK | Client asks → server offers → client chooses → server confirms.

DHCP: automatic configuration through DORA

## Understand it step by step

1. **Discover:** a new client looks for DHCP servers. With no configured IPv4 address, it commonly starts from 0.0.0.0 and uses broadcast discovery.
2. **Offer:** a server offers an address and configuration, such as subnet mask, lease information and other options.
3. **Request:** the client indicates the selected offer and requested address. In initial allocation this also informs other servers of its choice.
4. **Acknowledge:** the selected server confirms the lease/configuration. The client can then use the address after the required checks.
5. 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.

#### Practical example

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.

1. DHCPDISCOVER: client searches for a server.
2. DHCPOFFER: server proposes an address/configuration.
3. DHCPREQUEST: client requests the chosen allocation.
4. DHCPACK: server confirms the lease.

DHCP reduces manual configuration and supports controlled address reuse through leases.

**Yaad rakho:** Discover–Offer–Request–ACK; pehle D, phir O, phir R, phir A.

---

## TEE · Q2(a) · OSI model

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q2a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-final/q2a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [10 marks]

### Answer

The **Open Systems Interconnection (OSI)** 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.

Swipe across the diagram to read its labels ↔

![OSI layers mapped to the four-layer TCP/IP model](https://deep-learning-study-room.vercel.app/cn/fig/tee-models.5bff0518c8.svg)

Diagram: OSI layers mapped to the four-layer TCP/IP model. Labels: OSI layers mapped to the four-layer TCP/IP model | OSI layers mapped to the four-layer TCP/IP model | 7 Application | 6 Presentation | 5 Session | 4 Transport | 3 Network | 2 Data link | 1 Physical | Application | HTTP, DNS, FTP, SMTP | Transport | Internet | Link / network access | Includes physical access | Some textbooks split link into data link + physical: five layers.

OSI seven-layer model mapped to the four-layer TCP/IP model.

| Layer | Task | Example |
| --- | --- | --- |
| 7 Application | Services used by network applications | HTTP, DNS, FTP, SMTP |
| 6 Presentation | Representation, encoding and application data transformations | Character encoding, serialization; encryption as a conceptual function |
| 5 Session | Manage dialogue and synchronization/checkpoints | Session establishment and resumption concepts |
| 4 Transport | Process delivery; reliability/flow control where supplied | TCP, UDP, SCTP; ports |
| 3 Network | Logical addressing and routing across networks | IP; routers |
| 2 Data link | Framing, local link addressing, medium access and error detection | Ethernet/Wi-Fi; MAC addresses |
| 1 Physical | Transmit signal symbols/bits through a medium | Electrical, optical or radio signals |

## Encapsulation and delivery

1. Application creates data. Transport adds a transport header: TCP segment or UDP datagram.
2. IP adds its header to form a packet. The link adds a header and usually a trailer to form a frame.
3. The physical layer carries signals. The destination reverses the process and sends the data to the receiving process.
4. 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.

#### Practical example

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.

**Yaad rakho:** Application se physical tak wrap; receiver par unwrap.

### Two functions of every OSI layer

| Layer | Function 1 | Function 2 |
| --- | --- | --- |
| Application | Provide application-level network services, such as file transfer | Define application exchanges for services such as email or name resolution |
| Presentation | Translate/serialize data into an agreed representation | Compress data or encrypt/decrypt it where these transformations are required |
| Session | Establish, manage and end a dialogue/session | Provide synchronization/checkpoints for resuming a dialogue |
| Transport | Identify sending/receiving processes using ports and segment/reassemble data | Provide end-to-end reliability and flow control when the selected protocol supports them |
| Network | Provide logical addressing across networks | Select routes and forward packets towards the destination |
| Data link | Frame the data and identify local interfaces | Control shared-medium access and detect link-frame errors |
| Physical | Represent bits as electrical, optical or radio signal symbols | Specify physical-interface/signalling properties such as timing, connectors and transmission rate |

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.

---

## TEE · Q2(b) · CSMA/CD

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q2b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-final/q2b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q2(b). Explain the working of CSMA/CD with flow diagram. [10 marks]

### Answer

**Definition.** CSMA with Collision Detection monitors the medium during transmission, aborts a detected collision and retries after a randomized backoff.

**Simple meaning.** CD = takkar detect hui toh transmission rok do.

Swipe across the diagram to read its labels ↔

![CSMA/CD: sender must still be sending after a round trip](https://deep-learning-study-room.vercel.app/cn/fig/collision-roundtrip.42358ec7bf.svg)

Diagram: CSMA/CD: sender must still be sending after a round trip. Labels: CSMA/CD: sender must still be sending after a round trip | CSMA/CD: sender must still be sending after a round trip | Station A | Station B | Signal travels: Tp | Collision indication returns: Tp | Worst-case timing bound: Tframe ≥ 2Tp, so Lmin ≥ 2RTp

CSMA/CD: detect a collision while transmitting

## Understand it step by step

1. Sense the channel. In traditional shared half-duplex Ethernet, begin transmission when permitted by the access rule.
2. Continue monitoring while transmitting. If a collision is detected, send the collision/jam indication and abort the current frame.
3. Choose a random delay using binary exponential backoff; then attempt again subject to the access rules.
4. The sender must still be transmitting when a worst-case collision indication returns. Hence the ideal timing requirement is Tframe ≥ 2Tp.
5. Modern switched full-duplex Ethernet links do not use collision-based CSMA/CD access. Keep the historical/shared-medium assumptions explicit.



$$
T_{\mathrm{frame}}\geq 2T_p
$$





$$
L_{\min}\geq 2RT_p
$$



#### Practical example

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.

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.

**Yaad rakho:** Detect karna hai toh sender tab tak bhej raha hona chahiye.

### CSMA/CD flow diagram

```
Frame ready → sense channel
                 │
          Busy? yes → keep sensing (1-persistent case)
                 no
                 ↓
          Transmit and monitor
                 │
          Collision? no → frame finished? → success
                 yes
                 ↓
          Jam indication → abort frame → increment attempt count
                 │
          Retry limit reached? yes → report failure
                 no
                 ↓
          Random binary-exponential backoff → sense again
```

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.

---

## TEE · Q3(a) · SMTP phases

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q3a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-final/q3a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q3(a). Explain the working of SMTP protocol focusing on connection establishment, mail transfer and connection transfer. [10 marks]

### Answer

**Source note:** The scan says connection transfer; the third SMTP phase is connection termination.

**Simple Mail Transfer Protocol (SMTP)** 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.

Swipe across the diagram to read its labels ↔

![SMTP: envelope, message and completion](https://deep-learning-study-room.vercel.app/cn/fig/tee-smtp.c6f99877c4.svg)

Diagram: SMTP: envelope, message and completion. Labels: SMTP: envelope, message and completion | SMTP: envelope, message and completion | SMTP sender | Receiving server | 220 greeting | EHLO sender.example | 250 capabilities | MAIL FROM:<sender@example.com> | RCPT TO:<receiver@example.org> | DATA (after successful envelope replies) | 354 start mail input | Headers + blank line + body + dot line | 250 accepted; then QUIT / server 221 | SMTP submits/relays. Inbox reading uses IMAP/POP or webmail. | Envelope MAIL/RCPT differs from visible From/To headers.

Submission/relay use SMTP; reading an inbox uses a separate access protocol.

| Phase | Typical exchange | Purpose |
| --- | --- | --- |
| Connection and greeting | Server 220; client EHLO (HELO for basic SMTP); server 250 capabilities | Identify peers and learn supported extensions |
| Envelope transfer | MAIL FROM:<sender>; RCPT TO:<recipient>; 250 replies | Declare return path and one or more delivery recipients |
| Message transfer | DATA; server 354; headers + blank line + body; single dot line; server 250 | Transmit the message after server permission; completion reply accepts responsibility |
| Termination | QUIT; server 221 | Close the SMTP session cleanly |

## Message flow and important details

1. 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.
2. The sending server resolves the recipient domain’s MX records, connects to an appropriate mail server and carries out the SMTP exchange.
3. MAIL FROM and RCPT TO are the **envelope**; visible From/To headers inside DATA are message content and can differ. Multiple RCPT TO commands can name several recipients.
4. 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.
5. 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.
6. The recipient reads stored mail using an access protocol such as IMAP/POP3 or webmail. SMTP is not the mailbox-retrieval protocol.

#### Practical example

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.

**Yaad rakho:** SMTP send/relay; inbox read IMAP/POP/webmail.

### The three phases requested in the paper

| Phase | Commands / replies | Meaning |
| --- | --- | --- |
| 1. Connection establishment | TCP connection; 220 greeting; EHLO/HELO; 250 reply | Open the connection and identify the SMTP peers |
| 2. Mail transfer | MAIL FROM, RCPT TO, DATA; 354; message; single dot; 250 | Transfer the envelope and then the message content |
| 3. Connection termination | QUIT; 221; close TCP | Finish the SMTP session |

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.

---

## TEE · Q3(b) · OSPF and link types

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q3b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-final/q3b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q3(b). Explain in detail OSPF protocol. Summarise the different types of links used in OSPF routing protocol. [10 marks]

### Answer

**Definition.** Open Shortest Path First (OSPF) is an interior link-state routing protocol that selects routes using shortest-path calculations and additive link costs.

**Simple meaning.** OSPF = link-state map + Dijkstra + summed costs.

## Understand it step by step

1. Routers discover and maintain neighbour relationships using Hello packets and exchange link-state information.
2. 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.
3. 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.
4. OSPFv2 is the IPv4 protocol in the supplied paper; it is carried directly in IP protocol number 89, not TCP/UDP port 89.
5. 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.

#### Practical example

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.

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.

**Yaad rakho:** OSPF cost add karo; sirf hops nahi.

### Link types represented in an OSPF topology

| Type | Meaning | Diagram |
| --- | --- | --- |
| Point-to-point | Direct connection between two routers | R1 — R2 |
| Transit network | Multiaccess network through which routers communicate; a designated router helps represent it | R1 — LAN — R2 (also R3) |
| Stub network | Network reachable through one router, with no onward transit via another router | R1 — end-host LAN |
| Virtual link | Logical OSPF backbone connection through a transit area | Area 0 — R1 ⋯ transit area ⋯ R2 — Area 0 |

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.

---

## TEE · Q4(a) · CRC and corrupted frame

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q4a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-final/q4a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [10 marks]

### Answer

### Given

Data = 1001100; generator bits = 1101; degree r = 3.

### To find

CRC remainder, complete transmitted frame and receiver check; then detect the specified bit inversion.

### Formula and why

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.

### Step 1. Append zeros

1001100 → 1001100000

### Step 2. Perform XOR division

| Leading position | Before XOR | Aligned generator | After XOR |
| --- | --- | --- | --- |
| 1 | 1001100000 | 1101000000 | 0100100000 |
| 2 | 0100100000 | 0110100000 | 0010000000 |
| 3 | 0010000000 | 0011010000 | 0001010000 |
| 4 | 0001010000 | 0001101000 | 0000111000 |
| 5 | 0000111000 | 0000110100 | 0000001100 |
| 7 | 0000001100 | 0000001101 | 0000000001 |

### Step 3. Build the frame

Remainder = **001**. Transmit **1001100001**.

### Step 4. Divide the received frame

| Position | Before | Generator | After |
| --- | --- | --- | --- |
| 1 | 1001100001 | 1101000000 | 0100100001 |
| 2 | 0100100001 | 0110100000 | 0010000001 |
| 3 | 0010000001 | 0011010000 | 0001010001 |
| 4 | 0001010001 | 0001101000 | 0000111001 |
| 5 | 0000111001 | 0000110100 | 0000001101 |
| 7 | 0000001101 | 0000001101 | 0000000000 |

Receiver remainder = 000. No error is detected; this is not a guarantee that every possible corruption is detectable.

### Step 5. Invert bit 2 from the left

1001100001 becomes 1101100001.

| Position | Before | Generator | After |
| --- | --- | --- | --- |
| 1 | 1101100001 | 1101000000 | 0000100001 |
| 5 | 0000100001 | 0000110100 | 0000010101 |
| 6 | 0000010101 | 0000011010 | 0000001111 |
| 7 | 0000001111 | 0000001101 | 0000000010 |

Remainder = **010**, which is nonzero: reject the frame and request recovery according to the error-control protocol.

---

## TEE · Q4(b) · UDP and applications

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q4b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-final/q4b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q4(b). Explain briefly UDP operation and any 5 applications of UDP protocol. [10 marks]

### Answer

**User Datagram Protocol (UDP)** provides connectionless, message-oriented process delivery. One send creates a datagram; message boundaries are retained. UDP has an **8-byte header**, 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.

Swipe across the diagram to read its labels ↔

![UDP header: each row contains 32 bits](https://deep-learning-study-room.vercel.app/cn/fig/tee-udp.b14cba3c28.svg)

Diagram: UDP header: each row contains 32 bits. Labels: UDP header: each row contains 32 bits | UDP header: each row contains 32 bits | Source port · 16 | Destination port · 16 | Length · 16 | Checksum · 16 | Total 8 bytes. Length = header + UDP payload.

UDP fixed header: four 16-bit fields, eight bytes total.

| UDP field | Width | Purpose |
| --- | --- | --- |
| Source port | 16 bits | Sending endpoint; a zero value can indicate no reply port when unused |
| Destination port | 16 bits | Receiving application endpoint |
| Length | 16 bits | UDP header plus UDP payload; minimum 8 bytes |
| Checksum | 16 bits | Error detection over UDP and an IP pseudo-header; not retransmission |

## Operation and services

1. 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.
2. The receiving UDP layer validates the length/checksum as applicable and uses the destination endpoint to deliver the datagram.
3. 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.
4. UDP checksum zero can mean checksum omitted in IPv4. IPv6 ordinarily requires the UDP checksum; specialized exceptions are outside this syllabus.

#### Practical example

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.

**Yaad rakho:** UDP datagram preserve; reliability automatic nahi.

### Five suitable application examples

| Application | Why UDP can suit it |
| --- | --- |
| DNS queries | Small request/reply; application retries if necessary. DNS also supports TCP. |
| DHCP | A host without an assigned address can use UDP broadcasts to obtain configuration. |
| Real-time audio/video using RTP | Late packets are often less useful than timely packets; application handles loss/jitter. |
| Online game state updates | A newer position can replace a stale one; application-specific reliability can protect critical events. |
| NTP | Small timestamp exchanges; a fresh later measurement can replace a lost exchange. |

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.

---

## TEE · Q5(a) · Network models

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q5a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-final/q5a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q5(a). Distinguish between peer-to-peer and client server communication. Any 5 points each. [5 marks]

### Answer

In a **client-server** design, users’ clients contact designated service processes. In **peer-to-peer (P2P)**, participating hosts can supply and consume resources. These are application organizations, not different physical cable types.

Swipe across the diagram to read its labels ↔

![Client-server and peer-to-peer organization](https://deep-learning-study-room.vercel.app/cn/fig/tee-client-peer.a7c6f1b535.svg)

Diagram: Client-server and peer-to-peer organization. Labels: Client-server and peer-to-peer organization | Client-server and peer-to-peer organization | Client-server | Peer-to-peer | Server | C1 | C2 | P1 | P2 | P3 | Peers can supply and consume. A central service can be replicated.

Central service versus cooperating peers.

| Point | Client-server | Peer-to-peer |
| --- | --- | --- |
| Roles | Clients request; designated servers provide services | Peers can both request and provide resources |
| Control | Central policies, accounts and backups are easier to coordinate | Control and copies distributed among peers |
| Performance | Predictable with adequate server capacity; server may bottleneck | Resources grow with peers, but peer capacity/availability vary |
| Scalability | Scale servers, replicas, caching and load distribution | More peers can contribute capacity; coordination becomes harder |
| Reliability | One unreplicated server is a failure point; replication helps | Loss of one peer need not stop system if useful replicas remain |
| Security | Central access control and monitoring | Trust and consistent access policy are harder |
| Best fit | Managed collaboration, databases, login services | Distributed content sharing among participating peers |

## Apply to the platform

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.

#### Practical example

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.

**Yaad rakho:** Server mein service central; peers dono roles karte hain.

---

## TEE · Q5(b) · DNS hierarchy

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q5b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-final/q5b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q5(b). Explain the hierarchy of name servers in DNS. [5 marks]

### Answer

The **Domain Name System (DNS)** 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.

Swipe across the diagram to read its labels ↔

![DNS namespace: full label paths are unique](https://deep-learning-study-room.vercel.app/cn/fig/tee-dns.f5345fe9fb.svg)

Diagram: DNS namespace: full label paths are unique. Labels: DNS namespace: full label paths are unique | DNS namespace: full label paths are unique | Root . | com | org | example.com | example.org | www.example.com | www.example.org | Same local label “www”; different full names, so no collision.

Root, top-level domains, delegated domain and host labels.

| Level | Example | Meaning |
| --- | --- | --- |
| Root | . | Top of the namespace |
| Top-level domain (TLD) | com, org, in | A child zone below the root |
| Registered/delegated domain | example.com | Name under a parent such as com |
| Subdomain/host label | www.example.com | A label below example.com; a name may own different record types |

## Why names remain unique

1. 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.
2. 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.
3. 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.
4. 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.

## Resolution

1. A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.
2. 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.
3. 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.

#### Practical example

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.

**Yaad rakho:** Full path unique; www label akela unique nahi.

### Worked resolution example: www.xyz.com

```
Client → recursive resolver → root (.)
                           → .com TLD
                           → authoritative server for xyz.com
Client ← final A/AAAA answer ← resolver
```

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.

---

## TEE · Q5(c) · Bellman-Ford example

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q5c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-final/q5c

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q5(c). Explain Bellman Ford algorithm for finding shortest path from source node to destination node with the help of an example. [10 marks]

### Answer

**Definition.** Bellman–Ford computes single-source shortest paths by repeatedly relaxing every edge. It supports negative edge weights and detects reachable negative cycles.

**Simple meaning.** Har edge ko baar-baar relax; negative edge chalega, negative cycle problem hai.

## Understand it step by step

1. Initialize source 0 and all other distances ∞.
2. 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.
3. 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.
4. If a full pass makes no change, all distances have stabilized and the algorithm may stop early.
5. 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.

#### Practical example

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.

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.

**Yaad rakho:** Pass = all edges once. Negative edge ≠ negative cycle.

## Given

| Directed edge | Weight |
| --- | --- |
| A→B | 4 |
| A→C | 5 |
| B→C | -2 |
| C→D | 3 |

## To find

The shortest route and cost, with complete passes and a negative-cycle check.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



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.

Swipe across the diagram to read its labels ↔

![Bellman–Ford · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/bellman-1.1bf4232fcf.svg)

Diagram: Bellman–Ford · given directed graph. Labels: Bellman–Ford · given directed graph | Bellman–Ford · given directed graph | A | A | B | B | A->B | 4 | C | C | A->C | 5 | B->C | -2 | D | D | C->D | 3

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

4 vertices → at most 3 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.

#### Step 2. Pass 1: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | ∞ | 0+(4)=4 | 4 | Update; predecessor=A |
| A→C | ∞ | 0+(5)=5 | 5 | Update; predecessor=A |
| B→C | 5 | 4+(-2)=2 | 2 | Update; predecessor=B |
| C→D | ∞ | 2+(3)=5 | 5 | Update; predecessor=C |

| Vertex | A | B | C | D |
| --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 4 | 2 | 5 |
| Predecessor | — | A | B | C |

#### Step 3. Pass 2: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | 4 | 0+(4)=4 | 4 | No improvement |
| A→C | 2 | 0+(5)=5 | 2 | No improvement |
| B→C | 2 | 4+(-2)=2 | 2 | No improvement |
| C→D | 5 | 2+(3)=5 | 5 | No improvement |

#### Step 4. Stop after an unchanged pass

This entire pass changed no distance. Further identical relaxation passes will not improve anything.

#### Step 5. Recover and total the path

Backward predecessors: D ← C ← B ← A. Forward route: A → B → C → D.

Cost = (4) + (-2) + (3) = 5. No edge can now improve its destination label.

**Final answer:** A → B → C → D; shortest cost=5.

#### What this result means

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.

---

## TEE · Q6(a) · Pure ALOHA rates

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q6a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-final/q6a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [10 marks]

### Answer

### Given

Frame length L = 400 bits; link rate R = 100,000 bit/s; attempted rates λ = 1200, 600, 300 frames/s.

### To find

Normalized throughput S and successful frames per second for each offered load.

### Formula and why



$$
T_f=L/R,\quad G=\lambda T_f,\quad S=Ge^{-2G},\quad \lambda_{success}=S/T_f=\lambda e^{-2G}
$$



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.

### Step 1. Convert the link rate and compute frame time

Tf = 400/100000 = 0.004 s. Capacity = 1/Tf = 250 frames/s.

### Step 2. Offered rate 1200 frames/s

G = 1200 × 0.004 = 4.8.

e−2G = e−9.6 = 6.77287365e-05.

S = 4.8 × 6.77287365e-05 = **0.000325097935**.

Successful frames/s = 1200 × 6.77287365e-05 = **0.0812744838**. Successful bit/s = 0.0812744838 × 400 = 32.5097935.

### Step 3. Offered rate 600 frames/s

G = 600 × 0.004 = 2.4.

e−2G = e−4.8 = 0.00822974705.

S = 2.4 × 0.00822974705 = **0.0197513929**.

Successful frames/s = 600 × 0.00822974705 = **4.93784823**. Successful bit/s = 4.93784823 × 400 = 1975.13929.

### Step 4. Offered rate 300 frames/s

G = 300 × 0.004 = 1.2.

e−2G = e−2.4 = 0.0907179533.

S = 1.2 × 0.0907179533 = **0.108861544**.

Successful frames/s = 300 × 0.0907179533 = **27.215386**. Successful bit/s = 27.215386 × 400 = 10886.1544.

---

## TEE · Q6(b) · VLSM groups

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q6b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-final/q6b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [10 marks]

### Answer

### Given

188.15.0.0/16; Group 1: 64 customers × 256 addresses; Group 2: 128 customers × 128 addresses; Group 3: 64 customers × 128 addresses

### To find

Each customer prefix, every group range, first/last customer blocks, and unallocated addresses.

### Formula and why



$$
p=32-\log_2(\text{addresses per customer}),\quad A_{group}=n\times A_{customer}
$$



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.

### Step 1. Compute sizes and allocate consecutive aligned customer blocks

| Group | Customers | Addresses each | Customer prefix | Used | Group range |
| --- | --- | --- | --- | --- | --- |
| 1 | 64 | 256 | /24 | 16384 | 188.15.0.0–188.15.63.255 |
| 2 | 128 | 128 | /25 | 16384 | 188.15.64.0–188.15.127.255 |
| 3 | 64 | 128 | /25 | 8192 | 188.15.128.0–188.15.159.255 |

### Step 2. State first and last customer ranges

| Group | First customer | Last customer |
| --- | --- | --- |
| 1 | 188.15.0.0–188.15.0.255 | 188.15.63.0–188.15.63.255 |
| 2 | 188.15.64.0–188.15.64.127 | 188.15.127.128–188.15.127.255 |
| 3 | 188.15.128.0–188.15.128.127 | 188.15.159.128–188.15.159.255 |

### Step 3. Count the unused addresses

Allocated = 16384 + 16384 + 8192 = 40960. Unused = 65536 − 40960 = **24576**.

Unused range: 188.15.160.0–188.15.255.255.

---

## TEE · Q7(a) · Leaky versus token bucket

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q7a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-final/q7a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q7(a). Compare and contrast Leaky Bucket and Token Bucket algorithm for QoS improvement. [10 marks]

### Answer

In the textbook **leaky-bucket queue/shaper** 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.

Swipe across the diagram to read its labels ↔

![Leaky-bucket data queue](https://deep-learning-study-room.vercel.app/cn/fig/tee-leaky.77bdbcf957.svg)

Diagram: Leaky-bucket data queue. Labels: Leaky-bucket data queue | Leaky-bucket data queue | Bursty arrivals enter finite buffer B | Accept packets that fit; the stated queue model drops overflow. | Queue drains at configured rate r | Send while data exists. An empty queue produces no packets. | Smoother departure stream | Buffering adds delay; idle service cannot be saved for a later burst.

Finite data buffer smooths a burst into a bounded departure rate.

1. Choose buffer capacity B and output service rate r in consistent units.
2. Admit arrivals that fit. Drop/mark overflow according to the stated implementation; this queue example drops the excess.
3. Drain at rate r while the queue is nonempty. Idle time does not accumulate permission for a later faster burst.
4. The result is smoothed output. Larger buffers accommodate larger bursts but can increase waiting delay.

| Advantage | Limitation |
| --- | --- |
| Simple bound on output rate | Bursts may overflow or suffer delay |
| Reduces short-term output variation | Unused idle service cannot be saved |
| Useful for predictable traffic shaping | No end-to-end delay/loss guarantee by itself |

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.

#### Practical example

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.

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.

**Yaad rakho:** Leaky bucket stores data; idle service save nahi hota.

A **token bucket** 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.

Swipe across the diagram to read its labels ↔

![Token bucket: permission is separate from data](https://deep-learning-study-room.vercel.app/cn/fig/tee-token.c3ff1dbf76.svg)

Diagram: Token bucket: permission is separate from data. Labels: Token bucket: permission is separate from data | Token bucket: permission is separate from data | Token generator adds r tokens per second | Store at most B tokens; extra tokens disappear when the bucket is full. | Packet of L bytes requests L tokens | Enough tokens: deduct L and permit transmission, subject to link speed. | Insufficient tokens: policy matters | Shaper buffers/waits. Policer marks or drops according to policy. | Saved tokens permit bounded bursts | Initially full: allowance over t ≤ B + rt. This alone is not an end-to-end QoS guarantee.

Tokens store permission; the separate data queue stores packets.

1. Initialize a stated token count, often B for a full bucket. Add rΔt tokens over elapsed time, capped at B.
2. 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.
3. If tokens are insufficient, a **shaper** waits/buffers until enough are available. A **policer** marks or drops nonconforming traffic according to policy. Token shortage does not universally mean drop.
4. Over interval t, a full token bucket bounds admitted data by B+rt. Actual output is also limited by link capacity and packet scheduling.
5. Unlike the queue-style leaky bucket, token storage allows limited bursts after idle time. It bounds average rate and burst size separately.



$$
\mathrm{admitted\ data}(t)\le B+rt
$$



| Limitation | Reason |
| --- | --- |
| Bursts can still congest downstream queues | Local conformance does not ensure every later link has capacity |
| Parameters must match traffic and link requirements | A small B delays/drops legitimate packets; a large B permits disruptive bursts |
| No complete QoS guarantee alone | Admission, scheduling and end-to-end capacity may still be needed |

#### Practical example

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.

**Yaad rakho:** Token permission store hota hai; actual packet alag queue mein.

| Point | Leaky data queue | Token bucket |
| --- | --- | --- |
| Stored state | Queued data | Tokens representing permission |
| Idle period | Empty queue; unused service lost | Tokens accumulate up to B |
| Output burst | Smoothed by configured service rate | Allowed if enough tokens and physical capacity exist |
| Overflow/shortage | Finite queue can overflow | Shaper waits; policer may mark/drop |
| Main parameters | Queue capacity and drain rate | Token capacity and generation rate |
| Useful when | A smoother output profile is required | Average rate plus burst allowance is required |

#### Practical example

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.

---

## TEE · Q7(b) · HTTP

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q7b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-final/q7b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q7(b). Explain the HTTP protocol and its role in data transmission between clients and servers over the internet. [5 marks]

### Answer

The **World Wide Web (WWW)** 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. **HTTP** defines request/response semantics between these components. The Web is one application of the Internet, not a synonym for the entire Internet.

Swipe across the diagram to read its labels ↔

![Opening a plain HTTP/1.1 URL](https://deep-learning-study-room.vercel.app/cn/fig/tee-http.de65bc75dd.svg)

Diagram: Opening a plain HTTP/1.1 URL. Labels: Opening a plain HTTP/1.1 URL | Opening a plain HTTP/1.1 URL | Browser parses http://www.example.com/ | Scheme=http, host=www.example.com, path=/, default port=80. | DNS resolves the host | A cached or newly resolved address identifies the target endpoint. | TCP establishes the connection | For this HTTP/1.1 example, client connects to server port 80. | HTTP request → HTTP response | GET / with Host header → status, headers and representation body. | Browser parses and displays | HTML may refer to extra objects, each needing retrieval or cache lookup.

URL → DNS → connection → HTTP request/response → displayed document.

1. Interpret the URL **http://www.example.com/**: 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.
2. Resolve the hostname using DNS, often via cached results and a recursive resolver. DNS finds an address; it does not download the Web page.
3. 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.
4. 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.
5. 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.
6. The browser parses HTML, retrieves referenced objects as needed and renders the page. Caching may avoid transfers; persistent connections can serve multiple requests.

| Message component | Purpose |
| --- | --- |
| Request method / target | Requested action and resource; GET retrieves a representation, POST submits data for processing |
| Headers | Metadata, routing context, representation preferences and cache/connection information |
| Status code | Result class: 2xx success, 3xx redirection, 4xx client error, 5xx server error |
| Body | Representation or submitted content when present |

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.

#### Practical example

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.

**Yaad rakho:** DNS address dhoondta; HTTP resource mangta; browser render karta.

---

## TEE · Q7(c) · Distance vector versus link state

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q7c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-final/q7c

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q7(c). Compare and contrast distance vector and link state routing. Any 5 points each. [5 marks]

### Answer

**Definition.** RIP and OSPF are routing protocols; Bellman–Ford and Dijkstra are algorithms underlying different route-computation approaches.

**Simple meaning.** Protocol message bhejta hai; algorithm route calculate karta hai.

## Understand it step by step

1. RIP uses distance-vector information and a bounded hop metric. OSPF distributes link-state information and computes paths using additive costs.
2. A generic Bellman–Ford graph exercise can contain negative weights; RIP’s ordinary hop-count metric does not.
3. Dijkstra assumes nonnegative edge weights. Do not select it for the negative-weight re-exam graph simply because the question says “routing”.
4. State whether a drawn graph is directed or undirected before solving. Both algorithms can be applied to appropriate directed graphs.

#### Practical example

The December paper explicitly gives positive directed edges and asks for Dijkstra. The February paper includes negative directed edges and asks for Bellman–Ford.

| Feature | RIP | OSPF |
| --- | --- | --- |
| Family | Distance vector | Link state |
| Typical metric | Hop count; 16 unreachable | Sum of configured link costs |
| Knowledge exchanged | Destination distances via neighbours | Link-state information |
| Algorithm connection | Distributed Bellman–Ford idea | Dijkstra shortest paths |
| Scale design | Small/simple networks; limited diameter | Area-based scalable design |

**Yaad rakho:** Distance vector → RIP; link state → OSPF.

### Distance vector versus link state: five direct comparisons

| Point | Distance vector | Link state |
| --- | --- | --- |
| Information exchanged | Destination-distance estimates and route information | Descriptions of local links, neighbours and link costs |
| Recipient / distribution | Neighbour-to-neighbour exchange | Flooding across the routing domain or area |
| Topology knowledge | Ordinarily no complete topology map; relies on neighbours' advertised distances | Builds a link-state database representing the area topology |
| Computation | Distributed Bellman–Ford style minimum via neighbours | Dijkstra shortest-path tree from the router itself |
| Convergence / resource tradeoff | Simple advertisements, but failures can cause count-to-infinity and transient loops | More database/computation and flooding overhead; topology changes can be propagated promptly |

RIP and OSPF illustrate these families, respectively. Exact convergence time depends on timers, topology and implementation, so neither family has one universal time bound.

---

## TEE · Q1(a) · TCP/IP network and transport layers

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q1a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-feb-reexam/q1a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q1(a). Explain the network layer and transport layer protocols of TCP/IP model. [5 marks]

### Answer

The **TCP/IP model** 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.

Swipe across the diagram to read its labels ↔

![OSI layers mapped to the four-layer TCP/IP model](https://deep-learning-study-room.vercel.app/cn/fig/tee-models.5bff0518c8.svg)

Diagram: OSI layers mapped to the four-layer TCP/IP model. Labels: OSI layers mapped to the four-layer TCP/IP model | OSI layers mapped to the four-layer TCP/IP model | 7 Application | 6 Presentation | 5 Session | 4 Transport | 3 Network | 2 Data link | 1 Physical | Application | HTTP, DNS, FTP, SMTP | Transport | Internet | Link / network access | Includes physical access | Some textbooks split link into data link + physical: five layers.

Four TCP/IP layers; the link layer includes the physical medium.

| TCP/IP layer | Function | Examples |
| --- | --- | --- |
| Application | Defines application message formats and exchanges for Web access, naming, email and file transfer; includes presentation/session functions as needed | HTTP, DNS, SMTP, FTP |
| Transport | End-to-end process communication | TCP, UDP, SCTP |
| Internet | IP addressing, routing and best-effort datagrams | IPv4/IPv6 |
| Link/network access | Local delivery and physical access | Ethernet/Wi-Fi and their medium |

| Point | OSI | TCP/IP |
| --- | --- | --- |
| Layer count | Seven | Four here; five-layer teaching variant splits link |
| Upper functions | Application, presentation, session separated | Grouped under application |
| Lower functions | Data link and physical separated | Grouped under link/network access |
| Purpose | General reference architecture | Architecture of deployed Internet protocol family |
| Network service | Reference model can describe different services | Internet layer uses connectionless IP |
| Transport | Conceptual transport service | TCP reliable byte stream; UDP datagrams; SCTP messages |

#### Practical example

An application can use UDP without changing the IP or Ethernet layers. Layering lets one protocol vary without redesigning every network function.

**Yaad rakho:** OSI 7; TCP/IP four mein upper three merge, lower two merge.

### Internet and transport protocols

| Layer | Protocol | Role |
| --- | --- | --- |
| Internet | IPv4 / IPv6 | Address and deliver best-effort packets across networks |
| Internet | ICMP / ICMPv6 | Report selected IP errors and operational information; used by diagnostic exchanges |
| Transport | TCP | Reliable, ordered byte stream with connection establishment, flow and congestion control |
| Transport | UDP | Connectionless message delivery using ports, without built-in retransmission or ordering |
| Transport | SCTP | Reliable message-oriented association with multiple streams and multihoming support |

---

## TEE · Q1(b) · Stop-and-Wait losses

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q1b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-feb-reexam/q1b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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? [5 marks]

### Answer

**Stop-and-Wait ARQ** 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.

Swipe across the diagram to read its labels ↔

![Stop-and-Wait: lost ACK and duplicate rejection](https://deep-learning-study-room.vercel.app/cn/fig/tee-stopwait.a99281ab96.svg)

Diagram: Stop-and-Wait: lost ACK and duplicate rejection. Labels: Stop-and-Wait: lost ACK and duplicate rejection | Stop-and-Wait: lost ACK and duplicate rejection | Sender | Receiver | Frame 0 → accepted, delivered once | ACK 1 lost on return path | Timeout: resend frame 0 → duplicate | Repeat ACK 1; duplicate not delivered | Frame 1 → next new frame | ACK k means next expected sequence k in this diagram.

Lost ACK causes a duplicate transmission, not duplicate delivery.

1. Use alternating sequence numbers 0 and 1. The receiver remembers the next expected number. Here ACK k means the next sequence expected.
2. Normal: send frame 0, receiver accepts it and sends ACK 1; sender then sends frame 1.
3. Damaged/lost data: receiver cannot accept the missing valid frame. The sender eventually times out and retransmits.
4. 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.
5. A damaged ACK must not advance the sender. The timer provides eventual recovery. Waiting each round trip limits utilization on high-delay links.

#### Practical example

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.

**Yaad rakho:** One frame outstanding; duplicate ko acknowledge karo, deliver dobara nahi.

---

## TEE · Q1(c) · SCTP services

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q1c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-feb-reexam/q1c

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q1(c). Explain any 5 services of SCTP. [5 marks]

### Answer

**Stream Control Transmission Protocol (SCTP)** is a reliable message-oriented transport. A relationship between endpoints is an **association**. Its packets contain a common header followed by chunks, which carry data or control information.

Swipe across the diagram to read its labels ↔

![SCTP association setup](https://deep-learning-study-room.vercel.app/cn/fig/tee-sctp.55048562bb.svg)

Diagram: SCTP association setup. Labels: SCTP association setup | SCTP association setup | Endpoint A | Endpoint B | INIT | INIT ACK + state cookie | COOKIE ECHO | COOKIE ACK | Stream 0 ordered messages; stream 1 separately ordered messages. | Multihoming supplies alternate paths, not automatic rate addition.

SCTP four-message association setup and independent ordered streams.

1. 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.
2. 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.
3. 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.
4. Multihoming lets endpoints advertise multiple addresses, supporting alternate paths and failover. Standard multihoming does not automatically mean all paths’ bandwidth is aggregated.
5. SCTP supplies retransmission, selective acknowledgements, receiver flow control and congestion control. Its common header is 12 bytes; chunks add their own headers and data.

#### Practical example

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.

**Yaad rakho:** SCTP association: streams separate order, addresses provide failover.

### Five SCTP services

| Service | Explanation |
| --- | --- |
| Process-to-process delivery | Port numbers identify the sending and receiving applications |
| Reliable message delivery | Checks, sequence tracking, acknowledgements and retransmission recover missing chunks while preserving messages |
| Multistreaming | Separate ordering within streams reduces cross-stream ordering blockage |
| Multihoming | Multiple endpoint addresses permit an alternate path if the primary fails |
| Flow and congestion control | Receiver flow control limits receiver overload; congestion control adapts traffic to network conditions |

---

## TEE · Q1(d) · Message versus packet switching

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q1d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-feb-reexam/q1d

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q1(d). Compare message switching and packet switching. Write any two advantages and disadvantages of both. [5 marks]

### Answer

**Definition.** Switching selects how data passes through intermediate network nodes from a source to a destination.

**Simple meaning.** Raasta reserve karna, poora message ruk-ruk ke bhejna, ya chhote packets bhejna—yeh teen ideas hain.

Swipe across the diagram to read its labels ↔

![Three switching techniques: what is forwarded?](https://deep-learning-study-room.vercel.app/cn/fig/switching.2b51f856d9.svg)

Diagram: Three switching techniques: what is forwarded?. Labels: Three switching techniques: what is forwarded? | Three switching techniques: what is forwarded? | 1. Circuit: reserve a path, then stream data | Setup → reserved capacity → data transfer → release. | 2. Message: store the entire message at each node | Large forwarding unit; no packet-level pipeline. | 3. Packet: divide, then forward packet by packet | Shared links can simultaneously carry different packets.

Circuit, message and packet switching

## Understand it step by step

1. **Circuit switching:** establish a circuit, reserve resources, transfer data, then release the circuit. Capacity is dedicated even during a silent period.
2. **Message switching:** each intermediate node receives the entire message before forwarding it. Large messages require large buffers and can delay later messages.
3. **Packet switching:** divide data into smaller packets. Nodes forward packets individually; different links can carry successive packets at the same time.
4. 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.

| Aspect | Circuit switching | Message switching | Packet switching |
| --- | --- | --- | --- |
| Unit handled | Continuous stream on established circuit | Whole message | Small packets |
| Resource use | Capacity reserved along a circuit | Shared; message stored at each intermediate node | Shared; each packet stored/forwarded in this model |
| Setup | Required before data transfer | No circuit setup required | Datagram: no connection setup; virtual circuit: setup |
| Delay | Setup delay, then relatively predictable service | Large store-and-forward delay for long messages | Variable delay; packet pipeline can reduce completion time |
| Main limitation | Reserved capacity can be idle | Large buffers; unsuitable for tight delay needs | Headers, possible queueing/loss; datagrams may reorder |

#### Practical example

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.

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.

**Yaad rakho:** Circuit reserves; message waits whole; packets pipeline.

### Two advantages and two disadvantages

| Method | Advantage 1 | Advantage 2 | Disadvantage 1 | Disadvantage 2 |
| --- | --- | --- | --- | --- |
| Message switching | Shares link capacity without a permanently reserved circuit | Intermediate storage lets a message wait for a currently busy outgoing link | The entire message must arrive before forwarding, giving long delay | Large messages require large buffers and can hold up other messages |
| Packet switching | Statistical sharing suits bursty data from many users | Packets can be pipelined across successive links, reducing completion time | Every packet needs header/control overhead | Queueing, loss and (for datagrams) reordering need endpoint or network handling |

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.

---

## TEE · Q2(a) · Star and mesh

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q2a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-feb-reexam/q2a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q2(a). Define network topology. Draw diagram to illustrate star and mesh topology and explain each topology with any two advantages and disadvantages. [10 marks]

### Answer

**Topology** 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.

Swipe across the diagram to read its labels ↔

![Four physical network topologies](https://deep-learning-study-room.vercel.app/cn/fig/tee-topologies.d9e18f041b.svg)

Diagram: Four physical network topologies. Labels: Four physical network topologies | Four physical network topologies | Star | Bus | Ring | Full mesh: 4 nodes, 6 links | S | Links show arrangement. Actual access rules are a separate concept.

Star, bus, ring and full mesh; edges depict physical connections.

| Topology | Structure | Benefit | Limitation |
| --- | --- | --- | --- |
| Bus | Devices share a common backbone | Simple small shared-medium layout | Backbone fault affects segment; collisions possible on classic shared bus |
| Star | Each device connects to a central switch/hub | Easy expansion and fault isolation | Central-device failure affects star; more cabling |
| Ring | Each node connected to two neighbours in a ring | Structured traversal; token-based variants coordinate access | Simple single-ring break can disrupt operation unless protected |
| Full mesh | Every pair has a direct link | Redundant paths and direct connectivity | Expensive ports/cabling: n(n−1)/2 undirected links |
| Tree/hybrid | Hierarchical stars or combined topologies | Scales into buildings/floors | Upper-level faults affect dependent branches |

#### Practical example

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.

**Yaad rakho:** Layout draw karo, then one strength and one failure case.

### Two advantages and two disadvantages of each topology

| Topology / example | Advantage 1 | Advantage 2 | Disadvantage 1 | Disadvantage 2 |
| --- | --- | --- | --- | --- |
| Star: switched computer laboratory | A device can be added on a spare central port without rebuilding the whole topology | A single access-cable fault normally isolates only its attached device | Central-switch failure affects all attached devices unless redundant | A separate cable and switch port are needed per device |
| Bus: legacy coaxial Ethernet | Uses little cable in a small linear layout | No central switch is required in the simple shared-bus design | A backbone fault can disable the segment | Shared bandwidth, contention and fault diagnosis become difficult as it grows |
| Ring: token-based ring | Controlled token access avoids data collisions among compliant stations | Token rotation gives stations an organized opportunity to transmit | A break can interrupt an unprotected single ring | Adding/removing a node can disrupt a simple ring |
| Mesh: redundant router backbone | Alternate links preserve connectivity after some link failures | Direct pairwise links can carry separate exchanges without a shared central bottleneck | A full mesh needs n(n−1)/2 links and many ports | Configuration, cabling and maintenance become complex |

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.

---

## TEE · Q2(b) · CSMA/CA and RTS/CTS

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q2b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-feb-reexam/q2b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [10 marks]

### Answer

**Definition.** 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.

**Simple meaning.** CA = pehle collision avoid karne ki koshish; guarantee nahi.

Swipe across the diagram to read its labels ↔

![CSMA/CA: optional reservation, data, acknowledgement](https://deep-learning-study-room.vercel.app/cn/fig/ca-sequence.566280e50f.svg)

Diagram: CSMA/CA: optional reservation, data, acknowledgement. Labels: CSMA/CA: optional reservation, data, acknowledgement | CSMA/CA: optional reservation, data, acknowledgement | Sender | Receiver | RTS (optional reservation) | CTS | DATA | ACK | Before data access: carrier sensing and a random backoff. | A busy medium freezes the eligible backoff countdown.

CSMA/CA: reduce collision risk before sending

## Understand it step by step

1. A wireless station senses the medium and follows the required interframe waiting and contention rules.
2. 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.
3. When its counter reaches zero, it transmits. A unicast receiver normally sends an ACK after successful reception. Missing ACK triggers retry logic.
4. 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.
5. Wireless stations cannot generally rely on Ethernet-style collision detection while transmitting. Collision avoidance does not eliminate all losses or collisions.

#### Practical example

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.

| Aspect | CSMA/CD | CSMA/CA |
| --- | --- | --- |
| Main action | Detect and abort a collision during sending | Reduce collision risk before sending |
| Typical teaching context | Shared half-duplex wired Ethernet | Wi-Fi contention access |
| Mechanisms | Carrier sensing, detection/jam, backoff | Carrier sensing, random backoff, ACK; optional RTS/CTS |

**Yaad rakho:** CD = detect during; CA = avoid before.

**Definition.** Hidden terminals are stations that cannot sense each other but whose transmissions can interfere at a common receiver.

**Simple meaning.** A aur C ek dusre ko nahi sunte, par dono B ko bhej rahe hain.

Swipe across the diagram to read its labels ↔

![Hidden terminals: A and C cannot sense each other](https://deep-learning-study-room.vercel.app/cn/fig/hidden-terminal.1ffcf794d5.svg)

Diagram: Hidden terminals: A and C cannot sense each other. Labels: Hidden terminals: A and C cannot sense each other | Hidden terminals: A and C cannot sense each other | A | B | C | Common receiver B hears both | B’s CTS can make a hidden sender defer. Collisions remain possible.

Hidden terminals and RTS/CTS

## Understand it step by step

1. Suppose A and C are outside each other’s sensing range, but B can receive both.
2. A senses no signal from C and may transmit; C may make the same decision. Their frames can collide at B.
3. 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.
4. RTS frames can themselves collide and wireless conditions still matter. Describe RTS/CTS as mitigation, not an absolute guarantee.

#### Practical example

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.

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.

**Yaad rakho:** Hidden: senders invisible to each other, receiver common.

### CSMA/CA flow diagram

```
Frame ready → sense medium
Busy? yes → defer until eligible idle interval
          ↓
Choose a random backoff → count down eligible idle slots
Medium becomes busy? → freeze counter; resume after required idle wait
          ↓ counter reaches zero
Optional RTS → CTS received? no → retry/back off
          ↓ yes (or RTS/CTS not used)
Send DATA → ACK received? yes → success
                        no → retry/back off or fail at retry limit
```

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.

---

## TEE · Q3(a) · TCP connection lifecycle

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q3a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-feb-reexam/q3a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q3(a). Describe the TCP connection establishment and termination with the help of diagrams. [10 marks]

### Answer

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.

Swipe across the diagram to read its labels ↔

![TCP: handshake, data and orderly close](https://deep-learning-study-room.vercel.app/cn/fig/tee-handshake.e053246177.svg)

Diagram: TCP: handshake, data and orderly close. Labels: TCP: handshake, data and orderly close | TCP: handshake, data and orderly close | Client | Server | SYN Seq=1000 | SYN+ACK Seq=5000, Ack=1001 | ACK Seq=1001, Ack=5001 | 200 data bytes: Seq=1001, last=1200 | ACK=1201 (next expected byte) | FIN Seq=1201 | ACK=1202; server may still send | FIN Seq=5001 (no server data here) | ACK=5002; common active-close TIME-WAIT | Pure ACK uses no sequence space. SYN and FIN each use one.

SYN and FIN each consume one sequence number; pure ACK consumes none.

| Step | Segment | Meaning |
| --- | --- | --- |
| 1 Client → server | SYN, Seq=1000 | Client proposes its starting sequence |
| 2 Server → client | SYN+ACK, Seq=5000, Ack=1001 | Server acknowledges client SYN and supplies its own start |
| 3 Client → server | ACK, Seq=1001, Ack=5001 | Client acknowledges server SYN; connection is established |

## Data transfer

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.

## Orderly termination

1. Assume client’s next data sequence is 1201. It sends FIN with Seq=1201, meaning it has finished sending.
2. Server sends ACK=1202. The connection is half closed: the server can still send data until its application finishes.
3. Assume server has sent no data since the handshake. It sends FIN with Seq=5001.
4. 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.
5. 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.

#### Practical example

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.

**Yaad rakho:** SYN plus one, FIN plus one; ACK next expected byte.

---

## TEE · Q3(b) · VLSM customer allocation

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q3b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-feb-reexam/q3b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [10 marks]

### Answer

### Given

180.50.0.0/16; Group 1: 80 customers × 256 addresses; Group 2: 150 customers × 256 addresses; Group 3: 32 customers × 128 addresses

### To find

Each customer prefix, every group range, first/last customer blocks, and unallocated addresses.

### Formula and why



$$
p=32-\log_2(\text{addresses per customer}),\quad A_{group}=n\times A_{customer}
$$



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.

### Step 1. Compute sizes and allocate consecutive aligned customer blocks

| Group | Customers | Addresses each | Customer prefix | Used | Group range |
| --- | --- | --- | --- | --- | --- |
| 1 | 80 | 256 | /24 | 20480 | 180.50.0.0–180.50.79.255 |
| 2 | 150 | 256 | /24 | 38400 | 180.50.80.0–180.50.229.255 |
| 3 | 32 | 128 | /25 | 4096 | 180.50.230.0–180.50.245.255 |

### Step 2. State first and last customer ranges

| Group | First customer | Last customer |
| --- | --- | --- |
| 1 | 180.50.0.0–180.50.0.255 | 180.50.79.0–180.50.79.255 |
| 2 | 180.50.80.0–180.50.80.255 | 180.50.229.0–180.50.229.255 |
| 3 | 180.50.230.0–180.50.230.127 | 180.50.245.128–180.50.245.255 |

### Step 3. Count the unused addresses

Allocated = 20480 + 38400 + 4096 = 62976. Unused = 65536 − 62976 = **2560**.

Unused range: 180.50.246.0–180.50.255.255.

---

## TEE · Q4(a) · DNS resolution

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q4a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-feb-reexam/q4a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [10 marks]

### Answer

The **Domain Name System (DNS)** 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.

Swipe across the diagram to read its labels ↔

![DNS namespace: full label paths are unique](https://deep-learning-study-room.vercel.app/cn/fig/tee-dns.f5345fe9fb.svg)

Diagram: DNS namespace: full label paths are unique. Labels: DNS namespace: full label paths are unique | DNS namespace: full label paths are unique | Root . | com | org | example.com | example.org | www.example.com | www.example.org | Same local label “www”; different full names, so no collision.

Root, top-level domains, delegated domain and host labels.

| Level | Example | Meaning |
| --- | --- | --- |
| Root | . | Top of the namespace |
| Top-level domain (TLD) | com, org, in | A child zone below the root |
| Registered/delegated domain | example.com | Name under a parent such as com |
| Subdomain/host label | www.example.com | A label below example.com; a name may own different record types |

## Why names remain unique

1. 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.
2. 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.
3. 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.
4. 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.

## Resolution

1. A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.
2. 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.
3. 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.

#### Practical example

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.

**Yaad rakho:** Full path unique; www label akela unique nahi.

### Worked resolution example: www.xyz.com

```
Client → recursive resolver → root (.)
                           → .com TLD
                           → authoritative server for xyz.com
Client ← final A/AAAA answer ← resolver
```

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.

---

## TEE · Q4(b) · RIP route updates

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q4b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-feb-reexam/q4b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q4(b). Explain Routing Information Protocol. Illustrate with an example how routes are updated in RIP. [10 marks]

### Answer

**Definition.** Routing Information Protocol (RIP) is an interior distance-vector routing protocol that uses a bounded metric, commonly hop count, to select routes.

**Simple meaning.** RIP mein hops count; 15 tak reachable, 16 means unreachable.

## Understand it step by step

1. RIPv2 uses distance-vector updates and carries subnet-mask information, allowing classless routes.
2. 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.
3. 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.
4. 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.

#### Practical example

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.

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.

**Yaad rakho:** RIP: neighbour distances; 16 is infinity.

### Route-update example using RIP hop counts

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.

| Candidate | Calculation | Result |
| --- | --- | --- |
| Via B | 1 + 2 | 3 hops |
| Via C | 1 + 4 | 5 hops |

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.

---

## TEE · Q5(a) · Pure versus slotted ALOHA

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q5a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-feb-reexam/q5a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q5(a). Define random Access. Differentiate between pure ALOHA & slotted ALOHA in terms of the following performance factors. (i) Throughput (ii) Vulnerable time (iii) Efficiency (iv) Time synchronization. [10 marks]

### Answer

**Definition.** 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.

**Simple meaning.** Frame ready → bhej do. Collision hua → random wait karke retry.

Swipe across the diagram to read its labels ↔

![Pure ALOHA: arbitrary start times can overlap](https://deep-learning-study-room.vercel.app/cn/fig/pure-aloha.8aa7732ee2.svg)

Diagram: Pure ALOHA: arbitrary start times can overlap. Labels: Pure ALOHA: arbitrary start times can overlap | Pure ALOHA: arbitrary start times can overlap | Station A | Station B | Frame A | Frame B | Overlap: both fail in the basic collision model | A retry begins after a random waiting interval.

Pure ALOHA: transmit first, retry if necessary

## Understand it step by step

1. Several stations share the same channel. Pure ALOHA does not first check whether the channel is idle.
2. A station transmits immediately. In the basic collision-channel model, any overlapping frame makes the involved frames unsuccessful.
3. 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.
4. The station waits a random backoff time and retries. If every station used the same fixed delay, they could collide again together.

#### Practical example

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.

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.

**Yaad rakho:** Pure = kisi bhi time start; retry ka wait random.

**Definition.** The vulnerable period is the interval of start times of other frames that would cause a collision with a chosen frame.

**Simple meaning.** Apne frame se ek frame-time pehle start hua frame bhi takra sakta hai, aur baad mein bhi.

Swipe across the diagram to read its labels ↔

![Pure ALOHA: interfering starts from −T to +T](https://deep-learning-study-room.vercel.app/cn/fig/vulnerable.e2a01a5ab7.svg)

Diagram: Pure ALOHA: interfering starts from −T to +T. Labels: Pure ALOHA: interfering starts from −T to +T | Pure ALOHA: interfering starts from −T to +T | −T | 0 | +T | Our frame: 0 to T | Vulnerable start-time interval length = 2T

Why Pure ALOHA has a 2T vulnerable period

## Understand it step by step

1. Let your frame start at time 0 and finish at T. All frames have the same transmission duration T.
2. Another frame starting between −T and 0 is still being transmitted when your frame begins.
3. Another frame starting between 0 and T begins before your frame ends.
4. Therefore interfering start times occupy an interval of length 2T. Exact boundary contact is treated as non-overlap in this idealized timing model.

#### Practical example

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.

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.

**Yaad rakho:** Pure: before T + after T = 2T.

**Definition.** 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.

**Simple meaning.** Frame ready hai tab bhi next slot ki start-line ka wait karo.

Swipe across the diagram to read its labels ↔

![Slotted ALOHA: one frame duration per slot](https://deep-learning-study-room.vercel.app/cn/fig/slotted-aloha.fbfbef9647.svg)

Diagram: Slotted ALOHA: one frame duration per slot. Labels: Slotted ALOHA: one frame duration per slot | Slotted ALOHA: one frame duration per slot | 0T | 1T | 2T | 3T | 4T | 5T | Station A | Station B | A1 | A2 | B1 | B2 | A2 and B1 choose the same slot: collision. Starts stay aligned.

Slotted ALOHA: starts only at slot boundaries

## Understand it step by step

1. All stations agree on slot boundaries; time synchronization is required.
2. A station with a frame waits for a slot boundary before starting. A slot can be idle, successful or a collision.
3. Exactly one station transmitting in a slot produces success in the ideal model. Two or more simultaneous attempts collide.
4. Frames cannot partially overlap adjacent slots under the assumptions. The vulnerable interval is T instead of 2T. Randomized retries are still needed.

#### Practical example

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.

| Feature | Pure | Slotted |
| --- | --- | --- |
| Start time | Any time | Slot boundary only |
| Synchronization | No common slots required | Required |
| Vulnerable period | 2T | T |
| Maximum S | 1/(2e) ≈ 0.184 | 1/e ≈ 0.368 |
| G at maximum | 0.5 | 1 |

**Yaad rakho:** Slotted = aligned starts; collision risk half-window, not zero.

---

## TEE · Q5(b) · Congestion policies

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q5b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-feb-reexam/q5b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [10 marks]

### Answer

**Congestion** 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. **Flow control** protects a receiver; congestion control protects the network.

Swipe across the diagram to read its labels ↔

![Two congestion-control approaches](https://deep-learning-study-room.vercel.app/cn/fig/tee-congestion.c27c2303bb.svg)

Diagram: Two congestion-control approaches. Labels: Two congestion-control approaches | Two congestion-control approaches | Open loop: prevent overload | Admission rules and retransmission/window/ACK policies reduce avoidable traffic before congestion | feedback. | Closed loop: observe and signal | Detect queues, loss or explicit congestion marks; return feedback toward the sender. | Change behaviour | Reduce offered load or change resource use. Receiver flow control addresses a different bottleneck.

Open-loop prevention and closed-loop feedback.

| Approach | Policy / mechanism | How it helps |
| --- | --- | --- |
| Open loop: prevent congestion without runtime congestion feedback | Retransmission policy | Carefully chosen timers/selective retransmission avoid needless extra traffic |
| Open loop | Window policy | Limit outstanding data and avoid excessive retransmission after loss |
| Open loop | Acknowledgement policy | Avoid unnecessarily frequent ACK traffic while retaining correct recovery |
| Open loop | Admission policy | Refuse new load when reserved capacity is insufficient |
| Closed loop: measure and react to congestion | Backpressure | A congested node tells upstream nodes to reduce/stop sending, possibly propagating hop by hop |
| Closed loop | Choke/control signalling | A congested node sends explicit feedback to the source |
| Closed loop | Implicit signalling | A sender infers congestion from loss/delay and changes its sending behaviour |
| Closed loop | Explicit marking | Network marks congestion (for example ECN); endpoints react to returned information |

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.

#### Practical example

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.

**Yaad rakho:** Open loop pehle prevent; closed loop feedback se react.

---

## TEE · Q6(a) · Dijkstra six-node graph

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q6a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-feb-reexam/q6a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [10 marks]

### Original diagram data

| From | To | Cost |
| --- | --- | --- |
| A | B | 3 |
| A | D | 7 |
| B | D | 5 |
| B | E | 5 |
| D | E | 4 |
| D | F | 2 |
| E | F | 1 |
| E | C | 8 |
| F | C | 3 |

### Answer

### Given

The original diagram is undirected. All edge labels are reproduced below. Source = A.

Swipe across the diagram to read its labels ↔

![dijkstra 2025 original question graph](https://deep-learning-study-room.vercel.app/cn/fig/old-dijkstra-2025.c24a5141a1.svg)

Diagram: dijkstra 2025 original question graph. Labels: dijkstra 2025 original question graph | 3 | 7 | 5 | 5 | 4 | 2 | 1 | 8 | 3 | A | B | C | D | E | F

| From | To | Cost |
| --- | --- | --- |
| A | B | 3 |
| A | D | 7 |
| B | D | 5 |
| B | E | 5 |
| D | E | 4 |
| D | F | 2 |
| E | F | 1 |
| E | C | 8 |
| F | C | 3 |

### To find

Shortest distance, complete route and predecessor for every node from A.

### Formula and why



$$
d(v)\leftarrow\min(d(v),d(u)+w(u,v))
$$



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.

### Step 1. Initialize and relax

| Pass / settled node | Strict improvements | A | B | C | D | E | F |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 0 | Initial | 0 | ∞ | ∞ | ∞ | ∞ | ∞ |
| A | B←A: 0+3=3; D←A: 0+7=7 | 0 | 3 | ∞ | 7 | ∞ | ∞ |
| B | E←B: 3+5=8 | 0 | 3 | ∞ | 7 | 8 | ∞ |
| D | F←D: 7+2=9 | 0 | 3 | ∞ | 7 | 8 | 9 |
| E | C←E: 8+8=16 | 0 | 3 | 16 | 7 | 8 | 9 |
| F | C←F: 9+3=12 | 0 | 3 | 12 | 7 | 8 | 9 |
| C | No change | 0 | 3 | 12 | 7 | 8 | 9 |

### Step 2. Read predecessors backwards, then reverse

| Destination | Distance | Previous | Route |
| --- | --- | --- | --- |
| A | 0 | — | A |
| B | 3 | A | A → B |
| C | 12 | F | A → D → F → C |
| D | 7 | A | A → D |
| E | 8 | B | A → B → E |
| F | 9 | D | A → D → F |

A tie between two equally short paths is valid; this table retains the first predecessor on equal distances.

---

## TEE · Q6(b) · CRC

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q6b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-feb-reexam/q6b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [10 marks]

### Answer

### Given

Data = 1010011110; generator bits = 1011; degree r = 3.

### To find

CRC remainder, complete transmitted frame and receiver check.

### Formula and why

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.

### Step 1. Append zeros

1010011110 → 1010011110000

### Step 2. Perform XOR division

| Leading position | Before XOR | Aligned generator | After XOR |
| --- | --- | --- | --- |
| 1 | 1010011110000 | 1011000000000 | 0001011110000 |
| 4 | 0001011110000 | 0001011000000 | 0000000110000 |
| 8 | 0000000110000 | 0000000101100 | 0000000011100 |
| 9 | 0000000011100 | 0000000010110 | 0000000001010 |
| 10 | 0000000001010 | 0000000001011 | 0000000000001 |

### Step 3. Build the frame

Remainder = **001**. Transmit **1010011110001**.

### Step 4. Divide the received frame

| Position | Before | Generator | After |
| --- | --- | --- | --- |
| 1 | 1010011110001 | 1011000000000 | 0001011110001 |
| 4 | 0001011110001 | 0001011000000 | 0000000110001 |
| 8 | 0000000110001 | 0000000101100 | 0000000011101 |
| 9 | 0000000011101 | 0000000010110 | 0000000001011 |
| 10 | 0000000001011 | 0000000001011 | 0000000000000 |

Receiver remainder = 000. No error is detected; this is not a guarantee that every possible corruption is detectable.

---

## TEE · Q7(a) · Guided versus unguided media

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q7a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-feb-reexam/q7a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q7(a). Compare guided and unguided transmission media in terms of their working principles, key characteristics, and common applications. [5 marks]

### Answer

**Guided media** constrain signals to a physical path: twisted pair, coaxial cable and optical fiber. **Unguided media** 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.

Swipe across the diagram to read its labels ↔

![Transmission media: guided and unguided](https://deep-learning-study-room.vercel.app/cn/fig/tee-media.aff26cd0b5.svg)

Diagram: Transmission media: guided and unguided. Labels: Transmission media: guided and unguided | Transmission media: guided and unguided | Guided: a physical path | Twisted pair: electrical pairs. Coaxial: shielded conductor. Fiber: light through a protected core. | Unguided: waves in free space | Radio, terrestrial/satellite microwave, and infrared. Range and interference depend on the system. | Campus combination | Fiber backbone + copper access links + managed wireless mobility. Security and reliability need | configuration.

Transmission media classification.

| Medium | Two key characteristics | Limitations / use |
| --- | --- | --- |
| Twisted pair | Electrical signal; pairs twisted to reduce interference | Low-cost LAN access; distance/noise limits depend on category and design |
| Coaxial cable | Shielded central conductor; greater shielding than basic unshielded pair | Bulkier; cable broadband and legacy shared LANs |
| Optical fiber | Light in glass/plastic; high capacity with immunity to electromagnetic interference | Transceivers and careful splicing/bend control needed; backbone links |
| Radio waves | Wireless propagation; many bands support broad/non-line-of-sight coverage | Interference, shared spectrum and security configuration matter; Wi-Fi/mobile |
| Terrestrial microwave | Directional antennas; typically line of sight | Alignment and obstructions matter; point-to-point backhaul |
| Satellite microwave | Wide coverage through relay in space | Cost and latency depend strongly on orbit/system; remote connectivity |
| Infrared | Short-range light; usually blocked by walls | Limited coverage; short-range indoor/remote-control links |

#### Practical example

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.

**Yaad rakho:** Guided = cable path; unguided = free-space waves.

Transmission media are classified into guided media (twisted pair, coaxial cable, optical fiber) and unguided media (radio, microwave, infrared).

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.

| Advantages | Disadvantages / design costs |
| --- | --- |
| High data capacity and low attenuation over suitable links | Optical transceivers, connectors and splicing add cost/skill requirements |
| Immune to electromagnetic interference; no electrical crosstalk | Tight bends, dirty connectors and poor installation increase loss |
| Electrical isolation between buildings | Fiber is mechanically sensitive and requires appropriate protection |
| Harder to tap casually than an unprotected radio channel | It is not automatically confidential; encryption/access control remain necessary |

#### Practical example

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.

**Yaad rakho:** Fiber light carry karta hai; immunity means no EMI, not no security risk.

### Two guided media: advantages and disadvantages

| Medium / working principle | Advantages | Disadvantages |
| --- | --- | --- |
| Twisted pair: voltage signals travel on two insulated copper conductors twisted together | Low purchase/installation cost; flexible and easy to terminate for local access | More susceptible to electromagnetic interference than fiber; distance and capacity are limited by cable category and signalling design |
| Optical fiber: light pulses travel through a core guided by its refractive-index structure | High capacity and long reach; immune to electromagnetic interference | Optical equipment and splicing can cost more; tight bends, damage and dirty connectors degrade the link |

These comparisons describe typical engineering tradeoffs, not a guarantee that every fiber installation is faster or more expensive than every copper installation.

---

## TEE · Q7(b) · IPv4 /26 block

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q7b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-feb-reexam/q7b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [5 marks]

### Answer

### Given

210.16.36.56/26

### To find

First and last addresses and total block size.

### Formula and why



$$
N=2^{32-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.

### Step 1. Find host bits

32 − 26 = 6. N = 64.

### Step 2. Locate the aligned block

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.

### Step 3. Write the result

First = **210.16.36.0**; last = **210.16.36.63**; total = **64** addresses. Usual usable host range: 210.16.36.1–210.16.36.62.

---

## TEE · Q7(c) · FTP connections

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2025-feb-reexam--q7c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2025-feb-reexam/q7c

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [10 marks]

### Answer

**File Transfer Protocol (FTP)** 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.

Swipe across the diagram to read its labels ↔

![FTP: separate control and data connections](https://deep-learning-study-room.vercel.app/cn/fig/tee-ftp.1b305fa997.svg)

Diagram: FTP: separate control and data connections. Labels: FTP: separate control and data connections | FTP: separate control and data connections | Client → server TCP port 21 | Control: USER, PASS, CWD, TYPE, RETR/STOR/LIST, QUIT; server replies. | Active mode: server initiates data | Client provides a listening endpoint; traditional server data source port is 20. | Passive mode: client initiates data | Server advertises an endpoint; client connects to that selected port. | Data connection carries file/listing bytes | Command channel stays separate; another operation can open another data connection.

Control connection on server port 21; active/passive data connection roles differ.

| Connection | Function | Lifetime / ports |
| --- | --- | --- |
| Control | Commands and replies: USER, PASS, CWD, TYPE, LIST, RETR, STOR, QUIT | Client connects to server TCP port 21; normally kept for the session |
| Data | File contents and directory listing data | Opened as needed; separate from command channel |

## How a transfer works

1. Client opens the control connection and exchanges server greeting, login commands and replies. Plain FTP sends credentials/data without encryption.
2. Client chooses transfer settings such as binary/image mode for arbitrary bytes, and requests the needed working directory/operation.
3. In **active FTP**, the client provides a listening endpoint and the server initiates the data connection, traditionally from server port 20.
4. In **passive FTP**, 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.
5. 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.
6. QUIT ends the control session.

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.

#### Practical example

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.

**Yaad rakho:** Control commands, data file; passive mein client dono connect karta.

---

## TEE · Q1(a) · Network classification

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q1a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q1a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q1(a). Describe briefly the classification of computer networks. [5 marks]

### Answer

A **computer network** 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.

| Type | Meaning and scope | Example |
| --- | --- | --- |
| PAN | Personal Area Network: a person’s nearby devices | Phone linked to earbuds |
| LAN | Local Area Network: a building or local campus network under local administration | Laboratory Ethernet/Wi-Fi |
| MAN | Metropolitan Area Network: interconnects sites across a town/city | City-wide institutional network |
| WAN | Wide Area Network: connects geographically separated networks over regional/global links | Branches in different cities |
| ARPANET | Historical packet-switched research network; a major predecessor of the Internet | Early interconnected research institutions; not a modern geographic size category |

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.

#### Practical example

A student uses a PAN for earbuds, a LAN in the lab and a WAN when accessing a distant university service.

**Yaad rakho:** PAN personal, LAN local, MAN city, WAN wide.

---

## TEE · Q1(b) · ALOHA and vulnerable periods

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q1b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q1b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q1(b). Compare and contrast pure ALOHA and slotted ALOHA. Briefly explain vulnerable time and how it is calculated in each of them. [5 marks]

### Answer

**Definition.** 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.

**Simple meaning.** Frame ready → bhej do. Collision hua → random wait karke retry.

Swipe across the diagram to read its labels ↔

![Pure ALOHA: arbitrary start times can overlap](https://deep-learning-study-room.vercel.app/cn/fig/pure-aloha.8aa7732ee2.svg)

Diagram: Pure ALOHA: arbitrary start times can overlap. Labels: Pure ALOHA: arbitrary start times can overlap | Pure ALOHA: arbitrary start times can overlap | Station A | Station B | Frame A | Frame B | Overlap: both fail in the basic collision model | A retry begins after a random waiting interval.

Pure ALOHA: transmit first, retry if necessary

## Understand it step by step

1. Several stations share the same channel. Pure ALOHA does not first check whether the channel is idle.
2. A station transmits immediately. In the basic collision-channel model, any overlapping frame makes the involved frames unsuccessful.
3. 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.
4. The station waits a random backoff time and retries. If every station used the same fixed delay, they could collide again together.

#### Practical example

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.

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.

**Yaad rakho:** Pure = kisi bhi time start; retry ka wait random.

**Definition.** The vulnerable period is the interval of start times of other frames that would cause a collision with a chosen frame.

**Simple meaning.** Apne frame se ek frame-time pehle start hua frame bhi takra sakta hai, aur baad mein bhi.

Swipe across the diagram to read its labels ↔

![Pure ALOHA: interfering starts from −T to +T](https://deep-learning-study-room.vercel.app/cn/fig/vulnerable.e2a01a5ab7.svg)

Diagram: Pure ALOHA: interfering starts from −T to +T. Labels: Pure ALOHA: interfering starts from −T to +T | Pure ALOHA: interfering starts from −T to +T | −T | 0 | +T | Our frame: 0 to T | Vulnerable start-time interval length = 2T

Why Pure ALOHA has a 2T vulnerable period

## Understand it step by step

1. Let your frame start at time 0 and finish at T. All frames have the same transmission duration T.
2. Another frame starting between −T and 0 is still being transmitted when your frame begins.
3. Another frame starting between 0 and T begins before your frame ends.
4. Therefore interfering start times occupy an interval of length 2T. Exact boundary contact is treated as non-overlap in this idealized timing model.

#### Practical example

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.

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.

**Yaad rakho:** Pure: before T + after T = 2T.

**Definition.** 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.

**Simple meaning.** Frame ready hai tab bhi next slot ki start-line ka wait karo.

Swipe across the diagram to read its labels ↔

![Slotted ALOHA: one frame duration per slot](https://deep-learning-study-room.vercel.app/cn/fig/slotted-aloha.fbfbef9647.svg)

Diagram: Slotted ALOHA: one frame duration per slot. Labels: Slotted ALOHA: one frame duration per slot | Slotted ALOHA: one frame duration per slot | 0T | 1T | 2T | 3T | 4T | 5T | Station A | Station B | A1 | A2 | B1 | B2 | A2 and B1 choose the same slot: collision. Starts stay aligned.

Slotted ALOHA: starts only at slot boundaries

## Understand it step by step

1. All stations agree on slot boundaries; time synchronization is required.
2. A station with a frame waits for a slot boundary before starting. A slot can be idle, successful or a collision.
3. Exactly one station transmitting in a slot produces success in the ideal model. Two or more simultaneous attempts collide.
4. Frames cannot partially overlap adjacent slots under the assumptions. The vulnerable interval is T instead of 2T. Randomized retries are still needed.

#### Practical example

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.

| Feature | Pure | Slotted |
| --- | --- | --- |
| Start time | Any time | Slot boundary only |
| Synchronization | No common slots required | Required |
| Vulnerable period | 2T | T |
| Maximum S | 1/(2e) ≈ 0.184 | 1/e ≈ 0.368 |
| G at maximum | 0.5 | 1 |

**Yaad rakho:** Slotted = aligned starts; collision risk half-window, not zero.

---

## TEE · Q1(c) · Classful addressing

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q1c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q1c

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [5 marks]

### Answer

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.

| Class | First octet | Default mask | Network / host split | Purpose |
| --- | --- | --- | --- | --- |
| A | 1–126 (ordinary unicast) | 255.0.0.0 (/8) | 8 / 24 bits | Large historical unicast networks; 0 and 127 reserved |
| B | 128–191 | 255.255.0.0 (/16) | 16 / 16 bits | Medium historical unicast networks |
| C | 192–223 | 255.255.255.0 (/24) | 24 / 8 bits | Small historical unicast networks |
| D | 224–239 | No unicast default mask | Not network/host class split | Multicast |
| E | 240–255 | No unicast default mask | Not normal unicast allocation | Reserved/experimental; special addresses exist |

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.

---

## TEE · Q1(d) · UDP applications

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q1d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q1d

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [5 marks]

### Answer

**User Datagram Protocol (UDP)** provides connectionless, message-oriented process delivery. One send creates a datagram; message boundaries are retained. UDP has an **8-byte header**, 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.

Swipe across the diagram to read its labels ↔

![UDP header: each row contains 32 bits](https://deep-learning-study-room.vercel.app/cn/fig/tee-udp.b14cba3c28.svg)

Diagram: UDP header: each row contains 32 bits. Labels: UDP header: each row contains 32 bits | UDP header: each row contains 32 bits | Source port · 16 | Destination port · 16 | Length · 16 | Checksum · 16 | Total 8 bytes. Length = header + UDP payload.

UDP fixed header: four 16-bit fields, eight bytes total.

| UDP field | Width | Purpose |
| --- | --- | --- |
| Source port | 16 bits | Sending endpoint; a zero value can indicate no reply port when unused |
| Destination port | 16 bits | Receiving application endpoint |
| Length | 16 bits | UDP header plus UDP payload; minimum 8 bytes |
| Checksum | 16 bits | Error detection over UDP and an IP pseudo-header; not retransmission |

## Operation and services

1. 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.
2. The receiving UDP layer validates the length/checksum as applicable and uses the destination endpoint to deliver the datagram.
3. 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.
4. UDP checksum zero can mean checksum omitted in IPv4. IPv6 ordinarily requires the UDP checksum; specialized exceptions are outside this syllabus.

#### Practical example

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.

**Yaad rakho:** UDP datagram preserve; reliability automatic nahi.

### Five suitable application examples

| Application | Why UDP can suit it |
| --- | --- |
| DNS queries | Small request/reply; application retries if necessary. DNS also supports TCP. |
| DHCP | A host without an assigned address can use UDP broadcasts to obtain configuration. |
| Real-time audio/video using RTP | Late packets are often less useful than timely packets; application handles loss/jitter. |
| Online game state updates | A newer position can replace a stale one; application-specific reliability can protect critical events. |
| NTP | Small timestamp exchanges; a fresh later measurement can replace a lost exchange. |

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.

---

## TEE · Q2(a) · SMTP phases

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q2a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q2a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q2(a). Explain the working of Simple Mail Transfer Protocol in sending email messages. Briefly explain the three phases of mail transfer. [10 marks]

### Answer

**Simple Mail Transfer Protocol (SMTP)** 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.

Swipe across the diagram to read its labels ↔

![SMTP: envelope, message and completion](https://deep-learning-study-room.vercel.app/cn/fig/tee-smtp.c6f99877c4.svg)

Diagram: SMTP: envelope, message and completion. Labels: SMTP: envelope, message and completion | SMTP: envelope, message and completion | SMTP sender | Receiving server | 220 greeting | EHLO sender.example | 250 capabilities | MAIL FROM:<sender@example.com> | RCPT TO:<receiver@example.org> | DATA (after successful envelope replies) | 354 start mail input | Headers + blank line + body + dot line | 250 accepted; then QUIT / server 221 | SMTP submits/relays. Inbox reading uses IMAP/POP or webmail. | Envelope MAIL/RCPT differs from visible From/To headers.

Submission/relay use SMTP; reading an inbox uses a separate access protocol.

| Phase | Typical exchange | Purpose |
| --- | --- | --- |
| Connection and greeting | Server 220; client EHLO (HELO for basic SMTP); server 250 capabilities | Identify peers and learn supported extensions |
| Envelope transfer | MAIL FROM:<sender>; RCPT TO:<recipient>; 250 replies | Declare return path and one or more delivery recipients |
| Message transfer | DATA; server 354; headers + blank line + body; single dot line; server 250 | Transmit the message after server permission; completion reply accepts responsibility |
| Termination | QUIT; server 221 | Close the SMTP session cleanly |

## Message flow and important details

1. 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.
2. The sending server resolves the recipient domain’s MX records, connects to an appropriate mail server and carries out the SMTP exchange.
3. MAIL FROM and RCPT TO are the **envelope**; visible From/To headers inside DATA are message content and can differ. Multiple RCPT TO commands can name several recipients.
4. 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.
5. 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.
6. The recipient reads stored mail using an access protocol such as IMAP/POP3 or webmail. SMTP is not the mailbox-retrieval protocol.

#### Practical example

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.

**Yaad rakho:** SMTP send/relay; inbox read IMAP/POP/webmail.

### The three phases requested in the paper

| Phase | Commands / replies | Meaning |
| --- | --- | --- |
| 1. Connection establishment | TCP connection; 220 greeting; EHLO/HELO; 250 reply | Open the connection and identify the SMTP peers |
| 2. Mail transfer | MAIL FROM, RCPT TO, DATA; 354; message; single dot; 250 | Transfer the envelope and then the message content |
| 3. Connection termination | QUIT; 221; close TCP | Finish the SMTP session |

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.

---

## TEE · Q2(b) · OSI layers

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q2b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q2b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q2(b). Draw and explain the OSI network model. Briefly describe the functionalities of each layer. [10 marks]

### Answer

The **Open Systems Interconnection (OSI)** 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.

Swipe across the diagram to read its labels ↔

![OSI layers mapped to the four-layer TCP/IP model](https://deep-learning-study-room.vercel.app/cn/fig/tee-models.5bff0518c8.svg)

Diagram: OSI layers mapped to the four-layer TCP/IP model. Labels: OSI layers mapped to the four-layer TCP/IP model | OSI layers mapped to the four-layer TCP/IP model | 7 Application | 6 Presentation | 5 Session | 4 Transport | 3 Network | 2 Data link | 1 Physical | Application | HTTP, DNS, FTP, SMTP | Transport | Internet | Link / network access | Includes physical access | Some textbooks split link into data link + physical: five layers.

OSI seven-layer model mapped to the four-layer TCP/IP model.

| Layer | Task | Example |
| --- | --- | --- |
| 7 Application | Services used by network applications | HTTP, DNS, FTP, SMTP |
| 6 Presentation | Representation, encoding and application data transformations | Character encoding, serialization; encryption as a conceptual function |
| 5 Session | Manage dialogue and synchronization/checkpoints | Session establishment and resumption concepts |
| 4 Transport | Process delivery; reliability/flow control where supplied | TCP, UDP, SCTP; ports |
| 3 Network | Logical addressing and routing across networks | IP; routers |
| 2 Data link | Framing, local link addressing, medium access and error detection | Ethernet/Wi-Fi; MAC addresses |
| 1 Physical | Transmit signal symbols/bits through a medium | Electrical, optical or radio signals |

## Encapsulation and delivery

1. Application creates data. Transport adds a transport header: TCP segment or UDP datagram.
2. IP adds its header to form a packet. The link adds a header and usually a trailer to form a frame.
3. The physical layer carries signals. The destination reverses the process and sends the data to the receiving process.
4. 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.

#### Practical example

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.

**Yaad rakho:** Application se physical tak wrap; receiver par unwrap.

### Two functions of every OSI layer

| Layer | Function 1 | Function 2 |
| --- | --- | --- |
| Application | Provide application-level network services, such as file transfer | Define application exchanges for services such as email or name resolution |
| Presentation | Translate/serialize data into an agreed representation | Compress data or encrypt/decrypt it where these transformations are required |
| Session | Establish, manage and end a dialogue/session | Provide synchronization/checkpoints for resuming a dialogue |
| Transport | Identify sending/receiving processes using ports and segment/reassemble data | Provide end-to-end reliability and flow control when the selected protocol supports them |
| Network | Provide logical addressing across networks | Select routes and forward packets towards the destination |
| Data link | Frame the data and identify local interfaces | Control shared-medium access and detect link-frame errors |
| Physical | Represent bits as electrical, optical or radio signal symbols | Specify physical-interface/signalling properties such as timing, connectors and transmission rate |

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.

---

## TEE · Q3(a) · Network models

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q3a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q3a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q3(a). Distinguish between peer-to-peer communication and client-server communication. [5 marks]

### Answer

In a **client-server** design, users’ clients contact designated service processes. In **peer-to-peer (P2P)**, participating hosts can supply and consume resources. These are application organizations, not different physical cable types.

Swipe across the diagram to read its labels ↔

![Client-server and peer-to-peer organization](https://deep-learning-study-room.vercel.app/cn/fig/tee-client-peer.a7c6f1b535.svg)

Diagram: Client-server and peer-to-peer organization. Labels: Client-server and peer-to-peer organization | Client-server and peer-to-peer organization | Client-server | Peer-to-peer | Server | C1 | C2 | P1 | P2 | P3 | Peers can supply and consume. A central service can be replicated.

Central service versus cooperating peers.

| Point | Client-server | Peer-to-peer |
| --- | --- | --- |
| Roles | Clients request; designated servers provide services | Peers can both request and provide resources |
| Control | Central policies, accounts and backups are easier to coordinate | Control and copies distributed among peers |
| Performance | Predictable with adequate server capacity; server may bottleneck | Resources grow with peers, but peer capacity/availability vary |
| Scalability | Scale servers, replicas, caching and load distribution | More peers can contribute capacity; coordination becomes harder |
| Reliability | One unreplicated server is a failure point; replication helps | Loss of one peer need not stop system if useful replicas remain |
| Security | Central access control and monitoring | Trust and consistent access policy are harder |
| Best fit | Managed collaboration, databases, login services | Distributed content sharing among participating peers |

## Apply to the platform

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.

#### Practical example

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.

**Yaad rakho:** Server mein service central; peers dono roles karte hain.

---

## TEE · Q3(b) · CSMA/CD

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q3b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q3b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q3(b). Describe the working of CSMA/CD with the help of flow diagram. [10 marks]

### Answer

**Definition.** CSMA with Collision Detection monitors the medium during transmission, aborts a detected collision and retries after a randomized backoff.

**Simple meaning.** CD = takkar detect hui toh transmission rok do.

Swipe across the diagram to read its labels ↔

![CSMA/CD: sender must still be sending after a round trip](https://deep-learning-study-room.vercel.app/cn/fig/collision-roundtrip.42358ec7bf.svg)

Diagram: CSMA/CD: sender must still be sending after a round trip. Labels: CSMA/CD: sender must still be sending after a round trip | CSMA/CD: sender must still be sending after a round trip | Station A | Station B | Signal travels: Tp | Collision indication returns: Tp | Worst-case timing bound: Tframe ≥ 2Tp, so Lmin ≥ 2RTp

CSMA/CD: detect a collision while transmitting

## Understand it step by step

1. Sense the channel. In traditional shared half-duplex Ethernet, begin transmission when permitted by the access rule.
2. Continue monitoring while transmitting. If a collision is detected, send the collision/jam indication and abort the current frame.
3. Choose a random delay using binary exponential backoff; then attempt again subject to the access rules.
4. The sender must still be transmitting when a worst-case collision indication returns. Hence the ideal timing requirement is Tframe ≥ 2Tp.
5. Modern switched full-duplex Ethernet links do not use collision-based CSMA/CD access. Keep the historical/shared-medium assumptions explicit.



$$
T_{\mathrm{frame}}\geq 2T_p
$$





$$
L_{\min}\geq 2RT_p
$$



#### Practical example

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.

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.

**Yaad rakho:** Detect karna hai toh sender tab tak bhej raha hona chahiye.

### CSMA/CD flow diagram

```
Frame ready → sense channel
                 │
          Busy? yes → keep sensing (1-persistent case)
                 no
                 ↓
          Transmit and monitor
                 │
          Collision? no → frame finished? → success
                 yes
                 ↓
          Jam indication → abort frame → increment attempt count
                 │
          Retry limit reached? yes → report failure
                 no
                 ↓
          Random binary-exponential backoff → sense again
```

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.

---

## TEE · Q3(c) · OSPF routing

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q3c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q3c

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q3(c). Explain briefly OSPF routing algorithm. [5 marks]

### Answer

**Definition.** Open Shortest Path First (OSPF) is an interior link-state routing protocol that selects routes using shortest-path calculations and additive link costs.

**Simple meaning.** OSPF = link-state map + Dijkstra + summed costs.

## Understand it step by step

1. Routers discover and maintain neighbour relationships using Hello packets and exchange link-state information.
2. 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.
3. 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.
4. OSPFv2 is the IPv4 protocol in the supplied paper; it is carried directly in IP protocol number 89, not TCP/UDP port 89.
5. 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.

#### Practical example

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.

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.

**Yaad rakho:** OSPF cost add karo; sirf hops nahi.

---

## TEE · Q4(a) · Traffic shaping buckets

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q4a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q4a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q4(a). Describe in detail the working of token bucket and leaky bucket in traffic shaping. Illustrate with diagrams the implementation of each. [10 marks]

### Answer

In the textbook **leaky-bucket queue/shaper** 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.

Swipe across the diagram to read its labels ↔

![Leaky-bucket data queue](https://deep-learning-study-room.vercel.app/cn/fig/tee-leaky.77bdbcf957.svg)

Diagram: Leaky-bucket data queue. Labels: Leaky-bucket data queue | Leaky-bucket data queue | Bursty arrivals enter finite buffer B | Accept packets that fit; the stated queue model drops overflow. | Queue drains at configured rate r | Send while data exists. An empty queue produces no packets. | Smoother departure stream | Buffering adds delay; idle service cannot be saved for a later burst.

Finite data buffer smooths a burst into a bounded departure rate.

1. Choose buffer capacity B and output service rate r in consistent units.
2. Admit arrivals that fit. Drop/mark overflow according to the stated implementation; this queue example drops the excess.
3. Drain at rate r while the queue is nonempty. Idle time does not accumulate permission for a later faster burst.
4. The result is smoothed output. Larger buffers accommodate larger bursts but can increase waiting delay.

| Advantage | Limitation |
| --- | --- |
| Simple bound on output rate | Bursts may overflow or suffer delay |
| Reduces short-term output variation | Unused idle service cannot be saved |
| Useful for predictable traffic shaping | No end-to-end delay/loss guarantee by itself |

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.

#### Practical example

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.

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.

**Yaad rakho:** Leaky bucket stores data; idle service save nahi hota.

A **token bucket** 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.

Swipe across the diagram to read its labels ↔

![Token bucket: permission is separate from data](https://deep-learning-study-room.vercel.app/cn/fig/tee-token.c3ff1dbf76.svg)

Diagram: Token bucket: permission is separate from data. Labels: Token bucket: permission is separate from data | Token bucket: permission is separate from data | Token generator adds r tokens per second | Store at most B tokens; extra tokens disappear when the bucket is full. | Packet of L bytes requests L tokens | Enough tokens: deduct L and permit transmission, subject to link speed. | Insufficient tokens: policy matters | Shaper buffers/waits. Policer marks or drops according to policy. | Saved tokens permit bounded bursts | Initially full: allowance over t ≤ B + rt. This alone is not an end-to-end QoS guarantee.

Tokens store permission; the separate data queue stores packets.

1. Initialize a stated token count, often B for a full bucket. Add rΔt tokens over elapsed time, capped at B.
2. 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.
3. If tokens are insufficient, a **shaper** waits/buffers until enough are available. A **policer** marks or drops nonconforming traffic according to policy. Token shortage does not universally mean drop.
4. Over interval t, a full token bucket bounds admitted data by B+rt. Actual output is also limited by link capacity and packet scheduling.
5. Unlike the queue-style leaky bucket, token storage allows limited bursts after idle time. It bounds average rate and burst size separately.



$$
\mathrm{admitted\ data}(t)\le B+rt
$$



| Limitation | Reason |
| --- | --- |
| Bursts can still congest downstream queues | Local conformance does not ensure every later link has capacity |
| Parameters must match traffic and link requirements | A small B delays/drops legitimate packets; a large B permits disruptive bursts |
| No complete QoS guarantee alone | Admission, scheduling and end-to-end capacity may still be needed |

#### Practical example

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.

**Yaad rakho:** Token permission store hota hai; actual packet alag queue mein.

| Point | Leaky data queue | Token bucket |
| --- | --- | --- |
| Stored state | Queued data | Tokens representing permission |
| Idle period | Empty queue; unused service lost | Tokens accumulate up to B |
| Output burst | Smoothed by configured service rate | Allowed if enough tokens and physical capacity exist |
| Overflow/shortage | Finite queue can overflow | Shaper waits; policer may mark/drop |
| Main parameters | Queue capacity and drain rate | Token capacity and generation rate |
| Useful when | A smoother output profile is required | Average rate plus burst allowance is required |

#### Practical example

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.

---

## TEE · Q4(b) · Selective Repeat scenarios

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q4b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q4b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q4(b). Illustrate the working of selective repeat ARQ with the help of frame transmission scenarios. Give any one advantage and disadvantage. [10 marks]

### Answer

**Selective Repeat (SR) ARQ** 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.

Swipe across the diagram to read its labels ↔

![SR W=4: individual ACKs and buffering](https://deep-learning-study-room.vercel.app/cn/fig/tee-sr.5ae2b52b45.svg)

Diagram: SR W=4: individual ACKs and buffering. Labels: SR W=4: individual ACKs and buffering | SR W=4: individual ACKs and buffering | Sender | Receiver | Frames 0,1 → accept and deliver | ACK 0 and ACK 1 individually | Frame 2 lost; frame 3 arrives | ACK 3; keep frame 3 in buffer | Timer for frame 2: resend only 2 | ACK 2; deliver 2, then buffered 3 | Sequence space 0…7; equal windows at most 4. | ACK i means that specific frame i was accepted.

SR buffers 3 while waiting for 2; only 2 is retransmitted.

1. For m=3 there are eight sequence numbers, 0…7. With equal sender and receiver windows, maximum W=23−1=4. Both windows begin at 0 and span 0…3.
2. 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.
3. Although 3 is acknowledged, the sender’s base cannot jump over missing 2. A timer for 2 expires; only frame 2 is retransmitted.
4. 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.
5. 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.
6. A repeated old frame can be acknowledged again without delivering it twice. SR needs more receiver storage and per-frame tracking than GBN.



$$
W_s=W_r\le 2^{m-1}
$$



#### Practical example

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.

**Yaad rakho:** SR selective resend; half sequence space keeps old and new separate.

### Transmission cases and evaluation

| Case | Receiver action | Sender action |
| --- | --- | --- |
| Normal transmission | Accept valid frames in its window; deliver the contiguous in-order sequence; ACK each frame | Send within the window and advance its base when the earliest outstanding frames are acknowledged |
| Lost data frame | Buffer later valid frames and ACK them, leaving the missing gap | On the missing frame's timeout, retransmit only that frame |
| Lost ACK | If an already accepted frame is repeated, acknowledge it again without delivering it twice | The individual timer may expire and repeat that one frame; the repeated ACK ends recovery |

**Advantage:** selective retransmission saves link capacity after isolated loss. **Disadvantage:** buffering out-of-order frames and tracking individual timers/ACKs make the receiver and sender more complex.

---

## TEE · Q5(a) · VLSM two groups

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q5a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q5a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [10 marks]

### Answer

### Given

191.10.0.0/16; Group 1: 128 customers × 256 addresses; Group 2: 64 customers × 128 addresses

### To find

Each customer prefix, every group range, first/last customer blocks, and unallocated addresses.

### Formula and why



$$
p=32-\log_2(\text{addresses per customer}),\quad A_{group}=n\times A_{customer}
$$



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.

### Step 1. Compute sizes and allocate consecutive aligned customer blocks

| Group | Customers | Addresses each | Customer prefix | Used | Group range |
| --- | --- | --- | --- | --- | --- |
| 1 | 128 | 256 | /24 | 32768 | 191.10.0.0–191.10.127.255 |
| 2 | 64 | 128 | /25 | 8192 | 191.10.128.0–191.10.159.255 |

### Step 2. State first and last customer ranges

| Group | First customer | Last customer |
| --- | --- | --- |
| 1 | 191.10.0.0–191.10.0.255 | 191.10.127.0–191.10.127.255 |
| 2 | 191.10.128.0–191.10.128.127 | 191.10.159.128–191.10.159.255 |

### Step 3. Count the unused addresses

Allocated = 32768 + 8192 = 40960. Unused = 65536 − 40960 = **24576**.

Unused range: 191.10.160.0–191.10.255.255.

---

## TEE · Q5(b) · FTP

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q5b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q5b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q5(b). With the help of a diagram, explain briefly the working of File Transfer Protocol. [5 marks]

### Answer

**File Transfer Protocol (FTP)** 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.

Swipe across the diagram to read its labels ↔

![FTP: separate control and data connections](https://deep-learning-study-room.vercel.app/cn/fig/tee-ftp.1b305fa997.svg)

Diagram: FTP: separate control and data connections. Labels: FTP: separate control and data connections | FTP: separate control and data connections | Client → server TCP port 21 | Control: USER, PASS, CWD, TYPE, RETR/STOR/LIST, QUIT; server replies. | Active mode: server initiates data | Client provides a listening endpoint; traditional server data source port is 20. | Passive mode: client initiates data | Server advertises an endpoint; client connects to that selected port. | Data connection carries file/listing bytes | Command channel stays separate; another operation can open another data connection.

Control connection on server port 21; active/passive data connection roles differ.

| Connection | Function | Lifetime / ports |
| --- | --- | --- |
| Control | Commands and replies: USER, PASS, CWD, TYPE, LIST, RETR, STOR, QUIT | Client connects to server TCP port 21; normally kept for the session |
| Data | File contents and directory listing data | Opened as needed; separate from command channel |

## How a transfer works

1. Client opens the control connection and exchanges server greeting, login commands and replies. Plain FTP sends credentials/data without encryption.
2. Client chooses transfer settings such as binary/image mode for arbitrary bytes, and requests the needed working directory/operation.
3. In **active FTP**, the client provides a listening endpoint and the server initiates the data connection, traditionally from server port 20.
4. In **passive FTP**, 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.
5. 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.
6. QUIT ends the control session.

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.

#### Practical example

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.

**Yaad rakho:** Control commands, data file; passive mein client dono connect karta.

---

## TEE · Q5(c) · ARP

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q5c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q5c

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q5(c). Explain briefly the significance of ARP protocol in LAN. Illustrate its working with diagram. [5 marks]

### Answer

**Definition.** Address Resolution Protocol (ARP) resolves a known IPv4 address to a link-layer hardware address on the local network.

**Simple meaning.** IP pata hai; local delivery ke liye MAC chahiye.

Swipe across the diagram to read its labels ↔

![ARP resolves the selected local next hop](https://deep-learning-study-room.vercel.app/cn/fig/arp.c8af39ddb3.svg)

Diagram: ARP resolves the selected local next hop. Labels: ARP resolves the selected local next hop | ARP resolves the selected local next hop | 1. Decide local destination or gateway | Compare the destination with the local prefix. | 2. Look in the ARP cache | If the next-hop mapping is missing, send a local broadcast request. | 3. Receive the mapping | The address owner normally replies with its hardware address. | 4. Build the local frame | Use that MAC for the next link; retain the final destination IP.

ARP: find the local next-hop MAC address

## Understand it step by step

1. 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.
2. Check the ARP cache. If the next-hop mapping is absent, broadcast an ARP request on the local link.
3. The owner of the requested IPv4 address normally replies with its hardware address. The sender caches the mapping and constructs its data frame.
4. 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.

#### Practical example

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.

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.

**Yaad rakho:** Remote packet ka next-hop MAC gateway ka hota hai.

---

## TEE · Q6(a) · CRC

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q6a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q6a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [10 marks]

### Answer

### Given

Data = 110101; generator bits = 1011; degree r = 3.

### To find

CRC remainder, complete transmitted frame and receiver check.

### Formula and why

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.

### Step 1. Append zeros

110101 → 110101000

### Step 2. Perform XOR division

| Leading position | Before XOR | Aligned generator | After XOR |
| --- | --- | --- | --- |
| 1 | 110101000 | 101100000 | 011001000 |
| 2 | 011001000 | 010110000 | 001111000 |
| 3 | 001111000 | 001011000 | 000100000 |
| 4 | 000100000 | 000101100 | 000001100 |
| 6 | 000001100 | 000001011 | 000000111 |

### Step 3. Build the frame

Remainder = **111**. Transmit **110101111**.

### Step 4. Divide the received frame

| Position | Before | Generator | After |
| --- | --- | --- | --- |
| 1 | 110101111 | 101100000 | 011001111 |
| 2 | 011001111 | 010110000 | 001111111 |
| 3 | 001111111 | 001011000 | 000100111 |
| 4 | 000100111 | 000101100 | 000001011 |
| 6 | 000001011 | 000001011 | 000000000 |

Receiver remainder = 000. No error is detected; this is not a guarantee that every possible corruption is detectable.

---

## TEE · Q6(b) · IPv4 /26 block

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q6b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q6b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [5 marks]

### Answer

### Given

211.15.35.40/26

### To find

First and last addresses and total block size.

### Formula and why



$$
N=2^{32-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.

### Step 1. Find host bits

32 − 26 = 6. N = 64.

### Step 2. Locate the aligned block

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.

### Step 3. Write the result

First = **211.15.35.0**; last = **211.15.35.63**; total = **64** addresses. Usual usable host range: 211.15.35.1–211.15.35.62.

---

## TEE · Q6(c) · DNS hierarchy

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q6c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q6c

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q6(c). Explain briefly the hierarchy of name servers used in DNS. [5 marks]

### Answer

The **Domain Name System (DNS)** 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.

Swipe across the diagram to read its labels ↔

![DNS namespace: full label paths are unique](https://deep-learning-study-room.vercel.app/cn/fig/tee-dns.f5345fe9fb.svg)

Diagram: DNS namespace: full label paths are unique. Labels: DNS namespace: full label paths are unique | DNS namespace: full label paths are unique | Root . | com | org | example.com | example.org | www.example.com | www.example.org | Same local label “www”; different full names, so no collision.

Root, top-level domains, delegated domain and host labels.

| Level | Example | Meaning |
| --- | --- | --- |
| Root | . | Top of the namespace |
| Top-level domain (TLD) | com, org, in | A child zone below the root |
| Registered/delegated domain | example.com | Name under a parent such as com |
| Subdomain/host label | www.example.com | A label below example.com; a name may own different record types |

## Why names remain unique

1. 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.
2. 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.
3. 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.
4. 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.

## Resolution

1. A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.
2. 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.
3. 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.

#### Practical example

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.

**Yaad rakho:** Full path unique; www label akela unique nahi.

### Worked resolution example: www.xyz.com

```
Client → recursive resolver → root (.)
                           → .com TLD
                           → authoritative server for xyz.com
Client ← final A/AAAA answer ← resolver
```

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.

---

## TEE · Q7(a) · Bellman-Ford directed graph

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q7a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q7a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [10 marks]

### Original diagram data

| From | To | Cost |
| --- | --- | --- |
| A | B | 4 |
| A | C | 3 |
| A | D | 6 |
| C | B | -1 |
| D | C | -4 |
| B | E | -1 |
| C | E | 2 |
| D | F | -2 |
| E | F | 3 |

### Answer

### Given

The original diagram is directed. All edge labels are reproduced below. Source = A.

Swipe across the diagram to read its labels ↔

![bellman 2023 original question graph](https://deep-learning-study-room.vercel.app/cn/fig/old-bellman-2023.5222c69942.svg)

Diagram: bellman 2023 original question graph. Labels: bellman 2023 original question graph | 4 | 3 | 6 | -1 | -4 | -1 | 2 | -2 | 3 | A | B | C | D | E | F

| From | To | Cost |
| --- | --- | --- |
| A | B | 4 |
| A | C | 3 |
| A | D | 6 |
| C | B | -1 |
| D | C | -4 |
| B | E | -1 |
| C | E | 2 |
| D | F | -2 |
| E | F | 3 |

### To find

Shortest distance, complete route and predecessor for every node from A.

### Formula and why



$$
d(v)\leftarrow\min(d(v),d(u)+w(u,v))
$$



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.

### Step 1. Initialize and relax

| Pass / settled node | Strict improvements | A | B | C | D | E | F |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 0 | Initial | 0 | ∞ | ∞ | ∞ | ∞ | ∞ |
| 1 | B←A: 0+(4)=4; C←A: 0+(3)=3; D←A: 0+(6)=6 | 0 | 4 | 3 | 6 | ∞ | ∞ |
| 2 | B←C: 3+(-1)=2; C←D: 6+(-4)=2; E←B: 4+(-1)=3; F←D: 6+(-2)=4 | 0 | 2 | 2 | 6 | 3 | 4 |
| 3 | B←C: 2+(-1)=1; E←B: 2+(-1)=1 | 0 | 1 | 2 | 6 | 1 | 4 |
| 4 | E←B: 1+(-1)=0 | 0 | 1 | 2 | 6 | 0 | 4 |
| 5 | F←E: 0+(3)=3 | 0 | 1 | 2 | 6 | 0 | 3 |

### Step 2. Read predecessors backwards, then reverse

| Destination | Distance | Previous | Route |
| --- | --- | --- | --- |
| A | 0 | — | A |
| B | 1 | C | A → D → C → B |
| C | 2 | D | A → D → C |
| D | 6 | A | A → D |
| E | 0 | B | A → D → C → B → E |
| F | 3 | E | A → D → C → B → E → F |

### Step 3. Check for a reachable negative cycle

| Edge | Candidate d[u] + weight | Current d[v] | Improvement? |
| --- | --- | --- | --- |
| A → B | 0 + (4) = 4 | 1 | No |
| A → C | 0 + (3) = 3 | 2 | No |
| A → D | 0 + (6) = 6 | 6 | No |
| C → B | 2 + (-1) = 1 | 1 | No |
| D → C | 6 + (-4) = 2 | 2 | No |
| B → E | 1 + (-1) = 0 | 0 | No |
| C → E | 2 + (2) = 4 | 0 | No |
| D → F | 6 + (-2) = 4 | 3 | No |
| E → F | 0 + (3) = 3 | 3 | No |

No edge improves its destination on the extra pass. Therefore no negative cycle reachable from the source is detected.

---

## TEE · Q7(b) · Congestion control

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-final--q7b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-final/q7b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q7(b). Compare and contrast the open-loop and closed-loop congestion control. Explain the mechanisms used in open-loop and closed-loop. [10 marks]

### Answer

**Congestion** 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. **Flow control** protects a receiver; congestion control protects the network.

Swipe across the diagram to read its labels ↔

![Two congestion-control approaches](https://deep-learning-study-room.vercel.app/cn/fig/tee-congestion.c27c2303bb.svg)

Diagram: Two congestion-control approaches. Labels: Two congestion-control approaches | Two congestion-control approaches | Open loop: prevent overload | Admission rules and retransmission/window/ACK policies reduce avoidable traffic before congestion | feedback. | Closed loop: observe and signal | Detect queues, loss or explicit congestion marks; return feedback toward the sender. | Change behaviour | Reduce offered load or change resource use. Receiver flow control addresses a different bottleneck.

Open-loop prevention and closed-loop feedback.

| Approach | Policy / mechanism | How it helps |
| --- | --- | --- |
| Open loop: prevent congestion without runtime congestion feedback | Retransmission policy | Carefully chosen timers/selective retransmission avoid needless extra traffic |
| Open loop | Window policy | Limit outstanding data and avoid excessive retransmission after loss |
| Open loop | Acknowledgement policy | Avoid unnecessarily frequent ACK traffic while retaining correct recovery |
| Open loop | Admission policy | Refuse new load when reserved capacity is insufficient |
| Closed loop: measure and react to congestion | Backpressure | A congested node tells upstream nodes to reduce/stop sending, possibly propagating hop by hop |
| Closed loop | Choke/control signalling | A congested node sends explicit feedback to the source |
| Closed loop | Implicit signalling | A sender infers congestion from loss/delay and changes its sending behaviour |
| Closed loop | Explicit marking | Network marks congestion (for example ECN); endpoints react to returned information |

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.

#### Practical example

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.

**Yaad rakho:** Open loop pehle prevent; closed loop feedback se react.

---

## TEE · Q1(a) · TCP versus UDP

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q1a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-reexam/q1a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q1(a). Differentiate between Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). (Any 5 points each) [5 marks]

### Answer

| Point | UDP | TCP | SCTP |
| --- | --- | --- | --- |
| Service unit | Datagram; preserves messages | Byte stream; no message boundaries | Messages carried in chunks; preserves boundaries |
| Connection setup | No protocol handshake | Connection; usual three-way SYN exchange | Association; four-message cookie exchange |
| Reliability | No delivery/order guarantee | Reliable ordered stream | Reliable messages; ordered per stream by default, unordered option |
| Ordering scope | None supplied | One ordered byte stream per direction | Multiple streams; per-stream order avoids blocking every stream on one stream’s ordering gap |
| Flow control | Not supplied by UDP | Receiver-advertised window | Receiver flow control |
| Congestion control | Not supplied by UDP | Yes | Yes |
| Multihoming | No built-in association failover | Classic TCP uses one address pair | Association can bind multiple addresses; built-in path failover |
| Header | 8 bytes | Minimum 20 bytes | 12-byte common header plus chunks |
| Typical use | DNS, real-time applications with their own controls | Web over HTTP/1.1 or HTTP/2, reliable byte transfers | Telecom signalling and multi-stream message applications |
| Performance claim | Low protocol overhead, not automatically fastest overall | Recovery/ordering have costs and benefits | Extra capabilities; no universal speed ranking |

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.

#### Practical example

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.

**Yaad rakho:** UDP messages simple; TCP byte stream; SCTP reliable message streams.

---

## TEE · Q1(b) · Guided media

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q1b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-reexam/q1b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q1(b). Describe briefly any two categories of guided transmission media. Write the advantages and disadvantages of each. [5 marks]

### Answer

**Guided media** constrain signals to a physical path: twisted pair, coaxial cable and optical fiber. **Unguided media** 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.

Swipe across the diagram to read its labels ↔

![Transmission media: guided and unguided](https://deep-learning-study-room.vercel.app/cn/fig/tee-media.aff26cd0b5.svg)

Diagram: Transmission media: guided and unguided. Labels: Transmission media: guided and unguided | Transmission media: guided and unguided | Guided: a physical path | Twisted pair: electrical pairs. Coaxial: shielded conductor. Fiber: light through a protected core. | Unguided: waves in free space | Radio, terrestrial/satellite microwave, and infrared. Range and interference depend on the system. | Campus combination | Fiber backbone + copper access links + managed wireless mobility. Security and reliability need | configuration.

Transmission media classification.

| Medium | Two key characteristics | Limitations / use |
| --- | --- | --- |
| Twisted pair | Electrical signal; pairs twisted to reduce interference | Low-cost LAN access; distance/noise limits depend on category and design |
| Coaxial cable | Shielded central conductor; greater shielding than basic unshielded pair | Bulkier; cable broadband and legacy shared LANs |
| Optical fiber | Light in glass/plastic; high capacity with immunity to electromagnetic interference | Transceivers and careful splicing/bend control needed; backbone links |
| Radio waves | Wireless propagation; many bands support broad/non-line-of-sight coverage | Interference, shared spectrum and security configuration matter; Wi-Fi/mobile |
| Terrestrial microwave | Directional antennas; typically line of sight | Alignment and obstructions matter; point-to-point backhaul |
| Satellite microwave | Wide coverage through relay in space | Cost and latency depend strongly on orbit/system; remote connectivity |
| Infrared | Short-range light; usually blocked by walls | Limited coverage; short-range indoor/remote-control links |

#### Practical example

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.

**Yaad rakho:** Guided = cable path; unguided = free-space waves.

Transmission media are classified into guided media (twisted pair, coaxial cable, optical fiber) and unguided media (radio, microwave, infrared).

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.

| Advantages | Disadvantages / design costs |
| --- | --- |
| High data capacity and low attenuation over suitable links | Optical transceivers, connectors and splicing add cost/skill requirements |
| Immune to electromagnetic interference; no electrical crosstalk | Tight bends, dirty connectors and poor installation increase loss |
| Electrical isolation between buildings | Fiber is mechanically sensitive and requires appropriate protection |
| Harder to tap casually than an unprotected radio channel | It is not automatically confidential; encryption/access control remain necessary |

#### Practical example

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.

**Yaad rakho:** Fiber light carry karta hai; immunity means no EMI, not no security risk.

### Two guided media: advantages and disadvantages

| Medium / working principle | Advantages | Disadvantages |
| --- | --- | --- |
| Twisted pair: voltage signals travel on two insulated copper conductors twisted together | Low purchase/installation cost; flexible and easy to terminate for local access | More susceptible to electromagnetic interference than fiber; distance and capacity are limited by cable category and signalling design |
| Optical fiber: light pulses travel through a core guided by its refractive-index structure | High capacity and long reach; immune to electromagnetic interference | Optical equipment and splicing can cost more; tight bends, damage and dirty connectors degrade the link |

These comparisons describe typical engineering tradeoffs, not a guarantee that every fiber installation is faster or more expensive than every copper installation.

---

## TEE · Q1(c) · CSMA persistence

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q1c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-reexam/q1c

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q1(c). Compare and contrast 1 persistent and p persistent schemes in multiple access with flow diagrams. [5 marks]

### Answer

**Definition.** Persistence specifies how a station behaves after observing that the medium is busy or becomes idle.

**Simple meaning.** 1 = turant; non = random wait; p = probability ke basis pe start.

Swipe across the diagram to read its labels ↔

![CSMA persistence: what happens after carrier sensing?](https://deep-learning-study-room.vercel.app/cn/fig/persistence.528dafcd8a.svg)

Diagram: CSMA persistence: what happens after carrier sensing?. Labels: CSMA persistence: what happens after carrier sensing? | CSMA persistence: what happens after carrier sensing? | 1-persistent | Busy: keep listening. Idle: transmit immediately. | Non-persistent | Busy: random wait, then sense again. Idle: transmit. | p-persistent | Eligible idle slot: transmit with probability p; defer with probability 1−p.

1-persistent, non-persistent and p-persistent CSMA

## Understand it step by step

1. 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.
2. 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.
3. 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.

| Rule | When idle | When busy | Trade-off |
| --- | --- | --- | --- |
| 1-persistent | Transmit immediately | Keep listening; transmit as soon as idle | Low idle delay, but waiting stations may start together |
| Non-persistent | Transmit | Wait a random time, then sense again | Less synchronized contention; may leave avoidable idle time |
| p-persistent (slotted) | Transmit with probability p; defer a slot with probability 1−p | Wait until available, then resume the probabilistic slot rule | Controls contention; needs slots and a choice of p |

#### Practical example

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.

**Yaad rakho:** 1 = start now; non = wait then listen; p = chance per idle slot.

**Definition.** CSMA with Collision Detection monitors the medium during transmission, aborts a detected collision and retries after a randomized backoff.

**Simple meaning.** CD = takkar detect hui toh transmission rok do.

Swipe across the diagram to read its labels ↔

![CSMA/CD: sender must still be sending after a round trip](https://deep-learning-study-room.vercel.app/cn/fig/collision-roundtrip.42358ec7bf.svg)

Diagram: CSMA/CD: sender must still be sending after a round trip. Labels: CSMA/CD: sender must still be sending after a round trip | CSMA/CD: sender must still be sending after a round trip | Station A | Station B | Signal travels: Tp | Collision indication returns: Tp | Worst-case timing bound: Tframe ≥ 2Tp, so Lmin ≥ 2RTp

CSMA/CD: detect a collision while transmitting

## Understand it step by step

1. Sense the channel. In traditional shared half-duplex Ethernet, begin transmission when permitted by the access rule.
2. Continue monitoring while transmitting. If a collision is detected, send the collision/jam indication and abort the current frame.
3. Choose a random delay using binary exponential backoff; then attempt again subject to the access rules.
4. The sender must still be transmitting when a worst-case collision indication returns. Hence the ideal timing requirement is Tframe ≥ 2Tp.
5. Modern switched full-duplex Ethernet links do not use collision-based CSMA/CD access. Keep the historical/shared-medium assumptions explicit.



$$
T_{\mathrm{frame}}\geq 2T_p
$$





$$
L_{\min}\geq 2RT_p
$$



#### Practical example

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.

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.

**Yaad rakho:** Detect karna hai toh sender tab tak bhej raha hona chahiye.

### Persistence decision flows

```
1-persistent:
Ready → sense → busy? yes → sense again
                      no → transmit immediately

p-persistent (slotted medium):
Ready → sense → busy? yes → wait and sense
                      no → draw random decision
                    probability p → transmit
                  probability 1−p → wait one slot → sense again
```

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.

---

## TEE · Q1(d) · Circuit versus packet switching

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q1d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-reexam/q1d

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q1(d). Distinguish between circuit switching and packet switching (Any 5 points for each) [5 marks]

### Answer

**Definition.** Switching selects how data passes through intermediate network nodes from a source to a destination.

**Simple meaning.** Raasta reserve karna, poora message ruk-ruk ke bhejna, ya chhote packets bhejna—yeh teen ideas hain.

Swipe across the diagram to read its labels ↔

![Three switching techniques: what is forwarded?](https://deep-learning-study-room.vercel.app/cn/fig/switching.2b51f856d9.svg)

Diagram: Three switching techniques: what is forwarded?. Labels: Three switching techniques: what is forwarded? | Three switching techniques: what is forwarded? | 1. Circuit: reserve a path, then stream data | Setup → reserved capacity → data transfer → release. | 2. Message: store the entire message at each node | Large forwarding unit; no packet-level pipeline. | 3. Packet: divide, then forward packet by packet | Shared links can simultaneously carry different packets.

Circuit, message and packet switching

## Understand it step by step

1. **Circuit switching:** establish a circuit, reserve resources, transfer data, then release the circuit. Capacity is dedicated even during a silent period.
2. **Message switching:** each intermediate node receives the entire message before forwarding it. Large messages require large buffers and can delay later messages.
3. **Packet switching:** divide data into smaller packets. Nodes forward packets individually; different links can carry successive packets at the same time.
4. 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.

| Aspect | Circuit switching | Message switching | Packet switching |
| --- | --- | --- | --- |
| Unit handled | Continuous stream on established circuit | Whole message | Small packets |
| Resource use | Capacity reserved along a circuit | Shared; message stored at each intermediate node | Shared; each packet stored/forwarded in this model |
| Setup | Required before data transfer | No circuit setup required | Datagram: no connection setup; virtual circuit: setup |
| Delay | Setup delay, then relatively predictable service | Large store-and-forward delay for long messages | Variable delay; packet pipeline can reduce completion time |
| Main limitation | Reserved capacity can be idle | Large buffers; unsuitable for tight delay needs | Headers, possible queueing/loss; datagrams may reorder |

#### Practical example

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.

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.

**Yaad rakho:** Circuit reserves; message waits whole; packets pipeline.

### Two advantages and two disadvantages

| Method | Advantage 1 | Advantage 2 | Disadvantage 1 | Disadvantage 2 |
| --- | --- | --- | --- | --- |
| Message switching | Shares link capacity without a permanently reserved circuit | Intermediate storage lets a message wait for a currently busy outgoing link | The entire message must arrive before forwarding, giving long delay | Large messages require large buffers and can hold up other messages |
| Packet switching | Statistical sharing suits bursty data from many users | Packets can be pipelined across successive links, reducing completion time | Every packet needs header/control overhead | Queueing, loss and (for datagrams) reordering need endpoint or network handling |

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.

---

## TEE · Q2(a) · QoS and scheduling

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q2a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-reexam/q2a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [10 marks]

### Answer

**Quality of Service (QoS)** 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.

| Technique | Mechanism | Tradeoff |
| --- | --- | --- |
| Scheduling | FIFO, priority or fair/weighted queues choose which packet transmits next | Strict priority may starve lower classes; fair scheduling balances shares |
| Traffic shaping | Delay departures to match a profile | Smooths load but adds queueing delay |
| Policing | Measure compliance; mark/drop nonconforming packets according to policy | Controls excess traffic but can lose packets |
| Admission control | Accept new flows only when resources can support them | Protects existing service by refusing excess demand |
| Resource allocation/reservation | Assign bandwidth/buffer/service resources | Requires capacity planning and coordination |
| Classification/marking | Identify traffic classes and carry service markings | Marking alone does not create capacity or guarantees |

#### Practical example

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.

**Yaad rakho:** Bandwidth, delay, jitter, loss; requirement ke hisaab se policy.

### Scheduling diagrams

```
FIFO:      arrivals → [one queue] → link
Priority:  high → [queue H] ─┐
           low  → [queue L] ─┴→ choose H first → link
Weighted fair: Q1, Q2, Q3 → scheduler shares 1:2:1 → link
```

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.

---

## TEE · Q2(b) · Slotted ALOHA rates

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q2b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-reexam/q2b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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 [10 marks]

### Answer

### Given

Frame length L = 150 bits; link rate R = 400,000 bit/s; attempted rates λ = 800, 400 frames/s.

### To find

Normalized throughput S and successful frames per second for each offered load.

### Formula and why



$$
T_f=L/R,\quad G=\lambda T_f,\quad S=Ge^{-G},\quad \lambda_{success}=S/T_f=\lambda e^{-G}
$$



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.

### Step 1. Convert the link rate and compute frame time

Tf = 150/400000 = 0.000375 s. Capacity = 1/Tf = 2666.66667 frames/s.

### Step 2. Offered rate 800 frames/s

G = 800 × 0.000375 = 0.3.

e−1G = e−0.3 = 0.740818221.

S = 0.3 × 0.740818221 = **0.222245466**.

Successful frames/s = 800 × 0.740818221 = **592.654577**. Successful bit/s = 592.654577 × 150 = 88898.1865.

### Step 3. Offered rate 400 frames/s

G = 400 × 0.000375 = 0.15.

e−1G = e−0.15 = 0.860707976.

S = 0.15 × 0.860707976 = **0.129106196**.

Successful frames/s = 400 × 0.860707976 = **344.283191**. Successful bit/s = 344.283191 × 150 = 51642.4786.

---

## TEE · Q3(a) · CSMA/CA

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q3a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-reexam/q3a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q3(a). Describe the working of CSMA/CA with the help of flow diagram. [10 marks]

### Answer

**Definition.** 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.

**Simple meaning.** CA = pehle collision avoid karne ki koshish; guarantee nahi.

Swipe across the diagram to read its labels ↔

![CSMA/CA: optional reservation, data, acknowledgement](https://deep-learning-study-room.vercel.app/cn/fig/ca-sequence.566280e50f.svg)

Diagram: CSMA/CA: optional reservation, data, acknowledgement. Labels: CSMA/CA: optional reservation, data, acknowledgement | CSMA/CA: optional reservation, data, acknowledgement | Sender | Receiver | RTS (optional reservation) | CTS | DATA | ACK | Before data access: carrier sensing and a random backoff. | A busy medium freezes the eligible backoff countdown.

CSMA/CA: reduce collision risk before sending

## Understand it step by step

1. A wireless station senses the medium and follows the required interframe waiting and contention rules.
2. 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.
3. When its counter reaches zero, it transmits. A unicast receiver normally sends an ACK after successful reception. Missing ACK triggers retry logic.
4. 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.
5. Wireless stations cannot generally rely on Ethernet-style collision detection while transmitting. Collision avoidance does not eliminate all losses or collisions.

#### Practical example

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.

| Aspect | CSMA/CD | CSMA/CA |
| --- | --- | --- |
| Main action | Detect and abort a collision during sending | Reduce collision risk before sending |
| Typical teaching context | Shared half-duplex wired Ethernet | Wi-Fi contention access |
| Mechanisms | Carrier sensing, detection/jam, backoff | Carrier sensing, random backoff, ACK; optional RTS/CTS |

**Yaad rakho:** CD = detect during; CA = avoid before.

**Definition.** Hidden terminals are stations that cannot sense each other but whose transmissions can interfere at a common receiver.

**Simple meaning.** A aur C ek dusre ko nahi sunte, par dono B ko bhej rahe hain.

Swipe across the diagram to read its labels ↔

![Hidden terminals: A and C cannot sense each other](https://deep-learning-study-room.vercel.app/cn/fig/hidden-terminal.1ffcf794d5.svg)

Diagram: Hidden terminals: A and C cannot sense each other. Labels: Hidden terminals: A and C cannot sense each other | Hidden terminals: A and C cannot sense each other | A | B | C | Common receiver B hears both | B’s CTS can make a hidden sender defer. Collisions remain possible.

Hidden terminals and RTS/CTS

## Understand it step by step

1. Suppose A and C are outside each other’s sensing range, but B can receive both.
2. A senses no signal from C and may transmit; C may make the same decision. Their frames can collide at B.
3. 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.
4. RTS frames can themselves collide and wireless conditions still matter. Describe RTS/CTS as mitigation, not an absolute guarantee.

#### Practical example

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.

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.

**Yaad rakho:** Hidden: senders invisible to each other, receiver common.

### CSMA/CA flow diagram

```
Frame ready → sense medium
Busy? yes → defer until eligible idle interval
          ↓
Choose a random backoff → count down eligible idle slots
Medium becomes busy? → freeze counter; resume after required idle wait
          ↓ counter reaches zero
Optional RTS → CTS received? no → retry/back off
          ↓ yes (or RTS/CTS not used)
Send DATA → ACK received? yes → success
                        no → retry/back off or fail at retry limit
```

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.

---

## TEE · Q3(b) · RIP and timers

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q3b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-reexam/q3b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q3(b). Explain in detail the working of Routing Information Protocol (RIP). List and briefly explain the timers used in RIP. [10 marks]

### Answer

**Definition.** Routing Information Protocol (RIP) is an interior distance-vector routing protocol that uses a bounded metric, commonly hop count, to select routes.

**Simple meaning.** RIP mein hops count; 15 tak reachable, 16 means unreachable.

## Understand it step by step

1. RIPv2 uses distance-vector updates and carries subnet-mask information, allowing classless routes.
2. 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.
3. 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.
4. 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.

#### Practical example

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.

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.

**Yaad rakho:** RIP: neighbour distances; 16 is infinity.

### RIPv2 timer roles

| Timer | Usual RFC value | Action |
| --- | --- | --- |
| Periodic update | Approximately 30 seconds, with randomized variation | Send routing information to neighbours |
| Route timeout | 180 seconds without a valid refresh | Declare the route invalid and set metric 16 |
| Garbage collection | 120 seconds after invalidation | Keep advertising the unreachable route before deleting it |

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.

---

## TEE · Q4(a) · TCP lifecycle

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q4a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-reexam/q4a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q4(a). Illustrate with suitable diagrams the TCP connection establishment and termination. Describe the steps involved in each case. [10 marks]

### Answer

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.

Swipe across the diagram to read its labels ↔

![TCP: handshake, data and orderly close](https://deep-learning-study-room.vercel.app/cn/fig/tee-handshake.e053246177.svg)

Diagram: TCP: handshake, data and orderly close. Labels: TCP: handshake, data and orderly close | TCP: handshake, data and orderly close | Client | Server | SYN Seq=1000 | SYN+ACK Seq=5000, Ack=1001 | ACK Seq=1001, Ack=5001 | 200 data bytes: Seq=1001, last=1200 | ACK=1201 (next expected byte) | FIN Seq=1201 | ACK=1202; server may still send | FIN Seq=5001 (no server data here) | ACK=5002; common active-close TIME-WAIT | Pure ACK uses no sequence space. SYN and FIN each use one.

SYN and FIN each consume one sequence number; pure ACK consumes none.

| Step | Segment | Meaning |
| --- | --- | --- |
| 1 Client → server | SYN, Seq=1000 | Client proposes its starting sequence |
| 2 Server → client | SYN+ACK, Seq=5000, Ack=1001 | Server acknowledges client SYN and supplies its own start |
| 3 Client → server | ACK, Seq=1001, Ack=5001 | Client acknowledges server SYN; connection is established |

## Data transfer

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.

## Orderly termination

1. Assume client’s next data sequence is 1201. It sends FIN with Seq=1201, meaning it has finished sending.
2. Server sends ACK=1202. The connection is half closed: the server can still send data until its application finishes.
3. Assume server has sent no data since the handshake. It sends FIN with Seq=5001.
4. 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.
5. 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.

#### Practical example

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.

**Yaad rakho:** SYN plus one, FIN plus one; ACK next expected byte.

---

## TEE · Q4(b) · DNS resolution

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q4b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-reexam/q4b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q4(b). Explain in detail the steps involved in mapping www.xyz.com (domain name) to the corresponding IP address using DNS. [10 marks]

### Answer

The **Domain Name System (DNS)** 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.

Swipe across the diagram to read its labels ↔

![DNS namespace: full label paths are unique](https://deep-learning-study-room.vercel.app/cn/fig/tee-dns.f5345fe9fb.svg)

Diagram: DNS namespace: full label paths are unique. Labels: DNS namespace: full label paths are unique | DNS namespace: full label paths are unique | Root . | com | org | example.com | example.org | www.example.com | www.example.org | Same local label “www”; different full names, so no collision.

Root, top-level domains, delegated domain and host labels.

| Level | Example | Meaning |
| --- | --- | --- |
| Root | . | Top of the namespace |
| Top-level domain (TLD) | com, org, in | A child zone below the root |
| Registered/delegated domain | example.com | Name under a parent such as com |
| Subdomain/host label | www.example.com | A label below example.com; a name may own different record types |

## Why names remain unique

1. 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.
2. 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.
3. 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.
4. 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.

## Resolution

1. A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.
2. 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.
3. 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.

#### Practical example

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.

**Yaad rakho:** Full path unique; www label akela unique nahi.

### Worked resolution example: www.xyz.com

```
Client → recursive resolver → root (.)
                           → .com TLD
                           → authoritative server for xyz.com
Client ← final A/AAAA answer ← resolver
```

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.

---

## TEE · Q5(a) · Go-Back-N scenarios

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q5a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-reexam/q5a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q5(a). Illustrate the working of Go-Back N ARQ with the help of frame transmission scenarios. Give any one advantage and disadvantage. [10 marks]

### Answer

**Go-Back-N (GBN) ARQ** pipelines up to W outstanding frames. For m-bit sequence numbers, textbook GBN uses W ≤ 2m−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”.

Swipe across the diagram to read its labels ↔

![GBN W=7: loss and cumulative ACKs](https://deep-learning-study-room.vercel.app/cn/fig/tee-gbn.5f577a6979.svg)

Diagram: GBN W=7: loss and cumulative ACKs. Labels: GBN W=7: loss and cumulative ACKs | GBN W=7: loss and cumulative ACKs | Sender | Receiver | Frames 0,1 → accept in order | ACK 2: next expected is 2 | Frame 2 lost | Frames 3,4,5,6 → discard out of order | ACK 2 repeated | Timer for 2 expires: resend 2,3,4,5,6 | ACK 7: frames through 6 accepted | Receiver window = [2] while waiting; no out-of-order buffering. | Sender retains all unacknowledged frames from base 2 onward.

GBN example: frame 2 lost; frames 3–6 discarded; timeout resends 2–6.

1. 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.
2. Normal: after receiving 0 and 1, cumulative ACK 2 advances the sender base to 2. The sender can fill newly opened window slots.
3. 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.
4. 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.
5. 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.

#### Practical example

With W=7, loss of frame 2 can waste successful receptions of 3…6. GBN trades simple receiver buffering for extra retransmission after loss.

Swipe across the diagram to read its labels ↔

![GBN W=7: normal window movement](https://deep-learning-study-room.vercel.app/cn/fig/tee-gbn-normal.144a24ea80.svg)

Diagram: GBN W=7: normal window movement. Labels: GBN W=7: normal window movement | GBN W=7: normal window movement | Sender | Receiver | Frame 0 from sender window [0…6] | ACK 1 → sender window [1…7] | Frame 1 arrives; receiver now expects 2 | ACK 2 → sender window [2…7,0] | Receiver window progresses [0] → [1] → [2]. | Sequence labels wrap modulo 8; sender window contains 7 slots.

Normal transmission: both windows advance as frames are cumulatively acknowledged.

Swipe across the diagram to read its labels ↔

![GBN: a later cumulative ACK covers a lost ACK](https://deep-learning-study-room.vercel.app/cn/fig/tee-gbn-ack.713dc9972e.svg)

Diagram: GBN: a later cumulative ACK covers a lost ACK. Labels: GBN: a later cumulative ACK covers a lost ACK | GBN: a later cumulative ACK covers a lost ACK | Sender | Receiver | Frame 0 accepted; receiver expects 1 | ACK 1 is lost | Frame 1 accepted; receiver expects 2 | ACK 2 arrives before timeout | Sender advances base to 2; continues | ACK 2 confirms frames 0 and 1; no retransmission needed. | Without a later useful ACK, oldest-frame timeout triggers resend.

A later cumulative ACK can cover an earlier lost ACK.

**Yaad rakho:** GBN receiver one; gap ke baad discard; timeout pe outstanding suffix repeat.

### One advantage and one disadvantage

**Advantage:** pipelining improves utilization over Stop-and-Wait while retaining a simple one-frame receiver window. **Disadvantage:** after a gap, the receiver discards later frames, so a timeout can force retransmission of several frames that arrived correctly.

---

## TEE · Q5(b) · FTP connections

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q5b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-reexam/q5b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q5(b). Distinguish between communication over control connection and communication over data connection in FTP. [5 marks]

### Answer

**File Transfer Protocol (FTP)** 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.

Swipe across the diagram to read its labels ↔

![FTP: separate control and data connections](https://deep-learning-study-room.vercel.app/cn/fig/tee-ftp.1b305fa997.svg)

Diagram: FTP: separate control and data connections. Labels: FTP: separate control and data connections | FTP: separate control and data connections | Client → server TCP port 21 | Control: USER, PASS, CWD, TYPE, RETR/STOR/LIST, QUIT; server replies. | Active mode: server initiates data | Client provides a listening endpoint; traditional server data source port is 20. | Passive mode: client initiates data | Server advertises an endpoint; client connects to that selected port. | Data connection carries file/listing bytes | Command channel stays separate; another operation can open another data connection.

Control connection on server port 21; active/passive data connection roles differ.

| Connection | Function | Lifetime / ports |
| --- | --- | --- |
| Control | Commands and replies: USER, PASS, CWD, TYPE, LIST, RETR, STOR, QUIT | Client connects to server TCP port 21; normally kept for the session |
| Data | File contents and directory listing data | Opened as needed; separate from command channel |

## How a transfer works

1. Client opens the control connection and exchanges server greeting, login commands and replies. Plain FTP sends credentials/data without encryption.
2. Client chooses transfer settings such as binary/image mode for arbitrary bytes, and requests the needed working directory/operation.
3. In **active FTP**, the client provides a listening endpoint and the server initiates the data connection, traditionally from server port 20.
4. In **passive FTP**, 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.
5. 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.
6. QUIT ends the control session.

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.

#### Practical example

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.

**Yaad rakho:** Control commands, data file; passive mein client dono connect karta.

---

## TEE · Q5(c) · DHCP dynamic allocation

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q5c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-reexam/q5c

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q5(c). Explain the working of DHCP protocol highlighting dynamic IP address allocation. [5 marks]

### Answer

**Definition.** Dynamic Host Configuration Protocol (DHCP) provides IP configuration parameters to clients and can lease reusable addresses for limited periods.

**Simple meaning.** DORA = Discover, Offer, Request, Acknowledge.

Swipe across the diagram to read its labels ↔

![DHCP initial allocation: DORA](https://deep-learning-study-room.vercel.app/cn/fig/dhcp.510e8eca42.svg)

Diagram: DHCP initial allocation: DORA. Labels: DHCP initial allocation: DORA | DHCP initial allocation: DORA | Client | Server | DISCOVER | OFFER | REQUEST | ACK | Client asks → server offers → client chooses → server confirms.

DHCP: automatic configuration through DORA

## Understand it step by step

1. **Discover:** a new client looks for DHCP servers. With no configured IPv4 address, it commonly starts from 0.0.0.0 and uses broadcast discovery.
2. **Offer:** a server offers an address and configuration, such as subnet mask, lease information and other options.
3. **Request:** the client indicates the selected offer and requested address. In initial allocation this also informs other servers of its choice.
4. **Acknowledge:** the selected server confirms the lease/configuration. The client can then use the address after the required checks.
5. 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.

#### Practical example

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.

1. DHCPDISCOVER: client searches for a server.
2. DHCPOFFER: server proposes an address/configuration.
3. DHCPREQUEST: client requests the chosen allocation.
4. DHCPACK: server confirms the lease.

DHCP reduces manual configuration and supports controlled address reuse through leases.

**Yaad rakho:** Discover–Offer–Request–ACK; pehle D, phir O, phir R, phir A.

---

## TEE · Q6(a) · VLSM and noncanonical block address

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q6a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-reexam/q6a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [10 marks]

### Answer

**Source note:** 190.20.10.0 is inside 190.20.0.0/16, not the network address. Solution must disclose canonical network interpretation.

### Given

190.20.10.0/16; Group 1: 128 customers × 256 addresses; Group 2: 128 customers × 128 addresses

**Source correction/assumption:** 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.

### To find

Each customer prefix, every group range, first/last customer blocks, and unallocated addresses.

### Formula and why



$$
p=32-\log_2(\text{addresses per customer}),\quad A_{group}=n\times A_{customer}
$$



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.

### Step 1. Compute sizes and allocate consecutive aligned customer blocks

| Group | Customers | Addresses each | Customer prefix | Used | Group range |
| --- | --- | --- | --- | --- | --- |
| 1 | 128 | 256 | /24 | 32768 | 190.20.0.0–190.20.127.255 |
| 2 | 128 | 128 | /25 | 16384 | 190.20.128.0–190.20.191.255 |

### Step 2. State first and last customer ranges

| Group | First customer | Last customer |
| --- | --- | --- |
| 1 | 190.20.0.0–190.20.0.255 | 190.20.127.0–190.20.127.255 |
| 2 | 190.20.128.0–190.20.128.127 | 190.20.191.128–190.20.191.255 |

### Step 3. Count the unused addresses

Allocated = 32768 + 16384 = 49152. Unused = 65536 − 49152 = **16384**.

Unused range: 190.20.192.0–190.20.255.255.

---

## TEE · Q6(b) · SMTP

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q6b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-reexam/q6b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q6(b). Illustrate how SMTP is used in sending email. Briefly explain. [5 marks]

### Answer

**Simple Mail Transfer Protocol (SMTP)** 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.

Swipe across the diagram to read its labels ↔

![SMTP: envelope, message and completion](https://deep-learning-study-room.vercel.app/cn/fig/tee-smtp.c6f99877c4.svg)

Diagram: SMTP: envelope, message and completion. Labels: SMTP: envelope, message and completion | SMTP: envelope, message and completion | SMTP sender | Receiving server | 220 greeting | EHLO sender.example | 250 capabilities | MAIL FROM:<sender@example.com> | RCPT TO:<receiver@example.org> | DATA (after successful envelope replies) | 354 start mail input | Headers + blank line + body + dot line | 250 accepted; then QUIT / server 221 | SMTP submits/relays. Inbox reading uses IMAP/POP or webmail. | Envelope MAIL/RCPT differs from visible From/To headers.

Submission/relay use SMTP; reading an inbox uses a separate access protocol.

| Phase | Typical exchange | Purpose |
| --- | --- | --- |
| Connection and greeting | Server 220; client EHLO (HELO for basic SMTP); server 250 capabilities | Identify peers and learn supported extensions |
| Envelope transfer | MAIL FROM:<sender>; RCPT TO:<recipient>; 250 replies | Declare return path and one or more delivery recipients |
| Message transfer | DATA; server 354; headers + blank line + body; single dot line; server 250 | Transmit the message after server permission; completion reply accepts responsibility |
| Termination | QUIT; server 221 | Close the SMTP session cleanly |

## Message flow and important details

1. 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.
2. The sending server resolves the recipient domain’s MX records, connects to an appropriate mail server and carries out the SMTP exchange.
3. MAIL FROM and RCPT TO are the **envelope**; visible From/To headers inside DATA are message content and can differ. Multiple RCPT TO commands can name several recipients.
4. 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.
5. 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.
6. The recipient reads stored mail using an access protocol such as IMAP/POP3 or webmail. SMTP is not the mailbox-retrieval protocol.

#### Practical example

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.

**Yaad rakho:** SMTP send/relay; inbox read IMAP/POP/webmail.

### The three phases requested in the paper

| Phase | Commands / replies | Meaning |
| --- | --- | --- |
| 1. Connection establishment | TCP connection; 220 greeting; EHLO/HELO; 250 reply | Open the connection and identify the SMTP peers |
| 2. Mail transfer | MAIL FROM, RCPT TO, DATA; 354; message; single dot; 250 | Transfer the envelope and then the message content |
| 3. Connection termination | QUIT; 221; close TCP | Finish the SMTP session |

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.

---

## TEE · Q6(c) · TCP/IP layers

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q6c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-reexam/q6c

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q6(c). Explain briefly the functionalities of layers of TCP/IP protocol suite. [5 marks]

### Answer

The **TCP/IP model** 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.

Swipe across the diagram to read its labels ↔

![OSI layers mapped to the four-layer TCP/IP model](https://deep-learning-study-room.vercel.app/cn/fig/tee-models.5bff0518c8.svg)

Diagram: OSI layers mapped to the four-layer TCP/IP model. Labels: OSI layers mapped to the four-layer TCP/IP model | OSI layers mapped to the four-layer TCP/IP model | 7 Application | 6 Presentation | 5 Session | 4 Transport | 3 Network | 2 Data link | 1 Physical | Application | HTTP, DNS, FTP, SMTP | Transport | Internet | Link / network access | Includes physical access | Some textbooks split link into data link + physical: five layers.

Four TCP/IP layers; the link layer includes the physical medium.

| TCP/IP layer | Function | Examples |
| --- | --- | --- |
| Application | Defines application message formats and exchanges for Web access, naming, email and file transfer; includes presentation/session functions as needed | HTTP, DNS, SMTP, FTP |
| Transport | End-to-end process communication | TCP, UDP, SCTP |
| Internet | IP addressing, routing and best-effort datagrams | IPv4/IPv6 |
| Link/network access | Local delivery and physical access | Ethernet/Wi-Fi and their medium |

| Point | OSI | TCP/IP |
| --- | --- | --- |
| Layer count | Seven | Four here; five-layer teaching variant splits link |
| Upper functions | Application, presentation, session separated | Grouped under application |
| Lower functions | Data link and physical separated | Grouped under link/network access |
| Purpose | General reference architecture | Architecture of deployed Internet protocol family |
| Network service | Reference model can describe different services | Internet layer uses connectionless IP |
| Transport | Conceptual transport service | TCP reliable byte stream; UDP datagrams; SCTP messages |

#### Practical example

An application can use UDP without changing the IP or Ethernet layers. Layering lets one protocol vary without redesigning every network function.

**Yaad rakho:** OSI 7; TCP/IP four mein upper three merge, lower two merge.

### Internet and transport protocols

| Layer | Protocol | Role |
| --- | --- | --- |
| Internet | IPv4 / IPv6 | Address and deliver best-effort packets across networks |
| Internet | ICMP / ICMPv6 | Report selected IP errors and operational information; used by diagnostic exchanges |
| Transport | TCP | Reliable, ordered byte stream with connection establishment, flow and congestion control |
| Transport | UDP | Connectionless message delivery using ports, without built-in retransmission or ordering |
| Transport | SCTP | Reliable message-oriented association with multiple streams and multihoming support |

---

## TEE · Q7(a) · Dijkstra graph

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q7a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-reexam/q7a

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [10 marks]

### Original diagram data

| From | To | Cost |
| --- | --- | --- |
| A | B | 3 |
| A | C | 5 |
| B | C | 9 |
| B | D | 8 |
| B | E | 6 |
| C | E | 3 |
| D | E | 10 |
| D | F | 3 |
| E | F | 5 |

### Answer

### Given

The original diagram is undirected. All edge labels are reproduced below. Source = A.

Swipe across the diagram to read its labels ↔

![dijkstra 2024 original question graph](https://deep-learning-study-room.vercel.app/cn/fig/old-dijkstra-2024.b1cf42a96f.svg)

Diagram: dijkstra 2024 original question graph. Labels: dijkstra 2024 original question graph | 3 | 5 | 9 | 8 | 6 | 3 | 10 | 3 | 5 | A | B | C | D | E | F

| From | To | Cost |
| --- | --- | --- |
| A | B | 3 |
| A | C | 5 |
| B | C | 9 |
| B | D | 8 |
| B | E | 6 |
| C | E | 3 |
| D | E | 10 |
| D | F | 3 |
| E | F | 5 |

### To find

Shortest distance, complete route and predecessor for every node from A.

### Formula and why



$$
d(v)\leftarrow\min(d(v),d(u)+w(u,v))
$$



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.

### Step 1. Initialize and relax

| Pass / settled node | Strict improvements | A | B | C | D | E | F |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 0 | Initial | 0 | ∞ | ∞ | ∞ | ∞ | ∞ |
| A | B←A: 0+3=3; C←A: 0+5=5 | 0 | 3 | 5 | ∞ | ∞ | ∞ |
| B | D←B: 3+8=11; E←B: 3+6=9 | 0 | 3 | 5 | 11 | 9 | ∞ |
| C | E←C: 5+3=8 | 0 | 3 | 5 | 11 | 8 | ∞ |
| E | F←E: 8+5=13 | 0 | 3 | 5 | 11 | 8 | 13 |
| D | No change | 0 | 3 | 5 | 11 | 8 | 13 |
| F | No change | 0 | 3 | 5 | 11 | 8 | 13 |

### Step 2. Read predecessors backwards, then reverse

| Destination | Distance | Previous | Route |
| --- | --- | --- | --- |
| A | 0 | — | A |
| B | 3 | A | A → B |
| C | 5 | A | A → C |
| D | 11 | B | A → B → D |
| E | 8 | C | A → C → E |
| F | 13 | E | A → C → E → F |

A tie between two equally short paths is valid; this table retains the first predecessor on equal distances.

---

## TEE · Q7(b) · Four network topologies

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-reexam--q7b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-reexam/q7b

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per 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. [10 marks]

### Answer

**Topology** 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.

Swipe across the diagram to read its labels ↔

![Four physical network topologies](https://deep-learning-study-room.vercel.app/cn/fig/tee-topologies.d9e18f041b.svg)

Diagram: Four physical network topologies. Labels: Four physical network topologies | Four physical network topologies | Star | Bus | Ring | Full mesh: 4 nodes, 6 links | S | Links show arrangement. Actual access rules are a separate concept.

Star, bus, ring and full mesh; edges depict physical connections.

| Topology | Structure | Benefit | Limitation |
| --- | --- | --- | --- |
| Bus | Devices share a common backbone | Simple small shared-medium layout | Backbone fault affects segment; collisions possible on classic shared bus |
| Star | Each device connects to a central switch/hub | Easy expansion and fault isolation | Central-device failure affects star; more cabling |
| Ring | Each node connected to two neighbours in a ring | Structured traversal; token-based variants coordinate access | Simple single-ring break can disrupt operation unless protected |
| Full mesh | Every pair has a direct link | Redundant paths and direct connectivity | Expensive ports/cabling: n(n−1)/2 undirected links |
| Tree/hybrid | Hierarchical stars or combined topologies | Scales into buildings/floors | Upper-level faults affect dependent branches |

#### Practical example

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.

**Yaad rakho:** Layout draw karo, then one strength and one failure case.

### Two advantages and two disadvantages of each topology

| Topology / example | Advantage 1 | Advantage 2 | Disadvantage 1 | Disadvantage 2 |
| --- | --- | --- | --- | --- |
| Star: switched computer laboratory | A device can be added on a spare central port without rebuilding the whole topology | A single access-cable fault normally isolates only its attached device | Central-switch failure affects all attached devices unless redundant | A separate cable and switch port are needed per device |
| Bus: legacy coaxial Ethernet | Uses little cable in a small linear layout | No central switch is required in the simple shared-bus design | A backbone fault can disable the segment | Shared bandwidth, contention and fault diagnosis become difficult as it grows |
| Ring: token-based ring | Controlled token access avoids data collisions among compliant stations | Token rotation gives stations an organized opportunity to transmit | A break can interrupt an unprotected single ring | Adding/removing a node can disrupt a simple ring |
| Mesh: redundant router backbone | Alternate links preserve connectivity after some link failures | Direct pairwise links can carry separate exchanges without a shared central bottleneck | A full mesh needs n(n−1)/2 links and many ports | Configuration, cabling and maintenance become complex |

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.

---

## TEE · Q1(a) · Subnetting and masks

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q1a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-ai-partial/q1a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q1(a). What is subnetting? Explain subnetting and default subnet masks. [5 marks]

### Answer

**Definition.** 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.

**Simple meaning.** Pehle block nikalo; phir first aur last. Uske baad hosts.

Swipe across the diagram to read its labels ↔

![A /24 split into four /26 blocks](https://deep-learning-study-room.vercel.app/cn/fig/subnet-blocks.67a24f46fc.svg)

Diagram: A /24 split into four /26 blocks. Labels: A /24 split into four /26 blocks | A /24 split into four /26 blocks | 1. /26 | First: .0 Last: .63 | Usable: .1 to .62 | 2. /26 | First: .64 Last: .127 | Usable: .65 to .126 | 3. /26 | First: .128 Last: .191 | Usable: .129 to .190 | 4. /26 | First: .192 Last: .255 | Usable: .193 to .254 | Each block: 64 total addresses; 62 ordinary usable hosts. | An address ending in .77 belongs to the .64–.127 block.

One method for every ordinary IPv4 block question

## Understand it step by step

1. Read /p. Host bits h=32−p. Total addresses N=2ʰ, not N−2.
2. Build the mask. Find the first octet that is not 255; block step there is 256−that mask octet.
3. Round that address octet down to a multiple of the step. Preserve preceding octets and set later octets to 0 for the network address.
4. 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.
5. 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.



$$
N=2^{32-p}
$$





$$
\text{block step}=256-\text{changing mask octet}
$$





$$
\text{ordinary usable hosts}=2^h-2
$$



#### Practical example

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.

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.

**Yaad rakho:** Total mein sab count; usable mein boundary ke 2 minus.

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.

| Class | First octet | Default mask | Network / host split | Purpose |
| --- | --- | --- | --- | --- |
| A | 1–126 (ordinary unicast) | 255.0.0.0 (/8) | 8 / 24 bits | Large historical unicast networks; 0 and 127 reserved |
| B | 128–191 | 255.255.0.0 (/16) | 16 / 16 bits | Medium historical unicast networks |
| C | 192–223 | 255.255.255.0 (/24) | 24 / 8 bits | Small historical unicast networks |
| D | 224–239 | No unicast default mask | Not network/host class split | Multicast |
| E | 240–255 | No unicast default mask | Not normal unicast allocation | Reserved/experimental; special addresses exist |

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.

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.

---

## TEE · Q1(b) · Shared bottleneck throughput

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q1b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-ai-partial/q1b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

### Given

4 flows, server links 400 Mbps, client links 300 Mbps, shared link 1000 Mbps.

### To find

Maximum throughput of each flow.

### Formula and why



$$
T=\min(R_s,R_c,R/n)
$$



A flow cannot exceed any link on its path; fair sharing divides the common capacity among n active flows.

### Solution

### Step 1. Convert and divide the shared capacity

1000 Mbps ÷ 4 = 250 Mbps per flow.

### Step 2. Take the smallest per-flow capacity

T=min(400,300,250)=**250 Mbps**.

Total delivered rate=4×250=1000 Mbps.

---

## TEE · Q1(c) · HTTP/1.0 delay

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q1c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-ai-partial/q1c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

### Given

Known IP; new initial TCP connection; zero GET transmission; each object transmission=0.5 RTT.

### To find

Time to obtain both the base HTML and its referenced JPEG.

### Formula and why



$$
T_{object}=T_{setup}+RTT+T_{transmission}
$$



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.

### Solution

### Step 1. Download base HTML

1 RTT for TCP setup + 1 RTT for GET/first response bit + 0.5 RTT to transmit = **2.5 RTT**.

### Step 2. Download referenced JPEG

1 RTT for another TCP setup + 1 RTT for GET/response + 0.5 RTT transmission = 2.5 RTT.

### Step 3. Add sequential delays

**Total = 2.5+2.5=5 RTT**. DNS adds zero here because the IP address is already known.

---

## TEE · Q1(d) · Cryptographic hash versus checksum

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q1d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-ai-partial/q1d

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q1(d). How does a cryptographic hash differ from a checksum? [5 marks]

### Answer

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.

---

## TEE · Q2(a) · Hamming error correction

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q2a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-ai-partial/q2a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Answer

### Given

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.

### To find

Syndrome, erroneous position, and corrected word.

### Formula and why



$$
s_p=\bigoplus_{i\,\&\,p\ne0}b_i,\quad \text{error position}=4s_4+2s_2+s_1
$$



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.

### Solution

### Step 1. Label every received bit

| Position | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Received bit | 1 | 0 | 1 | 1 | 0 | 1 | 1 |

### Step 2. Evaluate the three parity groups

| Parity | Covered positions | Bits added | Sum | Sum mod 2 |
| --- | --- | --- | --- | --- |
| 1 | 1, 3, 5, 7 | 1 + 0 + 1 + 1 | 3 | 1 |
| 2 | 2, 3, 6, 7 | 1 + 0 + 0 + 1 | 2 | 0 |
| 4 | 4, 5, 6, 7 | 1 + 1 + 0 + 1 | 3 | 1 |

### Step 3. Read the syndrome as a binary position

Syndrome s4s2s1 = 101; decimal = 5. Under the single-bit-error assumption, flip position 5 from the right. **Corrected word = 1001011**.

### Step 4. State the assumption

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.

---

## TEE · Q2(b) · CRC encoding

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q2b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-ai-partial/q2b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q2(b). Given message 1011011010 and generator G(x) = x³ + x + 1, calculate the CRC code and transmission message. [5 marks]

### Answer

### Given

Data = 1011011010; generator bits = 1011; degree r = 3.

### To find

CRC remainder, complete transmitted frame and receiver check.

### Formula and why

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.

### Step 1. Append zeros

1011011010 → 1011011010000

### Step 2. Perform XOR division

| Leading position | Before XOR | Aligned generator | After XOR |
| --- | --- | --- | --- |
| 1 | 1011011010000 | 1011000000000 | 0000011010000 |
| 6 | 0000011010000 | 0000010110000 | 0000001100000 |
| 7 | 0000001100000 | 0000001011000 | 0000000111000 |
| 8 | 0000000111000 | 0000000101100 | 0000000010100 |
| 9 | 0000000010100 | 0000000010110 | 0000000000010 |

### Step 3. Build the frame

Remainder = **010**. Transmit **1011011010010**.

### Step 4. Divide the received frame

| Position | Before | Generator | After |
| --- | --- | --- | --- |
| 1 | 1011011010010 | 1011000000000 | 0000011010010 |
| 6 | 0000011010010 | 0000010110000 | 0000001100010 |
| 7 | 0000001100010 | 0000001011000 | 0000000111010 |
| 8 | 0000000111010 | 0000000101100 | 0000000010110 |
| 9 | 0000000010110 | 0000000010110 | 0000000000000 |

Receiver remainder = 000. No error is detected; this is not a guarantee that every possible corruption is detectable.

---

## TEE · Q2(c) · Framing

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q2c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-ai-partial/q2c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q2(c). Explain methods of framing. What are the advantages of variable-length frames over fixed-length frames? [5 marks]

### Answer

Framing separates a continuous bit stream into data-link units so the receiver knows where each frame begins and ends.

| Method | Operation | Key issue |
| --- | --- | --- |
| Fixed size | Every N bytes forms one frame | No delimiter needed, but padding may waste capacity |
| Length/character count | Header gives frame length | A damaged count can lose synchronization |
| Byte stuffing | Flag bytes delimit frames; escape any flag/escape inside payload | Receiver removes inserted escape bytes |
| Bit stuffing | Flag01111110; insert0 after five consecutive data1s | Receiver removes the stuffed0 |
| Coding violation | Reserve physical symbols unavailable to data | Depends on the line code |

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.

---

## TEE · Q3(a) · Alternating-bit state transitions

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q3a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-ai-partial/q3a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

### Given

Two messages; no DATA or ACK errors; original FSM transition labels in the question.

### To find

The global interleaved transition sequence, including the final ACK.

### Formula and why

Send DATA → receive and acknowledge DATA → receive matching ACK → advance the sequence bit.

Each successful ACK permits the sender to send the next new message.

### Solution

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.

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| **Send0** | → | **ACK0** | → | **Send1** | → | **ACK1** |

| Order | Transition | Action |
| --- | --- | --- |
| 1 | S0 | Send data0; start timer |
| 2 | R0 | Accept data0; deliver; send ACK0 |
| 3 | S3 | Accept ACK0; stop timer |
| 4 | S5 | Send data1; start timer |
| 5 | R2 | Accept data1; deliver; send ACK1 |
| 6 | S8 | Accept ACK1; stop timer |

**Required sequence: S0, R0, S3, S5, R2, S8.** For the four placeholders: t1=S3, t2=S5, t3=R2, t4=S8.

---

## TEE · Q3(b) · Stateful packet filtering

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q3b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-ai-partial/q3b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q3(b). What are the two main data structures used by a stateful packet filter? Explain their purpose. [5 marks]

### Answer

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.

---

## TEE · Q3(c) · DNS cache inference

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q3c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-ai-partial/q3c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

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.

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.

---

## TEE · Q3(d) · IPv4 address classes

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q3d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-ai-partial/q3d

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q3(d). Explain the classification of IPv4 addresses with suitable examples. [5 marks]

### Answer

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.

| Class | First octet | Default mask | Network / host split | Purpose |
| --- | --- | --- | --- | --- |
| A | 1–126 (ordinary unicast) | 255.0.0.0 (/8) | 8 / 24 bits | Large historical unicast networks; 0 and 127 reserved |
| B | 128–191 | 255.255.0.0 (/16) | 16 / 16 bits | Medium historical unicast networks |
| C | 192–223 | 255.255.255.0 (/24) | 24 / 8 bits | Small historical unicast networks |
| D | 224–239 | No unicast default mask | Not network/host class split | Multicast |
| E | 240–255 | No unicast default mask | Not normal unicast allocation | Reserved/experimental; special addresses exist |

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.

---

## TEE · Q4(a) · Dijkstra from u

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q4a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-ai-partial/q4a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Original diagram data

| Edge endpoint1 | Endpoint2 | Cost |
| --- | --- | --- |
| z | x | 8 |
| z | y | 12 |
| x | y | 6 |
| x | v | 3 |
| x | w | 6 |
| y | v | 8 |
| y | t | 7 |
| v | t | 4 |
| v | u | 3 |
| v | w | 4 |
| w | u | 3 |
| t | u | 2 |

### Answer

### Given

The original diagram is undirected. All edge labels are reproduced below. Source = u.

Swipe across the diagram to read its labels ↔

![Original undirected question graph: every edge weight retained; source u](https://deep-learning-study-room.vercel.app/cn/fig/old-ai-cn-2023-11-22-ai-q4a.23319ec754.svg)

Diagram: Original undirected question graph: every edge weight retained; source u. Labels: Original undirected question graph: every edge weight retained; source u | 8 | 12 | 6 | 3 | 6 | 8 | 7 | 4 | 3 | 4 | 3 | 2 | z | x | y | w | v | t | u

| From | To | Cost |
| --- | --- | --- |
| z | x | 8 |
| z | y | 12 |
| x | y | 6 |
| x | v | 3 |
| x | w | 6 |
| y | v | 8 |
| y | t | 7 |
| v | t | 4 |
| v | u | 3 |
| v | w | 4 |
| w | u | 3 |
| t | u | 2 |

### To find

Shortest distance, complete route and predecessor for every node from u.

### Formula and why



$$
d(v)\leftarrow\min(d(v),d(u)+w(u,v))
$$



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.

### Step 1. Initialize and relax

| Pass / settled node | Strict improvements | t | u | v | w | x | y | z |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 0 | Initial | ∞ | 0 | ∞ | ∞ | ∞ | ∞ | ∞ |
| u | v←u: 0+3=3; w←u: 0+3=3; t←u: 0+2=2 | 2 | 0 | 3 | 3 | ∞ | ∞ | ∞ |
| t | y←t: 2+7=9 | 2 | 0 | 3 | 3 | ∞ | 9 | ∞ |
| v | x←v: 3+3=6 | 2 | 0 | 3 | 3 | 6 | 9 | ∞ |
| w | No change | 2 | 0 | 3 | 3 | 6 | 9 | ∞ |
| x | z←x: 6+8=14 | 2 | 0 | 3 | 3 | 6 | 9 | 14 |
| y | No change | 2 | 0 | 3 | 3 | 6 | 9 | 14 |
| z | No change | 2 | 0 | 3 | 3 | 6 | 9 | 14 |

### Step 2. Read predecessors backwards, then reverse

| Destination | Distance | Previous | Route |
| --- | --- | --- | --- |
| t | 2 | u | u → t |
| u | 0 | — | u |
| v | 3 | u | u → v |
| w | 3 | u | u → w |
| x | 6 | v | u → v → x |
| y | 9 | t | u → t → y |
| z | 14 | x | u → v → x → z |

A tie between two equally short paths is valid; this table retains the first predecessor on equal distances.

---

## TEE · Q4(b) · TCP socket port numbers

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q4b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-ai-partial/q4b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

IP delivers a packet toward a host interface. The transport layer delivers application data to a **process endpoint**, 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.

Swipe across the diagram to read its labels ↔

![Transport: from hosts to application processes](https://deep-learning-study-room.vercel.app/cn/fig/tee-ports.f496c69028.svg)

Diagram: Transport: from hosts to application processes. Labels: Transport: from hosts to application processes | Transport: from hosts to application processes | Host address selects the machine/interface | Example destination: 198.51.100.20. | Protocol + destination port select service | TCP port 443 and UDP port 53 identify different transport endpoints. | Demultiplex to the right socket | TCP clients share server port 443; their address/port tuples distinguish the connections.

Several applications share IP connectivity; ports separate their transport endpoints.

1. At the sender, transport multiplexing accepts data from several application sockets and adds the appropriate header.
2. A server normally listens on a known service port; a client commonly chooses a temporary local port.
3. At the receiver, demultiplexing uses protocol/header information to deliver data to the appropriate socket.
4. 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.

| Identifier | Purpose |
| --- | --- |
| MAC address | Delivery on a local link |
| IP address | Network-layer interface/addressing |
| Port number | Transport-layer application endpoint |
| Domain name | Application-level naming resolved through DNS |

#### Practical example

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.

**Yaad rakho:** IP host tak; port process tak.

| Direction | Source port | Destination port |
| --- | --- | --- |
| Client→server | Example49152 | 23 (Telnet) |
| Server→client | 23 | 49152 |

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.

---

## TEE · Q4(c) · SDN control-plane layers

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q4c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-ai-partial/q4c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q4(c). Describe the layers of the SDN controller and their roles. [5 marks]

### Answer

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.

---

## TEE · Q5(a) · BGP topology views

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q5a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-ai-partial/q5a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Answer

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.

---

## TEE · Q5(b) · Symmetric and public-key cryptography

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q5b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-ai-partial/q5b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q5(b). Compare symmetric-key and public-key cryptography from the perspective of the services they provide. [5 marks]

### Answer

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.

---

## TEE · Q5(c) · CDN placement and server selection

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q5c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-ai-partial/q5c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q5(c). Describe the two CDN server-placement philosophies and non-network factors in CDN server selection. [5 marks]

### Answer

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.

---

## TEE · Q6(a) · Incomplete multiple-access question

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-ai-partial--q6a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-ai-partial/q6a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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.] [5 marks]

### Answer

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.

---

## TEE · Q1(a) · Store-and-forward delay

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q1a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q1a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

### Given

One packet, L=1000 bits;3 links;rate2000000 bits/s;propagation1ms/link;store-and-forward.

### To find

Total time until the final packet bit reaches the destination.

### Formula and why



$$
T=\sum_{i=1}^{3}(L/R_i+d_{prop,i})
$$



Each router must receive the complete packet before sending it onward, so all three serialization times count.

### Solution

### Step 1. Calculate serialization on one link

1000/2000000 seconds=0.0005s=0.5ms.

### Step 2. Add propagation per link

0.5+1=1.5ms.

### Step 3. Add all three links

3×1.5=**4.5ms**. Queuing/processing are ignored as instructed.

---

## TEE · Q1(b) · Token passing and ideal broadcast access

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q1b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q1b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q1(b). State four desirable characteristics of a broadcast channel. Which does token passing have, and why? [5 marks]

### Answer

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.

---

## TEE · Q1(c) · Priority scheduling

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q1c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q1c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

### Given

Arrival groups in the question; one-unit service; slot-boundary starts; FIFO inside each queue.

### To find

Departure order at t=1 through7.

### Formula and why

At each slot start, consider only packets that have already arrived.

Strict priority chooses the high queue whenever it is nonempty. A running packet is not preempted.

### Solution

### Step 1. Apply the queue rule at each boundary

| Service interval | Departure packet | Reason |
| --- | --- | --- |
| [0,1) | 1 | Only1 is available. |
| [1,2) | 2 | High-priority2 is oldest. |
| [2,3) | 3 | High-priority3 precedes low-priority4. |
| [3,4) | 5 | High-priority5 has arrived. |
| [4,5) | 7 | High-priority7 precedes low-priority4 and6. |
| [5,6) | 4 | No high-priority packet remains; send oldest low4. |
| [6,7) | 6 | Send remaining low6. |

### Step 2. Write the required ordered digits

**1 2 3 5 7 4 6**

---

## TEE · Q1(d) · TCP flow control

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q1d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q1d

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q1(d). What is flow control in TCP and how is it implemented? [5 marks]

### Answer

**Transmission Control Protocol (TCP)** 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.

- Connection-oriented: state is established between endpoints before ordinary data transfer.
- Reliable, ordered **byte stream**: sequence numbers, acknowledgements and retransmission handle loss; application message boundaries are not preserved.
- Full duplex: each direction has its own byte sequence and ACK information.
- Receiver flow control: advertised receive window limits data the receiver can accept.
- Congestion control: the sender also limits sending based on network conditions.
- Checksum detects corruption; ports multiplex connections. Reliability does not equal encryption.
- Segmentation divides stream bytes into transport segments; buffering and retransmission reconstruct the ordered stream.

Swipe across the diagram to read its labels ↔

![TCP header: minimum 20 bytes](https://deep-learning-study-room.vercel.app/cn/fig/tee-tcp.81a8dfb693.svg)

Diagram: TCP header: minimum 20 bytes. Labels: TCP header: minimum 20 bytes | TCP header: minimum 20 bytes | Source port · 16 | Destination port · 16 | Sequence number · 32 | Acknowledgement number · 32 | Offset / reserved / flags · 16 | Receive window · 16 | Checksum · 16 | Urgent pointer · 16 | Options + padding, if present | Data offset counts 32-bit words; minimum value 5.

TCP base header; optional fields follow the minimum 20 bytes.

| Field | Meaning |
| --- | --- |
| Source/destination ports (16 each) | Identify process endpoints |
| Sequence number (32) | First data-byte number in this segment; SYN/FIN also occupy sequence space |
| Acknowledgement number (32) | Next sequence number expected when ACK flag is set |
| Data offset (4) | TCP header length in 32-bit words; minimum 5 → 20 bytes |
| Flags | SYN establishes; ACK validates acknowledgement; FIN closes a sending direction; RST aborts; others have defined purposes |
| Window (16 base field) | Advertised receive window; scaling can be negotiated |
| Checksum (16) | Covers TCP header/data and pseudo-header |
| Urgent pointer (16) | Used with URG for the urgent indication |
| Options/padding | Optional features such as MSS; align header to 32-bit words |

#### Practical example

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.

**Yaad rakho:** TCP bytes count karta hai; writes ke borders preserve nahi.

**Mechanism:** 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.

---

## TEE · Q2(a) · HTTP delay comparison

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q2a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q2a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Answer

### Given

Known IP; new initial TCP connection; zero GET transmission; each object transmission=0.5 RTT.

### To find

Time to obtain the base object and then the pair of objects.

### Formula and why



$$
T_{object}=T_{setup}+RTT+T_{transmission}
$$



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.

### Solution

### Step 1. Download base HTML

1 RTT for TCP setup + 1 RTT for GET/first response bit + 0.5 RTT to transmit = **2.5 RTT**.

### Step 2. Download referenced JPEG

1 RTT for another TCP setup + 1 RTT for GET/response + 0.5 RTT transmission = 2.5 RTT.

### Step 3. Add sequential delays

**Total = 2.5+2.5=5 RTT**. DNS adds zero here because the IP address is already known.

---

## TEE · Q2(b)(i) · Block coding capacity

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q2bi/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q2bi

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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? [4 marks]

### Answer

**Source note:** 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.

### Given

k=4 data bits; n=5 coded bits.

### To find

Dataword count, possible received words, valid codewords.

### Formula and why



$$
N_{data}=2^k,\quad N_{possible}=2^n,\quad N_{valid}=2^k
$$



A one-to-one encoder maps every dataword to exactly one valid codeword. The remaining n-bit patterns are not valid codewords.

### Solution

### Step 1. Count datawords

2⁴=16.

### Step 2. Count all 5-bit patterns

2⁵=32 possible received patterns; only16 are selected valid codewords.

### Step 3. Interpret successful reception carefully

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.

---

## TEE · Q2(b)(ii) · CRC encoder and decoder

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q2bii/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q2bii

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q2(b)(ii). Explain the principle and working of cyclic redundancy check with a neat encoder and decoder diagram. [6 marks]

### Answer

A **Cyclic Redundancy Check (CRC)** 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.



$$
T(x)=x^rM(x)\oplus R(x),\quad R(x)=x^rM(x)\bmod G(x)
$$



1. Convert each polynomial coefficient into a bit, including zero coefficients for missing powers.
2. Append r zero bits to the message, because multiplying by x^r shifts it left r places.
3. 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.
4. Replace the appended zeros with the remainder. The resulting transmitted frame is divisible by the generator.
5. 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.

Swipe across the diagram to read its labels ↔

![CRC sender and receiver](https://deep-learning-study-room.vercel.app/cn/fig/tee-crc.24705171b3.svg)

Diagram: CRC sender and receiver. Labels: CRC sender and receiver | CRC sender and receiver | Message M and degree-r generator G | Write every coefficient, append r zeros to the message. | Sender: XOR long division | Divide the augmented message by G. Keep an r-bit remainder R. | Transmit message followed by remainder | T = shifted message XOR R. The full frame is divisible by G. | Receiver: divide the received complete frame | Nonzero remainder detects corruption. Zero means no detected error; some error patterns can pass.

Sender appends remainder; receiver checks divisibility.

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.

#### Practical example

Generator 1101 has degree 3, so append three zeros, not four. A 3-bit remainder such as 001 must keep its leading zeros.

**Yaad rakho:** CRC mein subtract bhi XOR; receiver par full frame divide.

|  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| **Data + r zero bits** | → | **Modulo-2 divide by generator** | → | **Append r-bit remainder** | → | **Receiver divides full codeword** | → | **Zero remainder: no detected error** |

---

## TEE · Q3(a) · Dijkstra from t

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q3a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q3a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Original diagram data

| Edge endpoint1 | Endpoint2 | Cost |
| --- | --- | --- |
| z | x | 8 |
| z | y | 12 |
| x | y | 6 |
| x | v | 3 |
| x | w | 6 |
| y | v | 8 |
| y | t | 7 |
| v | t | 4 |
| v | u | 3 |
| v | w | 4 |
| w | u | 3 |
| t | u | 2 |

### Answer

### Given

The original diagram is undirected. All edge labels are reproduced below. Source = t.

Swipe across the diagram to read its labels ↔

![Original undirected question graph: every edge weight retained; source t](https://deep-learning-study-room.vercel.app/cn/fig/old-ai-cn-2022-11-16-ai-q3a.503e410dd7.svg)

Diagram: Original undirected question graph: every edge weight retained; source t. Labels: Original undirected question graph: every edge weight retained; source t | 8 | 12 | 6 | 3 | 6 | 8 | 7 | 4 | 3 | 4 | 3 | 2 | z | x | y | w | v | t | u

| From | To | Cost |
| --- | --- | --- |
| z | x | 8 |
| z | y | 12 |
| x | y | 6 |
| x | v | 3 |
| x | w | 6 |
| y | v | 8 |
| y | t | 7 |
| v | t | 4 |
| v | u | 3 |
| v | w | 4 |
| w | u | 3 |
| t | u | 2 |

### To find

Shortest distance, complete route and predecessor for every node from t.

### Formula and why



$$
d(v)\leftarrow\min(d(v),d(u)+w(u,v))
$$



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.

### Step 1. Initialize and relax

| Pass / settled node | Strict improvements | t | u | v | w | x | y | z |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 0 | Initial | 0 | ∞ | ∞ | ∞ | ∞ | ∞ | ∞ |
| t | u←t: 0+2=2; y←t: 0+7=7; v←t: 0+4=4 | 0 | 2 | 4 | ∞ | ∞ | 7 | ∞ |
| u | w←u: 2+3=5 | 0 | 2 | 4 | 5 | ∞ | 7 | ∞ |
| v | x←v: 4+3=7 | 0 | 2 | 4 | 5 | 7 | 7 | ∞ |
| w | No change | 0 | 2 | 4 | 5 | 7 | 7 | ∞ |
| x | z←x: 7+8=15 | 0 | 2 | 4 | 5 | 7 | 7 | 15 |
| y | No change | 0 | 2 | 4 | 5 | 7 | 7 | 15 |
| z | No change | 0 | 2 | 4 | 5 | 7 | 7 | 15 |

### Step 2. Read predecessors backwards, then reverse

| Destination | Distance | Previous | Route |
| --- | --- | --- | --- |
| t | 0 | — | t |
| u | 2 | t | t → u |
| v | 4 | t | t → v |
| w | 5 | u | t → u → w |
| x | 7 | v | t → v → x |
| y | 7 | t | t → y |
| z | 15 | x | t → v → x → z |

A tie between two equally short paths is valid; this table retains the first predecessor on equal distances.

---

## TEE · Q3(b)(i) · UDP checksum limitations

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q3bi/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q3bi

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

**No.** 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.

---

## TEE · Q3(b)(ii) · TCP demultiplexing

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q3bii/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q3bii

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q3(b)(ii). Which datagram and segment header fields are used when demultiplexing data to a TCP socket? [5 marks]

### Answer

IP delivers a packet toward a host interface. The transport layer delivers application data to a **process endpoint**, 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.

Swipe across the diagram to read its labels ↔

![Transport: from hosts to application processes](https://deep-learning-study-room.vercel.app/cn/fig/tee-ports.f496c69028.svg)

Diagram: Transport: from hosts to application processes. Labels: Transport: from hosts to application processes | Transport: from hosts to application processes | Host address selects the machine/interface | Example destination: 198.51.100.20. | Protocol + destination port select service | TCP port 443 and UDP port 53 identify different transport endpoints. | Demultiplex to the right socket | TCP clients share server port 443; their address/port tuples distinguish the connections.

Several applications share IP connectivity; ports separate their transport endpoints.

1. At the sender, transport multiplexing accepts data from several application sockets and adds the appropriate header.
2. A server normally listens on a known service port; a client commonly chooses a temporary local port.
3. At the receiver, demultiplexing uses protocol/header information to deliver data to the appropriate socket.
4. 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.

| Identifier | Purpose |
| --- | --- |
| MAC address | Delivery on a local link |
| IP address | Network-layer interface/addressing |
| Port number | Transport-layer application endpoint |
| Domain name | Application-level naming resolved through DNS |

#### Practical example

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.

**Yaad rakho:** IP host tak; port process tak.

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.

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.

---

## TEE · Q4(a) · rdt3.0 global transition sequence

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q4a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q4a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Answer

### Given

Two messages; no DATA or ACK errors; original FSM transition labels in the question.

### To find

The global interleaved transition sequence, including the final ACK.

### Formula and why

Send DATA → receive and acknowledge DATA → receive matching ACK → advance the sequence bit.

Each successful ACK permits the sender to send the next new message.

### Solution

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.

|  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| **Send0** | → | **ACK0** | → | **Send1** | → | **ACK1** |

| Order | Transition | Action |
| --- | --- | --- |
| 1 | S0 | Send data0; start timer |
| 2 | R0 | Accept data0; deliver; send ACK0 |
| 3 | S3 | Accept ACK0; stop timer |
| 4 | S5 | Send data1; start timer |
| 5 | R2 | Accept data1; deliver; send ACK1 |
| 6 | S8 | Accept ACK1; stop timer |

**Required sequence: S0, R0, S3, S5, R2, S8.** For the four placeholders: t1=S3, t2=S5, t3=R2, t4=S8.

---

## TEE · Q4(b)(i) · CDN placement

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q4bi/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q4bi

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q4(b)(i). CDNs typically adopt one of two server-placement philosophies. List and discuss them briefly. [5 marks]

### Answer

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.

---

## TEE · Q4(b)(ii) · CDN server selection

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q4bii/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q4bii

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q4(b)(ii). Besides delay, loss and bandwidth, what other factors enter a CDN server-selection strategy? [5 marks]

### Answer

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.

---

## TEE · Q5(a) · BGP path views

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q5a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q5a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Answer

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.

---

## TEE · Q5(b)(i) · Access technologies

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q5bi/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q5bi

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q5(b)(i). List and explain four access technologies. Classify each as home access, enterprise access or wide-area wireless access. [5 marks]

### Answer

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.

---

## TEE · Q5(b)(ii) · Ethernet physical media

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q5bii/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q5bii

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q5(b)(ii). What physical media can Ethernet run over? Explain in detail. [5 marks]

### Answer

**Guided media** constrain signals to a physical path: twisted pair, coaxial cable and optical fiber. **Unguided media** 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.

Swipe across the diagram to read its labels ↔

![Transmission media: guided and unguided](https://deep-learning-study-room.vercel.app/cn/fig/tee-media.aff26cd0b5.svg)

Diagram: Transmission media: guided and unguided. Labels: Transmission media: guided and unguided | Transmission media: guided and unguided | Guided: a physical path | Twisted pair: electrical pairs. Coaxial: shielded conductor. Fiber: light through a protected core. | Unguided: waves in free space | Radio, terrestrial/satellite microwave, and infrared. Range and interference depend on the system. | Campus combination | Fiber backbone + copper access links + managed wireless mobility. Security and reliability need | configuration.

Transmission media classification.

| Medium | Two key characteristics | Limitations / use |
| --- | --- | --- |
| Twisted pair | Electrical signal; pairs twisted to reduce interference | Low-cost LAN access; distance/noise limits depend on category and design |
| Coaxial cable | Shielded central conductor; greater shielding than basic unshielded pair | Bulkier; cable broadband and legacy shared LANs |
| Optical fiber | Light in glass/plastic; high capacity with immunity to electromagnetic interference | Transceivers and careful splicing/bend control needed; backbone links |
| Radio waves | Wireless propagation; many bands support broad/non-line-of-sight coverage | Interference, shared spectrum and security configuration matter; Wi-Fi/mobile |
| Terrestrial microwave | Directional antennas; typically line of sight | Alignment and obstructions matter; point-to-point backhaul |
| Satellite microwave | Wide coverage through relay in space | Cost and latency depend strongly on orbit/system; remote connectivity |
| Infrared | Short-range light; usually blocked by walls | Limited coverage; short-range indoor/remote-control links |

#### Practical example

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.

**Yaad rakho:** Guided = cable path; unguided = free-space waves.

Transmission media are classified into guided media (twisted pair, coaxial cable, optical fiber) and unguided media (radio, microwave, infrared).

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.

| Advantages | Disadvantages / design costs |
| --- | --- |
| High data capacity and low attenuation over suitable links | Optical transceivers, connectors and splicing add cost/skill requirements |
| Immune to electromagnetic interference; no electrical crosstalk | Tight bends, dirty connectors and poor installation increase loss |
| Electrical isolation between buildings | Fiber is mechanically sensitive and requires appropriate protection |
| Harder to tap casually than an unprotected radio channel | It is not automatically confidential; encryption/access control remain necessary |

#### Practical example

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.

**Yaad rakho:** Fiber light carry karta hai; immunity means no EMI, not no security risk.

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”.

---

## TEE · Q6(a) · CSMA/CD arrival timeline

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q6a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q6a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Answer

### Given

Arrivals0.3,1.7,1.8,2.5,4.2,4.6; one-unit frames; no retries before time5.

### To find

Successful packet numbers and each relevant start/collision decision.

### Formula and why

Pure ALOHA sends immediately. Slotted ALOHA waits for the next slot. CSMA/CD senses only signals that have had time to propagate.

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.

### Solution

### Step 1. Trace every message

| Packet | Transmission / slot | Reason | Outcome |
| --- | --- | --- | --- |
| 1 | 0.3–1.3 | Signal clears other nodes at1.5 | Success |
| 2 | 1.7–2.0 | At1.7 channel idle; detects3 at1.8+0.2=2.0 | Collision |
| 3 | 1.8–1.9 | Cannot sense2 until1.9; then stops | Collision |
| 4 | 2.5–3.5 | Last collision signal clears by2.2, so idle | Success |
| 5 | 4.2–5.2 | Previous signal cleared by3.7 | Success |
| 6 | No transmission | At4.6 senses5, whose signal arrives4.4 | Busy; waits |

### Step 2. State successful messages

**1, 4, 5**.

---

## TEE · Q6(b)(i) · Classful addresses and masks

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q6bi/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q6bi

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q6(b)(i). List and explain IP address classes and the purpose of a subnet mask. [5 marks]

### Answer

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.

| Class | First octet | Default mask | Network / host split | Purpose |
| --- | --- | --- | --- | --- |
| A | 1–126 (ordinary unicast) | 255.0.0.0 (/8) | 8 / 24 bits | Large historical unicast networks; 0 and 127 reserved |
| B | 128–191 | 255.255.0.0 (/16) | 16 / 16 bits | Medium historical unicast networks |
| C | 192–223 | 255.255.255.0 (/24) | 24 / 8 bits | Small historical unicast networks |
| D | 224–239 | No unicast default mask | Not network/host class split | Multicast |
| E | 240–255 | No unicast default mask | Not normal unicast allocation | Reserved/experimental; special addresses exist |

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.

---

## TEE · Q6(b)(ii) · CIDR block

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q6bii/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q6bii

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

### Given

210.90.12.7/20

### To find

First and last addresses and total block size.

### Formula and why



$$
N=2^{32-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.

### Step 1. Find host bits

32 − 20 = 12. N = 4096.

### Step 2. Locate the aligned block

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.

### Step 3. Write the result

First = **210.90.0.0**; last = **210.90.15.255**; total = **4096** addresses. Usual usable host range: 210.90.0.1–210.90.15.254.

---

## TEE · Q7(a) · Circuit switching advantage

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q7a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q7a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q7(a). What advantage does a circuit-switched network have over a packet-switched network? Give an example. [5 marks]

### Answer

**Definition.** Switching selects how data passes through intermediate network nodes from a source to a destination.

**Simple meaning.** Raasta reserve karna, poora message ruk-ruk ke bhejna, ya chhote packets bhejna—yeh teen ideas hain.

Swipe across the diagram to read its labels ↔

![Three switching techniques: what is forwarded?](https://deep-learning-study-room.vercel.app/cn/fig/switching.2b51f856d9.svg)

Diagram: Three switching techniques: what is forwarded?. Labels: Three switching techniques: what is forwarded? | Three switching techniques: what is forwarded? | 1. Circuit: reserve a path, then stream data | Setup → reserved capacity → data transfer → release. | 2. Message: store the entire message at each node | Large forwarding unit; no packet-level pipeline. | 3. Packet: divide, then forward packet by packet | Shared links can simultaneously carry different packets.

Circuit, message and packet switching

## Understand it step by step

1. **Circuit switching:** establish a circuit, reserve resources, transfer data, then release the circuit. Capacity is dedicated even during a silent period.
2. **Message switching:** each intermediate node receives the entire message before forwarding it. Large messages require large buffers and can delay later messages.
3. **Packet switching:** divide data into smaller packets. Nodes forward packets individually; different links can carry successive packets at the same time.
4. 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.

| Aspect | Circuit switching | Message switching | Packet switching |
| --- | --- | --- | --- |
| Unit handled | Continuous stream on established circuit | Whole message | Small packets |
| Resource use | Capacity reserved along a circuit | Shared; message stored at each intermediate node | Shared; each packet stored/forwarded in this model |
| Setup | Required before data transfer | No circuit setup required | Datagram: no connection setup; virtual circuit: setup |
| Delay | Setup delay, then relatively predictable service | Large store-and-forward delay for long messages | Variable delay; packet pipeline can reduce completion time |
| Main limitation | Reserved capacity can be idle | Large buffers; unsuitable for tight delay needs | Headers, possible queueing/loss; datagrams may reorder |

#### Practical example

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.

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.

**Yaad rakho:** Circuit reserves; message waits whole; packets pipeline.

**Choice:** 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.

---

## TEE · Q7(b) · HTTP cookies

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q7b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q7b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q7(b). An e-commerce site wants to keep a purchase record for each customer. Illustrate how cookies can do this. [5 marks]

### Answer

| Concept | Explanation | Example |
| --- | --- | --- |
| GET | Retrieve the selected representation | Read a page |
| POST | Ask the resource to process submitted content | Submit a form |
| PUT / DELETE | Replace target representation / request removal according to server semantics | Update/delete an API resource |
| 200 / 301 / 404 / 500 | Success / permanent redirect / not found / server error | Read status before interpreting body |
| Persistent connection | Reuse a connection for multiple exchanges | Avoid repeated TCP setup for each image |
| Cookie/session token | Carry an identifier so the application can relate requests | Remain signed in |
| HTTPS | HTTP protected by authenticated encryption through TLS in common deployments | Protect credentials and content in transit |

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.

#### Practical example

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.

|  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| **First visit** | → | **Server creates customer/session ID** | → | **Set-Cookie header** | → | **Browser stores cookie** | → | **Later Cookie header** | → | **Server retrieves purchase record** |

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.

---

## TEE · Q7(c) · Selective Repeat

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q7c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q7c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q7(c). What is Selective Repeat? Explain its implementation with an example. [5 marks]

### Answer

**Selective Repeat (SR) ARQ** 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.

Swipe across the diagram to read its labels ↔

![SR W=4: individual ACKs and buffering](https://deep-learning-study-room.vercel.app/cn/fig/tee-sr.5ae2b52b45.svg)

Diagram: SR W=4: individual ACKs and buffering. Labels: SR W=4: individual ACKs and buffering | SR W=4: individual ACKs and buffering | Sender | Receiver | Frames 0,1 → accept and deliver | ACK 0 and ACK 1 individually | Frame 2 lost; frame 3 arrives | ACK 3; keep frame 3 in buffer | Timer for frame 2: resend only 2 | ACK 2; deliver 2, then buffered 3 | Sequence space 0…7; equal windows at most 4. | ACK i means that specific frame i was accepted.

SR buffers 3 while waiting for 2; only 2 is retransmitted.

1. For m=3 there are eight sequence numbers, 0…7. With equal sender and receiver windows, maximum W=23−1=4. Both windows begin at 0 and span 0…3.
2. 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.
3. Although 3 is acknowledged, the sender’s base cannot jump over missing 2. A timer for 2 expires; only frame 2 is retransmitted.
4. 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.
5. 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.
6. A repeated old frame can be acknowledged again without delivering it twice. SR needs more receiver storage and per-frame tracking than GBN.



$$
W_s=W_r\le 2^{m-1}
$$



#### Practical example

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.

**Yaad rakho:** SR selective resend; half sequence space keeps old and new separate.

---

## TEE · Q7(d) · Destination-based forwarding

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2022-ai-final--q7d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2022-ai-final/q7d

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

| Destination | A output interface |
| --- | --- |
| H3 (its destination address/prefix) | 3 |

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.

---

## TEE · Q1(a) · Shared bottleneck throughput

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q1a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q1a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

### Given

10 flows, server links 25 Mbps, client links 50 Mbps, shared link 200 Mbps.

### To find

Maximum throughput of each flow.

### Formula and why



$$
T=\min(R_s,R_c,R/n)
$$



A flow cannot exceed any link on its path; fair sharing divides the common capacity among n active flows.

### Solution

### Step 1. Convert and divide the shared capacity

200 Mbps ÷ 10 = 20 Mbps per flow.

### Step 2. Take the smallest per-flow capacity

T=min(25,50,20)=**20 Mbps**.

Total delivered rate=10×20=200 Mbps.

---

## TEE · Q1(b) · Ideal broadcast channel and slotted ALOHA

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q1b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q1b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q1(b). State four desirable characteristics of a broadcast channel. Which does slotted ALOHA have, and why? [5 marks]

### Answer

| Ideal characteristic | Slotted ALOHA |
| --- | --- |
| One active node uses rate R | Yes, at slot boundaries with no collisions; an initial wait may occur |
| M active nodes each achieve R/M | Not in general: collisions and empty slots waste capacity |
| Decentralized without master or clock synchronization | No master is needed, but all nodes must synchronize slots |
| Simple | Yes: transmit at a slot boundary, then retry after random backoff |

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.

---

## TEE · Q1(c) · Round-robin scheduling

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q1c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q1c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

### Given

Arrival groups in the question; one-unit service; slot-boundary starts; FIFO inside each queue.

### To find

Departure order at t=1 through7.

### Formula and why

At each slot start, consider only packets that have already arrived.

Round robin alternates nonempty queues, skipping an empty queue.

### Solution

### Step 1. Apply the queue rule at each boundary

| Service interval | Departure packet | Reason |
| --- | --- | --- |
| [0,1) | 1 | Only packet1 has arrived. |
| [1,2) | 2 | Use set2: oldest is2. |
| [2,3) | 4 | Use set1: oldest is4. |
| [3,4) | 3 | Use set2: oldest is3. |
| [4,5) | 6 | Use set1:6 has arrived. |
| [5,6) | 5 | Use set2:oldest is5. |
| [6,7) | 7 | Set1 empty; set2 supplies7. |

### Step 2. Write the required ordered digits

**1 2 4 3 6 5 7**

---

## TEE · Q1(d) · TCP congestion control

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q1d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q1d

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q1(d). What is congestion control in TCP and how is it implemented? [5 marks]

### Answer

A TCP sender is limited by receiver capacity and network capacity. The **receive window rwnd** comes from the receiver; the **congestion window cwnd** is maintained by the sender. Roughly, allowed outstanding data is min(rwnd,cwnd), with the existing bytes in flight subtracted before sending new bytes.



$$
\mathrm{new\ allowance}=\max(0,\min(rwnd,cwnd)-\mathrm{bytes\ in\ flight})
$$



1. In classic slow start, cwnd grows rapidly as ACKs arrive; under a simplified round-based model it approximately doubles each RTT.
2. At the slow-start threshold, congestion avoidance grows more cautiously; classic additive increase is approximately one MSS per RTT.
3. 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.
4. Fast retransmit can infer a missing segment from duplicate ACK evidence. It is distinct from waiting for a retransmission timeout.
5. 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.

#### Practical example

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.

---

## TEE · Q2(a) · Persistent HTTP delay

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q2a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q2a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Answer

### Given

Known IP; new initial TCP connection; zero GET transmission; each object transmission=0.5 RTT.

### To find

Time to obtain the base object and then the pair of objects.

### Formula and why



$$
T_{object}=T_{setup}+RTT+T_{transmission}
$$



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.

### Solution

### Step 1. Download base HTML

1 RTT for TCP setup + 1 RTT for GET/first response bit + 0.5 RTT to transmit = **2.5 RTT**.

### Step 2. Download referenced JPEG

Existing TCP connection: 0 setup + 1 RTT for GET/response + 0.5 RTT transmission = 1.5 RTT.

### Step 3. Add sequential delays

**Total = 2.5+1.5=4 RTT**. DNS adds zero here because the IP address is already known.

---

## TEE · Q2(b)(i) · Block-code received words

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q2bi/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q2bi

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

### Given

Sent data01, encoded011; valid codewords000,011,101,110.

### To find

Receiver outcome for111 and000.

### Formula and why

A receiver first checks membership in the valid-codeword set, then decodes a valid word.

This even-parity code detects any single-bit error but cannot identify a unique bit to correct.

### Solution

### Step 1. Received111

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.

### Step 2. Received000

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.

---

## TEE · Q2(b)(ii) · CRC and syndrome

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q2bii/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q2bii

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

### Given

Data = 1001; generator bits = 1011; degree r = 3.

### To find

CRC remainder, complete transmitted frame and receiver check.

### Formula and why

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.

### Step 1. Append zeros

1001 → 1001000

### Step 2. Perform XOR division

| Leading position | Before XOR | Aligned generator | After XOR |
| --- | --- | --- | --- |
| 1 | 1001000 | 1011000 | 0010000 |
| 3 | 0010000 | 0010110 | 0000110 |

### Step 3. Build the frame

Remainder = **110**. Transmit **1001110**.

### Step 4. Divide the received frame

| Position | Before | Generator | After |
| --- | --- | --- | --- |
| 1 | 1001110 | 1011000 | 0010110 |
| 3 | 0010110 | 0010110 | 0000000 |

Receiver remainder = 000. No error is detected; this is not a guarantee that every possible corruption is detectable.

---

## TEE · Q3(a) · Dijkstra from u

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q3a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q3a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Original diagram data

| Edge endpoint1 | Endpoint2 | Cost |
| --- | --- | --- |
| u | v | 4 |
| u | w | 3 |
| u | x | 5 |
| v | w | 1 |
| v | x | 8 |
| x | w | 7 |
| x | y | 7 |
| w | y | 6 |
| w | z | 7 |
| y | z | 7 |

### Answer

### Given

The original diagram is undirected. All edge labels are reproduced below. Source = u.

Swipe across the diagram to read its labels ↔

![Original undirected question graph: every edge weight retained; source u](https://deep-learning-study-room.vercel.app/cn/fig/old-ai-cn-2023-01-27-ai-q3a.e2a89263bf.svg)

Diagram: Original undirected question graph: every edge weight retained; source u. Labels: Original undirected question graph: every edge weight retained; source u | 4 | 3 | 5 | 1 | 8 | 7 | 7 | 6 | 7 | 7 | u | v | x | w | y | z

| From | To | Cost |
| --- | --- | --- |
| u | v | 4 |
| u | w | 3 |
| u | x | 5 |
| v | w | 1 |
| v | x | 8 |
| x | w | 7 |
| x | y | 7 |
| w | y | 6 |
| w | z | 7 |
| y | z | 7 |

### To find

Shortest distance, complete route and predecessor for every node from u.

### Formula and why



$$
d(v)\leftarrow\min(d(v),d(u)+w(u,v))
$$



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.

### Step 1. Initialize and relax

| Pass / settled node | Strict improvements | u | v | w | x | y | z |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 0 | Initial | 0 | ∞ | ∞ | ∞ | ∞ | ∞ |
| u | v←u: 0+4=4; w←u: 0+3=3; x←u: 0+5=5 | 0 | 4 | 3 | 5 | ∞ | ∞ |
| w | y←w: 3+6=9; z←w: 3+7=10 | 0 | 4 | 3 | 5 | 9 | 10 |
| v | No change | 0 | 4 | 3 | 5 | 9 | 10 |
| x | No change | 0 | 4 | 3 | 5 | 9 | 10 |
| y | No change | 0 | 4 | 3 | 5 | 9 | 10 |
| z | No change | 0 | 4 | 3 | 5 | 9 | 10 |

### Step 2. Read predecessors backwards, then reverse

| Destination | Distance | Previous | Route |
| --- | --- | --- | --- |
| u | 0 | — | u |
| v | 4 | u | u → v |
| w | 3 | u | u → w |
| x | 5 | u | u → x |
| y | 9 | w | u → w → y |
| z | 10 | w | u → w → z |

A tie between two equally short paths is valid; this table retains the first predecessor on equal distances.

---

## TEE · Q3(b)(i) · Why rdt3.0 needs a timer

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q3bi/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q3bi

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [4 marks]

### Answer

**Yes.** 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.

---

## TEE · Q3(b)(ii) · Internet checksum

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q3bii/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q3bii

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [6 marks]

### Answer

### Given

1011010001000110, 1100100001101110; word width = 16 bits.

### To find

Sender checksum and receiver verification.

### Formula and why



$$
S=\operatorname{endAroundCarry}(\text{sum of words}),\qquad C=\operatorname{NOT}(S)
$$



One’s-complement addition returns an overflow carry to the least-significant end. Complement only after all words have been added.

### Solution

### Step 1. Add the words, folding each carry

| Word | Decimal | Raw addition | Folded addition | Running binary sum |
| --- | --- | --- | --- | --- |
| 1011010001000110 | 46150 | 46150 | 46150 + carry 0 = 46150 | 1011010001000110 |
| 1100100001101110 | 51310 | 97460 | 31924 + carry 1 = 31925 | 0111110010110101 |

### Step 2. Complement every bit

Running sum = 0111110010110101. Change every 0 to 1 and every 1 to 0: **checksum = 1000001101001010** (decimal 33610). In the requested two-byte format: **10000011 01001010**.

### Step 3. Receiver adds the data and checksum

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.

---

## TEE · Q4(a) · Alternating-bit data and ACK sequence

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q4a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q4a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Answer

### Given

The complete timeline in the question, starting with data0 at t=0.

### To find

Six interleaved DATA/ACK numbers.

### Formula and why

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.

This keeps lost ACKs from causing duplicate application delivery.

### Solution

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.

| Event | Number | Reason |
| --- | --- | --- |
| t2 data | 1 | ACK0 has arrived; next DATA is1 |
| t3 ACK | 1 | Receiver accepted data1 |
| after t4 timeout data | 1 | ACK1 lost; sender resends1 |
| t5 ACK | 1 | Duplicate data1: re-ACK1, do not redeliver |
| t6 data | 0 | ACK1 now arrives; wrap to0 |
| t7 ACK | 1 | Data0 corrupt: receiver still expects0 and repeatsACK1 |

**Answer: 1, 1, 1, 1, 0, 1.** At t8 ACK1 is wrong for outstanding data0, so S1 ignores it; the next timeout retransmits0.

---

## TEE · Q4(b) · HTTP/2 multiplexing versus HTTP/1.1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q4b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q4b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Answer

### Given

RTT4; frame time1; O1/O2/O3/O4 have10/1/2/1 frames; established connection.

### To find

Every object completion time and average delay.

### Formula and why



$$
T_j=RTT+\text{position of the last frame of object }j
$$



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.

### Solution

### Step 1. Write transmission orders and last-frame positions

| Method | Frame order | O1 completion | O2 completion | O3 completion | O4 completion | Average |
| --- | --- | --- | --- | --- | --- | --- |
| HTTP/2 | O1, O2, O3, O4, O1, O3, O1, O1, O1, O1, O1, O1, O1, O1 | 18 | 6 | 10 | 8 | 10.5 |
| HTTP/1.1 | O1, O1, O1, O1, O1, O1, O1, O1, O1, O1, O2, O3, O3, O4 | 14 | 15 | 17 | 18 | 16.0 |

### Step 2. Calculate averages explicitly

HTTP/2: (18+6+10+8)/4=42/4=**10.5**. HTTP/1.1: (14+15+17+18)/4=64/4=**16**. All objects finish by18 in both cases; multiplexing makes short objects finish earlier.

---

## TEE · Q5(a) · BGP export policy

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q5a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q5a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Answer

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.

---

## TEE · Q5(b)(i) · HFC access

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q5bi/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q5bi

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q5(b)(i). Is HFC transmission rate dedicated or shared? Are collisions possible on a downstream HFC channel? Why? [5 marks]

### Answer

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.

---

## TEE · Q5(b)(ii) · Wireless access technologies

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q5bii/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q5bii

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q5(b)(ii). Explain the popular wireless Internet access technologies and compare them. [5 marks]

### Answer

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.

---

## TEE · Q6(a) · Slotted ALOHA arrival timeline

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q6a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q6a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Answer

### Given

Arrivals0.3,1.7,1.8,2.5,4.2,4.6; one-unit frames; no retries before time5.

### To find

Successful packet numbers and each relevant start/collision decision.

### Formula and why

Pure ALOHA sends immediately. Slotted ALOHA waits for the next slot. CSMA/CD senses only signals that have had time to propagate.

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.

### Solution

### Step 1. Trace every message

| Packet | Transmission / slot | Reason | Outcome |
| --- | --- | --- | --- |
| 1 | 1–2 | Alone in slot1 | Success |
| 2 | 2–3 | Same slot as3 | Collision |
| 3 | 2–3 | Same slot as2 | Collision |
| 4 | 3–4 | Alone in slot3 | Success |
| 5 | 5–6 | Same slot as6 | Collision |
| 6 | 5–6 | Same slot as5 | Collision |

### Step 2. State successful messages

**1, 4**. The slot beginning at5 is the initial attempt of packets5 and6, not a retransmission.

---

## TEE · Q6(b) · ISP VLSM allocation

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q6b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q6b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Answer

### Given

190.100.0.0/16; Group 1: 64 customers × 256 addresses; Group 2: 128 customers × 128 addresses; Group 3: 128 customers × 64 addresses

**Source correction/assumption:** All requests are total addresses, not usable hosts; therefore no extra two addresses are added.

### To find

Each customer prefix, every group range, first/last customer blocks, and unallocated addresses.

### Formula and why



$$
p=32-\log_2(\text{addresses per customer}),\quad A_{group}=n\times A_{customer}
$$



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.

### Step 1. Compute sizes and allocate consecutive aligned customer blocks

| Group | Customers | Addresses each | Customer prefix | Used | Group range |
| --- | --- | --- | --- | --- | --- |
| 1 | 64 | 256 | /24 | 16384 | 190.100.0.0–190.100.63.255 |
| 2 | 128 | 128 | /25 | 16384 | 190.100.64.0–190.100.127.255 |
| 3 | 128 | 64 | /26 | 8192 | 190.100.128.0–190.100.159.255 |

### Step 2. State first and last customer ranges

| Group | First customer | Last customer |
| --- | --- | --- |
| 1 | 190.100.0.0–190.100.0.255 | 190.100.63.0–190.100.63.255 |
| 2 | 190.100.64.0–190.100.64.127 | 190.100.127.128–190.100.127.255 |
| 3 | 190.100.128.0–190.100.128.63 | 190.100.159.192–190.100.159.255 |

### Step 3. Count the unused addresses

Allocated = 16384 + 16384 + 8192 = 40960. Unused = 65536 − 40960 = **24576**.

Unused range: 190.100.160.0–190.100.255.255.

---

## TEE · Q7(a) · TDM versus FDM

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q7a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q7a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q7(a). What advantages does TDM have over FDM in a circuit-switched network? [5 marks]

### Answer

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.

---

## TEE · Q7(b) · HTTP state

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q7b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q7b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q7(b). How do websites get around HTTP statelessness? Explain using an example. [5 marks]

### Answer

| Concept | Explanation | Example |
| --- | --- | --- |
| GET | Retrieve the selected representation | Read a page |
| POST | Ask the resource to process submitted content | Submit a form |
| PUT / DELETE | Replace target representation / request removal according to server semantics | Update/delete an API resource |
| 200 / 301 / 404 / 500 | Success / permanent redirect / not found / server error | Read status before interpreting body |
| Persistent connection | Reuse a connection for multiple exchanges | Avoid repeated TCP setup for each image |
| Cookie/session token | Carry an identifier so the application can relate requests | Remain signed in |
| HTTPS | HTTP protected by authenticated encryption through TLS in common deployments | Protect credentials and content in transit |

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.

#### Practical example

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.

|  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| **First visit** | → | **Server creates customer/session ID** | → | **Set-Cookie header** | → | **Browser stores cookie** | → | **Later Cookie header** | → | **Server retrieves purchase record** |

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.

---

## TEE · Q7(c) · TCP server sockets

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q7c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q7c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

IP delivers a packet toward a host interface. The transport layer delivers application data to a **process endpoint**, 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.

Swipe across the diagram to read its labels ↔

![Transport: from hosts to application processes](https://deep-learning-study-room.vercel.app/cn/fig/tee-ports.f496c69028.svg)

Diagram: Transport: from hosts to application processes. Labels: Transport: from hosts to application processes | Transport: from hosts to application processes | Host address selects the machine/interface | Example destination: 198.51.100.20. | Protocol + destination port select service | TCP port 443 and UDP port 53 identify different transport endpoints. | Demultiplex to the right socket | TCP clients share server port 443; their address/port tuples distinguish the connections.

Several applications share IP connectivity; ports separate their transport endpoints.

1. At the sender, transport multiplexing accepts data from several application sockets and adds the appropriate header.
2. A server normally listens on a known service port; a client commonly chooses a temporary local port.
3. At the receiver, demultiplexing uses protocol/header information to deliver data to the appropriate socket.
4. 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.

| Identifier | Purpose |
| --- | --- |
| MAC address | Delivery on a local link |
| IP address | Network-layer interface/addressing |
| Port number | Transport-layer application endpoint |
| Domain name | Application-level naming resolved through DNS |

#### Practical example

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.

**Yaad rakho:** IP host tak; port process tak.

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.

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.

---

## TEE · Q7(d) · NAT translated flow

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2023-jan-ai-reexam--q7d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2023-jan-ai-reexam/q7d

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

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.

---

## TEE · Q1(a) · Subnet mask

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q1a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q1a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q1(a). Explain why a subnet mask is required in IPv4 addressing. [5 marks]

### Answer

**Definition.** 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.

**Simple meaning.** Pehle block nikalo; phir first aur last. Uske baad hosts.

Swipe across the diagram to read its labels ↔

![A /24 split into four /26 blocks](https://deep-learning-study-room.vercel.app/cn/fig/subnet-blocks.67a24f46fc.svg)

Diagram: A /24 split into four /26 blocks. Labels: A /24 split into four /26 blocks | A /24 split into four /26 blocks | 1. /26 | First: .0 Last: .63 | Usable: .1 to .62 | 2. /26 | First: .64 Last: .127 | Usable: .65 to .126 | 3. /26 | First: .128 Last: .191 | Usable: .129 to .190 | 4. /26 | First: .192 Last: .255 | Usable: .193 to .254 | Each block: 64 total addresses; 62 ordinary usable hosts. | An address ending in .77 belongs to the .64–.127 block.

One method for every ordinary IPv4 block question

## Understand it step by step

1. Read /p. Host bits h=32−p. Total addresses N=2ʰ, not N−2.
2. Build the mask. Find the first octet that is not 255; block step there is 256−that mask octet.
3. Round that address octet down to a multiple of the step. Preserve preceding octets and set later octets to 0 for the network address.
4. 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.
5. 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.



$$
N=2^{32-p}
$$





$$
\text{block step}=256-\text{changing mask octet}
$$





$$
\text{ordinary usable hosts}=2^h-2
$$



#### Practical example

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.

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.

**Yaad rakho:** Total mein sab count; usable mein boundary ke 2 minus.

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.

| Class | First octet | Default mask | Network / host split | Purpose |
| --- | --- | --- | --- | --- |
| A | 1–126 (ordinary unicast) | 255.0.0.0 (/8) | 8 / 24 bits | Large historical unicast networks; 0 and 127 reserved |
| B | 128–191 | 255.255.0.0 (/16) | 16 / 16 bits | Medium historical unicast networks |
| C | 192–223 | 255.255.255.0 (/24) | 24 / 8 bits | Small historical unicast networks |
| D | 224–239 | No unicast default mask | Not network/host class split | Multicast |
| E | 240–255 | No unicast default mask | Not normal unicast allocation | Reserved/experimental; special addresses exist |

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.

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.

---

## TEE · Q1(b) · Additional shared bottleneck

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q1b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q1b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

### Given

4 flows, server links 400 Mbps, client links 300 Mbps, shared link 1000 Mbps.

### To find

Minimum extra shared link Re.

### Formula and why



$$
T=\min(R_s,R_c,R/n)
$$



A flow cannot exceed any link on its path; fair sharing divides the common capacity among n active flows.

### Solution

### Step 1. Convert and divide the shared capacity

1000 Mbps ÷ 4 = 250 Mbps per flow.

### Step 2. Take the smallest per-flow capacity

T=min(400,300,250)=**250 Mbps**.

### Step 3. Carry both downstream flows

Each of Hosts1 and2 requires 250 Mbps. Re must carry their sum: **Re≥500 Mbps**. Rc=300 Mbps is already at least 250 Mbps.

---

## TEE · Q1(c) · HTTP/1.1 delay

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q1c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q1c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

### Given

Known IP; new initial TCP connection; zero GET transmission; each object transmission=0.5 RTT.

### To find

Time to obtain both the base HTML and its referenced JPEG.

### Formula and why



$$
T_{object}=T_{setup}+RTT+T_{transmission}
$$



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.

### Solution

### Step 1. Download base HTML

1 RTT for TCP setup + 1 RTT for GET/first response bit + 0.5 RTT to transmit = **2.5 RTT**.

### Step 2. Download referenced JPEG

Existing TCP connection: 0 setup + 1 RTT for GET/response + 0.5 RTT transmission = 1.5 RTT.

### Step 3. Add sequential delays

**Total = 2.5+1.5=4 RTT**. DNS adds zero here because the IP address is already known.

---

## TEE · Q1(d) · Confidentiality versus integrity

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q1d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q1d

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q1(d). Distinguish confidentiality and integrity. Can either exist without the other? Justify. [5 marks]

### Answer

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.

---

## TEE · Q2(a) · Dijkstra from w

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q2a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q2a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Original diagram data

| Edge endpoint1 | Endpoint2 | Cost |
| --- | --- | --- |
| z | x | 8 |
| z | y | 12 |
| x | y | 6 |
| x | v | 3 |
| x | w | 6 |
| y | v | 8 |
| y | t | 7 |
| v | t | 4 |
| v | u | 3 |
| v | w | 4 |
| w | u | 3 |
| t | u | 2 |

### Answer

### Given

The original diagram is undirected. All edge labels are reproduced below. Source = w.

Swipe across the diagram to read its labels ↔

![Original undirected question graph: every edge weight retained; source w](https://deep-learning-study-room.vercel.app/cn/fig/old-ai-cn-2024-02-06-ai-q2a.60ea5488ef.svg)

Diagram: Original undirected question graph: every edge weight retained; source w. Labels: Original undirected question graph: every edge weight retained; source w | 8 | 12 | 6 | 3 | 6 | 8 | 7 | 4 | 3 | 4 | 3 | 2 | z | x | y | w | v | t | u

| From | To | Cost |
| --- | --- | --- |
| z | x | 8 |
| z | y | 12 |
| x | y | 6 |
| x | v | 3 |
| x | w | 6 |
| y | v | 8 |
| y | t | 7 |
| v | t | 4 |
| v | u | 3 |
| v | w | 4 |
| w | u | 3 |
| t | u | 2 |

### To find

Shortest distance, complete route and predecessor for every node from w.

### Formula and why



$$
d(v)\leftarrow\min(d(v),d(u)+w(u,v))
$$



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.

### Step 1. Initialize and relax

| Pass / settled node | Strict improvements | t | u | v | w | x | y | z |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 0 | Initial | ∞ | ∞ | ∞ | 0 | ∞ | ∞ | ∞ |
| w | u←w: 0+3=3; x←w: 0+6=6; v←w: 0+4=4 | ∞ | 3 | 4 | 0 | 6 | ∞ | ∞ |
| u | t←u: 3+2=5 | 5 | 3 | 4 | 0 | 6 | ∞ | ∞ |
| v | y←v: 4+8=12 | 5 | 3 | 4 | 0 | 6 | 12 | ∞ |
| t | No change | 5 | 3 | 4 | 0 | 6 | 12 | ∞ |
| x | z←x: 6+8=14 | 5 | 3 | 4 | 0 | 6 | 12 | 14 |
| y | No change | 5 | 3 | 4 | 0 | 6 | 12 | 14 |
| z | No change | 5 | 3 | 4 | 0 | 6 | 12 | 14 |

### Step 2. Read predecessors backwards, then reverse

| Destination | Distance | Previous | Route |
| --- | --- | --- | --- |
| t | 5 | u | w → u → t |
| u | 3 | w | w → u |
| v | 4 | w | w → v |
| w | 0 | — | w |
| x | 6 | w | w → x |
| y | 12 | v | w → v → y |
| z | 14 | x | w → x → z |

A tie between two equally short paths is valid; this table retains the first predecessor on equal distances.

---

## TEE · Q2(b) · Telnet connection ports

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q2b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q2b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

IP delivers a packet toward a host interface. The transport layer delivers application data to a **process endpoint**, 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.

Swipe across the diagram to read its labels ↔

![Transport: from hosts to application processes](https://deep-learning-study-room.vercel.app/cn/fig/tee-ports.f496c69028.svg)

Diagram: Transport: from hosts to application processes. Labels: Transport: from hosts to application processes | Transport: from hosts to application processes | Host address selects the machine/interface | Example destination: 198.51.100.20. | Protocol + destination port select service | TCP port 443 and UDP port 53 identify different transport endpoints. | Demultiplex to the right socket | TCP clients share server port 443; their address/port tuples distinguish the connections.

Several applications share IP connectivity; ports separate their transport endpoints.

1. At the sender, transport multiplexing accepts data from several application sockets and adds the appropriate header.
2. A server normally listens on a known service port; a client commonly chooses a temporary local port.
3. At the receiver, demultiplexing uses protocol/header information to deliver data to the appropriate socket.
4. 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.

| Identifier | Purpose |
| --- | --- |
| MAC address | Delivery on a local link |
| IP address | Network-layer interface/addressing |
| Port number | Transport-layer application endpoint |
| Domain name | Application-level naming resolved through DNS |

#### Practical example

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.

**Yaad rakho:** IP host tak; port process tak.

| Direction | Source port | Destination port |
| --- | --- | --- |
| Client→server | Example49152 | 23 (Telnet) |
| Server→client | 23 | 49152 |

Different client hosts may both use49152: their different source IP addresses distinguish the four-tuples. The server keeps separate connection state.

---

## TEE · Q2(c) · SDN routing application

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q2c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q2c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q2(c). At which SDN control-plane layer would a new routing protocol be implemented? Explain. [5 marks]

### Answer

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.

---

## TEE · Q3(a) · rdt3.0 error recovery

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q3a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q3a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

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.

| Case | Possible ordered transitions | Explanation |
| --- | --- | --- |
| No error | S0,R0,S3 | DATA0 and ACK0 both arrive |
| Corrupt data0 | S0,R3,S1,S2,R0,S3 | Receiver repeatsACK1; sender ignores it, times out, resends0 |
| Lost data0 | S0,S2,R0,S3 | No receiver event for the lost packet |
| Corrupt ACK0 | S0,R0,S1,S2,R1,S3 | Receiver has delivered0; duplicate0 getsACK0 without redelivery |
| Lost ACK0 | S0,R0,S2,R1,S3 | No sender event for a lost ACK; timeout triggers retry |

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.

---

## TEE · Q3(b) · DNS cache popularity

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q3b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q3b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

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.

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.

---

## TEE · Q3(c) · TLS impersonation

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q3c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q3c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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? [5 marks]

### Answer

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.

---

## TEE · Q3(d) · TLS nonces

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q3d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q3d

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q3(d). What is the purpose of random nonces in the TLS handshake? [5 marks]

### Answer

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.

---

## TEE · Q4(a) · Distance vector at z

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q4a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q4a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Answer

### Given

At z, neighbor costs c(z,v)=6 and c(z,x)=2; all original links are stated in the question.

### To find

Distance table at z over synchronous exchanges.

### Formula and why



$$
D_z(d)=\min\{6+D_v(d),\ 2+D_x(d)\}
$$



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.

### Solution

### Step 1. Evaluate both candidate routes for every destination

| Exchange input round | Destination | Via v | Via x | Minimum |
| --- | --- | --- | --- | --- |
| 0 | u | 7 | ∞ | 7 |
| 0 | v | 6 | 5 | 5 |
| 0 | x | 9 | 2 | 2 |
| 0 | y | ∞ | 5 | 5 |
| 1 | u | 7 | 6 | 6 |
| 1 | v | 6 | 5 | 5 |
| 1 | x | 9 | 2 | 2 |
| 1 | y | 9 | 5 | 5 |
| 2 | u | 7 | 6 | 6 |
| 2 | v | 6 | 5 | 5 |
| 2 | x | 9 | 2 | 2 |
| 2 | y | 9 | 5 | 5 |
| 3 | u | 7 | 6 | 6 |
| 3 | v | 6 | 5 | 5 |
| 3 | x | 9 | 2 | 2 |
| 3 | y | 9 | 5 | 5 |

### Step 2. Read the converged routes

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.

---

## TEE · Q4(b) · Cryptographic attack models

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q4b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q4b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q4(b). An intruder has an encrypted message and its decrypted version. Can the intruder mount ciphertext-only, known-plaintext or chosen-plaintext attacks? [5 marks]

### Answer

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.

---

## TEE · Q4(c) · CDN design

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q4c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q4c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q4(c). Name and describe the two CDN placement philosophies; give non-network factors besides delay, loss and bandwidth used in server selection. [5 marks]

### Answer

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.

---

## TEE · Q5(a) · Hamming error detection

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q5a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q5a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q5(a). The seven-bit received Hamming word is 1011001. Under even parity, determine correctness and locate any erroneous bit. [10 marks]

### Answer

### Given

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.

### To find

Syndrome, erroneous position, and corrected word.

### Formula and why



$$
s_p=\bigoplus_{i\,\&\,p\ne0}b_i,\quad \text{error position}=4s_4+2s_2+s_1
$$



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.

### Solution

### Step 1. Label every received bit

| Position | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Received bit | 1 | 0 | 1 | 1 | 0 | 0 | 1 |

### Step 2. Evaluate the three parity groups

| Parity | Covered positions | Bits added | Sum | Sum mod 2 |
| --- | --- | --- | --- | --- |
| 1 | 1, 3, 5, 7 | 1 + 0 + 1 + 1 | 3 | 1 |
| 2 | 2, 3, 6, 7 | 0 + 0 + 0 + 1 | 1 | 1 |
| 4 | 4, 5, 6, 7 | 1 + 1 + 0 + 1 | 3 | 1 |

### Step 3. Read the syndrome as a binary position

Syndrome s4s2s1 = 111; decimal = 7. Under the single-bit-error assumption, flip position 7 from the right. **Corrected word = 0011001**.

### Step 4. State the assumption

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.

---

## TEE · Q5(b) · CRC and damaged message

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q5b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q5b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

### Given

Data = 11010110101; generator bits = 10101; degree r = 4.

### To find

CRC remainder, complete transmitted frame and receiver check; then detect the specified bit inversion.

### Formula and why

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.

### Step 1. Append zeros

11010110101 → 110101101010000

### Step 2. Perform XOR division

| Leading position | Before XOR | Aligned generator | After XOR |
| --- | --- | --- | --- |
| 1 | 110101101010000 | 101010000000000 | 011111101010000 |
| 2 | 011111101010000 | 010101000000000 | 001010101010000 |
| 3 | 001010101010000 | 001010100000000 | 000000001010000 |
| 9 | 000000001010000 | 000000001010100 | 000000000000100 |

### Step 3. Build the frame

Remainder = **0100**. Transmit **110101101010100**.

### Step 4. Divide the received frame

| Position | Before | Generator | After |
| --- | --- | --- | --- |
| 1 | 110101101010100 | 101010000000000 | 011111101010100 |
| 2 | 011111101010100 | 010101000000000 | 001010101010100 |
| 3 | 001010101010100 | 001010100000000 | 000000001010100 |
| 9 | 000000001010100 | 000000001010100 | 000000000000000 |

Receiver remainder = 0000. No error is detected; this is not a guarantee that every possible corruption is detectable.

### Step 5. Invert bit 8 from the left

110101101010100 becomes 110101111010100.

| Position | Before | Generator | After |
| --- | --- | --- | --- |
| 1 | 110101111010100 | 101010000000000 | 011111111010100 |
| 2 | 011111111010100 | 010101000000000 | 001010111010100 |
| 3 | 001010111010100 | 001010100000000 | 000000011010100 |
| 8 | 000000011010100 | 000000010101000 | 000000001111100 |
| 9 | 000000001111100 | 000000001010100 | 000000000101000 |
| 10 | 000000000101000 | 000000000101010 | 000000000000010 |

Remainder = **0010**, which is nonzero: reject the frame and request recovery according to the error-control protocol.

---

## TEE · Q5(c) · 8-bit checksum

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q5c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q5c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q5(c). For data 10101001 00111001, show sender and receiver steps for an 8-bit checksum. [5 marks]

### Answer

### Given

10101001, 00111001; word width = 8 bits.

### To find

Sender checksum and receiver verification.

### Formula and why



$$
S=\operatorname{endAroundCarry}(\text{sum of words}),\qquad C=\operatorname{NOT}(S)
$$



One’s-complement addition returns an overflow carry to the least-significant end. Complement only after all words have been added.

### Solution

### Step 1. Add the words, folding each carry

| Word | Decimal | Raw addition | Folded addition | Running binary sum |
| --- | --- | --- | --- | --- |
| 10101001 | 169 | 169 | 169 + carry 0 = 169 | 10101001 |
| 00111001 | 57 | 226 | 226 + carry 0 = 226 | 11100010 |

### Step 2. Complement every bit

Running sum = 11100010. Change every 0 to 1 and every 1 to 0: **checksum = 00011101** (decimal 29).

### Step 3. Receiver adds the data and checksum

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.

---

## TEE · Q6(a) · Pure ALOHA timeline

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q6a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q6a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

### Given

Arrivals0.3,1.7,1.8,2.5,4.2,4.6; one-unit frames; no retries before time5.

### To find

Successful packet numbers and each relevant start/collision decision.

### Formula and why

Pure ALOHA sends immediately. Slotted ALOHA waits for the next slot. CSMA/CD senses only signals that have had time to propagate.

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.

### Solution

### Step 1. Trace every message

| Packet | Transmission / slot | Reason | Outcome |
| --- | --- | --- | --- |
| 1 | 0.3–1.3 | No overlap | Success |
| 2 | 1.7–2.7 | Overlaps3 and4 | Collision |
| 3 | 1.8–2.8 | Overlaps2 and4 | Collision |
| 4 | 2.5–3.5 | Overlaps2 and3 | Collision |
| 5 | 4.2–5.2 | Overlaps6 | Collision |
| 6 | 4.6–5.6 | Overlaps5 | Collision |

### Step 2. State successful messages

**1**.

---

## TEE · Q6(b) · Distance-vector link change

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q6b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q6b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

### Given

x–w2,x–y5,w–y2; Dw(u)=5,Dy(u)=6.

### To find

Dx(w),Dx(y),Dx(u) and a link change leaving Dx(u) unchanged.

### Formula and why



$$
D_x(u)=\min(2+5,5+6)
$$



Compare complete candidate route costs, not the last advertised value alone.

### Solution

### Step 1. Neighbor destinations

Dx(w)=2 direct. Dx(y)=min(5,2+2)=4 viaw.

### Step 2. Destination u

Dx(u)=min(7,11)=**7 viaw**. Vector for(w,y,u) is **(2,4,7)**.

### Step 3. Choose a harmless change

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.

---

## TEE · Q6(c) · Polling and token passing

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q6c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q6c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q6(c). Describe polling and token passing and distinguish them. [5 marks]

### Answer

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.

---

## TEE · Q6(d) · Classful and IPv6 addresses

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q6d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q6d

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q6(d). I. Find the class of (i)11000011 00111011 00001011 11101111 and (ii)129.5.25.111. II. Distinguish IPv4 and IPv6 addresses. [5 marks]

### Answer

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.

| Class | First octet | Default mask | Network / host split | Purpose |
| --- | --- | --- | --- | --- |
| A | 1–126 (ordinary unicast) | 255.0.0.0 (/8) | 8 / 24 bits | Large historical unicast networks; 0 and 127 reserved |
| B | 128–191 | 255.255.0.0 (/16) | 16 / 16 bits | Medium historical unicast networks |
| C | 192–223 | 255.255.255.0 (/24) | 24 / 8 bits | Small historical unicast networks |
| D | 224–239 | No unicast default mask | Not network/host class split | Multicast |
| E | 240–255 | No unicast default mask | Not normal unicast allocation | Reserved/experimental; special addresses exist |

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.

### Step 1. Classify the first octets

11000011₂=128+64+2+1=195: ClassC. 129 lies in128–191: ClassB.

**Definition.** IPv6 extends address size and reorganizes IP forwarding information into a fixed base header with extension headers.

**Simple meaning.** Sirf address bada nahi; header ka arrangement bhi badla.

## Understand it step by step

1. IPv6 uses unicast, multicast and anycast addressing; it does not use IPv4-style broadcast addressing.
2. Unicast identifies an interface; multicast addresses a group; anycast reaches one appropriate member of a group sharing an address, according to routing.
3. ::1 is loopback. fe80::/10 is link-local space. ff00::/8 identifies multicast. These serve different purposes.
4. IPv6 neighbour discovery replaces IPv4 ARP mechanisms. Do not write that IPv6 uses ARP to map its addresses.
5. IPv6 is not automatically encrypted or secure merely because it has a larger address space. Security depends on the mechanisms deployed.

| Feature | IPv4 | IPv6 |
| --- | --- | --- |
| Address width | 32 bits | 128 bits |
| Base/header size | 20–60 bytes depending on options | 40-byte fixed base header |
| Length field | Total length includes IPv4 header | Payload Length excludes 40-byte base header |
| Lifetime field | TTL | Hop Limit |
| Following protocol | Protocol field | Next Header; may identify an extension |
| Header checksum | Present | No base-header checksum |
| Options | Inside IPv4 header | Typically extension headers |
| Fragmentation fields | In IPv4 header; routers may fragment if permitted | Fragment extension header; fragmentation by source, not routers |

#### Practical example

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.

**Yaad rakho:** v4 total length; v6 payload length.

---

## TEE · Q7(a) · Network delay components

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q7a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q7a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q7(a). For a packet sent over a fixed route, list end-to-end delay components. Which are constant and which vary? [5 marks]

### Answer

**Optional worked extension.** 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.

**Definition.** 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.

**Simple meaning.** Pehla packet next link pe jaa raha hai, tab doosra packet first link pe aa sakta hai.

Swipe across the diagram to read its labels ↔

![Packet pipeline: successive packets use different links](https://deep-learning-study-room.vercel.app/cn/fig/pipeline.a023f04605.svg)

Diagram: Packet pipeline: successive packets use different links. Labels: Packet pipeline: successive packets use different links | Packet pipeline: successive packets use different links | Equal serialization intervals; propagation omitted in this sketch. | Link 1 | P1 | P2 | P3 | Link 2 | P1 | P2 | P3 | Link 3 | P1 | P2 | P3 | For h links and k equal packets: h + k − 1 packet times.

Store-and-forward and pipelining

## Understand it step by step

1. 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.
2. 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.
3. 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.
4. Count links, not routers: three intermediate routers between source and destination create four links. Include packet headers in L if the question supplies them.



$$
T_{\mathrm{message}}=hM/R+h\tau
$$





$$
T_{\mathrm{packet}}=(h+k-1)L/R+h\tau
$$



#### Practical example

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.

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.

**Yaad rakho:** First packet h times; remaining packets one time each.

| Delay | Formula / cause | Constant or variable on a fixed route |
| --- | --- | --- |
| Processing | Header/error/lookup work | Often modeled constant, can vary with implementation/load |
| Queuing | Waiting behind other packets | Variable with traffic |
| Transmission | L/R | Constant only when packet sizeL and link rateR are fixed |
| Propagation | Distance/speed | Approximately constant for a fixed physical link |

Sum these components over the traversed links/nodes; a fixed route alone does not make queueing delay constant.

---

## TEE · Q7(b) · Webmail to IMAP recipient

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q7b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q7b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

|  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| **Alice browser** | → | **HTTP(S) webmail service** | → | **SMTP between mail servers** | → | **Bob mailbox** | → | **IMAP client** |

| Stage | Protocol and role | Transport / conventional ports |
| --- | --- | --- |
| Browser submits message | HTTP POST over HTTPS; application uploads/pushes the message | HTTPS:TCP443; historical HTTP:TCP80 |
| Sender mail server→recipient mail server | SMTP pushes the mail to recipient domain | TCP25 for server relay; client submission commonly587 |
| Bob retrieves/synchronizes | IMAP pulls/synchronizes mailbox state | TCP143 (IMAP) /993 with implicit TLS |

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.

---

## TEE · Q7(c) · Selective Repeat implementation

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-feb-ai-reexam--q7c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-feb-ai-reexam/q7c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q7(c). What is Selective Repeat? Explain its implementation. [10 marks]

### Answer

**Selective Repeat (SR) ARQ** 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.

Swipe across the diagram to read its labels ↔

![SR W=4: individual ACKs and buffering](https://deep-learning-study-room.vercel.app/cn/fig/tee-sr.5ae2b52b45.svg)

Diagram: SR W=4: individual ACKs and buffering. Labels: SR W=4: individual ACKs and buffering | SR W=4: individual ACKs and buffering | Sender | Receiver | Frames 0,1 → accept and deliver | ACK 0 and ACK 1 individually | Frame 2 lost; frame 3 arrives | ACK 3; keep frame 3 in buffer | Timer for frame 2: resend only 2 | ACK 2; deliver 2, then buffered 3 | Sequence space 0…7; equal windows at most 4. | ACK i means that specific frame i was accepted.

SR buffers 3 while waiting for 2; only 2 is retransmitted.

1. For m=3 there are eight sequence numbers, 0…7. With equal sender and receiver windows, maximum W=23−1=4. Both windows begin at 0 and span 0…3.
2. 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.
3. Although 3 is acknowledged, the sender’s base cannot jump over missing 2. A timer for 2 expires; only frame 2 is retransmitted.
4. 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.
5. 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.
6. A repeated old frame can be acknowledged again without delivering it twice. SR needs more receiver storage and per-frame tracking than GBN.



$$
W_s=W_r\le 2^{m-1}
$$



#### Practical example

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.

**Yaad rakho:** SR selective resend; half sequence space keeps old and new separate.

---

## TEE · Q1(a) · Mission-critical switching choice

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q1a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q1a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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? [5 marks]

### Answer

**Definition.** Switching selects how data passes through intermediate network nodes from a source to a destination.

**Simple meaning.** Raasta reserve karna, poora message ruk-ruk ke bhejna, ya chhote packets bhejna—yeh teen ideas hain.

Swipe across the diagram to read its labels ↔

![Three switching techniques: what is forwarded?](https://deep-learning-study-room.vercel.app/cn/fig/switching.2b51f856d9.svg)

Diagram: Three switching techniques: what is forwarded?. Labels: Three switching techniques: what is forwarded? | Three switching techniques: what is forwarded? | 1. Circuit: reserve a path, then stream data | Setup → reserved capacity → data transfer → release. | 2. Message: store the entire message at each node | Large forwarding unit; no packet-level pipeline. | 3. Packet: divide, then forward packet by packet | Shared links can simultaneously carry different packets.

Circuit, message and packet switching

## Understand it step by step

1. **Circuit switching:** establish a circuit, reserve resources, transfer data, then release the circuit. Capacity is dedicated even during a silent period.
2. **Message switching:** each intermediate node receives the entire message before forwarding it. Large messages require large buffers and can delay later messages.
3. **Packet switching:** divide data into smaller packets. Nodes forward packets individually; different links can carry successive packets at the same time.
4. 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.

| Aspect | Circuit switching | Message switching | Packet switching |
| --- | --- | --- | --- |
| Unit handled | Continuous stream on established circuit | Whole message | Small packets |
| Resource use | Capacity reserved along a circuit | Shared; message stored at each intermediate node | Shared; each packet stored/forwarded in this model |
| Setup | Required before data transfer | No circuit setup required | Datagram: no connection setup; virtual circuit: setup |
| Delay | Setup delay, then relatively predictable service | Large store-and-forward delay for long messages | Variable delay; packet pipeline can reduce completion time |
| Main limitation | Reserved capacity can be idle | Large buffers; unsuitable for tight delay needs | Headers, possible queueing/loss; datagrams may reorder |

#### Practical example

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.

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.

**Yaad rakho:** Circuit reserves; message waits whole; packets pipeline.

**Choice:** 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.

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.

---

## TEE · Q1(b) · Store-and-forward delay

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q1b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q1b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

### Given

One packet, L=2000 bits;3 links;rate1000000 bits/s;propagation2ms/link;store-and-forward.

### To find

Total time until the final packet bit reaches the destination.

### Formula and why



$$
T=\sum_{i=1}^{3}(L/R_i+d_{prop,i})
$$



Each router must receive the complete packet before sending it onward, so all three serialization times count.

### Solution

### Step 1. Calculate serialization on one link

2000/1000000 seconds=0.002s=2ms.

### Step 2. Add propagation per link

2+2=4ms.

### Step 3. Add all three links

3×4=**12ms**. Queuing/processing are ignored as instructed.

---

## TEE · Q1(c) · Classful versus classless addressing

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q1c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q1c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q1(c). Explain classful IPv4 addressing and its advantages and disadvantages compared with classless addressing. [5 marks]

### Answer

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.

| Class | First octet | Default mask | Network / host split | Purpose |
| --- | --- | --- | --- | --- |
| A | 1–126 (ordinary unicast) | 255.0.0.0 (/8) | 8 / 24 bits | Large historical unicast networks; 0 and 127 reserved |
| B | 128–191 | 255.255.0.0 (/16) | 16 / 16 bits | Medium historical unicast networks |
| C | 192–223 | 255.255.255.0 (/24) | 24 / 8 bits | Small historical unicast networks |
| D | 224–239 | No unicast default mask | Not network/host class split | Multicast |
| E | 240–255 | No unicast default mask | Not normal unicast allocation | Reserved/experimental; special addresses exist |

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.

| Classful | CIDR/classless |
| --- | --- |
| Fixed A/B/C boundaries /8,/16,/24 | Prefix length explicitly states any suitable network boundary |
| Simple historical classification | Flexible allocation and aggregation |
| Wastes addresses when demand lies between fixed classes | Matches sizes more closely, reducing waste |
| Network determined partly by leading bits | Network determined by prefix mask |

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.

---

## TEE · Q1(d) · BGP AS-PATH

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q1d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q1d

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q1(d). How does BGP use its AS-PATH attribute? [5 marks]

### Answer

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.

---

## TEE · Q2(a) · Webmail and POP3 protocol journey

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q2a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q2a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Answer

|  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| **Alice browser** | → | **HTTP(S) webmail service** | → | **SMTP between mail servers** | → | **Bob mailbox** | → | **POP3 client** |

| Stage | Protocol and role | Transport / conventional ports |
| --- | --- | --- |
| Browser submits message | HTTP POST over HTTPS; application uploads/pushes the message | HTTPS:TCP443; historical HTTP:TCP80 |
| Sender mail server→recipient mail server | SMTP pushes the mail to recipient domain | TCP25 for server relay; client submission commonly587 |
| Bob retrieves/synchronizes | POP3 pulls messages for download | TCP110 (POP3) /995 with implicit TLS |

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.

---

## TEE · Q2(b) · CDN Bring Home

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q2b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q2b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q2(b). Briefly explain the Bring Home placement philosophy of CDNs. [5 marks]

### Answer

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.

---

## TEE · Q2(c) · ARP response destination

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q2c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q2c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q2(c). Why is an ARP response normally sent to a specific destination MAC address rather than broadcast? [5 marks]

### Answer

**Definition.** Address Resolution Protocol (ARP) resolves a known IPv4 address to a link-layer hardware address on the local network.

**Simple meaning.** IP pata hai; local delivery ke liye MAC chahiye.

Swipe across the diagram to read its labels ↔

![ARP resolves the selected local next hop](https://deep-learning-study-room.vercel.app/cn/fig/arp.c8af39ddb3.svg)

Diagram: ARP resolves the selected local next hop. Labels: ARP resolves the selected local next hop | ARP resolves the selected local next hop | 1. Decide local destination or gateway | Compare the destination with the local prefix. | 2. Look in the ARP cache | If the next-hop mapping is missing, send a local broadcast request. | 3. Receive the mapping | The address owner normally replies with its hardware address. | 4. Build the local frame | Use that MAC for the next link; retain the final destination IP.

ARP: find the local next-hop MAC address

## Understand it step by step

1. 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.
2. Check the ARP cache. If the next-hop mapping is absent, broadcast an ARP request on the local link.
3. The owner of the requested IPv4 address normally replies with its hardware address. The sender caches the mapping and constructs its data frame.
4. 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.

#### Practical example

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.

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.

**Yaad rakho:** Remote packet ka next-hop MAC gateway ka hota hai.

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.

---

## TEE · Q3(a) · Store-and-forward caravan

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q3a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q3a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Answer

### Given

10 cars; service1car/s; road400km; speed10km/s; each booth waits for all10 cars.

### To find

All seven timing/overlap questions.

### Formula and why



$$
T_{service}=N/r,\quad T_{travel}=d/v
$$



Transmission corresponds to serializing the whole caravan; propagation is the road journey of each individual car.

### Solution

### Step 1. Choose t=0 as first service start

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.

### Step 2. Answer every printed subpart

| Part | Answer | Reason |
| --- | --- | --- |
| 1 | 1 second | One car per second |
| 2 | 10 seconds | 10/1 |
| 3 | 40 seconds | Measured from first car departure |
| 4 | 40 seconds | Last car travels the same road at the same speed |
| 5 | 49 seconds | From first departure t1 to next service t50:50−1 |
| 6 | No | First booth service0–10; second50–60 |
| 7 | Yes | Neither is servicing during(10,50); in particular before first arrival, (10,41) |

Common mistake: part5 is not50s because its clock starts when the first car leaves, one second after the first service began.

---

## TEE · Q3(b) · Count to infinity

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q3b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q3b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q3(b). What is the count-to-infinity problem in distance-vector routing? [5 marks]

### Answer

**Definition.** 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.

**Simple meaning.** Dono neighbour ek dusre ko bol rahe: mere through jao—par actual route gaya.

## Understand it step by step

1. Before failure, B reaches a destination through A. After A loses the route, B may still advertise an old finite distance.
2. 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.
3. **Split horizon:** do not advertise a learned route back on the interface from which it was learned.
4. **Poison reverse:** advertise that reverse direction with an unreachable metric. **Route poisoning:** mark a failed destination unreachable. Triggered updates spread changes sooner.
5. These methods reduce common failure modes but do not constitute a universal proof that every multi-router loop is impossible.

#### Practical example

In RIP, a poisoned route is sent with metric 16. Receiving routers treat it as unreachable rather than a new usable longer route.

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.

**Yaad rakho:** Split: wapas mat bolo. Poison reverse: wapas bolo, par unreachable.

---

## TEE · Q3(c) · Reliable application over UDP

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q3c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q3c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q3(c). Can an application achieve reliable transfer while running over UDP? If so, how? [5 marks]

### Answer

**User Datagram Protocol (UDP)** provides connectionless, message-oriented process delivery. One send creates a datagram; message boundaries are retained. UDP has an **8-byte header**, 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.

Swipe across the diagram to read its labels ↔

![UDP header: each row contains 32 bits](https://deep-learning-study-room.vercel.app/cn/fig/tee-udp.b14cba3c28.svg)

Diagram: UDP header: each row contains 32 bits. Labels: UDP header: each row contains 32 bits | UDP header: each row contains 32 bits | Source port · 16 | Destination port · 16 | Length · 16 | Checksum · 16 | Total 8 bytes. Length = header + UDP payload.

UDP fixed header: four 16-bit fields, eight bytes total.

| UDP field | Width | Purpose |
| --- | --- | --- |
| Source port | 16 bits | Sending endpoint; a zero value can indicate no reply port when unused |
| Destination port | 16 bits | Receiving application endpoint |
| Length | 16 bits | UDP header plus UDP payload; minimum 8 bytes |
| Checksum | 16 bits | Error detection over UDP and an IP pseudo-header; not retransmission |

## Operation and services

1. 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.
2. The receiving UDP layer validates the length/checksum as applicable and uses the destination endpoint to deliver the datagram.
3. 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.
4. UDP checksum zero can mean checksum omitted in IPv4. IPv6 ordinarily requires the UDP checksum; specialized exceptions are outside this syllabus.

#### Practical example

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.

**Yaad rakho:** UDP datagram preserve; reliability automatic nahi.

**Yes, reliability can be implemented above UDP.** 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.

---

## TEE · Q4(a) · CRC codeword

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q4a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q4a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q4(a). Transmit bit stream 10011101 using CRC with G(x)=x³+1. Show the actual transmitted bit string. [5 marks]

### Answer

### Given

Data = 10011101; generator bits = 1001; degree r = 3.

### To find

CRC remainder, complete transmitted frame and receiver check.

### Formula and why

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.

### Step 1. Append zeros

10011101 → 10011101000

### Step 2. Perform XOR division

| Leading position | Before XOR | Aligned generator | After XOR |
| --- | --- | --- | --- |
| 1 | 10011101000 | 10010000000 | 00001101000 |
| 5 | 00001101000 | 00001001000 | 00000100000 |
| 6 | 00000100000 | 00000100100 | 00000000100 |

### Step 3. Build the frame

Remainder = **100**. Transmit **10011101100**.

### Step 4. Divide the received frame

| Position | Before | Generator | After |
| --- | --- | --- | --- |
| 1 | 10011101100 | 10010000000 | 00001101100 |
| 5 | 00001101100 | 00001001000 | 00000100100 |
| 6 | 00000100100 | 00000100100 | 00000000000 |

Receiver remainder = 000. No error is detected; this is not a guarantee that every possible corruption is detectable.

---

## TEE · Q4(b) · Internet checksum

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q4b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q4b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q4(b). Find the 8-bit checksum of 10110001, 10101011, 00110101, 10100001. [5 marks]

### Answer

### Given

10110001, 10101011, 00110101, 10100001; word width = 8 bits.

### To find

Sender checksum and receiver verification.

### Formula and why



$$
S=\operatorname{endAroundCarry}(\text{sum of words}),\qquad C=\operatorname{NOT}(S)
$$



One’s-complement addition returns an overflow carry to the least-significant end. Complement only after all words have been added.

### Solution

### Step 1. Add the words, folding each carry

| Word | Decimal | Raw addition | Folded addition | Running binary sum |
| --- | --- | --- | --- | --- |
| 10110001 | 177 | 177 | 177 + carry 0 = 177 | 10110001 |
| 10101011 | 171 | 348 | 92 + carry 1 = 93 | 01011101 |
| 00110101 | 53 | 146 | 146 + carry 0 = 146 | 10010010 |
| 10100001 | 161 | 307 | 51 + carry 1 = 52 | 00110100 |

### Step 2. Complement every bit

Running sum = 00110100. Change every 0 to 1 and every 1 to 0: **checksum = 11001011** (decimal 203).

### Step 3. Receiver adds the data and checksum

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.

---

## TEE · Q4(c) · Hamming generation and correction

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q4c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q4c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Answer

**Source note:** 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.

### Given

Data 10101111; even parity; one error at position 7 from the right.

### To find

Codeword, received word, syndrome, corrected data.

### Formula and why



$$
2^r\ge m+r+1,\qquad m=8
$$



Use the smallest r satisfying the inequality. Four checks label positions up to 12; parity positions are powers of two.

### Solution

### Step 1. Choose parity positions

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.

### Step 2. Insert data in the remaining positions

| Position (right-to-left index) | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Role | data | data | data | data | p8 | data | data | data | p4 | data | p2 | p1 |
| Data/parity | 1 | 0 | 1 | 0 | ? | 1 | 1 | 1 | ? | 1 | ? | ? |

### Step 3. Set each parity bit for an even total

| Parity | Other covered positions | Other bits | Parity bit |
| --- | --- | --- | --- |
| 1 | 3, 5, 7, 9, 11 | 1 + 1 + 1 + 0 + 0 | 1 |
| 2 | 3, 6, 7, 10, 11 | 1 + 1 + 1 + 1 + 0 | 0 |
| 4 | 5, 6, 7, 12 | 1 + 1 + 1 + 1 | 0 |
| 8 | 9, 10, 11, 12 | 0 + 1 + 0 + 1 | 0 |

**Transmitted codeword = 101001110101**.

### Step 4. Flip position 7

Position7 changes 1→0. Received word = **101000110101**.

### Step 5. Compute the received syndrome

| Parity check | Positions | XOR |
| --- | --- | --- |
| 1 | 1,3,5,7,9,11 | 1 |
| 2 | 2,3,6,7,10,11 | 1 |
| 4 | 4,5,6,7,12 | 1 |
| 8 | 8,9,10,11,12 | 0 |

s8s4s2s1 = 0111 = 7. Flip position7 back; all four checks become0. Remove positions1,2,4,8 to recover **10101111**.

---

## TEE · Q5(a) · Persistent HTTP cache delay

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q5a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q5a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Answer

**Source note:** 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.

### Given

200 sequential requests;50%hits;hit delay0;miss RTT1s and object transmission4s.

### To find

Total time, making connection setup assumption explicit.

### Formula and why



$$
T=N_{hit}T_{hit}+N_{miss}(RTT+T_{object})+T_{setup}
$$



Sequential requests cannot overlap, and without conditional validation a cache hit needs no origin round trip.

### Solution

### Step 1. Count hits and misses

Hits=200×0.5=100; misses=100.

### Step 2. Add response delays

Each miss costs1+4=5s. Total response time=100×0+100×5=**500s**.

### Step 3. State the setup convention

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.

---

## TEE · Q5(b) · Iterative DNS resolution

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q5b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q5b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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? [5 marks]

### Answer

The **Domain Name System (DNS)** 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.

Swipe across the diagram to read its labels ↔

![DNS namespace: full label paths are unique](https://deep-learning-study-room.vercel.app/cn/fig/tee-dns.f5345fe9fb.svg)

Diagram: DNS namespace: full label paths are unique. Labels: DNS namespace: full label paths are unique | DNS namespace: full label paths are unique | Root . | com | org | example.com | example.org | www.example.com | www.example.org | Same local label “www”; different full names, so no collision.

Root, top-level domains, delegated domain and host labels.

| Level | Example | Meaning |
| --- | --- | --- |
| Root | . | Top of the namespace |
| Top-level domain (TLD) | com, org, in | A child zone below the root |
| Registered/delegated domain | example.com | Name under a parent such as com |
| Subdomain/host label | www.example.com | A label below example.com; a name may own different record types |

## Why names remain unique

1. 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.
2. 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.
3. 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.
4. 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.

## Resolution

1. A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.
2. 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.
3. 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.

#### Practical example

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.

**Yaad rakho:** Full path unique; www label akela unique nahi.

| Part | Answer | Explanation |
| --- | --- | --- |
| 1 | DNS Local | Check the local resolver cache first |
| 2 | DNS TLD | Root supplies a referral toward .edu TLD servers; the response packet itself goes back to local DNS |
| 3 | DNS Authoritative | TLD supplies a referral toward the responsible authoritative servers; response goes back to local DNS |
| 4 | A record | Contains an IPv4 address; AAAA would contain IPv6 |
| 5 | Iterative between the resolver and hierarchy; recursive client-to-resolver | Neither is universally best in every role. Typical deployment combines the two |

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.

---

## TEE · Q5(c) · Longest-prefix matching

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q5c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q5c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

### Given

Prefixes01→1,10→2,011→3,100→4,001→5,default→6.

### To find

Output interface for each destination.

### Formula and why

Among matching prefixes choose the one with the most bits; use default only when none match.

The leading bits must match from the first bit; a substring appearing later does not count.

### Solution

### Step 1. Compare each destination from the left

| Destination | Matching prefixes | Longest | Interface |
| --- | --- | --- | --- |
| 00111101 | 001 | 001 | 5 |
| 01010101 | 01 (but not011) | 01 | 1 |
| 11001001 | None | Default | 6 |

### Step 2. Write final order

**5, 1, 6.**

---

## TEE · Q6(a) · Classful network and host portions

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q6a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q6a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q6(a). Identify class, default subnet mask, network, broadcast and host portion for (a)191.5.8.9 and (b)214.25.6.3. [5 marks]

### Answer

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.

| Class | First octet | Default mask | Network / host split | Purpose |
| --- | --- | --- | --- | --- |
| A | 1–126 (ordinary unicast) | 255.0.0.0 (/8) | 8 / 24 bits | Large historical unicast networks; 0 and 127 reserved |
| B | 128–191 | 255.255.0.0 (/16) | 16 / 16 bits | Medium historical unicast networks |
| C | 192–223 | 255.255.255.0 (/24) | 24 / 8 bits | Small historical unicast networks |
| D | 224–239 | No unicast default mask | Not network/host class split | Multicast |
| E | 240–255 | No unicast default mask | Not normal unicast allocation | Reserved/experimental; special addresses exist |

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.

### Given

191.5.8.9 and214.25.6.3; historical default class masks.

### To find

Class, mask, network, broadcast and host portion.

### Formula and why

Network = address AND mask; broadcast = network with all host bits1.

Without a custom prefix the question’s classful default determines the split.

### Solution

| Address | Class | Mask | Network | Broadcast | Host portion |
| --- | --- | --- | --- | --- | --- |
| 191.5.8.9 | B | 255.255.0.0 (/16) | 191.5.0.0 | 191.5.255.255 | 8.9 (16 bits) |
| 214.25.6.3 | C | 255.255.255.0 (/24) | 214.25.6.0 | 214.25.6.255 | 3 (8 bits) |

The supplied address itself is a host address; “host portion” means the suffix left after removing the network bits.

---

## TEE · Q6(b) · CSMA without collision detection

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q6b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q6b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

### Given

Arrival times0.3,0.6,0.9,1.6,2.7,3.3,4.3;frame1;propagation0.4.

### To find

Starts/busy decisions and successfully received packets.

### Formula and why

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.

A node may start before an earlier distant transmission has arrived. Such starts can collide even though each node initially sensed idle.

### Solution

### Step 1. Inspect arrivals chronologically

| Packet | Arrival | Decision | Reason |
| --- | --- | --- | --- |
| 1 | 0.3 | 0.3 | No prior signal |
| 2 | 0.6 | 0.6 | Signal1 first arrives0.7 |
| 3 | 0.9 | s | Signal1 busy[0.7,1.7] |
| 4 | 1.6 | s | Signals1 and2 are busy |
| 5 | 2.7 | 2.7 | Both prior signals cleared by2.0 |
| 6 | 3.3 | s | Signal5 busy[3.1,4.1] |
| 7 | 4.3 | 4.3 | Signal5 cleared by4.1 |

### Step 2. Identify collisions

Frames1 and2 overlap and collide. Frames5 and7 have no overlapping reception intervals at another node. **Starts:0.3,0.6,s,s,2.7,s,4.3. Successes:5,7.**

---

## TEE · Q6(c) · Recovering unknown routing weights

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q6c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q6c

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [5 marks]

### Answer

### Given

dV(U)=6 with predecessorV; dV(nodeX)=4 with predecessorV. Unknown linkX is U–V; linkY is U–nodeX.

### To find

Unknown edge costs or n/a.

### Formula and why



$$
d(U)=d(\operatorname{pred}(U))+c(\operatorname{pred}(U),U)
$$



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.

### Solution

### Step 1. Recover link X

U’s predecessor isV:6=0+X, therefore **X=6**.

### Step 2. Test what is known about link Y

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 **Y=n/a (not uniquely determined)**.

---

## TEE · Q6(d) · ALOHA comparison

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q6d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q6d

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q6(d). Describe pure and slotted ALOHA and distinguish them. [5 marks]

### Answer

**Definition.** 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.

**Simple meaning.** Frame ready → bhej do. Collision hua → random wait karke retry.

Swipe across the diagram to read its labels ↔

![Pure ALOHA: arbitrary start times can overlap](https://deep-learning-study-room.vercel.app/cn/fig/pure-aloha.8aa7732ee2.svg)

Diagram: Pure ALOHA: arbitrary start times can overlap. Labels: Pure ALOHA: arbitrary start times can overlap | Pure ALOHA: arbitrary start times can overlap | Station A | Station B | Frame A | Frame B | Overlap: both fail in the basic collision model | A retry begins after a random waiting interval.

Pure ALOHA: transmit first, retry if necessary

## Understand it step by step

1. Several stations share the same channel. Pure ALOHA does not first check whether the channel is idle.
2. A station transmits immediately. In the basic collision-channel model, any overlapping frame makes the involved frames unsuccessful.
3. 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.
4. The station waits a random backoff time and retries. If every station used the same fixed delay, they could collide again together.

#### Practical example

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.

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.

**Yaad rakho:** Pure = kisi bhi time start; retry ka wait random.

**Definition.** The vulnerable period is the interval of start times of other frames that would cause a collision with a chosen frame.

**Simple meaning.** Apne frame se ek frame-time pehle start hua frame bhi takra sakta hai, aur baad mein bhi.

Swipe across the diagram to read its labels ↔

![Pure ALOHA: interfering starts from −T to +T](https://deep-learning-study-room.vercel.app/cn/fig/vulnerable.e2a01a5ab7.svg)

Diagram: Pure ALOHA: interfering starts from −T to +T. Labels: Pure ALOHA: interfering starts from −T to +T | Pure ALOHA: interfering starts from −T to +T | −T | 0 | +T | Our frame: 0 to T | Vulnerable start-time interval length = 2T

Why Pure ALOHA has a 2T vulnerable period

## Understand it step by step

1. Let your frame start at time 0 and finish at T. All frames have the same transmission duration T.
2. Another frame starting between −T and 0 is still being transmitted when your frame begins.
3. Another frame starting between 0 and T begins before your frame ends.
4. Therefore interfering start times occupy an interval of length 2T. Exact boundary contact is treated as non-overlap in this idealized timing model.

#### Practical example

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.

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.

**Yaad rakho:** Pure: before T + after T = 2T.

**Definition.** 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.

**Simple meaning.** Frame ready hai tab bhi next slot ki start-line ka wait karo.

Swipe across the diagram to read its labels ↔

![Slotted ALOHA: one frame duration per slot](https://deep-learning-study-room.vercel.app/cn/fig/slotted-aloha.fbfbef9647.svg)

Diagram: Slotted ALOHA: one frame duration per slot. Labels: Slotted ALOHA: one frame duration per slot | Slotted ALOHA: one frame duration per slot | 0T | 1T | 2T | 3T | 4T | 5T | Station A | Station B | A1 | A2 | B1 | B2 | A2 and B1 choose the same slot: collision. Starts stay aligned.

Slotted ALOHA: starts only at slot boundaries

## Understand it step by step

1. All stations agree on slot boundaries; time synchronization is required.
2. A station with a frame waits for a slot boundary before starting. A slot can be idle, successful or a collision.
3. Exactly one station transmitting in a slot produces success in the ideal model. Two or more simultaneous attempts collide.
4. Frames cannot partially overlap adjacent slots under the assumptions. The vulnerable interval is T instead of 2T. Randomized retries are still needed.

#### Practical example

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.

| Feature | Pure | Slotted |
| --- | --- | --- |
| Start time | Any time | Slot boundary only |
| Synchronization | No common slots required | Required |
| Vulnerable period | 2T | T |
| Maximum S | 1/(2e) ≈ 0.184 | 1/e ≈ 0.368 |
| G at maximum | 0.5 | 1 |

**Yaad rakho:** Slotted = aligned starts; collision risk half-window, not zero.

---

## TEE · Q7(a) · Learning-switch tables, mislabeled ARP

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q7a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q7a

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Answer

**Source note:** 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.

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.

---

## TEE · Q7(b) · NAT four packet stages

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q7b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q7b

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### 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. [10 marks]

### Answer

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.

---

## TEE · Attempt a complete 100-mark paper

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-guide--instructions/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-guide/instructions

TEE · Authored practice using the two supplied papers’ structure · current syllabus 702AI0C023

**Historical pattern used for these compiled mocks: 3 hours, 100 marks. Q1 is compulsory; attempt any four whole questions from Q2–Q7.** 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.

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.

| Planning suggestion | Time |
| --- | --- |
| Read and select four question groups | 10 minutes |
| Write five 20-mark questions including Q1 | About 32 minutes each |
| Check units, diagrams, sequence numbers and chosen parts | 10 minutes |

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.

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.

---

## TEE · Q1A · Networks and design

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-a--q1a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-a/q1a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [5 mock marks]

#### Answer

| Criterion | Wired campus links | Wireless campus access |
| --- | --- | --- |
| Speed/capacity | Dedicated switch ports and fiber backbones can provide high, predictable capacity | Capacity shared over radio; performance depends on contention, coverage and interference |
| Reliability | Stable when cables/ports and redundant uplinks are healthy | Mobility and flexible access; radio interference and coverage holes can cause variability |
| Security | Physical access control helps, but ports still need authentication/segmentation | Use authenticated encryption and managed access; radio extends beyond rooms |
| Deployment | Cabling cost and fixed access points | Supports mobile users and faster coverage changes |
| Recommended role | Servers, laboratories, inter-building backbone | Students’ phones/laptops, roaming and guest access |

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.

#### Practical example

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.

---

## TEE · Q1B · Reference models

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-a--q1b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-a/q1b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q1B. Draw the TCP/IP reference model, explain all layers and compare it with OSI on five points. [5 mock marks]

#### Answer

The **TCP/IP model** 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.

Swipe across the diagram to read its labels ↔

![OSI layers mapped to the four-layer TCP/IP model](https://deep-learning-study-room.vercel.app/cn/fig/tee-models.5bff0518c8.svg)

Diagram: OSI layers mapped to the four-layer TCP/IP model. Labels: OSI layers mapped to the four-layer TCP/IP model | OSI layers mapped to the four-layer TCP/IP model | 7 Application | 6 Presentation | 5 Session | 4 Transport | 3 Network | 2 Data link | 1 Physical | Application | HTTP, DNS, FTP, SMTP | Transport | Internet | Link / network access | Includes physical access | Some textbooks split link into data link + physical: five layers.

Four TCP/IP layers; the link layer includes the physical medium.

| TCP/IP layer | Function | Examples |
| --- | --- | --- |
| Application | Defines application message formats and exchanges for Web access, naming, email and file transfer; includes presentation/session functions as needed | HTTP, DNS, SMTP, FTP |
| Transport | End-to-end process communication | TCP, UDP, SCTP |
| Internet | IP addressing, routing and best-effort datagrams | IPv4/IPv6 |
| Link/network access | Local delivery and physical access | Ethernet/Wi-Fi and their medium |

| Point | OSI | TCP/IP |
| --- | --- | --- |
| Layer count | Seven | Four here; five-layer teaching variant splits link |
| Upper functions | Application, presentation, session separated | Grouped under application |
| Lower functions | Data link and physical separated | Grouped under link/network access |
| Purpose | General reference architecture | Architecture of deployed Internet protocol family |
| Network service | Reference model can describe different services | Internet layer uses connectionless IP |
| Transport | Conceptual transport service | TCP reliable byte stream; UDP datagrams; SCTP messages |

#### Practical example

An application can use UDP without changing the IP or Ethernet layers. Layering lets one protocol vary without redesigning every network function.

---

## TEE · Q1C · ALOHA throughput

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-a--q1c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-a/q1c

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [5 mock marks]

#### Answer

## Given

Protocol = Pure ALOHA; G = 0.25 attempts/frame time.

## To find

S, 100S and the maximum possible S.

## Formula and why



$$
S=G e^{-2G}
$$



Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.

## Step-by-step solution

#### Step 1. Calculate the exponent

−2 × 0.25 = -0.5.

#### Step 2. Evaluate the exponential



$$
e^{-0.5} \approx 0.606530660
$$



#### Step 3. Multiply by G

S = 0.25 × 0.606530660 ≈ 0.151632665 successful frames/frame time.

#### Step 4. Convert to percentage

0.151632665 × 100 ≈ 15.1633%.

#### Step 5. State the maximum separately

The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.

**Final answer:** S ≈ 0.151633; percentage ≈ 15.1633%; Smax ≈ 0.183940 at G=0.5.

#### What this result means

A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.

---

## TEE · Q1D · IPv4 address block

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-a--q1d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-a/q1d

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [5 mock marks]

#### Answer

## Given

IP/prefix = `192.168.8.173/27`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−27=5; N=25=32.

#### Step 2. Construct the mask

Mask=`255.255.255.224`; binary=`11111111.11111111.11111111.11100000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 4. Its mask value is 224, so step=256−224=32. The IP value 173 lies in 160…191.

#### Step 4. Form the first/network address

Keep earlier octets; place 160 in octet 4; set any later octets to zero. Network=**192.168.8.160**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 11000000 | 11111111 | 11000000 | 192 |
| 2 | 10101000 | 11111111 | 10101000 | 168 |
| 3 | 00001000 | 11111111 | 00001000 | 8 |
| 4 | 10101101 | 11100000 | 10100000 | 160 |

#### Step 6. Form the last/broadcast address

Use 191 in the changing octet and 255 in any later octets. Broadcast=**192.168.8.191**.

#### Step 7. State usable hosts

First usable=192.168.8.161; last usable=192.168.8.190; count=32−2=30.

**Final answer:** Network 192.168.8.160; broadcast 192.168.8.191; 32 total, 30 ordinary usable; range 192.168.8.161–192.168.8.190.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## TEE · Q2A · Error detection and correction

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-a--q2a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-a/q2a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [10 mock marks]

#### Answer

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.

## Given

| Codeword | Bits |
| --- | --- |
| C1 | 0000000 |
| C2 | 1111000 |
| C3 | 0011110 |

## To find

All pair distances, dmin and the maximum guaranteed numbers of errors.

## Formula and why



$$
d(a,b)=\mathrm{weight}(a\oplus b)
$$





$$
s=d_{\min}-1,\quad t=\lfloor(d_{\min}-1)/2\rfloor
$$



XOR exposes differing positions. Use the closest codeword pair, because it is the weakest separation in the code.

## Step-by-step solution

#### Step 1. XOR every distinct pair

| Pair | First | Second | XOR | Distance |
| --- | --- | --- | --- | --- |
| C1 vs C2 | 0000000 | 1111000 | 1111000 | 4 |
| C1 vs C3 | 0000000 | 0011110 | 0011110 | 4 |
| C2 vs C3 | 1111000 | 0011110 | 1100110 | 4 |

#### Step 2. Take the minimum

dmin = min(4, 4, 4) = 4.

#### Step 3. Calculate the guarantees

Detect = 4−1 = 3; correct = floor((4−1)/2) = 1.

#### Step 4. Justify geometrically

4 bit changes can reach another valid codeword, so only 3 are guaranteed detectable. Correction regions require 2t < 4.

**Final answer:** dmin=4; detect up to 3 errors; correct up to 1 errors.

#### What this result means

A distance of one particular pair does not set the whole-code capability unless it is the minimum.

---

## TEE · Q2B · Switching or subnet design

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-a--q2b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-a/q2b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [10 mock marks]

#### Answer

Swipe across the diagram to read its labels ↔

![Three switching techniques: what is forwarded?](https://deep-learning-study-room.vercel.app/cn/fig/switching.2b51f856d9.svg)

Diagram: Three switching techniques: what is forwarded?. Labels: Three switching techniques: what is forwarded? | Three switching techniques: what is forwarded? | 1. Circuit: reserve a path, then stream data | Setup → reserved capacity → data transfer → release. | 2. Message: store the entire message at each node | Large forwarding unit; no packet-level pipeline. | 3. Packet: divide, then forward packet by packet | Shared links can simultaneously carry different packets.

The three forwarding units and resource choices.

## Circuit switching

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.

## Message switching

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.

## Packet switching

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.

| Aspect | Circuit switching | Message switching | Packet switching |
| --- | --- | --- | --- |
| Unit handled | Continuous stream on established circuit | Whole message | Small packets |
| Resource use | Capacity reserved along a circuit | Shared; message stored at each intermediate node | Shared; each packet stored/forwarded in this model |
| Setup | Required before data transfer | No circuit setup required | Datagram: no connection setup; virtual circuit: setup |
| Delay | Setup delay, then relatively predictable service | Large store-and-forward delay for long messages | Variable delay; packet pipeline can reduce completion time |
| Main limitation | Reserved capacity can be idle | Large buffers; unsuitable for tight delay needs | Headers, possible queueing/loss; datagrams may reorder |

## Recommendation

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.

#### Practical example

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.

---

## TEE · Q3A · Network classifications and topologies

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-a--q3a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-a/q3a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q3A. Define a computer network. Explain LAN, MAN, PAN, WAN and ARPANET with examples. [5 mock marks]

#### Answer

A **computer network** 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.

| Type | Meaning and scope | Example |
| --- | --- | --- |
| PAN | Personal Area Network: a person’s nearby devices | Phone linked to earbuds |
| LAN | Local Area Network: a building or local campus network under local administration | Laboratory Ethernet/Wi-Fi |
| MAN | Metropolitan Area Network: interconnects sites across a town/city | City-wide institutional network |
| WAN | Wide Area Network: connects geographically separated networks over regional/global links | Branches in different cities |
| ARPANET | Historical packet-switched research network; a major predecessor of the Internet | Early interconnected research institutions; not a modern geographic size category |

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.

#### Practical example

A student uses a PAN for earbuds, a LAN in the lab and a WAN when accessing a distant university service.

---

## TEE · Q3B · OSPF

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-a--q3b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-a/q3b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q3B. Explain the different types of OSPF packets used for communication between routers. [5 mock marks]

#### Answer

Swipe across the diagram to read its labels ↔

![OSPFv2: five distinct packet types](https://deep-learning-study-room.vercel.app/cn/fig/ospf-packets.6093f0d178.svg)

Diagram: OSPFv2: five distinct packet types. Labels: OSPFv2: five distinct packet types | OSPFv2: five distinct packet types | 1. Hello | Discover and maintain neighbour relationships. | 2. Database Description | Summarize link-state database contents. | 3. Link State Request | Ask for particular missing or newer LSAs. | 4. Link State Update | Carry one or more LSAs. | 5. Link State Acknowledgment | Acknowledge receipt of LSAs.

Five OSPFv2 packet types.

| Packet type | What it does | Simple example |
| --- | --- | --- |
| Hello | Discover/maintain neighbours and exchange relationship parameters | Are we still neighbours? |
| Database Description (DD/DBD) | Summarize link-state database contents during synchronization | Here are the LSA headers I have |
| Link State Request (LSR) | Ask for specific missing/newer link-state information | Please send this LSA |
| Link State Update (LSU) | Carry one or more LSAs | Here is the requested or newly flooded link-state information |
| Link State Acknowledgment (LSAck) | Acknowledge receipt of LSAs | I received these LSAs |

Database Description packets carry summaries; Link State Update packets carry LSAs themselves. Do not confuse an LSA type with an OSPF packet type.

#### Practical example

After seeing a missing LSA in a database summary, a router sends an LSR, receives an LSU containing it and sends an LSAck.

---

## TEE · Q3C · Application-layer mechanism

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-a--q3c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-a/q3c

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [10 mock marks]

#### Answer

The **World Wide Web (WWW)** 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. **HTTP** defines request/response semantics between these components. The Web is one application of the Internet, not a synonym for the entire Internet.

Swipe across the diagram to read its labels ↔

![Opening a plain HTTP/1.1 URL](https://deep-learning-study-room.vercel.app/cn/fig/tee-http.de65bc75dd.svg)

Diagram: Opening a plain HTTP/1.1 URL. Labels: Opening a plain HTTP/1.1 URL | Opening a plain HTTP/1.1 URL | Browser parses http://www.example.com/ | Scheme=http, host=www.example.com, path=/, default port=80. | DNS resolves the host | A cached or newly resolved address identifies the target endpoint. | TCP establishes the connection | For this HTTP/1.1 example, client connects to server port 80. | HTTP request → HTTP response | GET / with Host header → status, headers and representation body. | Browser parses and displays | HTML may refer to extra objects, each needing retrieval or cache lookup.

URL → DNS → connection → HTTP request/response → displayed document.

1. Interpret the URL **http://www.example.com/**: 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.
2. Resolve the hostname using DNS, often via cached results and a recursive resolver. DNS finds an address; it does not download the Web page.
3. 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.
4. 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.
5. 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.
6. The browser parses HTML, retrieves referenced objects as needed and renders the page. Caching may avoid transfers; persistent connections can serve multiple requests.

| Message component | Purpose |
| --- | --- |
| Request method / target | Requested action and resource; GET retrieves a representation, POST submits data for processing |
| Headers | Metadata, routing context, representation preferences and cache/connection information |
| Status code | Result class: 2xx success, 3xx redirection, 4xx client error, 5xx server error |
| Body | Representation or submitted content when present |

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.

#### Practical example

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.

---

## TEE · Q4A · IPv6 and packet headers

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-a--q4a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-a/q4a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [10 mock marks]

#### Answer

## Given

Given address: `0:15::1:12:1213`.

## To find

The full 128-bit address in eight-group hexadecimal notation.

## Formula and why



$$
\text{missing groups}=8-\text{visible groups}
$$



A written 0 is a visible group. :: represents only the omitted all-zero groups.

## Step-by-step solution

#### Step 1. Count groups on both sides

Left: 0, 15 (2 group(s)). Right: 1, 12, 1213 (3 group(s)).

#### Step 2. Calculate omitted groups

Visible=2+3=5. Missing=8−5=3.

#### Step 3. Insert the groups

`0:15:0:0:0:1:12:1213`.

#### Step 4. Pad each group on the left

| Group number | Four-digit group |
| --- | --- |
| 1 | 0000 |
| 2 | 0015 |
| 3 | 0000 |
| 4 | 0000 |
| 5 | 0000 |
| 6 | 0001 |
| 7 | 0012 |
| 8 | 1213 |

#### Step 5. Write all eight in order

`0000:0015:0000:0000:0000:0001:0012:1213`.

**Final answer:** `0000:0015:0000:0000:0000:0001:0012:1213`

#### What this result means

Leading zeros change the spelling, not the address value. The final group count is eight.

## Header comparison

| Feature | IPv4 | IPv6 |
| --- | --- | --- |
| Address width | 32 bits | 128 bits |
| Base/header size | 20–60 bytes depending on options | 40-byte fixed base header |
| Length field | Total length includes IPv4 header | Payload Length excludes 40-byte base header |
| Lifetime field | TTL | Hop Limit |
| Following protocol | Protocol field | Next Header; may identify an extension |
| Header checksum | Present | No base-header checksum |
| Options | Inside IPv4 header | Typically extension headers |
| Fragmentation fields | In IPv4 header; routers may fragment if permitted | Fragment extension header; fragmentation by source, not routers |

Swipe across the diagram to read its labels ↔

![IPv6 base header · each horizontal row is 32 bits wide](https://deep-learning-study-room.vercel.app/cn/fig/ipv6-header.aef1bfbac7.svg)

Diagram: IPv6 base header · each horizontal row is 32 bits wide. Labels: IPv6 base header · each horizontal row is 32 bits wide | IPv6 base header · each horizontal row is 32 bits wide | Version | 4 | Traffic Class | 8 | Flow Label · 20 | Payload Length · 16 | Next Header | 8 | Hop Limit | 8 | Source address · 128 bits (four rows) | Destination address · 128 bits (four rows)

Fixed IPv6 base header.

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.

---

## TEE · Q4B · Transport-layer mechanism

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-a--q4b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-a/q4b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q4B. What is TCP three-way handshaking? Explain establishment, data transfer and termination with labelled diagrams. [10 mock marks]

#### Answer

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.

Swipe across the diagram to read its labels ↔

![TCP: handshake, data and orderly close](https://deep-learning-study-room.vercel.app/cn/fig/tee-handshake.e053246177.svg)

Diagram: TCP: handshake, data and orderly close. Labels: TCP: handshake, data and orderly close | TCP: handshake, data and orderly close | Client | Server | SYN Seq=1000 | SYN+ACK Seq=5000, Ack=1001 | ACK Seq=1001, Ack=5001 | 200 data bytes: Seq=1001, last=1200 | ACK=1201 (next expected byte) | FIN Seq=1201 | ACK=1202; server may still send | FIN Seq=5001 (no server data here) | ACK=5002; common active-close TIME-WAIT | Pure ACK uses no sequence space. SYN and FIN each use one.

SYN and FIN each consume one sequence number; pure ACK consumes none.

| Step | Segment | Meaning |
| --- | --- | --- |
| 1 Client → server | SYN, Seq=1000 | Client proposes its starting sequence |
| 2 Server → client | SYN+ACK, Seq=5000, Ack=1001 | Server acknowledges client SYN and supplies its own start |
| 3 Client → server | ACK, Seq=1001, Ack=5001 | Client acknowledges server SYN; connection is established |

## Data transfer

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.

## Orderly termination

1. Assume client’s next data sequence is 1201. It sends FIN with Seq=1201, meaning it has finished sending.
2. Server sends ACK=1202. The connection is half closed: the server can still send data until its application finishes.
3. Assume server has sent no data since the handshake. It sends FIN with Seq=5001.
4. 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.
5. 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.

#### Practical example

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.

---

## TEE · Q5A · Sliding-window ARQ

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-a--q5a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-a/q5a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [10 mock marks]

#### Answer

**Go-Back-N (GBN) ARQ** pipelines up to W outstanding frames. For m-bit sequence numbers, textbook GBN uses W ≤ 2m−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”.

Swipe across the diagram to read its labels ↔

![GBN W=7: loss and cumulative ACKs](https://deep-learning-study-room.vercel.app/cn/fig/tee-gbn.5f577a6979.svg)

Diagram: GBN W=7: loss and cumulative ACKs. Labels: GBN W=7: loss and cumulative ACKs | GBN W=7: loss and cumulative ACKs | Sender | Receiver | Frames 0,1 → accept in order | ACK 2: next expected is 2 | Frame 2 lost | Frames 3,4,5,6 → discard out of order | ACK 2 repeated | Timer for 2 expires: resend 2,3,4,5,6 | ACK 7: frames through 6 accepted | Receiver window = [2] while waiting; no out-of-order buffering. | Sender retains all unacknowledged frames from base 2 onward.

GBN example: frame 2 lost; frames 3–6 discarded; timeout resends 2–6.

1. 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.
2. Normal: after receiving 0 and 1, cumulative ACK 2 advances the sender base to 2. The sender can fill newly opened window slots.
3. 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.
4. 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.
5. 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.

#### Practical example

With W=7, loss of frame 2 can waste successful receptions of 3…6. GBN trades simple receiver buffering for extra retransmission after loss.

Swipe across the diagram to read its labels ↔

![GBN W=7: normal window movement](https://deep-learning-study-room.vercel.app/cn/fig/tee-gbn-normal.144a24ea80.svg)

Diagram: GBN W=7: normal window movement. Labels: GBN W=7: normal window movement | GBN W=7: normal window movement | Sender | Receiver | Frame 0 from sender window [0…6] | ACK 1 → sender window [1…7] | Frame 1 arrives; receiver now expects 2 | ACK 2 → sender window [2…7,0] | Receiver window progresses [0] → [1] → [2]. | Sequence labels wrap modulo 8; sender window contains 7 slots.

Normal transmission: both windows advance as frames are cumulatively acknowledged.

Swipe across the diagram to read its labels ↔

![GBN: a later cumulative ACK covers a lost ACK](https://deep-learning-study-room.vercel.app/cn/fig/tee-gbn-ack.713dc9972e.svg)

Diagram: GBN: a later cumulative ACK covers a lost ACK. Labels: GBN: a later cumulative ACK covers a lost ACK | GBN: a later cumulative ACK covers a lost ACK | Sender | Receiver | Frame 0 accepted; receiver expects 1 | ACK 1 is lost | Frame 1 accepted; receiver expects 2 | ACK 2 arrives before timeout | Sender advances base to 2; continues | ACK 2 confirms frames 0 and 1; no retransmission needed. | Without a later useful ACK, oldest-frame timeout triggers resend.

A later cumulative ACK can cover an earlier lost ACK.

---

## TEE · Q5B · Application protocol

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-a--q5b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-a/q5b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q5B. Explain FTP and the functions of its control and data connections. Illustrate the transfer process. [10 mock marks]

#### Answer

**File Transfer Protocol (FTP)** 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.

Swipe across the diagram to read its labels ↔

![FTP: separate control and data connections](https://deep-learning-study-room.vercel.app/cn/fig/tee-ftp.1b305fa997.svg)

Diagram: FTP: separate control and data connections. Labels: FTP: separate control and data connections | FTP: separate control and data connections | Client → server TCP port 21 | Control: USER, PASS, CWD, TYPE, RETR/STOR/LIST, QUIT; server replies. | Active mode: server initiates data | Client provides a listening endpoint; traditional server data source port is 20. | Passive mode: client initiates data | Server advertises an endpoint; client connects to that selected port. | Data connection carries file/listing bytes | Command channel stays separate; another operation can open another data connection.

Control connection on server port 21; active/passive data connection roles differ.

| Connection | Function | Lifetime / ports |
| --- | --- | --- |
| Control | Commands and replies: USER, PASS, CWD, TYPE, LIST, RETR, STOR, QUIT | Client connects to server TCP port 21; normally kept for the session |
| Data | File contents and directory listing data | Opened as needed; separate from command channel |

## How a transfer works

1. Client opens the control connection and exchanges server greeting, login commands and replies. Plain FTP sends credentials/data without encryption.
2. Client chooses transfer settings such as binary/image mode for arbitrary bytes, and requests the needed working directory/operation.
3. In **active FTP**, the client provides a listening endpoint and the server initiates the data connection, traditionally from server port 20.
4. In **passive FTP**, 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.
5. 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.
6. QUIT ends the control session.

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.

#### Practical example

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.

---

## TEE · Q6A · Transmission media

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-a--q6a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-a/q6a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q6A. List different types of unguided transmission media and write any two characteristics of each. [5 mock marks]

#### Answer

| Type | Characteristic 1 | Characteristic 2 |
| --- | --- | --- |
| Radio | Can provide broad-area/mobility support depending on band | Shared spectrum/interference and obstacles affect reception |
| Terrestrial microwave | Directional, usually line of sight | Needs antenna alignment; obstructions/weather can matter |
| Satellite microwave | Relay covers large or remote areas | Delay/capacity depend strongly on orbit/system |
| Infrared | Short range and generally blocked by opaque walls | Limited room-scale coverage reduces inter-room interference |

Many classifications group satellite links under microwave rather than making a separate spectral category. State that grouping consistently.

#### Practical example

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.

---

## TEE · Q6B · Random access

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-a--q6b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-a/q6b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q6B. Compare 1-persistent, non-persistent, and p-persistent CSMA strategies with diagrammatic representations. [5 mock marks]

#### Answer

Swipe across the diagram to read its labels ↔

![CSMA persistence: what happens after carrier sensing?](https://deep-learning-study-room.vercel.app/cn/fig/persistence.528dafcd8a.svg)

Diagram: CSMA persistence: what happens after carrier sensing?. Labels: CSMA persistence: what happens after carrier sensing? | CSMA persistence: what happens after carrier sensing? | 1-persistent | Busy: keep listening. Idle: transmit immediately. | Non-persistent | Busy: random wait, then sense again. Idle: transmit. | p-persistent | Eligible idle slot: transmit with probability p; defer with probability 1−p.

Different decisions after sensing the channel.

| Rule | When idle | When busy | Trade-off |
| --- | --- | --- | --- |
| 1-persistent | Transmit immediately | Keep listening; transmit as soon as idle | Low idle delay, but waiting stations may start together |
| Non-persistent | Transmit | Wait a random time, then sense again | Less synchronized contention; may leave avoidable idle time |
| p-persistent (slotted) | Transmit with probability p; defer a slot with probability 1−p | Wait until available, then resume the probabilistic slot rule | Controls contention; needs slots and a choice of 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.

#### Practical example

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.

---

## TEE · Q6C · Transport and congestion

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-a--q6c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-a/q6c

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [10 mock marks]

#### Answer

**Congestion** 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. **Flow control** protects a receiver; congestion control protects the network.

Swipe across the diagram to read its labels ↔

![Two congestion-control approaches](https://deep-learning-study-room.vercel.app/cn/fig/tee-congestion.c27c2303bb.svg)

Diagram: Two congestion-control approaches. Labels: Two congestion-control approaches | Two congestion-control approaches | Open loop: prevent overload | Admission rules and retransmission/window/ACK policies reduce avoidable traffic before congestion | feedback. | Closed loop: observe and signal | Detect queues, loss or explicit congestion marks; return feedback toward the sender. | Change behaviour | Reduce offered load or change resource use. Receiver flow control addresses a different bottleneck.

Open-loop prevention and closed-loop feedback.

| Approach | Policy / mechanism | How it helps |
| --- | --- | --- |
| Open loop: prevent congestion without runtime congestion feedback | Retransmission policy | Carefully chosen timers/selective retransmission avoid needless extra traffic |
| Open loop | Window policy | Limit outstanding data and avoid excessive retransmission after loss |
| Open loop | Acknowledgement policy | Avoid unnecessarily frequent ACK traffic while retaining correct recovery |
| Open loop | Admission policy | Refuse new load when reserved capacity is insufficient |
| Closed loop: measure and react to congestion | Backpressure | A congested node tells upstream nodes to reduce/stop sending, possibly propagating hop by hop |
| Closed loop | Choke/control signalling | A congested node sends explicit feedback to the source |
| Closed loop | Implicit signalling | A sender infers congestion from loss/delay and changes its sending behaviour |
| Closed loop | Explicit marking | Network marks congestion (for example ECN); endpoints react to returned information |

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.

#### Practical example

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.

---

## TEE · Q7A · Shortest paths · full working

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-a--q7a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-a/q7a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [10 mock marks]

#### Answer

## Given

| Edge | Cost |
| --- | --- |
| A→B | 3 |
| A→C | 2 |
| B→D | 4 |
| C→B | 1 |
| C→D | 7 |
| D→E | 2 |
| C→E | 10 |

Source=A; target=E. Edges are directed; do not add reverse edges.

## To find

The path A to E, its total cost and intermediate work.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.

Swipe across the diagram to read its labels ↔

![Dijkstra · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/tee-mock-a-route.6f748058c9.svg)

Diagram: Dijkstra · given directed graph. Labels: Dijkstra · given directed graph | Dijkstra · given directed graph | A | A | B | B | A->B | 3 | C | C | A->C | 2 | D | D | B->D | 4 | C->B | 1 | C->D | 7 | E | E | C->E | 10 | D->E | 2

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

d[A]=0; every other distance=∞. No predecessors are known.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Tentative |
| B | ∞ | — | Tentative |
| C | ∞ | — | Tentative |
| D | ∞ | — | Tentative |
| E | ∞ | — | Tentative |

#### Step 2. Settle A at distance 0

Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞, E=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| A→B | ∞ | 0+(3)=3 | Improve to 3; predecessor=A |
| A→C | ∞ | 0+(2)=2 | Improve to 2; predecessor=A |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | A | Tentative |
| C | 2 | A | Tentative |
| D | ∞ | — | Tentative |
| E | ∞ | — | Tentative |

#### Step 3. Settle C at distance 2

Unsettled candidates before selection: B=3, C=2, D=∞, E=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| C→B | 3 | 2+(1)=3 | Retain 3 (equal cost) |
| C→D | ∞ | 2+(7)=9 | Improve to 9; predecessor=C |
| C→E | ∞ | 2+(10)=12 | Improve to 12; predecessor=C |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | A | Tentative |
| C | 2 | A | Settled |
| D | 9 | C | Tentative |
| E | 12 | C | Tentative |

#### Step 4. Settle B at distance 3

Unsettled candidates before selection: B=3, D=9, E=12. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| B→D | 9 | 3+(4)=7 | Improve to 7; predecessor=B |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | A | Settled |
| C | 2 | A | Settled |
| D | 7 | B | Tentative |
| E | 12 | C | Tentative |

#### Step 5. Settle D at distance 7

Unsettled candidates before selection: D=7, E=12. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| D→E | 12 | 7+(2)=9 | Improve to 9; predecessor=D |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | A | Settled |
| C | 2 | A | Settled |
| D | 7 | B | Settled |
| E | 9 | D | Tentative |

#### Step 6. Settle E at distance 9

Unsettled candidates before selection: E=9. Select the minimum; ties use alphabetical order.

No outgoing edges to relax.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | A | Settled |
| C | 2 | A | Settled |
| D | 7 | B | Settled |
| E | 9 | D | Settled |

#### Step 7. Recover the path

Trace backwards: E ← D ← B ← A. Reverse it: A → B → D → E.

Edge sum: 3 + 4 + 2 = 9.

**Final answer:** A → B → D → E; cost=9.

#### What this result means

The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.

Swipe across the diagram to read its labels ↔

![Dijkstra · final route and distances](https://deep-learning-study-room.vercel.app/cn/fig/tee-mock-a-route-solution.c1a801d55e.svg)

Diagram: Dijkstra · final route and distances. Labels: Dijkstra · final route and distances | Dijkstra · final route and distances | A | A | 0 | B | B | 3 | A->B | 3 | C | C | 2 | A->C | 2 | D | D | 7 | B->D | 4 | C->B | 1 | C->D | 7 | E | E | 9 | C->E | 10 | D->E | 2

Highlighted final shortest path, with source-to-vertex distance labels.

---

## TEE · Q7B · Traffic-shaping algorithm

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-a--q7b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-a/q7b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q7B. Draw and explain the token-bucket algorithm. State at least two limitations. [10 mock marks]

#### Answer

A **token bucket** 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.

Swipe across the diagram to read its labels ↔

![Token bucket: permission is separate from data](https://deep-learning-study-room.vercel.app/cn/fig/tee-token.c3ff1dbf76.svg)

Diagram: Token bucket: permission is separate from data. Labels: Token bucket: permission is separate from data | Token bucket: permission is separate from data | Token generator adds r tokens per second | Store at most B tokens; extra tokens disappear when the bucket is full. | Packet of L bytes requests L tokens | Enough tokens: deduct L and permit transmission, subject to link speed. | Insufficient tokens: policy matters | Shaper buffers/waits. Policer marks or drops according to policy. | Saved tokens permit bounded bursts | Initially full: allowance over t ≤ B + rt. This alone is not an end-to-end QoS guarantee.

Tokens store permission; the separate data queue stores packets.

1. Initialize a stated token count, often B for a full bucket. Add rΔt tokens over elapsed time, capped at B.
2. 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.
3. If tokens are insufficient, a **shaper** waits/buffers until enough are available. A **policer** marks or drops nonconforming traffic according to policy. Token shortage does not universally mean drop.
4. Over interval t, a full token bucket bounds admitted data by B+rt. Actual output is also limited by link capacity and packet scheduling.
5. Unlike the queue-style leaky bucket, token storage allows limited bursts after idle time. It bounds average rate and burst size separately.



$$
\mathrm{admitted\ data}(t)\le B+rt
$$



| Limitation | Reason |
| --- | --- |
| Bursts can still congest downstream queues | Local conformance does not ensure every later link has capacity |
| Parameters must match traffic and link requirements | A small B delays/drops legitimate packets; a large B permits disruptive bursts |
| No complete QoS guarantee alone | Admission, scheduling and end-to-end capacity may still be needed |

#### Practical example

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.

---

## TEE · Q1A · Networks and design

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-b--q1a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-b/q1a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [5 mock marks]

#### Answer

In a **client-server** design, users’ clients contact designated service processes. In **peer-to-peer (P2P)**, participating hosts can supply and consume resources. These are application organizations, not different physical cable types.

Swipe across the diagram to read its labels ↔

![Client-server and peer-to-peer organization](https://deep-learning-study-room.vercel.app/cn/fig/tee-client-peer.a7c6f1b535.svg)

Diagram: Client-server and peer-to-peer organization. Labels: Client-server and peer-to-peer organization | Client-server and peer-to-peer organization | Client-server | Peer-to-peer | Server | C1 | C2 | P1 | P2 | P3 | Peers can supply and consume. A central service can be replicated.

Central service versus cooperating peers.

| Point | Client-server | Peer-to-peer |
| --- | --- | --- |
| Roles | Clients request; designated servers provide services | Peers can both request and provide resources |
| Control | Central policies, accounts and backups are easier to coordinate | Control and copies distributed among peers |
| Performance | Predictable with adequate server capacity; server may bottleneck | Resources grow with peers, but peer capacity/availability vary |
| Scalability | Scale servers, replicas, caching and load distribution | More peers can contribute capacity; coordination becomes harder |
| Reliability | One unreplicated server is a failure point; replication helps | Loss of one peer need not stop system if useful replicas remain |
| Security | Central access control and monitoring | Trust and consistent access policy are harder |
| Best fit | Managed collaboration, databases, login services | Distributed content sharing among participating peers |

## Apply to the platform

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.

#### Practical example

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.

---

## TEE · Q1B · Reference models

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-b--q1b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-b/q1b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q1B. Draw the TCP/IP reference model, explain all layers and compare it with OSI on five points. [5 mock marks]

#### Answer

The **TCP/IP model** 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.

Swipe across the diagram to read its labels ↔

![OSI layers mapped to the four-layer TCP/IP model](https://deep-learning-study-room.vercel.app/cn/fig/tee-models.5bff0518c8.svg)

Diagram: OSI layers mapped to the four-layer TCP/IP model. Labels: OSI layers mapped to the four-layer TCP/IP model | OSI layers mapped to the four-layer TCP/IP model | 7 Application | 6 Presentation | 5 Session | 4 Transport | 3 Network | 2 Data link | 1 Physical | Application | HTTP, DNS, FTP, SMTP | Transport | Internet | Link / network access | Includes physical access | Some textbooks split link into data link + physical: five layers.

Four TCP/IP layers; the link layer includes the physical medium.

| TCP/IP layer | Function | Examples |
| --- | --- | --- |
| Application | Defines application message formats and exchanges for Web access, naming, email and file transfer; includes presentation/session functions as needed | HTTP, DNS, SMTP, FTP |
| Transport | End-to-end process communication | TCP, UDP, SCTP |
| Internet | IP addressing, routing and best-effort datagrams | IPv4/IPv6 |
| Link/network access | Local delivery and physical access | Ethernet/Wi-Fi and their medium |

| Point | OSI | TCP/IP |
| --- | --- | --- |
| Layer count | Seven | Four here; five-layer teaching variant splits link |
| Upper functions | Application, presentation, session separated | Grouped under application |
| Lower functions | Data link and physical separated | Grouped under link/network access |
| Purpose | General reference architecture | Architecture of deployed Internet protocol family |
| Network service | Reference model can describe different services | Internet layer uses connectionless IP |
| Transport | Conceptual transport service | TCP reliable byte stream; UDP datagrams; SCTP messages |

#### Practical example

An application can use UDP without changing the IP or Ethernet layers. Layering lets one protocol vary without redesigning every network function.

---

## TEE · Q1C · ALOHA throughput

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-b--q1c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-b/q1c

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [5 mock marks]

#### Answer

## Given

Protocol = Slotted ALOHA; G = 0.6 attempts/frame time.

## To find

S, 100S and the maximum possible S.

## Formula and why



$$
S=G e^{-G}
$$



Select the formula from the protocol name. The exponent is −G because Slotted ALOHA has a T vulnerable period.

## Step-by-step solution

#### Step 1. Calculate the exponent

−1 × 0.6 = -0.6.

#### Step 2. Evaluate the exponential



$$
e^{-0.6} \approx 0.548811636
$$



#### Step 3. Multiply by G

S = 0.6 × 0.548811636 ≈ 0.329286982 successful frames/frame time.

#### Step 4. Convert to percentage

0.329286982 × 100 ≈ 32.9287%.

#### Step 5. State the maximum separately

The maximum is 1/(1e) ≈ 0.367879 = 36.7879%, at G=1.

**Final answer:** S ≈ 0.329287; percentage ≈ 32.9287%; Smax ≈ 0.367879 at G=1.

#### What this result means

A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.

---

## TEE · Q1D · IPv4 address block

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-b--q1d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-b/q1d

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [5 mock marks]

#### Answer

## Given

IP/prefix = `10.20.45.200/20`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−20=12; N=212=4,096.

#### Step 2. Construct the mask

Mask=`255.255.240.0`; binary=`11111111.11111111.11110000.00000000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 3. Its mask value is 240, so step=256−240=16. The IP value 45 lies in 32…47.

#### Step 4. Form the first/network address

Keep earlier octets; place 32 in octet 3; set any later octets to zero. Network=**10.20.32.0**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 00001010 | 11111111 | 00001010 | 10 |
| 2 | 00010100 | 11111111 | 00010100 | 20 |
| 3 | 00101101 | 11110000 | 00100000 | 32 |
| 4 | 11001000 | 00000000 | 00000000 | 0 |

#### Step 6. Form the last/broadcast address

Use 47 in the changing octet and 255 in any later octets. Broadcast=**10.20.47.255**.

#### Step 7. State usable hosts

First usable=10.20.32.1; last usable=10.20.47.254; count=4096−2=4094.

**Final answer:** 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.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## TEE · Q2A · Error detection and correction

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-b--q2a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-b/q2a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [10 mock marks]

#### Answer

## Given

Message=101101; generator=10011; generator degree r=4. This is textbook systematic CRC with zero initial remainder and no reflection/final XOR.

## To find

Exactly r CRC bits, the transmitted frame and receiver syndromes.

## Formula and why



$$
R=(M\,2^r)\bmod_2 G,\qquad T=(M\,2^r)\oplus R
$$



Modulo-2 division uses aligned XOR, not ordinary decimal division.

## Step-by-step solution

#### Step 1. Preserve all polynomial coefficients

Message bits=101101; generator bits=10011. Leading exponent is 4, so CRC length is 4.

#### Step 2. Append zeros

101101 followed by 4 zeros = 1011010000.

#### Step 3. Perform each nonzero XOR subtraction

| Before | Aligned generator | After XOR |
| --- | --- | --- |
| 1011010000 | 1001100000 | 0010110000 |
| 0010110000 | 0010011000 | 0000101000 |
| 0000101000 | 0000100110 | 0000001110 |

Remainder padded to 4 bits = **1110**. Leading zero columns need no subtraction.

#### Step 4. Construct the transmitted frame

Message + CRC = 101101 + 1110 = **1011011110**.

#### Step 5. Check the full frame

| Before | Aligned generator | After XOR |
| --- | --- | --- |
| 1011011110 | 1001100000 | 0010111110 |
| 0010111110 | 0010011000 | 0000100110 |
| 0000100110 | 0000100110 | 0000000000 |

Receiver remainder = 0000; the uncorrupted frame passes.

#### Step 6. Demonstrate detection

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.

**Final answer:** CRC=1110; transmitted frame=1011011110; uncorrupted receiver remainder=0000.

#### What this result means

Some software CRCs use different initial/reflection/final conventions; this answer follows the polynomial-division question’s stated textbook model.

---

## TEE · Q2B · Switching or subnet design

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-b--q2b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-b/q2b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [10 mock marks]

#### Answer

## Given

| Department | Labs | Total addresses per lab |
| --- | --- | --- |
| A | 32 | 128 |
| B | 64 | 64 |
| C | 16 | 512 |

Parent: 172.16.0.0/16 with 65,536 addresses.

## To find

Lab prefixes, department ranges and unused total addresses.

## Formula and why



$$
p=32-\log_2(N_{\mathrm{addresses\ per\ lab}})
$$





$$
N_{\mathrm{department}}=N_{\mathrm{labs}}N_{\mathrm{addresses\ per\ lab}}
$$



The question requests addresses, not usable hosts. Therefore do not add two before selecting each lab size.

## Step-by-step solution

#### Step 1. Department A size

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.

#### Step 2. Department B size

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.

#### Step 3. Department C size

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.

#### Step 4. List every lab allocation

| Lab | Prefix | First address | Last address |
| --- | --- | --- | --- |
| A1 | 172.16.0.0/25 | 172.16.0.0 | 172.16.0.127 |
| A2 | 172.16.0.128/25 | 172.16.0.128 | 172.16.0.255 |
| A3 | 172.16.1.0/25 | 172.16.1.0 | 172.16.1.127 |
| A4 | 172.16.1.128/25 | 172.16.1.128 | 172.16.1.255 |
| A5 | 172.16.2.0/25 | 172.16.2.0 | 172.16.2.127 |
| A6 | 172.16.2.128/25 | 172.16.2.128 | 172.16.2.255 |
| A7 | 172.16.3.0/25 | 172.16.3.0 | 172.16.3.127 |
| A8 | 172.16.3.128/25 | 172.16.3.128 | 172.16.3.255 |
| A9 | 172.16.4.0/25 | 172.16.4.0 | 172.16.4.127 |
| A10 | 172.16.4.128/25 | 172.16.4.128 | 172.16.4.255 |
| A11 | 172.16.5.0/25 | 172.16.5.0 | 172.16.5.127 |
| A12 | 172.16.5.128/25 | 172.16.5.128 | 172.16.5.255 |
| A13 | 172.16.6.0/25 | 172.16.6.0 | 172.16.6.127 |
| A14 | 172.16.6.128/25 | 172.16.6.128 | 172.16.6.255 |
| A15 | 172.16.7.0/25 | 172.16.7.0 | 172.16.7.127 |
| A16 | 172.16.7.128/25 | 172.16.7.128 | 172.16.7.255 |
| A17 | 172.16.8.0/25 | 172.16.8.0 | 172.16.8.127 |
| A18 | 172.16.8.128/25 | 172.16.8.128 | 172.16.8.255 |
| A19 | 172.16.9.0/25 | 172.16.9.0 | 172.16.9.127 |
| A20 | 172.16.9.128/25 | 172.16.9.128 | 172.16.9.255 |
| A21 | 172.16.10.0/25 | 172.16.10.0 | 172.16.10.127 |
| A22 | 172.16.10.128/25 | 172.16.10.128 | 172.16.10.255 |
| A23 | 172.16.11.0/25 | 172.16.11.0 | 172.16.11.127 |
| A24 | 172.16.11.128/25 | 172.16.11.128 | 172.16.11.255 |
| A25 | 172.16.12.0/25 | 172.16.12.0 | 172.16.12.127 |
| A26 | 172.16.12.128/25 | 172.16.12.128 | 172.16.12.255 |
| A27 | 172.16.13.0/25 | 172.16.13.0 | 172.16.13.127 |
| A28 | 172.16.13.128/25 | 172.16.13.128 | 172.16.13.255 |
| A29 | 172.16.14.0/25 | 172.16.14.0 | 172.16.14.127 |
| A30 | 172.16.14.128/25 | 172.16.14.128 | 172.16.14.255 |
| A31 | 172.16.15.0/25 | 172.16.15.0 | 172.16.15.127 |
| A32 | 172.16.15.128/25 | 172.16.15.128 | 172.16.15.255 |
| B1 | 172.16.16.0/26 | 172.16.16.0 | 172.16.16.63 |
| B2 | 172.16.16.64/26 | 172.16.16.64 | 172.16.16.127 |
| B3 | 172.16.16.128/26 | 172.16.16.128 | 172.16.16.191 |
| B4 | 172.16.16.192/26 | 172.16.16.192 | 172.16.16.255 |
| B5 | 172.16.17.0/26 | 172.16.17.0 | 172.16.17.63 |
| B6 | 172.16.17.64/26 | 172.16.17.64 | 172.16.17.127 |
| B7 | 172.16.17.128/26 | 172.16.17.128 | 172.16.17.191 |
| B8 | 172.16.17.192/26 | 172.16.17.192 | 172.16.17.255 |
| B9 | 172.16.18.0/26 | 172.16.18.0 | 172.16.18.63 |
| B10 | 172.16.18.64/26 | 172.16.18.64 | 172.16.18.127 |
| B11 | 172.16.18.128/26 | 172.16.18.128 | 172.16.18.191 |
| B12 | 172.16.18.192/26 | 172.16.18.192 | 172.16.18.255 |
| B13 | 172.16.19.0/26 | 172.16.19.0 | 172.16.19.63 |
| B14 | 172.16.19.64/26 | 172.16.19.64 | 172.16.19.127 |
| B15 | 172.16.19.128/26 | 172.16.19.128 | 172.16.19.191 |
| B16 | 172.16.19.192/26 | 172.16.19.192 | 172.16.19.255 |
| B17 | 172.16.20.0/26 | 172.16.20.0 | 172.16.20.63 |
| B18 | 172.16.20.64/26 | 172.16.20.64 | 172.16.20.127 |
| B19 | 172.16.20.128/26 | 172.16.20.128 | 172.16.20.191 |
| B20 | 172.16.20.192/26 | 172.16.20.192 | 172.16.20.255 |
| B21 | 172.16.21.0/26 | 172.16.21.0 | 172.16.21.63 |
| B22 | 172.16.21.64/26 | 172.16.21.64 | 172.16.21.127 |
| B23 | 172.16.21.128/26 | 172.16.21.128 | 172.16.21.191 |
| B24 | 172.16.21.192/26 | 172.16.21.192 | 172.16.21.255 |
| B25 | 172.16.22.0/26 | 172.16.22.0 | 172.16.22.63 |
| B26 | 172.16.22.64/26 | 172.16.22.64 | 172.16.22.127 |
| B27 | 172.16.22.128/26 | 172.16.22.128 | 172.16.22.191 |
| B28 | 172.16.22.192/26 | 172.16.22.192 | 172.16.22.255 |
| B29 | 172.16.23.0/26 | 172.16.23.0 | 172.16.23.63 |
| B30 | 172.16.23.64/26 | 172.16.23.64 | 172.16.23.127 |
| B31 | 172.16.23.128/26 | 172.16.23.128 | 172.16.23.191 |
| B32 | 172.16.23.192/26 | 172.16.23.192 | 172.16.23.255 |
| B33 | 172.16.24.0/26 | 172.16.24.0 | 172.16.24.63 |
| B34 | 172.16.24.64/26 | 172.16.24.64 | 172.16.24.127 |
| B35 | 172.16.24.128/26 | 172.16.24.128 | 172.16.24.191 |
| B36 | 172.16.24.192/26 | 172.16.24.192 | 172.16.24.255 |
| B37 | 172.16.25.0/26 | 172.16.25.0 | 172.16.25.63 |
| B38 | 172.16.25.64/26 | 172.16.25.64 | 172.16.25.127 |
| B39 | 172.16.25.128/26 | 172.16.25.128 | 172.16.25.191 |
| B40 | 172.16.25.192/26 | 172.16.25.192 | 172.16.25.255 |
| B41 | 172.16.26.0/26 | 172.16.26.0 | 172.16.26.63 |
| B42 | 172.16.26.64/26 | 172.16.26.64 | 172.16.26.127 |
| B43 | 172.16.26.128/26 | 172.16.26.128 | 172.16.26.191 |
| B44 | 172.16.26.192/26 | 172.16.26.192 | 172.16.26.255 |
| B45 | 172.16.27.0/26 | 172.16.27.0 | 172.16.27.63 |
| B46 | 172.16.27.64/26 | 172.16.27.64 | 172.16.27.127 |
| B47 | 172.16.27.128/26 | 172.16.27.128 | 172.16.27.191 |
| B48 | 172.16.27.192/26 | 172.16.27.192 | 172.16.27.255 |
| B49 | 172.16.28.0/26 | 172.16.28.0 | 172.16.28.63 |
| B50 | 172.16.28.64/26 | 172.16.28.64 | 172.16.28.127 |
| B51 | 172.16.28.128/26 | 172.16.28.128 | 172.16.28.191 |
| B52 | 172.16.28.192/26 | 172.16.28.192 | 172.16.28.255 |
| B53 | 172.16.29.0/26 | 172.16.29.0 | 172.16.29.63 |
| B54 | 172.16.29.64/26 | 172.16.29.64 | 172.16.29.127 |
| B55 | 172.16.29.128/26 | 172.16.29.128 | 172.16.29.191 |
| B56 | 172.16.29.192/26 | 172.16.29.192 | 172.16.29.255 |
| B57 | 172.16.30.0/26 | 172.16.30.0 | 172.16.30.63 |
| B58 | 172.16.30.64/26 | 172.16.30.64 | 172.16.30.127 |
| B59 | 172.16.30.128/26 | 172.16.30.128 | 172.16.30.191 |
| B60 | 172.16.30.192/26 | 172.16.30.192 | 172.16.30.255 |
| B61 | 172.16.31.0/26 | 172.16.31.0 | 172.16.31.63 |
| B62 | 172.16.31.64/26 | 172.16.31.64 | 172.16.31.127 |
| B63 | 172.16.31.128/26 | 172.16.31.128 | 172.16.31.191 |
| B64 | 172.16.31.192/26 | 172.16.31.192 | 172.16.31.255 |
| C1 | 172.16.32.0/23 | 172.16.32.0 | 172.16.33.255 |
| C2 | 172.16.34.0/23 | 172.16.34.0 | 172.16.35.255 |
| C3 | 172.16.36.0/23 | 172.16.36.0 | 172.16.37.255 |
| C4 | 172.16.38.0/23 | 172.16.38.0 | 172.16.39.255 |
| C5 | 172.16.40.0/23 | 172.16.40.0 | 172.16.41.255 |
| C6 | 172.16.42.0/23 | 172.16.42.0 | 172.16.43.255 |
| C7 | 172.16.44.0/23 | 172.16.44.0 | 172.16.45.255 |
| C8 | 172.16.46.0/23 | 172.16.46.0 | 172.16.47.255 |
| C9 | 172.16.48.0/23 | 172.16.48.0 | 172.16.49.255 |
| C10 | 172.16.50.0/23 | 172.16.50.0 | 172.16.51.255 |
| C11 | 172.16.52.0/23 | 172.16.52.0 | 172.16.53.255 |
| C12 | 172.16.54.0/23 | 172.16.54.0 | 172.16.55.255 |
| C13 | 172.16.56.0/23 | 172.16.56.0 | 172.16.57.255 |
| C14 | 172.16.58.0/23 | 172.16.58.0 | 172.16.59.255 |
| C15 | 172.16.60.0/23 | 172.16.60.0 | 172.16.61.255 |
| C16 | 172.16.62.0/23 | 172.16.62.0 | 172.16.63.255 |

#### Step 5. Calculate total allocation

4,096+4,096+8,192=16,384 addresses.

#### Step 6. Calculate unused space

65,536−16,384=49,152 addresses remain unallocated, from 172.16.64.0 through 172.16.255.255.

**Final answer:** A: /25 per lab; B: /26 per lab; C: /23 per lab. 49,152 total addresses remain unallocated.

#### What this result means

The three department blocks are aligned and non-overlapping. If these had been usable-host requirements, the per-lab prefixes would have been different.

---

## TEE · Q3A · Network classifications and topologies

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-b--q3a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-b/q3a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q3A. Define network topology. Explain star and bus topologies with diagrams, advantages and disadvantages; compare ring and mesh. [5 mock marks]

#### Answer

**Topology** 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.

Swipe across the diagram to read its labels ↔

![Four physical network topologies](https://deep-learning-study-room.vercel.app/cn/fig/tee-topologies.d9e18f041b.svg)

Diagram: Four physical network topologies. Labels: Four physical network topologies | Four physical network topologies | Star | Bus | Ring | Full mesh: 4 nodes, 6 links | S | Links show arrangement. Actual access rules are a separate concept.

Star, bus, ring and full mesh; edges depict physical connections.

| Topology | Structure | Benefit | Limitation |
| --- | --- | --- | --- |
| Bus | Devices share a common backbone | Simple small shared-medium layout | Backbone fault affects segment; collisions possible on classic shared bus |
| Star | Each device connects to a central switch/hub | Easy expansion and fault isolation | Central-device failure affects star; more cabling |
| Ring | Each node connected to two neighbours in a ring | Structured traversal; token-based variants coordinate access | Simple single-ring break can disrupt operation unless protected |
| Full mesh | Every pair has a direct link | Redundant paths and direct connectivity | Expensive ports/cabling: n(n−1)/2 undirected links |
| Tree/hybrid | Hierarchical stars or combined topologies | Scales into buildings/floors | Upper-level faults affect dependent branches |

#### Practical example

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.

---

## TEE · Q3B · OSPF

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-b--q3b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-b/q3b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q3B. Summarize how OSPF determines the best path to a destination network. [5 mock marks]

#### Answer

Swipe across the diagram to read its labels ↔

![Link-state routing: from local links to a shortest-path tree](https://deep-learning-study-room.vercel.app/cn/fig/link-state.bbee3173ec.svg)

Diagram: Link-state routing: from local links to a shortest-path tree. Labels: Link-state routing: from local links to a shortest-path tree | Link-state routing: from local links to a shortest-path tree | 1. Discover neighbours and costs | Each router measures or configures its local link information. | 2. Flood link-state information | Routers share topology information within the routing scope. | 3. Maintain the topology database | New information updates the shared view after convergence. | 4. Run Dijkstra from this router | Add link costs; install the resulting next hops.

Build the topology, then calculate the route.

1. Discover/maintain neighbours and determine local link costs.
2. Exchange link-state information and synchronize the database within the appropriate area.
3. Run Dijkstra’s shortest-path algorithm with the current router as the root.
4. Add outgoing link costs along candidate paths and select minimum-cost routes.
5. Install next-hop information; recalculate when relevant topology information changes.

#### Practical example

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.

---

## TEE · Q3C · Application-layer mechanism

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-b--q3c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-b/q3c

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q3C. With a neat diagram, explain the hierarchical domain namespace in DNS and how it ensures unique domain names. [10 mock marks]

#### Answer

The **Domain Name System (DNS)** 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.

Swipe across the diagram to read its labels ↔

![DNS namespace: full label paths are unique](https://deep-learning-study-room.vercel.app/cn/fig/tee-dns.f5345fe9fb.svg)

Diagram: DNS namespace: full label paths are unique. Labels: DNS namespace: full label paths are unique | DNS namespace: full label paths are unique | Root . | com | org | example.com | example.org | www.example.com | www.example.org | Same local label “www”; different full names, so no collision.

Root, top-level domains, delegated domain and host labels.

| Level | Example | Meaning |
| --- | --- | --- |
| Root | . | Top of the namespace |
| Top-level domain (TLD) | com, org, in | A child zone below the root |
| Registered/delegated domain | example.com | Name under a parent such as com |
| Subdomain/host label | www.example.com | A label below example.com; a name may own different record types |

## Why names remain unique

1. 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.
2. 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.
3. 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.
4. 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.

## Resolution

1. A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.
2. 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.
3. 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.

#### Practical example

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.

---

## TEE · Q4A · IPv6 and packet headers

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-b--q4a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-b/q4a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q4A. Construct the IPv6 packet format and explain the purpose of each field. [10 mock marks]

#### Answer

Swipe across the diagram to read its labels ↔

![IPv6 base header · each horizontal row is 32 bits wide](https://deep-learning-study-room.vercel.app/cn/fig/ipv6-header.aef1bfbac7.svg)

Diagram: IPv6 base header · each horizontal row is 32 bits wide. Labels: IPv6 base header · each horizontal row is 32 bits wide | IPv6 base header · each horizontal row is 32 bits wide | Version | 4 | Traffic Class | 8 | Flow Label · 20 | Payload Length · 16 | Next Header | 8 | Hop Limit | 8 | Source address · 128 bits (four rows) | Destination address · 128 bits (four rows)

Eight base-header fields occupy 320 bits = 40 bytes.

| Field | Bits | Purpose |
| --- | --- | --- |
| Version | 4 | Value 6 |
| Traffic Class | 8 | Traffic treatment/congestion-related marking |
| Flow Label | 20 | Identifies a flow for appropriate handling |
| Payload Length | 16 | Bytes after the base header; includes extension headers when present |
| Next Header | 8 | Type of the next extension header or upper-layer protocol |
| Hop Limit | 8 | Decremented on forwarding; limits packet lifetime in hops |
| Source address | 128 | Sending interface address |
| Destination address | 128 | Destination address |

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.

#### Practical example

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.

---

## TEE · Q4B · Transport-layer mechanism

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-b--q4b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-b/q4b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q4B. Describe UDP in detail with a labelled header diagram. Explain its services and operation. [10 mock marks]

#### Answer

**User Datagram Protocol (UDP)** provides connectionless, message-oriented process delivery. One send creates a datagram; message boundaries are retained. UDP has an **8-byte header**, 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.

Swipe across the diagram to read its labels ↔

![UDP header: each row contains 32 bits](https://deep-learning-study-room.vercel.app/cn/fig/tee-udp.b14cba3c28.svg)

Diagram: UDP header: each row contains 32 bits. Labels: UDP header: each row contains 32 bits | UDP header: each row contains 32 bits | Source port · 16 | Destination port · 16 | Length · 16 | Checksum · 16 | Total 8 bytes. Length = header + UDP payload.

UDP fixed header: four 16-bit fields, eight bytes total.

| UDP field | Width | Purpose |
| --- | --- | --- |
| Source port | 16 bits | Sending endpoint; a zero value can indicate no reply port when unused |
| Destination port | 16 bits | Receiving application endpoint |
| Length | 16 bits | UDP header plus UDP payload; minimum 8 bytes |
| Checksum | 16 bits | Error detection over UDP and an IP pseudo-header; not retransmission |

## Operation and services

1. 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.
2. The receiving UDP layer validates the length/checksum as applicable and uses the destination endpoint to deliver the datagram.
3. 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.
4. UDP checksum zero can mean checksum omitted in IPv4. IPv6 ordinarily requires the UDP checksum; specialized exceptions are outside this syllabus.

#### Practical example

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.

---

## TEE · Q5A · Sliding-window ARQ

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-b--q5a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-b/q5a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [10 mock marks]

#### Answer

**Selective Repeat (SR) ARQ** 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.

Swipe across the diagram to read its labels ↔

![SR W=4: individual ACKs and buffering](https://deep-learning-study-room.vercel.app/cn/fig/tee-sr.5ae2b52b45.svg)

Diagram: SR W=4: individual ACKs and buffering. Labels: SR W=4: individual ACKs and buffering | SR W=4: individual ACKs and buffering | Sender | Receiver | Frames 0,1 → accept and deliver | ACK 0 and ACK 1 individually | Frame 2 lost; frame 3 arrives | ACK 3; keep frame 3 in buffer | Timer for frame 2: resend only 2 | ACK 2; deliver 2, then buffered 3 | Sequence space 0…7; equal windows at most 4. | ACK i means that specific frame i was accepted.

SR buffers 3 while waiting for 2; only 2 is retransmitted.

1. For m=3 there are eight sequence numbers, 0…7. With equal sender and receiver windows, maximum W=23−1=4. Both windows begin at 0 and span 0…3.
2. 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.
3. Although 3 is acknowledged, the sender’s base cannot jump over missing 2. A timer for 2 expires; only frame 2 is retransmitted.
4. 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.
5. 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.
6. A repeated old frame can be acknowledged again without delivering it twice. SR needs more receiver storage and per-frame tracking than GBN.



$$
W_s=W_r\le 2^{m-1}
$$



#### Practical example

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.

---

## TEE · Q5B · Application protocol

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-b--q5b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-b/q5b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q5B. Explain SMTP and its role in email. Describe communication phases and typical commands with a labelled client-server diagram. [10 mock marks]

#### Answer

**Simple Mail Transfer Protocol (SMTP)** 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.

Swipe across the diagram to read its labels ↔

![SMTP: envelope, message and completion](https://deep-learning-study-room.vercel.app/cn/fig/tee-smtp.c6f99877c4.svg)

Diagram: SMTP: envelope, message and completion. Labels: SMTP: envelope, message and completion | SMTP: envelope, message and completion | SMTP sender | Receiving server | 220 greeting | EHLO sender.example | 250 capabilities | MAIL FROM:<sender@example.com> | RCPT TO:<receiver@example.org> | DATA (after successful envelope replies) | 354 start mail input | Headers + blank line + body + dot line | 250 accepted; then QUIT / server 221 | SMTP submits/relays. Inbox reading uses IMAP/POP or webmail. | Envelope MAIL/RCPT differs from visible From/To headers.

Submission/relay use SMTP; reading an inbox uses a separate access protocol.

| Phase | Typical exchange | Purpose |
| --- | --- | --- |
| Connection and greeting | Server 220; client EHLO (HELO for basic SMTP); server 250 capabilities | Identify peers and learn supported extensions |
| Envelope transfer | MAIL FROM:<sender>; RCPT TO:<recipient>; 250 replies | Declare return path and one or more delivery recipients |
| Message transfer | DATA; server 354; headers + blank line + body; single dot line; server 250 | Transmit the message after server permission; completion reply accepts responsibility |
| Termination | QUIT; server 221 | Close the SMTP session cleanly |

## Message flow and important details

1. 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.
2. The sending server resolves the recipient domain’s MX records, connects to an appropriate mail server and carries out the SMTP exchange.
3. MAIL FROM and RCPT TO are the **envelope**; visible From/To headers inside DATA are message content and can differ. Multiple RCPT TO commands can name several recipients.
4. 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.
5. 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.
6. The recipient reads stored mail using an access protocol such as IMAP/POP3 or webmail. SMTP is not the mailbox-retrieval protocol.

#### Practical example

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.

---

## TEE · Q6A · Transmission media

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-b--q6a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-b/q6a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q6A. How is transmission media classified? List advantages and disadvantages of optical fiber. [5 mock marks]

#### Answer

Transmission media are classified into guided media (twisted pair, coaxial cable, optical fiber) and unguided media (radio, microwave, infrared).

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.

| Advantages | Disadvantages / design costs |
| --- | --- |
| High data capacity and low attenuation over suitable links | Optical transceivers, connectors and splicing add cost/skill requirements |
| Immune to electromagnetic interference; no electrical crosstalk | Tight bends, dirty connectors and poor installation increase loss |
| Electrical isolation between buildings | Fiber is mechanically sensitive and requires appropriate protection |
| Harder to tap casually than an unprotected radio channel | It is not automatically confidential; encryption/access control remain necessary |

#### Practical example

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.

---

## TEE · Q6B · Random access

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-b--q6b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-b/q6b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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? [5 mock marks]

#### Answer

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.

## Case a · 1000 frames/s

## Given

| Symbol | Given |
| --- | --- |
| L | 200 bits |
| R | 200 kbps = 200,000 bits/s |
| λ | 1000 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-2G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 200/200,000 = 0.001 s = 1 ms.

#### Step 2. Offered load

G = 1000 × 0.001 = 1 attempts/frame time.

#### Step 3. Exponent and exponential

−2G = -2; e to that power ≈ 0.135335283.

#### Step 4. Normalized throughput

S = 1 × 0.135335283 ≈ 0.135335283.

#### Step 5. Successful frames each second

S/T = 0.135335283/0.001 ≈ 135.335283 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.135335283 × 200,000 ≈ 27067.056647 bits/s ≈ 27.067057 kbps.

**Final answer:** G=1, S≈0.135335, successful rate≈135.335 frames/s = 27.067 kbps.

#### What this result means

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 λ.

## Case b · 500 frames/s

## Given

| Symbol | Given |
| --- | --- |
| L | 200 bits |
| R | 200 kbps = 200,000 bits/s |
| λ | 500 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-2G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 200/200,000 = 0.001 s = 1 ms.

#### Step 2. Offered load

G = 500 × 0.001 = 0.5 attempts/frame time.

#### Step 3. Exponent and exponential

−2G = -1; e to that power ≈ 0.367879441.

#### Step 4. Normalized throughput

S = 0.5 × 0.367879441 ≈ 0.183939721.

#### Step 5. Successful frames each second

S/T = 0.183939721/0.001 ≈ 183.939721 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.183939721 × 200,000 ≈ 36787.944117 bits/s ≈ 36.787944 kbps.

**Final answer:** G=0.5, S≈0.183940, successful rate≈183.940 frames/s = 36.788 kbps.

#### What this result means

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 λ.

## Case c · 250 frames/s

## Given

| Symbol | Given |
| --- | --- |
| L | 200 bits |
| R | 200 kbps = 200,000 bits/s |
| λ | 250 aggregate attempts/s |

## To find

T, G, S, successful frames/s and bit/s.

## Formula and why



$$
T=L/R
$$





$$
G=\lambda T
$$





$$
S=G e^{-2G}
$$





$$
F_{\mathrm{success}}=S/T,\qquad B_{\mathrm{success}}=SR
$$



First normalize attempts by frame time. Then apply the correct ALOHA model and convert S back to requested rate units.

## Step-by-step solution

#### Step 1. Frame transmission time

T = 200/200,000 = 0.001 s = 1 ms.

#### Step 2. Offered load

G = 250 × 0.001 = 0.25 attempts/frame time.

#### Step 3. Exponent and exponential

−2G = -0.5; e to that power ≈ 0.606530660.

#### Step 4. Normalized throughput

S = 0.25 × 0.606530660 ≈ 0.151632665.

#### Step 5. Successful frames each second

S/T = 0.151632665/0.001 ≈ 151.632665 frames/s.

#### Step 6. Successful frame bit rate

SR = 0.151632665 × 200,000 ≈ 30326.532986 bits/s ≈ 30.326533 kbps.

**Final answer:** G=0.25, S≈0.151633, successful rate≈151.633 frames/s = 30.327 kbps.

#### What this result means

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 λ.

---

## TEE · Q6C · Transport and congestion

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-b--q6c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-b/q6c

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q6C. Compare UDP, TCP and SCTP on at least eight points. [10 mock marks]

#### Answer

| Point | UDP | TCP | SCTP |
| --- | --- | --- | --- |
| Service unit | Datagram; preserves messages | Byte stream; no message boundaries | Messages carried in chunks; preserves boundaries |
| Connection setup | No protocol handshake | Connection; usual three-way SYN exchange | Association; four-message cookie exchange |
| Reliability | No delivery/order guarantee | Reliable ordered stream | Reliable messages; ordered per stream by default, unordered option |
| Ordering scope | None supplied | One ordered byte stream per direction | Multiple streams; per-stream order avoids blocking every stream on one stream’s ordering gap |
| Flow control | Not supplied by UDP | Receiver-advertised window | Receiver flow control |
| Congestion control | Not supplied by UDP | Yes | Yes |
| Multihoming | No built-in association failover | Classic TCP uses one address pair | Association can bind multiple addresses; built-in path failover |
| Header | 8 bytes | Minimum 20 bytes | 12-byte common header plus chunks |
| Typical use | DNS, real-time applications with their own controls | Web over HTTP/1.1 or HTTP/2, reliable byte transfers | Telecom signalling and multi-stream message applications |
| Performance claim | Low protocol overhead, not automatically fastest overall | Recovery/ordering have costs and benefits | Extra capabilities; no universal speed ranking |

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.

#### Practical example

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.

---

## TEE · Q7A · Shortest paths · full working

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-b--q7a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-b/q7a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [10 mock marks]

#### Answer

## Given

| Directed edge | Weight |
| --- | --- |
| A→B | 4 |
| A→C | 5 |
| B→C | -2 |
| B→D | 6 |
| C→D | 2 |
| D→E | 3 |
| C→E | 8 |

## To find

The shortest route and cost, with complete passes and a negative-cycle check.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



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.

Swipe across the diagram to read its labels ↔

![Bellman–Ford · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/tee-mock-b-route.720ccc32b6.svg)

Diagram: Bellman–Ford · given directed graph. Labels: Bellman–Ford · given directed graph | Bellman–Ford · given directed graph | A | A | B | B | A->B | 4 | C | C | A->C | 5 | B->C | -2 | D | D | B->D | 6 | C->D | 2 | E | E | C->E | 8 | D->E | 3

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

5 vertices → at most 4 main passes. d[A]=0; every other distance=∞. Use the listed edge order and immediate (in-place) updates.

#### Step 2. Pass 1: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | ∞ | 0+(4)=4 | 4 | Update; predecessor=A |
| A→C | ∞ | 0+(5)=5 | 5 | Update; predecessor=A |
| B→C | 5 | 4+(-2)=2 | 2 | Update; predecessor=B |
| B→D | ∞ | 4+(6)=10 | 10 | Update; predecessor=B |
| C→D | 10 | 2+(2)=4 | 4 | Update; predecessor=C |
| D→E | ∞ | 4+(3)=7 | 7 | Update; predecessor=D |
| C→E | 7 | 2+(8)=10 | 7 | No improvement |

| Vertex | A | B | C | D | E |
| --- | --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 4 | 2 | 4 | 7 |
| Predecessor | — | A | B | C | D |

#### Step 3. Pass 2: relax every edge

| Edge | Old d[target] | Candidate via source | New d[target] | Decision |
| --- | --- | --- | --- | --- |
| A→B | 4 | 0+(4)=4 | 4 | No improvement |
| A→C | 2 | 0+(5)=5 | 2 | No improvement |
| B→C | 2 | 4+(-2)=2 | 2 | No improvement |
| B→D | 4 | 4+(6)=10 | 4 | No improvement |
| C→D | 4 | 2+(2)=4 | 4 | No improvement |
| D→E | 7 | 4+(3)=7 | 7 | No improvement |
| C→E | 7 | 2+(8)=10 | 7 | No improvement |

| Vertex | A | B | C | D | E |
| --- | --- | --- | --- | --- | --- |
| End-of-pass distance | 0 | 4 | 2 | 4 | 7 |
| Predecessor | — | A | B | C | D |

#### Step 4. Stop after an unchanged pass

This entire pass changed no distance. Further identical relaxation passes will not improve anything.

#### Step 5. Recover and total the path

Backward predecessors: E ← D ← C ← B ← A. Forward route: A → B → C → D → E.

Cost = (4) + (-2) + (2) + (3) = 7. No edge can now improve its destination label.

**Final answer:** A → B → C → D → E; shortest cost=7.

#### What this result means

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.

Swipe across the diagram to read its labels ↔

![Bellman–Ford · final route and distances](https://deep-learning-study-room.vercel.app/cn/fig/tee-mock-b-route-solution.f6bae119c4.svg)

Diagram: Bellman–Ford · final route and distances. Labels: Bellman–Ford · final route and distances | Bellman–Ford · final route and distances | A | A | 0 | B | B | 4 | A->B | 4 | C | C | 2 | A->C | 5 | B->C | -2 | D | D | 4 | B->D | 6 | C->D | 2 | E | E | 7 | C->E | 8 | D->E | 3

Highlighted final shortest path, with source-to-vertex distance labels.

---

## TEE · Q7B · Traffic-shaping algorithm

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-b--q7b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-b/q7b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q7B. Draw and explain the leaky-bucket algorithm. Is it always better than a token bucket? [10 mock marks]

#### Answer

In the textbook **leaky-bucket queue/shaper** 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.

Swipe across the diagram to read its labels ↔

![Leaky-bucket data queue](https://deep-learning-study-room.vercel.app/cn/fig/tee-leaky.77bdbcf957.svg)

Diagram: Leaky-bucket data queue. Labels: Leaky-bucket data queue | Leaky-bucket data queue | Bursty arrivals enter finite buffer B | Accept packets that fit; the stated queue model drops overflow. | Queue drains at configured rate r | Send while data exists. An empty queue produces no packets. | Smoother departure stream | Buffering adds delay; idle service cannot be saved for a later burst.

Finite data buffer smooths a burst into a bounded departure rate.

1. Choose buffer capacity B and output service rate r in consistent units.
2. Admit arrivals that fit. Drop/mark overflow according to the stated implementation; this queue example drops the excess.
3. Drain at rate r while the queue is nonempty. Idle time does not accumulate permission for a later faster burst.
4. The result is smoothed output. Larger buffers accommodate larger bursts but can increase waiting delay.

| Advantage | Limitation |
| --- | --- |
| Simple bound on output rate | Bursts may overflow or suffer delay |
| Reduces short-term output variation | Unused idle service cannot be saved |
| Useful for predictable traffic shaping | No end-to-end delay/loss guarantee by itself |

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.

#### Practical example

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.

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.

---

## TEE · Q1A · Networks and design

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-c--q1a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-c/q1a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [5 mock marks]

#### Answer

| Criterion | Wired campus links | Wireless campus access |
| --- | --- | --- |
| Speed/capacity | Dedicated switch ports and fiber backbones can provide high, predictable capacity | Capacity shared over radio; performance depends on contention, coverage and interference |
| Reliability | Stable when cables/ports and redundant uplinks are healthy | Mobility and flexible access; radio interference and coverage holes can cause variability |
| Security | Physical access control helps, but ports still need authentication/segmentation | Use authenticated encryption and managed access; radio extends beyond rooms |
| Deployment | Cabling cost and fixed access points | Supports mobile users and faster coverage changes |
| Recommended role | Servers, laboratories, inter-building backbone | Students’ phones/laptops, roaming and guest access |

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.

#### Practical example

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.

---

## TEE · Q1B · Reference models

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-c--q1b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-c/q1b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q1B. Draw the OSI reference model and explain the function of each layer. [5 mock marks]

#### Answer

The **Open Systems Interconnection (OSI)** 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.

Swipe across the diagram to read its labels ↔

![OSI layers mapped to the four-layer TCP/IP model](https://deep-learning-study-room.vercel.app/cn/fig/tee-models.5bff0518c8.svg)

Diagram: OSI layers mapped to the four-layer TCP/IP model. Labels: OSI layers mapped to the four-layer TCP/IP model | OSI layers mapped to the four-layer TCP/IP model | 7 Application | 6 Presentation | 5 Session | 4 Transport | 3 Network | 2 Data link | 1 Physical | Application | HTTP, DNS, FTP, SMTP | Transport | Internet | Link / network access | Includes physical access | Some textbooks split link into data link + physical: five layers.

OSI seven-layer model mapped to the four-layer TCP/IP model.

| Layer | Task | Example |
| --- | --- | --- |
| 7 Application | Services used by network applications | HTTP, DNS, FTP, SMTP |
| 6 Presentation | Representation, encoding and application data transformations | Character encoding, serialization; encryption as a conceptual function |
| 5 Session | Manage dialogue and synchronization/checkpoints | Session establishment and resumption concepts |
| 4 Transport | Process delivery; reliability/flow control where supplied | TCP, UDP, SCTP; ports |
| 3 Network | Logical addressing and routing across networks | IP; routers |
| 2 Data link | Framing, local link addressing, medium access and error detection | Ethernet/Wi-Fi; MAC addresses |
| 1 Physical | Transmit signal symbols/bits through a medium | Electrical, optical or radio signals |

## Encapsulation and delivery

1. Application creates data. Transport adds a transport header: TCP segment or UDP datagram.
2. IP adds its header to form a packet. The link adds a header and usually a trailer to form a frame.
3. The physical layer carries signals. The destination reverses the process and sends the data to the receiving process.
4. 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.

#### Practical example

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.

---

## TEE · Q1C · ALOHA throughput

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-c--q1c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-c/q1c

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [5 mock marks]

#### Answer

## Given

Protocol = Pure ALOHA; G = 0.8 attempts/frame time.

## To find

S, 100S and the maximum possible S.

## Formula and why



$$
S=G e^{-2G}
$$



Select the formula from the protocol name. The exponent is −2G because Pure ALOHA has a 2T vulnerable period.

## Step-by-step solution

#### Step 1. Calculate the exponent

−2 × 0.8 = -1.6.

#### Step 2. Evaluate the exponential



$$
e^{-1.6} \approx 0.201896518
$$



#### Step 3. Multiply by G

S = 0.8 × 0.201896518 ≈ 0.161517214 successful frames/frame time.

#### Step 4. Convert to percentage

0.161517214 × 100 ≈ 16.1517%.

#### Step 5. State the maximum separately

The maximum is 1/(2e) ≈ 0.183940 = 18.3940%, at G=0.5.

**Final answer:** S ≈ 0.161517; percentage ≈ 16.1517%; Smax ≈ 0.183940 at G=0.5.

#### What this result means

A computed throughput at the given G is not automatically the maximum. Increasing attempts beyond the optimum produces more collisions.

---

## TEE · Q1D · IPv4 address block

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-c--q1d/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-c/q1d

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [5 mock marks]

#### Answer

## Given

IP/prefix = `172.18.7.33/23`.

## To find

The complete containing address block and its usable host range.

## Formula and why



$$
h=32-p,\qquad N=2^h
$$





$$
\text{step}=256-\text{changing mask octet}
$$



Use the explicit prefix. We show both the interval method and bitwise AND so the boundary can be understood.

## Step-by-step solution

#### Step 1. Count host bits and addresses

h=32−23=9; N=29=512.

#### Step 2. Construct the mask

Mask=`255.255.254.0`; binary=`11111111.11111111.11111110.00000000`.

#### Step 3. Find the changing-octet interval

The changing octet is number 3. Its mask value is 254, so step=256−254=2. The IP value 7 lies in 6…7.

#### Step 4. Form the first/network address

Keep earlier octets; place 6 in octet 3; set any later octets to zero. Network=**172.18.6.0**.

#### Step 5. Show the AND operation

| Octet | IP bits | Mask bits | AND result | Decimal |
| --- | --- | --- | --- | --- |
| 1 | 10101100 | 11111111 | 10101100 | 172 |
| 2 | 00010010 | 11111111 | 00010010 | 18 |
| 3 | 00000111 | 11111110 | 00000110 | 6 |
| 4 | 00100001 | 00000000 | 00000000 | 0 |

#### Step 6. Form the last/broadcast address

Use 7 in the changing octet and 255 in any later octets. Broadcast=**172.18.7.255**.

#### Step 7. State usable hosts

First usable=172.18.6.1; last usable=172.18.7.254; count=512−2=510.

**Final answer:** Network 172.18.6.0; broadcast 172.18.7.255; 512 total, 510 ordinary usable; range 172.18.6.1–172.18.7.254.

#### What this result means

The first address in a block means its network address. It is different from the first usable host address.

---

## TEE · Q2A · Error detection and correction

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-c--q2a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-c/q2a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [10 mock marks]

#### Answer

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.

## Given

| Codeword | Bits |
| --- | --- |
| C1 | 0000000 |
| C2 | 1110000 |
| C3 | 0011100 |

## To find

All pair distances, dmin and the maximum guaranteed numbers of errors.

## Formula and why



$$
d(a,b)=\mathrm{weight}(a\oplus b)
$$





$$
s=d_{\min}-1,\quad t=\lfloor(d_{\min}-1)/2\rfloor
$$



XOR exposes differing positions. Use the closest codeword pair, because it is the weakest separation in the code.

## Step-by-step solution

#### Step 1. XOR every distinct pair

| Pair | First | Second | XOR | Distance |
| --- | --- | --- | --- | --- |
| C1 vs C2 | 0000000 | 1110000 | 1110000 | 3 |
| C1 vs C3 | 0000000 | 0011100 | 0011100 | 3 |
| C2 vs C3 | 1110000 | 0011100 | 1101100 | 4 |

#### Step 2. Take the minimum

dmin = min(3, 3, 4) = 3.

#### Step 3. Calculate the guarantees

Detect = 3−1 = 2; correct = floor((3−1)/2) = 1.

#### Step 4. Justify geometrically

3 bit changes can reach another valid codeword, so only 2 are guaranteed detectable. Correction regions require 2t < 3.

**Final answer:** dmin=3; detect up to 2 errors; correct up to 1 errors.

#### What this result means

A distance of one particular pair does not set the whole-code capability unless it is the minimum.

---

## TEE · Q2B · Switching or subnet design

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-c--q2b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-c/q2b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [10 mock marks]

#### Answer

Swipe across the diagram to read its labels ↔

![Three switching techniques: what is forwarded?](https://deep-learning-study-room.vercel.app/cn/fig/switching.2b51f856d9.svg)

Diagram: Three switching techniques: what is forwarded?. Labels: Three switching techniques: what is forwarded? | Three switching techniques: what is forwarded? | 1. Circuit: reserve a path, then stream data | Setup → reserved capacity → data transfer → release. | 2. Message: store the entire message at each node | Large forwarding unit; no packet-level pipeline. | 3. Packet: divide, then forward packet by packet | Shared links can simultaneously carry different packets.

The three forwarding units and resource choices.

## Circuit switching

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.

## Message switching

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.

## Packet switching

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.

| Aspect | Circuit switching | Message switching | Packet switching |
| --- | --- | --- | --- |
| Unit handled | Continuous stream on established circuit | Whole message | Small packets |
| Resource use | Capacity reserved along a circuit | Shared; message stored at each intermediate node | Shared; each packet stored/forwarded in this model |
| Setup | Required before data transfer | No circuit setup required | Datagram: no connection setup; virtual circuit: setup |
| Delay | Setup delay, then relatively predictable service | Large store-and-forward delay for long messages | Variable delay; packet pipeline can reduce completion time |
| Main limitation | Reserved capacity can be idle | Large buffers; unsuitable for tight delay needs | Headers, possible queueing/loss; datagrams may reorder |

## Recommendation

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.

#### Practical example

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.

---

## TEE · Q3A · Network classifications and topologies

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-c--q3a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-c/q3a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q3A. Define a computer network. Explain LAN, MAN, PAN, WAN and ARPANET with examples. [5 mock marks]

#### Answer

A **computer network** 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.

| Type | Meaning and scope | Example |
| --- | --- | --- |
| PAN | Personal Area Network: a person’s nearby devices | Phone linked to earbuds |
| LAN | Local Area Network: a building or local campus network under local administration | Laboratory Ethernet/Wi-Fi |
| MAN | Metropolitan Area Network: interconnects sites across a town/city | City-wide institutional network |
| WAN | Wide Area Network: connects geographically separated networks over regional/global links | Branches in different cities |
| ARPANET | Historical packet-switched research network; a major predecessor of the Internet | Early interconnected research institutions; not a modern geographic size category |

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.

#### Practical example

A student uses a PAN for earbuds, a LAN in the lab and a WAN when accessing a distant university service.

---

## TEE · Q3B · OSPF

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-c--q3b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-c/q3b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q3B. Explain the different types of OSPF packets used for communication between routers. [5 mock marks]

#### Answer

Swipe across the diagram to read its labels ↔

![OSPFv2: five distinct packet types](https://deep-learning-study-room.vercel.app/cn/fig/ospf-packets.6093f0d178.svg)

Diagram: OSPFv2: five distinct packet types. Labels: OSPFv2: five distinct packet types | OSPFv2: five distinct packet types | 1. Hello | Discover and maintain neighbour relationships. | 2. Database Description | Summarize link-state database contents. | 3. Link State Request | Ask for particular missing or newer LSAs. | 4. Link State Update | Carry one or more LSAs. | 5. Link State Acknowledgment | Acknowledge receipt of LSAs.

Five OSPFv2 packet types.

| Packet type | What it does | Simple example |
| --- | --- | --- |
| Hello | Discover/maintain neighbours and exchange relationship parameters | Are we still neighbours? |
| Database Description (DD/DBD) | Summarize link-state database contents during synchronization | Here are the LSA headers I have |
| Link State Request (LSR) | Ask for specific missing/newer link-state information | Please send this LSA |
| Link State Update (LSU) | Carry one or more LSAs | Here is the requested or newly flooded link-state information |
| Link State Acknowledgment (LSAck) | Acknowledge receipt of LSAs | I received these LSAs |

Database Description packets carry summaries; Link State Update packets carry LSAs themselves. Do not confuse an LSA type with an OSPF packet type.

#### Practical example

After seeing a missing LSA in a database summary, a router sends an LSR, receives an LSU containing it and sends an LSAck.

---

## TEE · Q3C · Application-layer mechanism

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-c--q3c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-c/q3c

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q3C. Explain SMTP and its role in email. Describe communication phases and typical commands with a labelled client-server diagram. [10 mock marks]

#### Answer

**Simple Mail Transfer Protocol (SMTP)** 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.

Swipe across the diagram to read its labels ↔

![SMTP: envelope, message and completion](https://deep-learning-study-room.vercel.app/cn/fig/tee-smtp.c6f99877c4.svg)

Diagram: SMTP: envelope, message and completion. Labels: SMTP: envelope, message and completion | SMTP: envelope, message and completion | SMTP sender | Receiving server | 220 greeting | EHLO sender.example | 250 capabilities | MAIL FROM:<sender@example.com> | RCPT TO:<receiver@example.org> | DATA (after successful envelope replies) | 354 start mail input | Headers + blank line + body + dot line | 250 accepted; then QUIT / server 221 | SMTP submits/relays. Inbox reading uses IMAP/POP or webmail. | Envelope MAIL/RCPT differs from visible From/To headers.

Submission/relay use SMTP; reading an inbox uses a separate access protocol.

| Phase | Typical exchange | Purpose |
| --- | --- | --- |
| Connection and greeting | Server 220; client EHLO (HELO for basic SMTP); server 250 capabilities | Identify peers and learn supported extensions |
| Envelope transfer | MAIL FROM:<sender>; RCPT TO:<recipient>; 250 replies | Declare return path and one or more delivery recipients |
| Message transfer | DATA; server 354; headers + blank line + body; single dot line; server 250 | Transmit the message after server permission; completion reply accepts responsibility |
| Termination | QUIT; server 221 | Close the SMTP session cleanly |

## Message flow and important details

1. 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.
2. The sending server resolves the recipient domain’s MX records, connects to an appropriate mail server and carries out the SMTP exchange.
3. MAIL FROM and RCPT TO are the **envelope**; visible From/To headers inside DATA are message content and can differ. Multiple RCPT TO commands can name several recipients.
4. 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.
5. 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.
6. The recipient reads stored mail using an access protocol such as IMAP/POP3 or webmail. SMTP is not the mailbox-retrieval protocol.

#### Practical example

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.

---

## TEE · Q4A · IPv6 and packet headers

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-c--q4a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-c/q4a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [10 mock marks]

#### Answer

## Given

Given address: `0:15::1:12:1213`.

## To find

The full 128-bit address in eight-group hexadecimal notation.

## Formula and why



$$
\text{missing groups}=8-\text{visible groups}
$$



A written 0 is a visible group. :: represents only the omitted all-zero groups.

## Step-by-step solution

#### Step 1. Count groups on both sides

Left: 0, 15 (2 group(s)). Right: 1, 12, 1213 (3 group(s)).

#### Step 2. Calculate omitted groups

Visible=2+3=5. Missing=8−5=3.

#### Step 3. Insert the groups

`0:15:0:0:0:1:12:1213`.

#### Step 4. Pad each group on the left

| Group number | Four-digit group |
| --- | --- |
| 1 | 0000 |
| 2 | 0015 |
| 3 | 0000 |
| 4 | 0000 |
| 5 | 0000 |
| 6 | 0001 |
| 7 | 0012 |
| 8 | 1213 |

#### Step 5. Write all eight in order

`0000:0015:0000:0000:0000:0001:0012:1213`.

**Final answer:** `0000:0015:0000:0000:0000:0001:0012:1213`

#### What this result means

Leading zeros change the spelling, not the address value. The final group count is eight.

## Header comparison

| Feature | IPv4 | IPv6 |
| --- | --- | --- |
| Address width | 32 bits | 128 bits |
| Base/header size | 20–60 bytes depending on options | 40-byte fixed base header |
| Length field | Total length includes IPv4 header | Payload Length excludes 40-byte base header |
| Lifetime field | TTL | Hop Limit |
| Following protocol | Protocol field | Next Header; may identify an extension |
| Header checksum | Present | No base-header checksum |
| Options | Inside IPv4 header | Typically extension headers |
| Fragmentation fields | In IPv4 header; routers may fragment if permitted | Fragment extension header; fragmentation by source, not routers |

Swipe across the diagram to read its labels ↔

![IPv6 base header · each horizontal row is 32 bits wide](https://deep-learning-study-room.vercel.app/cn/fig/ipv6-header.aef1bfbac7.svg)

Diagram: IPv6 base header · each horizontal row is 32 bits wide. Labels: IPv6 base header · each horizontal row is 32 bits wide | IPv6 base header · each horizontal row is 32 bits wide | Version | 4 | Traffic Class | 8 | Flow Label · 20 | Payload Length · 16 | Next Header | 8 | Hop Limit | 8 | Source address · 128 bits (four rows) | Destination address · 128 bits (four rows)

Fixed IPv6 base header.

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.

---

## TEE · Q4B · Transport-layer mechanism

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-c--q4b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-c/q4b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q4B. Compare UDP, TCP and SCTP on at least eight points. [10 mock marks]

#### Answer

| Point | UDP | TCP | SCTP |
| --- | --- | --- | --- |
| Service unit | Datagram; preserves messages | Byte stream; no message boundaries | Messages carried in chunks; preserves boundaries |
| Connection setup | No protocol handshake | Connection; usual three-way SYN exchange | Association; four-message cookie exchange |
| Reliability | No delivery/order guarantee | Reliable ordered stream | Reliable messages; ordered per stream by default, unordered option |
| Ordering scope | None supplied | One ordered byte stream per direction | Multiple streams; per-stream order avoids blocking every stream on one stream’s ordering gap |
| Flow control | Not supplied by UDP | Receiver-advertised window | Receiver flow control |
| Congestion control | Not supplied by UDP | Yes | Yes |
| Multihoming | No built-in association failover | Classic TCP uses one address pair | Association can bind multiple addresses; built-in path failover |
| Header | 8 bytes | Minimum 20 bytes | 12-byte common header plus chunks |
| Typical use | DNS, real-time applications with their own controls | Web over HTTP/1.1 or HTTP/2, reliable byte transfers | Telecom signalling and multi-stream message applications |
| Performance claim | Low protocol overhead, not automatically fastest overall | Recovery/ordering have costs and benefits | Extra capabilities; no universal speed ranking |

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.

#### Practical example

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.

---

## TEE · Q5A · Sliding-window ARQ

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-c--q5a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-c/q5a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [10 mock marks]

#### Answer

**Go-Back-N (GBN) ARQ** pipelines up to W outstanding frames. For m-bit sequence numbers, textbook GBN uses W ≤ 2m−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”.

Swipe across the diagram to read its labels ↔

![GBN W=7: loss and cumulative ACKs](https://deep-learning-study-room.vercel.app/cn/fig/tee-gbn.5f577a6979.svg)

Diagram: GBN W=7: loss and cumulative ACKs. Labels: GBN W=7: loss and cumulative ACKs | GBN W=7: loss and cumulative ACKs | Sender | Receiver | Frames 0,1 → accept in order | ACK 2: next expected is 2 | Frame 2 lost | Frames 3,4,5,6 → discard out of order | ACK 2 repeated | Timer for 2 expires: resend 2,3,4,5,6 | ACK 7: frames through 6 accepted | Receiver window = [2] while waiting; no out-of-order buffering. | Sender retains all unacknowledged frames from base 2 onward.

GBN example: frame 2 lost; frames 3–6 discarded; timeout resends 2–6.

1. 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.
2. Normal: after receiving 0 and 1, cumulative ACK 2 advances the sender base to 2. The sender can fill newly opened window slots.
3. 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.
4. 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.
5. 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.

#### Practical example

With W=7, loss of frame 2 can waste successful receptions of 3…6. GBN trades simple receiver buffering for extra retransmission after loss.

Swipe across the diagram to read its labels ↔

![GBN W=7: normal window movement](https://deep-learning-study-room.vercel.app/cn/fig/tee-gbn-normal.144a24ea80.svg)

Diagram: GBN W=7: normal window movement. Labels: GBN W=7: normal window movement | GBN W=7: normal window movement | Sender | Receiver | Frame 0 from sender window [0…6] | ACK 1 → sender window [1…7] | Frame 1 arrives; receiver now expects 2 | ACK 2 → sender window [2…7,0] | Receiver window progresses [0] → [1] → [2]. | Sequence labels wrap modulo 8; sender window contains 7 slots.

Normal transmission: both windows advance as frames are cumulatively acknowledged.

Swipe across the diagram to read its labels ↔

![GBN: a later cumulative ACK covers a lost ACK](https://deep-learning-study-room.vercel.app/cn/fig/tee-gbn-ack.713dc9972e.svg)

Diagram: GBN: a later cumulative ACK covers a lost ACK. Labels: GBN: a later cumulative ACK covers a lost ACK | GBN: a later cumulative ACK covers a lost ACK | Sender | Receiver | Frame 0 accepted; receiver expects 1 | ACK 1 is lost | Frame 1 accepted; receiver expects 2 | ACK 2 arrives before timeout | Sender advances base to 2; continues | ACK 2 confirms frames 0 and 1; no retransmission needed. | Without a later useful ACK, oldest-frame timeout triggers resend.

A later cumulative ACK can cover an earlier lost ACK.

---

## TEE · Q5B · Application protocol

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-c--q5b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-c/q5b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q5B. With a neat diagram, explain the hierarchical domain namespace in DNS and how it ensures unique domain names. [10 mock marks]

#### Answer

The **Domain Name System (DNS)** 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.

Swipe across the diagram to read its labels ↔

![DNS namespace: full label paths are unique](https://deep-learning-study-room.vercel.app/cn/fig/tee-dns.f5345fe9fb.svg)

Diagram: DNS namespace: full label paths are unique. Labels: DNS namespace: full label paths are unique | DNS namespace: full label paths are unique | Root . | com | org | example.com | example.org | www.example.com | www.example.org | Same local label “www”; different full names, so no collision.

Root, top-level domains, delegated domain and host labels.

| Level | Example | Meaning |
| --- | --- | --- |
| Root | . | Top of the namespace |
| Top-level domain (TLD) | com, org, in | A child zone below the root |
| Registered/delegated domain | example.com | Name under a parent such as com |
| Subdomain/host label | www.example.com | A label below example.com; a name may own different record types |

## Why names remain unique

1. 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.
2. 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.
3. 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.
4. 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.

## Resolution

1. A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.
2. 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.
3. 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.

#### Practical example

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.

---

## TEE · Q6A · Transmission media

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-c--q6a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-c/q6a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q6A. List different types of unguided transmission media and write any two characteristics of each. [5 mock marks]

#### Answer

| Type | Characteristic 1 | Characteristic 2 |
| --- | --- | --- |
| Radio | Can provide broad-area/mobility support depending on band | Shared spectrum/interference and obstacles affect reception |
| Terrestrial microwave | Directional, usually line of sight | Needs antenna alignment; obstructions/weather can matter |
| Satellite microwave | Relay covers large or remote areas | Delay/capacity depend strongly on orbit/system |
| Infrared | Short range and generally blocked by opaque walls | Limited room-scale coverage reduces inter-room interference |

Many classifications group satellite links under microwave rather than making a separate spectral category. State that grouping consistently.

#### Practical example

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.

---

## TEE · Q6B · Random access

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-c--q6b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-c/q6b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q6B. Compare 1-persistent, non-persistent, and p-persistent CSMA strategies with diagrammatic representations. [5 mock marks]

#### Answer

Swipe across the diagram to read its labels ↔

![CSMA persistence: what happens after carrier sensing?](https://deep-learning-study-room.vercel.app/cn/fig/persistence.528dafcd8a.svg)

Diagram: CSMA persistence: what happens after carrier sensing?. Labels: CSMA persistence: what happens after carrier sensing? | CSMA persistence: what happens after carrier sensing? | 1-persistent | Busy: keep listening. Idle: transmit immediately. | Non-persistent | Busy: random wait, then sense again. Idle: transmit. | p-persistent | Eligible idle slot: transmit with probability p; defer with probability 1−p.

Different decisions after sensing the channel.

| Rule | When idle | When busy | Trade-off |
| --- | --- | --- | --- |
| 1-persistent | Transmit immediately | Keep listening; transmit as soon as idle | Low idle delay, but waiting stations may start together |
| Non-persistent | Transmit | Wait a random time, then sense again | Less synchronized contention; may leave avoidable idle time |
| p-persistent (slotted) | Transmit with probability p; defer a slot with probability 1−p | Wait until available, then resume the probabilistic slot rule | Controls contention; needs slots and a choice of 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.

#### Practical example

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.

---

## TEE · Q6C · Transport and congestion

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-c--q6c/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-c/q6c

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [10 mock marks]

#### Answer

**Congestion** 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. **Flow control** protects a receiver; congestion control protects the network.

Swipe across the diagram to read its labels ↔

![Two congestion-control approaches](https://deep-learning-study-room.vercel.app/cn/fig/tee-congestion.c27c2303bb.svg)

Diagram: Two congestion-control approaches. Labels: Two congestion-control approaches | Two congestion-control approaches | Open loop: prevent overload | Admission rules and retransmission/window/ACK policies reduce avoidable traffic before congestion | feedback. | Closed loop: observe and signal | Detect queues, loss or explicit congestion marks; return feedback toward the sender. | Change behaviour | Reduce offered load or change resource use. Receiver flow control addresses a different bottleneck.

Open-loop prevention and closed-loop feedback.

| Approach | Policy / mechanism | How it helps |
| --- | --- | --- |
| Open loop: prevent congestion without runtime congestion feedback | Retransmission policy | Carefully chosen timers/selective retransmission avoid needless extra traffic |
| Open loop | Window policy | Limit outstanding data and avoid excessive retransmission after loss |
| Open loop | Acknowledgement policy | Avoid unnecessarily frequent ACK traffic while retaining correct recovery |
| Open loop | Admission policy | Refuse new load when reserved capacity is insufficient |
| Closed loop: measure and react to congestion | Backpressure | A congested node tells upstream nodes to reduce/stop sending, possibly propagating hop by hop |
| Closed loop | Choke/control signalling | A congested node sends explicit feedback to the source |
| Closed loop | Implicit signalling | A sender infers congestion from loss/delay and changes its sending behaviour |
| Closed loop | Explicit marking | Network marks congestion (for example ECN); endpoints react to returned information |

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.

#### Practical example

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.

---

## TEE · Q7A · Shortest paths · full working

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-c--q7a/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-c/q7a

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### 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. [10 mock marks]

#### Answer

## Given

| Edge | Cost |
| --- | --- |
| A→B | 5 |
| A→C | 2 |
| B→D | 4 |
| C→B | 1 |
| C→D | 7 |
| D→E | 2 |
| C→E | 10 |

Source=A; target=E. Edges are directed; do not add reverse edges.

## To find

The path A to E, its total cost and intermediate work.

## Formula and why



$$
d[v]\leftarrow\min(d[v],d[u]+w(u,v))
$$



Use Dijkstra because all weights are nonnegative. Select the smallest unsettled total distance, not the cheapest isolated edge.

Swipe across the diagram to read its labels ↔

![Dijkstra · given directed graph](https://deep-learning-study-room.vercel.app/cn/fig/tee-mock-c-route.93b735aa12.svg)

Diagram: Dijkstra · given directed graph. Labels: Dijkstra · given directed graph | Dijkstra · given directed graph | A | A | B | B | A->B | 5 | C | C | A->C | 2 | D | D | B->D | 4 | C->B | 1 | C->D | 7 | E | E | C->E | 10 | D->E | 2

Read the labels and direction before substituting numbers.

## Step-by-step solution

#### Step 1. Initialize

d[A]=0; every other distance=∞. No predecessors are known.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Tentative |
| B | ∞ | — | Tentative |
| C | ∞ | — | Tentative |
| D | ∞ | — | Tentative |
| E | ∞ | — | Tentative |

#### Step 2. Settle A at distance 0

Unsettled candidates before selection: A=0, B=∞, C=∞, D=∞, E=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| A→B | ∞ | 0+(5)=5 | Improve to 5; predecessor=A |
| A→C | ∞ | 0+(2)=2 | Improve to 2; predecessor=A |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 5 | A | Tentative |
| C | 2 | A | Tentative |
| D | ∞ | — | Tentative |
| E | ∞ | — | Tentative |

#### Step 3. Settle C at distance 2

Unsettled candidates before selection: B=5, C=2, D=∞, E=∞. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| C→B | 5 | 2+(1)=3 | Improve to 3; predecessor=C |
| C→D | ∞ | 2+(7)=9 | Improve to 9; predecessor=C |
| C→E | ∞ | 2+(10)=12 | Improve to 12; predecessor=C |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | C | Tentative |
| C | 2 | A | Settled |
| D | 9 | C | Tentative |
| E | 12 | C | Tentative |

#### Step 4. Settle B at distance 3

Unsettled candidates before selection: B=3, D=9, E=12. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| B→D | 9 | 3+(4)=7 | Improve to 7; predecessor=B |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | C | Settled |
| C | 2 | A | Settled |
| D | 7 | B | Tentative |
| E | 12 | C | Tentative |

#### Step 5. Settle D at distance 7

Unsettled candidates before selection: D=7, E=12. Select the minimum; ties use alphabetical order.

| Edge | Old distance | Candidate | Decision |
| --- | --- | --- | --- |
| D→E | 12 | 7+(2)=9 | Improve to 9; predecessor=D |

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | C | Settled |
| C | 2 | A | Settled |
| D | 7 | B | Settled |
| E | 9 | D | Tentative |

#### Step 6. Settle E at distance 9

Unsettled candidates before selection: E=9. Select the minimum; ties use alphabetical order.

No outgoing edges to relax.

| Vertex | Distance from A | Predecessor | State |
| --- | --- | --- | --- |
| A | 0 | — | Settled |
| B | 3 | C | Settled |
| C | 2 | A | Settled |
| D | 7 | B | Settled |
| E | 9 | D | Settled |

#### Step 7. Recover the path

Trace backwards: E ← D ← B ← C ← A. Reverse it: A → C → B → D → E.

Edge sum: 2 + 1 + 4 + 2 = 9.

**Final answer:** A → C → B → D → E; cost=9.

#### What this result means

The predecessor table proves which edges make the route. A table containing only the final cost is not the complete working requested.

Swipe across the diagram to read its labels ↔

![Dijkstra · final route and distances](https://deep-learning-study-room.vercel.app/cn/fig/tee-mock-c-route-solution.94d22e6eb0.svg)

Diagram: Dijkstra · final route and distances. Labels: Dijkstra · final route and distances | Dijkstra · final route and distances | A | A | 0 | B | B | 3 | A->B | 5 | C | C | 2 | A->C | 2 | D | D | 7 | B->D | 4 | C->B | 1 | C->D | 7 | E | E | 9 | C->E | 10 | D->E | 2

Highlighted final shortest path, with source-to-vertex distance labels.

---

## TEE · Q7B · Traffic-shaping algorithm

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/mocks/tee-mock-c--q7b/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/mocks/tee-mock-c/q7b

TEE · 100 attempted marks · solutions for every choice · current syllabus 702AI0C023

### TEE practice mock · Q7B. Draw and explain the token-bucket algorithm. State at least two limitations. [10 mock marks]

#### Answer

A **token bucket** 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.

Swipe across the diagram to read its labels ↔

![Token bucket: permission is separate from data](https://deep-learning-study-room.vercel.app/cn/fig/tee-token.c3ff1dbf76.svg)

Diagram: Token bucket: permission is separate from data. Labels: Token bucket: permission is separate from data | Token bucket: permission is separate from data | Token generator adds r tokens per second | Store at most B tokens; extra tokens disappear when the bucket is full. | Packet of L bytes requests L tokens | Enough tokens: deduct L and permit transmission, subject to link speed. | Insufficient tokens: policy matters | Shaper buffers/waits. Policer marks or drops according to policy. | Saved tokens permit bounded bursts | Initially full: allowance over t ≤ B + rt. This alone is not an end-to-end QoS guarantee.

Tokens store permission; the separate data queue stores packets.

1. Initialize a stated token count, often B for a full bucket. Add rΔt tokens over elapsed time, capped at B.
2. 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.
3. If tokens are insufficient, a **shaper** waits/buffers until enough are available. A **policer** marks or drops nonconforming traffic according to policy. Token shortage does not universally mean drop.
4. Over interval t, a full token bucket bounds admitted data by B+rt. Actual output is also limited by link capacity and packet scheduling.
5. Unlike the queue-style leaky bucket, token storage allows limited bursts after idle time. It bounds average rate and burst size separately.



$$
\mathrm{admitted\ data}(t)\le B+rt
$$



| Limitation | Reason |
| --- | --- |
| Bursts can still congest downstream queues | Local conformance does not ensure every later link has capacity |
| Parameters must match traffic and link requirements | A small B delays/drops legitimate packets; a large B permits disruptive bursts |
| No complete QoS guarantee alone | Admission, scheduling and end-to-end capacity may still be needed |

#### Practical example

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.

---

## TEE · One final pass through all six units

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/revision/tee-revision--order/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/revision/tee-revision/order

TEE · Use after the full lessons and solved papers · current syllabus 702AI0C023

1. **Units 1–2:** draw star/bus/ring/mesh and both layered models. Explain wired/wireless tradeoffs and fiber strengths/limits in complete sentences.
2. **Unit 3:** 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.
3. **Unit 4:** 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.
4. **Unit 5:** 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.
5. **Unit 6:** narrate URL→DNS→connection→HTTP; draw the DNS hierarchy; separate FTP channels; write SMTP phases and commands.
6. **Paper:** practise Q1 plus four complete 20-mark questions. Recheck instructions on the actual day.

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.

**Yaad rakho:** Layer ka role samjho; numerical mein units aur assumptions pehle.

---

## TEE · Units 1–2: five-mark answer frames

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/revision/tee-revision--u12/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/revision/tee-revision/u12

TEE · Use after the full lessons and solved papers · current syllabus 702AI0C023

| Prompt | Write this structure |
| --- | --- |
| Compare models | Define each → matched rows for performance/scaling/reliability → one scenario recommendation |
| Explain topology | Definition → labelled diagram → operation → advantage → failure/limitation |
| OSI / TCP-IP | Layer order → one distinct task each → protocol examples → encapsulation |
| Transmission media | Guided versus unguided → named types → two characteristics each → suitable application |
| Campus design | Wired backbone and endpoints + wireless mobility → capacity/reliability/security tradeoffs |

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.

---

## TEE · Unit 3: error and access traps

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/revision/tee-revision--u3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/revision/tee-revision/u3

TEE · Use after the full lessons and solved papers · current syllabus 702AI0C023

| Trap | Correction |
| --- | --- |
| Hamming distance calculated by decimal subtraction | XOR equal-length strings and count 1s |
| Pick largest pairwise distance | Find the minimum of every distinct pair |
| Detect and correct counts assumed identical | Detect dmin−1; correct floor((dmin−1)/2) |
| CRC generator has four bits, so append four zeros | Append degree r, one fewer than generator bit count |
| CRC receiver appends more zeros | Divide the received complete frame directly |
| Every lost ACK forces immediate retransmission | A later cumulative ACK may acknowledge the missing earlier ACK in GBN |
| SR sender skips a missing base after a later ACK | Window base cannot pass its earliest unacknowledged frame |
| GBN and SR ACK labels interpreted identically | State cumulative next-expected versus individual-frame convention |
| Use S as probability per attempted frame | S is successful frames per frame time; success probability is S/G |
| Carrier sense guarantees no collisions | Propagation delay creates an uncertainty interval |
| CSMA/CA called collision-free | Avoidance reduces risk; collisions remain possible |

---

## TEE · Unit 4: numerical method checklist

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/revision/tee-revision--u4/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/revision/tee-revision/u4

TEE · Use after the full lessons and solved papers · current syllabus 702AI0C023

1. **IPv4 block:** p → 32−p → total size → mask → aligned network/broadcast → distinguish total from ordinary usable hosts.
2. **VLSM:** translate host requirements to total size; largest first; align every network; check no overlap and containment in parent.
3. **IPv6:** count visible groups; :: occurs at most once; restore exactly eight groups; pad each to four hex digits.
4. **Dijkstra:** use nonnegative edges; set source zero and others infinity; select smallest unsettled; update outgoing edges; reconstruct predecessors.
5. **Bellman–Ford:** 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.
6. **Forwarding/mapping:** longest matching prefix selects next hop; ARP resolves that local next hop, not a remote server’s Ethernet address.

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.

---

## TEE · Unit 5: distinguish the quantities

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/revision/tee-revision--u5/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/revision/tee-revision/u5

TEE · Use after the full lessons and solved papers · current syllabus 702AI0C023

| Pair | Difference |
| --- | --- |
| IP address vs port | Interface/network delivery vs process endpoint |
| TCP vs UDP | Ordered byte stream with recovery vs datagrams without built-in delivery recovery |
| rwnd vs cwnd | Receiver capacity vs network congestion allowance |
| Flow control vs congestion control | Receiver protection vs shared network protection |
| Open loop vs closed loop | Prevention without runtime congestion feedback vs measurement/feedback/reaction |
| Delay vs jitter | Time taken vs variation in time taken |
| Leaky queue vs token bucket | Stores data to smooth output vs stores permission to allow bounded bursts |
| Shaper vs policer | Delays nonconforming traffic vs measures and applies mark/drop policy |
| SCTP streams vs multihoming | Separate message-ordering streams vs alternate endpoint addresses/paths |

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.

---

## TEE · Unit 6: redraw four message flows

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/revision/tee-revision--u6/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/revision/tee-revision/u6

TEE · Use after the full lessons and solved papers · current syllabus 702AI0C023

| Protocol | Draw and explain |
| --- | --- |
| HTTP | Browser → DNS → server connection → request(method,target,headers) → response(status,headers,body) → render/extra objects |
| DNS | Root → TLD → domain/subdomain; stub → recursive resolver → referrals → authoritative record; explain full-name uniqueness |
| FTP | Control TCP21 persists; separate data connection; active server initiation versus passive client initiation |
| SMTP | 220/EHLO → MAIL FROM → RCPT TO → DATA/354 → message/dot/250 → QUIT/221; recipient later retrieves via another protocol |

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.

---

## TEE · Every named syllabus topic has a teaching location

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/about/tee-about--coverage/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/about/tee-about/coverage

TEE · Evidence and scope limits · current syllabus 702AI0C023

| Unit | Current syllabus topic | Read |
| --- | --- | --- |
| 1 | Computer network | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/introduction--network-types/) |
| 1 | Peer-to-peer and client-server communication | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/introduction--models/) |
| 1 | Classifications of computer networks | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/introduction--network-types/) |
| 1 | Network topologies | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/introduction--topologies/) |
| 2 | OSI model | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/physical--osi/) |
| 2 | TCP/IP model | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/physical--tcpip/) |
| 2 | Transmission media | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/physical--media/) |
| 3 | Fundamentals of error detection and correction | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/error-control--principles/) |
| 3 | Block coding | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/error-control--principles/) |
| 3 | Hamming distance | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/error-control--hamming-distance/) |
| 3 | Flow control and error control | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/arq--flow-error/) |
| 3 | CRC | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/error-control--crc/) |
| 3 | Stop and Wait ARQ | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/arq--stopwait/) |
| 3 | Go-Back-N ARQ | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/arq--gbn/) |
| 3 | Selective Repeat ARQ | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/arq--sr/) |
| 3 | Pure ALOHA | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--pure/) |
| 3 | Slotted ALOHA | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/aloha--slotted/) |
| 3 | CSMA/CD | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/csma--cd/) |
| 3 | Printed CDMA/CA, interpreted CSMA/CA | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/csma--ca/) |
| 4 | Switching techniques | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/switching--types/) |
| 4 | IPv4 addressing | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv4--structure/) |
| 4 | Subnet mask | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/subnets--method/) |
| 4 | CIDR | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/cidr--meaning/) |
| 4 | IPv6 | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv6--structure/) |
| 4 | ARP | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/mapping--arp/) |
| 4 | RARP | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/mapping--rarp/) |
| 4 | DHCP | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/mapping--dhcp/) |
| 4 | Shortest-path routing | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/routing--vocabulary/) |
| 4 | RIP | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/protocols--rip/) |
| 4 | Bellman–Ford | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/routing--bellman/) |
| 4 | Link-state routing | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/protocols--link-state/) |
| 4 | Dijkstra | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/routing--dijkstra/) |
| 4 | OSPF | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/protocols--ospf/) |
| 5 | Process-to-process communication | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/transport--process/) |
| 5 | UDP services and operation | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/transport--udp/) |
| 5 | TCP features | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/transport--tcp/) |
| 5 | TCP three-way handshaking | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/transport--handshake/) |
| 5 | UDP/TCP comparison | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/transport--comparison/) |
| 5 | SCTP | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/transport--sctp/) |
| 5 | Open-loop and closed-loop congestion control | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/congestion--policies/) |
| 5 | Quality of Service | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/congestion--qos/) |
| 5 | QoS improving techniques | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/congestion--qos/) |
| 5 | Leaky bucket | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/congestion--leaky/) |
| 5 | Token bucket | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/congestion--token/) |
| 6 | HTTP | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/applications--http/) |
| 6 | DNS | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/applications--dns/) |
| 6 | FTP | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/applications--ftp/) |
| 6 | SMTP | [Open lesson](https://deep-learning-study-room.vercel.app/read/cn/tee/read/applications--smtp/) |

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.

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.

---

## TEE · Sources, verification and limitations

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/about/tee-about--sources/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/about/tee-about/sources

TEE · Evidence and scope limits · current syllabus 702AI0C023

**Primary scope:** Syllabus\_BTech&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.

**Primary questions:** 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.

**Secondary material:** 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.

**Checks:** 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.

## Protocol references used for precision

- [RFC 768 · UDP](https://www.rfc-editor.org/rfc/rfc768.html)
- [RFC 9293 · TCP](https://www.rfc-editor.org/rfc/rfc9293.html)
- [RFC 9260 · SCTP](https://www.rfc-editor.org/rfc/rfc9260.html)
- [RFC 9110 · HTTP semantics](https://www.rfc-editor.org/rfc/rfc9110.html)
- [RFC 1034 · DNS concepts](https://www.rfc-editor.org/rfc/rfc1034.html)
- [RFC 959 · FTP](https://www.rfc-editor.org/rfc/rfc959.html)
- [RFC 5321 · SMTP](https://www.rfc-editor.org/rfc/rfc5321.html)
- [RFC 2475 · traffic conditioning and token buckets](https://www.rfc-editor.org/rfc/rfc2475.html)

[Read the explicit answer-key corrections](https://deep-learning-study-room.vercel.app/read/cn/tee/papers/tee-pyq-guide--corrections/)

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.

---

## TEE · What belongs in extra practice

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/tee-extra-guide--purpose/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/tee-extra-guide/purpose

TEE · Additional explanation, not a revision requirement · current syllabus 702AI0C023

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.

Hamming **distance**, CRC, ALOHA, address blocks/subnets, IPv6 expansion, SR windows and shortest paths do have numerical support in the papers. Hamming-code **construction**, HTTP timing and TCP sequence arithmetic are different question types; one does not prove the other was asked.

---

## TEE · Topology counting · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/introduction--mesh-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/introduction/mesh-1

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

n=4; links are undirected and no self-links exist.

## To find

Number of distinct links and per-node ports.

## Formula and why



$$
L=\frac{n(n-1)}{2},\qquad p=n-1
$$



Each node connects to n−1 others; counting endpoints counts each link twice.

## Step-by-step solution

#### Step 1. Count each node’s neighbours

4−1=3 ports.

#### Step 2. Count then remove double-counting

4×3÷2=6 links.

#### Step 3. Check endpoints

6×2=12 link endpoints, equal to 4 nodes × 3 ports.

**Final answer:** 6 links; 3 ports per node.

#### What this result means

Supporting topology arithmetic: a directed-arc count would be n(n−1), so read the link convention.

---

## TEE · Topology counting · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/introduction--mesh-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/introduction/mesh-2

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

n=6; links are undirected and no self-links exist.

## To find

Number of distinct links and per-node ports.

## Formula and why



$$
L=\frac{n(n-1)}{2},\qquad p=n-1
$$



Each node connects to n−1 others; counting endpoints counts each link twice.

## Step-by-step solution

#### Step 1. Count each node’s neighbours

6−1=5 ports.

#### Step 2. Count then remove double-counting

6×5÷2=15 links.

#### Step 3. Check endpoints

15×2=30 link endpoints, equal to 6 nodes × 5 ports.

**Final answer:** 15 links; 5 ports per node.

#### What this result means

Supporting topology arithmetic: a directed-arc count would be n(n−1), so read the link convention.

---

## TEE · Topology counting · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/introduction--mesh-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/introduction/mesh-3

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

n=8; links are undirected and no self-links exist.

## To find

Number of distinct links and per-node ports.

## Formula and why



$$
L=\frac{n(n-1)}{2},\qquad p=n-1
$$



Each node connects to n−1 others; counting endpoints counts each link twice.

## Step-by-step solution

#### Step 1. Count each node’s neighbours

8−1=7 ports.

#### Step 2. Count then remove double-counting

8×7÷2=28 links.

#### Step 3. Check endpoints

28×2=56 link endpoints, equal to 8 nodes × 7 ports.

**Final answer:** 28 links; 7 ports per node.

#### What this result means

Supporting topology arithmetic: a directed-arc count would be n(n−1), so read the link convention.

---

## TEE · How a Hamming code locates a single error

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/error-control--hamming-code/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/error-control/hamming-code

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### Practice question. Explain the construction and single-error correction of a Hamming code. State the redundancy condition. [5 practice marks]

#### Answer

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 2r ≥ m+r+1. The syndrome must represent each of the m+r possible single-error positions and the no-error state.



$$
2^r\ge m+r+1
$$



1. 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.
2. 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.
3. For even parity, choose each check bit so its covered positions XOR to zero.
4. 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.
5. 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.

Swipe across the diagram to read its labels ↔

![Hamming (7,4): even parity, positions left to right](https://deep-learning-study-room.vercel.app/cn/fig/tee-hamming.509c933bba.svg)

Diagram: Hamming (7,4): even parity, positions left to right. Labels: Hamming (7,4): even parity, positions left to right | Hamming (7,4): even parity, positions left to right | p1 | 0 | 1 | p2 | 1 | 2 | d1 | 1 | 3 | p4 | 0 | 4 | d2 | 0 | 5 | d3 | 1 | 6 | d4 | 1 | 7 | p1: 1,3,5,7 p2: 2,3,6,7 p4: 4,5,6,7 | Data 1011 → codeword 0110011. Bit 5 flips → syndrome 101₂. | Binary 101 = 5: flip bit 5 back, assuming one error.

Positions 1, 2 and 4 hold parity bits in Hamming (7,4).

#### Practical example

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.

**Yaad rakho:** Parity powers of two; syndrome binary tells the position.

---

## TEE · Single-error correction · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/error-control--hamming-code-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/error-control/hamming-code-1

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [7 practice marks]

#### Answer

## Given

Data=1011; even parity; error position=5; only one bit flips.

## To find

Redundant bits, complete codeword and syndrome correction.

## Formula and why



$$
2^r\ge m+r+1
$$





$$
\mathrm{syndrome}=s_1+2s_2+4s_4+\cdots
$$



Parity positions correspond to binary index bits, so a single flipped position changes precisely its index checks.

## Step-by-step solution

#### Step 1. Choose redundancy

m=4; r=3: 23=8 ≥ 4+3+1=8; one fewer parity bit fails.

#### Step 2. Place data and compute checks

| Check | Covered positions (including check) | Parity bit |
| --- | --- | --- |
| p1 | 1, 3, 5, 7 | 0 |
| p2 | 2, 3, 6, 7 | 1 |
| p4 | 4, 5, 6, 7 | 0 |

| Position | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Encoded bit | 0 | 1 | 1 | 0 | 0 | 1 | 1 |

#### Step 3. Introduce and check the error

Received = 0110111

| Syndrome check | Received-bit XOR | Result |
| --- | --- | --- |
| s1 | 0 XOR 1 XOR 1 XOR 1 | 1 |
| s2 | 1 XOR 1 XOR 1 XOR 1 | 0 |
| s4 | 0 XOR 1 XOR 1 XOR 1 | 1 |

#### Step 4. Locate and flip

Syndrome integer=5. Flip position 5; recovered codeword=0110011; extracted data=1011.

**Final answer:** Codeword 0110011; syndrome 5; corrected data 1011.

#### What this result means

The position direction is explicit. A solution using right-to-left numbering can look different while being consistent; never mix conventions.

---

## TEE · Single-error correction · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/error-control--hamming-code-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/error-control/hamming-code-2

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [7 practice marks]

#### Answer

## Given

Data=0110; even parity; error position=3; only one bit flips.

## To find

Redundant bits, complete codeword and syndrome correction.

## Formula and why



$$
2^r\ge m+r+1
$$





$$
\mathrm{syndrome}=s_1+2s_2+4s_4+\cdots
$$



Parity positions correspond to binary index bits, so a single flipped position changes precisely its index checks.

## Step-by-step solution

#### Step 1. Choose redundancy

m=4; r=3: 23=8 ≥ 4+3+1=8; one fewer parity bit fails.

#### Step 2. Place data and compute checks

| Check | Covered positions (including check) | Parity bit |
| --- | --- | --- |
| p1 | 1, 3, 5, 7 | 1 |
| p2 | 2, 3, 6, 7 | 1 |
| p4 | 4, 5, 6, 7 | 0 |

| Position | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Encoded bit | 1 | 1 | 0 | 0 | 1 | 1 | 0 |

#### Step 3. Introduce and check the error

Received = 1110110

| Syndrome check | Received-bit XOR | Result |
| --- | --- | --- |
| s1 | 1 XOR 1 XOR 1 XOR 0 | 1 |
| s2 | 1 XOR 1 XOR 1 XOR 0 | 1 |
| s4 | 0 XOR 1 XOR 1 XOR 0 | 0 |

#### Step 4. Locate and flip

Syndrome integer=3. Flip position 3; recovered codeword=1100110; extracted data=0110.

**Final answer:** Codeword 1100110; syndrome 3; corrected data 0110.

#### What this result means

The position direction is explicit. A solution using right-to-left numbering can look different while being consistent; never mix conventions.

---

## TEE · Single-error correction · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/error-control--hamming-code-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/error-control/hamming-code-3

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [7 practice marks]

#### Answer

## Given

Data=1101; even parity; error position=7; only one bit flips.

## To find

Redundant bits, complete codeword and syndrome correction.

## Formula and why



$$
2^r\ge m+r+1
$$





$$
\mathrm{syndrome}=s_1+2s_2+4s_4+\cdots
$$



Parity positions correspond to binary index bits, so a single flipped position changes precisely its index checks.

## Step-by-step solution

#### Step 1. Choose redundancy

m=4; r=3: 23=8 ≥ 4+3+1=8; one fewer parity bit fails.

#### Step 2. Place data and compute checks

| Check | Covered positions (including check) | Parity bit |
| --- | --- | --- |
| p1 | 1, 3, 5, 7 | 1 |
| p2 | 2, 3, 6, 7 | 0 |
| p4 | 4, 5, 6, 7 | 0 |

| Position | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Encoded bit | 1 | 0 | 1 | 0 | 1 | 0 | 1 |

#### Step 3. Introduce and check the error

Received = 1010100

| Syndrome check | Received-bit XOR | Result |
| --- | --- | --- |
| s1 | 1 XOR 1 XOR 1 XOR 0 | 1 |
| s2 | 0 XOR 1 XOR 0 XOR 0 | 1 |
| s4 | 0 XOR 1 XOR 0 XOR 0 | 1 |

#### Step 4. Locate and flip

Syndrome integer=7. Flip position 7; recovered codeword=1010101; extracted data=1101.

**Final answer:** Codeword 1010101; syndrome 7; corrected data 1101.

#### What this result means

The position direction is explicit. A solution using right-to-left numbering can look different while being consistent; never mix conventions.

---

## TEE · Supporting numerical: stop-and-wait utilization

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/arq--efficiency/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/arq/efficiency

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### Practice question. Derive ideal Stop-and-Wait utilization and the window needed to keep a link busy. [5 practice marks]

#### Answer

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.



$$
U_{SW}=\frac{T_t}{T_t+2T_p+T_a}
$$





$$
U_W\approx\min\left(1,\frac{WT_t}{T_t+2T_p+T_a}\right)
$$





$$
W_{\mathrm{required}}=\left\lceil\frac{T_t+2T_p+T_a}{T_t}\right\rceil
$$



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.

#### Practical example

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.

---

## TEE · Window utilization · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/arq--efficiency-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/arq/efficiency-1

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [5 practice marks]

#### Answer

## Given

Tt=1 ms; Tp=5 ms; Ta=0 ms; W=4; no processing/queueing delay.

## To find

Two utilizations and the required window.

## Formula and why



$$
C=T_t+2T_p+T_a,\quad U_1=T_t/C,\quad U_W=\min(1,WT_t/C)
$$



Both propagation directions matter. All durations already share the same unit.

## Step-by-step solution

#### Step 1. Compute a complete cycle

C=1+2×5+0=11 ms.

#### Step 2. Stop-and-wait share

U=1/11=0.090909=9.09%.

#### Step 3. Pipelined share

U=min(1,4×1/11)=0.363636=36.36%.

#### Step 4. Round the full-utilization bound upward

Wrequired=ceil(11/1)=11; check the sequence-space bound separately.

**Final answer:** Stop-and-Wait=9.09%; window-4=36.36%; ideal required window=11.

#### What this result means

A percentage above 100 is not valid. The min operation caps link occupancy, and protocol numbering may require more sequence bits.

---

## TEE · Window utilization · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/arq--efficiency-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/arq/efficiency-2

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [5 practice marks]

#### Answer

## Given

Tt=2 ms; Tp=3 ms; Ta=0 ms; W=4; no processing/queueing delay.

## To find

Two utilizations and the required window.

## Formula and why



$$
C=T_t+2T_p+T_a,\quad U_1=T_t/C,\quad U_W=\min(1,WT_t/C)
$$



Both propagation directions matter. All durations already share the same unit.

## Step-by-step solution

#### Step 1. Compute a complete cycle

C=2+2×3+0=8 ms.

#### Step 2. Stop-and-wait share

U=2/8=0.250000=25.00%.

#### Step 3. Pipelined share

U=min(1,4×2/8)=1.000000=100.00%.

#### Step 4. Round the full-utilization bound upward

Wrequired=ceil(8/2)=4; check the sequence-space bound separately.

**Final answer:** Stop-and-Wait=25.00%; window-4=100.00%; ideal required window=4.

#### What this result means

A percentage above 100 is not valid. The min operation caps link occupancy, and protocol numbering may require more sequence bits.

---

## TEE · Window utilization · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/arq--efficiency-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/arq/efficiency-3

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [5 practice marks]

#### Answer

## Given

Tt=4 ms; Tp=8 ms; Ta=1 ms; W=6; no processing/queueing delay.

## To find

Two utilizations and the required window.

## Formula and why



$$
C=T_t+2T_p+T_a,\quad U_1=T_t/C,\quad U_W=\min(1,WT_t/C)
$$



Both propagation directions matter. All durations already share the same unit.

## Step-by-step solution

#### Step 1. Compute a complete cycle

C=4+2×8+1=21 ms.

#### Step 2. Stop-and-wait share

U=4/21=0.190476=19.05%.

#### Step 3. Pipelined share

U=min(1,6×4/21)=1.000000=100.00%.

#### Step 4. Round the full-utilization bound upward

Wrequired=ceil(21/4)=6; check the sequence-space bound separately.

**Final answer:** Stop-and-Wait=19.05%; window-6=100.00%; ideal required window=6.

#### What this result means

A percentage above 100 is not valid. The min operation caps link occupancy, and protocol numbering may require more sequence bits.

---

## TEE · Collision detection · minimum size 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/csma--minframe-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/csma/minframe-1

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

R=10 Mbps; Tp=25.6 μs.

## To find

Lmin in bits and the minimum whole-byte length.

## Formula and why



$$
L_{\min}=\lceil 2RT_p\rceil
$$



The frame must last at least a round trip. Convert Mbps to bits/s and μs to seconds before multiplying.

## Step-by-step solution

#### Step 1. Convert the quantities

R=10,000,000 bits/s; Tp=0.0000256 s.

#### Step 2. Find round-trip delay

2Tp=2×25.6=51.2 μs.

#### Step 3. Multiply rate by duration

Lmin=2×10,000,000×0.0000256=512 bits.

#### Step 4. Convert bits to whole bytes

512/8=64; round upward if needed → 64 bytes.

**Final answer:** 512 bits, or at least 64 whole bytes.

#### What this result means

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.

---

## TEE · Collision detection · minimum size 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/csma--minframe-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/csma/minframe-2

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

R=100 Mbps; Tp=2 μs.

## To find

Lmin in bits and the minimum whole-byte length.

## Formula and why



$$
L_{\min}=\lceil 2RT_p\rceil
$$



The frame must last at least a round trip. Convert Mbps to bits/s and μs to seconds before multiplying.

## Step-by-step solution

#### Step 1. Convert the quantities

R=100,000,000 bits/s; Tp=0.000002 s.

#### Step 2. Find round-trip delay

2Tp=2×2=4 μs.

#### Step 3. Multiply rate by duration

Lmin=2×100,000,000×0.000002=400 bits.

#### Step 4. Convert bits to whole bytes

400/8=50; round upward if needed → 50 bytes.

**Final answer:** 400 bits, or at least 50 whole bytes.

#### What this result means

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.

---

## TEE · Collision detection · minimum size 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/csma--minframe-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/csma/minframe-3

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

R=10 Mbps; Tp=10 μs.

## To find

Lmin in bits and the minimum whole-byte length.

## Formula and why



$$
L_{\min}=\lceil 2RT_p\rceil
$$



The frame must last at least a round trip. Convert Mbps to bits/s and μs to seconds before multiplying.

## Step-by-step solution

#### Step 1. Convert the quantities

R=10,000,000 bits/s; Tp=0.00001 s.

#### Step 2. Find round-trip delay

2Tp=2×10=20 μs.

#### Step 3. Multiply rate by duration

Lmin=2×10,000,000×0.00001=200 bits.

#### Step 4. Convert bits to whole bytes

200/8=25; round upward if needed → 25 bytes.

**Final answer:** 200 bits, or at least 25 whole bytes.

#### What this result means

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.

---

## TEE · Backoff · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/csma--backoff-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/csma/backoff-1

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

n=2; K=3; Tslot=51.2 μs.

## To find

The random range and the delay for the selected K.

## Formula and why



$$
k=\min(n,10),\quad K_{\max}=2^k-1
$$





$$
T=KT_{\mathrm{slot}}
$$



Count starts at zero for K. The selected K must fit the allowed range.

## Step-by-step solution

#### Step 1. Determine exponent

k=min(2,10)=2.

#### Step 2. Find the range

22=4; largest K=4−1=3. Range: 0 to 3.

#### Step 3. Validate selected K

3 is within 0…3.

#### Step 4. Calculate delay

3×51.2=153.6 μs.

**Final answer:** K may be 0…3; selected delay=153.6 μs.

#### What this result means

The range is not the actual delay. Use the stated selected K to calculate the delay.

---

## TEE · Backoff · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/csma--backoff-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/csma/backoff-2

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

n=3; K=5; Tslot=51.2 μs.

## To find

The random range and the delay for the selected K.

## Formula and why



$$
k=\min(n,10),\quad K_{\max}=2^k-1
$$





$$
T=KT_{\mathrm{slot}}
$$



Count starts at zero for K. The selected K must fit the allowed range.

## Step-by-step solution

#### Step 1. Determine exponent

k=min(3,10)=3.

#### Step 2. Find the range

23=8; largest K=8−1=7. Range: 0 to 7.

#### Step 3. Validate selected K

5 is within 0…7.

#### Step 4. Calculate delay

5×51.2=256 μs.

**Final answer:** K may be 0…7; selected delay=256 μs.

#### What this result means

The range is not the actual delay. Use the stated selected K to calculate the delay.

---

## TEE · Backoff · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/csma--backoff-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/csma/backoff-3

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

n=5; K=17; Tslot=5.12 μs.

## To find

The random range and the delay for the selected K.

## Formula and why



$$
k=\min(n,10),\quad K_{\max}=2^k-1
$$





$$
T=KT_{\mathrm{slot}}
$$



Count starts at zero for K. The selected K must fit the allowed range.

## Step-by-step solution

#### Step 1. Determine exponent

k=min(5,10)=5.

#### Step 2. Find the range

25=32; largest K=32−1=31. Range: 0 to 31.

#### Step 3. Validate selected K

17 is within 0…31.

#### Step 4. Calculate delay

17×5.12=87.04 μs.

**Final answer:** K may be 0…31; selected delay=87.04 μs.

#### What this result means

The range is not the actual delay. Use the stated selected K to calculate the delay.

---

## TEE · Store-and-forward and pipelining

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/switching--pipeline/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/switching/pipeline

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

**Definition.** 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.

**Simple meaning.** Pehla packet next link pe jaa raha hai, tab doosra packet first link pe aa sakta hai.

Swipe across the diagram to read its labels ↔

![Packet pipeline: successive packets use different links](https://deep-learning-study-room.vercel.app/cn/fig/pipeline.a023f04605.svg)

Diagram: Packet pipeline: successive packets use different links. Labels: Packet pipeline: successive packets use different links | Packet pipeline: successive packets use different links | Equal serialization intervals; propagation omitted in this sketch. | Link 1 | P1 | P2 | P3 | Link 2 | P1 | P2 | P3 | Link 3 | P1 | P2 | P3 | For h links and k equal packets: h + k − 1 packet times.

Store-and-forward and pipelining

## Understand it step by step

1. 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.
2. 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.
3. 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.
4. Count links, not routers: three intermediate routers between source and destination create four links. Include packet headers in L if the question supplies them.



$$
T_{\mathrm{message}}=hM/R+h\tau
$$





$$
T_{\mathrm{packet}}=(h+k-1)L/R+h\tau
$$



#### Practical example

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.

### Practice question. Explain why packet switching can deliver a large message faster than message switching. [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** First packet h times; remaining packets one time each.

---

## TEE · Compare completion times · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/switching--delay-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/switching/delay-1

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

| Given | Value |
| --- | --- |
| M | 12000 bits |
| h | 3 |
| k | 6 |
| R | 1,000,000 bits/s |
| τ | 0.002 s/link |
| Circuit setup | 0.01 s |

## To find

Time until the final data bit reaches the destination in each method.

## Formula and why



$$
T_m=hM/R+h\tau
$$





$$
T_p=(h+k-1)L/R+h\tau
$$





$$
T_c=T_{\mathrm{setup}}+M/R+h\tau
$$



Message switching repeats whole-message serialization at every hop. Packet switching pipelines equal packets. A circuit streams bits through the established equal-rate path.

## Step-by-step solution

#### Step 1. Find packet size

L=M/k=12000/6=2000 bits.

#### Step 2. Whole-message completion

3×12000/1,000,000 + 3×0.002 = 0.042000 s = 42 ms.

#### Step 3. One packet transmission time

L/R=2000/1,000,000=0.002 s.

#### Step 4. Pipelined packet completion

(3+6−1)×0.002+3×0.002=0.022000 s = 22 ms.

#### Step 5. Circuit completion

0.01+12000/1,000,000+3×0.002=0.028000 s = 28 ms.

**Final answer:** Message=42 ms; packets=22 ms; circuit=28 ms.

#### What this result means

These values depend on the given setup, rates and ideal pipeline. Do not claim that one technique is always faster in every network.

---

## TEE · Compare completion times · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/switching--delay-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/switching/delay-2

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

| Given | Value |
| --- | --- |
| M | 8000 bits |
| h | 2 |
| k | 4 |
| R | 1,000,000 bits/s |
| τ | 0.001 s/link |
| Circuit setup | 0.005 s |

## To find

Time until the final data bit reaches the destination in each method.

## Formula and why



$$
T_m=hM/R+h\tau
$$





$$
T_p=(h+k-1)L/R+h\tau
$$





$$
T_c=T_{\mathrm{setup}}+M/R+h\tau
$$



Message switching repeats whole-message serialization at every hop. Packet switching pipelines equal packets. A circuit streams bits through the established equal-rate path.

## Step-by-step solution

#### Step 1. Find packet size

L=M/k=8000/4=2000 bits.

#### Step 2. Whole-message completion

2×8000/1,000,000 + 2×0.001 = 0.018000 s = 18 ms.

#### Step 3. One packet transmission time

L/R=2000/1,000,000=0.002 s.

#### Step 4. Pipelined packet completion

(2+4−1)×0.002+2×0.001=0.012000 s = 12 ms.

#### Step 5. Circuit completion

0.005+8000/1,000,000+2×0.001=0.015000 s = 15 ms.

**Final answer:** Message=18 ms; packets=12 ms; circuit=15 ms.

#### What this result means

These values depend on the given setup, rates and ideal pipeline. Do not claim that one technique is always faster in every network.

---

## TEE · Packet pipeline with header overhead

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/switching--headers/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/switching/headers

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

M=12,000 bits; payload=1,000 bits; header=100 bits; h=4; R=1,000,000 bits/s; τ=0.001 s.

## To find

k, L, total serialized bits on one link and completion time.

## Formula and why



$$
k=M/P,\quad L=P+H
$$





$$
T=(h+k-1)L/R+h\tau
$$



The payload determines packet count; payload plus header determines packet transmission time.

## Step-by-step solution

#### Step 1. Count packets

k=12,000/1,000=12.

#### Step 2. Add the header to each packet

L=1,000+100=1,100 bits.

#### Step 3. Count all bits sent on one link

12×1,100=13,200 bits, of which 1,200 are headers.

#### Step 4. Find one packet time

1,100/1,000,000=0.0011 s.

#### Step 5. Apply the pipeline

(4+12−1)×0.0011+4×0.001=0.0205 s=20.5 ms.

**Final answer:** 12 packets; 1,100 bits each; 13,200 bits on one link; completion=20.5 ms.

#### What this result means

Packet headers consume link capacity. Ignoring them gives an unrealistically small completion time for this question.

---

## TEE · IPv6 packet length · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/ipv6--length-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/ipv6/length-1

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

Base=40 bytes; extensions=0 bytes; upper-layer content=1000 bytes. Ordinary non-jumbo packet.

## To find

Payload Length and total bytes.

## Formula and why



$$
P=E+D,\qquad T=40+P
$$



Payload begins immediately after the IPv6 base header. Extensions are part of that payload.

## Step-by-step solution

#### Step 1. Calculate payload

P=0+1000=1000 bytes.

#### Step 2. Add the base header

T=40+1000=1040 bytes.

#### Step 3. Identify the stored field

The Payload Length field stores 1000, not 1040.

**Final answer:** Payload Length=1000; total=1040 bytes.

#### What this result means

Do not count the base header twice or leave extension-header bytes out of the payload length.

---

## TEE · IPv6 packet length · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/ipv6--length-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/ipv6/length-2

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

Base=40 bytes; extensions=24 bytes; upper-layer content=1200 bytes. Ordinary non-jumbo packet.

## To find

Payload Length and total bytes.

## Formula and why



$$
P=E+D,\qquad T=40+P
$$



Payload begins immediately after the IPv6 base header. Extensions are part of that payload.

## Step-by-step solution

#### Step 1. Calculate payload

P=24+1200=1224 bytes.

#### Step 2. Add the base header

T=40+1224=1264 bytes.

#### Step 3. Identify the stored field

The Payload Length field stores 1224, not 1264.

**Final answer:** Payload Length=1224; total=1264 bytes.

#### What this result means

Do not count the base header twice or leave extension-header bytes out of the payload length.

---

## TEE · IPv6 packet length · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/ipv6--length-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/ipv6/length-3

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

Base=40 bytes; extensions=40 bytes; upper-layer content=500 bytes. Ordinary non-jumbo packet.

## To find

Payload Length and total bytes.

## Formula and why



$$
P=E+D,\qquad T=40+P
$$



Payload begins immediately after the IPv6 base header. Extensions are part of that payload.

## Step-by-step solution

#### Step 1. Calculate payload

P=40+500=540 bytes.

#### Step 2. Add the base header

T=40+540=580 bytes.

#### Step 3. Identify the stored field

The Payload Length field stores 540, not 580.

**Final answer:** Payload Length=540; total=580 bytes.

#### What this result means

Do not count the base header twice or leave extension-header bytes out of the payload length.

---

## TEE · DHCP leases, renewal and a relay

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/mapping--lease/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/mapping/lease

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

**Definition.** A DHCP lease grants use of an address for a specified lifetime; renewal extends that permission, while a relay supports communication across subnets.

**Simple meaning.** Address permanent gift nahi: time-limited lease, phir renew.

## Understand it step by step

1. In ordinary DHCPv4 defaults, renewal begins at T1=50% of the lease and rebinding at T2=87.5%, unless the server supplies different values.
2. At T1 a client attempts renewal with its original server. At T2 it can seek renewal from any suitable server.
3. If the lease expires without extension, the client must stop using the leased address. Successful renewal restarts the relevant lease timing.
4. A relay forwards DHCP messages between subnets. It is not the same as a router forwarding every broadcast indiscriminately.

#### Practical example

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.

### Practice question. What is a DHCP lease? Why is a DHCP relay used? [3 practice marks]

#### Answer

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.

#### Practical example

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.

**Yaad rakho:** Lease = limited time; relay = subnet ke paar DHCP support.

---

## TEE · DHCP timer example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/mapping--lease-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/mapping/lease-1

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

Lease duration L=8 h; use default fractional timers.

## To find

T1 and T2 as elapsed times.

## Formula and why



$$
T_1=0.5L,\qquad T_2=0.875L
$$



Use these defaults only when the server/question has not specified other timer values.

## Step-by-step solution

#### Step 1. Renewal timer

T1=0.5×8=4 h.

#### Step 2. Rebinding timer

T2=0.875×8=7 h.

#### Step 3. Place them before expiry

4 h < 7 h < 8 h.

**Final answer:** T1=4 h; T2=7 h.

#### What this result means

These are elapsed times, not wall-clock times. Add them to the stated acquisition time only when a clock time is requested.

---

## TEE · DHCP timer example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/mapping--lease-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/mapping/lease-2

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

Lease duration L=16 h; use default fractional timers.

## To find

T1 and T2 as elapsed times.

## Formula and why



$$
T_1=0.5L,\qquad T_2=0.875L
$$



Use these defaults only when the server/question has not specified other timer values.

## Step-by-step solution

#### Step 1. Renewal timer

T1=0.5×16=8 h.

#### Step 2. Rebinding timer

T2=0.875×16=14 h.

#### Step 3. Place them before expiry

8 h < 14 h < 16 h.

**Final answer:** T1=8 h; T2=14 h.

#### What this result means

These are elapsed times, not wall-clock times. Add them to the stated acquisition time only when a clock time is requested.

---

## TEE · DHCP timer example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/mapping--lease-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/mapping/lease-3

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

Lease duration L=24 h; use default fractional timers.

## To find

T1 and T2 as elapsed times.

## Formula and why



$$
T_1=0.5L,\qquad T_2=0.875L
$$



Use these defaults only when the server/question has not specified other timer values.

## Step-by-step solution

#### Step 1. Renewal timer

T1=0.5×24=12 h.

#### Step 2. Rebinding timer

T2=0.875×24=21 h.

#### Step 3. Place them before expiry

12 h < 21 h < 24 h.

**Final answer:** T1=12 h; T2=21 h.

#### What this result means

These are elapsed times, not wall-clock times. Add them to the stated acquisition time only when a clock time is requested.

---

## TEE · IPv4 header-length example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/packet-support--ihl-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/packet-support/ihl-1

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### Practice question. An IPv4 packet has IHL=5 and Total Length=1000 bytes. Find header and payload sizes. [3 practice marks]

#### Answer

## Given

IHL=5; Total Length=1000 bytes.

## To find

Header bytes and payload bytes.

## Formula and why



$$
H=4\,\mathrm{IHL},\qquad P=T-H
$$



IHL counts 32-bit words; each word is 4 bytes.

## Step-by-step solution

#### Step 1. Convert IHL to bytes

H=4×5=20 bytes.

#### Step 2. Subtract the header

P=1000−20=980 bytes.

#### Step 3. Add back the parts

20+980=1000 bytes.

**Final answer:** Header=20 bytes; payload=980 bytes.

#### What this result means

IPv4 Total Length includes its own header. IPv6 Payload Length uses a different convention.

---

## TEE · IPv4 header-length example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/packet-support--ihl-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/packet-support/ihl-2

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### Practice question. An IPv4 packet has IHL=6 and Total Length=1200 bytes. Find header and payload sizes. [3 practice marks]

#### Answer

## Given

IHL=6; Total Length=1200 bytes.

## To find

Header bytes and payload bytes.

## Formula and why



$$
H=4\,\mathrm{IHL},\qquad P=T-H
$$



IHL counts 32-bit words; each word is 4 bytes.

## Step-by-step solution

#### Step 1. Convert IHL to bytes

H=4×6=24 bytes.

#### Step 2. Subtract the header

P=1200−24=1176 bytes.

#### Step 3. Add back the parts

24+1176=1200 bytes.

**Final answer:** Header=24 bytes; payload=1176 bytes.

#### What this result means

IPv4 Total Length includes its own header. IPv6 Payload Length uses a different convention.

---

## TEE · IPv4 header-length example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/packet-support--ihl-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/packet-support/ihl-3

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### Practice question. An IPv4 packet has IHL=8 and Total Length=800 bytes. Find header and payload sizes. [3 practice marks]

#### Answer

## Given

IHL=8; Total Length=800 bytes.

## To find

Header bytes and payload bytes.

## Formula and why



$$
H=4\,\mathrm{IHL},\qquad P=T-H
$$



IHL counts 32-bit words; each word is 4 bytes.

## Step-by-step solution

#### Step 1. Convert IHL to bytes

H=4×8=32 bytes.

#### Step 2. Subtract the header

P=800−32=768 bytes.

#### Step 3. Add back the parts

32+768=800 bytes.

**Final answer:** Header=32 bytes; payload=768 bytes.

#### What this result means

IPv4 Total Length includes its own header. IPv6 Payload Length uses a different convention.

---

## TEE · IPv4 fragmentation · optional extension

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/packet-support--fragmentation/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/packet-support/fragmentation

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

**Definition.** IPv4 fragmentation divides a packet that exceeds an outgoing link’s MTU into smaller fragments, when fragmentation is permitted.

**Simple meaning.** MTU se packet bada hai toh allowed case mein fragments; offset original payload mein position batata hai.

## Understand it step by step

1. This is supporting practice, not an explicitly listed numerical in the supplied current syllabus or these two papers. Finish the confirmed core first.
2. 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.
3. Every non-final fragment’s payload must be a multiple of 8 bytes. Its payload capacity is 8×floor((MTU−H)/8).
4. 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.
5. If DF is set, a router cannot fragment the IPv4 packet; IPv6 routers do not fragment packets either. Reassembly is at the destination.

#### Practical example

A fragment with offset 185 starts at byte 185×8=1,480 of the original payload, counting from byte zero.

### Practice question. What is the unit of IPv4 fragment offset and what does MF indicate? [3 practice marks]

#### Answer

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.

#### Practical example

A fragment with offset 185 starts at byte 185×8=1,480 of the original payload, counting from byte zero.

**Yaad rakho:** Offset ×8 = starting payload byte.

---

## TEE · Optional fragmentation · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/packet-support--fragment-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/packet-support/fragment-1

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

Total=4000; H=20; MTU=1500 bytes; DF=0.

## To find

All fragments and their header-related values.

## Formula and why



$$
P=T-H
$$





$$
P_{\max}=8\left\lfloor\frac{\mathrm{MTU}-H}{8}\right\rfloor
$$





$$
\mathrm{offset}=\mathrm{preceding\ payload\ bytes}/8
$$



Subtract the header before splitting the original payload. Round non-final fragment payload capacity down to a multiple of eight.

## Step-by-step solution

#### Step 1. Original payload

4000−20=3980 bytes.

#### Step 2. Non-final payload capacity

MTU−H=1500−20=1480. Floor((1480)/8)×8=1480 bytes.

#### Step 3. Allocate each fragment

| Fragment | Payload bytes | Total bytes | Starting byte | Offset /8 | MF |
| --- | --- | --- | --- | --- | --- |
| 1 | 1480 | 1500 | 0 | 0 | 1 |
| 2 | 1480 | 1500 | 1480 | 185 | 1 |
| 3 | 1020 | 1040 | 2960 | 370 | 0 |

#### Step 4. Verify no payload is lost

1480+1480+1020=3980 bytes. Every total length is at most 1500.

**Final answer:** 3 fragments; lengths, offsets and MF are listed in the table.

#### What this result means

Only payload positions determine offsets; repeating a header does not move the offset of later original data.

---

## TEE · Optional fragmentation · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/packet-support--fragment-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/packet-support/fragment-2

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

Total=2000; H=20; MTU=620 bytes; DF=0.

## To find

All fragments and their header-related values.

## Formula and why



$$
P=T-H
$$





$$
P_{\max}=8\left\lfloor\frac{\mathrm{MTU}-H}{8}\right\rfloor
$$





$$
\mathrm{offset}=\mathrm{preceding\ payload\ bytes}/8
$$



Subtract the header before splitting the original payload. Round non-final fragment payload capacity down to a multiple of eight.

## Step-by-step solution

#### Step 1. Original payload

2000−20=1980 bytes.

#### Step 2. Non-final payload capacity

MTU−H=620−20=600. Floor((600)/8)×8=600 bytes.

#### Step 3. Allocate each fragment

| Fragment | Payload bytes | Total bytes | Starting byte | Offset /8 | MF |
| --- | --- | --- | --- | --- | --- |
| 1 | 600 | 620 | 0 | 0 | 1 |
| 2 | 600 | 620 | 600 | 75 | 1 |
| 3 | 600 | 620 | 1200 | 150 | 1 |
| 4 | 180 | 200 | 1800 | 225 | 0 |

#### Step 4. Verify no payload is lost

600+600+600+180=1980 bytes. Every total length is at most 620.

**Final answer:** 4 fragments; lengths, offsets and MF are listed in the table.

#### What this result means

Only payload positions determine offsets; repeating a header does not move the offset of later original data.

---

## TEE · Optional fragmentation · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/packet-support--fragment-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/packet-support/fragment-3

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [3 practice marks]

#### Answer

## Given

Total=1500; H=20; MTU=600 bytes; DF=0.

## To find

All fragments and their header-related values.

## Formula and why



$$
P=T-H
$$





$$
P_{\max}=8\left\lfloor\frac{\mathrm{MTU}-H}{8}\right\rfloor
$$





$$
\mathrm{offset}=\mathrm{preceding\ payload\ bytes}/8
$$



Subtract the header before splitting the original payload. Round non-final fragment payload capacity down to a multiple of eight.

## Step-by-step solution

#### Step 1. Original payload

1500−20=1480 bytes.

#### Step 2. Non-final payload capacity

MTU−H=600−20=580. Floor((580)/8)×8=576 bytes.

#### Step 3. Allocate each fragment

| Fragment | Payload bytes | Total bytes | Starting byte | Offset /8 | MF |
| --- | --- | --- | --- | --- | --- |
| 1 | 576 | 596 | 0 | 0 | 1 |
| 2 | 576 | 596 | 576 | 72 | 1 |
| 3 | 328 | 348 | 1152 | 144 | 0 |

#### Step 4. Verify no payload is lost

576+576+328=1480 bytes. Every total length is at most 600.

**Final answer:** 3 fragments; lengths, offsets and MF are listed in the table.

#### What this result means

Only payload positions determine offsets; repeating a header does not move the offset of later original data.

---

## TEE · UDP length calculation · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/transport--udp-size-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/transport/udp-size-1

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [5 practice marks]

#### Answer

## Given

UDP payload=100 B; UDP fixed header=8 B; IP header=20 B.

## To find

UDP Length field and total packet bytes.

## Formula and why



$$
L_{UDP}=8+P,\quad L_{IP}=H_{IP}+L_{UDP}
$$



UDP Length includes its own header, but does not include the IP header.

## Step-by-step solution

#### Step 1. Include the UDP header

100+8=108 bytes.

#### Step 2. Include the IP header

108+20=128 bytes.

#### Step 3. Check layer boundaries

20 IP + 8 UDP + 100 data = 128 bytes.

**Final answer:** UDP Length=108 bytes; IP packet=128 bytes.

#### What this result means

Do not write the whole IP packet size into the UDP Length field. Link-layer overhead is excluded.

---

## TEE · UDP length calculation · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/transport--udp-size-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/transport/udp-size-2

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [5 practice marks]

#### Answer

## Given

UDP payload=512 B; UDP fixed header=8 B; IP header=20 B.

## To find

UDP Length field and total packet bytes.

## Formula and why



$$
L_{UDP}=8+P,\quad L_{IP}=H_{IP}+L_{UDP}
$$



UDP Length includes its own header, but does not include the IP header.

## Step-by-step solution

#### Step 1. Include the UDP header

512+8=520 bytes.

#### Step 2. Include the IP header

520+20=540 bytes.

#### Step 3. Check layer boundaries

20 IP + 8 UDP + 512 data = 540 bytes.

**Final answer:** UDP Length=520 bytes; IP packet=540 bytes.

#### What this result means

Do not write the whole IP packet size into the UDP Length field. Link-layer overhead is excluded.

---

## TEE · UDP length calculation · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/transport--udp-size-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/transport/udp-size-3

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [5 practice marks]

#### Answer

## Given

UDP payload=1200 B; UDP fixed header=8 B; IP header=40 B.

## To find

UDP Length field and total packet bytes.

## Formula and why



$$
L_{UDP}=8+P,\quad L_{IP}=H_{IP}+L_{UDP}
$$



UDP Length includes its own header, but does not include the IP header.

## Step-by-step solution

#### Step 1. Include the UDP header

1200+8=1208 bytes.

#### Step 2. Include the IP header

1208+40=1248 bytes.

#### Step 3. Check layer boundaries

40 IP + 8 UDP + 1200 data = 1248 bytes.

**Final answer:** UDP Length=1208 bytes; IP packet=1248 bytes.

#### What this result means

Do not write the whole IP packet size into the UDP Length field. Link-layer overhead is excluded.

---

## TEE · TCP sequence and ACK arithmetic · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/transport--tcp-seq-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/transport/tcp-seq-1

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [5 practice marks]

#### Answer

## Given

Client ISN=1000; server ISN=5000; data=200 B; no sequence wrap or loss.

## To find

Each sequence/acknowledgement boundary.

## Formula and why



$$
\mathrm{first}=ISN+1,\quad \mathrm{next}=\mathrm{first}+L
$$



SYN and FIN consume one sequence value each; data consumes one value per byte; an empty ACK consumes none.

## Step-by-step solution

#### Step 1. Acknowledge SYNs

Server ACK=1001; client ACK=5001.

#### Step 2. Number the data

First byte=1001; last=1001+200−1=1200.

#### Step 3. Acknowledge data

Next expected byte=1200+1=1201; receiver sends ACK=1201.

#### Step 4. Acknowledge FIN

Client FIN Seq=1201; FIN ACK=1202.

**Final answer:** Handshake ACKs 1001 and 5001; data 1001…1200; data ACK 1201; FIN ACK 1202.

#### What this result means

An ACK reports the next expected byte, not the last received byte. Each direction has its own sequence space.

---

## TEE · TCP sequence and ACK arithmetic · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/transport--tcp-seq-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/transport/tcp-seq-2

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [5 practice marks]

#### Answer

## Given

Client ISN=99; server ISN=700; data=500 B; no sequence wrap or loss.

## To find

Each sequence/acknowledgement boundary.

## Formula and why



$$
\mathrm{first}=ISN+1,\quad \mathrm{next}=\mathrm{first}+L
$$



SYN and FIN consume one sequence value each; data consumes one value per byte; an empty ACK consumes none.

## Step-by-step solution

#### Step 1. Acknowledge SYNs

Server ACK=100; client ACK=701.

#### Step 2. Number the data

First byte=100; last=100+500−1=599.

#### Step 3. Acknowledge data

Next expected byte=599+1=600; receiver sends ACK=600.

#### Step 4. Acknowledge FIN

Client FIN Seq=600; FIN ACK=601.

**Final answer:** Handshake ACKs 100 and 701; data 100…599; data ACK 600; FIN ACK 601.

#### What this result means

An ACK reports the next expected byte, not the last received byte. Each direction has its own sequence space.

---

## TEE · TCP sequence and ACK arithmetic · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/transport--tcp-seq-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/transport/tcp-seq-3

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [5 practice marks]

#### Answer

## Given

Client ISN=4000; server ISN=9000; data=1024 B; no sequence wrap or loss.

## To find

Each sequence/acknowledgement boundary.

## Formula and why



$$
\mathrm{first}=ISN+1,\quad \mathrm{next}=\mathrm{first}+L
$$



SYN and FIN consume one sequence value each; data consumes one value per byte; an empty ACK consumes none.

## Step-by-step solution

#### Step 1. Acknowledge SYNs

Server ACK=4001; client ACK=9001.

#### Step 2. Number the data

First byte=4001; last=4001+1024−1=5024.

#### Step 3. Acknowledge data

Next expected byte=5024+1=5025; receiver sends ACK=5025.

#### Step 4. Acknowledge FIN

Client FIN Seq=5025; FIN ACK=5026.

**Final answer:** Handshake ACKs 4001 and 9001; data 4001…5024; data ACK 5025; FIN ACK 5026.

#### What this result means

An ACK reports the next expected byte, not the last received byte. Each direction has its own sequence space.

---

## TEE · Leaky-bucket timeline · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/congestion--leaky-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/congestion/leaky-1

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [7 practice marks]

#### Answer

## Given

| Time (s) | Arrival packets |
| --- | --- |
| 0 | 8 |
| 2 | 9 |
| 5 | 3 |

## To find

Queue after each burst, dropped packets and time the queue finally empties.

## Formula and why



$$
q_{before}=\max(0,q_{previous}-r\Delta t)
$$





$$
a_{accepted}=\min(a,B-q_{before})
$$



This explicit event order separates elapsed-time service from instantaneous admission.

## Step-by-step solution

#### Step 1. Start with an empty queue

q=0 at t=0 before the first arrival; no negative-time service.

#### Step 2. Apply service then admission at each event

| t | Arrive | Drained | Before | Admit | Drop | After |
| --- | --- | --- | --- | --- | --- | --- |
| 0 | 8 | 0 | 0 | 8 | 0 | 8 |
| 2 | 9 | 4 | 4 | 6 | 3 | 10 |
| 5 | 3 | 6 | 4 | 3 | 0 | 7 |

#### Step 3. Sum the overflow

Total dropped=3 packets.

#### Step 4. Drain after the last arrival

Last event t=5; queue=7. Time needed=7/2=3.5 s; final empty time=8.5 s.

**Final answer:** 3 packets dropped; queue finally empty at t=8.5 s.

#### What this result means

A finite queue cannot accept an instantaneous burst beyond its free slots. Inter-event service is capped by available queued data.

---

## TEE · Leaky-bucket timeline · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/congestion--leaky-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/congestion/leaky-2

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [7 practice marks]

#### Answer

## Given

| Time (s) | Arrival packets |
| --- | --- |
| 0 | 12 |
| 1 | 7 |
| 3 | 4 |

## To find

Queue after each burst, dropped packets and time the queue finally empties.

## Formula and why



$$
q_{before}=\max(0,q_{previous}-r\Delta t)
$$





$$
a_{accepted}=\min(a,B-q_{before})
$$



This explicit event order separates elapsed-time service from instantaneous admission.

## Step-by-step solution

#### Step 1. Start with an empty queue

q=0 at t=0 before the first arrival; no negative-time service.

#### Step 2. Apply service then admission at each event

| t | Arrive | Drained | Before | Admit | Drop | After |
| --- | --- | --- | --- | --- | --- | --- |
| 0 | 12 | 0 | 0 | 12 | 0 | 12 |
| 1 | 7 | 3 | 9 | 3 | 4 | 12 |
| 3 | 4 | 6 | 6 | 4 | 0 | 10 |

#### Step 3. Sum the overflow

Total dropped=4 packets.

#### Step 4. Drain after the last arrival

Last event t=3; queue=10. Time needed=10/3=3.33333 s; final empty time=6.33333 s.

**Final answer:** 4 packets dropped; queue finally empty at t=6.33333 s.

#### What this result means

A finite queue cannot accept an instantaneous burst beyond its free slots. Inter-event service is capped by available queued data.

---

## TEE · Leaky-bucket timeline · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/congestion--leaky-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/congestion/leaky-3

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [7 practice marks]

#### Answer

## Given

| Time (s) | Arrival packets |
| --- | --- |
| 0 | 10 |
| 1 | 18 |
| 4 | 6 |

## To find

Queue after each burst, dropped packets and time the queue finally empties.

## Formula and why



$$
q_{before}=\max(0,q_{previous}-r\Delta t)
$$





$$
a_{accepted}=\min(a,B-q_{before})
$$



This explicit event order separates elapsed-time service from instantaneous admission.

## Step-by-step solution

#### Step 1. Start with an empty queue

q=0 at t=0 before the first arrival; no negative-time service.

#### Step 2. Apply service then admission at each event

| t | Arrive | Drained | Before | Admit | Drop | After |
| --- | --- | --- | --- | --- | --- | --- |
| 0 | 10 | 0 | 0 | 10 | 0 | 10 |
| 1 | 18 | 5 | 5 | 15 | 3 | 20 |
| 4 | 6 | 15 | 5 | 6 | 0 | 11 |

#### Step 3. Sum the overflow

Total dropped=3 packets.

#### Step 4. Drain after the last arrival

Last event t=4; queue=11. Time needed=11/5=2.2 s; final empty time=6.2 s.

**Final answer:** 3 packets dropped; queue finally empty at t=6.2 s.

#### What this result means

A finite queue cannot accept an instantaneous burst beyond its free slots. Inter-event service is capped by available queued data.

---

## TEE · Token-bucket waiting · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/congestion--token-wait-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/congestion/token-wait-1

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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? [5 practice marks]

#### Answer

## Given

B=10000; r=2000; initial tokens=3000; L=7000 bytes; L≤B.

## To find

Token deficit and eligibility wait.

## Formula and why



$$
\Delta=\max(0,L-T),\quad t_{wait}=\Delta/r
$$



Each byte needs one token. This is a shaper, so it waits for missing tokens; the packet fits within token capacity.

## Step-by-step solution

#### Step 1. Count missing tokens

Δ=max(0,7000−3000)=4000.

#### Step 2. Divide by refill rate

Wait=4000/2000=2 s.

#### Step 3. Check tokens at eligibility

3000+2000×2=7000 tokens, at most capacity 10000. Sending consumes 7000, leaving 0.

**Final answer:** The packet is eligible after 2 s; physical transmission takes additional time.

#### What this result means

If L exceeds B and packets must be admitted atomically, merely waiting cannot make the packet eligible under this bucket configuration.

---

## TEE · Token-bucket waiting · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/congestion--token-wait-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/congestion/token-wait-2

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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? [5 practice marks]

#### Answer

## Given

B=8000; r=1000; initial tokens=500; L=2500 bytes; L≤B.

## To find

Token deficit and eligibility wait.

## Formula and why



$$
\Delta=\max(0,L-T),\quad t_{wait}=\Delta/r
$$



Each byte needs one token. This is a shaper, so it waits for missing tokens; the packet fits within token capacity.

## Step-by-step solution

#### Step 1. Count missing tokens

Δ=max(0,2500−500)=2000.

#### Step 2. Divide by refill rate

Wait=2000/1000=2 s.

#### Step 3. Check tokens at eligibility

500+1000×2=2500 tokens, at most capacity 8000. Sending consumes 2500, leaving 0.

**Final answer:** The packet is eligible after 2 s; physical transmission takes additional time.

#### What this result means

If L exceeds B and packets must be admitted atomically, merely waiting cannot make the packet eligible under this bucket configuration.

---

## TEE · Token-bucket waiting · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/congestion--token-wait-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/congestion/token-wait-3

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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? [5 practice marks]

#### Answer

## Given

B=12000; r=3000; initial tokens=4000; L=10000 bytes; L≤B.

## To find

Token deficit and eligibility wait.

## Formula and why



$$
\Delta=\max(0,L-T),\quad t_{wait}=\Delta/r
$$



Each byte needs one token. This is a shaper, so it waits for missing tokens; the packet fits within token capacity.

## Step-by-step solution

#### Step 1. Count missing tokens

Δ=max(0,10000−4000)=6000.

#### Step 2. Divide by refill rate

Wait=6000/3000=2 s.

#### Step 3. Check tokens at eligibility

4000+3000×2=10000 tokens, at most capacity 12000. Sending consumes 10000, leaving 0.

**Final answer:** The packet is eligible after 2 s; physical transmission takes additional time.

#### What this result means

If L exceeds B and packets must be admitted atomically, merely waiting cannot make the packet eligible under this bucket configuration.

---

## TEE · Token-bucket sustained burst · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/congestion--token-burst-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/congestion/token-burst-1

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [7 practice marks]

#### Answer

## Given

B=10000 bytes; r=2000 B/s; P=12000 B/s; continuously backlogged fluid traffic.

## To find

Time until tokens exhaust and bytes sent at the peak rate.

## Formula and why



$$
t=\frac{B}{P-r},\quad D=Pt
$$



Tokens are consumed at P and simultaneously replenished at r, so net depletion is P−r.

## Step-by-step solution

#### Step 1. Net depletion

12000−2000=10000 tokens/s.

#### Step 2. Time to exhaust B

t=10000/10000=1 s.

#### Step 3. Data sent and independent balance

D=12000×1=12000 bytes. Check B+rt=10000+2000×1=12000 bytes.

**Final answer:** Peak burst lasts 1 s and sends 12000 bytes.

#### What this result means

Using B/P would ignore replenishment during transmission. Packetized scheduling may round timing; this question explicitly uses a fluid model.

---

## TEE · Token-bucket sustained burst · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/congestion--token-burst-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/congestion/token-burst-2

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [7 practice marks]

#### Answer

## Given

B=6000 bytes; r=3000 B/s; P=9000 B/s; continuously backlogged fluid traffic.

## To find

Time until tokens exhaust and bytes sent at the peak rate.

## Formula and why



$$
t=\frac{B}{P-r},\quad D=Pt
$$



Tokens are consumed at P and simultaneously replenished at r, so net depletion is P−r.

## Step-by-step solution

#### Step 1. Net depletion

9000−3000=6000 tokens/s.

#### Step 2. Time to exhaust B

t=6000/6000=1 s.

#### Step 3. Data sent and independent balance

D=9000×1=9000 bytes. Check B+rt=6000+3000×1=9000 bytes.

**Final answer:** Peak burst lasts 1 s and sends 9000 bytes.

#### What this result means

Using B/P would ignore replenishment during transmission. Packetized scheduling may round timing; this question explicitly uses a fluid model.

---

## TEE · Token-bucket sustained burst · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/congestion--token-burst-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/congestion/token-burst-3

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [7 practice marks]

#### Answer

## Given

B=16000 bytes; r=4000 B/s; P=8000 B/s; continuously backlogged fluid traffic.

## To find

Time until tokens exhaust and bytes sent at the peak rate.

## Formula and why



$$
t=\frac{B}{P-r},\quad D=Pt
$$



Tokens are consumed at P and simultaneously replenished at r, so net depletion is P−r.

## Step-by-step solution

#### Step 1. Net depletion

8000−4000=4000 tokens/s.

#### Step 2. Time to exhaust B

t=16000/4000=4 s.

#### Step 3. Data sent and independent balance

D=8000×4=32000 bytes. Check B+rt=16000+4000×4=32000 bytes.

**Final answer:** Peak burst lasts 4 s and sends 32000 bytes.

#### What this result means

Using B/P would ignore replenishment during transmission. Packetized scheduling may round timing; this question explicitly uses a fluid model.

---

## TEE · Supporting HTTP timing · example 1

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/applications--http-time-1/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/applications/http-time-1

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [5 practice marks]

#### Answer

## Given

n=3; RTT=50 ms; each payload=10000 B; rate=1000000 bit/s; ideal HTTP/1.x timing model.

## To find

Total time under each stated connection policy.

## Formula and why



$$
T_{non}=n(2RTT+T_{object})
$$





$$
T_{persistent}=RTT+n(RTT+T_{object})
$$



Nonpersistent uses one setup RTT plus one request/first-response RTT per object. Persistent pays setup once, then one sequential request RTT per object.

## Step-by-step solution

#### Step 1. Serialize one object

Tobject=10000×8/1000000 seconds = 80 ms.

#### Step 2. Separate connections

Tnon=3×(2×50+80)=540 ms.

#### Step 3. One persistent connection

Tpersistent=50+3×(50+80)=440 ms.

#### Step 4. Check the saving

540−440=100 ms = (3−1)×50; exactly the removed setup round trips.

**Final answer:** Nonpersistent=540 ms; persistent=440 ms.

#### What this result means

This is an explicitly simplified supporting numerical, not a measured prediction for modern browsers using multiplexing, TLS, caches and parallel connections.

---

## TEE · Supporting HTTP timing · example 2

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/applications--http-time-2/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/applications/http-time-2

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [5 practice marks]

#### Answer

## Given

n=5; RTT=20 ms; each payload=20000 B; rate=2000000 bit/s; ideal HTTP/1.x timing model.

## To find

Total time under each stated connection policy.

## Formula and why



$$
T_{non}=n(2RTT+T_{object})
$$





$$
T_{persistent}=RTT+n(RTT+T_{object})
$$



Nonpersistent uses one setup RTT plus one request/first-response RTT per object. Persistent pays setup once, then one sequential request RTT per object.

## Step-by-step solution

#### Step 1. Serialize one object

Tobject=20000×8/2000000 seconds = 80 ms.

#### Step 2. Separate connections

Tnon=5×(2×20+80)=600 ms.

#### Step 3. One persistent connection

Tpersistent=20+5×(20+80)=520 ms.

#### Step 4. Check the saving

600−520=80 ms = (5−1)×20; exactly the removed setup round trips.

**Final answer:** Nonpersistent=600 ms; persistent=520 ms.

#### What this result means

This is an explicitly simplified supporting numerical, not a measured prediction for modern browsers using multiplexing, TLS, caches and parallel connections.

---

## TEE · Supporting HTTP timing · example 3

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/applications--http-time-3/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/applications/http-time-3

Optional extension · no matching calculation in the two supplied papers

**Optional worked extension.** 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.

### 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. [5 practice marks]

#### Answer

## Given

n=2; RTT=100 ms; each payload=5000 B; rate=500000 bit/s; ideal HTTP/1.x timing model.

## To find

Total time under each stated connection policy.

## Formula and why



$$
T_{non}=n(2RTT+T_{object})
$$





$$
T_{persistent}=RTT+n(RTT+T_{object})
$$



Nonpersistent uses one setup RTT plus one request/first-response RTT per object. Persistent pays setup once, then one sequential request RTT per object.

## Step-by-step solution

#### Step 1. Serialize one object

Tobject=5000×8/500000 seconds = 80 ms.

#### Step 2. Separate connections

Tnon=2×(2×100+80)=560 ms.

#### Step 3. One persistent connection

Tpersistent=100+2×(100+80)=460 ms.

#### Step 4. Check the saving

560−460=100 ms = (2−1)×100; exactly the removed setup round trips.

**Final answer:** Nonpersistent=560 ms; persistent=460 ms.

#### What this result means

This is an explicitly simplified supporting numerical, not a measured prediction for modern browsers using multiplexing, TLS, caches and parallel connections.

---

## TEE · Delays, units and packet pipeline

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/formulas--units/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/formulas/units

TEE · symbols explained; worked examples linked below

Supporting formula collection. Use the compact TEE formula sheet first; the full calculation set below is not an observed-paper requirement.



$$
T_f=L/R
$$



L=bits, R=bits/s, Tf=seconds. Use for serialization.



$$
T_p=d/v
$$



d=distance, v=propagation speed. Use consistent distance units.



$$
T=(h+k-1)L/R+h\tau
$$



h equal-rate store-and-forward links, k equal packets, L total bits/packet; τ per-link propagation. No queueing or processing.

## Learn it with complete solutions

[Three worked delay examples](https://deep-learning-study-room.vercel.app/read/cn/tee/read/basics--delay-1/)

---

## TEE · Collision timing and backoff

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/formulas--csma/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/formulas/csma

TEE · symbols explained; worked examples linked below



$$
L_{\min}\geq 2RT_p
$$



R=bits/s; Tp=one-way seconds. Theoretical collision-detection bound.



$$
k=\min(n,10),\quad 0\leq K\leq 2^k-1
$$



n collisions; K selected integer for classic Ethernet backoff.



$$
T_{\mathrm{backoff}}=KT_{\mathrm{slot}}
$$



Multiply selected K by slot duration, retaining units.

## Learn it with complete solutions

[Minimum-frame examples](https://deep-learning-study-room.vercel.app/read/cn/tee/practice/csma--minframe-1/)

---

## TEE · IPv6 and packet lengths

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/formulas--ipv6/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/formulas/ipv6

TEE · symbols explained; worked examples linked below

Supporting formula collection. Use the compact TEE formula sheet first; the full calculation set below is not an observed-paper requirement.



$$
\text{omitted groups}=8-\text{visible groups}
$$



Count every written group, including a written 0.



$$
\mathrm{IPv6\ total}=40+\mathrm{payload\ length}
$$



Payload includes extension headers, excludes the base 40 bytes.



$$
\mathrm{IPv4\ header\ bytes}=4\,\mathrm{IHL}
$$



IHL is in 32-bit words.



$$
\mathrm{IPv4\ payload}=\mathrm{Total\ Length}-4\,\mathrm{IHL}
$$



IPv4 Total Length includes the IPv4 header.

## Learn it with complete solutions

[Four IPv6 expansions](https://deep-learning-study-room.vercel.app/read/cn/tee/read/ipv6--expand-1/)

---

## TEE · Block coding, Hamming distance and CRC

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/tee-formulas--coding/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/tee-formulas/coding

TEE · Complete six-unit quick reference · current syllabus 702AI0C023



$$
r=n-k,\quad R_c=k/n
$$



k data bits, n codeword bits, r redundant bits; coding rate is dimensionless.



$$
d(a,b)=\operatorname{weight}(a\oplus b)
$$



Count differing bit positions in equal-length words.



$$
s=d_{\min}-1,\quad t=\lfloor(d_{\min}-1)/2\rfloor
$$



Separate maximum guaranteed detection and correction counts; all distinct pairs define dmin.



$$
2^r\ge m+r+1
$$



Smallest r for m data bits in single-error Hamming construction; parity positions 1,2,4,….



$$
R(x)=x^rM(x)\bmod G(x),\quad T=x^rM\oplus R
$$



Generator degree r; append r zeros and use modulo-2 XOR division. Receiver divides T directly.

[CRC and receiver-check working](https://deep-learning-study-room.vercel.app/read/cn/tee/read/error-control--crc-1/)

---

## TEE · ARQ windows and utilization

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/tee-formulas--arq/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/tee-formulas/arq

TEE · Complete six-unit quick reference · current syllabus 702AI0C023



$$
N=2^m,\quad W_{GBN}\le N-1,\quad W_{R,GBN}=1
$$



m sequence bits; sequence numbers 0…N−1. GBN receiver accepts only next in order.



$$
W_{S,SR}=W_{R,SR}\le N/2
$$



Standard equal-window SR bound; prevent successive windows overlapping.



$$
U_{SW}=\frac{T_t}{T_t+2T_p+T_a}
$$



Ideal error-free Stop-and-Wait; Tt data transmission, Tp one-way propagation, Ta ACK transmission.



$$
U_W=\min(1,WT_t/(T_t+2T_p+T_a))
$$



Supporting ideal pipeline bound; no queueing/processing, equal frames.



$$
W_{need}=\lceil(T_t+2T_p+T_a)/T_t\rceil
$$



Round upward for a full pipeline, then verify numbering constraints.

[Utilization worked examples](https://deep-learning-study-room.vercel.app/read/cn/tee/practice/arq--efficiency-1/)

---

## TEE · UDP and TCP arithmetic

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/tee-formulas--transport/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/tee-formulas/transport

TEE · Complete six-unit quick reference · current syllabus 702AI0C023



$$
L_{UDP}=8+L_{data}
$$



UDP length includes its own eight-byte header, not the IP header.



$$
H_{TCP}=4\times\mathrm{data\ offset}
$$



Offset counts 32-bit words; minimum 20-byte TCP header.



$$
ACK=\mathrm{first\ byte\ sequence}+L
$$



After receiving all L consecutive data bytes, acknowledge the next expected byte. SYN and FIN each add one.



$$
W_{new}=\max(0,\min(rwnd,cwnd)-F)
$$



Supporting simplified sending allowance; F bytes in flight, all quantities in the same units.

[TCP sequence-number examples](https://deep-learning-study-room.vercel.app/read/cn/tee/practice/transport--tcp-seq-1/)

---

## TEE · Leaky queue and token bucket

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/tee-formulas--buckets/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/tee-formulas/buckets

TEE · Complete six-unit quick reference · current syllabus 702AI0C023



$$
q_b=\max(0,q-r\Delta t)
$$



Leaky data-queue state before the next arrival; service cannot exceed queued data.



$$
a_{ok}=\min(a,B-q_b),\quad drop=a-a_{ok}
$$



B finite data capacity; admit instantaneous arrivals after interval service.



$$
T_{new}=\min(B,T+r\Delta t)
$$



Token refill before the next admission, capped by token capacity.



$$
t_{wait}=\max(0,L-T)/r
$$



Single packet of L≤B tokens, no other queued traffic, shaper not policer.



$$
D(t)\le B+rt
$$



Full token-bucket allowance; physical link rate also bounds actual departure.



$$
t_{burst}=B/(P-r),\quad P>r
$$



Fluid peak-rate burst, initially full and continuously backlogged. Net depletion is P−r.

[Three sustained-burst examples](https://deep-learning-study-room.vercel.app/read/cn/tee/practice/congestion--token-burst-1/)

---

## TEE · Topology and HTTP timing · supporting examples

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/practice/tee-formulas--support/

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/practice/tee-formulas/support

TEE · Complete six-unit quick reference · current syllabus 702AI0C023



$$
L_{mesh}=n(n-1)/2
$$



Undirected full mesh without self-links; per-node ports n−1.



$$
T_{non}=n(2RTT+T_o)
$$



Sequential nonpersistent HTTP/1.x idealization; no DNS/TLS/loss/parallelism.



$$
T_{persistent}=RTT+n(RTT+T_o)
$$



One initial TCP handshake then sequential requests without pipelining; To is one object’s serialization.

[Assumption-labelled HTTP timing](https://deep-learning-study-room.vercel.app/read/cn/tee/practice/applications--http-time-1/)
