MAC to IPv6: how EUI-64 turns a MAC address into an IPv6 address
The four steps from MAC to IPv6, how to get the MAC back out, and why most devices now hide it.
Split the 48-bit MAC in half, insert ff:fe in the middle, and flip the universal/local bit (value 2 in the first byte). That 64-bit interface ID goes after fe80:: for the link-local address, or after the network’s /64 prefix for the global (SLAAC) address. So 00:1a:2b:3c:4d:5e becomes fe80::21a:2bff:fe3c:4d5e. Reverse it to get the MAC back, but only when the address has ff:fe in the middle.
The short version: a postal address
An IPv6 address has two halves, like a postal address. The first half is the street: the network, handed out by your router and shared by every device on it. The second half is the house number: the device, which makes that number up itself.
A MAC address is the serial number burned into a network card at the factory. EUI-64 is a fixed, public recipe for turning that serial number into a house number. Because anyone can run the recipe, anyone can also run it backwards and read the MAC out of the address.
Why IPv6 uses the MAC at all
IPv6 devices can configure themselves with no DHCP server (SLAAC). The router advertises a /64 prefix, and the device fills in the other 64 bits with an interface ID. The original way to make that ID unique was to derive it from the network card’s MAC address, which the manufacturer already made unique.
Every interface also gets a link-local address in fe80::/64, used for neighbour discovery and routing protocols on the local link. Routers, switches, printers and many IoT devices still build it from the MAC.
Getting the MAC back from an IPv6 address
- Take the last 64 bits of the address (the interface ID).
- Check bytes 4 and 5 are ff:fe. If not, the address wasn’t built from a MAC.
- Remove ff:fe and flip the universal/local bit back. fe80::21a:2bff:fe3c:4d5e gives 00:1a:2b:3c:4d:5e.
- Look up the first half of the MAC (the OUI) to see who made the device.
Multicast: the other MAC conversion
On Ethernet, an IPv6 multicast packet goes to the MAC 33:33 followed by the last 32 bits of the address (RFC 2464). Neighbour discovery uses solicited-node addresses, ff02::1:ff plus the last 24 bits of the target, so a switch can deliver “who has this address?” only to the right devices.
Why most phones and laptops hide their MAC
An address that contains the MAC follows the device from network to network, which makes it easy to track. Windows, macOS, iOS, Android and most Linux distributions now use random temporary addresses (RFC 8981) and stable but opaque interface IDs (RFC 7217) instead. Their addresses have no ff:fe and reveal nothing about the hardware.
Questions people ask
Sources and further reading
Written by the middle.network team, who build and run these tools. Last checked 2026-11-21.