Check bonding
lsmod | grep 8021q
Disable?
Please ENABLE
echo 8021q >> /etc/modules-load.d/8021q.conf
enable
modprobe --first-time 8021q
Check
lsmod | grep 8021q 8021q 32768 0 garp 16384 1 8021q mrp 20480 1 8021q
What is bonding?Bonding in Linux refers to the process of combining multiple network interfaces into a single logical interface for redundancy or increased bandwidth. This can be useful when you want to ensure that your server remains connected even if one physical link fails.
Steps to configure bonding on CentOS 7:
- Install necessary packages:sudo yum install -y net-tools
- Create bond configuration file:Create a new file
/etc/sysconfig/network-scripts/ifcfg-bond0
with the following content:DEVICE=bond0NAME=»bond0″TYPE=BondBONDING_MASTER=yesIPADDR=<IP_ADDRESS>NETMASK=<NETMASK>ONBOOT=yesBOOTPROTO=noneZONE=publicUSERCTL=noDNS1=<DNS_SERVER_1>DNS2=<DNS_SERVER_2> - Configure slave interfaces:Edit the existing interface files (
/etc/sysconfig/network-scripts/ifcfg-ethX
) and add the following lines:SLAVE=yesMASTER=bond0ONBOOT=yesBOOTPROTO=none - Restart networking service:sudo systemctl restart network
- Verify bonding setup:Check the status using
cat /proc/net/bonding/bond0
.
Configuring Arista Switches
Arista switches support various types of LACP configurations which are used for bonding links between devices. Here’s how to set up LACP on an Arista switch:
- Enable LACP globally:configure terminallacp system-priority <PRIORITY_VALUE>exit
- Create an EtherChannel bundle:interface Port-Channel<X>description <DESCRIPTION>no shutdownswitchport mode trunk
- Add member ports to the bundle:For each port to be added to the bundle:interface Ethernet<X>channel-group <PORT_CHANNEL_ID> mode active
- Verify configuration:Use commands like
show etherchannel summary
,show lacp neighbors
, etc., to verify the configuration.
Configuring MikroTik Router
On MikroTik routers, you can use bonding through Bridge Interface Bonding feature.
- Create a bridge interface:Go to Interfaces > Bridges, click on + to create a new bridge.
- Add slave interfaces:Add all desired interfaces as members of this bridge by clicking on the bridge name and then adding them under the Members tab.
- Set the protocol:Set the appropriate protocol such as Static bonding or Dynamic bonding depending on your requirements.
- Apply settings:Click Apply after making changes.
- Monitor performance:You can monitor the bonding activity via the Tools > Monitor section within the router’s web UI.
By following these steps, you should have successfully configured bonding across different platforms including CentOS 7 servers, Arista switches, and MikroTik routers.