< Previous | Contents | Next >
The MAC address of every ethernet interface should normally be globally unique, and it technically has to be unique within its ethernet broadcast domain. To achieve this, the manufacturer usually allocates a block of MAC addresses from a centrally-administered pool (for which a fee has to be paid) and preconfigures one of these addresses on each item sold.
In the case of development boards, sometimes the manufacturer wants to avoid paying these fees and therefore provides no globally unique addresses. In these cases the users themselves have to define MAC addresses for their systems. When no MAC address is defined for an ethernet interface, some network drivers generate a random MAC address that can change on every boot, and if this happens, network access would be possible even when the user has not manually set an address, but
e.g. assigning semi-static IP addresses by DHCP based on the MAC address of the requesting client would obviously not work reliably.
To avoid conflicts with existing officially-assigned MAC addresses, there is an address pool which is reserved for so-called “locally administered” addresses. It is defined by the value of two specific bits in the first byte of the address (the article “MAC address” in the English language Wikipedia gives a good explanation). In practice this means that e.g. any address starting with hexadecimal ca (such as ca:ff:ee:12:34:56) can be used as a locally administered address.
On systems using U-Boot as system firmware, the ethernet MAC address is placed in the “ethaddr” environment variable. It can be checked at the U-Boot command prompt with the command “printenv ethaddr” and can be set with the command “setenv ethaddr ca:ff:ee:12:34:56”. After setting the value, the command “saveenv” makes the assignment permanent.
3.7.1.2. Kernel/Initrd/Device-Tree relocation issues in U-Boot