Hacker News new | ask | show | jobs
by rurban 3119 days ago

    new_mac=$(openssl rand -hex 4 | sed 's/\(..\)/\1:/g; s/:$//; s/./0/2'; s/^/02:/)
is better. by using the 02: prefix for locally administered macs you avoid clashes with certain cards. I also used to randomize my local hostname.
1 comments

Most of the time there are <100 devices connected to the wifis I'm connected to. I don't want to do the math now, but I expect that a collision is pretty unlikely. If you mean that some cards have problems with handling those mac addresses, I would love to hear about that.

> I also used to randomize my local hostname

Great idea, missed that. I'll integrate that in the future.

Intel cards and Realtek cards are known to be problematic with random vendor prefixes.