Welcome to Dream.In.Code
Getting Help is Easy!

Join 109,297 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,204 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Vmware routing

 
Reply to this topicStart new topic

Vmware routing, vmware virtual network

skaoth
post 24 Feb, 2008 - 08:42 PM
Post #1


D.I.C Regular

Group Icon
Joined: 7 Nov, 2007
Posts: 323



Thanked 5 times

Dream Kudos: 100
My Contributions


I've got a question on how to go about setting up a virtual network with vmware instances.

What I've got so far is this:

host1: 192.168.44.90, mask: 255.255.255.0
host2: 192.168.44.80, mask: 255.255.255.0
Gateway: 192.168.44.44

I've also got 2 vmware instances running kubuntu on each host.
The hosts are using vmwares NAT network configuration with DHCP. The address
for those are respectively

Vmware instances on host 1
VM1: 192.168.249.128, mask: 255.255.255.0
VM2: 192.168.249.129, mask: 255.255.255.0

Vmware instances on host 2
VM3: 192.168.200.128, mask: 255.255.255.0
VM4: 192.168.200.129, mask: 255.255.255.0

Each of the VM instances can talk with their host and the
other VM instances that are on the same class C address.


My question is how do I go about setting up getting
VM3 and VM4 to talk with VM1 and VM2 and vice versa.

I know I need to setup a router. I don't have much knowledge
on how to setup a linux box as a router so any info would
help.

I'm wondering if this can be done as a VM instance on either host1 or host2?
Do both host1 and host2 have to have 2 nic interfaces to be able to route
to the VM instances class C addresses?

What I've found on the net is how to route between 2 class C Vmware instances
on the same box which is not what I want.

Any help is appreciated.
User is online!Profile CardPM

Go to the top of the page


baavgai
post 25 Feb, 2008 - 07:54 AM
Post #2


Dreaming Coder

Group Icon
Joined: 16 Oct, 2007
Posts: 1,572



Thanked 44 times

Dream Kudos: 325

Expert In: C, C++, Java, C#, ASP.NET, PHP, Perl, Python, Oracle, SQL Server, MySql, HTML, JavaScript, Lua

My Contributions


I'm a little confused here, bear with me.

QUOTE(skaoth @ 24 Feb, 2008 - 10:42 PM) *

host1: 192.168.44.90, mask: 255.255.255.0
host2: 192.168.44.80, mask: 255.255.255.0
Gateway: 192.168.44.44


Just to confirm, this is physical hardware?

QUOTE(skaoth @ 24 Feb, 2008 - 10:42 PM) *

I've also got 2 vmware instances running kubuntu on each host.
The hosts are using vmwares NAT network configuration with DHCP. The address
for those are respectively

Vmware instances on host 1
VM1: 192.168.249.128, mask: 255.255.255.0
VM2: 192.168.249.129, mask: 255.255.255.0

Vmware instances on host 2
VM3: 192.168.200.128, mask: 255.255.255.0
VM4: 192.168.200.129, mask: 255.255.255.0


You've got two physical boxes, with each with two VMWare instances? All of these instances have a static IP defined?

So... where does DHCP come in. Also, you're using NAT? So communications for those VMWare machines will all look like they came from the host. So, it's sort of irrelevant what their addresses are?

Beyond that, they're each in a different subnet, so they couldn't find each other anyway...

I'm assuming you're trying to figure out the joy of routing and you have vmware? Here's what I'd do...

Set up five VMWare machines on a single host. Don't get another physical box involved until you have it working on one.
So:
VM0: 192.168.249.2 AND 192.168.250.2
VM1: 192.168.249.128
VM2: 192.168.249.129
VM3: 192.168.200.128
VM4: 192.168.200.129

So, VM5 is your router / bridge. You will define two ethernet cards in it, and make eth0 192.168.249.2 and eth1 192.168.250.2. Your VM1 and VM2 will use 192.168.249.2 as a gateway, VM3 and VM4 will use 192.168.250.2. You could also use bridging...

Do not NAT. For this little experiment, you don't want any outside curiosities messing with you. Set every one of these boxes up Host-only. When you're set up, every box should be able to ping every other box. You could put web page on each one that says "Welcome to [My Address]" or something.

For quick and fun testing, you might want to boot up one of those ISO router distributions on VM0. There are a number out there. I've found http://www.zeroshell.net/eng/ to be one of the easiest to get working. http://www.freesco.org/ is also a good choice.

Hope this helps.
User is online!Profile CardPM

Go to the top of the page

skaoth
post 25 Feb, 2008 - 10:16 AM
Post #3


D.I.C Regular

Group Icon
Joined: 7 Nov, 2007
Posts: 323



Thanked 5 times

Dream Kudos: 100
My Contributions


Thanks for the input. I'll give this a try after work.

Just for clarification:

Just to confirm, this is physical hardware?
Yes the host1 and host2 are 2 separate Kubuntu boxes each running
2 vmware instances.

Host1: is hosting VM1 and VM2, which are also both running Kubuntu
Host2: is hosting VM3 and VM4, which are also both running Kubuntu.

So... where does DHCP come in. Also, you're using NAT?

1) My gateway is at 192.168.44.44, both Host1 and Host2 are physically attached
to this and both have a static IP address.

2) Vmware is using the NAT configuration. I'm using the default vmnet8 virtual adapter.
The instances themselves are given an IP address from Vmware's DHCP server.
I have not setup static IP on any of the VM instances.


I'm assuming you're trying to figure out the joy of routing and you have vmware?
Yes, I understand most of the networking terminology, but have never been a fan of setting up routers
and such.


Your suggestion to set everything up on 1 box seems logical and I think that there is a Vmware doc
on how to set this up.

I'll post back if I get stuck

User is online!Profile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 9/6/08 09:43AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month