Fading Coder

One Final Commit for the Last Sprint

Home > Tech > Content

CentOS 7 Network Bonding Configuration Guide

Tech May 11 2

Overview

Setting up network bonding on CentOS 7 enhances redundancy and increases bandwidth by combining multiple network interfaces into a single logicall interface. This guide walks through the steps to configure a bonded interface using two physical NICs in mode 0 (balance-rr).

1. Verify System Support

Check if the system supports bonding by running:

modinfo bonding

If module information is displayed, the system is compatible with bonding.

2. Enstall Required Packages

Ensure that the bonding module and ifenslave utility are installed:

sudo yum install -y bonding ifenslave

3. Load Bonding Module

Create a configuration file at /etc/modprobe.d/bonding.conf and add:

alias bond0 bonding
options bonding mode=0 miimon=100

This sets the bonding mode to round-robin with a link monitoring interval of 100 milliseconds.

4. Configure Bond Interface

Create a configuration file for the bonded interface at /etc/sysconfig/network-scripts/ifcfg-bond0:

DEVICE=bond0
TYPE=Bond
NAME=bond0
BONDING_MASTER=yes
BOOTPROTO=none
ONBOOT=yes
BONDING_OPTS="mode=0 miimon=100"

5. Update Physical Interfaces

Edit the configuration files for each physical NIC (e.g., /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/sysconfig/network-scripts/ifcfg-eth1):

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes

Repeat the same for eth1 or adjust the name accordingly.

6. Restart Networking Service

Apply the changes by restarting the network service:

sudo systemctl restart network

7. Verify Configuration

Check the status of the bond using:

cat /proc/net/bonding/bond0

Ensure both interfaces are listed as active and the mode matches the configuration.

Related Articles

Understanding Strong and Weak References in Java

Strong References Strong reference are the most prevalent type of object referencing in Java. When an object has a strong reference pointing to it, the garbage collector will not reclaim its memory. F...

Comprehensive Guide to SSTI Explained with Payload Bypass Techniques

Introduction Server-Side Template Injection (SSTI) is a vulnerability in web applications where user input is improper handled within the template engine and executed on the server. This exploit can r...

Implement Image Upload Functionality for Django Integrated TinyMCE Editor

Django’s Admin panel is highly user-friendly, and pairing it with TinyMCE, an effective rich text editor, simplifies content management significantly. Combining the two is particular useful for bloggi...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.