What exactly are the specifications for a valid mac address?

7

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?

Google Services

Posted 2017-05-19T16:18:02.423

Reputation: 550

1Only specific mac addresses are actually valid. The IEEE 802 standard defines which mac addresses are valid. In both cases you have hexadecimal values though. – Ramhound – 2017-05-19T16:28:34.590

5Wikipedia article on Mac address has most of the information. At least it has the information about the first two hexadecimals. Essentially you made it a multicast instead of unicast address. – Seth – 2017-05-19T16:28:54.510

Answers

8

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.

Spiff

Posted 2017-05-19T16:18:02.423

Reputation: 84 656