Back to course

Calculating Subnets: Step-by-Step Example 1 (/26)

Networking Fundamentals: The 0 to Hero Guide

Lesson 38: Calculating Subnets: Step-by-Step Example 1 (/26)

Let's apply binary math to calculate subnetting for the network 192.168.1.0/26.

Step 1: Determine Network and Host Bits

  • Total Bits: 32
  • Network Bits (N): The prefix is /26. (26 bits are dedicated to the network)
  • Host Bits (H): 32 - 26 = 6 bits remain for the hosts.

Step 2: Calculate Subnets and Hosts

  • Borrowed Bits (S): Since /24 (255.255.255.0) is the default Class C boundary, we borrowed $26 - 24 = 2$ bits.
  • Number of Subnets: $2^S = 2^2 = 4$ subnets.
  • Usable Hosts per Subnet: $2^H - 2 = 2^6 - 2 = 64 - 2 = 62$ usable hosts.

Step 3: Determine the Block Size (Magic Number)

In the fourth octet, the 26th bit is the 2nd borrowed bit. The value of this bit determines the block size or subnet increment.

1286432168421
2526272829303132
  • The 26th bit has a value of 64. This is the block size.

Step 4: List the Subnets

Starting from the base network, increment by the block size (64) until you reach 256:

SubnetNetwork AddressFirst Usable HostLast Usable HostBroadcast Address
1192.168.1.0192.168.1.1192.168.1.62192.168.1.63
2192.168.1.64192.168.1.65192.168.1.126192.168.1.127
3192.168.1.128192.168.1.129192.168.1.190192.168.1.191
4192.168.1.192192.168.1.193192.168.1.254192.168.1.255

Conclusion: Subnetting is merely controlled manipulation of the subnet mask to divide the network space efficiently.