Networking issuse

Discussions about using Windows guests in VirtualBox.
Post Reply
heir
Posts: 3
Joined: 6. Sep 2009, 11:04
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Server2008

Networking issuse

Post by heir »

Trying to use VBox as a lab environment for studying MCITP Server 2008 (70-640, 70 642, 70-643).

The problem is that the vm's needs to be able to interact with each other and access to Internet is also required.
Th lab environment should be hidden from computers outside Virtualbox - that is computers on my "home-LAN".

The lab network needs it's own IP-address range (separate from the host -W7 x64)
Trying to use NAT but the the vm's can't ping each other both can ping their gateway (the same for both)
Trying do have a server joining a domain - doesn't work either.

Looking at the different options to set up Vbox networking, NAT, internal, bridged, Host only.
No one seems to fit my scenario. The closest seems to be Host only.

I'm trying to understand Host Only networking in the user manual but I don't understand the part in setting up a second network to be able to connect to the outside world.
Host-only networking is particularly useful for preconfigured virtual appliances, where multiple virtual machines are shipped together and designed to cooperate. For example, one virtual machine may contain a web server and a second one a database, and since they are intended to talk to each other, the appliance can instruct VirtualBox to set up a host-only network for the two. 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.

Just one sentence that leaves some guessing.
Is the outside world in this case Internet or would it also include the physical network that the host is connected to?
How is that second network to be set up?

How do I set it up so that vm's can communicate with each other and also have access to Internet through the host machine?


Host machine: 192.168.0.x /24
vm.s: 10.0.0.x /24 (of course any C-net within that A-net can be used)

And does it matter which virtualized network adapter that's used inside VB for different OS's? (Client/Server)
AMD PCNet PCI II;
AMD PCNet FAST III (the default);
Intel PRO/1000 MT Desktop;
Intel PRO/1000 T Server;
Intel PRO/1000 MT Server;
Paravirtualized network adapter (virtio-net).
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 issuse

Post by Perryg »

I'm trying to understand Host Only networking in the user manual but I don't understand the part in setting up a second network to be able to connect to the outside world.
Host-only will allow the host and any VM guest that you have set to host only the ability to communicate. The reason for the second adapter set to NAT is so the guest can have the ability to get to the Internet.
And does it matter which virtualized network adapter that's used inside VB for different OS's? (Client/Server)
The only requirement is that the guest needs the right drivers. Use the Intel PRO/1000 MT server and or desktop, depending on what the guest needs.
heir
Posts: 3
Joined: 6. Sep 2009, 11:04
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Server2008

Re: Networking issuse

Post by heir »

Thanks Perryg!

Let's say in my case then:

I have a server 2008 running AD DS and therefore is the domain controller in my lab environment. It's also the DNS-server.

If I set up a second network (NAT) connected to that server will the rest of the computer connected in that network be able to access Internet? (Will that computer act as a router automatically?)

Is any additional configuration needed on the NAT network or would just default values do? ( as long as there are no address conflict? )
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 issuse

Post by Perryg »

I think you will find that a little more difficult then just setting up NAT in each guest. Then when the guest does not need the Internet you pull the virtual cable (easily done in the guest while running now).
heir
Posts: 3
Joined: 6. Sep 2009, 11:04
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Server2008

Re: Networking issuse

Post by heir »

Thanks Perryg!

That sounds wise as I only think that Internet access will be needed to download stuff to install on the vm's (and win update).

I'll go with that and I'll see how long it holds the labs in the selfstudy-kit environment.
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: Networking issuse

Post by BillG »

If you are trying to run a domain network I would strongly recommend that you run it in an internal network. Give the DC a static IP in its own IP subnet. When you run dcpromo, accept the offer to set up DNS for you.

Either give your client machines static IPs or run your own DHCP server on the DC. Because you are on an internal network you can run DHCP without upsetting anything on the physical network.

To get Internet access run your own NAT router in a vm. (Private interface in the internal network and public inerface bridged to the physical network). Do not enable the DHCP option in this router or use the DNS forwarding option. The DHCP allocator in NAT will give your clients the wrong DNS setting. With AD all clients must use the local DNS only. Set your local DNS to forward to a public DNS service (such as your ISP or 4.2.2.2) to resolve foreigh URLs for the local machines.

Incidentally this is not exclusive to VBox or any other virtualization program. This is essentially what you need to do with AD on a physical network. AD depends on DNS to find domain resources and only the local DNS has these records.
Bill
Post Reply