ADDRESS AND STATISTICAL CHECKS

Reconciling equal IPv4 child blocks with their parent

Splitting an IPv4 block into longer-prefix children produces equal pieces that add back up to the parent. This guide shows the prefix-bit arithmetic with a documentation block and checks the last child against the parent boundary.

Why the children must add back to the parent

A subnet split is a partition. Every address in the parent block belongs to exactly one child, and no child extends beyond the parent. That gives two simple checks for any list of children: the number of addresses must add up to the parent total, and the first and last children must start and end on the parent boundaries. The example here uses 192.0.2.0/24, a block that RFC 5737 sets aside for documentation, so it does not point at any real network. Splitting it into /26 blocks should give four children of 64 addresses each, for 256 in all. The split tool lists the four network addresses, and the subnet calculator confirms the endpoint of the last one. If both checks agree, the split is complete and has no gaps or overlaps.

Counting host bits

An IPv4 address has 32 bits. A /24 prefix fixes the first 24, leaving 8 host bits, and 2 to the eighth power is 256 addresses. A /26 prefix fixes 26 bits and leaves 6 host bits, so each child holds 2 to the sixth power, or 64, addresses. The difference between the prefixes, 26 minus 24, is 2 added prefix bits. Each added bit doubles the number of blocks, so two bits produce 2 squared, or 4, children. Multiplying 4 children by 64 addresses each gives 256, which equals the parent total. This relationship holds for any split: the children count is 2 raised to the number of added bits, and each child holds the parent total divided by that count. The arithmetic is exact, with no rounding anywhere.

The four children of 192.0.2.0/24

Because each child covers 64 addresses, the network addresses advance in steps of 64 in the last octet. The children are 192.0.2.0/26, 192.0.2.64/26, 192.0.2.128/26 and 192.0.2.192/26. The first covers addresses 0 through 63, the second 64 through 127, the third 128 through 191 and the fourth 192 through 255. Each starts exactly one address after the previous block ends. The step size equals the block size, so it is read from the host bits and never from the prefix number. For a /27 the step would be 32, for a /28 it would be 16. A quick way to verify any list is to check that every start is a multiple of the block size within the parent, which keeps the children aligned on their natural boundaries.

Checking the last child

The last child should end where the parent ends. The subnet calculator takes an address and a prefix and returns the last address and the total addresses of the block that contains it. For 192.0.2.192 with prefix 26, it reports a last address of 192.0.2.255 and 64 total addresses. That endpoint matches the parent broadcast boundary of the /24, and the block size matches the 64 per child computed from the host bits. Run the same check on the first child, using 192.0.2.0 with prefix 26, and you should see 192.0.2.63 as the last address. An address in the middle of the list, such as 192.0.2.64, should end at 192.0.2.127. When all the endpoints line up, the list covers the parent without a gap.

A parent that must start on a boundary

The split tool expects the parent to start on its own network boundary. A string such as 192.0.2.77/24 names a host address inside the block, not the block itself. The network that contains it is 192.0.2.0/24, found by keeping the first 24 bits and setting the rest to zero. If you split the host form without normalizing, the intended parent is unclear, and the tool requires the boundary form for that reason. Applying the mask first is a small step that prevents a larger error: children computed from the wrong starting point would be shifted and would no longer cover the block you meant. When you copy an address from a device configuration, which often lists the interface address, convert it to its network address before splitting.

A different split of a different block

Try the documentation block 198.51.100.0/24, which RFC 5737 also reserves, and split it into /27 children. Added bits: 27 minus 24 is 3, so there are 2 cubed, or 8, children. Each holds 2 to the fifth power, or 32, addresses, and 8 times 32 is 256. The starts are 198.51.100.0, .32, .64, .96, .128, .160, .192 and .224. The last child begins at .224 and should end at .255. Checking it with the subnet calculator for 198.51.100.224 and prefix 27 returns a last address of 198.51.100.255 and 32 total addresses. The same pattern applies at any size. Longer prefixes give more, smaller children, and shorter ones give fewer, larger blocks.

Splitting by one bit

The smallest useful split adds one prefix bit and produces two halves. Splitting 192.0.2.0/24 into /25 blocks gives 192.0.2.0/25 and 192.0.2.128/25, each with 128 addresses. The second half starts exactly at the midpoint of the parent. The case where the new prefix equals the old one is also valid and returns a single child, the parent itself, because zero added bits give 2 to the zero power, or 1, block. The tool requires the new prefix to be at least as long as the old. A shorter prefix would describe a larger block that contains the parent, which is aggregation and not a split. The two operations are inverses, but they answer different questions and need different tools.

Usable hosts are a separate question

The totals in this guide count addresses, not devices. In traditional IPv4 subnetting, the first address of a block is the network address and the last is the directed broadcast address, so a /26 has 62 assignable host addresses out of 64. Special cases exist for /31 point-to-point links and /32 single-host routes. These conventions come from RFC 950 and later documents, and their application depends on the equipment and the network design. The worksheet and the split tool make no claim about which addresses a router or host will accept. Reconciling children with the parent is pure address arithmetic. Decisions about gateways, reserved addresses and allocation belong to your network records and policy, and should be written down apart from the split.

Uneven splits are a different task

The split tool produces equal children, and that matters for how the results are read. If a plan needs one large block and several small ones, such as a /25 and two /26 blocks from a /24, it is built from more than one split step. Start with the /25 and the remaining /25, then split only the second half into /26 children. Each step can be checked with the same count-and-size test. The /25 holds 128 addresses, and the two /26 blocks hold 64 each, so the plan covers 256 in total. Mixing prefix lengths inside one parent is common in real allocations, and it is the reason to keep the parent boundary and the order of allocations in your records. An equal split is the simplest case, not the only one.

Many small children from one parent

Longer child prefixes quickly produce long lists. Splitting 192.0.2.0/24 into /30 blocks adds 6 prefix bits, which gives 2 to the sixth power, or 64, children of 4 addresses each. The product is 256, as before. The network addresses advance by 4, so the list runs 192.0.2.0, .4, .8 and continues to .252. The final child, starting at 192.0.2.252, should end at 192.0.2.255. A /30 is a small block often discussed for point-to-point links, though the allocation choice is a design decision outside this arithmetic. For long lists, check a few positions in the middle as well as the ends: the tenth child should begin at 36, since the first begins at 0 and each step is 4.

Alignment of each child

A child block must begin at an address that is a multiple of its own size. For /26 children inside 192.0.2.0/24, the last octet of each start must be a multiple of 64, so valid starts are 0, 64, 128 and 192. An entry such as 192.0.2.32/26 breaks this rule, because 32 is not a multiple of 64, and the address would belong to the /26 that begins at 0. The prefix mask would clear the lower bits and silently map the entry back to 192.0.2.0/26. Checking alignment is a one-step test with a remainder: divide the starting value of the changing octet by the block size and confirm it divides evenly. The split tool produces aligned children automatically, which is why the parent must be given in aligned form first. When a child list comes from a person and not from the tool, scan it in order. Each start should equal the previous start plus the block size. A difference larger than the block size marks a gap, and a difference smaller marks an overlap. In the default list the starts are 0, 64, 128 and 192, and every step is exactly 64. A missing entry would show as a jump of 128. Duplicate entries would show as a step of zero. After the scan, add the sizes and compare the total with the parent. A list of three /26 blocks totals 192 and falls 64 short of the /24, which tells you one child is missing even before you find out which one.

Recording the result

A split is only useful if the plan can be reconstructed later. Keep three facts together: the parent in boundary form, the child prefix, and the intended use of each child. With those, anyone can regenerate the list and compare it with the configuration. If the child list contains a number of entries that is not a power of two, or the sizes differ, something other than a plain equal split has been done, and the parent-total check will show it. Likewise, if a child start is not a multiple of its block size, the entry is misaligned. The cross-check of count times size against the parent total is quick enough to repeat whenever the plan changes, and it catches typing slips that otherwise surface as routing problems.

Reproduce the checks

Four child blocks

Open the Ipv4 Subnet Split Calculator and enter:

Aligned IPv4 network with prefix
192.0.2.0/24
New subnet prefix length
26

Expected output:

Subnets

192.0.2.0/26
192.0.2.64/26
192.0.2.128/26
192.0.2.192/26

The children advance by sixty-four addresses.

Last child endpoint

Open the Subnet Calculator and enter:

IP address
192.0.2.192
Prefix length
26

Expected output:

Last address

192.0.2.255

Total addresses

64

The last child reaches the parent endpoint.

References and implementation scope

The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.

Sources

Related tasks