VMware-like networking setup

Discussions related to using VirtualBox on Linux hosts.
Post Reply
theooze
Posts: 4
Joined: 4. Aug 2009, 14:21
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: 10

VMware-like networking setup

Post by theooze »

In VMware workstation I can define a NAT network type where my hosts can talk to each other on that network, and I'm able to run DHCP off of one of the guest systems on the network. The host system also runs a DNS proxy so I can point my guest systems at that.

I'd like to do this in VBox, but none of the network types seem to let me do this.

NAT doesn't seem to let me specify the network address range or disable DHCP, the guests can't talk to each other and the guest can't talk to the host.

The 'internal' or 'host-only' network types don't seem to allow any kind of NAT'd connection, or any kind of 'proxy dns' service to run on the host.

I've looked through the forums a little and I don't seem to find any posts that describe quite what I want to do.

Am I looking at the 'internal' type w/ some kind of iptables forwarding rules? Then what about the DNS proxy?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: VMware-like networking setup

Post by vbox4me2 »

You have to use a combo of nat and internal networking.
theooze
Posts: 4
Joined: 4. Aug 2009, 14:21
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: 10

Re: VMware-like networking setup

Post by theooze »

How? In what combination? Can you be more specific?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: VMware-like networking setup

Post by vbox4me2 »

A combo will get you 2 lan connections for each Guest, but Bridge networking would be better, see the Manual.
theooze
Posts: 4
Joined: 4. Aug 2009, 14:21
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: 10

Re: VMware-like networking setup

Post by theooze »

Yeah, that's not ideal, I want to have 1 nic in each guest.

So having multiple systems that can talk to each other on a defined network behind the same NAT isn't a common use case?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: VMware-like networking setup

Post by vbox4me2 »

Not that common, usually you use a router VM, attach a bridge and internal network to it and let it handle firewall/routing issues for the Guests on the internal network.
h1d
Volunteer
Posts: 170
Joined: 3. Jul 2008, 02:10

Re: VMware-like networking setup

Post by h1d »

It does look inconvenient that guests can't talk to host/guest but only to outside. What's wrong having 2 virtual nics?

A router VM? You create one new VM just to route traffic around guest and host?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: VMware-like networking setup

Post by vbox4me2 »

No, between Guests and the internet/extranet where you have much better control who can do what.
theooze
Posts: 4
Joined: 4. Aug 2009, 14:21
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: 10

Re: VMware-like networking setup

Post by theooze »

I don't like putting 2 nics in the guests because in the real world you use vlans and routing and such, not multiple nics and I'd like to stick to that.

The router VM seems to be a good idea, but VMware workstation supports this scenario fairly well (it runs the NAT and proxy dns on the host/guest interface). However I'm sick of waiting for vmware to update their app to run w/ newer releases of fedora which is why I ended up here (er..and the cost). the other issue w/ the router vm is it's another vm to run = less memory for other guests.

so maybe this is a feature request for vbox, where's a good place to put that?

i'll try the router vm idea for now, that seems to be the best plan going forward. i was looking at endian or untangle, maybe vyatta.
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: VMware-like networking setup

Post by vbox4me2 »

Which one depends on your skills and preference, however this router thing should remean an external feature. VBox should provide no more then the vessel. A router as intended in this instance can have extreem deep control what happens on your VM lan, that type of control should not be inside a virtualization layer.
SecretCode
Posts: 67
Joined: 17. Jul 2009, 10:20
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu, XP, other
Location: Finland

Re: VMware-like networking setup

Post by SecretCode »

theooze wrote:i'll try the router vm idea for now, that seems to be the best plan going forward. i was looking at endian or untangle, maybe vyatta.
I may be biased but SmoothWall is also a good option - runs nicely in a low-memory VM (as long as you aren't doing extensively logging and proxy caching, which aren't needed in this case), runs dhcp server, dns proxy and stuff.
akutz
Posts: 3
Joined: 22. Jul 2009, 03:30
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu, Windows

Re: VMware-like networking setup

Post by akutz »

I too am baffled at everyone's resistance to having a shared NAT sub system for VirtualBox. It's the way ALL other hypervisors do it, so that is what we're used to. I am currently working on using a host-only adapter for VMs and then routing that on the host. I'm sorry, but suggesting that I dual-home a guest or have a VM that acts as a router is just silly. I don't want the overhead -- configuration or resource wise. I want a shared NAT network that I can put VMs safely behind while testing software. Period.
akutz
Posts: 3
Joined: 22. Jul 2009, 03:30
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu, Windows

Re: VMware-like networking setup

Post by akutz »

I decided to create a proper NAT implementation for VirtualBox and documented my project at http://akutz.wordpress.com/2009/08/20/b ... irtualbox/.
Post Reply