MAC address formats and the EUI-64 relationship
Normalize common 48-bit text forms and understand the defined EUI-64 transformation.
Several strings can represent the same 48 bits
Examples include 00:11:22:AA:BB:CC, 00-11-22-AA-BB-CC, and 0011.22AA.BBCC. Parse exactly six octets after removing supported separators; reject mixed, extra, or non-hexadecimal characters.
The legacy Modified EUI-64 IID recipe
For the legacy IPv6 interface-identifier recipe documented in RFC 4291, insert FF:FE between the first and last three octets of a 48-bit link-layer address, then invert the universal/local bit. This is a Modified EUI-64 IID construction; it is not a claim that the output is the interface’s current IPv6 address.
Input 48-bit address: 00:11:22:AA:BB:CC Insert FF:FE for legacy IID: 00:11:22:FF:FE:AA:BB:CC Invert U/L bit (Modified IID): 02:11:22:FF:FE:AA:BB:CC IPv6 IID grouping: 0211:22ff:feaa:bbcc
Modern stable IIDs should not embed a stable MAC by default
RFC 8064 updates the default recommendation: use RFC 7217 for stable SLAAC interface identifiers and do not embed a stable link-layer address by default. An EUI-64-shaped value alone cannot prove how an IID was generated.
Use a parser that rejects ambiguity
Test each accepted notation, lowercase hex, zero padding, invalid lengths, and multicast/local examples. Preserve the original input for display while using normalized bytes for comparison.