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/
Home Products Support Community News


Re: [Xen-users] Specific vif-route or vif-bridge in DomU config file?

To: Shannon <slafferty@xxxxxxxxxxx>
Subject: Re: [Xen-users] Specific vif-route or vif-bridge in DomU config file?
From: "Todd Deshane" <deshantm@xxxxxxxxx>
Date: Mon, 19 May 2008 17:47:34 -0400
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 19 May 2008 14:48:03 -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:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=IuCrOcPXKQWfrTDYNibT6pehVn3CVyQo0Bf6eoIlKEk=; b=mIyu+rxHOUr6EnLS6T1qKDt3sbMMxCARYzPa6HyMAc6NHRMU9qVc2k/keRdE+4QjZ43aPwvhfsnTgO5Qxv9j9pstQr++QSFx/yo5Mcnz+1PfW1uZJOKyVThU9F0jTIj+PTO6JzBFivaBtwLzDA+SdhxjgLG3Taq+QyrRQQ36UQU=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dgnwQ5lP5IR8wRZfM2MfgJlil3c+Pn6hksD9xzSqjo8lKi5d0hsyhJy/tXqljs0yXThkTPn5azzWr44y1qzknADy7mwTsnfuea9FL5vcBiPSbYnQ80y5RpZYormNYO39tB5mAZV6i18qMeHJ1HQbCyaC1+HrZL+UZi/GJA4gEQo=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4831E900.7080604@xxxxxxxxxxx>
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: <4831E900.7080604@xxxxxxxxxxx>
Reply-to: deshantm@xxxxxxxxx
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hi Shannon,

On Mon, May 19, 2008 at 4:54 PM, Shannon <slafferty@xxxxxxxxxxx> wrote:
>   Is there any way to specific on the vif = [] line of a DomU config if an
> interface should be routed or bridged?
>   Have a situation that I believe calls for wanting to use both methods at
> the same time.  (Bridging for almost everything, but routing for a few
> special use case DomUs)... I thought I saw mention in a man file someplace
> that this could be specified, but no ideal where I saw it now...
>   Basically, we have a physical box with two ethernet ports, one goes to our
> internal private LAN, the other connects to the outside world.. want to
> fullfill three needs:
>      - Every DomU needs to be able to access the private network that hangs
> off eth0, but doesn't need to be accessible FROM the private network
> (bridging at use).
>      - Every DomU needs to be able to access the internet (hanging off
> Dom0's eth1), and *some* need to be accessible from the rest of the internet
> (routing at play).
>      - Every DomU needs to be able to communicate with *each other*, freely,
> on the 192.168.x.x network that was created by libvirtd (or where-ever that
> was started)..
> The first two I have working fine, using vif-route network-route, and some
> manual manipulation of the routing tables on the DomUs... the last one is
> driving me insane, as traffic from one DomU to another is showing up (for
> instance, in nfs, and even tcpdumps) as coming from the Dom0's IP address
> instead...   If I use brctl manually and add the appropriate vif#.0 to the
> bridge, it works okay, but if I can't automate it, it's not going to work
> out.  (ie: having to run brctl every time a DomU is restarted != fun).
> If I switch xend-config over to bridging, I can make the third thing work,
> but lose the first two. :(   So I'm wondering if there's any way to specify
> in more detail how a specific vif should be built?   Or am I chasing this in
> entirely the wrong direction?  I'm assuming someone out there has wanted to
> do something similar before, I just can't seem to find mention anywhere
> online of *how* anyone has accomplished it. :)

Sounds like you just need to use a custom network script.

Below are a couple good links that explain it pretty well.

The basic idea is that you will use your custom script to call the proper
network scripts and setup the right netdevs, vifs, and bridges with those
scripts. Then you will connect your guest to the proper bridge.


Let us know if you have any problems making the scripts after taking a
look at those links.


Xen-users mailing list

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