IPv4 subnetting with a worked /26 network plan

Calculate network boundaries, usable ranges and broadcast addresses, including the exceptions for point-to-point links and host routes.

A subnet calculator is most useful when it answers a planning question: which addresses belong together, where the next block begins and whether a proposed range overlaps another network. It is less useful when its output is copied into a router without checking the surrounding routing and address-allocation plan.

Suppose a small lab has been assigned 192.0.2.0/24 for a documentation exercise and needs four equal network segments. This reserved example range keeps the arithmetic separate from a real deployment. We will divide it into /26 blocks, check the boundaries by hand and identify what the result does not tell us about gateways, DHCP or reachability.

Read the prefix as a count of network bits

An IPv4 address contains 32 bits, commonly displayed as four decimal octets. A CIDR prefix such as /26 says that the first 26 bits identify the network portion. The remaining six bits vary within that block. Six variable bits provide 2 to the power of 6, or 64, distinct addresses.

The subnet mask expresses the same division in address notation. A /26 mask is 255.255.255.192. The final octet, 192, is binary 11000000: two network bits followed by six host bits. The calculation concerns bits, so the familiar decimal appearance of an address should not replace the prefix when deciding whether two addresses share a subnet.

The IPv4 subnet calculator accepts an address and prefix, then calculates the network, final address, mask and usable range under its documented conventions. It performs local arithmetic. It does not query routers, detect existing devices or reserve addresses in a DHCP server.

Divide the example /24 into four /26 blocks

A /24 contains 256 addresses. Borrowing two more bits for the network prefix creates four blocks, each containing 64 addresses. Their final-octet boundaries are 0, 64, 128 and 192. The address immediately before the next boundary is the final address in the previous block.

Four equal subnets inside the documentation block 192.0.2.0/24
NetworkOrdinary usable rangeBroadcastAddresses
192.0.2.0/26192.0.2.1–192.0.2.62192.0.2.6364 total, 62 ordinary hosts
192.0.2.64/26192.0.2.65–192.0.2.126192.0.2.12764 total, 62 ordinary hosts
192.0.2.128/26192.0.2.129–192.0.2.190192.0.2.19164 total, 62 ordinary hosts
192.0.2.192/26192.0.2.193–192.0.2.254192.0.2.25564 total, 62 ordinary hosts

For ordinary broadcast subnets, the all-zero host part identifies the network and the all-one host part identifies the directed broadcast address. That leaves 62 ordinary host addresses in each /26. The familiar “subtract two” calculation has exceptions, particularly /31 point-to-point links and /32 host routes, which need separate treatment.

Find the network containing one address

Take 192.0.2.77/26. The final octet 77 lies between the boundaries 64 and 128, so its network is 192.0.2.64/26. Its final address is 127, and its ordinary usable range is 65 through 126. You can reach the same result by applying the mask to the address bits.

Address octet:  77 = 01001101
Mask octet:    192 = 11000000
Bitwise AND:    64 = 01000000

Network:       192.0.2.64
Final address: 192.0.2.127

This example also shows why an address written with a prefix does not need to be the network’s first address. An interface can be configured as 192.0.2.77/26, while a route describing the whole block uses the normalised network prefix 192.0.2.64/26. Confusing those two uses can produce untidy or rejected route configuration.

Size the block for all assigned addresses

A segment containing 50 workstations does not necessarily need only 50 usable addresses. Count gateways, infrastructure, printers, monitoring devices, static reservations and plausible growth. DHCP exclusions consume part of the usable space too, even though they remain valid host addresses mathematically.

A /26 provides 62 ordinary host positions, so it may fit a tightly scoped 50-device segment but leave little room after infrastructure and growth are included. A /25 provides 128 total addresses and 126 ordinary hosts. The right choice depends on the allocation plan and surrounding address space, not on a calculator’s preference.

Record the intended DHCP pool separately from the full subnet. For example, a lab might reserve the first several usable addresses for infrastructure and allocate a later range dynamically. The calculator cannot know that convention. Document it where operators manage addresses so that an apparently unused address is not assigned twice.

Do not infer the default gateway from arithmetic

The first usable address is often chosen as a gateway by convention, but no IPv4 subnet rule requires that choice. The gateway must be configured appropriately for the network design. Copying the first address from a calculator does not establish that a router actually listens there.

Similarly, two devices with mathematically compatible addresses are not guaranteed to communicate. VLAN membership, interface state, firewall policy, duplicate addresses and routing can prevent connectivity. Use the calculated range to check addressing consistency, then investigate the network layers responsible for actual delivery.

If a device can reach nearby hosts but not another subnet, verify its gateway and the routers’ return routes. If it cannot reach a supposedly local peer, compare both masks as well as both addresses. A mismatched prefix can make one endpoint treat a destination as local while the other sends replies through a gateway.

Handle /31 and /32 deliberately

RFC 3021 permits both addresses in a /31 on an IPv4 point-to-point link. That design avoids reserving separate network and broadcast positions in the ordinary way. A /31 therefore should not be reported as having zero usable endpoints merely because a formula subtracts two from its total of two addresses.

Use /31 only where the equipment and link design support the point-to-point convention. It is not a general replacement for a multi-host LAN. Confirm both ends’ configuration and operational support before changing an existing link.

A /32 represents one address. It is useful for host routes, loopback interfaces and other specific routing purposes. It does not describe a conventional shared LAN with an ordinary range of hosts. Read the configuration context before deciding what “usable” means for that prefix.

Check overlap before adding a route or VPN network

Suppose another lab already uses 192.0.2.96/27. That range sits inside 192.0.2.64/26, so allocating both independently can create an overlap. Comparing only the written starting addresses would miss the relationship. Compare the complete numeric intervals or the network prefixes.

Routing normally uses the most specific matching prefix, which can make overlapping routes appear to work selectively. That does not make overlapping address ownership a sound allocation plan. VPNs are especially sensitive when a remote network overlaps the user’s local network: traffic can follow an unexpected route even though both sides use valid private addresses.

Keep a single address inventory covering existing allocations, reserved growth and remote-access ranges. When a new block is proposed, check both containment and partial overlap. If an overlap is intentional for a specialised design, document the routing and translation behaviour that makes it safe to operate.

Frequently asked questions

How do I check a boundary quickly?

For a /26 within one final octet, list the multiples of 64 and locate the address between two consecutive boundaries. The lower boundary is the network, and one less than the next boundary is the final address. Use bitwise calculation for prefixes crossing other octets rather than extending this shortcut blindly.

Is 192.0.2.64 always a network address?

No. Its role depends on the prefix and context. It is the network boundary for 192.0.2.64/26, but the same numeric address can occupy a different position inside another prefix. Always evaluate the address together with its mask.

Why does a calculator change the address I entered?

It may be displaying the normalised network containing your host address. Entering 192.0.2.77/26 should identify 192.0.2.64/26 as the network. That does not mean the host address itself is invalid; it distinguishes an interface address from a network prefix.

Can I use the documentation addresses in production?

The 192.0.2.0/24 examples are reserved for documentation. Use address space appropriate to your actual network, such as a properly planned private allocation or a provider-assigned public block. The arithmetic transfers; the example allocation is not a deployment recommendation.

Does a larger subnet improve performance?

Not automatically. Prefix size affects addressing and the broadcast domain’s design, but performance depends on traffic, switching, routing, security policy and equipment. Choose the network boundary to fit the operational design instead of using a larger block as a general speed fix.

What should I verify after applying a subnet plan?

Check interface addresses, masks, gateways, DHCP scope, exclusions, VLAN assignment and return routing. Test representative local and routed communication with permitted traffic. Keep the original configuration and a recovery procedure so an arithmetic correction does not become an uncontrolled outage.

Sources and further reading

50 useful tools · ↑ ↓ to navigate · Enter to open · Esc to close