From Fedora Project Wiki
Description
This test is intended to test nic bonding on virtual machine
How to test
- 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 ......
- 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
- modprobe the bonding module
modprobe bonding
- re-start the network interfaces
service netowrk restart
- use ifconfig to see if bond0 device have been setup and get the ip address ip_bond0
ifconfig bond0
- 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
- 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
- then flood ping the guest for two minutes
ping -f _ip_bond0_
- and then ping the guest, the packet loss ratio should be zero
ping -c 100 _ip_bond0_
- the packet loss should be zero.
Expected Results
- test results should meet the requirements above