How Can a Host Access an Internal Network?

This is for discussing general topics about how to use VirtualBox.
Post Reply
hypatia
Posts: 24
Joined: 17. Dec 2009, 22:51
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linuxes and Windowses

How Can a Host Access an Internal Network?

Post 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
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: How Can a Host Access an Internal Network?

Post 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.
Bill
hypatia
Posts: 24
Joined: 17. Dec 2009, 22:51
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linuxes and Windowses

Re: How Can a Host Access an Internal Network?

Post 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
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How Can a Host Access an Internal Network?

Post 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.
hypatia
Posts: 24
Joined: 17. Dec 2009, 22:51
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linuxes and Windowses

Re: How Can a Host Access an Internal Network?

Post 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
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How Can a Host Access an Internal Network?

Post by Perryg »

You really should read the VirtualBox users manual.
See Chapter 6.6 Host-only networking
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: How Can a Host Access an Internal Network?

Post 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.
Bill
hypatia
Posts: 24
Joined: 17. Dec 2009, 22:51
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linuxes and Windowses

Re: How Can a Host Access an Internal Network?

Post 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!
Post Reply