This article can also be found here.

Stateless Autoconfiguration (EUI-64)

IPv6 has changed the way we use private addressing.

In IPv4 you have to use one of the private IP addresses and apply it to the NIC before you can comunicate on your local network.

There is a little thing called APIPA (Automatic Private IP Addressing) in the Windows world that is used, curiously, when DHCP fails to do its job: it assigns and address in the network to the client that failed to contact the DHPC server.

But with the coming of IPv6 you can magically be sure that as soon as your NIC is up you’ll have a link-local address.

But what exactly is a link-local address?

Link-local address is an IPv6 address which is automatically created and assigned as soon as the NIC is connected and stays in the segment localized by that link.

It’s what I talk about in the title of this post.

You don’t have to do anything.

But how is possible?

Every NIC comes out of production with a tag you could say. This tag is the MAC address and is unique to the NIC (though it can be temporarily changed via OS, but that’s for another story).

It’s made of two separate part and is 48 bits in length.


The first part MM:MM:MM is the manufacturer, the second SS:SS:SS is the ID.

But why I told you this?

Because it’s used to do the magic behind  EUI-64.

We take the two parts of MAC and insert the hexadecimal number 0xFFFE


And then we do a little math and we flip the 7th bit so it’s a 1

After that we use the local network fe80::1.

Combine fe80::1 and the previous modified MAC and we get the IPv6 magic address!

Here is an example

MAC address:  0012.7feb.6b40

EUI-64  FE80::212:7FFF:FEEB:6B40

It was fun, no?

Till next time.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s