This discussion is archived
1 2 Previous Next 21 Replies Latest reply: Jun 22, 2013 1:11 PM by AmitShil RSS

NIC Bonding not behaving as it should

AmitShil Newbie
Currently Being Moderated
Hi Folks, am trying to setup NIC bonding on my VM (OEL5u6) having two virtualised NICs, i have done the setup which is quite simple however my active-backup mode is not working as expected.

My Bonded interface

[root@Gateway network-scripts]# cat ifcfg-bond0
DEVICE=bond0
IPADDR=192.169.25.2
NETMASK=255.255.255.248
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
BONDING_OPTS='mode=active-backup miimon=1000'
TYPE=Ethernet

individual interfaces

[root@Gateway network-scripts]# cat ifcfg-eth2
DEVICE=eth2
HWADDR=08:00:27:1e:57:cf
MASTER=bond0
SLAVE=yes
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
[root@Gateway network-scripts]# cat ifcfg-eth4
DEVICE=eth4
HWADDR=08:00:27:46:69:69
MASTER=bond0
SLAVE=yes
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

Bonding status (looks good)

[root@Gateway network-scripts]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.5.0 (November 4, 2008)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth2
MII Status: up
MII Polling Interval (ms): 1000
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth2
MII Status: up
Link Failure Count: 0
Permanent HW addr: 08:00:27:1e:57:cf

Slave Interface: eth4
MII Status: up
Link Failure Count: 0
Permanent HW addr: 08:00:27:46:69:69


I am doing a continous ping from another host in the same n/w to this bonded interface IP to check if the ping streak breaks when i test this setup

Testing -

[root@Gateway network-scripts]# ifenslave -c bond0 eth4

and that's it my SSH connection is gone, and ping is broken with "Request timed out"

when i check the bond status now -

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth4
MII Status: up
MII Polling Interval (ms): 1000
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth2
MII Status: up
Link Failure Count: 0
Permanent HW addr: 08:00:27:1e:57:cf

Slave Interface: eth4
MII Status: up
Link Failure Count: 0
Permanent HW addr: 08:00:27:46:69:69


am afraid there's not much help in the message log to debug this.

Any views what's wrong and how to resolve? appreciate ur replies. Thanks

Regards Amit
  • 1. Re: NIC Bonding not behaving as it should
    alvaromiranda Explorer
    Currently Being Moderated
    Setup looks good,

    I will suggest to try 'disconnect' one of the interfaces from virtualbox to simulate the unplug or link going down.

    Same result?
  • 2. Re: NIC Bonding not behaving as it should
    AmitShil Newbie
    Currently Being Moderated
    Hi, Thanks for your response.

    I have just simulated the scenario and disconnected eth2 from the virtual box and nothing has changed, my SSH is still not working and the ping times out so its not worked unfortunately.

    Please note that its always the primary slave that causes the issue, if during a healthy scenario i do a ifdown on eth4 (secondary slave) then there's no issue at the setup and it works merrily, its alway the primary slave going down that causes the issue.

    Thanks Amit
  • 3. Re: NIC Bonding not behaving as it should
    alvaromiranda Explorer
    Currently Being Moderated
    Hi, please provide:

    full outout of ifconfig -a

    output of lsmod | grep -i bond

    cat /etc/modprobe.conf

    Thanks
    Alvaro
  • 4. Re: NIC Bonding not behaving as it should
    AmitShil Newbie
    Currently Being Moderated
    Hello,

    I have since my last comment changed the eth settings of the underlying interfaces which makes up bond0 to remove a HW Address conflict error i was receiving in the message log (nothing to do with this issue but informing)...

    [root@Gateway network-scripts]# cat ifcfg-eth2
    DEVICE=eth2
    MASTER=bond0
    SLAVE=yes
    ONBOOT=yes
    BOOTPROTO=none
    USERCTL=no
    [root@Gateway network-scripts]# cat ifcfg-eth4
    DEVICE=eth4
    MASTER=bond0
    SLAVE=yes
    ONBOOT=yes
    BOOTPROTO=none
    USERCTL=no

    Bonding driver has been loaded correctly

    [root@Gateway network-scripts]# lsmod | grep -i bond
    bonding 102210 0
    ipv6 264702 40 sit,bonding,ip6t_REJECT,nf_conntrack_ipv6


    bond0 alias too has been defined correctly.

    [root@Gateway network-scripts]# cat /etc/modprobe.d/bonding.conf
    alias bond0 bonding

    full ifconfig -a output below -

    [root@Gateway network-scripts]# ifconfig -a
    bond0 Link encap:Ethernet HWaddr 08:00:27:1E:57:CF
    inet addr:192.169.25.2 Bcast:192.169.25.7 Mask:255.255.255.248
    inet6 addr: fe80::a00:27ff:fe1e:57cf/64 Scope:Link
    UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
    RX packets:15866 errors:0 dropped:0 overruns:0 frame:0
    TX packets:2299 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:1182423 (1.1 MiB) TX bytes:296743 (289.7 KiB)

    eth0-eth2 Link encap:Ethernet HWaddr 08:00:27:1E:57:CF
    inet addr:192.167.25.2 Bcast:192.167.25.7 Mask:255.255.255.248
    inet6 addr: fe80::a00:27ff:fe1e:57cf/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:9862 errors:0 dropped:0 overruns:0 frame:0
    TX packets:376 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:785517 (767.1 KiB) TX bytes:32841 (32.0 KiB)

    eth2 Link encap:Ethernet HWaddr 08:00:27:1E:57:CF
    UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
    RX packets:9813 errors:0 dropped:0 overruns:0 frame:0
    TX packets:2249 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:780567 (762.2 KiB) TX bytes:293903 (287.0 KiB)

    eth3-eth2 Link encap:Ethernet HWaddr 08:00:27:1E:57:CF
    BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

    eth4 Link encap:Ethernet HWaddr 08:00:27:1E:57:CF
    UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
    RX packets:6054 errors:0 dropped:0 overruns:0 frame:0
    TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:401916 (392.4 KiB) TX bytes:3548 (3.4 KiB)

    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:83 errors:0 dropped:0 overruns:0 frame:0
    TX packets:83 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:8836 (8.6 KiB) TX bytes:8836 (8.6 KiB)

    sit0 Link encap:IPv6-in-IPv4
    NOARP MTU:1480 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

    virbr0 Link encap:Ethernet HWaddr 8E:16:0F:33:48:BD
    inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
  • 5. Re: NIC Bonding not behaving as it should
    Dude! Guru
    Currently Being Moderated
    Hi Folks, am trying to setup NIC bonding on my VM (OEL5u6) having two virtualised NICs, i have done the setup which is quite simple however my active-backup mode is not working as expected.
    What is your virtualization product and how are the NIC's setup?
  • 6. Re: NIC Bonding not behaving as it should
    AmitShil Newbie
    Currently Being Moderated
    Hi,

    I am using Oracle VM VirtualBox Manager .. and this is the second time am trying NIC bonding on the same env (it worked earlier) however i purged teh setup in favour of something else and while now resurrecting getting this situation now, don't beleive the env's a problem when it worked on the same setup earlier.

    The NICs are setup in "Host only Adapter mode" ..

    Not sure if i should try once in the "internal network" mode - although i think i'll lose the host to guest connectivity via Putty in that case..

    regards Amit
  • 7. Re: NIC Bonding not behaving as it should
    1007415 Newbie
    Currently Being Moderated
    Hi,

    I'm having the same problem, when i disconnect the cable from the eth0 (active slave) stop receiving respond
    I have tried bridged conf and interal net.

    I'm using VirtualBox 4.1.16

    This is my conf:
         

    [root@integrador ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0
    DEVICE=bond0
    IPADDR=10.10.0.2
    NETWORK=10.10.0.0
    NETMASK=255.255.255.0
    BONDING_OPTS="mode=1 miimon=100"
    BOOTPROTO=none
    ONBOOT=yes

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

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

    [root@integrador ~]# cat /etc/modprobe.d/bonding.conf
    alias bond0 bonding


    [root@integrador ~]# ifconfig -a
    bond0 Link encap:Ethernet HWaddr 08:00:27:5C:C5:BA
    inet addr:10.10.0.2 Bcast:10.10.0.255 Mask:255.255.255.0
    inet6 addr: fe80::a00:27ff:fe5c:c5ba/64 Scope:Link
    UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
    RX packets:402 errors:0 dropped:0 overruns:0 frame:0
    TX packets:92 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:39487 (38.5 KiB) TX bytes:11045 (10.7 KiB)

    eth0 Link encap:Ethernet HWaddr 08:00:27:5C:C5:BA
    UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
    RX packets:211 errors:0 dropped:0 overruns:0 frame:0
    TX packets:89 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:23061 (22.5 KiB) TX bytes:10863 (10.6 KiB)

    eth1 Link encap:Ethernet HWaddr 08:00:27:5C:C5:BA
    UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
    RX packets:191 errors:0 dropped:0 overruns:0 frame:0
    TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:16426 (16.0 KiB) TX bytes:182 (182.0 b)

    eth2 Link encap:Ethernet HWaddr 08:00:27:DF:11:A2
    inet addr:192.168.57.1 Bcast:192.168.57.3 Mask:255.255.255.252
    inet6 addr: fe80::a00:27ff:fedf:11a2/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1142 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 b) TX bytes:119508 (116.7 KiB)

    eth3 Link encap:Ethernet HWaddr 08:00:27:D1:41:9A
    inet addr:192.168.1.50 Bcast:192.168.1.255 Mask:255.255.255.0
    inet6 addr: fe80::a00:27ff:fed1:419a/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:825 errors:0 dropped:0 overruns:0 frame:0
    TX packets:625 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:563221 (550.0 KiB) TX bytes:85914 (83.9 KiB)

    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:25 errors:0 dropped:0 overruns:0 frame:0
    TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:2690 (2.6 KiB) TX bytes:2690 (2.6 KiB)

    [root@integrador ~]# 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: 1000 Mbps
    Duplex: full
    Link Failure Count: 0
    Permanent HW addr: 08:00:27:5c:c5:ba
    Slave queue ID: 0

    Slave Interface: eth1
    MII Status: up
    Speed: 1000 Mbps
    Duplex: full
    Link Failure Count: 0
    Permanent HW addr: 08:00:27:fc:6b:f6
    Slave queue ID: 0

    [root@integrador ~]# lsmod | grep -i bond
    bonding 109558 0
    ipv6 264641 39 cnic,bonding,ip6t_REJECT,nf_conntrack_ipv6,nf_defrag_ipv6

    [root@integrador ~]# uname -a
    Linux integrador 2.6.32-220.el6.i686 #1 SMP Tue Dec 6 16:15:40 GMT 2011 i686 i686 i386 GNU/Linux

    Sorry for my english!
  • 8. Re: NIC Bonding not behaving as it should
    Dude! Guru
    Currently Being Moderated
    I would have to look into more details about bonding and teaming and such, but such technologies often require that each NIC is attached to a separate network switch to avoid ARP (Hardware address) conflicts and possible spanning tree protocol issues.

    Your problem might be due to the way VirtualBox deals with the host-only adapter internally, which is actually a virtual adapter on your host system. You may have more luck using a bridged type network adapter, which binds to a real NIC and can also be setup to bind to a specific adapter on the host system.

    I suggest to search or try the VirtualBox forum at https://forums.virtualbox.org/
  • 9. Re: NIC Bonding not behaving as it should
    AmitShil Newbie
    Currently Being Moderated
    Hi,

    I have tried all the options now but its simply not working :( .

    1. Tried Host only adapter by changing the internal H/W , ensuring the HW address is different in each case
    2. Tried moving the VM to internal n/w but alas the same behaviour as in host only adapter.

    i am not able to use bridge adapter ATM as in office but would try that tonight however in doubt as i have only one adapter on the host and you need two atleast for teaming.

    Any other suggestions which would help diagnose the issue is appreciated.

    I would also open a post in VM forums and give a link here, already opened a one in LQ but hasn't been too fruitful yet.

    http://www.linuxquestions.org/questions/linux-networking-3/nic-bonding-not-behaving-as-it-should-4175460775/#post4945832

    Regards Amit

    Edited by: Amit Shil on 07-May-2013 00:40
  • 10. Re: NIC Bonding not behaving as it should
    AmitShil Newbie
    Currently Being Moderated
    I have now raised this in VM forum, here's the link.

    https://forums.virtualbox.org/viewtopic.php?f=6&t=55458

    Regards Amit
  • 11. Re: NIC Bonding not behaving as it should
    Dude! Guru
    Currently Being Moderated
    The VirtualBox forum are not necessarily Linux experts. It might be a good idea to shed some light on the VirtualBox adapter type to find out if there are certain limitations. Hiding that you are using the host-only adapter won't help you to find a solution if it is indeed the problem. It might also be a good idea to provide a link to this thread in your post to show people that you have already check the Linux configuration part.
  • 12. Re: NIC Bonding not behaving as it should
    AmitShil Newbie
    Currently Being Moderated
    Hi, Yes agree.. have amended the post to include the details + a link to this thread (didn't include it first hand as they a rule of not allowing new members to post links until they are 1 day old :) )

    Regards Amit
  • 13. Re: NIC Bonding not behaving as it should
    Dude! Guru
    Currently Being Moderated
    You put the wrong link to your question in the VirtualBox forum. It does not go to this thread, but a different one.
  • 14. Re: NIC Bonding not behaving as it should
    AmitShil Newbie
    Currently Being Moderated
    Thanks, just modified the same now...

    Regards Amit
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points