Thursday 4 December 2014

IPv6 interface identifiers

IPv6 interface identifiers

The last 64 bits of an IPv6 address are the interface identifier that is unique to the 64-bit prefix of the IPv6 address. The ways in which an interface identifier is determined are as follows:
  • RFC 2373 states that all unicast addresses that use the prefixes 001 through 111 must also use a 64-bit interface identifier that is derived from the Extended Unique Identifier (EUI)-64 address. 

  • RFC 3041 describes a randomly-generated interface identifier that changes over time to provide a level of anonymity. 

  • An interface identifier that is assigned during stateful address autoconfiguration (for example, through DHCPv6). DHCPv6 standards are currently being defined. The IPv6 protocol for the Windows Server 2003 family and Windows XP does not support stateful address configuration or DHCPv6. 

  • An interface identifier that is manually configured. 

EUI-64 address-based interface identifiers

The 64-bit EUI-64 address is defined by the Institute of Electrical and Electronic Engineers (IEEE). EUI-64 addresses are either assigned to a network adapter or derived from IEEE 802 addresses.

IEEE 802 addresses

The structure of the 48-bit IEEE 802 address
Add caption
Traditional interface identifiers for network adapters use a 48-bit address called an IEEE 802 address. This address consists of a 24-bit company ID (also called the manufacturer ID), and a 24-bit extension ID (also called the board ID). The combination of the company ID, which is uniquely assigned to each manufacturer of network adapters, and the board ID, which is uniquely assigned to each network adapter at the time of assembly, produces a globally unique 48-bit address. This 48-bit address is also called the physical, hardware, or media access control (MAC) address.
Defined bits within the IEEE 802 address are the following:
  • Universal/Local (U/L) 

    The U/L bit is the seventh bit of the first byte and is used to determine whether the address is universally or locally administered. If the U/L bit is set to 0, the IEEE, through the designation of a unique company ID, has administered the address. If the U/L bit is set to 1, the address is locally administered. The network administrator has overridden the manufactured address and specified a different address.

  • Individual/Group (I/G) 

    The I/G bit is the low order bit of the first byte and is used to determine whether the address is an individual address (unicast) or a group address (multicast). When set to 0, the address is a unicast address. When set to 1, the address is a multicast address.

For a typical 802.x network adapter address, both the U/L and I/G bits are set to 0, corresponding to a universally administered, unicast MAC address.

IEEE EUI-64 addresses

The IEEE EUI-64 address represents a new standard for network interface addressing. The company ID is still 24-bits in length, but the extension ID is 40 bits, creating a much larger address space for a network adapter manufacturer. The EUI-64 address uses the U/L and I/G bits in the same way as the IEEE 802 address.
Structure of the EUI-64 address
Add caption

Mapping IEEE 802 addresses to EUI-64 addresses

To create an EUI-64 address from an IEEE 802 address, the 16 bits of 11111111 11111110 (0xFFFE) are inserted into the IEEE 802 address between the company ID and the extension ID. The following illustration shows the conversion of an IEEE 802 address to an EUI-64 address.
Conversion of IEEE 802 address to EUI-64 address
Add caption

Mapping EUI-64 addresses to IPv6 interface identifiers

To obtain the 64-bit interface identifier for IPv6 unicast addresses, the U/L bit in the EUI-64 address is complemented (if it is a 1, it is set to 0; and if it is a 0, it is set to 1). The following illustration shows the conversion for a universally administered, unicast EUI-64 address.
EUI-64 address converted to IPv6 identifier
Add caption
To obtain an IPv6 interface identifier from an IEEE 802 address, you must first map the IEEE 802 address to an EUI-64 address, and then complement the U/L bit. The following illustration shows the conversion process for a universally administered, unicast IEEE 802 address.
IEEE 802 address converted to IPv6 identifier
Add caption

IEEE 802 address conversion example

Host A has the Ethernet MAC address of 00-AA-00-3F-2A-1C. First, it is converted to EUI-64 format by inserting FF-FE between the third and fourth bytes, yielding 00-AA-00-FF-FE-3F-2A-1C. Next, the U/L bit, which is the seventh bit in the first byte, is complemented. The first byte in binary form is 00000000. When the seventh bit is complemented, it becomes 00000010 (0x02). The final result is 02-AA-00-FF-FE-3F-2A-1C which, when converted to colon-hexadecimal notation, becomes the interface identifier 2AA:FF:FE3F:2A1C. As the result, the link-local address that corresponds to the network adapter with the MAC address of 00-AA-00-3F-2A-1C is FE80::2AA:FF:FE3F:2A1C.
Note
  • When complementing the U/L bit, add 0x2 to the first byte if the EUI-64 address is universally administered, and subtract 0x2 from the first byte if the EUI-64 address is locally administered. 

Temporary address interface identifiers


In today's IPv4-based Internet, a typical Internet user connects to an Internet service provider (ISP) and obtains an IPv4 address by using the Point-to-Point Protocol (PPP) and the Internet Protocol Control Protocol (IPCP). Each time the user connects, a different IPv4 address might be obtained. Because of this, it is difficult to track a user's traffic on the Internet on the basis of IP address.
For IPv6-based dial-up connections, the user is assigned a 64-bit prefix after the connection is made through router discovery and stateless address autoconfiguration. If the interface identifier is always based on the EUI-64 address (as derived from the static IEEE 802 address), it is possible to identify the traffic of a specific node regardless of the prefix, making it easy to track a specific user and their use of the Internet. To address this concern and provide a level of anonymity, an alternative IPv6 interface identifier that is randomly generated and changes over time is described in RFC 3041.
The initial interface identifier is generated by using random numbers. For IPv6 systems that cannot store any historical information for generating future interface identifier values, a new random interface identifier is generated each time the IPv6 protocol is initialized. For IPv6 systems that have storage capabilities, a history value is stored and, when the IPv6 protocol is initialized, a new interface identifier is created through the following process:
  1. Retrieve the history value from storage and append the interface identifier based on the EUI-64 address of the adapter. 

  2. Compute the Message Digest-5 (MD5) one-way encryption hash over the quantity in step 1. 

  3. Save the last 64 bits of the MD5 hash computed in step 2 as the history value for the next interface identifier computation. 

  4. Take the first 64 bits of the MD5 hash computed in Step 2 and set the seventh bit to zero. The seventh bit corresponds to the U/L bit which, when set to 0, indicates a locally administered interface identifier. The result is the interface identifier. 

The resulting IPv6 address, based on this random interface identifier, is known as a temporary address. Temporary addresses are generated for public address prefixes that use stateless address autoconfiguration. Temporary addresses are used for the lower of the following values of the valid and preferred lifetimes:
  • The lifetimes included in the Prefix Information option in the received Router Advertisement message. 

  • Local default values of 1 week for valid lifetime and 1 day for preferred lifetime. 

After the valid lifetime of a temporary address expires, a new interface identifier and temporary address are generated.