IPv6 General Prefix

The upper 64 bits of an IPv6 prefix usually consists of a /48 global routing prefix (or site prefix) and the remaining 12 bits are used for more specific prefixes (the subnet). This is explained in detail in the following lesson:

IPv6 address assignment

The IPv6 general (or generic) prefix feature lets you renumber a global prefix on your router or switch. This is a simple but pretty useful feature.

For example, let’s say we have the following global prefix:

  • 2001:41f0:4060::/48

And we use the following specific prefixes:

  • 2001:41f0:4060:0001::/64
  • 2001:41f0:4060:0002::/64
  • 2001:41f0:4060:0003::/64
  • 2001:41f0:4060:0004::/64

You can configure these prefixes manually on your interfaces but once your global prefix changes, you have to manually reconfigure your IPv6 addresses. With the IPv6 general prefix feature, we can do this automatically.

Configuration

To demonstrate this, I’ll use a router with four interfaces. On each interface, I’ll use the global prefix and specific prefixes from above.



We configure the global prefix with the ipv6 general-prefix command. You can use whatever name you want, I’ll name mine “GLOBAL”:

R1(config)#ipv6 general-prefix GLOBAL 2001:41F0:4060::/48

On the interfaces, we configure an IPv6 address and refer to the general prefix. You have to specify a full IPv6 address, the first 48 bits will be replaced by the general prefix. I’ll use zeroes for the global prefix:

R1(config)#interface GigabitEthernet 0/1
R1(config-if)#ipv6 address GLOBAL ::1:0:0:0:1/64

R1(config)#interface GigabitEthernet 0/2
R1(config-if)#ipv6 address GLOBAL ::2:0:0:0:1/64

R1(config)#interface GigabitEthernet 0/3
R1(config-if)#ipv6 address GLOBAL ::3:0:0:0:1/64

R1(config)#interface GigabitEthernet 0/4
R1(config-if)#ipv6 address GLOBAL ::4:0:0:0:1/64

Let’s see what prefixes we ended up with:

R1#show ipv6 interface | include 2001
    2001:41F0:4060:1::1, subnet is 2001:41F0:4060:1::/64
    2001:41F0:4060:2::1, subnet is 2001:41F0:4060:2::/64
    2001:41F0:4060:3::1, subnet is 2001:41F0:4060:3::/64
    2001:41F0:4060:4::1, subnet is 2001:41F0:4060:4::/64

This is looking good. You can see we have four prefixes and the global prefix is 2001:41F0:4060.

Let’s see if we can change our global prefix without manually reconfiguring each interface. I’ll use the ipv6 general prefix command again to use a different global prefix:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You've Ever Spent on Your Cisco Career!
  • Full Access to our 651 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

538 Sign Ups in the last 30 days

satisfaction-guaranteed
100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Ask a question or start a discussion by visiting our Community Forum