Manage bonds
If you set up more Ethernet devices on the AWS Elemental Live node, you can optionally bond two devices.
You can bond Ethernet devices to suit your networking requirements.
For help creating and updating bonding files through the CLI, see Using the CLI
Important
We recommend that when setting up a bond, you set up both eth0 and eth1 with static IP addresses and with eth0, eth1 and bond0 all on the same subnet.
Creating a bond
Note
If you are using AWS Elemental Conductor Live, you might have already created bonds on that node. Note that the procedure for creating bonds is identical for both products.
Prerequisites
Before you begin this process, set up the individual Ethernet devices that you want to bond together.
Topics
Step A: Create bond configuration file
Create a configuration file for the bond interface and name it after the bond.
To create the bond configuration file
-
Create the file with the following command.
sudo vim /etc/sysconfig/network-scripts/
ifcfg-bond0
-
Insert the following settings in the file:
-
DEVICE
– Typebond0
. -
TYPE
– TypeBond
. -
NAME
– Provide a name for the bond that is unique among your bonded interfaces, such asbond0
. -
BONDING_MASTER
– Typeyes
. -
BOOTPROTO
– If you are using a static IP address for the bond, typenone
. If you are using DHCP, typedhcp
. -
ONBOOT
– Typeyes
. -
NM_CONTROLLED
– Typeno
. -
IPADDR
– When you are using a static IP address, complete with your networking information. -
NETMASK
– When you are using a static IP address, complete with your networking information. -
GATEWAY
– When you are using a static IP address, complete with your networking information. -
BONDING_OPTS
– Type the bonding mode you are using and other applicable options.
-
Bonding modes
The following table describes the bonding modes that are available.
Bonding mode option | Mode name | Description |
---|---|---|
mode=0 | Round robin | Transmissions are received and sent sequentially on each bonded interface, beginning with the first one available. |
mode=1 | Active backup | Transmissions are received and sent out via the first available bonded interface. The other interface is only used if the active interface fails. |
mode=2 | Balanced XOR | Using the exclusive-or (XOR) method, the interface matches up the incoming request's MAC address with the MAC address for one of the bonded interface NICs. When this link is established, transmissions are sent out sequentially, beginning with the first available interface. |
mode=3 | Broadcast | All transmissions are sent on all interfaces in the bond. |
mode=4 | IEEE 802.3ad dynamic link aggregation | This option creates aggregation groups that share the same speed and duplex settings. This transmits and receives on all interfaces in the active aggregator. Requires a switch that is 802.3ad compliant. |
mode=5 | Adaptive transmit load balancing | Outgoing traffic is distributed according to current load on each interface in the bond. Incoming traffic is received by the currently active interface. If the receiving interface fails, another interface takes over the MAC address of the failed interface. |
mode=6 | Adaptive load balancing | This option includes transmit and receive load balancing for IPV4 traffic. Receive load balancing is achieved through ARP negotiation. |
DEVICE=bond0 TYPE=Bond NAME=bond0 BONDING_MASTER=yes BOOTPROTO=none ONBOOT=yes NM_CONTROLLED=no IPADDR=192.168.1.70 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 BONDING_OPTS="mode=5 miimon=100"
Step B: Edit Ethernet interface configuration files
Access the configuration files for each of the interfaces that are participating in the bond. Add the following lines.
MASTER=bond0 SLAVE=yes
For help with creating and updating bonding files through the CLI, see Using the CLI
Step C: Restart the AWS Elemental service configuration files
Restart the AWS Elemental service using the following command.
sudo systemctl restart network
Step D: Verify the bond
Verify that your bond is running using the following command.
cat /proc/net/bonding/bond0
Example Functioning bond interface
[elemental@host~]$ cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) Bonding Mode: transmit load balancing Primary Slave: None Currently Active Slave: eth0 MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth0 MII Status: up Speed: 10000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:50:56:b8:64:44 Slave queue ID: 0 Slave Interface: eth2 MII Status: up Speed: 10000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:50:56:8d:8e:db Slave queue ID: 0 [elemental@host~]$
Modifying a bond
To modify a bond, follow the procedure for creating the bond, earlier in this section.
Don't use the web interface to change the bond or any part of the Ethernet devices.
Warning
The Devices page on the AWS Elemental Live web interface includes the pencil icon that lets you edit the Ethernet device. However, you must not use the web interface to modify devices because you will break the configuration.