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-devel] Communication between Domain0 and Domain1

On Jul 16, 2004, at 8:08 PM, Richard Ta-Min wrote:


I am using 'xen unstable / xenolinux 2.4.26' and I am having some problems to get the domain0 and domain1 to communicate with each other. The python

Hi Richard,
In addition to what Ian mentioned, I've found it's personally best to assign static IP to your host OSs. It removes any question of what IP they may be getting assigned which removes one variable from any networking/connectivity debugging.

The way the networking works currently (-unstable) is just like a typical router/firewall type setup:

(internet) <-> [fw eth0] <-routing-> [fw eth1] <-> [host eth0]

is equivalent to how the networking is set up with Xen between the dom0 host and the VMs:

(internet) <-> [dom0 eth0] <-routing-> [dom0 vif] <-> [VM eth0]

If you're comfortable with using bridging, then when you create the bridge interface and bind the dom0 eth0 and vif to it, you're essentially telling the dom0 OS to copy any packets it recieves on the eth0 physical device to also go to the dom0 vif, which will pass that traffic to the eth0 of the virtual host. It's bypassing any explicit routing decisions on dom0 and just saying "pass all traffic directly to the vif as if it were plugged into the external interface." The dom0 host should be able to access the VM host via whatever IP address you've assigned as well since it should "see" that IP directly just as anything else on the network will. (I haven't had the best luck with Linux bridging though. Occasionally the bridge just "goes away" and mysteriously stops passing traffic to the bridge interfaces...)

An alternative (and the way I prefer because of the bridge issues) is to skip the bridging and just use your dom0 host as a firewall. Assign the dom0 vif an IP like, then assign the VM eth0 an IP like and point to as the default route for the VM. Create an ethernet alias on the dom0 host for whatever external IP you wish to assign to the VM, and use iptables to NAT traffic to/from that interface. Everyone else on the network will see the VM as the external IP you've assigned, but the dom0 host itself will use the address to access the VM. This is the way I've set up my Xen dev box and it's working great for me.

"I think that's what they mean by   |
"nickels a day can feed a child."   |       http://www.eff.org/
I thought, "How can food be so      | http://www.anti-dmca.org/
cheap over there?"  It's not, they  |--------------------------
just eat the nickels." -- Peter Nguyen

This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
Xen-devel mailing list