Identify your interface
When an IPv6 host assigns its own interface identifier (IID) it will, in most cases, use a modified version of the IEEE EUI-64 format. The 64-bit Extended Unique Identifier defined by the Institute of Electrical and Electronics Engineers is based on an interface’s 48-bit hardware (MAC, standing for Media Access Control) address.
The first three octets (24-bits) of the MAC – its Organisation Unique Identifier (OUI, which usually identifies the device’s manufacturer) – are taken first, then the fixed 16-bit value FFFE and finally the final 24 bits of the MAC.
The second bit of the first octet is then flipped. This is normally zero in an OUI-issued MAC to reflect its global relevance. In IPv6, zero is used to reflect a local scope so this bit is flipped to reflect that.
The resulting 64-bit value, known as a Modified EUI-64, is used as the device’s IID. This method is more completely explained in Appendix A of RFC4291, some light reading.