Creating Internal network(inet) with VirualBox


Summery
This article demonstrate how Create an internal network in windows 7 host  using virtual box.I have used windows 7 host and two Ubuntu 12.04 virtual guests for demonstration purposes but using another type of guests will be very easy.


With Virtual box it is possible to create a internal network between virtual guests.In a windows host most of the configuration can be done through GUI.But unfortunately enabling the dhcp server cannot be done graphically.
So use the following command to enable virtual box dhcp server.

  • Run the below  command in host(in this case win 7) and it is recommended to close virtual  box and virtual machines before running the command. (Run the command from the home directory of you virtual box installation.(e.g C:\program Files\Oracle\VirtualBox))
VBoxManage dhcpserver add –netname intnet –ip 10.11.11.100 –netmask 255.255.255.0 –lowerip 10.11.11.101 –upperip 10.11.10.254 –enable

inet => network name
10.11.11.100 => ip of the dhcp server (in this case in thw win 7 host)


  • Then set one of the network adopter settings of each virtual guest in to internal network and name as inet. (Right click on the virtual machine name and open settings .Then you may find the settings for network in the network section)

Fig;setting the network adopter in virtual box


  • Then start the virtual machine and they will automatically get ip-addresses from dhcp server.