Recommendation for network setup

This is for discussing general topics about how to use VirtualBox.
Post Reply
xtrailrunner
Posts: 1
Joined: 2. May 2018, 20:57

Recommendation for network setup

Post by xtrailrunner »

Hello,
I'm using VirtualBox for many years now and I'm really happy about this piece of software.

Now I want to setup a VM for a training and have the following requirement:
  • VM with RHEL and some server components (database, application servers) should be used by participants on their Windows laptops
  • participants should connect from the Windows host to the servers in the VM via browser using host-only adapter with a fixed IP address
  • it should be possible to access the internet from the VM using NAT adapter
The challenge is now that the VM is used in very different environments (sometimes without a network, sometimes in a network but with a different range of IP addresses). So DNS resolution could become a problem.

Now I would like to know which IP address is recommended for the fixed IP address of the network card associated with the host-only adapter. Or should I better rely on DHCP ? Or would it be better to use another type of adapter to satisfy the requirements?

Thanks in advance
Juergen
Last edited by socratis on 2. May 2018, 22:24, edited 1 time in total.
Reason: Fixed formatting.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Recommendation for network setup

Post by socratis »

Juergen,

You seem to have gotten the scenario just right; one NAT NIC for accessing the internet, one HostOnly NIC for Host-to-Guest communications.
xtrailrunner wrote:So DNS resolution could become a problem
No, not at all. The DNS information is populated from the host. And the host get that "variable" information based on its environment. So, if you're at location A, with a LAN range of 10.0.0.x and DNS from your ISP's defaults, but then you move to location B, with a LAN range of 192.168.2.x, and DNS set to 1.1.1.1, your host is going to be happy, right? Well, so will be your guests, if you leave everything to the defaults.

If you put the guests to sleep, you might have issues until it re-synchronizes , but you might have had those issues with a physical computer as well.
xtrailrunner wrote:which IP address is recommended for the fixed IP address of the network card associated with the host-only adapter
You can select anything you choose really. If you have only 1 VM, then (by default) the IP is going to be 192.168.56.101 (the first available DHCP address, check your HostOnly DHCP server). If you want to have it fixed, just pick 192.168.56.50, no one is going to complain... ;)

However, while testing this on my Win host, I noticed something interesting; the HostOnly IP for the host, was set as 169.254.x.y. That's an APIPA address. I don't remember that being the case! And I have no clue when that changed! Before it used to be that the host's HostOnly IP was 192.168.56.100, and the DHCP server was set to give IPs from .101 to .254. Something changed in there and I've missed it (?).

Anyway since the situation is as is, I'd suggest editing the HostOnly properties and "fix" your IPs:
  • 192.168.56.40 (fixed) for the host, configurable from the HostOnly properties (choose "Configure Adapter Manually").
  • 192.168.56.50 (fixed) for the guest, configurable from within your guest.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply