Free tech learning for everyone, from basics to pro

Routing & SwitchingNetworking SecurityIntermediate

IPv6 prefixes and summarisation: finding the prefix and combining routes

In short: An IPv6 prefix is found by keeping the first prefix-length bits of the address and setting the rest to zero. When the length is a multiple of four, you simply keep that many hex digits. Otherwise you convert just the one split digit to binary. Summarising works the same way as in IPv4: find how many leading bits all the prefixes share.

IPv6 prefix basics

An IPv6 address is 128 bits written as eight groups (hextets) of four hex digits. The prefix length says how many leading bits identify the network. Organisations typically receive a /48 or /56 from a provider and use /64 for each LAN, which leaves 16 or 8 bits of subnet ID to number their networks. The address types and shortening rules are explained in IPv6 explained. Examples here use the documentation range 2001:db8::/32.

Finding the prefix on a nibble boundary

Each hex digit is four bits. If the prefix length is a multiple of four, a nibble boundary, the prefix is simply the first (length / 4) hex digits followed by zeros.

Finding a /56 prefixAddress2001:db8:acad:1234::1Expand2001:0db8:acad:1234::Keep 56 bits14 hex digitsZero the rest2001:db8:acad:1200::Prefix2001:db8:acad:1200::/56
Figure 1. On a nibble boundary each 4 bits is one hex digit, so you count digits instead of working in binary.
  1. Expand the address so every hextet has four digits: 2001:0db8:acad:1234:0000:0000:0000:0001.
  2. Divide the prefix length by 4. For /56 that is 14 digits.
  3. Keep the first 14 digits (2001 0db8 acad 12) and set every digit after them to 0.
  4. Shorten again: 2001:db8:acad:1200::/56.

For the same address, the /48 prefix is 2001:db8:acad::/48, the /60 is 2001:db8:acad:1230::/60 and the /64 is 2001:db8:acad:1234::/64. Providers and designers prefer nibble-aligned lengths because they are easy to read and to delegate through reverse DNS.

Prefixes that split a digit

For lengths such as /61 or /62, one hex digit is shared between the prefix and the host part. Only that digit needs converting to binary.

Take 2001:db8:acad:12a7::1/61. The first 48 bits are the first three hextets. That leaves 13 more bits: 12 bits are the three digits 1, 2 and a, and 1 bit comes from the digit 7. In binary, 7 is 0111. Keep the first bit (0) and zero the other three: 0000, which is 0. The prefix is 2001:db8:acad:12a0::/61. The same method in reverse tells you that this /61 contains the eight /64 subnets 12a0 to 12a7.

Summarising IPv6 routes

Summarisation (aggregation) advertises one route that covers several prefixes, which keeps routing tables small and hides changes inside a site. The method is the same as for IPv4 (see VLSM, CIDR and summarisation): line up the addresses, find where they start to differ, and count the shared leading bits.

Example 1: a branch has 2001:db8:0:8::/64, 2001:db8:0:9::/64, 2001:db8:0:a::/64 and 2001:db8:0:b::/64. The first three hextets (48 bits) are the same. The fourth hextet values 0008, 0009, 000a and 000b only differ in the last digit: 8, 9, a and b are 1000, 1001, 1010 and 1011. The first two bits of that digit (10) are shared, so the shared length is 48 + 12 + 2 = 62. Summary: 2001:db8:0:8::/62.

Example 2: a region holds 2001:db8:10::/48 to 2001:db8:17::/48. The third hextets 0010 to 0017 share their first 13 bits (the last digit runs 0 to 7, which is 0000 to 0111, so only its first bit is shared). The summary is 32 + 13 = 2001:db8:10::/45.

Plan addresses so that each site or region gets a block on a clean boundary; then one summary per site is all the core needs.

interface GigabitEthernet0/0
 ipv6 summary-address eigrp 100 2001:db8:0:8::/62
ipv6 route 2001:db8:10::/45 Null0
show ipv6 route summary

The static route to Null0 is a common way to originate a summary into BGP while discarding traffic for any unused part of the block.

Real-world example: a university received 2001:db8:4400::/40 (a documentation example) and gave each of its eight campuses a /43. Each campus then summarised all its building /64s into its single /43 towards the core. When the engineering faculty added twenty new lab networks, the core routing table did not change at all, and troubleshooting stayed simple because each prefix pointed clearly to one campus.

Practice

What is the /64 prefix of 2001:db8:1:2:3:4:5:6?
2001:db8:1:2::/64.
Why are prefix lengths that are multiples of four easier to work with?
Each hex digit is four bits, so the prefix is a whole number of digits and no binary conversion is needed.
Summarise 2001:db8:0:4::/64 to 2001:db8:0:7::/64.
The last digit runs 4 to 7 (0100 to 0111), sharing two bits, so 48 + 12 + 2 = /62: 2001:db8:0:4::/62.

Key takeaways

  • Find a prefix by keeping the first prefix-length bits and zeroing the rest.
  • On nibble boundaries, keep (length / 4) hex digits.
  • For other lengths, convert only the split digit to binary.
  • Summarise by counting the leading bits all prefixes share.
  • Allocate per site on clean boundaries so each site needs one summary.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.