[Feature Request] MacAddress shold be able to map to EUI-64 bytes for legacy support #45
Labels
enhancement
New feature or request
requires discussion
a discussion is required before any perminent action is taken
Description
A legacy use of a MAC Address is to convert it to a EUI-64.
This will allow us to also support the legacy modification of a EUI-64 as the least-significant 64 bits of a unicast network address or link-local address when stateless address autoconfiguration is used.
Eg. MAC Address to IPv6
Proposed solutions
There are several sources that say several things about this mapping; it is unclear which is "most" correct, or what the variants imply.
It seems odd that each of the 3 below mentioned very specifically outlining differing rules for what would seem to be the same operation. While IEEE is the definitive source, I'd like to determine the reasoning of the other implementations before moving forward. The differing schemes may be perfectly valid in the appropriate place.
All this for a known legacy operation 🤷
Networking Engineering StackExchange
(current implementation)
Answer to "What are EUI-48 and EUI-64?"
states that the insertion bytes should be [0xFF, 0xFE] and 7th bit should be inverted.
Wikipedia entry for "Mac Address"
Mac Address. Citation Note 6
states that the insertion bytes should be [0xFF, 0xFE] if the source is a EUI-48
and that the insertion bytes should be [0xFF, 0xFF] if the source is a MAC-48
(no inversion of any bits mentioned)
IEE
IEEE in "Guidelines for Use of Extended Unique Identifier (EUI), Organizationally Unique Identifier (OUI), and Company ID (CID)" section "Mapping an EUI-48 to an EUI-64" (pg 15)
states that the insertion bytes should be [0xFF, 0xFE] or [0xFF, 0xFF]
(no inversion of any bits mentioned)
Can you help?
Maybe? Gotta clear some things up and do some research
Code
What follows is the "StackExchange" implementation. This exists simply because it is what I first encountered before researching further. By no means is it the "correct" solution, it is simply correct as to the implied spec.
Tests
The text was updated successfully, but these errors were encountered: