Why do most routers not include local DNS?

23

3

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?

EML

Posted 2011-07-18T11:50:43.033

Reputation: 343

some @Grumby on a whirlpool forum said that a public domain name costs less than a dedicated router/DNS server hardware to do local DNS. I just set up a new domain and set up synthetic subdomain forwarding in about 20 minutes to the same effect for only $12. So if you want something you can have up and running for cheap without having to get any new hardware don't forget that is an option. – ComradeJoecool – 2019-10-16T01:20:43.607

3Get a Linksys WRT54GL for around 50$, install OpenWRT firmware on it and you'll have a DNS server that resolves local names. But still pretty much offtopic on stackoverflow... – fvu – 2011-07-18T11:56:18.377

2Don't forget the other classics, DD-WRT and Tomato! – Darth Android – 2011-07-18T14:06:33.920

Answers

22

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.

Alnitak

Posted 2011-07-18T11:50:43.033

Reputation: 656

This doesn't really answer the question. – UuDdLrLrSs – 2018-08-21T00:19:56.523

1@DaveInCaz TL;DR version - the DNS protocol (especially the recursive function) is too complicated for most router vendors to implement correctly. – Alnitak – 2018-08-21T18:21:16.107

I would have thought that there was some off the shelf DNS that they would tend to use; or at least, that some vendors could use if they wanted to differentiate their products. – UuDdLrLrSs – 2018-08-21T18:35:09.263

@DaveInCaz yes, I mentioned that in my answer. Note that "off the shelf" also implies "portable", so needing something like a multi-tasking POSIX environment. Many routers don't have that, they run bespoke embedded code. – Alnitak – 2018-08-21T18:42:14.257

Your comments here are useful, you might consider adding them to the answer to give it a fuller explanation. As it stands right now the first sentence might sound a little flippant, even though clearly you meant it quite seriously (and all the upvoters obviously agree). So adding some more details could make your point more clear. – UuDdLrLrSs – 2018-08-21T18:46:25.743

@DaveInCaz (minor) edits made. – Alnitak – 2018-08-21T18:53:07.373

9

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.

samy

Posted 2011-07-18T11:50:43.033

Reputation: 295

However, this option is restricted to a limited list of routers. – SaidbakR – 2017-03-01T17:14:32.293

2

"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).

Hubert Kario

Posted 2011-07-18T11:50:43.033

Reputation: 390

2

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.

Bruce ONeel

Posted 2011-07-18T11:50:43.033

Reputation: 246

1

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.

vcsjones

Posted 2011-07-18T11:50:43.033

Reputation: 2 433

7providing DHCP and DNS is easier on the CPU than tracking 10k connections from bittorrent client. – Hubert Kario – 2011-07-18T12:06:11.843

0

This is one of the reasons I bought a Guruplug and turned it into a Linux-based router with bind installed for DNS.

DNS is a bit technical and most consumer-level router/switch combinations seek to be easy to use for the average, non-technical user. It's bad enough trying to explain to those who know nothing about networking what a MAC address is, or how DHCP works. It also introduces one more thing that can go wrong or be misconfigured and be the source of product returns or support calls.

LawrenceC

Posted 2011-07-18T11:50:43.033

Reputation: 63 487