Operating System - Linux
1748255 Members
3940 Online
108760 Solutions
New Discussion

Re: NIC Teaming in RHEL 6

 
rhel6_cluster
Advisor

NIC Teaming in RHEL 6

Hi all,

 

I have connected total 8 NIC available in my system. I would like to Team these nic and use only 2 pair of it. How can i do NIC Teaming in RHEL 6 ? or do i need to add HP software ?

My Server is BL 460 G7.

 

Thanks!

6 REPLIES 6
Matti_Kurkela
Honored Contributor

Re: NIC Teaming in RHEL 6

In Linux, this is known as "Bonding" and it can be done with no additional software.

 

Please see RHEL 6 documentation:

https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Using_Channel_Bonding.html

MK
rhel6_cluster
Advisor

Re: NIC Teaming in RHEL 6

I have two bonding:

bond0 and bond1

bond0 has eth0 and eth1

bond1 has eth2 and eth2.

/etc/ifcfg-bond0:

DEVICE=bond0

BOOTPROTO=none

ONBOOT=yes

IPADDR=192.168.24.32

NETMASK=255.255.255.0

GATEWAY=192.168.24.1

ONBOOT=yes

USERCTL=no

 

/etc/ifcfg-bond1:

DEVICE=bond1

BOOTPROTO=none

ONBOOT=yes

IPADDR=192.168.25.132

NETMASK=255.255.255.192

ONBOOT=yes

USERCTL=no

 

/etc/modbrobe.d/modprobe.conf

alias bond0 bonding

options bond0 miimon=80 mode=1

alias bond1 bonding

options bond1 miimon=80 mode=1

 

Now i can ping 24.X and 25.X from the server but when i check my ifconfig:

I see eth0 has 192.168.25.132 , also eth1 . but bond0 shows 192.168.24.32 where as bond1 shows 192.168.25.132

 

My understanding is eth0 and eth1 should shows 24.132 where as eth2 and eth3 should shows 25.132 isn't it? (eth2 and eth3 are showing 25.132)

May i know what have i made wrong?

 

Thanks!

 

 

 

 

 

 

Matti_Kurkela
Honored Contributor

Re: NIC Teaming in RHEL 6

Please show the complete "/sbin/ifconfig" output if possible.

The contents of /proc/net/bonding/bond0 and /proc/net/bonding/bond1 might be informative too.

 

In your case, I think something is wrong with the /etc/sysconfig/network-scripts/ifcfg-eth* files.

 

When you are using bonding, the configuration of the bonded ethN interfaces (i.e. the /etc/sysconfig/network-scripts/ifcfg-ethN files) should be like this:

DEVICE=ethN
HWADDR=<whatever>
BOOTPROTO=none
ONBOOT=yes
USERCTL=no SLAVE=yes MASTER=bondN

 Note that there should be no IPADDR, NETMASK or GATEWAY parameters for the slaved eth* devices at all.

 

In RHEL 5 & 6, RedHat recommends to put the bonding options to a BONDING_OPTS= line in ifcfg-bondN file instead of using the "options" lines in modprobe.conf. In other words, you should add this line to your ifcfg-bond0 and ifcfg-bond1 files:

BONDING_OPTS="miimon=80 mode=1"

 Then you can remove the "options bond..." lines from modprobe.conf. The "alias" lines are still required.

This change allows you to see the complete configuration of a bonding device in a single ifcfg-bondN file, which is convenient.

MK
rhel6_cluster
Advisor

Re: NIC Teaming in RHEL 6

I also changed Bonding_OPTS to respective bond file but still the output is same :(

 

 

]# ifconfig -a
bond0     Link encap:Ethernet  HWaddr 80:C1:6E:69:24:90
          inet addr:192.168.24.32  Bcast:192.168.24.255  Mask:255.255.255.0
          inet6 addr: fe80::82c1:6eff:fe69:2490/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:268946 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4235 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:17000176 (16.2 MiB)  TX bytes:448683 (438.1 KiB)

bond1     Link encap:Ethernet  HWaddr 80:C1:6E:69:24:91
          inet addr:192.168.25.132  Bcast:192.168.25.191  Mask:255.255.255.192
          inet6 addr: fe80::82c1:6eff:fe69:2491/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:53821 errors:0 dropped:0 overruns:0 frame:0
          TX packets:254 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5799984 (5.5 MiB)  TX bytes:26319 (25.7 KiB)

eth0      Link encap:Ethernet  HWaddr 80:C1:6E:69:24:90
          inet addr:192.168.25.132  Bcast:192.168.25.191  Mask:255.255.255.192
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:136483 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4165 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8723075 (8.3 MiB)  TX bytes:441878 (431.5 KiB)

eth1      Link encap:Ethernet  HWaddr 80:C1:6E:69:24:94
          inet addr:192.168.25.132  Bcast:192.168.25.191  Mask:255.255.255.192
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:132463 errors:0 dropped:0 overruns:0 frame:0
          TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8277101 (7.8 MiB)  TX bytes:7657 (7.4 KiB)

eth2      Link encap:Ethernet  HWaddr 80:C1:6E:69:24:91
          inet addr:192.168.25.132  Bcast:192.168.25.191  Mask:255.255.255.192
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:26883 errors:0 dropped:0 overruns:0 frame:0
          TX packets:182 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2898308 (2.7 MiB)  TX bytes:18662 (18.2 KiB)

eth3      Link encap:Ethernet  HWaddr 80:C1:6E:69:24:95
          inet addr:192.168.25.132  Bcast:192.168.25.191  Mask:255.255.255.192
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:26938 errors:0 dropped:0 overruns:0 frame:0
          TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2901676 (2.7 MiB)  TX bytes:7657 (7.4 KiB)

My /proc/net/bonding/bond0 :
Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)

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

Slave Interface: eth0
MII Status: up
Speed: 5000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 80:c1:6e:69:24:90
Slave queue ID: 0

 

Slave Interface: eth1
MII Status: up
Speed: 5000 Mbps
Duplex: full
Link Failure Count: 1
/proc/net/bonding/bond0

 

My /proc/net/bonding/bond1 :
Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)

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

Slave Interface: eth2
MII Status: up
Speed: 5000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 80:c1:6e:69:24:91
Slave queue ID: 0

Slave Interface: eth3
MII Status: up
Speed: 5000 Mbps
Duplex: full
Link Failure Count: 0

 

ifcfg-bond0

DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.24.32
NETMASK=255.255.255.0
GATEWAY=192.168.24.1
ONBOOT=yes
USERCTL=no
Bonding_OPTS="miimon=80 mode=1"

 

ifcfg-etho
DEVICE=eth0
HWADDR=80:c1:6e:69:24:90
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes

 

ifcfg-eth1
DEVICE=eth1
HWADDR=80:c1:6e:69:24:90
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes

GizemIremKozan
Occasional Contributor

Re: NIC Teaming in RHEL 6

eth1 and eth3 don't have their mac addresses correct; have you restarted network service? Of course, you may loose connection because the routing table will be empty.

rhel6_cluster
Advisor

Re: NIC Teaming in RHEL 6

After i turn off NetworkManager it was corrected!