3 ms·
No collisions ever, unless your MAC addresses collide. This could happen due to using VMs, or if somebody reconfigures the MAC to a colliding value, or if it tu
by mikeash 11y ago
No collisions ever, unless your MAC addresses collide. This could happen due to using VMs, or if somebody reconfigures the MAC to a colliding value, or if it turns out that your NIC manufacturer was lazy/incompetent and gave you a non-unique MAC.
I agree, I don't understand why people would overthink it this much. Grab N bits from /dev/urandom (where N=128 is fine, and N=256 will quiet any paranoia) and call it done.
In the unlikely event that generating unique IDs becomes a performance bottleneck, then you can look into something slightly more complex. Reading N*M bytes (where M is maybe 10-100) in one call and caching the surplus should suffice.