How to Calculate IPv6 EUI-64 Addresses

An IPv6 EUI-64 address is an IPv6 address format incorporating the device’s 48-bit extended unique identifier (EUI) and additional bits to create a 64-bit interface identifier. In the context of IPv6, the EUI-64 address automatically generates a unique identifier for each network interface based on the device’s MAC (Media Access Control) address. The EUI-64 address format replaces the traditional 48-bit MAC address with a 64-bit interface identifier, resulting in an expanded IPv6 address space. This format simplifies the assignment of unique addresses to network devices and facilitates efficient autoconfiguration without the need for manual configuration.

IPv6 Stateless Address Autoconfiguration (SLAAC) is a mechanism used in IPv6 networks to automatically assign IP addresses to devices without the need for manual configuration or the presence of a dedicated DHCP (Dynamic Host Configuration Protocol) server. With SLAAC, devices generate their IPv6 addresses using the information provided by the network router. When a device joins an IPv6 network, it sends a Router Solicitation message to discover available routers. Upon receiving a Router Advertisement message from a router, the device extracts the prefix and other necessary information, such as the prefix length and the default gateway, to form its unique IPv6 address. SLAAC simplifies the deployment and management of IPv6 networks by enabling devices to configure their addresses independently, resulting in efficient network setup and dynamic address allocation.

Here is how to calculate an IPv6 EUI-64 Address:

For this example, we will use the following information:
IPv6 Allocation: 2001:0DB8:4::/64
MAC Address: 00:11:22:33:44:55

  1. Obtain the MAC (Media Access Control) address of the device’s network interface card (NIC). The MAC address is a 48-bit identifier assigned to the NIC and is typically represented as six groups of two hexadecimal digits separated by colons (e.g., 00:11:22:33:44:55).
  2. Modify the MAC address by flipping the first octet’s seventh bit (the Universal/Local bit). This indicates whether the address is globally unique or locally administered. If the bit is 0, it signifies a globally unique MAC address, while a 1 indicates a locally administered MAC address.
    • MAC should now read – 02:11:22:33:44:55
  3. Insert the hexadecimal value “FF:FE:” between the third and fourth octets of the MAC address. This step expands the address from 48 bits to 64 bits.
    • MAC should now read – 02:11:22:FF:FE:33:44:55
  4. Finally, convert the modified MAC address to the EUI-64 format by replacing the colons with hyphens. The resulting 64-bit value becomes the interface identifier portion of the IPv6 address.
    • MAC should now read – 0211:22FF:FE33:4455
  5. For example, let’s say we have a MAC address of “00:11:22:33:44:55”. Following the steps above, we flip the seventh bit of the first octet, resulting in “02:11:22:33:44:55:FF:FE”. Then, we convert the colons to hyphens, resulting in “0211:22FF:FE33:4455”. This becomes the interface identifier, which, when combined with the network prefix, forms the complete IPv6 EUI-64 address.

Leave a Reply