Do any home routers have this DNS option?

Ichinisan

Lifer
Oct 9, 2002
28,298
1,235
136
I believe most home routers act as some kind of DNS relay because DHCP devices behind the router obtain a DNS server IP matching the router's own internal IP address.

Still, I've never found a router that allowed me to enter simple keyword "domain names" for my local devices. Like so:

router --> 192.168.1.1
netdrive --> 192.168.1.10
mediapc --> 192.168.1.20
gamingpc --> 192.168.1.30.

I can get this effect by editing the hosts file on each of my PCs, but that is tricky or impossible on some of my mobile devices (tablets, smartphones, iPod Touch). I want guests to be able to use the shortcuts ("just open your browser and type 'netdrive' in the address"). I also want to quickly use the shortcuts when I've brought someone else's computer home to work on. I don't want to configure the hosts file on each machine individually.

I've messed around with Tomato and DD-WRT firmwares and there are some advanced DNS settings...but I could never figure out how to make them work this way.

...and, yes, I know that most network devices have some kind of hostname, but I find that the hostname frequently stops working and is unreliable. For instance, I use "Touchpad Elite" from my iPod Touch as a remote control for my HTPC (it uses VNC protocol). When I configure it to connect to "media-pc" instead of "192.168.1.10," it usually works. Sometimes it stops working and can't find the hostname, but still works fine when I manually enter the whole IP address. I have to reboot the target computer before I can access it by hostname again. It happens often enough to be annoying and now I never bother to enter hostnames when I'm configuring settings that will be stored.
 

drebo

Diamond Member
Feb 24, 2006
7,034
1
81
I know that Adtran routers can do this. They're usually available pretty cheap.

I suspect you can do it with DDWRT, as well. It'd be a static DNS entry.

Some SOHO routers out of the box can probably do it, as well. I don't know which ones, though.
 

Ichinisan

Lifer
Oct 9, 2002
28,298
1,235
136
Thanks.

I remember TRYING to figure out DNSMasq and reading similar how-to sites, but it never worked correctly and the sites weren't even clear if it is supposed to do what I thought it *might* do.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
It was pretty simple, I didn't even try searching for how-tos.

First you need to be using the built-in DHCP server. Then type in your local domain in the LAN domain box, choose LAN & WLAN as the 'Used Domain' and then just make sure DNSMasq and Local DNS are both enabled in the DNSMasq config section.

I've got hostname resolution working for all the boxes on my home network using that setup.
 

alkemyst

No Lifer
Feb 13, 2001
83,769
19
81
It was pretty simple, I didn't even try searching for how-tos.

First you need to be using the built-in DHCP server. Then type in your local domain in the LAN domain box, choose LAN & WLAN as the 'Used Domain' and then just make sure DNSMasq and Local DNS are both enabled in the DNSMasq config section.

I've got hostname resolution working for all the boxes on my home network using that setup.

QFT...I don't have a need for it now, but that's basically how I remember it.

Hopefully the OP didn't get too concerned on the grammer used though 🙂 that can be iffy on these write ups 😉
 

Ichinisan

Lifer
Oct 9, 2002
28,298
1,235
136
It was pretty simple, I didn't even try searching for how-tos.

First you need to be using the built-in DHCP server. Then type in your local domain in the LAN domain box, choose LAN & WLAN as the 'Used Domain' and then just make sure DNSMasq and Local DNS are both enabled in the DNSMasq config section.

I've got hostname resolution working for all the boxes on my home network using that setup.

Using Tomato firmware at the moment. There's a section for Dnsmasq.

There's no "LAN domain box," nor the other options you mentioned. There's only a large, empty textarea box for "custom configuration." No hints on what goes there or syntax. Experimented in the past by making entries like I would in a hosts file, but it didn't work.

tomato_firmware_dnsmasq.png
 
Last edited:

CubanlB

Senior member
Oct 24, 2003
562
0
76
I've never used tomato (as I have heard it is less stable than ddwrt) but I would assume anything put in the large text field will get dumped into the hosts file the wiki talks about (if if tomoato uses the same file for the configuration that ddwrt uses).

Try putting in some entries in the formats talked about in section 2 of the wiki.

http://www.dd-wrt.com/wiki/index.ph...l_network_-_HOWTO#2.29_Additional_DNS_Options

Edit: or maybe look for a tutorial for tomato? That might be easier...
 

Ichinisan

Lifer
Oct 9, 2002
28,298
1,235
136
Well, it turns out that Tomato has this feature integrated right into the static DHCP screen. I'm not sure when that was added, but it seems to work.
 

LCTSI

Member
Aug 17, 2010
93
0
66
I believe most home routers act as some kind of DNS relay because DHCP devices behind the router obtain a DNS server IP matching the router's own internal IP address.<br />
<br />
Still, I've never found a router that allowed me to enter simple keyword &quot;domain names&quot; for my local devices. Like so:<br />
<br />
router --&gt; 192.168.1.1<br />
netdrive --&gt; 192.168.1.10<br />
mediapc --&gt; 192.168.1.20<br />
gamingpc --&gt; 192.168.1.30.<br />]<br />
<br />

I hope I'm not asking something obvious here... but did you try putting your local domain in the DHCP options for the search domains?

this came from DHCP
Code:
$ cat /etc/resolv.conf
nameserver 10.1.0.1
domain localdomain
search localdomain
and i can just type in http://xbox/ or http://kidspc/ or smb://fileserver/
 

Ichinisan

Lifer
Oct 9, 2002
28,298
1,235
136
I hope I'm not asking something obvious here... but did you try putting your local domain in the DHCP options for the search domains?

this came from DHCP
Code:
$ cat /etc/resolv.conf
nameserver 10.1.0.1
domain localdomain
search localdomain
and i can just type in http://xbox/ or http://kidspc/ or smb://fileserver/

I don't have a "local domain"...as far as I know. Maybe I don't fully understand what that is.

Do I have to put every computer in the same workgroup? That's not what I'm looking for. What about devices that don't have a workgroup setting? (my iPod/iPhone/HP-TouchPad[?]) I'm specifically looking for an option that doesn't require me to configure LAN devices. I would find these shortcuts to be most convenient for guests and other computers that I work on for other people.

If the router is working as a kind of DNS proxy, why should it require any more information than I would put into a HOSTS file?
 

Ichinisan

Lifer
Oct 9, 2002
28,298
1,235
136
...and I don't remember how I concluded that Tomato let me do it through the static DHCP screen. That doesn't actually work.

Now this is even more screwed-up!

Used this Dnsmasq configuration:
Code:
address=/netdrive/192.168.1.10

nslookup resolves "netdrive", but ping does not!

Code:
C:\Users\User>ping netdrive
Ping request could not find host netdrive. Please check the name and try again.

C:\Users\User>nslookup netdrive
Server:  unknown
Address:  192.168.1.1

Name:    netdrive
Address:  192.168.1.10


C:\Users\User>ping netdrive
Ping request could not find host netdrive. Please check the name and try again.

C:\Users\User>

ipconfig /all confirms that my system sees 192.168.1.1 as the only DNS server.
 

Ichinisan

Lifer
Oct 9, 2002
28,298
1,235
136
Thanks. I tried the first one just now and it didn't work. I'll check out the rest when I get back home.

I'm still baffled by this:

  • ipconfig /all reports "192.168.1.1" (obtained through DHCP) as the only DNS server.
  • ping cannot resolve "netdrive"
  • nslookup *does* resolve "netdrive" and shows the same DNS (192.168.1.1).

How is it possible that one utility can resolve "netdrive" and another utility cannot, even though they use the same DNS?