NetworkTools
Sign In
1What is Subnetting?2CIDR Notation3Subnet Masks4Network, Broadcast & Hosts5/24 Subnets6/25 through /30 Subnets7Third Octet Subnets8Subnetting Practice
← Back to Subnetting Mastery

Learning Objectives

  • Calculate /25 through /30 subnets
  • Master the block size method
  • Understand when each prefix is appropriate

The Block Size Method

For any prefix beyond /24, the block size (in the fourth octet) is:

block size = 256 − last octet of subnet mask

Or more directly:

block size = 2^(32 − prefix)

/25 Subnets

Block size: 128. Mask: 255.255.255.128.

Every /25 covers half of a /24.

Subnet | Range | Broadcast -------|-------|---------- 192.168.1.0/25 | 192.168.1.1 - 192.168.1.126 | 192.168.1.127 192.168.1.128/25 | 192.168.1.129 - 192.168.1.254 | 192.168.1.255

Usable hosts per /25: 126

/26 Subnets

Block size: 64. Mask: 255.255.255.192.

Subnet | Range | Broadcast -------|-------|---------- 192.168.1.0/26 | 192.168.1.1 - 192.168.1.62 | 192.168.1.63 192.168.1.64/26 | 192.168.1.65 - 192.168.1.126 | 192.168.1.127 192.168.1.128/26 | 192.168.1.129 - 192.168.1.190 | 192.168.1.191 192.168.1.192/26 | 192.168.1.193 - 192.168.1.254 | 192.168.1.255

Usable hosts per /26: 62

/27 Subnets

Block size: 32. Mask: 255.255.255.224.

Usable hosts per /27: 30

The network boundaries are always multiples of 32: 0, 32, 64, 96, 128, 160, 192, 224.

/28 Subnets

Block size: 16. Mask: 255.255.255.240.

Usable hosts per /28: 14

Network boundaries at multiples of 16: 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240.

/29 Subnets

Block size: 8. Mask: 255.255.255.248.

Usable hosts per /29: 6

Common for server farms or small VLANs.

/30 Subnets

Block size: 4. Mask: 255.255.255.252.

Usable hosts per /30: 2

This is the classic point-to-point link subnet. Used for router-to-router connections.

What is the network address of 10.0.0.2/30?

What is the broadcast address of 10.0.0.5/30?

Speed Practice

For 192.168.50.145/28:

  1. Block size = 16
  2. Find the network boundary: largest multiple of 16 ≤ 145 = 144
  3. Network address: 192.168.50.144
  4. Broadcast: 192.168.50.159 (network + 16 − 1)
  5. First host: 192.168.50.145
  6. Last host: 192.168.50.158
  7. Usable hosts: 14

Notice that the given address 192.168.50.145 happens to be the first usable host. Every calculation starts from the block size.

Special Case: /31

RFC 3021 allows /31 for point-to-point links. The two addresses are both usable (no separate network/broadcast). This is common on modern router interconnects to conserve address space.

How many /30 subnets fit in a /24?

Key Takeaways

  • Block size = 2^(32 − prefix)
  • Network boundaries are multiples of the block size
  • /30 is the standard point-to-point link
  • Practice speed: from any address and prefix, find network/broadcast in seconds

Next lesson: when the interesting octet isn't the last one.

Previous/24 SubnetsNextThird Octet Subnets