VMware ESXi and vSphere Cluster Management

IPv6 Modified EUI-64 Interface ID Calculation

Learn how to calculate a 64-bit IPv6 interface identifier from a 48-bit MAC address using modified EUI-64, including U/L-bit inversion, FFFE insertion, and full address examples.

Modified EUI-64 is a method for creating a 64-bit IPv6 interface identifier (IID) from a 48-bit MAC address. The calculation is commonly taught with IPv6 addressing and SLAAC, and it remains useful for understanding how some IPv6 addresses are formed.

This lesson covers the address structure, the complete calculation procedure, binary verification, full IPv6 address construction, Cisco configuration, and modern alternatives to MAC-derived identifiers.

IPv6 Address Structure

An IPv6 address is a 128-bit network-layer address normally written as eight groups of hexadecimal digits. A typical IPv6 unicast address uses a 64-bit network prefix and a 64-bit interface identifier.

A unicast address identifies one receiving interface. The network prefix identifies the IPv6 subnet, while the interface identifier, or IID, identifies an interface within that subnet.

A prefix length of /64 means that the first 64 bits are the prefix and the remaining 64 bits are available for the IID. In ordinary IPv6 notation, those final 64 bits are displayed as the last four hexadecimal groups.

ComponentBit lengthExampleRole
IPv6 address128 bits2001:DB8:1:10:02BB:CCFF:FEDD:1122Complete network-layer address
IPv6 /64 prefix64 bits2001:DB8:1:10::/64Identifies the subnet
Modified EUI-64 interface identifier64 bits02BB:CCFF:FEDD:1122Identifies an interface within the subnet
48-bit MAC address48 bits00:BB:CC:DD:11:22Source value used to derive an IID

Purpose of the Interface Identifier

The IID identifies an interface on a particular IPv6 subnet. It is associated with an interface, not necessarily with an entire device. A router with several interfaces can therefore use different IIDs for those interfaces.

IPv6 address formation combines a prefix with an IID. For example, a router can combine a global unicast prefix with an IID to form a globally routable address. It can also combine the same IID with the FE80::/64 link-local prefix to form a link-local address.

SLAAC, or Stateless Address Autoconfiguration, allows a host to form an IPv6 address using a router-advertised prefix and an interface identifier. The IID may be derived from a MAC address, randomly generated, stable but non-MAC-based, or manually configured depending on the operating system and configuration.

What Modified EUI-64 Means

A MAC address is a 48-bit hardware address commonly written as six hexadecimal octets, such as 00:BB:CC:DD:11:22. A modified EUI-64 identifier is a different value: it is a 64-bit identifier derived from that MAC address.

The calculation has two defining operations:

  • Insert the 16-bit value FFFE in the middle of the 48-bit MAC value.
  • Invert the universal/local (U/L) bit in the first octet.

The result is not the original MAC address with extra punctuation. It is a new 64-bit IID created according to modified EUI-64 rules.

Modified EUI-64 Calculation Procedure

  1. Write the MAC address as 12 hexadecimal digits and remove separators.
  2. Split the 12 digits into two six-digit, 24-bit halves.
  3. Invert the U/L bit in the first octet.
  4. Insert FFFE between the two halves.
  5. Group the resulting 16 hexadecimal digits into four groups of four.
StepOperationExample value
Original 48-bit MACStart with six octets00:BB:CC:DD:11:22
Split into two 24-bit halvesRemove separators and split after six digits00BBCC and DD1122
Invert U/L bit in first octetChange only the bit with value 0x0200 becomes 02
Insert FFFEPlace FFFE between the halves02BBCCFFE DD1122
Format as four IPv6 hexadecimal groupsGroup 16 digits into four groups02BB:CCFF:FEDD:1122

Worked Example: 00:BB:CC:DD:11:22

Start with the MAC address:

00:BB:CC:DD:11:22

Remove the separators:

00BBCCDD1122

Split the value into two six-digit halves:

00BBCC | DD1122

The first octet is 00. Inverting its U/L bit changes it to 02. Insert FFFE between the halves:

02BBCC | FFFE | DD1122

There are now 16 hexadecimal digits, or 64 bits. Group them into four IPv6 groups:

02BB:CCFF:FEDD:1122

The resulting modified EUI-64 IID is 02BB:CCFF:FEDD:1122.

Understanding the U/L Bit

The U/L bit is the second least significant bit of the first octet. It has the binary value 00000010, or hexadecimal value 0x02.

Some instructional material calls this the seventh bit because the bits are counted from the most significant bit of the first byte. The label can be confusing, so remember the unambiguous rule: toggle the bit represented by 0x02.

The operation is an inversion, not a command to always set the bit to 1:

  • If the original first octet has the 0x02 bit clear, add 0x02 while preserving all other bits.
  • If the original first octet has the 0x02 bit set, remove 0x02 while preserving all other bits.
  • Another equivalent method is an XOR operation with 02.
Original first octetBinary formModified first octetReason
000000000002The 0x02 bit changes from 0 to 1.
020000001000The 0x02 bit changes from 1 to 0.
08000010000AThe unchanged 0x08 bit remains set; 0x02 is added.
0A0000101008The 0x02 bit is removed; 0x08 remains set.

Binary Verification

Binary conversion is useful when the first-octet result is not obvious. For the first octet 00:

Original:  00000000
U/L mask:  00000010
Toggle:    00000010
Result:    00000010

The binary result 00000010 converts back to hexadecimal 02.

For a first octet of 02:

Original:  00000010
U/L mask:  00000010
Toggle:    00000000
Result:    00000000

This confirms that the operation can change 02 to 00; it is not always an addition.

Example Where the U/L Bit Is Set

Consider the MAC address 02:11:22:33:44:55. The first octet, 02, is binary 00000010, so the U/L bit is already set. Inverting that bit produces 00.

MAC without separators:  021122334455
Split:                   021122 | 334455
Invert first octet:      02 becomes 00
Insert FFFE:             001122 | FFFE | 334455
Final IID:               0011:22FF:FE33:4455

The correct IID is 0011:22FF:FE33:4455. This example demonstrates why simply adding 02 to the first octet is incorrect in every case.

Building a Complete IPv6 Address

Calculating an IID and displaying a complete IPv6 address are separate steps. First calculate the 64-bit IID, then place it after a compatible /64 prefix.

Global Unicast Example

Using the prefix 2001:DB8:1:10::/64 and the derived IID 02BB:CCFF:FEDD:1122 produces:

Prefix:       2001:DB8:1:10::/64
Interface ID: 02BB:CCFF:FEDD:1122
Full address: 2001:DB8:1:10:02BB:CCFF:FEDD:1122

The first four groups are the /64 prefix, and the final four groups are the IID.

Link-Local Example

A link-local address normally uses the FE80::/64 prefix. Combining it with the same IID gives:

Prefix:       FE80::/64
Interface ID: 02BB:CCFF:FEDD:1122
Full address: FE80:0000:0000:0000:02BB:CCFF:FEDD:1122

IPv6 zero-compression can shorten this to:

FE80::2BB:CCFF:FEDD:1122

The compressed form looks different, but its underlying IID is still 02BB:CCFF:FEDD:1122. Leading zeroes within a group may be omitted, so 02BB is displayed as 2BB.

Interfaces Without Their Own MAC Address

Not every interface type has a unique Ethernet-style MAC address. Point-to-point, tunnel, loopback, virtual, and other interfaces may use platform-specific methods to obtain an IID source.

Historically, Cisco routers have used a behavior in which an interface without its own MAC address can derive an EUI-64-based IID from the MAC address of the lowest-numbered interface that has one. This is platform- and software-dependent behavior, not a universal rule for every IPv6 implementation.

Cisco IOS and IOS XE Configuration

IPv6 forwarding can be enabled globally with:

ipv6 unicast-routing

To configure a global IPv6 address with an automatically generated EUI-64 IID:

interface GigabitEthernet0/0
 ipv6 address 2001:DB8:1:10::/64 eui-64
 no shutdown

The prefix is supplied manually. The eui-64 keyword instructs the device to generate the interface identifier from the applicable MAC-based value. The exact generated address can vary with the platform, interface type, and software.

Useful verification commands include:

show ipv6 interface brief
show ipv6 interface GigabitEthernet0/0
show running-config interface GigabitEthernet0/0

Use these commands to check whether the interface is configured, whether it is operational, which IPv6 addresses are present, and whether another address-generation method is in use.

Limits and Modern Considerations

An EUI-64-derived IID can reveal a value derived from the device's MAC address. Because the value may remain stable, it can make address-based tracking easier across networks or over time.

Modern systems may instead use:

  • Privacy extensions, which use changing or randomized IIDs to reduce tracking.
  • Stable random or stable non-MAC-based IIDs.
  • Manually configured interface identifiers.
  • DHCPv6 for address assignment or configuration, depending on the network design.

Modified EUI-64 remains important for learning IPv6 address formation, recognizing legacy configurations, and interpreting exam questions. It is not necessarily the preferred privacy approach for current deployments.

Troubleshooting Calculation Errors

FFFE Is in the Wrong Location

Remove all MAC separators, count 12 hexadecimal digits, and split after the first six digits. Insert FFFE between those two six-digit halves.

Correct:  00BBCC | FFFE | DD1122
Incorrect: 00BB | FFFE | CCDD1122

The First Group Is Incorrect

Only the U/L bit changes. Convert the first octet to binary or use XOR with 02. Do not replace the whole first byte or alter unrelated bits.

The First Octet Is Always Increased by 02

That shortcut works only when the U/L bit is initially clear. If the bit is set, it must be cleared. For example, 02 becomes 00, and 0A becomes 08.

The Result Has Only 12 Hexadecimal Digits

A modified EUI-64 IID must contain 16 hexadecimal digits. If the result still has 12, the FFFE insertion step was omitted.

The Cisco Address Does Not Match the Hand Calculation

Check whether the interface has its own MAC address, whether the platform selected another interface's MAC, whether a different address method is configured, and whether the interface is administratively down. Use the Cisco verification commands and consult documentation for the exact platform and software release.

The Displayed IPv6 Address Looks Different

Expand the address to eight groups before comparing it with your calculation. IPv6 zero-compression can omit consecutive all-zero groups, and leading zeroes in individual groups can also be omitted.

Exam-Relevant Summary

  • A typical IPv6 address is 128 bits.
  • A /64 prefix leaves 64 bits for the IID.
  • A 48-bit MAC address contains 12 hexadecimal digits.
  • Split the MAC after six hexadecimal digits.
  • Invert the first octet's U/L bit, which has value 0x02.
  • Insert FFFE between the two 24-bit halves.
  • Format the 16 resulting hexadecimal digits as four groups of four.
  • The U/L operation is a toggle: 00 becomes 02, while 02 becomes 00.
  • Combine the IID with a /64 prefix to form a complete IPv6 address.

For additional study, see IPv6 EUI-64 calculation.