Which one of the following CIDR prefixes exactly represents the range of IP addresses 10.12.2.0 to 10.12.3.255?
Answer
(A)
Explanation
The range holds \(2 \times 256 = 512 = 2^{9}\) addresses, so the block needs 9 host bits: a /23 prefix. In the third octet, 2 is 00000010 and 3 is 00000011, so only its last bit varies, and 10.12.2.0 has all 9 host bits zero. So 10.12.2.0/23 covers exactly 10.12.2.0 to 10.12.3.255.
- 10.12.2.0/24 covers only 10.12.2.0 to 10.12.2.255, half the range.
- 10.12.0.0/22 covers 10.12.0.0 to 10.12.3.255, twice the range.
- 10.12.2.0 does not start a /22 block; with a /22 mask it falls in the block 10.12.0.0 to 10.12.3.255, again too large.
Answer: A