views:

43

answers:

1

I have 2 VM's, A and B, running Red Hat EL 4.5, on a host machine running Windows XP.

A's ip is 192.168.1.100

B's ip is 172.16.1.100

I have setup 2 virtual networks on Microsoft Loopback Adapter

192.168.1.1 with subnet mask 255.255.255.0

172.16.1.1 with subnet mask 255.255.0.0

I am trying to SSH from A to B:

user@B ~ # ssh 172.16.1.100

but I am getting "Network is Unreachable" error

Any advice? Thanks

A: 

Complex networking with Virtual PC / Virtual Server in combination with Internet Conneciton Sharing (ICS) can be fairly flakey with Windows XP. Changes to the the network configuration on the host machine can easily break networking on the VM's, until a reboot or can even require the whole network be rebuilt.

Assuming you have the Loopback Adapters connected to the host's NIC using ICS, it is just a matter of routing the information - from one private network, to your host server, and then back to the other private network. If not, here's a few informative articles that I used when setting up Windows Virtual PC and then Windows Virtual Server.

Once you have the communication between the host and the VM's going, it is just a matter of routing the information from one private network, to your host server, and then back to the other private network.

Because 192.168.1.* and 172.16.1.* are both private networks, you cannot connect to one from the other - directly. You'll need to configure the NAT settings in ICS on the host machine for this. Using your example, you'll need to route the SSH port on the host to 172.16.1.100. Once this is done, you can finally connect from 192.168.1.100 to 172.16.1.100 SSH by connecting to the host machine on the SSH port.

user@B ~ # ssh hostIP

As you can see, this can work, but it requires a great deal of effort to get it working and has the potential to stop working suddenly. If you are wanting to deal with multiple ports - not just SSH, I would seriously reconsider using multiple private networks.

John L Veazey
Thanks that was really informative
david
Note: I fixed it using IP aliasing in my Red Hat VM's
david