IPV6 link-local addresses

How is the ipv6 link-local address determined ?

First let’s find out the mac-address of our fastethernet interface :

R1 :


R1(config)#do sh int fa2/0
FastEthernet2/0 is up, line protocol is up
Hardware is AmdFE, address is cc00.0ed8.0020 (bia cc00.0ed8.0020)
    

Let’s give the interface an ipv6 address :

R1 :


R1(config)#int fa2/0
R1(config-if)#ipv6 enable
R1(config-if)#ipv6 address dead:beef::1/64
    

Let’s have a look at the link-local address :

R1 :


R1(config-if)#do sh ipv6 int fa2/0
FastEthernet2/0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::CE00:EFF:FED8:20
Global unicast address(es):
DEAD:BEEF::1, subnet is DEAD:BEEF::/64
    

How was this link-local address determined :

-Invert 7th most significant bit

each two characters is 1 byte, so we need to invert the 7th most significant bit in CC

that is

C is 12 in hexadecimal so cc would be :

8 4 2 1 8 4 2 1
1 1 0 0 1 1 0 0

Now let’s invert the 7th most significant bit :

8 4 2 1 8 4 2 1
1 1 0 0 1 1 1 0

Now that is CE

So now we take the ce00 put FE80 in front of it and we put FFFE in the middle and we get :

FE80::CE00:EFF:FED8:20 (the leading zero’s are discarded)

Now let’s ping some dead beef (lol) :

R1 :


R1#ping DEAD:BEEF::2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to DEAD:BEEF::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/21/76 ms
    

Leave a comment

Your comment