CS FundamentalsHardGATE CS (PYQ pattern)

A router has routes to 10.0.0.0/24, 10.0.1.0/24, 10.0.2.0/24, 10.0.3.0/24, 10.0.5.0/24 and 10.0.6.0/23, all via the same next hop. What is the smallest number of prefixes that covers exactly these addresses (no extra addresses)?

  1. A. 4
  2. B. 5
  3. C. 2
  4. D. 3

Correct answer: D. 3

Adjacent aligned blocks merge: ['10.0.0.0/22', '10.0.5.0/24', '10.0.6.0/23']. 10.0.5.0/24 cannot merge with 10.0.6.0/23 (not a sibling block) and 10.0.4.0/24 is missing, so exactly those prefixes remain.

More Computer Networks questions

Exams that ask this topic