Link-local addresses only have a scope of the link they are used on, they will not be used or even reachable from another link.
The link-local address of an interface is a mix between the BIA (Burned In Address) and some static IPv6 stuff. The “dynamic” part is also know as modified EUI-64 addressing.
First of all, every link-local address in IPv6 is generated from FE80::/10, so if you ever see a address starting with FE80 you know thats a link-local address 🙂
Over a sh int you see your BIA:
R1#sh int fa 0/0 FastEthernet0/0 is up, line protocol is up Hardware is AmdFE, address is cc00.0bfc.0000 (bia cc00.0bfc.0000)
The BIA in this case is cc00.0bfc.0000. The rules for the modified EUI-64 addressing are:
- FFFE will be put in between the vendor-id (3 most significant bytes) and the extension-id (3 least significant bytes), which will lead to cc00.0bFF.FEfc.0000
- Thereafter the seventh bit, known as universal/local bit, gets inverted. So first change the cc00 from hex to binary, which leads to 110011 0 000000000 and then invert the seventh bit (here a 0): 110011 1 000000000. Moved back to hex this will give CE00
- At last, change all points ‘.’ to colons ‘:’ and delete all leading zeros, then you got your link-local IPv6 address: FE80::CE00:BFF:FEFC:0
R1#sh ipv6 int fa 0/0 FastEthernet0/0 is up, line protocol is up IPv6 is enabled, link-local address is FE80::CE00:BFF:FEFC:0 No global unicast address is configured Joined group address(es): FF02::1 FF02::2 FF02::1:FFFC:0 MTU is 1500 bytes ICMP error messages limited to one every 100 milliseconds ICMP redirects are enabled ND DAD is enabled, number of DAD attempts: 1 ND reachable time is 30000 milliseconds
Its also possible to create a global unique IPv6 address with the modified EUI-64 addressing, you just have to add the keyword eui-64 after the ipv6 address command:
ipv6 address 2001::/64 eui-64
If you do not want to use the eui-64 addressing scheme for your link-local addresses, you could also change it it:
ipv6 address FE80::1 link-local
But remember link-local has always to start with FE80.