A Subnetting Primer

Understanding the binary sliding concept
June 28, 2014

Subnetting Reference Chart

How It Works - Six Rules

I would rather understand subnetting than memorize charts.

References that show you every combination are useful, and I'll include one above, but the focus of this resource is to help you understand subnetting so that such charts will no longer be needed.

The hint: It's all about the binary.

The Binary Sliding Concept

Most subnetting charts, and even tutorials, just give you the answer. The concept for the chart above is to reinforce understanding of how we arrive at the answers.

The approach is remarkably simple: you just use the binary steps at the top as your guide for each lateral movement.

Example: Moving from /24 to /25

For a /25 you start in the 128 place (one extra bit to the right), and that's your subnet. You have 2 networks, each with 126 hosts in them.

Example: Moving to /26

If you want to go another bit to the right (/26), you're going to add the binary number for that column to 128, which is 64:

128 + 64 = 192

That's your subnet mask's last octet.

Since you've gone to the right one position—and you were at 2 networks—you now have double that number of networks (remember, each slide is an exponent of two, i.e., halving). So you now have 4 networks, each with half the number of hosts (64 - 2 = 62).

The Core Principle

You slide back and forth on the binary scale:

  • Going right: Networks double, hosts halve
  • Going left: Networks halve, hosts double

For each bit slide to one side, you double either the number of networks or hosts while halving the other.

Concrete Example

At one position your networks are 2 and your hosts are 128. When you go to the right:

  • Networks: 2 → 4 (doubled)
  • Hosts: 128 → 64 (halved, minus 2)

If you went left instead to the /24 mark:

  • Hosts: 128 → 256 (doubled, minus 2)
  • Networks: 2 → 1 (halved)

One network of 254 hosts, just like we would expect.

Summary

The next time you're having trouble with doing subnets in your head or on paper, try drawing the chart first:

  1. Binary - The powers of 2 (256, 128, 64, 32, 16, 8, 4, 2, 1)
  2. Mask - The cumulative subnet mask value
  3. Hosts - Available hosts per network
  4. Networks - Number of networks
  5. Bits - Extra bits beyond /24

Remember the binary sliding concept before looking at the full reference chart. I think you'll find it enjoyable to grok it rather than look it up.

Questions or comments? Contact me.