QA:Testcase Virtualization Nic Bonding

From FedoraProject

Jump to: navigation, search

Description

This test is intended to test nic bonding on virtual machine


How to test

  1. determine the four nic models used in the test model1,model2,model3,model4
    qemu-kvm -net nic,model=model1,vlan=0 -net tap,vlan=0 -net nic,model=model2,vlan=1 -net tap,vlan=1 -net nic,model=model3,vlan=2 -net tap,vlan=2 -net nic,model=model4,vlan=3 -net tap,vlan=3 -m 1024 ......
  2. configure the bonding interfaces configuration files:
    /etc/sysconfig/network-scripts/ifcfg-{ethnum}
    DEVICE={ethnum}
    USERCTL=no
    ONBOOT=yes
    MASTER=bond0
    SLAVE=yes
    BOOTPROTO=none
    /etc/sysconfig/network-scripts/ifcfg-bond0
    DEVICE=bond0
    BOOTPROTO=dhcp
    ONBOOT=yes
    USERCTL=no
  3. modprobe the bonding module
    modprobe bonding
  4. re-start the network interfaces
    service netowrk restart
  5. use ifconfig to see if bond0 device have been setup and get the ip address ip_bond0
    ifconfig bond0
  6. in the guest run the following scripts to down/up the interface eth0,eth1,eth2,eth3
    while true do;
    ifconfig eth0 down
    ifconfig eth0 up
    ifconfig eth1 down
    ifconfig eth1 up
    ifconfig eth2 down
    ifconfig eth2 up
    ifconfig eth3 down
    ifconfig eth3 up
    done
  7. in the mean time ping the guest in host with the following command, the packet loss ratio should be zero
    ping _ip_bond0_ -c 1000
  8. then flood ping the guest for two minutes
    ping -f _ip_bond0_ 
  9. and then ping the guest, the packet loss ratio should be zero
    ping -c 100 _ip_bond0_
  10. the packet loss should be zero.

Expected Results

  1. test results should meet the requirements above