Skip to content
We areTOP 1%

Subnetting numerical: divide 192.168.1.0/24 among departments of 100, 50, 25 and 10 hosts.

HardConceptScenario Questions
Track your progress
First attempt
Re-solve after a few days
Final pass before interviews

Answer

Use VLSM (Variable Length Subnet Masking), which gives each subnet a prefix sized to its own need instead of one size for all. Allocate the largest requirement first, and for each one choose the smallest number of host bits h with 2^h − 2 ≥ hosts needed; the prefix is then 32 − h.

  • Allocating from largest to smallest keeps every subnet aligned on a multiple of its block size (2^h), so ranges never overlap, and each subnet starts right after the previous broadcast address.
  • With equal /26 subnets instead, the 100-host department would not fit, because a /26 holds only 62 hosts.

Example: Splitting 192.168.1.0/24:

Needh (usable)Prefix and maskNetworkHostsBroadcast
1007 (126)/25, 255.255.255.128192.168.1.0.1 to .126.127
506 (62)/26, 255.255.255.192192.168.1.128.129 to .190.191
255 (30)/27, 255.255.255.224192.168.1.192.193 to .222.223
104 (14)/28, 255.255.255.240192.168.1.224.225 to .238.239

Check for 100 hosts: 2^6 − 2 = 62 is too small and 2^7 − 2 = 126 fits, so h = 7 and the prefix is /25. The block 192.168.1.240/28 (.240 to .255) remains free for future growth.

More in Scenario Questions

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account