Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bonding weirdness - duplicate (unrelated) MAC address
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
onlinefloh
n00b
n00b


Joined: 02 May 2009
Posts: 29

PostPosted: Sun Feb 23, 2025 10:14 am    Post subject: Bonding weirdness - duplicate (unrelated) MAC address Reply with quote

Hi gurus,

As I was wondering yesterday why I can't access one of my servers (the backup machine) through network, I had to have a closer look.

The server in question has two ethernet interfaces configured for 802.3ad LACP bonding (just like the other servers around it). The switch is configured accordingly as well
For reasons I don't understand, the bonding driver seems to assign a MAC address to the bonded pair of ethernet interfaces, which happens to be the same as that of another server on my network.

If I understand the bonding process correctly, it SHOULD take the MAC address of the first interface and assign that to all the slaves of the bond.

The only possible explanation I could think of is that somewhere in the filesystem some information exists of which the resulting MAC address is derived somehow, as I did clone the root filesystem off another machine, which probably is the one which ends up having the same MAC address for its bonding device. I just don't seem to be able to find that bit of information.
Changing the MAC address of the underlying devices through /etc/conf.d/net didn't have any effect on the bonding device.

Any ideas?

Thanks,
onlinefloh
Back to top
View user's profile Send private message
Ralphred
l33t
l33t


Joined: 31 Dec 2013
Posts: 732

PostPosted: Sun Feb 23, 2025 4:13 pm    Post subject: Reply with quote

Quote:
If I understand the bonding process correctly, it SHOULD take the MAC address of the first interface and assign that to all the slaves of the bond.
The linux bonding driver mac assignment has always been pseudo random IME*, which is maybe why someone has statically set the mac address. For netifrc it's set through
/etc/conf.d/net:
mac_bond0="12:34:56:78:9a:bc"
other management systems vary but grep -iR "<offending mac address>" /etc/ should (eventually) find your config file if you are totally in the dark.

*Most of the bonding I do is to allow wifi enabled devices to plug into/out of switches for "upgraded" connectivity - this leaves me with a "working config snippet" that just gets the mode altered when I do any "proper LACP". If no slaves have a have a link up when the bond becomes active, then it gets a random mac - you can imagine how this is less than optimal with the unpredictable carrier state of "my" slaves.
RedHat even have docs on this, which seems wise when a missing "portfast" can mess up your whole downstream config...
Back to top
View user's profile Send private message
onlinefloh
n00b
n00b


Joined: 02 May 2009
Posts: 29

PostPosted: Sun Feb 23, 2025 6:30 pm    Post subject: Reply with quote

Ralphred wrote:
Quote:
If I understand the bonding process correctly, it SHOULD take the MAC address of the first interface and assign that to all the slaves of the bond.
The linux bonding driver mac assignment has always been pseudo random IME*, which is maybe why someone has statically set the mac address. For netifrc it's set through
/etc/conf.d/net:
mac_bond0="12:34:56:78:9a:bc"

Oh, thanks for pointing that one out. Didn't even think of the possibility to set the MAC adress for the bond itself, after setting the MAC of the salves didn't exhibit any effect whatsoever...
And of course this turned out to make the problem disappear.

Quote:
other management systems vary but grep -iR "<offending mac address>" /etc/ should (eventually) find your config file if you are totally in the dark.

This however is amng the first things I tried. Came up empty-handed there.

Still I'd love to know how the weird MAC address came into being in the first place.

If there was a straightforward way to make regular NFS mounts work across a set of IP addresses, I wouldn't even bother with LACP. Multipath TCP seems promising in principle, but I haven't found out yet how to enable that one for NFS. Or any other network filesystem for that matter.
Back to top
View user's profile Send private message
Ralphred
l33t
l33t


Joined: 31 Dec 2013
Posts: 732

PostPosted: Sun Feb 23, 2025 7:38 pm    Post subject: Reply with quote

onlinefloh wrote:
Came up empty-handed there.
Odd unless both machines managed to create the same random mac. The only other places I can think to look for mac assignment are udev rules or the kernel commandline...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum