Benjamin Weaver
2011-Jul-01 09:10 UTC
[Xen-users] Binding Xen vm migration traffic to travel over 1 network card (nic)
We are running Xen 4.0 on Debian Squeeze. We have set up a 2-node cluster and successfuly migrate vm instances between them. But we want to be able to select a particular nic to handle the migration traffic. Xen documentation and discussion sometimes refers to a hypothetical network configuration in which ''one network interface goes to the outside world, and the other, connected by crossover cable, handles xen management, including migration.'' Right, so how is this setup achieved, such that migration travels only over one nic on each of the 2 nodes, the xend xm commands having been bound to travel over that nic? An example command, assuming box1 and box2 are the 2 nodes: box1# xm migrate lucidxentest.phon box2 --live To be clear, I am pretty sure this is not a vm (domU) configuration issue; rather a dom0 configuration issue. Is the binding to a particular nic achieved through Xend configuration? or is it done externally, by adding routes, etc.? _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Simon Hobson
2011-Jul-01 10:26 UTC
Re: [Xen-users] Binding Xen vm migration traffic to travel over 1 network card (nic)
Benjamin Weaver wrote:>Is the binding to a particular nic achieved through Xend >configuration? or is it done externally, by adding routes, etc.?OK, first off it''s not a Xen issue, rather a general IP routing issue - the key is understanding how kernel routing works. There are several ways to achieve what you are looking for. The first, and probably simplest is to have a separate network for management traffic. Add a second NIC in each physical machine, and hook them all together either via a switch, or for two machines, with a cable. Use a private network address on the management network, and address management traffic to the private addresses. Eg, if you give hsot1 the IP address 192.168.57.1, and the second 192.168.57.2, then you could simply route management traffic via that network by using the appropriate address. Ie, if on host1 you send traffic to 192.168.57.2, then the kernel will automatically route it via the management network since it''s a directly connected network. As I said, this is by far the simplest and needs no manual intervention to routing tables. It works because by default, the kernel will always route traffic for "locally connected" hosts via a directly connected network - ie if a host is in the same subnet, then it can be reached without going through any routers. Only if the destination isn''t directly connected will it start looking for other routes - most usually a single default router. If you want to still refer to hosts by their "frontend" addresses/URLs, then you could setup the same backend/management network, but you''d need to put explicit routing rules in. It''s outside my area of expertise, but I would have thought you should be able to put in a static host route (on host1) so that a.b.c.d routes via 192.168.57.2, and the corresponding reverse route on host2 of a.b.c.e routes via 192.168.57.1. I''m not sure if you need to do anything special to make this route take priority over the directly connected route via the frontend network. There are probably some more "imaginative" and complicated techniques, but I suspect the first will do you. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users