IPv6 Subnet Prefix Planner

Split an IPv6 allocation into indexed child and leaf networks, inspect full and compressed notation, and generate a random local ULA /48.

Inputs

Prefix lengths
Zero-based. The first child has index 0.

Calculated in your browser

Results

Selected child
2001:db8:1200:200::/56
Selected leaf
2001:db8:1200:205::/64
Child prefixes
256

IPv6 prefix tree

IPv6 prefix treeThe parent connects to nearby child prefixes. The selected child connects to nearby leaf prefixes. Full CIDRs and indices appear in the table.2001:db8:1200::/482001:db8:1200::/482001:db8:1200:100::/562001:db8:1200:100::/562001:db8:1200:200::/562001:db8:1200:200::/562001:db8:1200:300::/562001:db8:1200:300::/562001:db8:1200:204::/642001:db8:1200:204::/642001:db8:1200:205::/642001:db8:1200:205::/642001:db8:1200:206::/642001:db8:1200:206::/64/48 → /56 → /64
  • Selected prefix
  • Nearby or parent prefix
The parent connects to nearby child prefixes. The selected child connects to nearby leaf prefixes. Full CIDRs and indices appear in the table.
Parent network
2001:db8:1200::/48
Last address in parent
2001:db8:1200:ffff:ffff:ffff:ffff:ffff
Full address
2001:0db8:1200:0000:0000:0000:0000:0000
Compressed address
2001:db8:1200::
Addresses in parent
1,208,925,819,614,629,174,706,176
Leaves in selected child
256
Address space
IPv6
Prefixes near the selected indices
LevelIndexPrefixSelection
Child12001:db8:1200:100::/56Neighbor
Child22001:db8:1200:200::/56Selected
Child32001:db8:1200:300::/56Neighbor
Leaf42001:db8:1200:204::/64Neighbor
Leaf52001:db8:1200:205::/64Selected
Leaf62001:db8:1200:206::/64Neighbor

How the calculator works

Normalize the parent

Expand the address to eight hextets and clear its host bits. All address arithmetic uses BigInt so a /0 and its last /128 remain exact.

Select the branch

A /p split into /q yields 2^(q − p) children. Multiply the zero-based child index by 2^(128 − q) and add it to the parent start. Repeat within the child to choose a leaf.

Use local ULA space

The generator chooses 40 random bits in your browser and adds the fd prefix byte to make a locally assigned /48. Keep the /48 in your IP plan and allocate smaller internal networks from it.

Questions

Can an IPv6 split ever lose precision in this planner?

The planner uses exact 128-bit integer operations. JSON exports encode large integers as decimal strings so a parser can preserve them.

How does IPv6 compression choose between two equally long zero runs?

Canonical compression uses the leftmost run of equal length and keeps a single zero hextet explicit.

References