IPv6 EUI-64 Interface Identifier Calculation
Learn how to calculate an IPv6 EUI-64 interface identifier from a 48-bit MAC address and configure it on Cisco IOS.
EUI-64 is a method for creating a 64-bit IPv6 interface identifier (IID) from a 48-bit MAC address. The calculation inserts FFFE into the MAC address and flips one bit in the first octet. This lesson covers the calculation, complete IPv6 address construction, Cisco IOS configuration, verification, and operational considerations.
IPv6 Address Structure
IPv6 is a 128-bit Internet Protocol addressing system. IPv6 addresses are normally written as eight groups of four hexadecimal digits called hextets. Each hextet represents 16 bits.
2001:0db8:0100:0001:021a:2bff:fe3c:4d5e
|---------------- 128 bits ----------------|
A typical IPv6 subnet uses a /64 prefix length. The first 64 bits identify the network, and the final 64 bits identify an interface on that network.
| Part | Bits | Purpose |
|---|---|---|
| Network prefix | First 64 bits | Identifies the IPv6 subnet |
| Interface identifier (IID) | Final 64 bits | Identifies an interface on that subnet |
For example:
2001:db8:100:1:021a:2bff:fe3c:4d5e/64
|------ network prefix ------|-- IID --|
The /64 boundary is important to Stateless Address Autoconfiguration (SLAAC). A router advertisement can provide a host with the network prefix, while the host forms an interface identifier using a supported method. EUI-64 is one possible method; it is not required for every IPv6 host.
What EUI-64 Does
Extended Unique Identifier 64-bit (EUI-64) is a procedure that expands a 48-bit Ethernet MAC address into a 64-bit IPv6 interface identifier. The IPv6 form is often called modified EUI-64 because it both inserts FFFE and inverts the MAC address's Universal/Local bit.
EUI-64 can be used when a router or host needs to generate an interface identifier automatically. It is associated with SLAAC concepts, and Cisco IOS also provides an eui-64 option for an interface IPv6 address command. However, a router interface configured with eui-64 and a host address learned through router advertisements are not the same configuration event:
- A router interface command explicitly tells Cisco IOS to derive an address from the interface hardware address.
- A host can receive a prefix in an ICMPv6 router advertisement and independently create an address using EUI-64, a stable-random identifier, a privacy identifier, or another method.
MAC Address Prerequisites
A standard Ethernet MAC address is 48 bits, or six 8-bit hexadecimal octets. The first three octets, 24 bits, identify the organizationally unique identifier (OUI). The last three octets, also 24 bits, identify the device or interface portion assigned by the organization.
| Notation | Example |
|---|---|
| Colon-separated | 00:1A:2B:3C:4D:5E |
| Hyphen-separated | 00-1A-2B-3C-4D-5E |
| Dotted Cisco-style | 001A.2B3C.4D5E |
| Unseparated hexadecimal bytes | 001A2B3C4D5E |
These are different display formats for the same six bytes. EUI-64 calculation depends on the byte order, not on the punctuation.
Modified EUI-64 Calculation Procedure
- Start with the 48-bit MAC address.
- Split it after the first three bytes, creating two 24-bit halves.
- Insert hexadecimal
FFFEbetween the halves. The result is now 64 bits. - Invert the U/L bit in the first octet.
- Regroup the eight bytes into four IPv6 hextets.
- Append the 64-bit identifier to the specified IPv6
/64prefix. - Apply IPv6 zero compression only after the complete address has been constructed.
Worked Example: 00:1A:2B:3C:4D:5E
Suppose the MAC address is 00:1A:2B:3C:4D:5E and the network prefix is 2001:db8:100:1::/64.
| Stage | Value | Explanation |
|---|---|---|
| Original 48-bit MAC address | 00:1A:2B:3C:4D:5E | Six hexadecimal octets |
| First 24-bit half | 001A2B | First three MAC bytes |
| Second 24-bit half | 3C4D5E | Final three MAC bytes |
| Value after FFFE insertion | 001A2BFFFE3C4D5E | FFFE is inserted between the halves |
| First-octet U/L-bit inversion | 021A2BFFFE3C4D5E | 00 becomes 02 |
| Final 64-bit interface identifier | 021A:2BFF:FE3C:4D5E | Four 16-bit hextets |
| Complete IPv6 /64 address | 2001:db8:100:1:021a:2bff:fe3c:4d5e/64 | Prefix plus interface identifier |
The leading zero in the fifth hextet may be removed, producing the equivalent address:
2001:db8:100:1:21a:2bff:fe3c:4d5e/64
Do not compress or remove zeros while still performing the calculation. First produce the full eight-hextet address, then apply normal IPv6 notation rules.
The Universal/Local Bit
The U/L bit is the second least significant bit of the first MAC octet. In an 8-bit octet, the bit positions are:
Bit position: 7 6 5 4 3 2 1 0
Value: 128 64 32 16 8 4 2 1
^
U/L bit
EUI-64 flips only this bit. It does not arbitrarily change the entire first byte. Because the U/L bit has a value of 2, common conversions include:
| Original First Octet | Binary Representation | Modified EUI-64 First Octet | Reason |
|---|---|---|---|
00 | 00000000 | 02 | Bit value 2 changes from 0 to 1 |
02 | 00000010 | 00 | Bit value 2 changes from 1 to 0 |
08 | 00001000 | 0A | 08 + 02 = 0A |
0C | 00001100 | 0E | 0C + 02 = 0E |
For the first example, 00 is binary 00000000. Flipping the second least significant bit gives 00000010, which is 02. The rest of the first octet remains unchanged.
Example Using a MAC Beginning with 0C
Given MAC address 0C:12:34:56:78:9A and prefix 2001:db8:20:5::/64:
- Split the MAC into
0C1234and56789A. - Insert
FFFE:0C1234FFFE56789A. - Flip the U/L bit:
0Cbecomes0E. - Regroup:
0E12:34FF:FE56:789A. - Attach the prefix.
2001:db8:20:5:e12:34ff:fe56:789a/64
Constructing Addresses with Different Prefix Types
The prefix length describes how many leading bits belong to the network. It is not a hexadecimal group and should not be confused with the number of hextets displayed. A /64 prefix usually occupies four hextets, while the interface identifier occupies the remaining four.
The same EUI-64 identifier can be combined with different kinds of /64 prefixes:
- Global unicast:
2001:db8:100:1::/64in documentation examples or a provider-assigned global prefix in production. - Unique local: a prefix from
fc00::/7, commonly within thefd00::/8range. - Link-local:
fe80::/64for communication on the local link.
For MAC address 02:AA:BB:CC:DD:EE, the U/L bit changes 02 to 00. The identifier becomes 00AA:BBFF:FECC:DDEE, so the link-local address is:
fe80::aa:bbff:fecc:ddee/64
IPv6 compression can create multiple valid text forms for the same address. For example, leading zeros may be removed from a hextet, and one consecutive run of zero hextets may be replaced by ::. The binary address remains the same.
Recognizing and Reversing EUI-64
An identifier containing FFFE in the middle of its lower 64 bits may be EUI-64-derived, although the presence of FFFE alone is not absolute proof. To reverse the example:
IPv6 IID: 021A:2BFF:FE3C:4D5E
Remove FFFE: 001A2B3C4D5E
Reverse the U/L bit: 02 becomes 00
MAC: 00:1A:2B:3C:4D:5E
Do not assume that every IPv6 address without FFFE is invalid. Modern systems often use randomized or privacy-oriented identifiers.
Cisco IOS EUI-64 Configuration
On a Cisco router, enable IPv6 forwarding when the device must route between IPv6 networks. Then assign a prefix with the eui-64 keyword under the interface.
configure terminal
ipv6 unicast-routing
interface GigabitEthernet0/0
ipv6 address 2001:db8:100:1::/64 eui-64
no shutdown
end
The command supplies only the upper 64-bit prefix. Cisco IOS generates the lower 64-bit interface identifier from the interface hardware address according to the platform's IPv6 behavior.
Verification Commands
show ipv6 interface GigabitEthernet0/0
show ipv6 interface brief
show running-config interface GigabitEthernet0/0
ping ipv6 2001:db8:100:1:21a:2bff:fe3c:4d5e
traceroute ipv6 2001:db8:100:1:21a:2bff:fe3c:4d5e
Use show ipv6 interface to inspect the configured prefix, global unicast address, link-local address, and interface state. show ipv6 interface brief provides a compact status view, while the running configuration confirms that the eui-64 command is applied to the intended interface.
EUI-64 Compared with Other IPv6 Addressing Methods
| Method | MAC Derived | Typical Use | Privacy Characteristics | Configuration Source |
|---|---|---|---|---|
| Manual static addressing | No | Servers, infrastructure, and documented endpoints | Depends on the chosen IID; can be stable and predictable | Administrator configuration |
| EUI-64 | Yes | Automatically forming an IID from an interface MAC | Stable and hardware-related; can expose a device identity | Interface command or host address-generation logic |
| SLAAC | Not necessarily | Hosts use router-advertised prefixes to configure addresses | Depends on the host's IID algorithm | ICMPv6 router advertisement plus host behavior |
| DHCPv6 | Not necessarily | Centralized address or configuration assignment | Depends on the assigned address and client behavior | DHCPv6 server and client |
| Privacy or temporary addressing | Usually no | Outbound client connections and reduced tracking | Randomized or temporary; limits stable hardware correlation | Operating-system privacy settings |
SLAAC is a configuration process, not a single IID algorithm. A router advertisement supplies information such as a prefix and prefix length. The host then chooses how to create its interface identifier. Older or explicitly configured systems may use modified EUI-64, while modern operating systems commonly prefer stable-random or temporary privacy addresses.
Operational and Security Considerations
- MAC-derived identifiers are stable, so the same interface may retain a recognizable identifier across networks.
- An EUI-64 IID can expose information related to the underlying hardware address and make address tracking easier.
- Privacy extensions and stable-random identifiers reduce direct MAC-based correlation, but they can produce multiple addresses and complicate troubleshooting.
- Use predictable static addresses where operational stability is important, and consider privacy-oriented addresses for appropriate client traffic.
- EUI-64 remains important for CCNA exams and troubleshooting even when production hosts commonly avoid MAC-derived identifiers.
Troubleshooting EUI-64 Calculations and Configuration
The Calculated IID Does Not Match
- Check that
FFFEwas inserted after the third MAC byte, not after a hexadecimal digit or hextet. - Confirm that the correct interface MAC address was used.
- Write the first octet in binary and flip only the second least significant bit.
- Confirm that the final IID contains
FFFEbetween the original third and fourth MAC bytes. - On Cisco IOS, inspect the hardware address with
show interfaceand compare it with the generated address shown byshow ipv6 interface.
The EUI-64 Address Is Missing
- Use
show ipv6 interface briefto check interface state and address presence. - Use
show running-config interfaceto confirm the address command is on the correct interface. - Check physical and data-link status.
- Use
no shutdownwhen the interface is administratively disabled. - Consider whether the platform or interface has a usable hardware address for the expected calculation.
The Host Address Does Not Contain FFFE
The host may be using a privacy, temporary, stable-random, DHCPv6, or manually assigned identifier. Determine whether the address came from static configuration, SLAAC, or DHCPv6 before assuming that it should be reversible to a MAC address.
The Address Exists but Communication Fails
- Verify that both endpoints have the correct prefixes and prefix lengths.
- Confirm
ipv6 unicast-routingon devices that must route IPv6 traffic. - Check routes with
show ipv6 route. - Test the local link and default gateway with an IPv6 ping.
- Check VLAN membership, Neighbor Discovery, access lists, Layer 2 status, and the destination address.
Exam-Relevant Summary
- A normal MAC address has six hexadecimal octets, or 48 bits.
- Split the MAC after three bytes.
- Insert
FFFEbetween the two 24-bit halves. - Flip the U/L bit, which is the second least significant bit of the first octet.
- Regroup the result into four hextets.
- Append the IID to a
/64IPv6 prefix. - Compress zeros only after the complete address is correct.
- Remember that EUI-64 is one IID-generation method, not a requirement for all SLAAC hosts.
Related Networking Concepts
For foundational context, review the computer network basics and the OSI reference model. Cisco interface verification skills also apply when working with other routing and switching configurations.