Skip to main content

Command Palette

Search for a command to run...

NIC Bonding and Everything you need to know using RHEL 9

Published
2 min read
NIC Bonding and Everything you need to know using RHEL 9
R

I am an aspiring web developer who enjoys connecting the dots: be it ideas from different disciplines, people from different teams, or applications from different industries. I have strong technical skills and an academic background in engineering, development, and devops.

My passion lies in solving business problems with tailored designs and development and communicating complex ideas to non-technical stakeholders. I am able to jump across verticals to deliver high-performing web solutions.

In my graduate studies, I’ve taken on various leadership roles, including being a part of a techno-environmental club and the deemed innovation and incubation cell, coordinating institute-wide events for hundreds of people, and leading two clubs.

I'm graduating in June 2024 and I'm interested in the full-time cloud or DevOps engineer roles. Please feel free to get in touch with me via email at rishitashaw49@gmail.com.

NIC Network interface cards (NICs) enable computers to connect to a network by installing hardware components, usually circuit boards or chips. In addition to supporting I/O interrupts, direct memory access (DMA) interfaces, data transmission, network traffic engineering, and partitioning, modern NICs also provide computers with a number of other functions.

To find info about your NIC use the command and sign in as the root user.

ethtool <INTERFACE_NAME>

Now, to know your NIC name use the command ifconfig. There are several NICs like lo, virbr0, etc. but we want to take the first one that comes on.

ifconfig | more

ifconfig

Here our NIC is enp0s3, Now use the command ethtool enp0s3

ethtool

now that you have the network information, you should see a few of the things mentioned like link modes, speed, duplex, etc.

NIC Bonding Now that you know what NIC is, let’s dive into NIC bonding also known as network bonding. It can be defined as the aggregation and combination of multiple NICs into a single bond interface. Its main purpose is to provide high availability and redundancy.

How to do NIC Bonding? Make sure you've enabled two or more network adapters from Virtual Box settings

  • Add a new NIC if it does not exist
  • Install bonding driver = modprobe bonding
  • To list the bonding module info = modinfo bonding You will see the driver version as seen below if the driver is installed and loaded

driver

Create Bond Interface File vi /etc/sysconfig/network-scripts/ifcfg-bond0

Add the following parameters DEVICE=bond0 TYPE=Bond NAME=bond0 BONDING_MASTER=yes BOOTPROTO=none ONBOOT=yes IPADDR=192.168.1.80 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 BONDING_OPTS=”mode=5 miimon=100”

Save and exit the file

The bonding options details are can be found on the following table

NIC Bonding options

miimon Specifies the MII link monitoring frequency in milliseconds. This determines how often the link state of each slave is inspected for link failures

Edit the First NIC File (enp0s3) vi /etc/sysconfig/network-scripts/ifcfg-enp0s3

Delete the entire content Add the following parameters

TYPE=Ethernet BOOTPROTO=none DEVICE=enp0s3 ONBOOT=yes HWADDR=”MAC from the ifconfig command” MASTER=bond0 SLAVE=yes

Save and exit the file

Create the Second NIC File (enp0s8) or Copy enp0s3 vi /etc/sysconfig/network-scripts/ifcfg-enp0s8

Add the following parameters TYPE=Ethernet BOOTPROTO=none DEVICE=enp0s8 ONBOOT=yes HWADDR=”MAC from the ifconfig command” MASTER=bond0 SLAVE=yes Save and exit the file

Restart the Network Service systemctl restart network

Test and verify the configuration ifconfig or ifconfig | more

Use following command to view bond interface settings like bonding mode & slave interface cat /proc/net/bonding/bond0

That NIC Bonding complete overview on Red Hat Enterprise Linux operating system 9. If you like it do give a follow!

More from this blog

T

Technical Blogs with Rishita

16 posts

Crazy full stack web developer who wants to explore every tech stack