Dnsmasq is a lightweight DNS proxy server that is also capable of handling DHCP requests and can act as a TFTP server which is a requirement for PXE boots. There are plenty of well-known DNS services available including Windows’ DNS service available on Windows Server as well as BIND which is for Unix based operating systems, so what sets Dnsmasq apart from these popular services? Well besides being multi-purpose it’s also geared toward home networks and large office workgroups by being easy to configure and allowing your machines to effectively communicate with each other. It works by reading the host file and integrating with DHCP to match hosts with IP addresses. You can also configure it to forward DNS requests to another DNS server such as your ISP or Google’s public DNS server. When the name is mapped to an IP address Dnsmasq will cache the results so the name can be resolved locally next time.
Since I run a Linux machine at home I decided to give Dnsmasq a try. I run Fedora 16 which already had Dnsmasq installed I just had to locate the configuration file which was located in /etc. I have to say that the configuration file was rather easy to work with. The comments were descriptive enough to help me understand what each line was for and what I needed to put into each line. After setting up the configuration file it was now time to test it. I used the Linux command Dig (Dig www.trigonit.com) which shows the time it takes to have the name resolved. Running it a second time after the name and ip address were cached resulted in much faster times since it was now being resolved locally rather than from a public DNS server. At the time of this writing I have not yet dabbled in the DHCP or TFTP features. Now a word of advice despite its relative ease for set up I would still recommend doing as much research as possible before attempting to configure it and also before touching the configuration file make a copy of it just in case something doesn’t work you can revert back to the original file. If you have any questions about DNS or why it’s important for your network environment please feel free to contact us today and we can assist you.