1

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
----------------------     -------- ----------   -----------
Router                             192.168.1.1
File Server                abcd    192.168.1.2   (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

address=/abcd/192.168.1.123

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)??

Thanks

1 Answer 1

1

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
----------------------     -------- ----------   -----------
Router                             192.168.1.1
File Server                abcd    192.168.1.2   (Static)
HTPC                       htpc    192.168.1.5   (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.

You must log in to answer this question.

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