Trouble grasping networking

Discussions related to using VirtualBox on Windows hosts.
Post Reply
joes3029
Posts: 1
Joined: 8. Jul 2009, 14:16
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: OpenBSD

Trouble grasping networking

Post by joes3029 »

I've set up virtualbox on my Windows 7 PC, and installed an OpenBSD system. I'd like this system to at least access other PCs on the network - internet access would also be great. However, I'm struggling to get this working. As I understand it, with NAT configuration set up, the virtual machine can reach the 'gateway' as defined in the virtualbox hostonly ethernet adaptor settings (currently 10.0.2.1) and this will translate it to the local network (my pc is 10.0.0.4(class C subnets all round)). However, this doesn't work - I can't ping (which I understand can be problematic) or access services on the local network. The virtual machine can't even ping the gateway (it's 10.0.2.4, gateway is 10.0.2.1)!

I'm probably missing something completely here, what should I look at?

Edit: I've just realised there's a Windows 7 subforum - if a mod wants to move this, that'd be great!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Trouble grasping networking

Post by Perryg »

It sounds like what you need to do is setup (2) adapters. One for host-only and the second one for NAT.

Moving to Window 7RC Host.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Trouble grasping networking

Post by Sasquatch »

The above setup is not exactly what you might need. Host only will let the VM get to the Host, but not beyond it. NAT might work fine for internet, but as the IP range is 10.0.2.x, and your own network is the same, it can cause problems. Best bet is to use Bridged. With that, the VM will be like a normal machine on the network and can acquire an IP from the network DHCP.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply