3 ms·
DO NOT generate a random MAC Address in the manner suggested here. You have a change of setting the "Locally administered address" bit, or worse the unicast/mul
by rkangel 6y ago
DO NOT generate a random MAC Address in the manner suggested here. You have a change of setting the "Locally administered address" bit, or worse the unicast/multicast bit. This will cause some network switches to silently drop your packets and you won't know why.
I learned this at 2 in the morning trying to bring up a second FPGA. Couldn't work out why it didn't work when the first one did, and it turned out to be because someone (possibly me) had picked the MAC Address 01:02:03:04:05:06 (we were on a private network).
Instead, pick an OUI you like (the first 3 bytes), and then randomly generate the last 3.
- Olipro 6y agoActually this is effectively a broadcast/multicast MAC address. The first byte of your MAC address should always be an even number. The value of the second bit is supposed to indicate if the MAC is "burned-in" and basically doesn't matter. The LSB of the first byte, however, should always be zero.
- rkangel 6y agoYou say "actually" but you seem to be agreeing with me. The first byte of my bad MAC is '01'. This not even because the LSB is set, making it a multicast address which is bad.