Bridging and Bonding with CentOS 6.5

eth0和eth1要做bond,然后kvm虚拟机通过bridge与外界通信,
那么就要在bond上做bridge,配置文件如下,实测这样配置,可以从kvm虚拟机ping通外界拓扑。

ifcfg-eth0:

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no

ifcfg-eth1:

DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no

ifcfg-bond0:

DEVICE=bond0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
BONDING_OPTS="miimon=100 mode=4 xmit_hash_policy=layer3+4"
BRIDGE=br0

ifcfg-br0:

DEVICE=br0
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Bridge"
BOOTPROTO="static"
IPADDR="10.65.248.201"
NETMASK="255.255.0.0"
GATEWAY="10.65.251.247"
MTU="1500"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="yes"
IPV6INIT="no"
NAME="System br0"
DELAY=0

kvm虚拟机的xml的interface部分如下:

 <interface type='bridge'>
      <mac address='00:16:3e:1e:b2:20'/>
      <source bridge='br0'/>
       </interface>

虚拟机的ip地址是10.65.248.242,ping宿主机
Bridging and Bonding with CentOS 6.5_第1张图片
ping宿主机所在拓扑主机:

搞定~

你可能感兴趣的:(kvm,bonding,Bridging,bond0,br0)