Cisco DHCPv6 Server Configuration

Hello again Patrick

After having a chat with Rene, I have a bit more info to share with you on this topic. The DHCPv6 server knows that the particular host requires a /64 prefix since that is already configured locally in the DHCP configuration. So the DHCPv6 server will generate the last 64 bits of the address for the client. These last 64 bits are generated randomly. Once that is done, it will send this address to the host along with additional information such as DNS server. However, within the DHCPv6 messages, we don’t find the information of the prefix of /64. The DHCPv6 server will just inform the host of the 128 bit address without any prefix information. That’s why we see a /128 in all of the show output on the router.

The prefix is defined not by DHCPv6, but by the router advertisements (RAs) from NDP.

So the client learns its /128 IPv6 address from the DHCP server and learns about its prefix of /64 from the RA. In order to find the prefix that has been assigned to a particular address learned via DHCPv6, we need to take a look at the information about the IPv6 router (default gateway) that NDP has arranged for us. To do this we can use the show ipv6 routers command. Below, I’ve done this in the lab topology I had set up:

R1#show ipv6 routers
Router FE80::5054:FF:FE0D:7AC7 on GigabitEthernet0/1, last update 0 min
  Hops 64, Lifetime 1800 sec, AddrFlag=1, OtherFlag=0, MTU=1500
  HomeAgentFlag=0, Preference=Medium
  Reachable time 0 (unspecified), Retransmit time 0 (unspecified)
  Prefix 2001:1111:1111:1111::/64 onlink
    Valid lifetime 14400, preferred lifetime 14400
R1#

Here you can see clearly what the prefix is.

I find it strange that the interface and the routing table don’t indicate the /64 prefix for this particular address. When I configure the IPv6 address statically, I see the prefix in both the show ipv6 interface command as well as in the routing table.

In any case, it’s good to know how this information is displayed within an IOS router so we can find it when we need it.

I hope this has been helpful!

Laz