Hide Forgot
Description of problem: Changing 802-3-ethernet.mac-address property of an OVS interface take no effect at all, also nmcli shows no mac information at 802-3-ethernet.mac-address. Version-Release number of selected component (if applicable): NetworkManager-1.20.5-1.27c23b0748.el7.x86_64 NetworkManager-ovs-1.20.5-1.27c23b0748.el7.x86_64 How reproducible: Steps to Reproduce: Create a ovs-bridge with ovs-port and ovs-interface: nmcli conn add type ovs-bridge conn.interface bridge0 nmcli conn add type ovs-port conn.interface port0 master bridge0 nmcli conn add type ovs-interface slave-type ovs-port conn.interface iface0 \ master port0 ipv4.method manual ipv4.address 192.0.2.1/24 # Actual mac ip link show ovs0 15: ovs0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/ether ae:7a:1e:41:f1:44 Change mac address of the ovs-interface nmcli c modify ovs0 802-3-ethernet.mac-address ae:7a:1e:41:f1:45 Actual results: nmcli c show ovs0 |grep mac 802-3-ethernet.mac-address: AE:7A:1E:41:F1:45 802-3-ethernet.cloned-mac-address: -- 802-3-ethernet.generate-mac-address-mask:-- 802-3-ethernet.mac-address-blacklist: -- ip link show ovs0 15: ovs0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/ether ae:7a:1e:41:f1:44 brd ff:ff:ff:ff:ff:ff Expected results: nmcli c show ovs0 |grep mac 802-3-ethernet.mac-address: AE:7A:1E:41:F1:45 802-3-ethernet.cloned-mac-address: -- 802-3-ethernet.generate-mac-address-mask:-- 802-3-ethernet.mac-address-blacklist: -- ip link show ovs0 15: ovs0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/ether ae:7a:1e:41:f1:45 brd ff:ff:ff:ff:ff:ff Additional info: Also 802-3-ethernet.mac-address is empty after ovs-interface creation.
Note that the correct property to change the MAC address is 'ethernet.cloned-mac-address'. 'ethernet.mac-address' is used to match a specific device by MAC address (instead or in addition to 'connection.interface-name'). Currently the 'ethernet.cloned-mac-address'property is not applied for ovs bridges and ovs interfaces. This is the upstream merge request to support it: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/321
(In reply to Beniamino Galvani from comment #1) > Currently the 'ethernet.cloned-mac-address'property is not applied for ovs > bridges and ovs interfaces. What is the meaning of specifing a MAC address on the bridge? Unlike the Linux-Bridge model, OVS bridges in NM do not have a kernel interface representation. In order to have one, an internal interface needs to be defined.
> What is the meaning of specifing a MAC address on the bridge? Good point. I would guess having a MAC address only makes sense on the interfaces.
(In reply to Edward Haas from comment #2) > (In reply to Beniamino Galvani from comment #1) > > Currently the 'ethernet.cloned-mac-address'property is not applied for ovs > > bridges and ovs interfaces. > > What is the meaning of specifing a MAC address on the bridge? > Unlike the Linux-Bridge model, OVS bridges in NM do not have a kernel > interface representation. In order to have one, an internal interface needs > to be defined. The bridge MAC property maps to the 'other_config : hwaddr' property of the Bridge table in ovs db. From 'man ovs-vswitchd.conf.db': other_config : hwaddr: optional string An Ethernet address in the form xx:xx:xx:xx:xx:xx to set the hardware address of the local port and influence the datapath ID. As I understand from the man page and from empirical evidence, the local interface (the one named in the same way as the bridge) doesn't take the MAC set in the interface table, but the one set on the bridge. Perhaps in NM we could have only the property on the interface (without the one on the bridge) and set it in the right place depending on the interface type (local or not), but that seems ugly because it's different from the ovs model. Also, the hwaddr property on the bridge influences the 'datapath ID' ... I don't know if that is useful or not, but is seems more correct to have properties that map to the ovs counterpart.
both situations covered 1. iface has the same name as a bridge (setting mac on the bridge) ovs_cloned_mac_with_the_same_bridge_iface_name 2. iface name differs from a bridge (setting mac on iface directly) ovs_cloned_mac_set_on_iface both work well on all architectures.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:1847