GATE / CS ARCHIVE

GATE CSE 2012 / QUESTION 34

Disjoint half and quarter CIDR blocks

Computer Networks · IP Addressing, Fragmentation & Address Resolution · Full GATE CSE 2012 paper

GATE 2012, Q34 2 marks · MCQ
Report issue

IP Addressing, Fragmentation & Address Resolution

Question 34, GATE 2012: 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?
        (A) 245.248.136.0/21 and 245.248.128.0/22
        (B) 245.248.128.0/21 and 245.248.128.0/22
        (C) 245.248.132.0/22 and 245.248.132.0/21
        (D) 245.248.136.0/24 and 245.248.132.0/21
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Step through it (14 steps)

The /20 block spans third-octet values 128–143 and has 4096 addresses. A needs 2048 addresses, a /21 aligned on a multiple of 8, and B needs 1024 addresses, a /22 aligned on a multiple of 4. Option A assigns A the range 136–143 and B the range 128–131, disjoint and within the parent block, leaving 132–135. B overlaps its blocks; C has wrong sizes and an unaligned /21; D has wrong sizes. Hence A as subnet arithmetic. The supplied 245.x address lies in reserved 240.0.0.0/4 rather than ordinary public ISP unicast space, so the scenario is hypothetical.

Check: Splitting a /20 in half adds one prefix bit, giving /21; splitting it into quarters adds two, giving /22. The allocation to A must have twice as many addresses as B, and both blocks must also satisfy their alignment boundaries.

Original paper, page 8 · Answer key