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?

Switches / HubsLinux NetworkingLinux OS Dev

Avatar of undefined
Last Comment
sunhux

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Daniel McAllister

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Steve Jennings

Thanks Dan
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?
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 ?
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
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)
sunhux

ASKER


the command "ifenslave -d bond0 eth0" is new to me
gheist

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.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
SOLUTION
Daniel McAllister

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
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
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
sunhux

ASKER
Wonderful, Thanks