6.7. Host-Only Networking

Host-only network can be thought of as a hybrid between the bridged and home network modes. As with bridge network, the virtual machines can talk to each other and the host as if they were connected through a physical Ethernet switch. As with inner network, a physical network interface need not be award, and the virtual machines can not talk to the earth outside the host since they are not connected to a physical network interface. When host-only network is used, Oracle VM VirtualBox creates a new software interface on the server which then appears following to your existing network interfaces. In other words, whereas with bridge networking an existing forcible interface is used to attach virtual machines to, with host-only networking a new loopback interface is created on the host. And whereas with internal network, the traffic between the virtual machines can not be seen, the traffic on the loopback interface on the host can be intercepted. Host-only network 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 Oracle VM VirtualBox to set up a host-only network for the two. A irregular, bridged, net would then connect the web server to the away populace to serve data to, but the away worldly concern can not connect to the database. To change a virtual machine ‘s virtual network interface to Host Only mode, do either of the comply :

  • Go to the Network page in the virtual machine ‘s Settings dialogue and blue-ribbon Host-Only
    Networking
    .
  • On the control line, enter VBoxManage modifyvm
    "vmname
    –nicx hostonly
    . See section 7.8, “ VBoxManage modifyvm ” .

Before you can attach a VM to a host-only network you have to create at least one host-only interface. You can use the VirtualBox Manager for this. Choose File, Preferences, Network, Host-Only Network, (+)Add Host-Only Network. alternatively, you can use the command agate line :

VBoxManage hostonlyif create

See section 7.36, “ VBoxManage hostonlyif ”. For host-only network, as with internal network, you may find the DHCP server utilitarian that is built into Oracle VM VirtualBox. This can be enabled to then manage the IP addresses in the host-only network since otherwise you would need to configure all IP addresses statically .

  • In the Oracle VM VirtualBox graphic user interface, you can configure all these items in the ball-shaped settings by choosing File, Preferences, Network. This lists all host-only networks which are soon in manipulation. Click on the network name and then on Edit. You can then modify the adapter and DHCP settings.
  • alternatively, you can use VBoxManage
    dhcpserver
    on the command line. See section 7.42, “ VBoxManage dhcpserver ” .

note On Linux and Mac OS X hosts the number of host-only interfaces is limited to 128. There is no such limit for Oracle Solaris and Windows hosts .

Leave a Reply

Your email address will not be published.