A Bonding Exercise | Random rants

submited by
Style Pass
2021-09-28 02:30:05

The other day a colleague and I were experimenting with bonding interfaces on a Debian Bullseye machine. At one point we tried restarting the networking service (systemctl restart networking) and noticed that the MAC address used by the bond0 interface was changed.

This felt weird. Why would a plain restart of the networking not result in a consistent outcome when compared with the state after a machine reboot?

To see it in action all you need to do is to install ifenslave and then modify /etc/network/interfaces to include bond settings as described in the Official Debian Configuration Example (of course with some tweaks to match your available interfaces etc). In my case it ended up looking like so:

... where enp0s3 is the interface I am reaching the machine over (so just ignore it below, is is not interesting for our purposes) and enp0s8 is an unused interface that will act as the bonding slave.

The important detail is that bond0 and enp0s8 has a made up MAC address of 42:e2:89:5b:6d:de, you can also see enp0s8 has a permaddr 08:00:27:e2:37:5f field, signifying that it is currently having it's MAC address overwritten by the made up address on bond0.

Leave a Comment