Comment 1 for bug 1664698

Revision history for this message
Ryan Harper (raharper) wrote :

For networkd, All virtual net devices support general parameters, including MACAddress
and this works as expected if netplan passes through macaddress parameters to netdevs it creates.

root@z1:/etc/systemd/network# cat br0.net*
[NetDev]
Name=br0
MACAddress=00:11:22:33:44:55
Kind=bridge
[Match]
Name=br0

[Network]
Address=192.168.2.1/24

root@z1:/etc/systemd/network# networkctl
IDX LINK TYPE OPERATIONAL SETUP
  1 lo loopback carrier unmanaged
  2 br0 ether no-carrier configuring
 16 eth0 ether routable unmanaged

3 links listed.
root@z1:/etc/systemd/network# ifconfig br0
br0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
        inet 192.168.2.1 netmask 255.255.255.0 broadcast 192.168.2.255
        ether 00:11:22:33:44:55 txqueuelen 1000 (Ethernet)
        RX packets 0 bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 0 bytes 0 (0.0 B)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

root@z1:/etc/systemd/network# cat *bond*
[NetDev]
Name=bond0
MACAddress=aa:bb:cc:00:11:22
Kind=bond
Mode=balance-rr
[Match]
Name=bond0

[Network]
Address=10.2.71.1/24
root@z1:/etc/systemd/network# ifconfig bond0
bond0: flags=5123<UP,BROADCAST,MASTER,MULTICAST> mtu 1500
        inet 10.2.71.1 netmask 255.255.255.0 broadcast 10.2.71.255
        ether aa:bb:cc:00:11:22 txqueuelen 1000 (Ethernet)
        RX packets 0 bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 0 bytes 0 (0.0 B)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0