Test environment:
Name |
Ip |
OS |
Bonding + Bridge |
Speed |
KVM |
192.168.x.57 |
Centos6.3 |
Y |
200 Mb/s |
Vm_server1 |
192.168.x.61 |
Centos6.3 |
N |
Variable |
Vm_server2 |
192.168.x.62 |
Centos6.3 |
N |
Variable |
Server1 |
192.168.x.130 |
Centos6.0 |
N |
100 Mb/s |
Server2 |
192.168.x.254 |
Centos5.5 |
N |
100 Mb/s |
KVM Server Bonding + Bridge configuration
[Root @ localhost ~] # More/etc/sysconfig/network-scripts/ifcfg-em2
DEVICE = em2
ONBOOT = yes
BOOTPROTO = static
USERCTL = no
MASTER = bond0
SLAVE = yes
[Root @ localhost ~] # More/etc/sysconfig/network-scripts/ifcfg-em3
DEVICE = em3
ONBOOT = yes
BOOTPROTO = static
USERCTL = no
MASTER = bond0
SLAVE = yes
[Root @ localhost ~] # More/etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE = bond0
ONBOOT = yes
BRIDGE = br10
[Root @ localhost ~] # More/etc/sysconfig/network-scripts/ifcfg-br10
DEVICE = br10
ONBOOT = yes
BOOTPROTO = static
NM_CONTROLLED = "no"
IPADDR = 192.168.x.57
NETMASK = 255.255.255.0
BROADCAST = 192.168.x.255
NETWORK = 192.168.x.0
USERCTL = no
TYPE = Bridge
[Root @ localhost ~] # More/etc/modprobe. d/bonding. conf
Alias bond0 bonding
Options bond0 miimon = 100 mode = 4
Start two VMS and bind the two interfaces to br10.
[Root @ localhost ~] # Brctl show
Bridge namebridge idSTP enabledinterfaces
Br10 8000. d4bed9b5bc21 no bond0
Vnet0
Vnet1
Switch configuration. Only port-channel (LACP protocol) must be enabled)
Test:
1.Server1 and server2 exert pressure on vm_server1 and vm_server2
Results:
Vm_server1
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/23325W912-0.png "title =" 1.png" alt = "163815208.png"/>
Vm_server2
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/23325R296-1.png "title =" 1.png" alt = "163849529.png"/>
Server1
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/23325Q928-2.png "title =" 1.png" alt = "164029693.png"/>
Server2
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/23325W248-3.png "title =" 1.png" alt = "164149676.png"/>
2.Vm_server1 and vm_server2 exert pressure on Server1 and server2
Results:
Vm_server1
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/23325V621-4.png "title =" 1.png" alt = "164331867.png"/>
Vm_server2
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/23325SK0-5.png "title =" 1.png" alt = "164442.167.png"/>
Server1
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/23325W019-6.png "title =" 1.png" alt = "164520779.png"/>
Server2
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/23325W015-7.png "title =" 2.png" alt = "164535502.png"/>
3. Server1 each server2 puts pressure on vm_server1
Results:
Server1
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/23325U4Q-8.png "title =" 1.png" alt = "165020910.png"/>
Server2
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/23325Qc0-9.png "title =" 2.png" alt = "165044252.png"/>
Vm_Server1
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/23325S452-10.png "title =" 2.png" alt = "164619944.png"/>
Test 3 shows that our vm_server1 virtual machine can accept traffic of nearly 200 Mb/s.
This article is from the "bad boy" blog, please be sure to keep this source http://5ydycm.blog.51cto.com/115934/1302236