IPv6 – Understanding EUI-64 and IPv6 Differences

ipip addressipv6protocol-theoryrouting

I understand that Extended Unique Identifier (EUI-64) allows a host to automatically assign itself a 64-bit interface identifier IID for an IPv6 address.

My question is: What is the purpose of using EUI-64, and what is the relationship between EUI-64bit and IPv6-128bit?

Best Answer

One of the methods for assigning IPv6 addresses is called Stateless Address Autoconfiguration (SLAAC), which uses a modified EUI-64 for the Interface ID portion of the IPv6 address. Using the modified EUI-64 is a way the help ensure any self-generated address on a link is unique. Other methods for that have been used, too, since SLAAC was described in the RFC.

An IPv6 address consists of the Global Routing Prefix assigned by the ISP or RIR, the Subnet ID assigned by the network administration, and the Interface ID. RFC 4291, IP Version 6 Addressing Architecture, Section 2.5.4, Global Unicast Addresses, describes this:

   The general format for IPv6 Global Unicast addresses is as follows:

   |         n bits         |   m bits  |       128-n-m bits         |
   +------------------------+-----------+----------------------------+
   | global routing prefix  | subnet ID |       interface ID         |
   +------------------------+-----------+----------------------------+

SLAAC uses the 48-bit (EUI-48) MAC address of an interface to generate the 64-bit modified EUI-64 for the Interface ID of an IPv6 address. Appendix A of RFC 4291 describes how to create an Interface ID using the MAC address. Basically, you split the MAC address into two 24-bit parts, insert 16 bits (FFFE) in between the two parts, and invert the Universal/Local bit.

Using SLAAC, IPv6 hosts can create thier own IPv6 addresses. Some people are concerned that a host address can uniquely identify a host using SLAAC, regardless of the network. This led to Privacy Extensions, and some OSes like Windows and some Linux distributions to generate and use random Interface IDs by default.