Reputation: 1991
I have 3 VMs with Ubuntu 12.10: m1, m2 and m3. Here are their IPs
m1 = 192.168.1.1
m2 = 192.168.2.1
m3 = 192.168.3.1
When I try to ping between them, I get a destination host unreachable. If I set them to 192.168.1.X, then the ping works fine, so the VM setup is working fine. The issue is when I put them in a different 192.168.X ip.
What's the ideal setup for all 3 machines to be able to ping each other?
Upvotes: 1
Views: 4150
Reputation: 3446
If you're using a normal netmask of 255.255.255.0, that means that they are on different subnets. You need to set up some way of routing between them. I don't know what virtualization software you're using, but the 2 most common ones (VMWare and Virtualbox) both have support for configuring and modifying virtual networks.
You will have to look for the network settings config options.
EDIT: Depending on what you're trying to do, dennis' answer may be easier.
Upvotes: 3