Cisco IPv6 – Enforcing X:X:X:X::X for Link-Local Addresses

ciscocisco-commandscisco-iosinterfaceipv6

This document shows that you can use one of these options:

interface type/number  
 ipv6 address ipv6-prefix/prefix-length eui-64  
 ipv6 address ipv6-prefix/prefix-length link-local    <------format 
 ipv6 address ipv6-prefix/prefix-length anycast 

On the other hand when you try the command line options you get these:

R1(config-subif)# ipv6 address ?  
  WORD                General prefix name  
  X:X:X:X::X          IPv6 link-local address  
  X:X:X:X::X/<0-128>  IPv6 prefix  
  autoconfig          Obtain address using autoconfiguration
  dhcp                Obtain a ipv6 address using dhcp

and the command ipv6 address FE80::1 link-local will work without following the format pointed above. What am I missing here?

Edit: here are some tests using the format indicated by documentation

R1(config-subif)#ipv6 address FE80::1/11 link-local  
                                         ^
% Invalid input detected at '^' marker.

R1(config-subif)#ipv6 address FE80::1/10 link-local 
                                         ^
% Invalid input detected at '^' marker.

R1(config-subif)#ipv6 address FE80::0/10 link-local 
                                         ^
% Invalid input detected at '^' marker.

Best Answer

The document to which you link claims a specific IOS version. It may be incorrect; that would not be unusual in Cisco documentation.

In reality, having tested this on several IOS 15.X versions, you do not specify a prefix length on a link-local address since it is implicit for the link local address, as you saw in your CLI help (ipv6 address ? shows X:X:X:X::X IPv6 link-local address, the address without a prefix length). You do specify the prefix length on a non-link-local IPv6 address since there is no implicit prefix length.

Personally, I think specifying specific link-local addresses on your interfaces is going to be a giant pain, with little to no gain. Just enabling IPv6 on an interface will assign a unique link-local address, and that is all you really need. There is really no security risk about having the Interface ID being derived from the MAC address, since the address will never be seen off-link, and it won't be tracked across the Internet as a Global Scope address could be.