Hi All
Probably 1 area that vpc works much better for me than vbox is networking as in vpc it is possible to use a static ip address for the guest using the same ip address range as my local network. This is not possible in vbox it seems.
I am currently trying to work out how to connect to my printer from a vbox guest. The vbox guest has a dhcp allocated ip address in the 10.0 range; the printer is at 192.168.1.252. What magic incantation is required to get the vbox guest to be able to print?
Regards
Pete
Good Morning, Pete! (and everyone else)
Being the heretic I am, I (Horror of Horrors) actually READ THE VBOX MANUAL today related to networking, and what I found was most interesting.
What you described, Pete, related to range addressing is actually a designed feature of Network Address Translating (NAT) in VBOX, and a rather elegant one.
According to Section 6.3 of the Manual (quoted):
Network Address Translation (NAT) is the simplest way of accessing an external network from
a virtual machine. Usually, it does not require any configuration on the host network and guest
system. For this reason, it is the default networking mode in VirtualBox.
A virtual machine with NAT enabled acts much like a real computer that connects to the
Internet through a router. The “router”, in this case, is the VirtualBox networking engine, which
maps traffic from and to the virtual machine transparently. In VirtualBox this router is placed
between each virtual machine and the host. This separation maximizes security since by default
virtual machines cannot talk to each other.
The disadvantage of NAT mode is that, much like a private network behind a router, the virtual
machine is invisible and unreachable from the outside internet; you cannot run a server this way
unless you set up port forwarding (described below).
The network frames sent out by the guest operating system are received by VirtualBox’s NAT
engine, which extracts the TCP/IP data and resends it using the host operating system. To an
application on the host, or to another computer on the same network as the host, it looks like
the data was sent by the VirtualBox application on the host, using an IP address belonging to the
host. VirtualBox listens for replies to the packages sent, and repacks and resends them to the
guest machine on its private network.
The virtual machine receives its network address and configuration on the private network
from a DHCP server integrated into VirtualBox. The IP address thus assigned to the virtual
machine is usually on a completely different network than the host. As more than one card of
a virtual machine can be set up to use NAT, the first card is connected to the private network
10.0.2.0, the second card to the network 10.0.3.0 and so on.
In Virtual PC, we had to install the Innotek Virtual Switch between VPC and the host to access the network. It seems NAT does this automatically, with VBOX acting like a VPN, and NAT translating between the Host network and VBOX's internal network.
Reading Section 9.11 of the manual, it indicates that NATs address range can be placed in a different range using VBOXMANAGE, but, given the way it operates, I can't see a reason for us to do that, unless under much more complex circumstances than I think any of us would encounter.
If anyone wanted to use a VBOX VM as a server or for other reasons, directly accessing the internet, there is also a port forwarding function that can be configured, as outlined in Section 6.3.1 of the manual.
The developers of VBOX have put a tremendous amount of work into this puppy, which is not immediately evident unless you delve into its workings. As a technical writer myself (and an author) I'm also impressed by their manual, which is very well and clearly written.
Best to All today!
Mark