Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
    
What software are you using to host the VM's? I'm guessing this is Windows Virtual PC or Windows Virtual Server. –  John L Veazey Oct 28 '10 at 4:50
    
VMWare Server.. –  david Oct 28 '10 at 4:56
add comment

migrated from stackoverflow.com Oct 28 '10 at 5:27

This question came from our site for professional and enthusiast programmers.

2 Answers

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.

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.

share|improve this answer
    
I'm new to SuperUser and don't yet have priviledges to include more than one link in a post. For additional links relating to this, please see my answer on StackOverflow (stackoverflow.com/questions/4039770/…) –  jveazey Oct 28 '10 at 6:08
add comment

both 172.16-32.x.x and 192.168.x.x are special non-routable private IPs. You'll need to move them into the same subnet.

share|improve this answer
1  
This is possible, if NAT is thrown into the mix and the VM software can provide the appropriate networking functionality. –  John L Veazey Oct 28 '10 at 5:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.