[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.