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] Creating multiple bridges

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Creating multiple bridges
From: "Nuno L. Ferreira" <nunolf@xxxxxxxxx>
Date: Mon, 05 Apr 2010 15:23:28 +0200
Delivery-date: Mon, 05 Apr 2010 06:25:02 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=oUKK8KtJX8pZKUzXMVVcbkat3kgDFlciOubcahfPCME=; b=DEs6puBpkYBWhRniuyrXXySXFmoFQC2jVoJEc/25p9tKtDGKPWT+mlt082aqB9UlOX my2sevciDM5d7cYpRbm/y3l9tUkcXdjabiOniC7rrirQtULanMy0zYs2razIFBF/lx3B xscZJBtIO6KvQ7f4a/RRnPCsiF87ngYQf7jRc=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=Onw+FjMb+7V8Z9pT/O9sZiXCNS1cjJ1oXfh10ozzRx3QFIXaq7It08xtR30At3daNz FwCbqsaqiV+lLAMLhANbSvzFdgTk0fOBVVJTHzDKJxGjcQdETLd8ym00Sr9nU3UCzVm1 CDzROxyqhYNEfpDodG1miPzOHyOKgROEm0blE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <j2q7207d96f1004042209tb331a106zb54f264c600edc5@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <4BB8B981.10707@xxxxxxxxxxxxxx> <j2q7207d96f1004042209tb331a106zb54f264c600edc5@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 SeaMonkey/2.0.4
Dear Andrew, Fajar

Last week I installed a new server with precisely with xen 3.4.2.
I was used to the old xen 3.0.1 bridge nomenclature, and some some tries I got to the following:

[root@xxx ~]# more /etc/xen/scripts/network-bridge-multi
#!/bin/bash
# Link physical NIC's to separate bridges
#
dir=$(dirname "$0")
# xen 3.0.1
#"$dir/network-bridge" "$@" vifnum=0 netdev=eth0 bridge=xenbr0
#"$dir/network-bridge" "$@" vifnum=1 netdev=eth1 bridge=xenbr1
#
# xen 3.4.2
"$dir/network-bridge" "$@" vifnum=0 netdev=eth0
"$dir/network-bridge" "$@" vifnum=1 netdev=eth1

[root@xxx ~]# cat /etc/xen/xend-config.sxp
... snip ...
#(network-script network-bridge)
(network-script network-bridge-multi 'start')

Later I added a 3rd bridge intended to be used as a dummy bridge, this time I used another method, was testing:

[root@labberdaan ~]#  cat /etc/rc.local
... snip ...
# creates a logical bridge
brctl addbr eth2
# disables communication with other bridges
brctl stp eth2 off
# sets bridge listening and learning state time to be 0
brctl setfd eth2 0
# activates dummy bridge
ip link set eth2 up

Probably I could this the the above wrapper script ...

Here is a brctl, with 6 VM's running, where domains 1 & 2 use eth0 and eth2, domains 3 to 5 use eth1 and eth2, and domains 6 only uses the dummy bridge eth2.

[root@labberdaan ~]# brctl show
bridge name     bridge id               STP enabled     interfaces
eth0            8000.003048c39a44       no              vif2.0
                                                        vif1.0
                                                        peth0
eth1            8000.003048c39a45       no              vif5.0
                                                        vif4.1
                                                        vif3.0

                                                        peth1
eth2            8000.feffffffffff       no              vif6.0
                                                        vif5.1
                                                        vif4.1
                                                        vif3.1
                                                        vif2.1
                                                        vif1.1
virbr0          8000.000000000000       yes


I noticed that though an ifconfig shows several vif0.X (thus belonging to dom0), they do not appear in the "brctl show", but dom0 seems to be in good shape.
I guess it uses the eth0 bridge.
I have to say that this change in the conventions is still a bit confusing for me ... but I hope that the above setup can give you some more hints.

Cheers,
N.

Fajar A. Nugraha wrote:
On Sun, Apr 4, 2010 at 11:08 PM, Andrew Kilham<andrew@xxxxxxxxxxxxxx>  wrote:
I vaguely knew that you needed to create a wrapper script to automatically
set up multiple bridges on boot, so I did some Googling and came up with
this file:

dir=$(dirname "$0")
"$dir/network-bridge" "$@" vifnum=0 netdev=peth0 bridge=eth0
"$dir/network-bridge" "$@" vifnum=1 netdev=eth1 bridge=beth1
The default network bridge script has changed over versions of Xen, so
that syntax might not work. A snippet from
/etc/xen/scripts/network-bridge from xen 3.4.2:

# network-bridge (start|stop|status) {VAR=VAL}*
#
# Vars:
#
# bridge     The bridge to use (default ${netdev}).
# netdev     The interface to add to the bridge (default gateway device).
# antispoof  Whether to use iptables to prevent spoofing (default no).

so when using 3.4.2 the syntax is probably
"$dir/network-bridge" "$@" netdev=eth0 bridge=eth0
"$dir/network-bridge" "$@" netdev=eth1 bridge=eth1

Adjust it as necessary, using the file of your current version of the file.
Note that I haven't tested it, because IMHO once you use some complex
configuration it's much easier and managable to simply use OS config
scripts.

[root@mars ~]# brctl show
bridge name     bridge id               STP enabled     interfaces
The public IP assigned to dom0 works, but none of the IP's assigned to the
domU works.
because there's no bridge. You might be able to find out "why" by
looking at error messages on xend.log

So, how do I have a bridge named beth1 with the physical interface eth1
assigned to it, in addition to the default bridge eth0/peth0 created when I
boot the server?
You can try experimenting with the wrapper script, maybe others can
help you get it work.
Or you can simply comment out the entry from xend-config.sxp, and use
OS config scripts: /eyc/sysconfig/network-scripts/ifcfg-* on
RHEL/centos.



--
==============================================
Nuno Ricardo Santos Loureiro da Silva Ferreira

NMR Spectroscopy Research Group
Bijvoet Center for Biomolecular Research
Utrecht University
Bloembergen gebouw
Padualaan 8, 3584 CH Utrecht
The Netherlands

P: +31.(0)30.253 9932
F: +31.(0)30.253 2652
E: n.l.ferreira@xxxxx
W: http://nmr.chem.uu.nl
==============================================


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

<Prev in Thread] Current Thread [Next in Thread>