An IPv6 address is 128 bits in length, and like an IPv4 address, it’s divided into prefix bits (representing the network segment) and host bits (uniquely identifying a host on that network segment). A common approach is to use 64 bits to represent the network segment and 64 bits to represent the host on that network segment.
While you could manually configure the host bits for a router interface, a more efficient approach might be to automatically calculate those host bits using a 64-bit Extended Unique Identifier, known as EUI-64. For example, let’s say you have a router interface on the IPv6 network of 2000:1::/64. You could (in interface configuration mode of your Cisco IOS router) enter the command:
ipv6 address 2000:1::/64 eui-64
This command tells the interface to use 2000:1:: as the network portion of the IPv6 address and to automatically calculate the 64-bit host portion of the IPv6 address.
EUI-64 uses an interface’s MAC address as the basis of it’s calculation, even though we need a 64-bit host address, and a MAC address is only 48 bits in length. The following steps walk you through a sample EUI-64 calculation:
SCENARIO: Router R1 has a MAC address of 0015.2BE4.9B60 on its Fa 0/0 interface. The objective is to calculate the corresponding EUI-64 address based on this MAC address.
Step #1: Split the MAC address in the middle:
Step #2: Insert FF:FE in the middle:
Step #3: Change the format to use a colon delimiter:
Step #4: Convert the first eight bits to binary:
00 -> 00000000
Step #5: Flip the 7th bit:
00000000 -> 00000010
Step #6: Convert these first eight bits back into hex:
00000010 -> 02, which yields an EUI-64 address of 0215:2BFF:FEE4:9B60
The video (above) walks you step-by-step through this process, and also shows you how the calculated EUI-64 address can be used to calculate a router interface’s Link Local address (an IPv6 address used for communication only on the local network segment).
Kevin Wallace, CCIEx2 (R/S and Collaboration) #7945, CCSI 20061
If you enjoyed this article, you might also want to subscribe to my podcast: