On Sat, Apr 21, 2012 at 11:16 AM, Stroller
<[email protected]> wrote:
>
> On 20 April 2012, at 18:21, Michael Mol wrote:
>> …
>> The inet6 address listed is
>>
>> fe80::be5f:f4ff:fe19:ad18
>>
>> and your MAC is
>>
>> bc:5f:f4:19:ad:18
>>
>> …
>>
>> be:5f:f4:19:ad:18
>>
>> Which is your MAC.
>
> And then we just convert all incidences of the letter "e" to "c"? Is there
> some rule for this part?
>
> Perhaps I'm missing something here.
Whups. Missed a spot. Thank you for so graciously pointing it out.
So, on this laptop, here's the output of
ip -6 addr show wlan0
6: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 4c:ed:de:93:63:a0 brd ff:ff:ff:ff:ff:ff
inet 192.168.83.146/27 brd 192.168.83.159 scope global wlan0
inet6 2001:470:c5b9:beef:4eed:deff:fe93:63a0/64 scope global dynamic
valid_lft 86100sec preferred_lft 14100sec
inet6 fe80::4eed:deff:fe93:63a0/64 scope link
valid_lft forever preferred_lft forever
So you can see my MAC is
4c:ed:de:93:63:a0
and that I have a couple IPv6 addresses:
fe80::4eed:deff:fe93:63a0
2001:470:c5b9:beef:4eed:deff:fe93:63a0
(They look like they have different lengths, but that's because the
bits between fe80 and 4eed in the first one are all 0s, and so are
collapsed by using ::)
Take only the host portion of those addresses, and you get:
4eed:deff:fe93:63a0
Remove the ff:fe from the middle, and redistribute the : delimiters to
be every byte.
43:ed:de::93:63:a0
Compare with my MAC:
4c:ed:de:93:63:a0
And, yeah, that second digit is different again. That's because bit 7
is inverted. From RFC4291:
Modified EUI-64 format interface identifiers are formed by inverting
the "u" bit (universal/local bit in IEEE EUI-64 terminology) when
forming the interface identifier from IEEE EUI-64 identifiers. In
the resulting Modified EUI-64 format, the "u" bit is set to one (1)
to indicate universal scope, and it is set to zero (0) to indicate
local scope. The first three octets in binary of an IEEE EUI-64
identifier are as follows:
0 0 0 1 1 2
|0 7 8 5 6 3|
+----+----+----+----+----+----+
|cccc|ccug|cccc|cccc|cccc|cccc|
+----+----+----+----+----+----+
written in Internet standard bit-order, where "u" is the
universal/local bit, "g" is the individual/group bit, and "c" is the
bits of the company_id. Appendix A, "Creating Modified EUI-64 Format
Interface Identifiers", provides examples on the creation of Modified
EUI-64 format-based interface identifiers.
--
:wq