CCNA online course

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.

PartBitsPurpose
Network prefixFirst 64 bitsIdentifies the IPv6 subnet
Interface identifier (IID)Final 64 bitsIdentifies 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.

NotationExample
Colon-separated00:1A:2B:3C:4D:5E
Hyphen-separated00-1A-2B-3C-4D-5E
Dotted Cisco-style001A.2B3C.4D5E
Unseparated hexadecimal bytes001A2B3C4D5E

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

  1. Start with the 48-bit MAC address.
  2. Split it after the first three bytes, creating two 24-bit halves.
  3. Insert hexadecimal FFFE between the halves. The result is now 64 bits.
  4. Invert the U/L bit in the first octet.
  5. Regroup the eight bytes into four IPv6 hextets.
  6. Append the 64-bit identifier to the specified IPv6 /64 prefix.
  7. 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.

StageValueExplanation
Original 48-bit MAC address00:1A:2B:3C:4D:5ESix hexadecimal octets
First 24-bit half001A2BFirst three MAC bytes
Second 24-bit half3C4D5EFinal three MAC bytes
Value after FFFE insertion001A2BFFFE3C4D5EFFFE is inserted between the halves
First-octet U/L-bit inversion021A2BFFFE3C4D5E00 becomes 02
Final 64-bit interface identifier021A:2BFF:FE3C:4D5EFour 16-bit hextets
Complete IPv6 /64 address2001:db8:100:1:021a:2bff:fe3c:4d5e/64Prefix 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 OctetBinary RepresentationModified EUI-64 First OctetReason
000000000002Bit value 2 changes from 0 to 1
020000001000Bit value 2 changes from 1 to 0
08000010000A08 + 02 = 0A
0C000011000E0C + 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:

  1. Split the MAC into 0C1234 and 56789A.
  2. Insert FFFE: 0C1234FFFE56789A.
  3. Flip the U/L bit: 0C becomes 0E.
  4. Regroup: 0E12:34FF:FE56:789A.
  5. 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::/64 in documentation examples or a provider-assigned global prefix in production.
  • Unique local: a prefix from fc00::/7, commonly within the fd00::/8 range.
  • Link-local: fe80::/64 for 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

MethodMAC DerivedTypical UsePrivacy CharacteristicsConfiguration Source
Manual static addressingNoServers, infrastructure, and documented endpointsDepends on the chosen IID; can be stable and predictableAdministrator configuration
EUI-64YesAutomatically forming an IID from an interface MACStable and hardware-related; can expose a device identityInterface command or host address-generation logic
SLAACNot necessarilyHosts use router-advertised prefixes to configure addressesDepends on the host's IID algorithmICMPv6 router advertisement plus host behavior
DHCPv6Not necessarilyCentralized address or configuration assignmentDepends on the assigned address and client behaviorDHCPv6 server and client
Privacy or temporary addressingUsually noOutbound client connections and reduced trackingRandomized or temporary; limits stable hardware correlationOperating-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 FFFE was 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 FFFE between the original third and fourth MAC bytes.
  • On Cisco IOS, inspect the hardware address with show interface and compare it with the generated address shown by show ipv6 interface.

The EUI-64 Address Is Missing

  • Use show ipv6 interface brief to check interface state and address presence.
  • Use show running-config interface to confirm the address command is on the correct interface.
  • Check physical and data-link status.
  • Use no shutdown when 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-routing on 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

  1. A normal MAC address has six hexadecimal octets, or 48 bits.
  2. Split the MAC after three bytes.
  3. Insert FFFE between the two 24-bit halves.
  4. Flip the U/L bit, which is the second least significant bit of the first octet.
  5. Regroup the result into four hextets.
  6. Append the IID to a /64 IPv6 prefix.
  7. Compress zeros only after the complete address is correct.
  8. 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.