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] Xen using Multiple Networks

Hi Andrew,

On Feb 23, 2006 06:25 PM, aewert <aewert2@xxxxxxxxxxxxxx> wrote:

>
> Perhaps I should outline my idea with a bit more detail.
>
> I want to migrate my Xen server from one physical network to another
> physical network over the course of a week. To do this, I want to have
> my
> DomU's running able to bind to an IP address on both physical networks
> so
> the transition is seemless. Currently its set up with one bridge
> (xen-br0)
> which is bound to our primary ethernet interface eth0, which is
> connected to
> our old subnet.

Ok.
 
> I was thinking about creating a secondary bridge (we'll call it
> xen-br1) and
> attach my second ethernet interface eth1 (which is on the new physical
> subnet) to it. The original bridge(xen-br0, which is attached to eth0
> which
> is on the old physical subnet) would remain untouched.

Ok.

> Then I had planned to set up this second bridge interface(xen-br1)
> with a
> default route on the new subnet,

Not exactly, default route is related to the TCP/IP stack of the OS (be
it real or virtual). You can thus have only one default route per
machine (unless you use advanced routing, which is not the case here).

> and for each DomU I would have it create
> two virtual network interfaces using the following line in each domain
> config file:
>
> vif = [ 'bridge=xen-br0', 'bridge=xen-br1' ]

That's fine.

> Then would I be able to use the first virtual interface in each DomU
> to
> access the old subnet, and the second virtual interface in each DomU
> to
> access the new subnet?

Sure.

> I am concerned that this might create conflicting route-table entries.

No, it won' t. You'll end up with somethind like:

Destination     Gateway        Genmask         Flags Metric Ref    Use
Iface
old_network     0.0.0.0        255.255.255.0   U     0      0        0
eth0
new_network     0.0.0.0        255.255.0.0     U     0      0        0
eth1
0.0.0.0         old_net_gw     0.0.0.0         UG    0      0        0
eth0

For either dom0 and domU's. Default route will still be pointing the old
network gateway.

> If I
> add a virtual interface from each DomU to both bridges, is Xen going
> to be
> able to know which route to use for incoming and outgoing traffic, or
> do I
> need to use some other means of NAT along with this?

You just can't do that, the kernel won't let you add an interface to
more than one bridge. And even if you could, it wouldn't work anyway.

> I appreciate Braulio's suggestion to change the default routes using
> two
> different interfaces, but I'm still unsure how Xen will respond to
> this.

Xen is not concerned about that at all, it will just create the virtual
interfaces and enable them for you to use the way you want. Even the
bridges are created by helper scripts, not by Xen itself.

> Again, I am running Xen-2.0 and have 6 DomU machines running on my
> server.
>
> Will this idea work, if not is there a better way to do this? I'm
> looking
> for a specific example if possible.

It'll work just as if you had a physical machine with two real network
cards, each connect to one network and the default gateway pointing to
the old network gateway. When you want to move you just replace the
default route pointing to the new network gateway.

Hope that it helps.

rgrds,
Braulio Gergull


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

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