4 ms·
Hardware companies have definitely been lazy and reused MAC addresses. But what's worse is that the total space is as low as 48 bits. The probability of a coll
by sgk284 11y ago
Hardware companies have definitely been lazy and reused MAC addresses. But what's worse is that the total space is as low as 48 bits.
The probability of a collision is orders of magnitude higher than if you just grab some random bytes out of /dev/urandom and generate a type-4 UUID.
For a discussion on the benefits of your approach (a type-1 UUID) vs a random id (a type-4 UUID), check out the wikipedia article: https://en.wikipedia.org/wiki/Universally_unique_identifier https://en.wikipedia.org/wiki/Universally_unique_identifier
Randomness is great because it doesn't require any synchronization or access to some special token.
- michaelmior 11y agoIf you get identical MAC addresses on machines operating the same service, presumably on the same network, you have bigger problems than ID generation.
- Drdrdrq 11y agoMac addresses should be unique; at least for network cards. The address space of 48bits is not that small. Also, see the warning about entropy in your linked article. There is a difference between mathematical random() and CS random().