How to set the external interface for the bridge to be the same as the primary interface using networkd

bridgemac addresssystemd

I've created a virtual bridge bridge0:

bridge0.netdev:

[NetDev]
Name=bridge0
Kind=bridge

bridge0.network:

[Match]
Name=bridge0

[Network]
DHCP=yes

and attached my primary interface eth0 to it

eth0.network:

[Match]
Name=eth0

[Network]
Bridge=bridge0

But this changes the MAC address my computer uses for DHCP to be the random MAC address assigned to bridge0. Is there a way to keep the physical MAC address assigned to eth0?

Best Answer

According to the manpage of systemd.netdev you can add a MAC address in the [NetDev] section.

[NetDev]
Name=bridge0
Kind=bridge
MACAddress=

Just insert the MAC address of eth0 there.

Related Topic