Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My Belkin router has an option to set a local domain name, which, I suspect, allows me to address hosts within my own network using this domain. By default, this is set to be "Belkin".

Is it possible to call hosts within my network like this, e.g. ping foobar.belkin instead of ping 192.168.2.4?

The thing is, my routers internal page shows all set hostnames (so dhclient seems to work) and the router itself is reachable as router.belkin, but no other hosts are.

My problem here is that the router knows each hosts name, but the hosts don't know each others name. How can I fix that?

Note: Nmap showed that port udp/53 for DNS is open on my router, but I can't find any way to configure it on the Web-interface.

Add:// It's a "Belkin F7D3302 v1"

share|improve this question
    
Well, can you ping the local clients by IP? –  M.Bennett May 5 '13 at 21:43
    
Yes, without problem –  MechMK1 May 7 '13 at 19:57
    
Though I can reach my FRITZ!Box using http://fritz.box, I access other machines on its network using .local rather than .box. Earlier, with another modem/router, it was .lan. –  Arjan May 14 '13 at 20:44
    
I think we all got ahead of ourselves answering this question without actually knowing what Belkin product is being used. Which model router are you using? –  Qwilson May 15 '13 at 13:09

7 Answers 7

up vote 1 down vote accepted
+50

In general the router won't act as a DNS server but they'll often act as a DNS proxy. That is, in DHCP they'll give out their own IP as the DNS server and then they'll turn around and hit the real DNS servers. If it's doing this then I'd think you could resolve those local, .belkin, names.

Check ipconfig /all and see if the Default Gateway and DHCP Server have the same IP. If not then enter nslookup, then enter "server ROUTER_IP" at the prompt and try to do a lookup on google.com. If that works then there's probably a setting in the router to have it give it's own IP as the DNS server that's not checked.

share|improve this answer

The short answer is (for the most part) no. Your router (in most cases) is not a dns server. You can however set static entries for all of your devices and then add them to your host list within the given devices.

The Belkin F7D3302 does not support serving DNS.

share|improve this answer
    
You might very well be right, but all home-level modem/routers I have used (like SpeedTouch, FRITZ!Box) did come with some built-in DNS server. (Or at least, I could always use computer names rather than some IP address.) –  Arjan May 14 '13 at 20:42
    
Well David is using a Belkin. He's mentioned that he does not see a place to configure dns settings within the router. My answer was based on the assumption (formed by the info given) that this router will not manage dns. –  Qwilson May 15 '13 at 13:17

Sure, this is what I do with my router at home.

Your router should be able to do this as long as you have its DNS serving abilities turned on so that it processed DNS requests for the your LAN for that domain (it'll forward requests for other domains to your usual DNS servers such that your web browsing isn't broken on the clients).

You need to make each client use the router for their DNS lookups, which they likely will out the box assuming you're also using DHCP.

share|improve this answer
    
My router is a DHCP server, but I'm not sure if it is able to serve as DNS server. At least, I have found no such option –  MechMK1 May 7 '13 at 19:58
    
i'd be surprised if it couldn't, to be honest. I'm using an asus router but with ddwrt firmware on it. Pretty sure it could do it out the box though. –  Sirex May 7 '13 at 21:03
    
I have googled a little and couldn't find anything for Belkin routers –  MechMK1 May 9 '13 at 10:56

If the machines on you LAN run a relatively modern operating system, then you can access them by appending ".local" to their hostname, like this :

ping machine_name.local

To get the name from the IP, use

avahi-resolve-address IP
share|improve this answer

Install and configure dns server within the local network, register it on all hosts, enter the internal dns server first in the list of dns servers on the Belkin router. Then you will have what you want.

share|improve this answer
1  
I'd like to respectfully disagree with your answer. Placing a dns server in the network would be a solution, but given the fact David's question is specific to achieving dns through the router this is not an acceptable answer. –  Qwilson May 15 '13 at 13:15
    
@Qwilson Gorgeous. Where, then, need to store and locate dns records for the local device? –  STTR May 15 '13 at 13:35
    
For (most) local devices, there will be a host file for internal records, and a dedicated server for outside records (e.g. 8.8.8.8). –  Qwilson May 15 '13 at 13:46

While I do not suggest doing this, it would give you the desired result (being able to ping local hostnames without setting up a separate DNS server)

  1. On your primary computer, browse to C:\Windows\System32\drivers\etc
  2. open the hosts file using notepad
  3. scroll to the bottom of your hosts file
  4. add a new line below the last commented line in the file that looks like this

192.168.2.1 router.belkin

192.168.2.2 hostname

192.168.2.3 hostname2

Save the hosts file.

Now try to ping hostname and hostname2, you should see the following

ping hostname2

Pinging hostname2 [192.168.2.3] with 32 bytes of data:

ping hostname

Pinging hostname2 [192.168.2.2] with 32 bytes of data:

Again, this is not how I would do it. I would opt to setup a DNS server myself, but if you do not have that option this is a quick and dirty alternative.

Oh dont forget if you plan on doing this, add yourself to the security permissions on the hosts file so you can write to the file. Also do not forget to copy this hosts file to all of the other machines on your network.

share|improve this answer

I've had the exact same problem.

The problem seems to be that if you try to address a local host name, the router automatically appends ".belkin" assuming belkin is what you have set as your local domain name. Changing it to something else will not solve the problem and you can't leave this blank.

As xaccrocheur said above, most modern OSs will access most things by appending .local So... I have done a sort of work-around which works well with most of my machines. I changed the Local domain name setting on the router to local

I can now access MOST devices by host name only

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.