Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd bond mac random at boot, then rechange on ifreload #269

Open
aderumier opened this issue Sep 1, 2023 · 1 comment
Open

systemd bond mac random at boot, then rechange on ifreload #269

aderumier opened this issue Sep 1, 2023 · 1 comment

Comments

@aderumier
Copy link
Contributor

aderumier commented Sep 1, 2023

Hi,
tested on debian11,

since systemd v241
https://www.freedesktop.org/software/systemd/man/systemd.net-naming-scheme.html#v241

Like for bridge, bond interface are generated with random mac at boot, instead first slave mac

 

2: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 9200 qdisc mq master bond0 state UP group default qlen 1000
    link/ether e6:15:22:13:d0:2f brd ff:ff:ff:ff:ff:ff permaddr ec:0d:9a:8b:2a:dc
    altname enp130s0f0np0
3: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 9200 qdisc mq master bond0 state UP group default qlen 1000
    link/ether e6:15:22:13:d0:2f brd ff:ff:ff:ff:ff:ff permaddr ec:0d:9a:8b:2a:dd
    altname enp130s0f1np1
4: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 9200 qdisc noqueue master vmbr1 state UP group default qlen 1000
    link/ether e6:15:22:13:d0:2f brd ff:ff:ff:ff:ff:ff
 

Then, on next ifreload, the mac is change again (with down/up of bond0)

info: bond0: already exists, no change detected
info: bond0: invalid bond mac detected - resetting to eth0's mac (ec:0d:9a:8b:2a:dc)
info: bond0: netlink: ip link set dev bond0 down
info: bond0: netlink: ip link set dev bond0 address ec:0d:9a:8b:2a:dc
info: bond0: netlink: ip link set dev bond0 up

(This have trigger a bug in my production on reload).

It could be great to force mac in ifupdown2 at boot too. (like for bridge, when interface is just created)
46be384

@aderumier
Copy link
Contributor Author

seem easy to fix, patch sent:

#270

on first boot, mac is now correct:


2: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 9200 qdisc mq master bond0 state UP group default qlen 1000
    link/ether ec:0d:9a:8b:2a:dc brd ff:ff:ff:ff:ff:ff
    altname enp130s0f0np0
3: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 9200 qdisc mq master bond0 state UP group default qlen 1000
    link/ether ec:0d:9a:8b:2a:dc brd ff:ff:ff:ff:ff:ff permaddr ec:0d:9a:8b:2a:dd
    altname enp130s0f1np1
4: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 9200 qdisc noqueue master vmbr1 state UP group default qlen 1000
    link/ether ec:0d:9a:8b:2a:dc brd ff:ff:ff:ff:ff:ff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant