NIC bonding doesnt work

Discussion in 'Kernel Questions' started by shangsuo, Nov 23, 2010.

  1. shangsuo

    shangsuo New Member

    try to bond two NIC but cant seem to work. Any experts can offer any advice?
    Suspect vmware simply doesnt support virtual machine running NIC bonding but I cant be sure

    switch: vmware workstation virtual network
    os:Oracle Enterprise Linux r5u5 x64

    *note /etc/modprobe.conf is deprecated. Now uses /etc/modprobe.d/abc.conf
    http://docs.redhat.com/docs/en-US/R..._Guide/s2-networkscripts-interfaces-chan.html

    #configuration:
    vi /etc/modprobe.d/bonding.conf
    :<<:
    alias bond0 bonding
    alias bond1 bonding
    :

    vi /etc/sysconfig/network-scripts/ifcfg-bond0
    :<<:
    #bond eth0 and eth1
    DEVICE=bond0
    IPADDR=192.168.70.51
    NETMASK=255.255.255.0
    ONBOOT=yes
    BOOTPROTO=none
    USERCTL=no
    #mii monitoring interval 100ms. Mode=1 active/backup
    BONDING_OPTS="miimon=100 mode=1"
    :
    vi /etc/sysconfig/network-scripts/ifcfg-eth0
    :<<:
    #slave of bond0
    DEVICE=eth0
    BOOTPROTO=none
    ONBOOT=yes
    MASTER=bond0
    SLAVE=yes
    USERCTL=no
    :
    vi /etc/sysconfig/network-scripts/ifcfg-eth1
    :<<:
    #slave of bond0
    DEVICE=eth1
    BOOTPROTO=none
    ONBOOT=yes
    MASTER=bond0
    SLAVE=yes
    USERCTL=no
    :

    #check
    route -n
    :<<:
    Destination Gateway Genmask Flags Metric Ref Use Iface
    10.10.10.48 0.0.0.0 255.255.255.248 U 0 0 0 eth2
    192.168.70.0 0.0.0.0 255.255.255.0 U 0 0 0 bond0
    192.168.132.0 0.0.0.0 255.255.255.0 U 0 0 0 bond1
    169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 bond1
    0.0.0.0 192.168.70.2 0.0.0.0 UG 0 0 0 bond0
    :

    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: 00:0c:29:00:98:40

    Slave Interface: eth1
    MII Status: up
    Link Failure Count: 0
    Permanent HW addr: 00:0c:29:00:98:4a
    :

    ifconfig
    :<<:
    bond0 Link encap:Ethernet HWaddr 00:0C:29:00:98:40
    inet addr:192.168.70.51 Bcast:192.168.70.255 Mask:255.255.255.0
    inet6 addr: fe80::20c:29ff:fe00:9840/64 Scope:Link
    UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
    RX packets:6180 errors:0 dropped:0 overruns:0 frame:0
    TX packets:4681 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:509171 (497.2 KiB) TX bytes:763684 (745.7 KiB)

    eth0 Link encap:Ethernet HWaddr 00:0C:29:00:98:40
    UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
    RX packets:5720 errors:0 dropped:0 overruns:0 frame:0
    TX packets:4462 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:476087 (464.9 KiB) TX bytes:755170 (737.4 KiB)

    eth1 Link encap:Ethernet HWaddr 00:0C:29:00:98:40
    UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
    RX packets:477 errors:0 dropped:0 overruns:0 frame:0
    TX packets:237 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:34206 (33.4 KiB) TX bytes:11478 (11.2 KiB)
    :

    #testing. Incoming:use another box to ping to bond0 192.168.70.51. Outgoing:ping to gateway 192.168.70.2
    ifdown eth0
    cat /proc/net/bonding/bond0
    :<<:
    Bonding Mode: fault-tolerance (active-backup)
    Primary Slave: None
    Currently Active Slave: eth1
    MII Status: up
    MII Polling Interval (ms): 100
    Up Delay (ms): 0
    Down Delay (ms): 0

    Slave Interface: eth1
    MII Status: up
    Link Failure Count: 0
    Permanent HW addr: 00:0c:29:00:98:4a
    :

    ###result:failed. Ping no reply


    ifup eth0
    ifdown eth1
    cat /proc/net/bonding/bond0
    :<<:
    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: 00:0c:29:00:98:40
    :

    ###result:pass. Ping have reply

    It seems only eth0 is functioning. I have another bond1 with mode=1(round robin) which show exact behaviour.
    Anyone to shed a light on these?
     
  2. Glen Fernandes

    Glen Fernandes New Member

    I have the exactly same problem, did you manager to resolve this ?
     
  3. tboston

    tboston New Member

    afaik you then put a Bridge onto the bond devices which gets the actual ip
     

Share This Page