LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-25-2011, 01:16 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 484

Rep: Reputation: 30
NIC bonding in RHEL 5.0


Dear Friends ,

I have to configure NIC bonding among two NICs in RHEL 5.
But it's not working . My physical cable is connecting with 'eth1' . After configuring Bonding , I have a look the below file :

>
[root@Muyang ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v2.6.3 (June 8, 2005)

Bonding Mode: transmit load balancing
Primary Slave: None
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:30:48:87:d5:42

Slave Interface: eth1
MII Status: down
Link Failure Count: 0
Permanent HW addr: 00:30:48:87:d5:43
-

Here the above file "Currently Active Slave: eth0" . But I want to active 'eth1' as Currently Active Slave . How can I do it ? plz help .. ...
 
Old 04-25-2011, 02:28 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

I haven't set up bonding much but I always needed both (or in my case all four) interfaces connected. Maybe that's your primary problem since you state you have your cable physically connected to eth1. Connect the second interface as well (without a connection how can you get traffic on that interface? Let alone bind it with another?).

Kind regards,

Eric
 
Old 04-25-2011, 05:04 AM   #3
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 484

Original Poster
Rep: Reputation: 30
Bonding In RHEL 5 !

Thx ,

I have connected both cable with the two NIC . But the problem is , when a cable of a one NIC is removed (let , ETH0), then bond0 is not switched to another NIC (ETH1) , which is connected with another cable .

I get the NIC which is now actiove from below command from :


>
[root@Muyang ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v2.6.3 (June 8, 2005)

Bonding Mode: transmit load balancing
Primary Slave: None
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:30:48:87:d5:42

Slave Interface: eth1
MII Status: down
Link Failure Count: 0
Permanent HW addr: 00:30:48:87:d5:43


How I make auto switching between two NIC , when one NIC cable is removed .

Waiting for kind reply ... ...
 
Old 04-25-2011, 05:18 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

Now you're confusing me. As I understand NIC bonding it's to combine the two (or more) network interfaces to function as one but I've never set it up like you intend to. As indicated in your original post you indicated Bonding Mode: transmit load balancing. As far as I know you cannot have load balancing with only one active NIC. Can you explain what exactly it is you are trying to configure?

Kind regards,

Eric
 
Old 04-25-2011, 05:53 AM   #5
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 484

Original Poster
Rep: Reputation: 30
Bonding NIC in RHEL5 !!!

OK EricTRA , I tell u brief .

In RHEL 5 , I have to configure BOND using TWO NIC . Every NIC is connected with two different cables . My configuration files are :


[root@rpttst ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

[root@rpttst ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

[root@rpttst ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
IPADDR=192.168.0.57
NETMASK=255.255.255.0
ONBOOT=yes
BOOTPROTO=static
USERCTL=no
[root@rpttst ~]#

[root@rpttst ~]# modprobe bond0
[root@rpttst ~]# service network restart

Now I check which NIC card is active using the below command :
-----------
[root@rpttst ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: e4:1f:13:1a:17:00

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: e4:1f:13:1a:17:02
-------
Here, eth0 is currently active . now if I make eth0 down (ifdown eth0) it auto switches to 'eth1' . But my problem is :

If both NIC are up and 'eth0' is currently active , at that moment If i remove cable from the 'eth0' interface , then it is not auto switching to 'eth1' . It holds the 'eth0' active unless i manually shutdown the 'eth0' (like , ifdown eth0) .

so I need to know if cable are disconnected from one of a NIC (either 'eth0' or 'eth1') then how to I make auto switching to another active node .

Here, also I mention that, I tried it using 'mode=0' and 'mode=1' , but the problem is not solved . Hope Now I clear my problem .

Waiting for your kind reply ... ...

Last edited by shipon_97; 04-25-2011 at 05:55 AM.
 
Old 04-25-2011, 06:12 AM   #6
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

Now it's a bit clearer what you're trying to set up. Sorry for the misunderstanding. Try adding MODE=1 to your ethX configuration files and restart networking.

For your setup you need mode 1 I believe:
Quote:
mode=0 (balance-rr)
Round-robin policy: Transmit packets in sequential order from the first available slave through the last. This mode provides load balancing and fault tolerance.

mode=1 (active-backup)
One slave interface is active at any time. If one interface fails, another interface takes over the MAC address and becomes the active interface. Provides fault tolerance only. Doesn’t require special switch support

mode=2 (balance-xor)
Tranmissions are balanced across the slave interfaces based on ((source MAC) XOR (dest MAC)) modula slave count. The same slave is selected for each destination MAC. Provides load balancing and fault tolerance.

mode=3 (broadcast)
Transmits everything on all slave interfaces. Provides fault tolerance.

mode=4 (802.3ad)
This is classic IEEE 802.3ad Dynamic link aggregation. This requires 802.3ad support in the switch and driver support for retrieving the speed and duplex of each slave.

mode=5 (balance-tlb)
Adaptive Transmit Load Balancing. Incoming traffic is received on the active slave only, outgoing traffic is distributed according to the current load on each slave. Doesn’t require special switch support

mode=6 (balance-alb)
Adaptive Load Balancing - provides both transmit load balancing (TLB) and receive load balancing for IPv4 via ARP negotiation. Doesn’t require special switch support, but does require the ability to change the MAC address of a device while it is open.
Kind regards,

Eric
 
Old 04-25-2011, 07:22 AM   #7
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 484

Original Poster
Rep: Reputation: 30
Ok I have to configure the following way now :

[root@rpttst network-scripts]# cat ifcfg-eth0
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
MODE=1

[root@rpttst network-scripts]# cat ifcfg-eth1
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
MODE=1


[root@rpttst network-scripts]# cat /etc/modprobe.conf
alias eth0 bnx2
alias eth1 bnx2
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptsas
alias scsi_hostadapter2 qla2xxx
alias scsi_hostadapter3 usb-storage
alias usb0 cdc_ether
alias bond0 bonding
options bond0 miimon=100 mode=1

But the problem is not solved . when I remove the cable the problem remains same .
 
Old 04-25-2011, 07:36 AM   #8
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

The only thing I can think off more is to put:
Code:
NETWORK=192.168.0.0
in the bond0 specification. If you run ifconfig you should notice that the MAC address is assigned to all three interfaces and that eth0 and eth1 should be indicated as slave. Have a look at this site for a practical example.

Kind regards,

Eric
 
Old 12-24-2012, 08:49 AM   #9
salman108
LQ Newbie
 
Registered: Dec 2012
Posts: 14

Rep: Reputation: Disabled
Quote:
Originally Posted by shipon_97 View Post
Ok I have to configure the following way now :

[root@rpttst network-scripts]# cat ifcfg-eth0
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
MODE=1

[root@rpttst network-scripts]# cat ifcfg-eth1
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
MODE=1


[root@rpttst network-scripts]# cat /etc/modprobe.conf
alias eth0 bnx2
alias eth1 bnx2
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptsas
alias scsi_hostadapter2 qla2xxx
alias scsi_hostadapter3 usb-storage
alias usb0 cdc_ether
alias bond0 bonding
options bond0 miimon=100 mode=1

But the problem is not solved . when I remove the cable the problem remains same .
Hello,

Your bonding config is confusing your switch.
Where are both of your NICs getting terminated ? on the same switches ? or separate ?
if vlans are configured, which I hope they would be, are the same vlans available on both switches ?

Lastly, please remove the mode=1 from the ifcfg-ethX files.

in the modprobe.config files, try mode=5 or mode =6.

One of which will work.

cheers.
 
Old 12-24-2012, 12:01 PM   #10
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
Try with use_carrier=1 option in /etc/modprobe.conf,

options bond0 miimon=100 mode=1 use_carrier=1
 
Old 12-24-2012, 06:35 PM   #11
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,829

Rep: Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409
salman108 and vishesh
You do relies that the last post was on
04-25-11
it is now 12-24-12

a year and a half later
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NIC Bonding: Does not failover successfully. Only one NIC is active Akhran Debian 2 02-18-2011 08:26 PM
NIC bonding Winanjaya Linux - Networking 1 03-26-2010 07:48 AM
NIC Bonding on RHEL? carlosinfl Red Hat 1 09-17-2008 07:09 PM
NIC Bonding zimm247 Red Hat 1 06-28-2008 08:22 PM
NIC Bonding in RHEL question gn00kie Linux - Networking 2 01-31-2006 04:05 AM


All times are GMT -5. The time now is 12:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration