DHCPv6 - determining the IPv6 prefix assigned to an interface

When configuring an interface on a Cisco IOS router to obtain an IPv6 address via DHCPv6, that interface will also be automatically configured with a particular prefix. However, determining what that prefix is from the Cisco IOS command line interface can be somewhat challenging.

When an interface is set to get its IPv6 address from a DHCPv6 server, the resulting information shows a /128 prefix. For example, view the following output:

R1#show ipv6 interface gi 0/1 GigabitEthernet0/1 is up, line protocol is up IPv6 is enabled, link-local address is FE80::5054:FF:FE0A:8FA6 No Virtual link-local address(es): Global unicast address(es): 2001:1111:1111:1111:AD88:B915:BE2A:969, subnet is 2001:1111:1111:1111:AD88:B915:BE2A:969/128 Joined group address(es): FF02::1 FF02::1:FF0A:8FA6 FF02::1:FF2A:969 MTU is 1500 bytes !>-- output omitted--<

This indicates a /128 prefix. Also, looking at the resulting IPv6 Routing Table we see a directly connected subnet with a prefix of /128.

DHCPv6 does not configure the prefix for an DHCPv6 client. This is determined by the router advertisement (RA) sent by the NDP protocol. To determine what prefix is given, the following command can be used:

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 we can see the prefix delivered by the local router.

Links:

https://forum.networklessons.com/t/cisco-dhcpv6-server-configuration/1116/82?u=lagapides

https://forum.networklessons.com/t/cisco-dhcpv6-server-configuration/1116/83?u=lagapides

https://networklessons.com/ipv6/cisco-dhcpv6-server-configuration