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
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:4d5eA second one you meet in labs
Lab routers often have MACs like aabb.cc00.0100.
aa = 1010 1010 flip 1010 1000 = a8
Interface ID a8bb:ccff:fe00:0100
Link-local fe80::a8bb:ccff:fe00:100Flipping 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
interface GigabitEthernet0/0/0
ipv6 address 2001:db8:acad:10::/64 eui-64IOS 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.
They will ask next
What does EUI-64 do on a serial interface with no MAC?
Cisco borrows the MAC of one of the router's Ethernet interfaces to build the interface ID. In practice you set the link-local address by hand on those links.
Is EUI-64 still required anywhere?
No. RFC 8064 recommends stable opaque interface IDs as the default for SLAAC. EUI-64 remains common on network gear because it is predictable.
Traps
- Flipping the wrong bit. It is the bit worth 2 in the first byte.
- Putting
fffeat the end instead of in the middle.