Re: using KVM Virbr0 with bonded nics?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 10/25/2011 10:48 AM, Bob Hoffman wrote:
> Still working on a solution. Apparently the bond<n>  files demand an
> ipaddress, thus there might have to be one for each and
> every single ip coming into the computer...I guess you would have to do
> that anyway just like
> eth0, eth0:0, eth0:1, etc.
> I think I am going to try to just make a separate eth<n>  for each ip,
> going to their respective bond<n>  with the proper ipaddress
> in them. Then use the bridge as normal, with each bond<n>  calling a
> respective bridge
> Not sure how that works with multiple ips going to same machine (as in,
> can the bridge handle more than one ip, or can the machine
> look for more than one bridge...?)
>

For various reasons I base my host machines on Ubuntu 10.04-LTS and run 
CentOS under KVM. My bonded/bridged host configuration looks like this. 
You will have to figure out the CentOS equivalents.

# The primary network interface
iface eth0 inet manual
iface eth1 inet manual

# eth0 & eth1 form bond0 for x.x.x.0/25 subnet
auto bond0
iface bond0 inet static
         bond_miimon 100
         bond_mode active-backup
         bond_downdelay 200
         bond_updelay 200
     address x.x.x.35
     netmask 255.255.255.128
     network x.x.x.0
     post-up ifenslave bond0 eth0 eth1
     pre-down ifenslave -d bond0 eth0 eth1

auto br0
iface br0 inet static
     bridge_ports bond0
     address x.x.x.35
     netmask 255.255.255.128
     network x.x.x.0
     gateway x.x.x.126

I then configured the virtual interface for each virtual machine like this:

<interface type='bridge'>
<mac address='xx:xx:xx:xx:xx:xx'/>
<source bridge='br0'/>
<model type='virtio'/>
</interface>

and configured each machine using regular 'eth0'.

Don't forget to make sure forwarding is turned on and that your firewall 
on the host machine allows FORWARD chain packets to the bridged interface.

-- 
Benjamin Franz
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux