Bond Interfaces (Link Aggregation) in VyOS
A bond (bonding) combines several physical network interfaces into a single logical interface to increase throughput and provide fault tolerance.
Overview
A bond provides:
- Increased throughput - link aggregation
- Fault tolerance - automatic failover
- Load balancing - traffic distribution
- Redundancy - link backup
Also known as:
- Link Aggregation
- Port Channel
- EtherChannel (Cisco)
- LAG (Link Aggregation Group)
- NIC Teaming
Bonding Modes
802.3ad (LACP)
IEEE 802.3ad Dynamic Link Aggregation - the standard aggregation protocol.
set interfaces bonding bond0 mode '802.3ad'
commitCharacteristics:
- Requires LACP support on the switch
- Automatic detection and configuration
- Load balancing
- Failover on link failure
- Uses all active links
When to use:
- Modern managed switches
- Standard aggregation is needed
- Dynamic configuration is required
active-backup
Only one interface is active; the rest are on standby.
set interfaces bonding bond0 mode 'active-backup'
commitCharacteristics:
- The simplest mode
- Does not require switch support
- Failover only (no load balancing)
- Fast switchover on failure
When to use:
- The switch does not support aggregation
- Only fault tolerance is needed
- Simple configuration
balance-rr (Round-Robin)
Sequential packet transmission across all interfaces.
set interfaces bonding bond0 mode 'balance-rr'
commitCharacteristics:
- Load balancing
- Failover
- May cause packet reordering
- Does not require switch support
When to use:
- Local connection (no switch)
- Testing
balance-xor
Hash-based balancing (MAC, IP).
set interfaces bonding bond0 mode 'balance-xor'
set interfaces bonding bond0 hash-policy 'layer2+3'
commitCharacteristics:
- Hash-based balancing
- Failover
- Predictable distribution
- Does not require LACP
When to use:
- Switch without LACP
- Balancing without a protocol is needed
broadcast
Transmission on all interfaces simultaneously.
set interfaces bonding bond0 mode 'broadcast'
commitCharacteristics:
- Traffic duplication
- Maximum fault tolerance
- No throughput increase
- Consumes more resources
When to use:
- Critical systems
- Specific requirements
balance-tlb (Transmit Load Balance)
Outbound traffic balancing without a protocol.
set interfaces bonding bond0 mode 'balance-tlb'
commitCharacteristics:
- TX balancing
- Failover
- Does not require switch support
- RX on a single interface
When to use:
- More outbound traffic
- Switch without aggregation
balance-alb (Adaptive Load Balance)
Balancing of both inbound and outbound traffic.
set interfaces bonding bond0 mode 'balance-alb'
commitCharacteristics:
- TX and RX balancing
- Uses ARP negotiation
- Does not require switch support
- IPv4 only
When to use:
- Two-way balancing
- Switch without LACP
- IPv4 traffic only
Basic Configuration
Creating a bond interface
set interfaces bonding bond0 mode '802.3ad'
set interfaces bonding bond0 member interface eth1
set interfaces bonding bond0 member interface eth2
commitIP addressing
set interfaces bonding bond0 address 192.168.1.1/24
set interfaces bonding bond0 address 2001:db8::1/64
commitDescription
set interfaces bonding bond0 description 'Bonded uplink to core switch'
commitConfiguration Parameters
Member Interfaces
Adding physical interfaces:
set interfaces bonding bond0 member interface eth0
set interfaces bonding bond0 member interface eth1
set interfaces bonding bond0 member interface eth2
commitAll member interfaces must have identical parameters (speed, duplex).
Hash Policy
The traffic distribution algorithm (for 802.3ad, balance-xor):
set interfaces bonding bond0 hash-policy 'layer2+3'
commitOptions:
- layer2 - uses MAC addresses (default)
- layer2+3 - uses MAC + IP addresses
- layer3+4 - uses IP + ports (TCP/UDP)
Recommendation: layer2+3 or layer3+4 for better balancing.
LACP Rate
The LACP packet frequency (for 802.3ad only):
set interfaces bonding bond0 lacp-rate 'fast'
commitValues:
- slow - LACP every 30 seconds (default)
- fast - LACP every second (fast failure detection)
Recommendation: fast for critical systems.
Minimum Links
The minimum number of active links:
set interfaces bonding bond0 min-links 1
commitThe bond will be UP only if at least the specified number of member interfaces are active.
Primary Interface
The preferred interface (for active-backup):
set interfaces bonding bond0 mode 'active-backup'
set interfaces bonding bond0 primary eth0
commitARP Monitoring
Monitoring availability via ARP:
set interfaces bonding bond0 arp-monitor interval 100
set interfaces bonding bond0 arp-monitor target 192.168.1.254
commitParameters:
- interval - the check interval in milliseconds
- target - the IP address to monitor
An alternative to MII monitoring (default).
System MAC
The MAC address of the bond interface:
set interfaces bonding bond0 mac '00:50:56:00:00:01'
commitBy default, it uses the MAC of the first member interface.
VLAN on Bond
A bond can contain VLAN sub-interfaces:
set interfaces bonding bond0 vif 10 address 192.168.10.1/24
set interfaces bonding bond0 vif 10 description 'VLAN 10 - Management'
set interfaces bonding bond0 vif 20 address 192.168.20.1/24
set interfaces bonding bond0 vif 20 description 'VLAN 20 - Data'
commitConfiguration Examples
Basic 802.3ad (LACP) bond
Aggregation of two ports with LACP:
set interfaces bonding bond0 mode '802.3ad'
set interfaces bonding bond0 hash-policy 'layer2+3'
set interfaces bonding bond0 lacp-rate 'fast'
set interfaces bonding bond0 member interface eth0
set interfaces bonding bond0 member interface eth1
set interfaces bonding bond0 address 10.0.0.1/24
set interfaces bonding bond0 description 'Uplink to core switch'
commitActive-backup for fault tolerance
set interfaces bonding bond0 mode 'active-backup'
set interfaces bonding bond0 primary eth0
set interfaces bonding bond0 member interface eth0
set interfaces bonding bond0 member interface eth1
set interfaces bonding bond0 address 192.168.1.1/24
commitBond with 4 interfaces
set interfaces bonding bond0 mode '802.3ad'
set interfaces bonding bond0 hash-policy 'layer3+4'
set interfaces bonding bond0 lacp-rate 'fast'
set interfaces bonding bond0 member interface eth0
set interfaces bonding bond0 member interface eth1
set interfaces bonding bond0 member interface eth2
set interfaces bonding bond0 member interface eth3
set interfaces bonding bond0 min-links 2
set interfaces bonding bond0 address 10.0.0.1/24
commitBond with VLANs
# Bond interface
set interfaces bonding bond0 mode '802.3ad'
set interfaces bonding bond0 hash-policy 'layer2+3'
set interfaces bonding bond0 member interface eth0
set interfaces bonding bond0 member interface eth1
# VLANs on the bond
set interfaces bonding bond0 vif 100 address 192.168.100.1/24
set interfaces bonding bond0 vif 100 description 'VLAN 100 - Servers'
set interfaces bonding bond0 vif 200 address 192.168.200.1/24
set interfaces bonding bond0 vif 200 description 'VLAN 200 - Workstations'
commitBond in a Bridge
Bond as a bridge member for virtualization:
# Bond
set interfaces bonding bond0 mode '802.3ad'
set interfaces bonding bond0 member interface eth0
set interfaces bonding bond0 member interface eth1
# Bridge with the bond
set interfaces bridge br0 member interface bond0
set interfaces bridge br0 address 192.168.1.1/24
commitDual uplink with ARP monitoring
set interfaces bonding bond0 mode 'active-backup'
set interfaces bonding bond0 primary eth0
set interfaces bonding bond0 member interface eth0
set interfaces bonding bond0 member interface eth1
set interfaces bonding bond0 arp-monitor interval 100
set interfaces bonding bond0 arp-monitor target 10.0.0.254
set interfaces bonding bond0 address 10.0.0.1/24
commitSwitch Configuration
Cisco IOS/IOS-XE
interface Port-channel1
switchport mode trunk
switchport trunk allowed vlan 10,20,30
interface GigabitEthernet1/0/1
switchport mode trunk
switchport trunk allowed vlan 10,20,30
channel-group 1 mode active
interface GigabitEthernet1/0/2
switchport mode trunk
switchport trunk allowed vlan 10,20,30
channel-group 1 mode activeJuniper Junos
set interfaces ae0 aggregated-ether-options lacp active
set interfaces ae0 unit 0 family inet address 10.0.0.2/24
set interfaces ge-0/0/0 ether-options 802.3ad ae0
set interfaces ge-0/0/1 ether-options 802.3ad ae0Arista EOS
interface Port-Channel1
switchport mode trunk
switchport trunk allowed vlan 10,20,30
interface Ethernet1
channel-group 1 mode active
interface Ethernet2
channel-group 1 mode activeHP/Aruba
trunk 1-2 trk1 lacp
vlan 10 tagged trk1
vlan 20 tagged trk1Operational Commands
Viewing bond interfaces
All bond interfaces:
show interfaces bondingA specific bond:
show interfaces bonding bond0Detailed information:
show interfaces bonding bond0 detailExample output:
bond0: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 state UP
address: 00:0c:29:ab:cd:ef
mode: 802.3ad
hash-policy: layer2+3
lacp-rate: fast
min-links: 1
member interfaces:
eth0: <SLAVE,UP> speed 1000 duplex full
eth1: <SLAVE,UP> speed 1000 duplex fullLACP information
show interfaces bonding bond0 lacpStatus of slave interfaces
show interfaces bonding bond0 slavesMonitoring and Diagnostics
Checking LACP negotiation
show interfaces bonding bond0 lacp detailCheck:
- Actor and Partner system ID
- LACP activity
- The Aggregator ID is the same for all ports
Checking load balancing
show interfaces bonding bond0 statisticsTraffic should be distributed across the member interfaces.
Testing failover
Disable one member interface:
set interfaces ethernet eth0 disable
commitCheck the bond:
show interfaces bonding bond0Re-enable it:
delete interfaces ethernet eth0 disable
commitTroubleshooting
Bond does not come up
Check the member interfaces:
show interfacesAll member interfaces must be UP.
Check the configuration:
show configuration interfaces bonding bond0LACP is not working
Check the switch:
- LACP is enabled on the ports
- The ports are in the same port-channel
- LACP mode: active or passive
Check LACP on VyOS:
show interfaces bonding bond0 lacpNo traffic balancing
Check the hash-policy:
show configuration interfaces bonding bond0 hash-policyTry a different hash-policy:
set interfaces bonding bond0 hash-policy 'layer3+4'
commitMake sure there is diversity in the hash (different IPs, MACs, ports).
Frequent failovers
Check the cables and interfaces:
show interfaces ethernet eth0 physicalIncrease the LACP rate (if slow is used):
set interfaces bonding bond0 lacp-rate 'fast'
commitMTU mismatch
Set the same MTU on all member interfaces and the bond:
set interfaces bonding bond0 mtu 9000
commitMember interfaces inherit the MTU from the bond.
Performance
Maximum throughput
A bond increases the aggregate bandwidth:
- 2x1G ports = ~2 Gbps
- 4x1G ports = ~4 Gbps
- 2x10G ports = ~20 Gbps
Important: A single flow (one TCP session) will not exceed the speed of a single member interface due to hashing.
Hash Policy for better balancing
- layer2 - good for different MACs
- layer2+3 - better for different IPs
- layer3+4 - best for many TCP/UDP connections
Jumbo Frames
For high-performance networks:
set interfaces bonding bond0 mtu 9000
commitAll member interfaces and the switch must support jumbo frames.
Security
MAC Spoofing Protection
A bond uses a single MAC address for all member interfaces.
LACP Authentication
VyOS does not support LACP authentication (802.1X). Use physical security and port security on the switch.
Best Practices
- Use 802.3ad (LACP) - standard and reliable
- Identical interfaces - the same speed/duplex for all members
- LACP fast mode - for fast failover
- Min-links - set a minimum number of active links
- Hash-policy layer3+4 - for better balancing
- Monitoring - track the status of member interfaces
- Backup - save the configuration
- Test failover - verify switchover
- Same MTU - on all members
- Document - which ports belong to which bond
Limitations
- Maximum throughput is limited by the sum of the member interfaces
- A single TCP connection will not exceed the speed of a single interface
- LACP requires switch support
- Not all modes support RX balancing
Migration from a Single Interface to a Bond
- Create a bond with a new name
- Move the IP configuration to the bond
- Add the member interfaces
- Test
- Remove the old configuration
Next Steps
- Bridge - using a bond in a bridge
- VLAN - VLANs on a bond
- High Availability - bonds for HA
- Firewall - protecting bond traffic