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] 802.1Q VLAN vs xenbr0

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] 802.1Q VLAN vs xenbr0
From: "Marco Sinhoreli" <msinhore@xxxxxxxxx>
Date: Mon, 10 Mar 2008 19:11:22 -0300
Cc: Dariusz Malec <dariusz.malec@xxxxxxxxx>, Tiago Cruz <tiagocruz@xxxxxxxxxxxx>, Luciano Rocha <strange@xxxxxxxxxxxxx>
Delivery-date: Mon, 10 Mar 2008 15:11:56 -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:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=TxdaITGHJa4qrSfGqmpuMtBoYaKHq/gt0WUyVHnfQL4=; b=RJhjmyO0xWFYaxmvFtSgu8IVnhJJ3ghaqCT/uE0ZRZI4bb81rByr2LtbJfhgS2HUwkTn4W7pCtCZGf7O20+d1qupe0E6ce4IYzU8ckhY8pSX+5IrA5AehrLZTkKseHMdlMfn2GgsJHQjI/86P0IKnfrIo8uy8yB2t4zMHkGNzgY=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=mkTYFERPGeuJCjPEDSiinmeJVnB4o3U0RfCnOdll81UopiHQRUazQsZJCjsqS7oL7abamRGEWdvTbybZPTGa75G+/VWNRTKi+QF8n3eQpHjLvmTwyr4Y7e8taNepbeHkCyjX2lfLdeGsKkOR7Pz8rWtQEGx2ixWTtphb/bq/dyI=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080310185525.GB13831@xxxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <1204741650.20400.26.camel@xxxxxxxxxxxxxxxxxxx> <47CEEBAB.9060003@xxxxxxxxx> <1204743888.20400.32.camel@xxxxxxxxxxxxxxxxxxx> <47CEF186.8050200@xxxxxxxxx> <1204756968.20400.49.camel@xxxxxxxxxxxxxxxxxxx> <47CFAD96.3010700@xxxxxxxxx> <1205173485.2313.174.camel@xxxxxxxxxxxxxxxxxxx> <20080310184812.GA13831@xxxxxxxxxxxxxxxxxxxxxx> <20080310185525.GB13831@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hello guy's,

I have used vlans in my virtual environment with success but I needed
to change the network-bridge script to make this set up to work
because the original network-bridge not work with vlan. This is my
network-script changed:
http://msinhore.xen-br.org/scripts/network-bridge
I also created a new xen script called network-bridge-multi to create
multi bridges up bonded interfaces with vlan tag:

#! /bin/bash
dir=$(dirname "$0")
"$dir/network-bridge" "$@" vifnum=2 netdev=bond0.2 bridge=vlanbr2
"$dir/network-bridge" "$@" vifnum=3 netdev=bond0.3 bridge=vlanbr3
"$dir/network-bridge" "$@" vifnum=4 netdev=bond0.4 bridge=vlanbr4
"$dir/network-bridge" "$@" vifnum=5 netdev=bond0.5 bridge=vlanbr5

In this example, I have used the bridge name 'vlanbr' + tag_id. You
can change it to xenbr0 in another interface tagged. Example:

dir=$(dirname "$0")
"$dir/network-bridge" "$@" vifnum=0 netdev=eth0.272 bridge=xenbr0
"$dir/network-bridge" "$@" vifnum=1 netdev=eth0.273 bridge=xenbr1
[...]

To use this set up you need change the network-script var in
/etc/xen/xend-config.sxp file to:
(network-script network-bridge-multi)

Now, if you need only one interface, change only the 'network-script' to:
(network-script 'network-bridge netdev=eth0.272 bridge=xenbr0')

Remember, the original network-script do not work with vlan.

Regards,


-- 
Marco Sinhoreli

On Mon, Mar 10, 2008 at 3:55 PM, Luciano Rocha <strange@xxxxxxxxxxxxx> wrote:
> On Mon, Mar 10, 2008 at 06:48:12PM +0000, Luciano Rocha wrote:
>  > On Mon, Mar 10, 2008 at 03:24:45PM -0300, Tiago Cruz wrote:
>  > > Hello!
>  > >
>  > > On Thu, 2008-03-06 at 09:38 +0100, Dariusz Malec wrote:
>  > >
>  > > > What does it mean "you lost your vlan"? if you have assign an ip addres
>  > > > to eth0.260 interface you will lost a communication when you add this
>  > > > interface to the bridge.
>  > >
>  > > Yep. I was using ssh to manage one remote computer, and I lost this
>  > > connection when I've added the bridge.
>  > >
>  > >
>  > > > Try to configure eth0.260 with no ip addr assigned, add this interface
>  > > > to the bridge and assign ip address to the xenbr0 interface. You should
>  > > > be able to ping your hosts in vlan260 from dom0.
>  > >
>  > > I've tried a lot of combination, and my final solution was:
>  > >
>  > > - Does not use any IP/Alias on bridge interface
>  > > - Use another VLAN (TAG 272 on my example) to management
>  > >
>  > > Some like this:
>  > > http://wiki.xen-br.org/images/4/4b/Xen.png
>  > >
>  >
>  > I use the attached script for managing the bridges. Note that I use the
>  > format VLAN_PLUS_VID_NO_PAD for the vlan interfaces (eg: vlan272).
>  <snip>
>
>  I'm getting forgetful in my old age.
>
>  Files now really attached.
>
>  --
>  lfr
>  0/0
>
> _______________________________________________
>  Xen-users mailing list
>  Xen-users@xxxxxxxxxxxxxxxxxxx
>  http://lists.xensource.com/xen-users
>



-- 
Marco Sinhoreli

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

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