networkd: bridge MAC addresses are not inherited from physical interface
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
New
|
Undecided
|
Unassigned | ||
systemd |
New
|
Undecided
|
Unassigned |
Bug Description
When configuring a software bridge (as I understand it), the default behavior in the Linux kernel (and, thus, also Ubuntu releases) has been to to inherit the MAC address of one of the physical interfaces associated with the bridge. (possibly the lowest-numbered MAC, for consistency.)
When testing Ubuntu 18.04, I configured a bridge in the following way:
"""
network:
version: 2
renderer: networkd
ethernets:
ens3:
match:
name: ens3
bridges:
br0:
interfaces: [ens3]
dhcp4: true
"""
I expected the bridge to inherit the MAC address associated with `ens3`, given that was the default behavior in previous Ubuntu releases. However, a random MAC address was generated. (I noticed this when the DHCP server provided a different IP address, but I'm not positive that was related, given that a different client identifier could have been used.)
Given this configuration, since all layer 3 traffic associated with the bridged interface can only come from the bridge, I would expect (for the purposes of ensuring MAC address uniqueness) the previous behavior of inheriting the MAC address from the physical interface should have been preserved.
I understand that networkd's default is to randomly generate the MAC address, but (given that many things on the network may break if a duplicate MAC is generated) I believe it would be more reliable to preserve the previous behavior of inherting the MAC from the physical interface instead.
summary: |
- Bridge MAC addresses are not inherited from physical interface + networkd: bridge MAC addresses are not inherited from physical interface |
For what it's worth, I understand that the actual bug is not in netplan, but I think it would be nice to make things consistent across renderers by working around this in netplan.