Question

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?

Choose one option
Official answer and solution
Official answer
A
From
Official GATE 2012 answer key

Solution

Subnet the given /20 address block into /21 (half) and /22 (quarter) non-overlapping prefixes.

  1. The ISP owns 245.248.128.0/20. Total addresses = 212=40962^{12} = 4096, spanning third octet 128 through 143 (128+16−1128 + 16 - 1).

  2. Half of the chunk allocated to Organization A:

  • Half of 2122^{12} is 211=20482^{11} = 2048 addresses, which requires a /21 mask.
  • The two valid /21 blocks are 245.248.128.0/21 (third octet 128..135) and 245.248.136.0/21 (third octet 136..143).
  1. A quarter of the chunk allocated to Organization B:
  • Quarter of 2122^{12} is 210=10242^{10} = 1024 addresses, which requires a /22 mask.
  • The four valid /22 blocks are 245.248.128.0/22 (128..131), 245.248.132.0/22 (132..135), 245.248.136.0/22 (136..139), and 245.248.140.0/22 (140..143).
  1. Non-overlapping condition:
  • If Org A gets 245.248.136.0/21 (136..143), Org B can validly get 245.248.128.0/22 (128..131). The two blocks are disjoint and both belong to the ISP chunk.
  • Option (B) assigns 245.248.128.0/21 and 245.248.128.0/22, which overlap directly.
  • Option (C) and (D) allocate incorrect prefix lengths to A and B.
  1. Therefore, Option (A) is the valid allocation.
Final answer

A

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2012 Computer Science and Information Technology (CS)
Question
34 of 65, printed as CS Q.34
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.