ID (MAC) unique?
i have some onion omega 2+
and im developing an IOT device with the omegas.
I make some reference on the ID of the Omega - the last 4 signs on the mac.
is every omega uniqe on this last 4 signs?
i think this is a hex - so 161616*16 = 65536
Can i use this ID for my software or is it possible to get 2 Omegas with the same ID?
@Daniel-Bachmann Yes, the MAC must be (and is) globally unique. However note that you should take the entire MAC into account, not only the last 16 bits (4 hex digits).
As you calculated, 16 bits allow only for 65536 different MAC addresses, and every Omega2 needs at least 2 of them, one for the WiFi and one for the Ethernet. So Onion will (or already has) run out of this range.
Onion currently got the MAC addresses 40:A3:6B:Cx:xx:xx assigned from the global MAC pool (see here for a quite complete list), which is a total of 16*65536 = 1048576 addresses. Should be enough for a while, but still, Onion might obtain another range at some point in time.
So as a really stable software ID, I would only use the complete MAC.
Note also that only universally administered addresses (UAAs) are unique, where locally administered addresses (LAAs) are not. The difference is in bit1 in the first byte, if it is 1, then the address is not globally unique. All MACs actually exposed to a network must be unique, but internal ones might be not. Onion addresses starting with
40are unique, of course. But if you have IPv6 on, you see that a LAA is used to build the IPv6 link local address (starts with
42). More details -> wikipedia