Merge consecutive CIDR blocks into a single aggregate and check that the starting network is correctly aligned.
Merging 2^k adjacent blocks shortens the prefix by k bits. The merge is only lossless if the first network address sits on a boundary of the larger block, otherwise the aggregate covers space that belongs to a neighbour. Aggregation is what keeps routing tables and security-group rule counts small, but a misaligned summary advertises address space you do not own.
CIDR Merge
merged prefix = p − ceil(log2(blocks)); the aggregate is valid only when the first network is a multiple of the aggregate block size.
merged prefix = p − ceil(log2(blocks)); the aggregate is valid only when the first network is a multiple of the aggregate block size. Merging 2^k adjacent blocks shortens the prefix by k bits. The merge is only lossless if the first network address sits on a boundary of the larger block, otherwise the aggregate covers space that belongs to a neighbour.
Aggregation is what keeps routing tables and security-group rule counts small, but a misaligned summary advertises address space you do not own.
This calculator takes 3 inputs: First network address, Prefix length of each block, Number of consecutive blocks. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.