Network
Link aggregation
Link aggregation, which is also known as link bonding, joins multiple network interfaces to form a single, unified interface to:
- increase throughput, and/or
- provide redundancy in case one of the links fails.
Create a bonding Jump to heading
-
In the Services tab, click network setup to display the current configuration of your network interfaces.
In the example below, three network interfaces are defined:
lo
,eth0
, andeth1
.service network lo ip address 127.0.0. service network eth0 auto on ip autoconfig ip address 192.168.0.200/255.255.255.0 ip route default 192.168.0.1 service network eth1 auto on
service network lo ip address 127.0.0. service network eth0 auto on ip autoconfig ip address 192.168.0.200/255.255.255.0 ip route default 192.168.0.1 service network eth1 auto on
-
Remove any IP configuration from any interfaces you wish to bond together.
Info
When a network interface is part of a bond, it cannot have an IP configuration.
Below, we prepare to bond the
eth0
andeth1
interfaces by removing theip
rules from them.service network lo ip address 127.0.0.1/9 service network eth0 auto on service network eth1 auto on
service network lo ip address 127.0.0.1/9 service network eth0 auto on service network eth1 auto on
-
Use a
service network
section to create a new interface that will serve as the bonded interface. Inside:- Set the
bonding primary
directive to the name of the first interface. - Set the
slave
directive to the names of the interfaces that will be bonded. - Set the
ip address
directive to the IP address to bind to this new interface.
Below, we create a new interface named
bond0
.service network lo ip address 127.0.0.1/9 service network eth0 auto on service network eth1 auto on service network bond0 bonding primary eth0 slave eth0 eth1 ip address 172.16.24.237/24
service network lo ip address 127.0.0.1/9 service network eth0 auto on service network eth1 auto on service network bond0 bonding primary eth0 slave eth0 eth1 ip address 172.16.24.237/24
- Set the
-
Configure the bond mode. Set the
bonding mode
directive to one of the supported bonding mode values:-
To set up failover mode with one active interface at a time, create a
bond0
interface in active/passive mode on top of interfaceseth0
andeth1
:service network eth0 auto on service network eth1 auto on service network bond0 bonding primary eth0 slave eth0 eth1 ip address 172.16.24.237/24 bonding mode active-backup
service network eth0 auto on service network eth1 auto on service network bond0 bonding primary eth0 slave eth0 eth1 ip address 172.16.24.237/24 bonding mode active-backup
-
To set up IEEE 802.3ad (LACP) Dynamic link aggregation, create a
bond0
interface in active/active mode on top of interfaceseth0
andeth1
:service network eth0 auto on service network eth1 auto on service network bond1 bonding primary eth0 slave eth0 eth1 ip address 172.16.24.237/24 bonding mode 802.3ad
service network eth0 auto on service network eth1 auto on service network bond1 bonding primary eth0 slave eth0 eth1 ip address 172.16.24.237/24 bonding mode 802.3ad
-
-
Do one of the following:
- If you updated an existing bond interface, reload the network interface.
- If you created a new bond interface, restart the network interface.
-
To make your changes persistent after a reboot, click the Setup tab. Then click Save under Configuration.
Available settings Jump to heading
The following settings are available to configure the bonding interface:
Parameter | Description |
---|---|
slave <iface> <iface>... |
interfaces to add in the bond |
bonding primary <iface> |
primary slave for current bond |
bonding mode <mode> |
bonding mode (default: 1 or active-backup ) |
bonding updelay <ms> |
bonding delay check in ms (default: 1000 ) |
bonding downdelay <ms> |
bonding delay check in ms (default: 1000 ) |
Available modes Jump to heading
The following table shows which bonding modes are supported.
Mode number | Mode code | Description |
---|---|---|
O |
balance-rr |
Select output interfaces in a round-robin fashion. |
1 |
active-backup |
Failover mode with one active interface at a time. |
2 |
balance-xor |
Transmit based on MAC address. The default policy is a source+destination MAC address algorithm. You can select alternate transmit policies through the xmit-hash-policy directive. |
3 |
broadcast |
Not supported. |
4 |
802.3ad |
You can bundle several physical ports to form a single logical channel through the Link Aggregation Control Protocol (LACP), which is part of the IEEE specification 802.3ad. Prerequisites: - Ethtool support in drivers to retrieve the speed and duplex of each slave. - A switch that supports IEEE 802.3ad Dynamic link aggregation. |
5 |
balance-tlb |
Transmit load balancing. The outgoing interface is selected based on interfaces load. Prerequisites: - Ethtool support in drivers to retrieve the speed and duplex of each slave. |
6 |
balance-alb |
Adaptive load balancing; balance-tlb mode with a reception load balancing mode made using the ARP protocol. |
Troubleshooting Jump to heading
When the bonding configuration is correctly set up:
- The
bondX
interface has at least theMASTER
andMULTICAST
labels. - The
ethX
interfaces have at least theSLAVE
andMULTICAST
labels. - Both
bondX
and associatedethX
areUP
. - The
bondX
andethX
interfaces have the same MAC address.
Example:
bond0 Link encap:Ethernet HWaddr 00:0D:B9:13:52:2D inet addr:10.0.32.10 Bcast:0.0.0.0 Mask:255.255.0.0 UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) eth0 Link encap:Ethernet HWaddr 00:0D:B9:13:52:2D UP BROADCAST NOARP SLAVE MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:11 Base address:0x2000 eth1 Link encap:Ethernet HWaddr 00:0D:B9:13:52:2D UP BROADCAST NOARP SLAVE MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:12 Base address:0x4000
bond0 Link encap:Ethernet HWaddr 00:0D:B9:13:52:2D inet addr:10.0.32.10 Bcast:0.0.0.0 Mask:255.255.0.0 UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) eth0 Link encap:Ethernet HWaddr 00:0D:B9:13:52:2D UP BROADCAST NOARP SLAVE MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:11 Base address:0x2000 eth1 Link encap:Ethernet HWaddr 00:0D:B9:13:52:2D UP BROADCAST NOARP SLAVE MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:12 Base address:0x4000
Advanced parameter: xmit-hash-policy Jump to heading
When used in active/active mode (that is, bonding mode
is set to 802.3ad
), the choice of which network interface to use for outbound traffic is made using the destination MAC address.
In some cases, for example, when the traffic to your default gateway is higher than a single network interface capacity, you can change the xmit-hash-policy
by setting the /sys
parameter.
-
Add a
xmit-hash-policy
directive using the syntax below:bonding xmit_hash_policy <policyid>
bonding xmit_hash_policy <policyid>
The <policyid>
argument can have two values and describes the information used to compute the hash algorithm:
Value | Description |
---|---|
0 or layer2 |
Use the destination MAC address |
1 or layer3+4 |
When available, use source and destination IPs and ports |
Below, we change xmit_hash_policy
to 1
for bonding1
:
service network bond1 slave eth0 eth1 bonding primary eth0 bonding mode 802.3ad ip address 172.16.24.237/24 bonding xmit_hash_policy 1
service network bond1 slave eth0 eth1 bonding primary eth0 bonding mode 802.3ad ip address 172.16.24.237/24 bonding xmit_hash_policy 1
If you change the configuration, save the changes. To make your changes persistent after a reboot, click the Setup tab. Then click Save under Configuration.
Do you have any suggestions on how we can improve the content of this page?