cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2082
Views
9
Helpful
13
Replies

Loopback interface eui-64

john11022
Level 1
Level 1

Hello, does anyone know how the router derive the interface id for loopback interfaces if I were to use eui-64 format? Since loopback interfaces don't have a mac address. Thanks in advance!

1 Accepted Solution

Accepted Solutions

Harold Ritter
Spotlight
Spotlight

Hi @john11022 ,

This is implementation specific and might change from one OS to another.

I ran a quick test with vIOS and it simply uses the MAC address from the first physical interface.

R1#sh ipv6 int lo0
Loopback0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::5054:FF:FE00:24
No Virtual link-local address(es):
Global unicast address(es):
2001:DB8:12FF:3:5054:FF:FE00:24, subnet is 2001:DB8:12FF:3::/64 [EUI]
Joined group address(es):
FF02::1
FF02::1:FF00:24
MTU is 1514 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ICMP unreachables are sent
ND DAD is not supported
ND reachable time is 30000 milliseconds (using 30000)
ND NS retransmit interval is 1000 milliseconds
R1#sh int gi0/0 | i bia
Hardware is iGbE, address is 5254.0000.0024 (bia 5254.0000.0024)
R1#

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

View solution in original post

13 Replies 13

M02@rt37
VIP
VIP

Hello @john11022,

Router uses the 64-bit IPv6 address assigned to the loopback interface to generate the interface ID following the EUI-64 format. The 64-bit interface ID is then combined with the prefix of the loopback address to form the complete IPv6 address of the loopback interface.

Loopback: 2001:0db8:2::1/128

Take the 64-bit IPv6 address: 2001:0db8:2::1

Apply the EUI-64 format to generate the interface ID:

The 48-bit MAC address equivalent would be: 2001:0db8:0002:0000:0000:0000:0000:0001

Combine with FFFE in the middle: 2001:0db8:0002:FFFE:0000:0000:0000:0001

The 64-bit interface ID: 0002:FFFE:0000:0000:0000:0001

Combine the interface ID with the loopback prefix to get the complete IPv6 address: 2001:0db8:2:2fffe::1/128

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Are you saying that I need to assign an ipv6 address to the loopback interface first then use eui-64 command to generate the eui-64 format of the ipv6 address? Doesn't that defeat the use of eui-64 of autoconfiguring ipv6 addresses? Can't I use ipv6 address 2001:0db8:2::/64 eui-64 command? 

indeed the LO dont have MAC addresses

Screenshot (1034).png

Good question.

 

Although the MAC address is a convenient way to add to the 64 bits needed for the EUI address (48 bits from the MAC and 16 bits from the FF:FE)  its not required. Doing a lab my Loopback 0 interface was able to acquire an IPv6 address. In fact I believe newer standards dictate its a different algorithm that chooses the rest of the bits because there was concern that if your IP was publicly available (which can be done with IPv6 since NAT doesn't need to be used as MAC addresses are unique and there is enough addresses) then your MAC address can be found out. 

 

I did note however that only 1 loopback can be created like this (at least when I tested it). It looks like the same "random" number is generated and cant be used again.

 

DavidRuess_0-1690816636336.png

*updated image for readability

Hope this helps

-David

Hi @David Ruess ,

I did note however that only 1 loopback can be created like this (at least when I tested it). It looks

> like the same "random" number is generated and cant be used again.

You would need to use a different /64 on the second loopback interface.

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

Hey @Harold Ritter going back to look at it for some reason I thought I was putting in a link-local and could configure the same on multiple interfaces. Thanks for the second eye.

 

@john11022 as Harold mentioned you can see the updated screenshot below:

 

DavidRuess_0-1690817707185.png

 

 

Thanks everyone for the help. I think I found the answer to my question here: https://networkengineering.stackexchange.com/questions/74281/eui-64-on-a-loopback-address However I still don't quite understand how it derives the interface id

Harold Ritter
Spotlight
Spotlight

Hi @john11022 ,

This is implementation specific and might change from one OS to another.

I ran a quick test with vIOS and it simply uses the MAC address from the first physical interface.

R1#sh ipv6 int lo0
Loopback0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::5054:FF:FE00:24
No Virtual link-local address(es):
Global unicast address(es):
2001:DB8:12FF:3:5054:FF:FE00:24, subnet is 2001:DB8:12FF:3::/64 [EUI]
Joined group address(es):
FF02::1
FF02::1:FF00:24
MTU is 1514 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ICMP unreachables are sent
ND DAD is not supported
ND reachable time is 30000 milliseconds (using 30000)
ND NS retransmit interval is 1000 milliseconds
R1#sh int gi0/0 | i bia
Hardware is iGbE, address is 5254.0000.0024 (bia 5254.0000.0024)
R1#

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

Ah I see, thank you so much for the help! 

Mac address for LO? 

The mac address use as source and if the packet source from LO it need mac address 

But 

Routing first thing it do is change mac of source to be mac address of egress interface' and hence LO never have mac address becuase to connect LO to any network it need to pass through one of router real interface.

Hi @MHM Cisco World ,

We are discussing MAC address used to derive the IPv6 EUI-64 address on the loopback interface, not for traffic originating from the same interface.

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

It same' the LO dont have it mac address' it select first one appear in show interface and UP.

That how I understand ipv6 for lo.

Hi @MHM Cisco World ,

it select first one appear in show interface and UP.

From what I have tested, it will select the MAC address of the first interface, whether it is up or not. The interface simply needs to exist.

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)