GATE / CS ARCHIVE

GATE CSE 2024 SET 2 / QUESTION 38

An exactly aligned CIDR block

Computer Networks · IP Addressing, Fragmentation & Address Resolution · Full GATE CSE 2024 Set 2 paper

GATE 2024 Set 2, Q38 2 marks · MCQ
Report issue

IP Addressing, Fragmentation & Address Resolution

Question 38, GATE 2024: Which prefix exactly covers 10.12.2.0 through 10.12.3.255 inclusive? A 10.12.2.0/23; B 10.12.2.0/24; C 10.12.0.0/22; D 10.12.2.0/22.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Step through it (6 steps)

Approach: Find the common binary prefix and verify both size and alignment.

1. Derivation. The range contains two consecutive /24 blocks, third octets 2 and 3. Their common prefix fixes the first 7 bits of that octet, yielding 16+7=23 network bits and 9 host bits. The aligned base is 10.12.2.0, so the exact 512-address range is 10.12.2.0/23, option A.

2. Explanation and checks. The third octets are 00000010 and 00000011: their first seven bits agree and their final bit varies. Together with the entire final octet, that leaves nine variable bits and 29=512 addresses. A /24 contains only 256 addresses. A /22 leaves ten host bits and spans four third-octet values, too many; moreover 10.12.2.0 is not an aligned /22 network base. Both endpoints of A agree exactly with the requested range.

Original paper, page 25 · Answer key