# IPv6 EUI-64 explained

**URL:** https://forum.networklessons.com/t/ipv6-eui-64-explained/1176
**Category:** Lessons Discussion
**Created:** [December 27, 2016, 11:30pm UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176 "2016-12-27T23:30:35Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [December 27, 2016, 11:30pm UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/1 "2016-12-27T23:30:35Z")

</div>

This topic is to discuss the following lesson:

> **[IPv6 EUI-64 explained](https://networklessons.com/ipv6/ipv6-eui-64-explained)**
>
> This lesson explains how IPv6 EUI-64 automatically generates an interface ID for your IPv6 address.

---

<div class="post-metadata">

### Author: ![dmsanch1](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/d/ba9def/32.png) [@dmsanch1](https://forum.networklessons.com/u/dmsanch1)
#### Post date: [December 7, 2015, 4:53pm UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/2 "2015-12-07T16:53:50Z")

</div>

Hi Rene,

Do Windows, Linux and Mac hosts calculate it some way ?

&nbsp;

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [December 7, 2015, 7:13pm UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/3 "2015-12-07T19:13:17Z")

</div>

Hi Diego,

EUI-64 is described in the RFC, most hosts will use this for automatically assigning an address. Linux and MAC both use this.

Windows however seems to use something else. It seems Vista, 7/8/10 and Server 2008 create random interface IDs instead of EUI-64. I believe you can change this though.

Rene

---

<div class="post-metadata">

### Author: ![jtsantos](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/j/7c8e57/32.png) [@jtsantos](https://forum.networklessons.com/u/jtsantos)
#### Post date: [January 6, 2016, 5:47am UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/4 "2016-01-06T05:47:14Z")

</div>

Hi Rene,

According to the RFC 3513 we need to invert the _ **Universal/Local** _ bit (“U/L” bit) in the 7th position of the first octet. The “u” bit is set to 1 to indicate Universal, and it is set to zero (0) to indicate local scope.

1 – **Universally** Unique in Ethernet MAC  
0 – **Locally** Unique addresses in Ethernet MAC

If this bit is already set to 1 in Mac address and we need to build a **global** address, should we invert the 7th bit to 0 ?

Thanks !

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [January 6, 2016, 5:16pm UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/5 "2016-01-06T17:16:39Z")

</div>

Hi Jose,

Let’s look at an example:

```auto
R1#show interfaces GigabitEthernet 1 | include bia
  Hardware is CSR vNIC, address is fa16.3e60.0217 (bia fa16.3e60.0217)

```

The 7th bit is in the first two hexadecimal characters:

`fa = 1111 1010`

As you can see, the 7th bit is set to 1 here. Now let’s check the IPv6 address:

```auto
R1#show ipv6 interface GigabitEthernet 1 | include link-local
  IPv6 is enabled, link-local address is FE80::F816:3EFF:FE60:217

```

Let’s write down the complete uncompressed address:

`FE80:0000:0000:0000:F816:3EFF:FE60:0217`

Let’s look only at the EUI-64 part:

`F816:3EFF:FE60:0217`

We only care about the first two hexadecimal characters:

`F8 = 1111 1000`

As you can see, the 7th bit has been inverted from 1 to 0.

Let’s see what happens when we change the 7th bit in the MAC address, right now it starts with fa:

`fa = 1111 1010`

Let’s make it:

`f8 = 1111 1000`

```auto
R1(config)#interface gigabitEthernet 1
R1(config-if)#mac-address f816.3e60.0217

```

Our IPv6 address has become:

```auto
R1#show ipv6 interface GigabitEthernet 1 | include link-local
  IPv6 is enabled, link-local address is FE80::FA16:3EFF:FE60:217

```

The complete uncompressed address is:

`FE80:0000:0000:0000:0000:FA16:3EFF:FE60:0217`

Here’s the EUI-64 part:

`FA16:3EFF:FE60:0217`

First two hexadecimal characters:

`FA = 1111 1000`

As you can see, it got inverted. No matter if the 7th bit of the MAC address is a 0 or 1, it always gets inverted.

Hope this helps!

Rene

---

<div class="post-metadata">

### Author: ![ibmufa](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/i/3e96dc/32.png) [@ibmufa](https://forum.networklessons.com/u/ibmufa)
#### Post date: [February 11, 2016, 3:18pm UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/6 "2016-02-11T15:18:17Z")

</div>

Rene, I see you keep referring to FA as FFFF 1000. Is that correct or a typo? This was referenced twice that way. This is example on IPv6 EUI-64 explained.

Example from Notes:

Let’s look only at the EUI-64 part:

`F816:3EFF:FE60:0217`

We only care about the first two hexadecimal characters:

`F8 = FFFF 1000`

As you can see, the 7th bit has been inverted from 1 to 0.

2nd Example:

Here’s the EUI-64 part:

`FA16:3EFF:FE60:0217`

First two hexadecimal characters:

`FA = FFFF 1000`

As you can see, it got inverted. No matter if the 7th bit of the MAC address is a 0 or 1, it always gets inverted.

---

<div class="post-metadata">

### Author: ![ibmufa](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/i/3e96dc/32.png) [@ibmufa](https://forum.networklessons.com/u/ibmufa)
#### Post date: [February 11, 2016, 3:23pm UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/7 "2016-02-11T15:23:56Z")

</div>

Rene, So when manually configuring an IPv6 say for link local, it’s not just stuffing the MAC address with FFFE in the middle - you have to pay attention to inverting the 7th bit in the 1st 2 hexadecimal numbers correct? I have seen some videos where there is no mention of inverting bit 7. Thanks

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [February 13, 2016, 2:29pm UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/8 "2016-02-13T14:29:55Z")

</div>

Hi Itai,

Oops…the FFFF is a typo indeed, that should be 1111. Just fixed it.

When you use EUI-64 to automatically use the MAC address as input for the “host” part then the 7th bit will be inverted, this is all done automatically though.

If you make up some IPv6 addresses of your own then you can pick whatever addresses you like…

Rene

---

<div class="post-metadata">

### Author: ![dianamesap](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/d/a8b319/32.png) [@dianamesap](https://forum.networklessons.com/u/dianamesap)
#### Post date: [February 24, 2016, 6:55am UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/9 "2016-02-24T06:55:04Z")

</div>

Hi Rene, Do you have an example of an interface with EUI-64 and without EUI-64? I understand that EUI-64 modify the Link Local and Global Unicast.

What happen if I want to configure an Unique Local?

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [February 25, 2016, 12:34pm UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/10 "2016-02-25T12:34:00Z")

</div>

Hi Diana,

Here’s an example:

```auto
R1#show ipv6 interface GigabitEthernet 0/1
GigabitEthernet0/1 is up, line protocol is up
  IPv6 is enabled, link-local address is FE80::F816:3EFF:FEE6:7777

```

That’s the IPv6 link-local address that uses EUI-64. You can configure it manually if you want:

```auto
R1(config)#int gi0/1                                                      
R1(config-if)#ipv6 address FE80:1111:1111:1111:ABCD:ABCD:ABCD:ABCD link-local

```

```auto
R1#show ipv6 interface GigabitEthernet 0/1 | include FE80
  IPv6 is enabled, link-local address is FE80:1111:1111:1111:ABCD:ABCD:ABCD:ABCD

```

Here’s a global unicast address with EUI-64:

`R1(config-if)#ipv6 address 2001:1111:1111:1111::/64 eui-64`

```auto
R1#show ipv6 interface GigabitEthernet 0/1 | include 2001:
    2001:1111:1111:1111:F816:3EFF:FEE6:7777, subnet is 2001:1111:1111:1111::/64

```

If you don’t want to use EUI-64 then you can configure global unicast addresses yourself:

`R1(config-if)#ipv6 address 2001:1111:1111:1111:ABCD:ABCD:ABCD:ABCD/64`

```auto
R1#show ipv6 interface GigabitEthernet 0/1 | include ABCD 
    2001:1111:1111:1111:ABCD:ABCD:ABCD:ABCD, subnet is 2001:1111:1111:1111::/64 
    FF02::1:FFCD:ABCD

```

That’s it. Hope this helps.

Rene

---

<div class="post-metadata">

### Author: ![jthomas.jones](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/j/ad7895/32.png) [@jthomas.jones](https://forum.networklessons.com/u/jthomas.jones)
#### Post date: [May 4, 2017, 10:21pm UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/11 "2017-05-04T22:21:36Z")

</div>

Rene - If I’m getting my head wrapped around this correct then the following grid maps all possible bit combinations at the 7th as discussed:

HEX DEC BINARY INVERSE HEX DEC  
0 0 0000 0010 2 2  
1 1 0001 0011 3 3  
2 2 0010 0000 0 0  
3 3 0011 0001 1 1  
4 4 0100 0110 6 6  
5 5 0101 0111 7 7  
6 6 0110 0100 4 4  
7 7 0111 0101 5 5  
8 8 1000 1010 A 10  
9 9 1001 1011 B 11  
A 10 1010 1000 8 8  
B 11 1011 1001 9 9  
C 12 1100 1110 E 14  
D 13 1101 1111 F 15  
E 14 1110 1100 C 12  
F 15 1111 1101 D 13

If that all holds true then the underlying form is +2/+2/-2/-2 transitioning on every fourth place (0,4,8,12):

HEX DEC FORM MARKS HEX DEC  
0 0 +2 0 2 2  
1 1 +2 3 3  
2 2 -2 0 0  
3 3 -2 1 1  
4 4 +2 4 6 6  
5 5 +2 7 7  
6 6 -2 4 4  
7 7 -2 5 5  
8 8 +2 8 A 10  
9 9 +2 B 11  
A 10 -2 8 8  
B 11 -2 9 9  
C 12 +2 12 E 14  
D 13 +2 F 15  
E 14 -2 C 12  
F 15 -2 D 13

So instead of breaking all the binary out, my CCNA brain dump sheet could look like this:

HEX FORM INVERSE  
0 +2 2  
1 +2 3  
2 -2 0  
3 -2 1  
4 6  
8 A(10)  
C(12) E(14)

Or even:

HEX FORM  
0 +2   
1 +2   
2 -2   
3 -2   
4  
8  
C(12)

I’m just looking for a way to shortcut this so I don’t have to burn time in the test fiddling bits. Does this look like a reliable shortcut in your opinion?

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [May 19, 2017, 7:54am UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/12 "2017-05-19T07:54:06Z")

</div>

Hi Joel,

First of all, I wouldn’t worry too much about this too much. The bit flipping is just one minor sub-topic of all IPv6 related stuff you can expect in the exam. It’s possible that you don’t get any questions about it so don’t stress about it too much. You can expect a lot of regular subnetting questions so that’s why I highly recommend a “cheat sheet” for that.

It seems this list would work. It might be a quick method if you’d get 10 bit flipping questions but if you only would get 1 question, it might be just as fast to quickly calculate it?

`hex > binary > flip 7th bit> hex`

So for example:

`hex: 12 =binary: 0001 0010`

flip 7th bit:

`binary: 0001 0000`

back to hex:

`10`

And we are done.

---

<div class="post-metadata">

### Author: ![nadav.baa](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/n/ac8455/32.png) [@nadav.baa](https://forum.networklessons.com/u/nadav.baa)
#### Post date: [March 19, 2018, 10:08am UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/13 "2018-03-19T10:08:28Z")

</div>

Hi Rene,  
In the case of multiple IPv6 addresses on a single interface, is it still possible to use the EUI-64 and how?

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [March 19, 2018, 3:41pm UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/14 "2018-03-19T15:41:07Z")

</div>

Hello Nadav,

That is no problem, the prefix is different so you will have a unique 128-bit IPv6 address. Here’s an example:

```
R1(config)#interface GigabitEthernet 0/1
R1(config-if)#ipv6 address 2001:DB8:1:1::/64 eui-64 
R1(config-if)#ipv6 address 2001:DB8:2:2::/64 eui-64 
R1(config-if)#ipv6 address 2001:DB8:3:3::/64 eui-64

```

Gets you:

```
R1#show ipv6 interface brief | include 2001
    2001:DB8:1:1:F816:3EFF:FE42:B409
    2001:DB8:2:2:F816:3EFF:FE42:B409
    2001:DB8:3:3:F816:3EFF:FE42:B409

```

Rene

---

<div class="post-metadata">

### Author: ![nadav.baa](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/n/ac8455/32.png) [@nadav.baa](https://forum.networklessons.com/u/nadav.baa)
#### Post date: [June 25, 2018, 11:06am UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/15 "2018-06-25T11:06:01Z")

</div>

Hi Rene,  
Just wanted to know how will the host compute it’s interface ID when the IPv6 router sending the RA’s has a subnet greater that /64 (say /80). How will the host compute it’s interface ID with EUI-64 enabled.  
I check on some vendor equipment and found that they don’t support subnet greater than /64.  
I just want to know how will the host behave in this case.

Br,

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [June 28, 2018, 10:14am UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/16 "2018-06-28T10:14:55Z")

</div>

Hello Nadav

This is an excellent question. According to [RFC 5375](https://tools.ietf.org/html/rfc5375) in section **B.2.4 EUI-64 ‘u’ and ‘g’ Bits** , it states the following:

> When using subnet prefix lengths other than /64, the interface  
> identifier cannot be in Modified EUI-64 format as required by  
> [RFC4291]. However, nodes not aware that a prefix length other than  
> /64 is used might still think it’s an EUI-64; therefore, it’s prudent  
> to take into account the following points when setting the bits.

The document continues to state several considerations that should be checked carefully. In general, depending primarily on the vendor, using a prefix other than /64 may be possible in conjunction with EUI-64 IPv6 address computation, however, because it may have unpredictable results, it’s a good idea not to implement it.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

### Author: ![vadim.zhukov](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/v/cab0a1/32.png) [@vadim.zhukov](https://forum.networklessons.com/u/vadim.zhukov)
#### Post date: [September 19, 2019, 8:07pm UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/17 "2019-09-19T20:07:47Z")

</div>

Im a little bit confused. The lesson first says that “The 7th bit represents the universal unique bit. A “built in” MAC address will always have this bit set to 0”. But then we proceed looking at examples that all have MAC with this bit at ‘1’. SO it can be either? Then why do we need to flip it at all? Seems depending on MAC we would be flipping it either to 0 or to 1. So what is it accomplishing? Seems at worst we stop having it been unique - original mac should be unique, if we change on bit it creates the (however remote) possibility that there is actually MAC deferring from out MAC by exactly one bit. In the end the question is what is this ‘universal unique bit’ anyway? Clearly no bit can be unique by definition (there are only 2 of them) nor could be their position of ‘7’. So whats in its name and what exactly is the need for it?

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [September 20, 2019, 8:43am UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/18 "2019-09-20T08:43:36Z")

</div>

Hello Vadim

MAC addresses can either be universally administered addresses (UAA) or locally administered addresses (LAA). A UAA is one that has been uniquely assigned to a device by its manufacturer using the appropriate OUI and a unique remainder of the address. This ensures uniqueness worldwide.

An LAA is one that is manually assigned by an administrator or a protocol. An example of such a MAC address is the virtual MAC used in HSRP.

So how do you know if a MAC is universally or locally administered? By looking at the 7th bit. This bit is actually called the Universal/Local bit or U/L bit. When it is set to “1” the address is an LAA. When it is set to “0” it is a UAA.

Now, when applied to IPv6 and the EUI-64 process, the meaning of the U/L bit is reversed. Specifically, 1 means universal and 0 means local. This is why, when determining the IPv6 address from the MAC address, this bit is flipped. The result is, if you see this bit as a 1 in the IPv6 address, you know that the original MAC address that it was derived from was a UAA. If you see this bit as 0 in the IPv6 address, you know that the original MAC address that it was derived from was an LAA.

All of this is just a convention, a methodology that is simply applied by definition.

> [@vadim.zhukov](#):
>
> But then we proceed looking at examples that all have MAC with this bit at ‘1’. SO it can be either?

Yes, it can be either. But what it is originally tells us if the MAC address was universally or locally administered.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

### Author: ![vadim.zhukov](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/v/cab0a1/32.png) [@vadim.zhukov](https://forum.networklessons.com/u/vadim.zhukov)
#### Post date: [September 20, 2019, 7:04pm UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/19 "2019-09-20T19:04:14Z")

</div>

Ok, thanks, now it comes in a new light. Or rather just ‘in light’ 🙂 . We simply have to flip the bit because IPV6 ‘thinks’ the 1 better than 0 identifies the address as unique. Thank you.

---

<div class="post-metadata">

### Author: ![gazwoz](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/gazwoz/32/596_2.png) [@gazwoz](https://forum.networklessons.com/u/gazwoz)
#### Post date: [November 13, 2019, 11:45am UTC](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176/20 "2019-11-13T11:45:35Z")

</div>

Hi Guys - I’ve read that EUI-64 “automatically assign itself a unique 64-bit IPv6 interface identifier without the need for manual configuration or DHCP.”

I appreciate that the unique address is automatically generated but surely manual configuration still has to take place for each interface on your device? Eg.

`Router(config-if)#ipv6 address 2001:1234:5678:abcd::/64 eui-64`

If I have 32 interfaces on my router I still have to enter this command 32 times no? DHCP would truly automatically assign 32 addresses in an instant?

Thanks,

Gareth.

[Next page](https://forum.networklessons.com/t/ipv6-eui-64-explained/1176.md?page=2)
