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

Re: [Xen-users] Virtual network inside a private network



On 10/29/06 22:41, Alex wrote:
> Hello,
> 
> I am trying to set up the following on my existing network. I guess its
> virtual network inside a private network.
> I have a server (192.168.0.130) running 4 regular vms
> (192.168.0.131,132,133,134)
> to which I can connect from within my companys private network.
> 
> [company router : 192.168.0.1] --- [internet]
> |
> [my desktop client : 192.168.0.120]
> |
> [Dom0 server: 192.168.0.130]
> |
> [DomU vm1: 192.168.0.131]
> [DomU vm2: 192.168.0.132]
> [DomU vm3: 192.168.0.133]
> [DomU vm4: 192.168.0.134]
> 
> What I need is to test a client server application where server parts
> run on
> its own network (ex: 68.210.25.10,11,12,13) using those 4 VMs and I should
> be able to access them from 192.168.0.120 client address. The server app
> doesnt work on the internal network addressing.
> 
> [company router : 192.168.0.1] --- [internet]
> |
> [my desktop client : 192.168.0.120]
> |
> [Dom0 server: 192.168.0.130]
> |

Note Dom0 will also need to have an address like 68.210.25.1 that sits
on the internal network between dom0 and the domUs

> [DomU vm1: 68.210.25.10]
> [DomU vm2: 68.210.25.11]
> [DomU vm3: 68.210.25.12]
> [DomU vm4: 68.210.25.13]
> 
> What is the best way about implementing that and are there any guides or
> scripts.

http://lists.xensource.com/archives/html/xen-users/2006-09/msg00925.html

(the HTML code wrapped the following line, which should be a single line:
mac=${mac:-$(awk 'BEGIN { printf "00:16:3e:%02x:%02x:%02x",
int(rand()*127),
int(rand()*255), int(rand()*255); }')}

Once you have the network-private set up, you will need to enable
forwarding and routing in dom0 and your desktop like normal.

on desktop
route add -net 68.210.25.0 netmask 255.255.255.0 gateway 192.168.0.130

on dom0
echo 1 > /proc/sys/net/ipv4/ip_forward

John

_______________________________________________
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®.