28-mar-2016: Welcome to our new server! Faster and less prone to crashing.
Add this page to your book
Remove this page from your book
DHCP Server via DNSMasq
To set up a DHCP server you can use the dhcp package (included with Slackware)
you can do it the easier way and use DNSMasq (also included with Slackware).
Assuming that you do not have DNSMasq installed:
- 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 but, that's not what we're going after here…)
If you already had DNSMasq running on your box, start here:
- Edit the /etc/dnsmasq.conf file:
CHANGE: #dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h TO: dhcp-range=1ST_POOL_IP,LAST_POOL_IP,12h (using your correct IP range)
- If your DNSMasq box isn't also your gateway router, tell your DHCP clients who is the default gateway:
CHANGE: #dhcp-option=3,18.104.22.168 TO: dhcp-option=3,YOUR_GATEWAY_IP
- Start/restart DNSMasq:
# /etc/rc.d/rc.dnsmasq restart
You should now have a working DCHP server.
Persistent IP addresses
To assign IP addresses based on a device's MAC address, edit the file
/etc/dnsmasq.conf and add the following line for every device (using the correct MAC and IP address of course):
NOTE: The IP address should be outside the DHCP address pool.
- Originally written by arfon