2

Is it possible to bond virtual network interfaces? If yes, how?

Bonding of physical interfaces is explained here for example: https://wiki.linuxfoundation.org/networking/bonding

My situation is this: I have a host with 10 physical ethernet interfaces (NICs). Each of those is a trunk for multiple VLANs. I plan to make a virtual ethernet interface on each physical interface for each VLAN. Example: eth0 carries 3 VLANs (3,11,15) -> I create eth0.0 (VLAN3), eth0.1(VLAN11) and eth0.2(VLAN15).

I further want to include some redundancy. I think of the bonding mode "active backup". The idea was to bond multiple virtual interfaces, which belong to different physical interfaces, e.g. eth0.5, eth2.3 and eth8.4. Since this is a bigger project I wanted to make sure this works beforehand. If this works in general, do the bonded virtual interfaces have to have the same VLAN ID, i.e. would it work if (in the example above) eth0.5 had VLAN 22, eth2.3 VLAN 42 and eth8.4 VLAN 52?

3
  • I added additional information, hope this helps/ makes it more clear. – kiigass Apr 22 '18 at 11:04
  • 1
    For bonding, all the interfaces participating in the bond should have the same VLAN assignments (either single VLANs or trunks of identical composition), or else what you're setting up is going to be a trouble generator. An active-backup bond will switch from one member to another when it detects a loss of link or a specified MAC address stops responding to ARP requests. The layers "above" the bond are not supposed to need to change their configuration when the bond switches to a new member: this is only possible if all the members of a bond have the same VLAN connectivity. – telcoM Apr 22 '18 at 11:41
  • Unfortunately, that's not possible. The physical interfaces are connected to defined nets and hosts. I cannot change anything regarding that. Also the VLANs are predefined. I have basically 2 hosts which are connected via three different VLANs and nets. My goal is to have a backup connection, if the primary connection fails. That's why I thought of bonding with active backup. From your comments I understand bonding of virtual interfaces is basically possible, if they have the same VLAN configuration? – kiigass Apr 22 '18 at 19:37
1

The answer is: Yes it is possible. At least with RedHat, where the bonding of virtual interfaces works the same way as the bonding of physical interfaces. It is even possible to bond (mode=broadcast) virtual interfaces which are configured for different Vlan-IDs. The result is that the packages sent to the bonding interface appear on all bonded Vlans each with the correct Vlan-ID.

Note that this is not officially supported by RedHat6. It not known to me whether it is officially supported in RedHat7.

2
  • This statement is confusing and nonsensical, please clarify: "The result is that the packages sent to the bonding interface appear on all bonded Vlans each with the correct Vlan-ID." – Brett Holman Oct 14 '20 at 23:53
  • I think I meant this: Let the server be foo and there are multiple virtual network interfaces with vlan configured on foo. The names of these vlans are bar1, bar2, ... Then you create a bond of the mentioned virtual interfaces: foobond. When foo now puts a package on the stack of foobond, the package will be duplicated on each virtual interface, each time with the corresponding vlan-id (bar1, bar2,...). The bottom line is: It surprised me that it worked and how it worked. I can hardly image a use case for this. – kiigass Feb 1 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.