🌐 IPv6 Link-Local Address Generator – EUI-64 Conversion & Validation
Every IPv6-enabled network interface is automatically assigned a link-local address that belongs to the fe80::/10 prefix. These addresses are critical for neighbour discovery, router advertisements, and many other core IPv6 operations — even before a global unicast address is configured. This tool lets you generate, reverse-engineer, and validate IPv6 link-local addresses without manual bit-twiddling.
🔗 What is a Link-Local Address?
A link-local address is scoped to a single network segment. Routers will never forward a packet with a link-local source or destination, which makes them safe to use for on-link communication. Every device that speaks IPv6 generates one automatically using Stateless Address Autoconfiguration (SLAAC). The address structure is:
fe80::Always fe80::/10
0000:0000:0000Must be all zeros for SLAAC
xxxx:xxxx:xxxx:xxxxInterface Identifier (EUI-64 or random)
⚙️ The EUI-64 Process Explained
The most common method for deriving the Interface Identifier (IID) is the Modified EUI-64 process defined in RFC 4291. Starting from a standard 48-bit MAC address (EUI-48), the transformation proceeds in four steps:
| Step | Action | Example Result |
|---|---|---|
| 1 | Start with the 48-bit MAC | 00:1A:2B:3C:4D:5E |
| 2 | Split at the midpoint (after 3 octets) | 00:1A:2B | 3C:4D:5E |
| 3 | Insert FF:FE between the two halves | 00:1A:2B:FF:FE:3C:4D:5E |
| 4 | Flip the U/L bit (XOR first octet with 0x02) | 02:1A:2B:FF:FE:3C:4D:5E |
| 5 | Prepend the fe80::/10 prefix | fe80::021a:2bff:fe3c:4d5e |
🔄 The Universal/Local (U/L) Bit
The U/L bit is bit 6 (counting from the most significant bit, 0-indexed) of the first octet in the MAC address. In IEEE 802 notation, a value of 0 means the address is globally unique (assigned by the manufacturer), while 1 means it is locally administered. RFC 4291 requires this bit to be complemented when embedded in an IPv6 IID so that software can distinguish between the two types.
For example, 00 in binary is 0000 0000. XOR-ing with 0x02 (0000 0010) produces 0000 0010 = 02, flipping bit 6 from 0 to 1.
🔍 Reverse Lookup: Link-Local → MAC
If a link-local address was generated via EUI-64 (SLAAC), the original MAC address can be recovered by reversing the steps:
- Extract the last 64 bits of the IPv6 address (the IID, e.g.
021a:2bff:fe3c:4d5e) - Confirm that bytes 4–5 are
FF:FE— if not, the address uses a random IID (privacy extensions) and cannot be reversed - Remove the FF:FE bytes to restore the original 6 octets
- XOR the first octet with
0x02again to restore the original U/L bit
Important: Addresses generated with RFC 4941 privacy extensions use a random 64-bit IID, so no MAC address can be recovered from them.
✅ Link-Local Address Validation
A valid link-local address must satisfy three conditions:
- It must be a valid 128-bit IPv6 address conforming to RFC 4291
- The first 10 bits must equal
1111 1110 10, placing it in the rangefe80::tofebf:ffff:…:ffff - For SLAAC-generated addresses, groups 2–4 (bits 10–63) should be all zeros
📋 Zone IDs and Interface Scoping
Because link-local addresses are not globally unique, the same address can exist on multiple interfaces of the same host. A zone ID (also called a scope ID) identifies which interface to use. It is appended to the address with a % character:
fe80::021a:2bff:fe3c:4d5e%eth0 fe80::021a:2bff:fe3c:4d5e%ens3 fe80::1%lo
Zone IDs are required when using link-local addresses in ping commands, API calls, and some browser URLs. Common interface names on Linux are eth0, ens3, wlan0; on macOS, en0; on Windows, numeric identifiers like 12.
🛠️ Common Use Cases
- Network engineers — quickly generate the expected link-local address for a device during configuration or troubleshooting
- Students — understand the EUI-64 bit manipulation process step by step with visual feedback
- System administrators — verify or reverse-engineer link-local addresses seen in routing tables or Neighbour Discovery Protocol (NDP) output
- Security auditors — cross-reference link-local addresses in logs with known MAC addresses to identify devices
⚠️ Limitations and Privacy Considerations
Since EUI-64-derived link-local addresses embed the device MAC address, they can expose hardware identifiers to other devices on the local network. RFC 4941 (Privacy Extensions) addresses this by using randomly generated IIDs instead. Modern operating systems (Windows, macOS, iOS, Android) typically enable privacy extensions by default, meaning the link-local addresses they generate will not be EUI-64 derived and cannot be reversed to a MAC.