Using dnsmasq to setup your own dhcp/dns server on your local computer
At this point, you have learned that DHCP is a protocol that allows a server to assign an IP address to a client and DNS is a protocol that takes a domain name and returns an IP address.
Now, we are going to install a program called dnsmasq that provides both a DHCP server and DNS server that will run from your laptop computer.
By installing this server, you will be able to assign, via DHCP, IP addresses to your virtual servers and provide DNS lookup for them.
Begin by installing the dnsmasq package with:
sudo apt-get install dnsmasq