IPv6 Address Auto Configuration using Extended Unique Identifier EUI-64

IPv6 has this interesting feature of auto addressing configuration, you know. Using IEEE’s 64-bit Extended Unique Identifier (EUI-64) format, a host can automatically assign itself a unique 64-bit IPv6 interface identifier without the need for manual configuration or DHCP.

RFC2373 explains the process of generating EUI-64 based Interface ID in Appendix A. It is done in two steps.

Step 1: Include EUI Label (0xFFFE) just in the middle of the MAC

As defined by IEEE 802-2001 standard, a 48-bit MAC address (also known as EUI-48) is consist of two equal portions. First 24-bit is the Company ID otherwise known as Organisationally Unique Identifier (OUI) and second half (24-bit)  is the manufacturer extension ID or NIC that is assigned by the organization that purchased the OUI. In order to create an EUI-64, we need to add 16 more bits in the 48-bit MAC address. As described in RFC2373, the 16-bit hex value 0xFFFE is inserted between these two halves to form a 64-bit address.

You might be thinking why this particular EUI Label 0xFFFE needs to be added? In fact, organisations can put any 16-bit EUI Label along with any 24-bit Extension ID to generate EUI-64 address. However, according to the IEEE guidelines, it cannot be 0xFFFE or 0xFFFF in “real” EUI-64 address assignments, those two are reserved for EUI-48 to EUI-64 conversion. In other words, any EUI-64 address having 0xFFFE immediately following its OUI portion can be recognized as having been generated from an EUI-48 (or MAC) address.

Step 2: Invert the U/L bit 

The 2nd bit or next-to-least-significant-bit of the second nibble (hex digit) of the first octet of the OUI is called Universal/Local (U/L) bit or ‘X’ bit. The second step is to invert the U/L bit. Globally unique addresses assigned by the IEEE originally have this bit set to zero, indicating global uniqueness. Likewise, locally created addresses, such as those used for virtual interfaces or a MAC address manually configured by an administrator, will have this bit set to one. The U/L bit is inverted when using an EUI-64 address to create an IPv6 interface ID hence it is called Modified EUI-64.

The reason of inverting the U/L bit is mentioned in section 2.5.1 in RFC2373.

To make it easy for system administrators to hand configure local scope identifiers when hardware tokens are not available, for example, in case of serial links, tunnel end- points, etc. The alternative would have been for these to be of the form 0200:0:0:1, 0200:0:0:2, etc., instead of the much simpler ::1, ::2, etc.

The use of the universal/local bit in the IEEE EUI-64 identifier is to allow development of future technology that can take advantage of interface identifiers with global scope.

One thing to remember is that the Universal/Local bit does not makes the actual address global or local. Global addresses are defined by the network prefix and not by the last 64-bit interface ID. U/L bit resides in the interface ID, so the global addresses are still global and local addresses are still local.

Here is an example of Cisco router that uses modified EUI-64 to creates IPv6 address for its interface Gi1/0.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.