All three of our popular network technologies, Ethernet, Wi-Fi, and Bluetooth, use the EUI-48 identifier format. Most of the time when we assign a custom MAC address to a port, it works perfectly fine. But there are a two bits within the MAC address that, if set improperly, could cause bizarre issues, especially with Wi-Fi networks.
We will describe these two bits, what they do, and the right value to assign to them.
Addresses can either be universally administered addresses (UAA) or locally administered addresses (LAA).
- UAA: A universally administered address is uniquely assigned to a device by its manufacturer. The first three octets (in transmission order) identify the organization that issued the identifier and are known as the organizationally unique identifier (OUI). The remainder of the address (three octets for EUI-48 or five for EUI-64) are assigned by that organization in nearly any manner they please, subject to the constraint of uniqueness.
- LAA: A locally administered address is assigned to a device by a network administrator, overriding the burned-in address for physical devices.
Universally administered and locally administered addresses are distinguished by setting the second-least-significant bit of the first octet of the address. This bit is also referred to as the U/L bit, short for Universal/Local, which identifies how the address is administered.
- UAA = 0: If the bit is 0, the address is universally administered, which is why this bit is 0 in all OUIs.
- LAA = 1: If it is 1, the address is locally administered.
The least significant bit of an address's first octet is referred to as the I/G (Individual/Group) bit.
- Unicast = 0: When this bit is 0 (zero), the frame is meant to reach only one receiving NIC. This type of transmission is called unicast. A unicast frame is transmitted to all nodes within the collision domain. In a modern wired setting the collision domain usually is the length of the Ethernet cable between two network cards. In a wireless setting, the collision domain is all receivers that can detect a given wireless signal. If a switch does not know which port leads to a given MAC address, the switch will forward a unicast frame to all of its ports (except the originating port), an action known as unicast flood. Only the node with the matching hardware MAC address will accept the frame; network frames with non-matching MAC-addresses are ignored, unless the device is in promiscuous mode.
- Multicast = 1: If the least significant bit of the first octet is set to 1, the frame will still be sent only once; however, NICs will choose to accept it based on criteria other than the matching of a MAC address: for example, based on a configurable list of accepted multicast MAC addresses. This is called multicast addressing.
The MAC address we specify will be LAA (Locally Administered) and Unicast. This MAC address must have a first octet that confirms to the format of (hexadecimal): X2, X6, XA, or XE, where X may be replaced by any hexadecimal value.
ProTipWe like to be able to identify all of our different hobby boards on the network so that it is easy to SSH to them, so we give each board a unique value in the 5th octet, and then we give each interface a unique value in the last (6th) octet.
Here is an example for board #1:
AA:00:00:00:01:00 Ethernet
AA:00:00:00:01:02 Wi-Fi
AA:00:00:00:01:04 Bluetooth
Recommended Reading
Comments
Please log in or sign up to comment.