Why do most routers not include local DNS?
I need to change my firewall/router, and I'd prefer something with built-in DNS to resolve queries on the local subnets. I've got a mixed Linux/Windows system, often with only one computer turned on, and I frequently have problems resolving local names. I don't want to keep a Linux box permanently on just for DNS, and I'd prefer to have DNS in my router appliance, which is always on.
I search Google for this occasionally but never find anything. You always get the obvious answers - it's not possible, put everything in /etc/hosts
, NetBIOS, dedicated box, etc. So what am I missing? Why don't "cheap" routers let you do this? I'm pretty sure that Cisco kit does this. Almost all cheap routers will let you do MAC address reservation, to let them assign static IP addresses for DHCP. So why can't they simply do DNS as well for everything on the local subnets, just passing through remote domains to the ISP?
Solution 1:
The DNS protocol is in reality quite complicated, especially the recursive function, and most routers can't even proxy DNS properly and in conformance with the DNS RFCs, let alone act as a proper DNS server. See RFC 5625.
The best routers for DNS functionality are those that use dnsmasq
software internally, running on top of a Linux kernel.
Ob. Disclaimer - I wrote that RFC.
Solution 2:
using a flashable router like the WRT* family from Linksys, you can install OpenWRT or Tomato; theses two firmwares should give you access to a wide range of tools.
The list of supported devices for OpenWrt may open other options; perhaps you can recycle an older router from the list.
Solution 3:
I'd suspect that the use case for cheaper router manufactures is that the only thing you do is connect to the outside internet. Why would you want to communicate between devices on the home network?
The correct thing for them to do is to automatically add the DNS entry when it does DHCP, and, when the DHCP lease expires and is not renewed then remove the DNS entry.
You can do this with OpenWRT. You can also setup your own dhcp/dns server and use that for DHCP rather than the cheap router.
Solution 4:
"Mom and Pop Ltd." don't need such stuff.
As you noticed, Cisco stuff can do it, but it cost an order more than SOHO hardware. Not only it makes people buy more expensive hardware it also decreases number of support calls ("after i put facebook on router with my IP, I can't check my status, that's outrageous!")
You can either use already suggested OpenWRT supported routers or buy vyatta based router (or re purpose an old PC).
Solution 5:
As others have mentioned, there is a "how" with custom firmware, and the "why" is Cisco doesn't want small businesses which require that feature to skip over some of their lower end enterprise routers. It's all about "you get what you pay for". For a small company with 5 employees, but needs DNS, it would be a good $50 solution. Too cheap for Cisco, and considering that most home users don't need DNS, why put it there?
In addition, it's likely that the devices tend to be underpowered for those purposes. Home routers really don't have the horsepower to do NAT; DHCP; and DNS at the same time. While I am sure it's possible by installing custom firmware, it might not perform as desired.