Modified EUI-64 derives a 64-bit IPv6 interface identifier from a 48-bit MAC address. It inserts two bytes and flips the universal/local bit in the first byte. The interface identifier supplies the lower 64 bits of an IPv6 address when combined with a /64 network prefix. This calculation does not change the MAC address of the network interface.

Stateless Address Autoconfiguration (SLAAC) lets a host form IPv6 addresses from suitable prefixes advertised by a router. Modified EUI-64 is one way to form the interface identifier, but SLAAC does not require a MAC-derived identifier. RFC 8064 recommends stable identifiers that do not embed the MAC address. The worked example below explains modified EUI-64 for networks and exercises that explicitly use it.

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. Start with the six bytes of the MAC address: 00:11:22:33:44:55.
  2. Flip the universal/local bit by XORing the first byte with 0x02. Here, 0x00 XOR 0x02 = 0x02, giving 02:11:22:33:44:55. The bit has the value 0x02; the operation is a flip, so a first byte of 02 would become 00.
  3. Insert FF:FE between the third and fourth bytes: 02:11:22:FF:FE:33:44:55. This produces eight bytes.
  4. Group adjacent bytes into four 16-bit hexadecimal fields: 0211:22FF:FE33:4455. Keep colons between those fields. This is the interface identifier.
  5. Combine the identifier with 2001:0DB8:4::/64. The full address is 2001:0DB8:0004:0000:0211:22FF:FE33:4455, or 2001:db8:4:0:211:22ff:fe33:4455 with leading zeros omitted. The four prefix fields and four identifier fields together form the 128-bit IPv6 address.

Technical reference: RFC 4291, Appendix A describes the modified EUI-64 conversion. Its universal/local bit meaning is inverted relative to the original MAC-address bit.

Leave a Reply

Quote of the week

“If you change the way you look at things, the things you look at change.”

~ Dr. Wayne Dyer