11

Hi I've been trying to setup an Internal Network with two Ubuntu 14.04 virtual machines. But I've been unsuccessful so far. They both have the Internal Network adapters with the same network name, now I need them to communicate inside the network, but the ping tests were unsuccessful.

This is my /etc/network/interfaces.d in the first OS

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.0.100           
netmask 255.255.255.0
gateway 192.168.0.254           

OS #2

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.0.101
netmask 255.255.255.0
gateway 192.168.0.254

I also tried changing the "eth0" to "lo" without success.

I don't understand where the problem is, Any help is welcome! Thanks

17

Ok I found the solution. I just had to start a DHCP server with VirtualBox. It's well explained in this video: https://www.youtube.com/watch?v=lhOY-KilEeE

Just in case, if the video is unavailable, the gist of it is this:

vboxmanage dhcpserver add --netname intnet --ip 10.10.0.1 --netmask 255.255.0.0 --lowerip 10.10.10.1 --upperip 10.10.10.255 --enable

Run this this in your host OS.

  • --netname intnet: The internal network will be named intnet. This is the name you should then put inside your VM's Network > Adapter > (Internal network) > Name field.
  • --ip 10.10.0.1: The IP address of your DHCP server inside the internal network.
  • --netmask 255.255.0.0: The subnet mask.
  • --lowerip 10.10.10.1: The lower bound of the IP addresses that can be assigned to network members.
  • --upperip 10.10.10.255: The upper bound of the same thing.
  • --enable: Enable the DHCP server.
1
  • 2
    This alone didn't work for me, I think because Oracle have updated VirtualBox recently and replaced some of this. This article was very very helpful, just run the two CLI commands (one of which is your command) and set network adapter to NAT Network jekewa.com/blogs/index.php/weBlog/2014/01/09/… also note that there is an error in your answer, the lowerip should not be the same as the gateway ip, use 10.10.10.2 instead – r3flss ExlUtr May 12 '17 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.