[systemd-devel] Should `MACAddressPolicy=persistent` for bridges/bonds/all-software-devices be reconsidered?
Thomas Haller
thaller at redhat.com
Thu May 12 18:36:18 UTC 2022
On Thu, 2022-05-12 at 13:36 -0400, Dan Streetman wrote:
> On Thu, May 12, 2022 at 11:11 AM Thomas Haller <thaller at redhat.com>
> wrote:
> >
> > Either
> >
> > - a user doesn't care about the MAC address,
>
> note that it's possible for a user not to care about the *specific*
> mac address, only that they want the mac to remain consistent.
>
> for example, on my system i have br0 bridge with multiple interfaces
> attached, and my local DHCP server is configured to provide a static
> addr to br0's mac. If I replace an interface card (e.g. change from
> 1g
> to 10g, or just replace a failing nic) then the br0 mac *does not*
> change, if using systemd's default. If I had br0 inheriting its mac
> from one of the attached interfaces, it would change, and i'd have to
> update my dhcp server config.
>
> I think the argument really comes down to, should the default be to
> have (without user configuration) a mac that is predictable or a mac
> that is consistent. Your argument is for predictability, which makes
> the field engineer's work deploying systems easier, but if you lose
> consistency then the life of the maintenance engineer gets harder.
>
>
> > - a user sets the desired MAC address themselves (possibly by
> > setting MacAddressPolicy=)
> > - or, the user intentionally does not set a MAC address (e.g. for
> > bridge/bond).
> >
> > In no case there is a strong argument why udev should do it, and
> > it's
> > harmful in some cases.
Hi,
I considered that as case 2, the one where you care. You have all the
means to set a MAC address also to something not specific.
According to `man systemd.netdev`, a permanent MAC address is already
the default. And I think systemd-networkd doesn't rely on udev's
MACAddressPolicy for that (or does it?).
NetworkManager also sets the MAC address that was configured, it does
not expect udev to handle this. NetworkManager also supports a stable
policy.
If you use another tool which cannot set the MAC address, you can even
use udev's MACAddressPolicy=. But that is then your configuration, not
the distro default.
Thomas
More information about the systemd-devel
mailing list