Subnetting Calculations Step by Step

A Practical Scenario

Suppose a network has the block 192.168.1.0/24, and it needs to be split into 4 smaller subnets. Walking through the actual math makes subnetting far less abstract.

Step 1: How Many Extra Bits Are Needed?

To create 4 subnets, enough bits must be borrowed from the host portion to represent 4 distinct values. Since 2^2 = 4, borrowing 2 bits is exactly enough.

Original: /24  (24 network bits)
Borrow 2 bits from the host portion
New prefix: /26  (24 + 2 = 26 network bits)

Step 2: Find the Size of Each New Subnet

A /26 leaves 6 host bits, so each subnet contains 2^6 = 64 total addresses (62 usable, after reserving the network and broadcast addresses).

Step 3: List Out Each Subnet's Range

Subnet 1: 192.168.1.0   - 192.168.1.63    (usable: .1 to .62)
Subnet 2: 192.168.1.64  - 192.168.1.127   (usable: .65 to .126)
Subnet 3: 192.168.1.128 - 192.168.1.191   (usable: .129 to .190)
Subnet 4: 192.168.1.192 - 192.168.1.255   (usable: .193 to .254)

Each block jumps by 64 addresses (the subnet size), and the first and last address in every block are reserved as that subnet's network and broadcast addresses.

The General Pattern to Remember

  1. Decide how many subnets are needed, and find the smallest power of 2 that covers it.
  2. Borrow that many bits from the host portion to get the new prefix length.
  3. The subnet size is 2^(remaining host bits), and ranges simply repeat in steps of that size.

Once this pattern is understood, subnetting becomes a matter of mechanical arithmetic rather than guesswork.

Written by Lorens Mishra

Software Engineer Notes Management System Administrator

Discussion

0 comments
Sign in to join the discussion.

No comments yet. Be the first to say something.