DNSMasq as DHCP server

From DD-WRT Wiki

Revision as of 17:06, 19 October 2005 by 212.60.209.81 (Talk)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

DD-WRT bring along DNSMasq "as local DNS server" and uses for the DHCP service additionally "udhcpd". This is a waste of the RAM (router has only 16MB and 3MB free). WIth DNSMasq as DHCP server you can save 300kb (udhcpd switches deactivated). With this savings you can create one PPTP tunnel more with the inserted PPTPD server.

Following steps are necessary:

  • deactivate the DHCPD service on the "Setup" side.
  • add the options of the DNSMasq under "administration" some lines too (this must be also aktivated):
dhcp-range=192.168.0.100,192.168.0.150,255.255.255.0,12h 


Static allocation:

dhcp-host=AB:CD:EF:11:22:33,192.168.0.10,host,host.domain,12h  


AB:CD:EF:11:22:33 is the MAC of the network, 192,168,0,10 will indicate the desired IP, host and host.domain the hostname (e.g. Computer1.lan) and finally 12h the DHCP release of 12 hours.

If one has now some devices and/or computers in the LAN, which does not want IP assigned by the DHCP gotten, because this is firmly adjusted, and that the DNS service can dissolve their names, one adds still the lines:

If you want to identify devices via name resolution and it's not possible to assign an IP with DNSMasq you must add the following lines:

NO host addn hosts=/tmp/hosts 

You must also add this computer to the /tmp/hosts:

192,168,0,5 printers drucker.lan 

Original Thread: http://blog.ptch.de/index.php?/archives/33-WRT54G-DNSMasq-als-DHCPD.html (german)