CS FundamentalsHardGATE CS · ISRO Scientist

An organisation needs three LANs with 1000, 500 and 250 hosts, carved with VLSM from ONE contiguous CIDR block. What is the longest prefix (smallest block) that can hold all three?

  1. A. /22
  2. B. /20
  3. C. /23
  4. D. /21

Correct answer: D. /21

Hosts plus network and broadcast need blocks of 1024, 512 and 256 addresses (/22, /23, /24), 1792 in total. That exceeds 1024 but fits in 2048, so a /21 is required. Adding the rounded block sizes (not the raw host counts) is the safe method, since blocks must be aligned powers of two.

More Computer Networks questions

Exams that ask this topic