I hope I didn't miss a bug report regarding this topic. We recently switched from VyOS 1.3 to 1.4.2 and encountered the following behavior change regarding interface bonding and MAC addresses:
In VyOS 1.4.2, the Ethernet interfaces generally use their normal hardware MAC address, which is also visible as the "hw-id" in the configuration. However, if you create an interface bond, it is created with a synthetic MAC address instead of using one of the hardware MACs, which was the behavior in VyOS 1.3.
However, if you then set the mode to 802.3ad in the configuration, the hardware MAC of the first involved Ethernet interface is used again, even though this mode is actually the default mode.
If you then reboot VyOS with "mode 802.3ad" in the bond configuration, a synthetic MAC is created again after the reboot. If you delete the bond mode from the bond configuration afterwards, a hardware MAC is used again.
We actually only noticed this after an update because we could no longer reach some targets due to a MAC address filter elsewhere. While one can probably debate whether a synthetic MAC address is fundamentally the best solution for a bond interface, it would at least be good if the behavior were consistent at all times.
Without bond:
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down Interface IP Address MAC VRF MTU S/L Description ----------- ------------ ----------------- ------- ----- ----- ------------- eth0 - 08:00:27:31:0e:3e default 1500 u/u eth1 - 08:00:27:36:2c:6e default 1500 u/D eth2 - 08:00:27:f1:aa:bd default 1500 u/D eth3 10.0.5.15/24 08:00:27:0d:f9:78 default 1500 u/u
With two member interfaces, no other options set:
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down Interface IP Address MAC VRF MTU S/L Description ----------- ------------ ----------------- ------- ----- ----- ------------- bond0 - e6:58:54:0a:d8:43 default 1500 u/u eth0 - e6:58:54:0a:d8:43 default 1500 u/u eth1 - e6:58:54:0a:d8:43 default 1500 u/u eth2 - 08:00:27:f1:aa:bd default 1500 u/D eth3 10.0.5.15/24 08:00:27:0d:f9:78 default 1500 u/u
With bond mode 802.3ad configured (but without reboot):
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down Interface IP Address MAC VRF MTU S/L Description ----------- ------------ ----------------- ------- ----- ----- ------------- bond0 - 08:00:27:31:0e:3e default 1500 u/u eth0 - 08:00:27:31:0e:3e default 1500 u/u eth1 - 08:00:27:31:0e:3e default 1500 u/u eth2 - 08:00:27:f1:aa:bd default 1500 u/D eth3 10.0.5.15/24 08:00:27:0d:f9:78 default 1500 u/u
Testing is easy with a default config and more than one Ethernet interface. Just create a bond with
set interfaces bonding bond0 member interface eth0 set interfaces bonding bond0 member interface eth1
and you can see the synthetic MAC. Set the mode with
set interfaces bonding bond0 mode 802.3ad
and you can see the hardware MAC being used. After a reboot with the bond mode configured, you can see the synthetic MAC again, as described above. You can then remove the bond mode and you have a hardware MAC in use again.
We temporarily solved this problems for now by setting the MAC of the bond interface to the actual hardware MAC of our eth0.