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] Help me to set up network (routes)

AlannY wrote:


Ok. I found more better solution. It's called Bridging+NAT.

So, a small tutorial.

1) With methods of your OS create a dummy (empty) bridge: br0 (setup its options).
2) Set up IP for bridge. (For example, 10.0.2.1)
2) Edit /etc/xen/xend-config.sxp:
    (network-script /bin/true)
    (vif-script vif-bridge)
3) Edit your VM configuration file:
    vif = [ 'bridge=br0' ] # it's the bridge, which we created in step 1
4) Load DomU. Change DomU network configuration:
    IP: Any IP in network specied in step 2 (for example, 10.0.2.2)
    Mask: Mask from step 2 (for example, 255.255.255.0)
    Gateway: Bridge from step 1 IP (for example, 10.0.2.1)
5) In Dom0 apply 2 iptables rules (kernel must be compiled with NAT support):
    iptables -t nat -A POSTROUTING -s <IP FROM STEP 4> -j MASQUERADE
iptables -t nat -A POSTROUTING -d <IP FROM STEP 4> -o <BRIDGE FROM STEP 1>
6) Start DomU

That's all. Dom0 accessed from DomU via Bridge IP (step 2). DomU accessed from Dom0 via DomU IP (STEP 4).

Everything must work at this point ;-)

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