[CentOS] How to set macaddr with nmcli

Fri Aug 3 13:15:40 UTC 2018
Robert Moskowitz <rgm at htt-consult.com>

I see my problem.  I mis-read what

nmcli con mod eth0 mac "02:67:15:00:81:0B"

does.  It sets HWADDR; which interface to link to, not MACADDR, what MAC 
address you want for your interface.

So I have read the nmcli pages and googled a bit.  I cannot find a way 
to set MACADDR.  I suppose I can set HWADDR then use sed to change it to 
MACADDR, but this seems a real hack.

ARM boards do not have assigned MAC addresses.  Uboot uses various 
information to generate a local MAC address.  I want finer control of my 
MAC address for my servers.  In the past, I just edited ifcfg-eth0.  I 
am trying now to do it all with nmcli.  I thought I had it, but I 
misread the manual.

Any pointers?


BTW, I remember setting MAC addresses on 3COM 3C501C boards because the 
old board died and we had software licensed to specific MAC addresses.  
So you had to specify your MAC address in the config file.  The DEC 
admin had to do a similar thing if he had to swap out his LAN card 
(related: read up on why Dr. Comer set ARP timeout to 10min).

Then there was that counterfeit 3C503C from Malaysia, all with the same 
MAC address.  Caused havoc on the networks.  EVERYONE had to specify 
their MAC address with those.  3COM did find the plant making these 
clones and shut them down.  But the damage was done to a lot of us.