WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Bonding...again

Below is a working configuration in the form of ifcfg files, Xen network scripts, /etc/modprobe.conf, and /etc/rc.d/rc.local.  This is bonding without VLANs on a CentOS 5.2 x86-64 box.

ifcfg-eth0:
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:A2:19:11:D1:58
>MASTER=bond0
SLAVE=yes

ifcfg-eth1:
DEVICE=eth1
BOOTPROTO=none
HWADDR=00:A2:19:11:D1:59
>MASTER=bond0
SLAVE=yes

ifcfg-bond0:
DEVICE=bond0
BOOTPROTO=none
>TYPE=ethernet
BONDING_OPTS="mode=4 miimon=100"

ifcfg-bond0:0:
DEVICE=bond0:0
BOOTPROTO=static
>TYPE=ethernet
IPADDR=10.1.1.5
NETMASK=255.255.255.0
DNS1=10.1.1.8
DNS2=10.1.1.9
DOMAIN="domain.com domain"
# Gateway is set in /etc/rc.d/rc.local

/etc/xen/xend-config.sxp (snippet):
(network-script network-multi-bridge)

/etc/xen/scripts/network-multi-bridge (this is actually a relic; I'm not sure why we're still using it):
#!/bin/sh
# network-multi-bridge
# Exit if anything goes wrong
set -e
# First arg is operation.
OP=$1
shift
script=/etc/xen/scripts/network-bridge
case ${OP} in
start)
$script start vifnum=0 bridge=xenbr0 netdev=bond0
;;
stop)
$script stop vifnum=0 bridge=xenbr0 netdev=bond0
;;
status)
$script status vifnum=0 bridge=xenbr0 netdev=bond0
;;
*)
echo 'Unknown command: ' ${OP}
echo 'Valid commands are: start, stop, status'
exit 1
esac

/etc/modprobe.conf (snippet):
alias bond0 bonding

/etc/rc.d/rc.local (snippet):
# Default gateway doesn't get set properly after the xend startup, so we'll set it here
route add -net default gw 10.1.1.1





On Fri, Aug 7, 2009 at 4:33 AM, Christian Fischer <Christian.Fischer@xxxxxxxxxxxxxxxxxxx> wrote:
On Thursday 06 August 2009, Adam Wead wrote:
> Thanks for the help...
>
> I've tried this method, as well as Christian's method which does not
> use a VLAN.  In both cases, I can get all interfaces to come up but
> can't get the guests to make network connections to the outside.  I
> should also note that under RedHat EL5.3, if you don't use a VLAN and
> bridge directly off of the bond, you run into this problem:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=463014

Adam,

this is a simple setup you can do without any RHEL network init scripts.

I suggest writing your own with simple ip, brctl and ifenslave commands.
This is IMHO the shortest way.

Christian

>
> Which has been discussed on this list before.
>
> I think I'm getting hung up on the routing.  If we use your VLAN
> example, I configure bond0 with the public IP for dom0 (yes?), then I
> configure the VLAN with it's own network like 10.0.X.X or 192.168.X.X,
> then I create a route from the VLAN to bond0... yes?  If I understand
> bridging correctly, I won't need to add any routes from VLAN to
> bridge...
>
> Let me know if I've got that straight or not...
>
> Thanks again for the help...
>
> ...adam
>
> On Aug 5, 2009, at 12:18 AM, Jonathan Bayles wrote:
> > Take a look at these configs and the brctl command...(XXXX = vlan tag)
> >
> > [root@pnode006 /]# cat /etc/sysconfig/network-scripts/ifcfg-eth0.XXXX
> > DEVICE=eth0.XXXX
> > BOOTPROTO=static
> > > > > VLAN=yes
> > BRIDGE=brXXXX
> >
> > [root@pnode006 /]# cat /etc/sysconfig/network-scripts/ifcfg-brXXXX
> > DEVICE=brXXXX
> > TYPE=Bridge
> > BOOTPROTO=static
> > > > > DELAY=0
> > STP=off
> >
> > [root@pnode006 /]# brctl show
> > bridge name     bridge id               STP enabled     interfaces
> > brXXXX          8000.001ec9fd2360       no              vif3.0
> >                                                        eth0.XXXX vif
> > = [ "mac=YY:YY:YY:YY:YY:YY,bridge=brXXXX" ]
> >
> > Basically,
> >
> > Create a sub interface off your bond, configure it to do the
> > tagging, create a bridge for the tagged traffic, add the interface
> > onto a "port" on the bridge. Add the guest onto the bridge using a
> > vif.
> >
> > Subint <---- brctl bridge ----> guest vif
> >
> > -----Original Message-----
> > From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
> > [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx ] On Behalf Of Adam Wead
> > Sent: Tuesday, August 04, 2009 5:22 PM
> > To: Xen-users@xxxxxxxxxxxxxxxxxxx
> > Subject: [Xen-users] Bonding...again
> >
> > Hi all,
> >
> > I know this topic has been discussed a lot on this list, and I've been
> > going over some posts from months past trying to get things to work on
> > my end, but I need another appeal for help.  I'm setting up a dom0
> > under Red Hat EL5, with 2 NICs.  From looking over the old posts, it
> > looks like the best way to do this is to create bonds, vlans and
> > bridges under Red Hat and bypass Xen's initial network-bridge script.
> > I looked at what Fajar had said:
> >
> > http://lists.xensource.com/archives/html/xen-users/2009-05/msg00992.html
> >
> > And I tried duplicating this, mind you, without the patched ifup
> > script and setup something like this:
> >
> > - (eth1 + eth2) = bond0 with mode 2
> > - create VLAN bond0.2 to bond0
> > - attach bridge xenbr0 to bond0.2
> > - modified xend-config file: (vif-script 'vif-bridge bridge=xenbr0')
> >
> > This appears to work, but when I create guests and attach them to the
> > xenbr0, no dice.  My question is, is the above correct and where to
> > the IPs go?  Dom0 has it's own IP address, but what interface/bond/
> > VLAN does that go under?  Should the other items have IPs as well?
> >
> > My network kung fu is limited, so I apologize in advance if these are
> > stupid questions.
> >
> > many thanks,
> >
> > ...adam
> >
> >
> >
> >
> >
> > _______________________________________________
> > Xen-users mailing list
> > Xen-users@xxxxxxxxxxxxxxxxxxx
> > http://lists.xensource.com/xen-users



--
"Without music to decorate it, time is just a bunch of boring production
 deadlines or dates by which bills must be paid."
       --- Frank Vincent Zappa

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>