The below line in journalctl confirms that the config is picked up.
Jan 18 03:45:54 sys-net NetworkManager[<pid>]: <info> [1705545954.0592] device (<eth>): set-hw-addr: set-cloned MAC address to <mac-address> (stable)
But the problem is that mac address is not consistent across reboots. My understanding is that the stable option should provide same mac address across reboots.
There is one more issue described below. However not sure if its related to the issue described above. There is no entry for the wired connection in /etc/NetworkManager/system-connections/. So, I open the Edit Connections dialog, updated some details in the wired connection, click save and did not see any entry made in the system connections folder. The below line in the journalctl indicates why there is no entry in the system connections folder
The stable address is generated by hashing a private key from /var/lib/NetworkManager/secret_key, the ifname of the device, and a stable-id. The stable-id by default is the UUID of the connection (“connection.uuid”), unless you configure the new property “connection.stable-id“. The latter allows you to have multiple connections that generate the same MAC address. Note that “connection.stable-id” property is also used when generating stable-privacy IPv6 addresses (“ipv6.addr-gen-mode”, RFC 7217).
I was looking for info on why the NetworkManager service does not work out of the box. Running nm-connection-editor from root terminal does not fix the OG issue of mac-cloned-address=stable not working. I think it’ll work if the NetworkManager service able to store the information. I see it happening in a debian loptop and not in debian-12-minimal qube.
Add /var/lib/NetworkManager/secret_key and /usr/lib/NetworkManager/conf.d/31-randomize-mac.conf to bind_dirs and then change in /usr/lib/NetworkManager/conf.d/31-randomize-mac.conf: