Laboratorium Komputerowe Progmar
Marcin Załęczny

We are using cookies in the page. If you use the page you agree for the cookies.      Close

VirtualBox - adding dhcp server and configuring virtual machine

To add new DHCP server for specified local network, issue following command in the host's command line: VBoxManage dhcpserver add --netname intnet --ip 192.168.10.1 --netmask 255.255.255.0 --lowerip 192.168.10.100 --upperip 192.168.10.120 --enable The created virtual server will be named intnet.

In the virtual machine you have to configure network adapter to obtain IP address from the DHCP server. To do it just add following lines at the end of /etc/network/interface file: auto eth2
iface eth2 inet dhcp

To remove created above DHCP server (named intnet) execute following command: VBoxManage dhcpserver remove --netname intnet