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 a newbie networking question. In my office there are about 200 machines on 192.168.0.x IPs. At home I have a similar setup but with far fewer IPs. I run 5 virtual machines on my local machine and I have given them all 192.168.0.x IPs too but this seems wasteful because they only ever need to talk to one another. The default gateway is 192.168.0.1. Should I give my VMs IPs of 192.168.100.x ? 192.168.122.x ? What's so special about having VMs on 192.168.100.x / 192.168.122.x IPs ? If this is the right thing to do, what should the default gateway be set to ? I assume that if I have a VM with a 192.168.100.x address when it won't be able to use the 192.168.0.1 gateway ? Many thanks.

share|improve this question
1  
There's nothing particularly special about the third octet of the address, whether it's 0, 1, 100, 122, or what-have-you; as long as the gateway and the machines are all on the same subnet, it'll work. The default gateway can be whatever you like, but using 192.168.x.1 is typical -- if the VMs are on 192.168.100.x, then the gateway must be 192.168.100.*something*, and ideally will be 192.168.100.1. Best way to do this would be with your VM host's NAT. Please identify your VM host (VirtualBox, VMware, &c., &c.) and I'll see if I can offer more specific advice on how to set that up. –  Aaron Miller Oct 2 '12 at 12:37
    
@Aaron Miller Thank you. I'm using VirtualBox.. I'll experiment now after reading your tips +1. –  ale Oct 3 '12 at 7:56
add comment

1 Answer

up vote 1 down vote accepted
  1. If you ever decide to make a tunnel from your home to your office then better change all 192.168.0.x addresses on your home network to, say, 192.168.1.x. This will eliminate routing problems when tunnel is active.

  2. There is not very much special on using 192.168.100.x or whatever different subnet for your VM's. You have to set up the address within the same subnet to the VM host's virtual interface that is used to communicate with VM. you need to tell VM that its default router is this address.You need to tell the other machines on your LAN that this subnet is reachable through this hosts by setting appropriate routes.

The answer to your last question: Yes, your assumption is correct. See the point 2) in my answer how to solve it

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.