Advanced Networking

Discussions related to using VirtualBox on Windows hosts.
Post Reply
miketrains03
Posts: 8
Joined: 7. May 2009, 06:21
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Xp, XP64, Server2008, Ubuntu, Fedora

Advanced Networking

Post by miketrains03 »

Hey Guys,

I have been using Virtualbox for a while now. I have a good machine to host the virtual machines from, so i usually run 2 or 3 servers while i'm away and up to 8 while home doing mischievous stuff.

I currently have 3 ethernet adapters on my computer. One for general use, and the other two are bridged to individual virtual servers which allows me to port forward to them for programs which, seems to be the only way i have seen to give a virtual machine a personal ip that can be seen from outside the host. I'd like to have some other servers, but i only have so many pci slots free and multi-port nic's are pricey. I guess i could slap on a bunch of usb network adapters, but i would rather avoid that.

Is there a better way to network virtual machines other than individual bridged connections in which its indistinguishable to each other, my switch, and the outside world that they aren't real computers?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: Advanced Networking

Post by vbox4me2 »

It depends on what the purpose is of having that, I bridge about 8 connections into one gigabit nic, no problems there. You could do some more advanced stuff by using a virtual router(as a VM) and thight masks but it would still be using the main bridge.
miketrains03
Posts: 8
Joined: 7. May 2009, 06:21
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Xp, XP64, Server2008, Ubuntu, Fedora

Re: Advanced Networking

Post by miketrains03 »

The purpose is so can forward ports from my router directly to the vm and only that vm for ftp,remote desktop, etc.

The second function would be to create a virtual server environment with file server, exchange server, dns server etc all be virtual, yet be able to be connected to from a physical computer on my network.

If you bridge two vm's to one nic, does the router treat them as the same computer or do they come up with seperate macs and ips?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Advanced Networking

Post by Perryg »

You can and should assign different mac ads to each (virtual adapter) and yes each one will get its own IP address. Has to or the IP that is assigned will kill both that machine and the other one that has the same IP. To the host, each other, and outside world they will appear as individual computers. To segment them you should be using a vlan if your router supports it.
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: Advanced Networking

Post by vbox4me2 »

For that purpose you don't do to anything special other then making sure each VM has its own fixed IP, the router's config is where you then address what goes where.
miketrains03
Posts: 8
Joined: 7. May 2009, 06:21
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Xp, XP64, Server2008, Ubuntu, Fedora

Re: Advanced Networking

Post by miketrains03 »

Ok, well thats great news. I'm going to test it out tonight. Its sure going to save me on network adapters. I figured there would have to be a way since i know serious vmware setups can have over 40 vm's share a 20gb fiber connection.

The next part of this is more difficult. If i forward a port in my router to a vm's ip address, does the packet actually get sent to the host computer, then is translated by virtualbox, or does it go right into the vm?
Post Reply