You are not logged in.
I'm using systemd-networkd to create a bond interface that enslaves my wlan and eth interfaces in active-backup mode. It works but currently when the bond interface is created it and the enslaved interfaces are given a 'persistent' ( read same across boots / network resets ) mac address. I want the mac address for the bond interface randomized on reboots and/or network resets. My current method of trying to do this is to create a link file for the bond interface that sets the MACAddressPolicy to random. It looks like networkd is reading the link file and using it for the bond interface per: networkctl status bond0
2: bond0
Link File: /etc/systemd/network/10-default-bond0.link
Network File: /etc/systemd/network/30-bond0.network
Despite that I'm still getting the same, persistent mac address assigned to bond. I'm not entirely sure what's going wrong here. I've checked journalctl -u systemd-networkd.service to see if there were any errors reading the file but couldn't find anything to suggest there was a mistake. Below are my link and netdev configs. I was wondering if anyone might be able to tell me:
1.) If it's even possible to assign a random mac to a bond interface? From what I've read it sounds like it should be.
2.) If you've managed to configure a random mac for a bond using networkd how did you do it/what might I be doing wrong?
10-default-bond0.link:
[Match]
Type=bond
[Link]
MACAddressPolicy=random
30-bond0.netdev:
[NetDev]
Kind=bond
[Bond]
Mode=active-backup
PrimaryReselectPolicy=always
MIIMonitorSec=1s
Thanks!
If we don't study the mistakes of the future, we're bound to repeat them for the first time.
Offline
Apologies, I think this is in the wrong section. Taking a look at the tagged post it seems like this probably belongs in Networking, Server and Protection. Is there a way to get this moved over to the correct subforum?
If we don't study the mistakes of the future, we're bound to repeat them for the first time.
Offline
Is there a way to get this moved over to the correct subforum?
Just click on Report: forum moderators will take care of your request.
<49,17,III,I> Fama di loro il mondo esser non lassa;
<50,17,III,I> misericordia e giustizia li sdegna:
<51,17,III,I> non ragioniam di lor, ma guarda e passa.
Offline
Moved, in anticipation of a request
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
I've not tried, but the wiki writes to add a "NamePolicy=" for the link. Since it's a bonded interface, I'd also try to set a "FailOverMACPolicy=active" in the netdev [bond] section. Then check the logs again.
Offline