networking while host is "offline"

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
theclapp
Posts: 2
Joined: 25. Jan 2010, 07:52
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Debian Linux

networking while host is "offline"

Post by theclapp »

I would like my guest to be able to a) talk to the host while the host is not connected to an outside network, and b) talk to the host and the outside network when the host *is* connected to an outside network.

As near as I can tell (I only installed VB today, but I've read the networking section), I can do (a) with host-only networking, and (b) with NAT, but not both at the same time, and switching back and forth requires a reboot of the guest.

Host: Mac OSX 10.6.2
Guest: Debian Linux
VB: 3.1.2

The sticking point seems to be that if I'm not connected to an outside network, none of the host's NICs have IP addresses, so (surprise) the guest can't talk to it.

Hmmm ... I suppose I could do both? One guest NIC is NATed, a second guest NIC is host-only. That might work.

So, any suggestions? Is there an easier way?

Update: The two NICs does work for this use-case. Still curious if there's a better way.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: networking while host is "offline"

Post by Perryg »

Due to network constraints that is the way it is supposed to work and is pointed out in the Users Manual. 6.6. Host-only networking
theclapp
Posts: 2
Joined: 25. Jan 2010, 07:52
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Debian Linux

Re: networking while host is "offline"

Post by theclapp »

Perryg wrote:Due to network constraints that is the way it is supposed to work and is pointed out in the Users Manual. 6.6. Host-only networking
Thanks, Perry, I missed the sentence on that, "A second (bridged) network would then connect the web server to the outside world to serve data to, but the outside world cannot connect to the database." This was the last sentence in a paragraph that began "Host-only networking is particularly useful for preconfigured virtual appliances", so I didn't read carefully enough or perhaps even skipped it. PEBCAK. That said, it seems to me that this usage pattern can't be *that* uncommon and it might warrant more documentation and/or a mention in the FAQ, as the sentence or paragraph to which you refer does not, even now, immediately set off bells in my head that say "this is the solution to your problem".

On the third hand, I understand that this is a free product and I'm very grateful for the product itself and the extensive documentation that it does have. Lots of OSS projects reeeally suck in that department and VB is way better than most.

I apologize for coming across as if this were a bug or mis-feature. I'd had a long day. Thanks again for the pointer and the quick answer.

-- Larry
Post Reply