On Tue, 2018-08-07 at 08:43 -0400, Robert Moskowitz wrote:
I hope this is the right list for nmcli. I want to set MACADDR in ifcfg-eth0 I thought it was: nmcli con mod eth0 mac "02:67:15:00:81:0B" but this sets HWADDR, which has a totally different use. I could then change HWADDR to MACADDR with: sed -i -e "s/HWADDR/MACADDR/w /dev/stdout" /etc/sysconfig/network-scripts/ifcfg-eth0 But that is a hack. It would be nice to be able to directly set MACADDR, but I cannot find any documentation that states how to do this. thanks
Hi, $ nmcli connection modify "$PROFILE" ethernet.cloned-mac-address "$MAC" Theoretically, this is documented in `man nm-settings`. However, the manual is generated and for cloned-mac-address the generated documentation is confusing. It's confusing, because `man nm- settings` is undecided whether it documents libnm GObject properties or D-bus API. Especially, since you care about nmcli syntax. In most cases, there is little difference between libnm API, D-Bus API and nmcli, so "nm-settings" manual does apply. For "cloned-mac-address" it's different. And as you seem concerned about ifcfg files, see also `man nm-settings-ifcfg-rh`. But usually, you would not concern yourself with the details of ifcfg files. If you look at `man nmcli` it has a table: PROPERTY ALIASES Table 3. Wired Ethernet options ┌───────────┬──────────────────────────┐ │Alias │ Property │ ├───────────┼──────────────────────────┤ │mtu │ wired.mtu │ ├───────────┼──────────────────────────┤ │mac │ wired.mac-address │ ├───────────┼──────────────────────────┤ │cloned-mac │ wired.cloned-mac-address │ └───────────┴──────────────────────────┘ best, Thomas
Attachment:
signature.asc
Description: This is a digitally signed message part