Ubuntu – Forbidden cloned MAC addresses

network-manager

I've been testing the cloned MAC address feature of Network Manager on a wireless connection and found out something odd: some particular addresses, such as 00:00:00:00:00:00 and 11:11:11:11:11:11, won't work and the MAC address will default to the permanent one.

Thought this might have something to do with the addresses being unrealistic, but addresses like 22:22:22:22:22:22 or aa:aa:aa:aa:aa:aa work perfectly fine, despite not being associated with any known vendor (according to macchanger -l and macvendorlookup.com).

Is this a bug or is there any particular reason for some MAC addresses not to be accepted?

The command I'm using to change MAC address is

nmcli connection modify [connection name] 802-11-wireless.cloned-mac-address [desired mac address]

To apply the change, I do

nmcli connection down [connection name]
nmcli connection up [connection name]

then, to verify the MAC address has changed,

macchanger -s [interface name]

I get the same behavior when I do all this via GUI and on a wired connection.

Best Answer

I enquired with GNOME Bugzilla. Here’s their informative response:

"The kernel doesn't allow assigning a 00:00:00:00:00:00 MAC as it's invalid. Also, MAC addresses with the least-significant bit of the first octet set to 1 are multicast addresses, so they can't be used either"

the second part meaning that all MAC addresses in the following forms are multicast and therefore unassignable:

  • x1:xx:xx:xx:xx:xx
  • x3:xx:xx:xx:xx:xx
  • x5:xx:xx:xx:xx:xx
  • x7:xx:xx:xx:xx:xx
  • x9:xx:xx:xx:xx:xx
  • xb:xx:xx:xx:xx:xx
  • xd:xx:xx:xx:xx:xx
  • xf:xx:xx:xx:xx:xx

The Wikipedia page on multicast addresses also mentions this.

Related Question