• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Configure Interface bonding (NIC Teaming) on Oracle Linux 6

by admin

This is a short howto post on configuring interface bonding on oracle enterprise Linux 6. The names of the network interfaces have changed in Oracle Linux 6. For example, it starts from em1, so eth0 = em1, eth1 = em2. And For Intel 10 Gb it is p3p1, p3p2, p4p1, p4p2 and so on. The following steps are based on p3px interface names, you can replace p3px with the network interface on your system.

1. Check current configuration

Check the network interface name on the system, for example p3pX or emX

# ifconfig -a

2. Configure bonding driver

Configuration file /etc/modprobe.conf is deprecated on Oracle Linux 6 and configuration files are in directory /etc/modprobe.d. Create a new file bonding.conf in directory /etc/modprobe.d to tell the kernel that it should use the bonding driver for new device bond0.

# grep bond0 /etc/modprobe.d/bonding.conf
alias bond0 bonding

The max_bonds parameter is not interface specific which should be specified in /etc/modprobe.d/bonding.conf. Do not set max_bonds parameter when using ifcfg-bondN files with the BONDING_OPTS directive .

3. Configure under-layer interfaces

Next step is to configure the slave interfaces of the bonding interface. Foe that we will edit the respective network script files and add below configuration.

# cat /etc/sysconfig/network-scripts/ifcfg-p3p1
DEVICE=p3p1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
# cat /etc/sysconfig/network-scripts/ifcfg-p3p2
DEVICE=p3p2
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes

4. Configure bonding interface with bonding parameters

Add the below setting into the bond configuration file. You can set the BONDING_OPTS in this file as well to specify settings such as bonding mode.

# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
MASTER=yes
BOOTPROTO=dhcp
ONBOOT=yes
BONDING_OPTS="mode=4 miimon=100 lacp_rate=1"

5. Activate bonding interface

As a final step, activate the bonding interface using ifup command.

# ifup bond0

Verify the setup

Once you have successfully configured the bonding interface, you can verify the configuration using commands given below. First check if the bonding module is loaded or not.

# lsmod |grep bond
bonding               122351  0

To view the current status of the bonding interface and its slave interface you can use the file /proc/net/bonding/bond0.

# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: p3p1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: p3p1
MII Status: up
Speed: 100 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0e:0c:70:05:ac
Slave queue ID: 0
...
NOTE: On OL6/RHEL6, configure bonding parameters in ifcfg-bondX instead of being in file /etc/modprobe.d/bonding.conf. The benefit is that those parameters could be changed per bonding interface during the interface initialization process, rather than the bonding driver initialization process. That is to say, parameter change does not require the bonding driver to be reloaded anymore. This helps to reduce the system-wide network outage while doing some small changes at the bonding interfaces.
CentOS / RHEL 7 : How to configure Network Bonding or NIC teaming
Red Hat / CentOS : How to create interface / NIC bonding
RedHat / CentOS : How to change currently active slave interface of bonding online

Filed Under: Linux, OEL 6

Some more articles you might also be interested in …

  1. slop: command not found
  2. smbget Command Examples in Linux
  3. vgs: command not found
  4. s2i: command not found
  5. How to Increase the File Download Size Limit in Apache
  6. parted: command not found
  7. How to schedule Jobs with Cron in Linux
  8. Linux OS Service ‘network’
  9. kill: command not found
  10. wg: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • “aws s3 mv” Command Examples
  • “aws s3 mb” Command Examples
  • “aws s3 ls” Command Examples
  • “aws s3 cp” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright