Xen Project Q&A Forum: First Line Help for Simple Questions

This is your chance to ask questions and provide answers about basic use of the Xen Project software. For debugging problems and for more complex issues, consider using the xen-users mailing list instead. You can find information about xen-users under "HELP | Mailing Lists" in the navigation bar above.


NAT Troubleshooting

posted in Hypervisor
Tuesday, October 15 2013, 06:49 AM

I want to have a XEN the following scenario:

Dom0 Connected to physical em1 with its respective IP

DomsU and Dom0 Connected through a private IP subnet, All of them being able to connect one to each other, and using Dom0 as gateway, with NAT funcionality, have internet access.

I have correctly configured in /etc/xen/xend-configure.sxp
(network-script network-nat)
(vif-script vif-nat)

On the VMs configuration files I give them an IP within the subnet:
vif = [ 'ip=,mac=00:16:3E:F4:82:8F' ]

But there is still a problem. When I do ifconfig on Dom0 I get a vifU.0 interface. I get as many vifU.0 interfaces as VMs I'm running.

So for example,
Dom0 - em1:
Dom0 - vif1.0:
Dom1 - eth0:
Dom2 - eth0:

With this scenario, Dom1 has connectivity to the Internet and of course with Dom0, but not with Dom2. Dom0 has connectivy with Dom1.

However, Dom2 doesn't have any connectivity at all, and on Dom0, if I ifconfig -a I can see that there is an interface vif2.0 that is down and is not configured.

I am a beginner to Xen. However, it doesn't make sense in my head that for the whole subnet I do have a vifU.0 interface in Dom0. Dom0 should just have one interface to the private network, and all of the DomU could see each other within the private network perfectly.

This configuration, of vifU.0 looks more to me as a bridge configuration rather than the NAT. Am I correct? Do you have any hint?


Accepted Answer

Wednesday, October 16 2013, 09:49 PM - #permalink
Hi Lars.

Thanks for your help.

I was a bit confused with NAT networking since in my opinion is not very well explained.

I ended up creating a VLAN bridging all the interfaces and then add ip forwarding at Dom0. This options suits me best.

I don't really understand how all the vifU.0 could need also an IP within the subnet formed by the DomU and vifU.0

Anyway....problem solved. Thanks.
The reply is currently minimized Show
Responses (1)
  • Accepted Answer

    Wednesday, October 16 2013, 11:05 AM - #permalink
    check out

    • http://wiki.xenproject.org/wiki/XenNetworking
    • http://wiki.xenproject.org/wiki/Xen_FAQ_Networking
    • http://wiki.xenproject.org/wiki/Xen_Common_Problems#Networking

    If this does answer the question above, please mark the issue as resolved, otherwise let me know and we will have a closer look. We will need more info, such as distro, version of xen, ...
    The reply is currently minimized Show
Your Reply