Octet

How does EUI-64 build an interface ID from a MAC address? Work an example.

Show the answer

Say this first

Split the 48-bit MAC in half, insert fffe in the middle to get 64 bits, then flip the seventh bit of the first byte, the universal/local bit. MAC 00:1a:2b:3c:4d:5e becomes 001a:2bff:fe3c:4d5e, and flipping the bit turns 00 into 02, so the interface ID is 021a:2bff:fe3c:4d5e. With prefix 2001:db8:acad:10::/64 the address is 2001:db8:acad:10:21a:2bff:fe3c:4d5e.

Go deeper

Step by step

Output
MAC                  00:1a:2b | 3c:4d:5e
Insert fffe          00:1a:2b:ff:fe:3c:4d:5e
First byte 00        0000 0000
Flip the 7th bit     0000 0010  = 02
Interface ID         021a:2bff:fe3c:4d5e
Address              2001:db8:acad:10:21a:2bff:fe3c:4d5e

A second one you meet in labs

Lab routers often have MACs like aabb.cc00.0100.

Output
aa = 1010 1010   flip   1010 1000 = a8
Interface ID   a8bb:ccff:fe00:0100
Link-local     fe80::a8bb:ccff:fe00:100

Flipping fast

Only the second hex digit changes: 0 and 2 swap, 1 and 3, 4 and 6, 5 and 7, 8 and a, 9 and b, c and e, d and f. So 02:50:56:aa:bb:cc gives 0050:56ff:feaa:bbcc: the bit goes from 1 to 0.

Why flip at all

In a MAC, the bit set to 0 means "universally administered". IPv6 inverts it so that 1 means universal. That way hand-made interface IDs such as ::1 carry a 0 and are correctly marked local.

On Cisco

Cisco IOS
interface GigabitEthernet0/0/0
 ipv6 address 2001:db8:acad:10::/64 eui-64

IOS also builds link-local addresses with EUI-64 unless you set one by hand.

Why hosts moved away from it

An EUI-64 address carries the MAC, so a laptop can be tracked across every network it joins. Windows uses random interface IDs, and many Linux and Apple systems use stable but opaque IDs (RFC 7217) plus temporary addresses. Routers and servers often still use EUI-64 or static IDs.

Traps

  • Flipping the wrong bit. It is the bit worth 2 in the first byte.
  • Putting fffe at the end instead of in the middle.
How did you do?Book 4.2 IP Version 6