Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EUI-64 calculation #4233

Closed
OlegHahm opened this issue Nov 7, 2015 · 11 comments
Closed

EUI-64 calculation #4233

OlegHahm opened this issue Nov 7, 2015 · 11 comments
Assignees
Labels
Area: network Area: Networking Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/PR State: don't stale State: Tell state-bot to ignore this issue Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Comments

@OlegHahm
Copy link
Member

OlegHahm commented Nov 7, 2015

I just discovered that RFC4193 describes an algorithm to generate a Pseudo-Random Global ID from either a MAC address or "a suitably unique identifier, local to the node, should be used (e.g., system serial number)". Maybe we can use this algorithm for creating an EUI-64 from the CPUID?

@OlegHahm OlegHahm added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: network Area: Networking Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/PR labels Nov 7, 2015
@miri64
Copy link
Member

miri64 commented Nov 7, 2015

Looks alright on first side 👍

@OlegHahm OlegHahm modified the milestone: Release 2016.03 Dec 7, 2015
@OlegHahm
Copy link
Member Author

SHA1 is on its way: #4701.

@miri64
Copy link
Member

miri64 commented Jan 27, 2016

Just to be clear, the algorithm described on the RFC still requires the time of date and also describes the creation of a (somewhat) globally unique IPv6 address, right?

@OlegHahm
Copy link
Member Author

Yes, it requires time and date (most of the devices have an RTC and even if not gettimeofday() can also be called with xtimer and it doesn't matter if the timestamp is "real"). And it describes how an EUI-64 and an IPv5 address can be obtained.

@stale
Copy link

stale bot commented Aug 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

@stale stale bot added the State: stale State: The issue / PR has no activity for >185 days label Aug 10, 2019
@miri64 miri64 added the State: don't stale State: Tell state-bot to ignore this issue label Aug 10, 2019
@stale stale bot removed the State: stale State: The issue / PR has no activity for >185 days label Aug 10, 2019
@miri64
Copy link
Member

miri64 commented Jun 30, 2020

@benpicco @maribu this could be interesting for your rework of luid.

@miri64 miri64 assigned miri64, benpicco and maribu and unassigned miri64 Jun 30, 2020
@maribu
Copy link
Member

maribu commented Jun 30, 2020

@benpicco @maribu this could be interesting for your rework of luid.

I'd say the current luid implementation is superior in terms of usability, as

  • No NTP timestamp is needed for generation in luid
  • The same board with the same transceiver setup will always end up with the same local EUI in luid

@miri64
Copy link
Member

miri64 commented Jun 30, 2020

It is however still problematic when the CPU ID is very similar (see e.g. last week's discussion to the users list)

@benpicco
Copy link
Contributor

Is there a small hash algorithm that produces 64 bit output? Hashing the CPU ID would provide better results than just xor in a loop.

@MrKevinWeiss MrKevinWeiss added this to the Release 2021.07 milestone Jun 22, 2021
@MrKevinWeiss MrKevinWeiss removed this from the Release 2021.07 milestone Jul 15, 2021
@maribu
Copy link
Member

maribu commented Sep 16, 2022

IMO this can be closed.

@benpicco: ping :)

@benpicco
Copy link
Contributor

benpicco commented Sep 16, 2022

The algorithm described in RFC 4193 won't work for us as it depends on the time - and we want stable L2 addresses.

But our current algorithm appears to be working quite well, so let's close this. (also, see #15239)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/PR State: don't stale State: Tell state-bot to ignore this issue Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

No branches or pull requests

5 participants