IPv6 General Prefix

Lesson Contents

The upper 64 bits of an IPv6 prefix usually consists of a /48 global routing prefix (or site prefix) and the remaining 16 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!

  • 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 800 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)
540 Sign Ups in the last 30 days
satisfaction-guaranteed

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

Tags:


Forum Replies

  1. Hi Rene and staff,
    just a typo in the first stanza: it is 16 bits instead 12 bits, is not it ?

    But my question is about the way to change general-prefix
    The lesson use the no form to suppress manually the old general-prefix
    So i wonder

    1. can R1 configure a validtime for a general-prefix, then it could be suppressed automatically ?
    2. can the ISP router give a validtime for the general prefix that R1 could interpret ?
      In the router advertisement message format i dont find any field for transmitting this information neither in option. Could a DHCPv6 option do this ?
    ... Continue reading in our forum

  2. Hello Dominique

    The specific general-prefix feature is one that functions statically. There are no parameters in which you can configure time sensitive validity of the prefix itself. However, if you do want to achieve this, there are a couple of ways that come to mind.

    You can use IPv6 DHCPv6 Prefix Delegation which allows for a DHCPv6 server to provide the general prefix to the customer routers, which in turn provide the specific IPv6 addresses based on those general prefixes. These prefixes can be changed and advertised using DHCPv6 rather than using the s

    ... Continue reading in our forum

  3. thanks a lot LAZ,
    i will do a lab to test the EEM solution (and if i succeed i will do a post)
    I accept also the solution with device programmability although i need to dive deeper in network programmability to config this type of solution

    But for DHCPv6 and prefix delegation, it is not quite clear; suppose the ISP has to change the binding of just one customer

    https://cdn-forum.networklessons.com/uploads/default/original/2X/7/77ed1f834fcb08fee0d3908970e4447e96068ef4.png

    It has to change C1’s binding with a given value for some reason; for example 1100 has to

    ... Continue reading in our forum

  4. Hello Dominique

    The idea behind my mentioning Prefix Delegation was the fact that using DHCPv6, the ISP could indeed change the prefix that is provided to each individual customer whenever they would like. They can do it manually, but they can also set a valid-lifetime and a preferred-lifetime. The command would be issued like so:

    prefix-delegation pool poolname [lifetime valid-lifetime preferred-lifetime]

    Notice this context sensitive help:

    ISP(config-dhcpv6)#prefix-delegation pool GLOBAL_POOL lifetime ?
      <60-4294967295>  Valid lifetime (seconds)
      at      
    ... Continue reading in our forum

Ask a question or join the discussion by visiting our Community Forum