bond interface MAC is always randomly generated
Description
I'm trying to boot a machine with Flatcar using (i)PXE (version 4152.2.2) and convert the boot interface to a bond interface (running LACP) and assign the original IP to the bond0 interface using DHCP.
The problem is that no matter what I do, the bond0 IF always get a random MAC address.
I've tried many things (alpha, beta, stable, changing the order of systemd network configs, setting MACAddressPolicy=none, changing FailOverMACPolicy etc) without success.
The bond0 IF always gets a random MAC.
My original config (which I think should work):
storage:
files:
- path: /etc/systemd/network/00-bond-mac.link
contents:
inline: |
[Match]
Type=bond
[Link]
MACAddressPolicy=none
- path: /etc/systemd/network/60-bond0.network
contents:
inline: |
[Match]
Name=ens6f0 ens6f1
[Network]
Bond=bond0
- path: /etc/systemd/network/58-bond0.netdev
contents:
inline: |
[NetDev]
Name=bond0
Kind=bond
[Bond]
Mode=802.3ad
LACPTransmitRate=fast
TransmitHashPolicy=layer2+3
MIIMonitorSec=100ms
- path: /etc/systemd/network/62-bond0.network
contents:
inline: |
[Match]
Name=bond0
[Network]
DHCP=true
[DHCPv4]
UseDomains=true
The bond IF gets correctly configured, but with an always changing MAC.
Impact
As the bond IF gets an always changing MAC, DHCP can't offer the same IP what is used for booting.
Environment and steps to reproduce
- Set-up: version 4152, PXE
- Task: boot/setting up bond interface
- Action(s): a. set up butane/systemd config b. boot
- Error: bond MAC is random
Expected behavior
I expect the bond interface to get the first slave interface's MAC address, so I can gather an IP address using DHCP.
Additional information
Hello @bra-fsn and sorry for the delay here.
Looking at the documentation, the bond mac address will be the one from one of the slave (in your case ens6f0 or ens6f1), so the MACAddressPolicy=none should be used on those both interfaces to get predictable mac.
Let us know how it goes, and sorry again for the delay.
Resolution has been suggested. I am going ahead and closing this issue, feel free to reopen it if you run into any issues regarding this resolution. Thanks!