One networks basics course the statement was made by lecturer for OUI (Organizational Unique Identifier) to be carried in MAC-address Bits 3 to 24. I wonder where the start bit number 3 from? It is hard to find further source to confirm or contradict stressing made in course. Does OUI really starts at Bit 3? While in course the discussion was upheld at quite generic level, without further narrowing to protocol variants.
1 Answer
There are two flags in the most-significant byte of a MAC address. The least-significant bit of the most-significant byte is the I/G (Individual/Group) flag. Setting this bit means that the address is used as a destination address to a group. The second least-significant bit of the most-significant byte is the U/L (Universal/Local) flag. Setting this bit means that the MAC address was locally created; BIAs (Burned-in-Addresses) have the U/L bit clear.
Any MAC address with the I/G bit set is a multicast address, with a special case for the broadcast MAC address (ff-ff-ff-ff-ff-ff
). That means that any odd number in the most-significant byte of the MAC address is a multicast address.
Multicast addresses can only be destination addresses, not an address assigned to an interface.
If your MAC address is 53:54:00:b4:ad:81
, it has both the I/G bit set, meaning that it is a multicast (destination group) address, and the U/L bit set, meaning that it is a locally defined MAC address.
The most-significant byte is 0x53
(01010011
), so both flags are set.
0 1 0 1 0 0 1 1
^ ^
| |
U/L I/G
Any MAC addresses you create, exclusive of any OUI you own, are supposed to have the U/L bit set to show that you have created them, and that they will not step on an OUI owned by a different company (unfortunately, a lot of people that make up their own MAC addresses do not do this, but there really isn't any way to enforce it). Interface addresses must have the I/G bit clear to prevent them from being multicast (group destination) addresses.
People often ask why the flags are the two least-significant bits of the most-significant byte. That is because of the order bits, bytes, and frame fields are sent on ethernet. The least-significant bit of a byte is sent first, the most-significant byte of a frame is sent first, and the first field of a frame is the destination address. Also, remember that ethernet was originally on a shared medium (the way Wi-Fi is now), so all hosts on the LAN saw all frames. The first bit received at a host tells a host seeing the frame if the destination address is an individual or group address.
-
Thanks for your input. Actually, when I see range specification 3 to 24 I imagine linear bit numbering within whole MAC address. If I/G and U/L bits are placed on first octet's LSB edge this bit numbering doesn't seem to be linear that way. Linear merely within one octet which is not what 3 to 24 attempts to express.– AtNarrowOct 2, 2022 at 16:13
-
Look at the last paragraph. The least-significant bit of the most significant byte is the first bit sent on ethernet. Token ring also uses MAC addresses, but it sends the most significant bit first, so the MAC address bits in the bytes must be flipped.– Ron Maupin ♦Oct 2, 2022 at 16:18
-
@AtNarrow, you seem to be thinking of it in terms of human-readable text, not in the terms of what ethernet sees. Ethernet sees it linearly, and bits 3 to 24 are the OUI of the destination MAC address..– Ron Maupin ♦Oct 2, 2022 at 16:22