Back to the 2020 paper

Module 3: Network Layer & Routing

20202m

An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available with it:

245.248.128.0/20

The ISP wants to give half of this chunk of addresses to organization A, and a quarter to organization B, while retaining the remaining with itself. Which of the following is a valid allocation of addresses to A and B?

(i) 245.248.136.0/21 and 245.248.128.0/22
(ii) 245.248.128.0/21 and 245.248.128.0/22
(iii) 245.248.132.0/22 and 245.248.132.0/21
(iv) 245.248.136.0/22 and 245.248.132.0/21

Worked SolutionAI Assisted

Answer

(i) 245.248.136.0/21 and 245.248.128.0/22

Step-by-step solution

Given block: 245.248.128.0/20.

A /20 IPv4 block contains:
23220=212=40962^{32-20}=2^{12}=4096 addresses.

So the complete range is:
245.248.128.0 to 245.248.143.255.

1. Organization A needs half

Half of 4096 = 2048 addresses.
A 2048-address block corresponds to /21 because:
23221=20482^{32-21}=2048.

The valid /21 sub-blocks inside the /20 are:

  • 245.248.128.0/21 → 245.248.128.0–245.248.135.255
  • 245.248.136.0/21 → 245.248.136.0–245.248.143.255

2. Organization B needs one quarter

One quarter of 4096 = 1024 addresses.
A 1024-address block corresponds to /22 because:
23222=10242^{32-22}=1024.

If A receives 245.248.136.0/21, the remaining lower half is 245.248.128.0–245.248.135.255. B can receive 245.248.128.0/22, which covers 245.248.128.0–245.248.131.255.

The ISP then retains 245.248.132.0–245.248.135.255, which is another /22 block.

Thus the allocations do not overlap and exactly satisfy the required 1/2 and 1/4 sizes.

Checking the options

  • (i) A = 245.248.136.0/21, B = 245.248.128.0/22 → valid, non-overlapping. ✅
  • (ii) A = 245.248.128.0/21 and B = 245.248.128.0/22 → overlap. ❌
  • (iii) A and B use overlapping address space and the block sizes/positions are invalid for the required allocation. ❌
  • (iv) A = 245.248.136.0/22 is only 1024 addresses, not the required 2048 for half. ❌

Final answer: (i) 245.248.136.0/21 and 245.248.128.0/22.

Similar questions