DHCP Server: DNSMasq

From SlackWiki
Revision as of 16:08, 29 August 2012 by Arfon (talk | contribs) (ADDED: Category)
Jump to navigation Jump to search

Written from a Slackware 13.37 perspective.

To set up a DHCP server you can use the dchp package that is included with Slackware OR you can do it the easier way and use DNSMasq (also included with Slackware).

Assuming that you do not have DNSMasq installed

1) Install the official dnsmasq Slackware package either by pkgtool oe slackpkg.

2) Make DNSMasq start on boot:

    CHMOD 755 /etc/rc.d/rc.dnsmasq

At this point you will have a really cool little DNS on your box...

If you already had DNSMasq running on your box, start here

1) edit the /etc/dnsmasq.conf file:

    CHANGE: #dhcp-range=,,,12h
    TO: dhcp-range=,,12h  (using your correct IP range)

2) start/restart DNSMasq

    /etc/rc.d/rc.dnsmasq restart

You should now have a working DCHP server.

Persistent IPs

To assign IPs based on a device's MAC address, edit /etc/dnsmasq.conf and add the following line for every device (using the correct MAC and IP of course):


NOTE: The IP address should be OUTSIDE the DHCP pool.