Resolving local hostnames with D-Link DIR-657 router

2

How can I resolve local hostnames with the D-Link DIR-657 router?

With my old router I could just enter the device name followed by .home, eg. raspberrypi.home.

However neither of these seems to work:

  • raspberrypi
  • raspberrypi.home
  • raspberrypi.local
  • raspberrypi.dlinkrouter

The router resolves dlinkrouter to the IP-address of the router.

Tyilo

Posted 2012-12-19T21:52:25.830

Reputation: 2 345

Answers

0

You'll need to set a DHCP reservation for each device. The router should then resolve those names for other clients on your network (provided that your hosts use the router for resovling DNS, which they should by default).

To do this, go to the Network Setup page, under the Setup tab on the DIR-567's admin page. Look for the section towards the bottom labelled Add DHCP Reservation.

Enter:

  • The hostname (i.e. raspberrypi) under Computer Name
  • An IP address that falls within the DHCP IP Address Range in the DHCP Server Settings section above
  • The MAC address of the device (findable via ifconfig on Unixes, or ipconfig /all on Windows)

Check the enable box, then click save. Repeat this for each machine you want to assign a hostname to.

robmathers

Posted 2012-12-19T21:52:25.830

Reputation: 489

This doesn't work for me! I have rebooted the router and confirmed the raspberry pi is on the correct ip-address. Screenshots: http://i.imgur.com/gGQVY.png http://i.imgur.com/3eU5g.png

– Tyilo – 2012-12-19T22:16:40.007

Check what DNS servers your other clients are using. If they're set to use external servers (i.e. not 192.168.0.1), then your router can't resolve hostnames for them. – robmathers – 2012-12-19T22:18:20.400

I haven't set any external DNS servers and going to http://dlinkrouter/ works. nslookup returns this for dlinkrouter: Name: dlinkrouter.profibernet.dk Address: 192.168.0.1 – Tyilo – 2012-12-19T22:21:13.220

Hmm, in that case, all I can suggest is trying a restart of your client to flush the DHCP and DNS information. But it's possible that D-Link routers don't use the entered hostname information for DNS resolution, in which case you can either go with a third party firmware, manually edit the hosts file, or set up an internal DNS server. – robmathers – 2012-12-19T22:45:21.657