NetworkManager不接受一些克隆的MAC地址值

我正在创build一个应用程序,负责pipe理一些常规的系统pipe理任务,其中一个是在CentOS 7中更改特定networking接口的MAC地址。

我正在使用nmcli来执行此操作:

 $ nmcli con mod eth1 802-3-ethernet.cloned-mac-address "70:b3:d5:a5:7e:11" $ nmcli con up eth1 Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/342) 

我注意到,从我的networking上的其他设备上取得的“有机”MAC地址似乎工作正常,但有时当我改变其中一个位时,我得到一个失败:

 $ nmcli con mod eth1 802-3-ethernet.cloned-mac-address "71:b3:d5:a5:7e:11" $ nmcli con up eth1 Error: Connection activation failed: Active connection could not be attached to the device 

我在/ var / log / messages中看到以下内容:

 Aug 29 20:48:59 test NetworkManager[740]: <info> [1504054139.5710] device (eth1): Activation: starting connection 'eth1' (e96e0aa6-d1e9-4d1f-98da-0e5d2c961462) Aug 29 20:48:59 test NetworkManager[740]: <info> [1504054139.5716] audit: op="connection-activate" uuid="e96e0aa6-d1e9-4d1f-98da-0e5d2c961462" name="eth1" pid=1587 uid=0 result="success" Aug 29 20:48:59 test NetworkManager[740]: <info> [1504054139.5722] device (eth1): state change: disconnected -> prepare (reason 'none') [30 40 0] Aug 29 20:48:59 test NetworkManager[740]: <error> [1504054139.6004] platform-linux: do-change-link[3]: failure changing link: failure 99 (Cannot assign requested address) Aug 29 20:48:59 test NetworkManager[740]: <warn> [1504054139.6010] device (eth1): set-hw-addr: failed to set-cloned MAC address to 71:B3:D5:A5:7E:11 (71:B3:D5:A5:7E:11) (unspecified) Aug 29 20:48:59 test kernel: IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready Aug 29 20:48:59 test NetworkManager[740]: <info> [1504054139.6297] device (eth1): state change: prepare -> failed (reason 'none') [40 120 0] Aug 29 20:48:59 test NetworkManager[740]: <warn> [1504054139.6313] device (eth1): Activation: failed for connection 'eth1' Aug 29 20:48:59 test NetworkManager[740]: <info> [1504054139.6762] device (eth1): state change: failed -> disconnected (reason 'none') [120 30 0] Aug 29 20:48:59 test kernel: IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready Aug 29 20:48:59 test gnome-session: (gnome-shell:2772): Gjs-WARNING **: JS ERROR: TypeError: this._activeConnection._connection is undefined Aug 29 20:48:59 test gnome-session: NMConnectionDevice<._activeConnectionChanged@resource:///org/gnome/shell/ui/status/network.js:395 Aug 29 20:48:59 test gnome-session: wrapper@resource:///org/gnome/gjs/modules/lang.js:169 

经过一番Googlesearch之后,我find了这篇博客文章 ,提到“稳定的,哈希的MAC地址”,这看起来可能是我正在validation的级别。

我目前无法find正确的search条件组合,以确定如何检查,以及是否可以禁用。

我的问题是:谁正在检查这些签名? 我可以禁用这个检查吗? 如果是的话,在哪里? 这甚至与签名有关吗? 我很难find确切的search条件,使我find正确的答案。