[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-users] Creating multiple bridges
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 yesI 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=beth1The 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 interfacesThe 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.logSo, 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |