Link to home
Create AccountLog in
Avatar of sunhux
sunhux

asked on

Centos Linux NIC bonding for load sharing


I followed the instructions in the link below & used mode=5
  http://wiki.centos.org/TipsAndTricks/BondingInterfaces

Q1:
Is mode=5 the right mode to use for link load sharing+redundancy

Q2:
After configuring on the servers' ports, "ifconfig -a" showed bond0
& eth0 are Up  but eth1 is not showing as Up.  When I connect only
eth0 to a link aggregated Cisco 2960 switch port, I could ping elsewhere
but if I connect only eth1, it could not ping (& ifconfig eth1  showed
eth1 is not UP.  What went wrong?

Q3:
What would be the setting (kindly provide exact commands) on the Cisco 2960
switches' ports for  the 2 NIC ports on my server to connect to obtain load
sharing & redundancy?

ASKER CERTIFIED SOLUTION
Avatar of Daniel McAllister
Daniel McAllister
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Steve Jennings
Steve Jennings

Thanks Dan
Avatar of sunhux

ASKER


/etc/sysconfig/network-scripts/ifcfg-eth1  is present all these while
& it contains the following 4 lines plus others as below:

DEVICE=eth1
BOOTPROTO=none
HWADDR=00:14:C2:5C:9B:E3
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
TYPE=Ethernet

Do I need to remove any of the above lines?

When doing "service network restart" got the following logs on the console:

Bringing up interface bond0: Device eth1 has different MAC adcdr than
expected, ignoring.

So what can I do about the message I'm seeing above?
Avatar of sunhux

ASKER


Now if I comment out (by preceding with # ) the line
HWADDR in ifcfg-eth1, I don't get the above message
during service network restart but got a different message
this time, indicated below:

Bringing up interface bond0: tg3 device eth1 does not seem to be present, delaying initialization

What do I do next ?
Avatar of sunhux

ASKER


Both eth0 & eth1 are physically present (seen from behind the Proliant G4 server)
& lspci output below showed the 2 Broadcom NIC :


00:00.0 Host bridge: Intel Corporation E7520 Memory Controller Hub (rev 0c)
00:02.0 PCI bridge: Intel Corporation E7525/E7520/E7320 PCI Express Port A (rev 0c)
00:06.0 PCI bridge: Intel Corporation E7520 PCI Express Port C (rev 0c)
00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c2)
00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller (rev 02)
01:03.0 VGA compatible controller: ATI Technologies Inc Rage XL (rev 27)
01:04.0 System peripheral: Compaq Computer Corporation Integrated Lights Out Controller (rev 01)
01:04.2 System peripheral: Compaq Computer Corporation Integrated Lights Out  Processor (rev 01)
02:00.0 PCI bridge: Intel Corporation 6700PXH PCI Express-to-PCI Bridge A (rev 09)
02:00.2 PCI bridge: Intel Corporation 6700PXH PCI Express-to-PCI Bridge B (rev 09)
03:01.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 10)
03:01.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 10)
04:03.0 RAID bus controller: Compaq Computer Corporation Smart Array 64xx (rev 01)
05:00.0 PCI bridge: Intel Corporation 6700PXH PCI Express-to-PCI Bridge A (rev 09)
05:00.2 PCI bridge: Intel Corporation 6700PXH PCI Express-to-PCI Bridge B (rev 09)
Avatar of sunhux

ASKER



the command "ifenslave -d bond0 eth0" is new to me
mode=6 requires fairly recent network adapters which can change MAC address while UP
you get immediate note in dmesg if it is not the case and you need to fall back to mode=1

RLB will need support from ethernet switch to balance between two ports.
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of sunhux

ASKER


Thanks guys.  I rebooted the server & eth1 came up fine.  Now connecting
to eth1 or eth0 alone works & allows the server to ping to another addr.

Looks like reboot reloads the driver while "service network restart" doesn't.

Connected eth0 & eth1 to my Cisco 2960 switch's port 15 & 16 which have
the followg configurations :
interface g0/15
  channel-protocol lacp  ! Specify LACP instead of PAgP
  channel-group 1 mode active ! create the channel using active mode
  no shut
  exit
interface g0/16
  channel-protocol lacp  ! Specify LACP instead of PAgP
  channel-group 1 mode active ! create the channel using active mode
  no shut
  end
copy run start


While copying files from the server to a NAS, I spotted that port 15
has high bandwidth outgoing (with minimal incoming) while port 16
has high bandwidth incoming (with minimal outgoing) as seen when
I did "show int g0/15" & "show int g0/16"

Shouldn't mode=6 enable equal load sharing between both ports
ie I'm expecting incoming & outgoing to be comparable?


SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of sunhux

ASKER

Wonderful, Thanks