Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 :
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 .. ...
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?).
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 :
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 .
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?
[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 .
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.
[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 .
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.
[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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.