KVM之Bonding+Bridge实验

测试环境:

名字

ip

OS

Bonding+Bridge

Speed

KVM

192.168.x.57

Centos6.3

Y

200Mb/s

Vm_server1

192.168.x.61

Centos6.3

N

可变

Vm_server2

192.168.x.62

Centos6.3

N

可变

Server1

192.168.x.130

Centos6.0

N

100Mb/s

Server2

192.168.x.254

Centos5.5

N

100Mb/s


KVM ServerBonding+Bridge配置

[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


启动两个vm,将其两个接口绑定到br10上.

[root@localhost ~]# brctl show

bridge namebridge idSTP enabledinterfaces

br10 8000.d4bed9b5bc21 no bond0

vnet0

vnet1

交换机配置,仅需开启port-channel(LACP协议)


测试:

1.Server1server2vm_server1vm_server2施压

分别结果图:

Vm_server1

163815208.png

Vm_server2

163849529.png

Server1

164029693.png

Server2

164149676.png


2. vm_server1vm_server2Server1server2施压

分别结果图:

Vm_server1

164331867.png

Vm_server2

164444257.png

Server1


164520779.png

Server2


164535502.png


3.server1server2vm_server1施压

分别结果图:

server1

165020910.png


Server2

165041122.png


Vm_Server1

164619944.png


从测试3可以看出,我们的vm_server1虚拟机可以接受近200Mb/s的流量.


你可能感兴趣的:(kvm,bridge,bonding)