Monthly Archives: October 2012

Creating a home DNS and DHCP server

A few weeks ago I was trying to shell into my new microserver and from there access a media server to start some downloads.

What I realised was this… unless you know the IP address things get very tedious very quickly:

An attempt to find my media server on the local network

So thinking about my options, and the fact that I’ve just set up my first “real” home network (and by that I mean bothered to configure everything properly like QoS/routing/port forwarding, wired up the house etc). I recently bought my first dedicated server – previously this role was being fulfilled by something that was a warhorse 4 years ago, but now looks more like a panting, furry, very non-green home PC.

So, on with the setup…

I decided upon firing up a Windows Server 2008 instance on my ESXi server to handle both DHCP duties and DNS. I’d read that it was possible to configure the DHCP server to automatically create records with the local DNS server whenever a new client connected. The aim was something like this:

The DHCP server should:

  • Send the gateway IP address to all clients
  • Send the appropriate search domain (in this case home.danielbyrne.net)
  • Send the IP address of the yet-to-be-configured DNS server
  • Notify the DNS server of a newly connected client so A records can be created

The DNS server should

  • Answer any requests for its configured zone (*.home.danielbyrne.net)
  • Accept updates from a linked DHCP server
  • Forward any DNS queries that it can’t answer (basically the rest of the world) to the Google DNS service on 8.8.8.8

DHCP setup

First connect over terminal services to my Windows 2008 server instance. Once in add both ‘DHCP Server’ and ‘DNS Server’ roles to your installation

Adding DNS and DHCP roles to Server Manager in Server2008 R2

Adding DNS and DHCP roles to Server Manager in Server 2008 R2

DHCP Configuration



Video showing DHCP server configuration
  • Create a new scope and give it a name
  • Configure the pool (range) of IP addresses you want to make available. I chose 192.168.1.100 -> 192.168.1.200
  • Choose any excluded IP addresses if any
  • Configure the lease duration. I left a default of 8 days as clients on my network will be relatively static
  • Add your default gateway (Usually your router or ISP provided modem, in my case 192.168.1.1)
  • Specify your parent domain and DNS servers. Your parent domain could be something like mynetwork.local, in my case it’s mapped to home.danielbyrne.net. Important it must be a FQDN. mynetwork.local would work, mynetwork wont as it will cause issues with keeping the DNS records updated. Your DNS server will be the IP address of the machine with the DNS service on it and then any alternate DNS servers like Googles service at 8.8.8.8, or your own ISPs servers
  • Configure WINS (if you like, I didn’t)
  • Activate the new scope by selecting that option

Configure DHCP server to update DNS entries

Here’s a screenshot:

Configure DHCP server to update DNS entries.

To be continued in part 2…