CS FundamentalsVery hardProduct company interview · GATE level

A site owns 172.18.72.0/22, 172.18.76.0/23 and 172.18.80.0/22 and wants to advertise them with one prefix. What is the smallest single prefix that covers all three, and how many addresses inside that prefix do NOT belong to any of the three networks?

  1. A. 172.18.64.0/19; 5632 addresses
  2. B. 172.18.64.0/20; 1536 addresses
  3. C. 172.18.72.0/20; 1536 addresses
  4. D. 172.18.64.0/19; 2560 addresses

Correct answer: A. 172.18.64.0/19; 5632 addresses

The third octet runs from 72 (01001000) to 83 (01010011). These share only the leading bits 010, so the common prefix is 16 + 3 = 19 bits: 172.18.64.0/19, covering 64-95 in the third octet, 8192 addresses. The three networks hold 1024 + 512 + 1024 = 2560 addresses, so 8192 - 2560 = 5632 addresses are covered but not owned. A /20 starting at 64 stops at 79 and misses 172.18.80.0/22; 172.18.72.0/20 is not a valid block boundary; 2560 is the owned count, not the excess.

More Computer Networks questions

Exams that ask this topic