I have several web sites and other information or entertainment resources on my local network. Since it’s all mine here, it seems silly to not be able to use my own stuff just because the internet is down! But that’s exactly what would normally happen, all because of just one thing…DNS lookups.
Let’s say I want to watch a movie on my smart tv and the internet is down. My tv is setup to let me play movies from my home server residing at hostname video.stovallhut.online. If I pickup my roku and go to the DS Video app to watch a movie, it will fail right off the bat because it can’t resolve the hostname to a IP address. Dead in the water.
In my case the solution to this problem comes all in configuring my main router for my local network by adding a DNS Server that knows the names of my home servers and will then resolve the name without contacting a server on the internet. This also means the names will resolve much faster here at my house.
While this is a quick setup, it didn’t just fall in my lap. I was immediately hit with unfamiliar entities to setup and not knowing what zones are much less master zones vs. slave zones and why I might want one. But just resolving names on your local network is really pretty easy at least on my RT2600ac router. I captured the steps below in case this helps anybody else (or me later) dodge the complexity and just handle this simple scenario.
Start by logging into the Synology router and go to the Package Center. Install the DNS Server package. Open DNS Server and create a Master Zone. You need one master zone for each domain you want to resolve. So in my case I have a server I get to as stovallhut.online and fill out the dialog like this.
To me it was not intuitive to think of the name I want to resolve to as a “Master DNS server”. Don’t think that you need to setup something on your server for that. This is just the IP of the computer you want to reach using that name. That computer does not participate in resolving the name (I think the master-server concept is for the rare case where you would run your own nameserver).
Accept defaults for other choices and save the new Master Zone. To resolve the name though, you’re not quite done…
Assuming you have a Windows computer connected to your router (and using the DNS server i.e. no manual override of DHCP settings), open a command prompt and try to resolve the name you just setup.
See above that no address at all shows when trying to resolve the new domain. Compare that to resolving cnn.com which comes back with several IPs.
To resolve the name you need to add a “A” record to the master zone you just created. Visit the zone and double-click to edit.
Fill in just the IP address and save the rule – that’s all there is to it. Now go back to your dos prompt and you should see the name resolve correctly now.
Handle subdomains with more “A Records”
If you have any subdomains you’ll need A Records for each of them too. See below how I setup a few subdomains for my stovallhut.online domain.
Now my smart tv can go find movies at video.stovallhut.online when my internet is disconnected 🙂
Visit this site for more information on the Synology DNS Server. Note that I could have used CNAME records for my subdomains. That might be a little less maintenance especially if you change around your IP addresses. But I elected not to because of at least a minor performance issue in that CNAME records include the overhead of an additional query to the DNS Server during name resolution.
Going further with DNS Records
My above focus on basic address resolution leaves a lot out of what you can do with a DNS Server. See this good reference for what the various records in your DNS Server can do to help you manage a local network.