Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a home Home Router (DD-WRT) and I want to be able to look up machines via hostname. However, I would like to do this with machines where the IP Address id dynamically given via DHCP. Example hosts names from my network:

Machine                    Hostname IP address   Method
----------------------     -------- ----------   -----------
File Server                abcd   (Static)
HTPC                       htpc    192.168.1.x   (Dynamic)
Windows Gaming Machine     bear    192.168.1.x   (Dynamic)

I have 1 machines which have static IP addresses, and I am able to connect to this machine via the hostname because I have configured the hostname in the DNSMasq section of my DD-WRT

DD-WRT Panel -> Services Tab -> Services Sub tab -> DNSMasq section


I want to be able to access HTPC via the htpc hostname from within my network, but i don't want to put it in the DNSMasq configuration section because it's not always gauranteed the same IP address. Is there a setting to tell DD-WRT to dynamically configure DNSMasq for hosts who don't have static IP's (instead have DHCP)??


share|improve this question

In DD-WRT, you can configure DHCP to give a particular host (given a specific MAC address) a static hostname and IP address. This is called static DHCP lease.

If you take this approach, you'll get some of the benefits of both: your HTPC IP/hostname is managed by DHCP, but you'll always know what it is. dnsmasq in DD-WRT will also make use of this information so you can look up the machine by hostname.

Here are instructions on how to set this up:

Also, to avoid conflicts with other DHCP clients, you should change DHCP server's IP range to control which IP addresses are usable for dynamic use. In your case...

Machine                    Hostname IP address   Method
----------------------     -------- ----------   -----------
File Server                abcd   (Static)
HTPC                       htpc   (Static DHCP assignment)
Windows Gaming Machine     bear    192.168.1.nn  (Dynamic DHCP assignment)

... you want DHCP to only issue IPs where nn is some value greater than 5.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .