Page 1 of 1
How Can a Host Access an Internal Network?
Posted: 1. Nov 2011, 17:28
by hypatia
Howdy,
I'm setting up a virtual network lab with several guests (all Linux) on two separate internal networks with one guest acting as a router.
I also want to avoid using the Virtualbox GUI as much as possible (except to initial guest set up).
It looks like every host would require 2 NICs (one host-only, and the other internal). This seems like an overly awkward setup. Can I place the host on an internal network so that I can ssh to the guests? That wouls bee much simpler.
Thanks,
Hypatia
Re: How Can a Host Access an Internal Network?
Posted: 2. Nov 2011, 00:58
by BillG
No, you cannot access the internal network from the host. It can be used by virtual machines only.
If you are going to have a router anyway, why not give it three NICs and link your two internal networks to the physical network?
You can then access the lab from the host (or any other machine on the LAN). You can even give your private networks Internet access if you want.
Re: How Can a Host Access an Internal Network?
Posted: 2. Nov 2011, 14:29
by hypatia
Thanks, I was beginning to suspect that I wouldn't be able to do it the way I'd hoped. I think I'll give the router box an additional host-only NIC. It'll be the cleanest solution. I'd just hoped that I'd overlooked something in the docs. It seems like allowing the host onto an internal network would be a simple and useful thing to implement. Maybe I'll make a feature request, I can't be the only one who'd want this.
Thanks again,
Hypatia
Re: How Can a Host Access an Internal Network?
Posted: 2. Nov 2011, 14:53
by Perryg
The Internal network was designed to *not* allow the host. It was for isolation and should stay that way.
If you want you host and guests to communicate and keep the guests out of the local lan use host-only.
Re: How Can a Host Access an Internal Network?
Posted: 2. Nov 2011, 18:47
by hypatia
Perryg:
Are you saying that two or more guests with just host-only interfaces can talk to each other?
Wow, that's completely different than the way I thought host-only worked. I'll have to try it out.
Thanks,
Hypatia
Re: How Can a Host Access an Internal Network?
Posted: 2. Nov 2011, 18:59
by Perryg
You really should read the VirtualBox users manual.
See Chapter 6.6 Host-only networking
Re: How Can a Host Access an Internal Network?
Posted: 3. Nov 2011, 07:09
by BillG
hypatia wrote:Perryg:
Are you saying that two or more guests with just host-only interfaces can talk to each other?
Wow, that's completely different than the way I thought host-only worked. I'll have to try it out.
Thanks,
Hypatia
It would work but you have completely ruined your simulation. You no longer have two machines in different networks joined by a router! You have two machines joined to a third machine all in one network.
If you are going to set up a network lab it should not depend on the host in any way. The network design should be completely independent of the host.
Re: How Can a Host Access an Internal Network?
Posted: 3. Nov 2011, 14:33
by hypatia
Having the guests available to the host is just a matter of convenience for me. The host would be "out of band" of the network.
I want to avoid using the console, so I want to ssh into the hosts even when I break the router (which is highly likely in this project).
Every one here has been really responsive and helpful. Thanks!