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.

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 l



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.
  • Full Access to our 662 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

514 Sign Ups in the last 30 days

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

Forum Replies

  1. Hi Itai,

    It’s probably best to stick to use “A” instead of “10” as it can be confusing. It’s easy to read it as 10 while in reality it’s one, zero.

    About the subnets…the ISP will give you a /48 global prefix that you can use for your network. You should use /64 subnets since it’s convenient for autoconfiguration which leaves you with 16 bits you can use to create different subnets.

    A typical exam question could be something like:

    “The ISP has given you global prefix 2001:41f0:4060::/48. You have five VLANs that require connectivity. What subnets will you use? A

    ... Continue reading in our forum

  2. Hi I had a question. we are always told no more than 500 IP addresses in a subnet yet here we have 18,446,744,073,709,551,616.00 IP addresses. whats the idea on how this should be handled?

    great IPv6 lesson I’m actually enjoying IPv6 for first time in my studies. in past years I actually cringed learning it now im having fun!

  3. Hello Brian

    Yes, I understand your concern. After spending years (and some of us decades) learning and understanding IPv4 with both its strengths and its limitations, it is very often hard to avoid viewing IPv6 in a similar manner.

    Now if you have a prefix length of 48, 64 or even 96 bits which are all very common in IPv6, then of course you will have a subnet capable of supporting an ridiculously enormous number of hosts. Although IPv6 can actually handle a greater number of hosts per subnet than IPv4 (because there are no broadcasts and because it handles a

    ... Continue reading in our forum

  4. Hello Laz,
    Thanks for the reply.

29 more replies! Ask a question or join the discussion by visiting our Community Forum