What exactly are the specifications for a valid mac address?
I was playing around with the network address setting of my WiFi adapter and realized that having a hexadecimal number as mac was not the only condition to make it valid.
To cut to the chase,
34:34:45:79:34:54
is a valid mac address, whereas
33:34:45:79:34:54 is invalid.
Both these mac addresses are random hexadecimals that I just made, but one works and the other doesn't. Why is this?
Solution 1:
Unicast MAC addresses must never set the 1's place bit in the first byte. That's the "group" (multicast/broadcast) bit. That's what you ran afoul of with 0x33.
If you make up your own MAC address, you're supposed to set the 2's place bit (the "locally administered" bit) in the first byte, to differentiate it from a guaranteed globally unique MAC address. Usually the first three bytes a unicast MAC address is an "Organizationally Unique Identifier" (OUI) that the IEEE assigned to the manufacturer of your Ethernet device. Manufacturers are required to make sure they keep the last 3 bytes unique. So your use of 0x34 was okay, because the 1's place bit was cleared. 0x32 would have been an even better choice, because the 2's place bit would have been set.