Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

IPv4 subnetting is a 32-bit boundary problem: the slash prefix fixes the network bits, and the bits left over determine how many addresses fit in the block. For example, a /26 leaves 6 bits, so it contains 64 addresses. To find a subnet, convert the partial mask octet to a block size and round the address down to the nearest aligned boundary.

What does /26 mean?

An IPv4 address contains 32 bits. CIDR notation puts a prefix length after a slash; the number tells how many leading bits identify the network. In RFC 4632, examples such as 172.16.0.0/16 and 192.168.99.0/24 show this classless way to describe address blocks.

For /26, the first 26 bits are the network prefix and the final 6 bits identify addresses within the block. A subnet mask expresses the same boundary in dotted-decimal form: prefix bits are 1s and the remaining bits are 0s. Thus /26 is 255.255.255.192. The prefix bits in a mask must be contiguous, as specified in RFC 1812.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Each added prefix bit fixes one more bit and halves the block; removing a prefix bit doubles it. The prefix is therefore not an arbitrary label: it directly controls the number and alignment of addresses.

How many addresses are in a /26?

Subtract the prefix length from 32 to get the number of address bits left in the block, then raise 2 to that power:

  • Host bits = 32 − prefix length.
  • Total addresses = 2host bits.

A /26 leaves 32 − 26 = 6 bits, so it contains 26 = 64 total addresses. This is the block size, not necessarily the number of endpoints you can assign. In an ordinary IPv4 broadcast subnet, the all-zero host portion is the network address and the all-one host portion is the directed broadcast address, so the common usable-host calculation is total addresses minus two.

That minus-two rule has exceptions. A /31 contains two addresses and is used for point-to-point links; RFC 3021 section 2.1 says “the two addresses above MUST be interpreted as host addresses.” A /32 contains one address and can represent a host route. RFC 4632 distinguishes these cases in its address-count table, so do not confuse total addresses with usable hosts in every context.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do I find the subnet for an IP address?

For a partial mask octet, calculate the block size as 256 minus the mask-octet value. The network boundary is the greatest multiple of that block size that is no greater than the address value in the affected octet. Prefix blocks are aligned power-of-two ranges, which is why counting by the block works.

Common partial-octet mask values and their corresponding block sizes are:

Mask octet Block size
128 128
192 64
224 32
240 16
248 8
252 4
254 2

Worked example: 192.168.10.77/26

  1. Calculate the host bits: 32 − 26 = 6. The block contains 26 = 64 addresses.
  2. Convert /26 to its mask: 255.255.255.192. The final-octet block size is 256 − 192 = 64.
  3. Count valid boundaries in the last octet: 0, 64, 128, and 192. Since 77 is between 64 and 127, the network boundary is 64.
  4. The network is 192.168.10.64/26. The next block starts at .128, so the directed broadcast address is 192.168.10.127; the ordinary assignable host range is 192.168.10.65 through 192.168.10.126.

The reusable sequence is prefix, host bits, block size, aligned boundary, then network and broadcast addresses. For a prefix whose boundary is in an earlier octet, apply the same block-size method to that octet; octets to its right start at zero for the network and end at 255 for the block’s last address.

How should I choose a subnet size?

Choose the smallest block that meets the endpoint requirement and leaves suitable growth capacity, then check that its boundary fits inside the parent allocation. Larger blocks provide more room but consume more of the available address space. When dividing an allocation for several differently sized networks, fit the largest requirements first, then place smaller blocks at valid boundaries. CIDR supports such subblocks with different prefix lengths, as described in RFC 1812.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a concrete comparison, a /26 has 64 total addresses and ordinarily 62 assignable host addresses; a /25 has 128 total addresses and ordinarily 126 assignable host addresses. These usable counts assume ordinary broadcast subnets, not a /31 point-to-point link.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What changes when subnetting in AWS?

The arithmetic still determines the theoretical block size, but a cloud platform can constrain which prefix lengths it accepts. AWS’s current VPC subnet CIDR documentation specifies IPv4 subnet blocks from /16 through /28. Its Networking Best Practices CIDR planning guidance describes a /16 as containing 65,536 addresses. These are AWS-specific documented constraints and planning guidance, not general IPv4 rules; check the provider documentation for the environment you are configuring.

Modern subnet planning uses explicit CIDR prefix lengths rather than relying on legacy Class A, B, or C assumptions. CIDR allows differently sized, aligned blocks within a larger allocation, so verify both the required capacity and the available parent range before assigning a subnet.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.