Network Fundamentals · Topic 15 of 17

VLSM and Address Planning Practice

Worked practice: choose a prefix from a host count, split a /24 evenly, plan variable length subnets and write ACL wildcard masks, with every step shown.

  • 4 min
In a nutshell
  • Pick the smallest prefix whose usable hosts, 2 to the host bits minus 2, meet the need.
  • Splitting into N equal subnets borrows enough bits that 2 to that power is at least N.
  • In VLSM, allocate the largest subnet first and work down.

What it is

This page practises the planning side of subnetting: how big a subnet must be, how to split a block, and how to fit different sizes into one network.

The first practice page found the subnet for an address you were given. Here you work the other way round and decide the subnets yourself.

Every answer is shown with its steps, so work each one on paper first.

How it works

Planning follows three moves: size each subnet, place the largest first, then check nothing overlaps.

Host counts100, 50, 20, 2, 2pick a prefix for eachSizes/25, /26, /27, /30, /30largest firstBlocksplaced one after anothercheckNo overlapfree space left over

Problem 1: prefix from a host count

You need the smallest subnet with enough usable hosts. Usable hosts are 2 to the host bits, minus 2, so find the first prefix where that number is large enough.

Hosts neededPrefixUsable hostsWhy not smaller
2/302A /31 is a special case for point to point links
30/2730A /28 gives only 14
31/2662A /27 gives only 30
60/2662A /27 gives only 30
100/25126A /26 gives only 62
500/23510A /24 gives only 254
1,000/221,022A /23 gives only 510
Watch out

A subnet with exactly 30 hosts needs a /27, but 31 hosts needs a /26. The extra host doubles the block, because two addresses are lost to the network and broadcast addresses.

Problem 2: split 192.168.1.0/24 into 8 equal subnets

Eight subnets need 3 borrowed bits, because 2 to the power 3 is 8. The prefix becomes /24 plus 3, which is /27.

A /27 has block size 32 and 30 usable hosts. The subnets start at each multiple of 32.

SubnetNetworkUsable rangeBroadcast
1192.168.1.0/27.1 to .30.31
2192.168.1.32/27.33 to .62.63
3192.168.1.64/27.65 to .94.95
4192.168.1.96/27.97 to .126.127
5192.168.1.128/27.129 to .158.159
6192.168.1.160/27.161 to .190.191
7192.168.1.192/27.193 to .222.223
8192.168.1.224/27.225 to .254.255

Problem 3: a VLSM plan for 192.168.50.0/24

A site needs LAN A with 100 hosts, LAN B with 50, LAN C with 20, and two point-to-point links with 2 hosts each.

Sort the requirements from largest to smallest, give each its prefix, then place each block directly after the one before it.

SubnetHostsPrefixNetworkUsable rangeBroadcast
LAN A100/25192.168.50.0.1 to .126.127
LAN B50/26192.168.50.128.129 to .190.191
LAN C20/27192.168.50.192.193 to .222.223
Link 12/30192.168.50.224.225 to .226.227
Link 22/30192.168.50.228.229 to .230.231

The blocks use addresses .0 to .231. The range 192.168.50.232 to .255, which is 24 addresses, is left free for growth.

Exam tip

Always place the largest block first. A block must start on a multiple of its own size, so small blocks placed first leave gaps that larger blocks cannot use.

Problem 4: wildcard masks

An ACL needs a wildcard mask, which is 255.255.255.255 minus the subnet mask.

  • 192.168.50.128/26 has mask 255.255.255.192, so the wildcard is 0.0.0.63
  • 192.168.50.192/27 has mask 255.255.255.224, so the wildcard is 0.0.0.31
  • 10.0.0.0/20 has mask 255.255.240.0, so the wildcard is 0.0.15.255

What to remember for the exam

Six rules cover address planning.

  • Pick the smallest prefix whose usable hosts, 2 to the host bits minus 2, meet the need.
  • Splitting into N equal subnets borrows enough bits that 2 to that power is at least N.
  • In VLSM, allocate the largest subnet first and work down.
  • Each block starts on a multiple of its own size.
  • Subnets in one plan must never overlap.
  • A wildcard mask is 255.255.255.255 minus the subnet mask.

Common mistakes

These four errors spoil a plan.

Forgetting the two reserved addresses. A /26 has 64 addresses but only 62 for hosts.

Placing blocks in the wrong order. Small blocks placed first leave gaps the larger blocks cannot use, so the plan can run out of room.

Overlapping ranges. Two subnets that share any address break routing.

Mixing up wildcard and mask. The wildcard for /26 is 0.0.0.63, not 255.255.255.192.

Check yourself

Try these three, then click a question to reveal its answer.

  • What prefix gives at least 250 hosts?

    A /24, which has 254 usable hosts.

  • What are the four networks when 10.0.0.0/24 is split into 4 equal subnets?

    10.0.0.0/26, 10.0.0.64/26, 10.0.0.128/26 and 10.0.0.192/26.

  • What is the wildcard mask for 172.16.0.0/16?

    0.0.255.255.

Topic 15 of 17 in Network Fundamentals

Test yourself on Network Fundamentals

The full Cisco CCNA 200-301 question bank has 1,206 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Cisco. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.