LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Bonding of for fault-tolerance (active-backup) (https://www.linuxquestions.org/questions/linux-networking-3/bonding-of-for-fault-tolerance-active-backup-807788/)

vikas027 05-14-2010 05:16 AM

Bonding of for fault-tolerance (active-backup)
 
Dear All,

Just for the learning sake, I was going through this document for Bonding of Two Ethernet Cards for Fault-Tolerance (active-backup).

Here, /etc/modprobe.conf is as
Code:

alias bond0 bonding
options bond0 mode=1 arp_ip_target=192.168.1.1 arp_interval=200 primary=eth0

Now, I just wanted to to know,
- What parameter is arp_ip_target and why it is used.
- Why the IP is 192.168.1.1, whereas the IP in /etc/sysconfig/network-script/ifcfg-bond0 is 192.168.1.5.
- Can I use the below /etc/modprobe.conf ?
Code:

alias bond0 bonding
options bond0 miimon=100 mode=1 primary=eth0

I am sorry, actually as of now I do not have any system with two Ethernet Cards to test this. :o ; thus bothering you people.

tizzef 05-17-2010 03:07 AM

Hi there,

Yep, I think you can use :
alias bond0 bonding
options bond0 miimon=100 mode=1

primary=eth0 will force the default interface. If not mentioned, one of the two interfaces will be the default one.

Here are the file for configuring your network (for a RedHat distro):
(/etc/sysconfig/network-script)
ifcfg-bond0:
ONBOOT=yes
DEVICE=bond0
BOOTPROTO=static
IPADDR=XXX.XXX.XXX.XXX
NETMASK=XXX.XXX.XXX.XXX
BROADCAST=XXX.XXX.XXX.XXX
NETWORKING_IPV6=no # disable ipv6

ifcfg-eth0:
DEVICE=eth0
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
ONBOOT=yes

ifcfg-eth1:
DEVICE=eth2
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
ONBOOT=yes


Restart your network and it's done.
You can check the config by :
cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v2.6.3-rh (June 8, 2005)

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: XX:XX:XX:XX:XX:XX

Slave Interface: eth2
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:XX:XX:XX:XX:XX

achoos13 07-26-2012 11:54 AM

miimon dnt work always
 
if you are using Pass-Thru Module, miimon monitoring dsnt work properly and you have to use arp monitoring.

you cann add BONDING_OPTS="mode=1 primary=eth1 fail_over_mac=1 miimon=0 arp_interval=100 arp_ip_target=<ip> arp_validate=3"

achoos13 07-26-2012 11:56 AM

refer for the details of parametehttp://www.kernel.org/doc/Documentation/networking/bonding.txt

jeff-405 04-03-2013 12:02 PM

channel bonding
 
Im having some connectivity issues with Bond0
before you waste your time reading all this please note
that i am trying to bond eth0 with my exsisting wireless assuming this can be done, however please correct me if i'm wrong.

I followed these steps.

created /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
NETMASK=255.255.255.0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
NAME="System bond0"
NM_CONTROLLED=no
IPADDR=10.0.0.7
MII_NOT_SUPPORTED=yes

created /etc/modprobe.d/bonding.conf
alias bond0 bonding
options bond0 mode=1 miimon=100

modfied /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
USERCTL=no
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
NAME=eth0
ONBOOT=yes
NM_CONTROLLED="no"
MII_NOT_SUPPORTED=yes

then ran
# modprobe bonding
# ifconfig bond0 up
# ifenslave bond0 eth0 eth1

ifconfig prints

bond0 Link encap:Ethernet HWaddr 00:13:D3:A2:BE:83
inet addr:10.0.0.7 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::213:d3ff:fea2:be83/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7822 (7.6 KiB) TX bytes:6484 (6.3 KiB)

eth0 Link encap:Ethernet HWaddr 00:13:D3:A2:BE:83
inet addr:10.0.0.7 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7822 (7.6 KiB) TX bytes:6484 (6.3 KiB)
Interrupt:20 Base address:0xe000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:374 errors:0 dropped:0 overruns:0 frame:0
TX packets:374 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:40510 (39.5 KiB) TX bytes:40510 (39.5 KiB)

wlan0 Link encap:Ethernet HWaddr 08:10:76:C4:A8:BF
inet addr:10.0.0.181 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::a10:76ff:fec4:a8bf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8098 errors:0 dropped:14144 overruns:0 frame:0
TX packets:8324 errors:0 dropped:2 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6757092 (6.4 MiB) TX bytes:2668031 (2.5 MiB)

then

[root@PlcmSplp network-scripts]# cat /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): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Speed: 100 Mbps
Duplex: half
Link Failure Count: 0
Permanent HW addr: 00:13:d3:a2:be:83
Slave queue ID: 0

then
[root@PlcmSplp network-scripts]# service network restart
Shutting down interface bond0: [ OK ]
Shutting down interface wlan0: ERROR : [ipv6_test_device_status] Missing parameter 'device' (arg 1)
[ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface bond0: [ OK ]
Bringing up interface wlan0: Device does not seem to be present, delaying initialization.
[FAILED]

when i click system bond0 in menu network connections a message pop up displays connection establised.
below are some var log messages may help you help me

Mar 28 03:25:53 PlcmSplp dhcpd: bad range, address 255.0.0.0 not in subnet 255.255.181.0 netmask 255.255.255.0
Mar 28 03:26:37 PlcmSplp kernel: 8021q: adding VLAN 0 to HW filter on device bond0
Mar 28 03:26:37 PlcmSplp kernel: bonding: bond0: Adding slave eth0.
Mar 28 03:26:37 PlcmSplp kernel: eth0: link up, 100Mbps, half-duplex, lpa 0x40A1
Mar 28 03:26:37 PlcmSplp kernel: bonding: bond0: making interface eth0 the new active one.
Mar 28 03:26:37 PlcmSplp NetworkManager[1538]: (eth0): carrier now ON (device state 8)
Mar 28 03:26:37 PlcmSplp kernel: bonding: bond0: first active interface up!
Mar 28 03:26:37 PlcmSplp kernel: bonding: bond0: enslaving eth0 as an active interface with an up link.
Mar 28 03:26:37 PlcmSplp kernel: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready

I understand this may be a seperate issue but i get this failure when
i [root@PlcmSplp network-scripts]# /etc/init.d/dhcpd restart
Starting dhcpd: [FAILED]

a kernel panic has accured once # ifenslave bond0 eth0 wlan was ran and sometimes
when i manually shut down a network. I'm doing some reading here http://www.novell.com/support/kb/doc.php?id=7004798
and was wondering if someone can suggest a propper bonding driver upgrade
that seems to be available above to eleminate the kernel panic


All times are GMT -5. The time now is 11:33 AM.