CS FundamentalsHardGATE CS (PYQ pattern)

A router must send 10.0.0.0/24 through 10.0.7.0/24 (eight /24s) to next hop X, except 10.0.5.0/24, which goes to next hop Y. What is the minimum number of routing-table entries if longest-prefix matching may be relied on, and the minimum if every entry must cover only addresses with its own next hop?

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

Correct answer: C. 2 and 4

With longest-prefix match: 10.0.0.0/21 -> X plus the more specific 10.0.5.0/24 -> Y = 2. Without overlaps, X's seven /24s aggregate at best to 10.0.0.0/22, 10.0.4.0/24 and 10.0.6.0/23 (3 entries), plus Y's /24: 4.

More Computer Networks questions

Exams that ask this topic