NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
kirkfrey
Jan 04, 2012Aspirant
screwed up my Dnsmasq DHCP config file
I've somehow screwed up my Dnsmasq DHCP config file. It is now empty. I tried uninstalling Dnsmasq, rebooted and reinstalling it but it seems that uninstalling leaves the config files in place as al...
WhoCares_
Jan 04, 2012Mentor
Here you go:
Make sure to replace the variables enclosed in '%' sign with actual values. I also suggest you have a look at the DAP add-on: viewtopic.php?f=47&t=59683
It includes DNSmasq in a newer version.
-Stefan
# Uncomment this to enable the integrated DHCP server
dhcp-range=%CL_BEG%,%CL_END%,%SUBNET%,24h
# This is an example of a DHCP range with a network-id, so that
# some DHCP options may be set only for this network.
#dhcp-range=tftp,192.168.0.50,192.168.0.150
#-------------------#
# Default Gateway #
#-------------------#
dhcp-option=option:router,%GATEWAY%
#-------------------#
# NTP-Server #
#-------------------#
dhcp-option=option:ntp-server,%NTPSRV%
#-------------------#
# Host-List (local) #
#-------------------#
# Here you can add hosts that shall get a "fixed" ip address #
# every time they request a new lease from the DHCP server #
# the format is: #
# dhcp-host=<mac address>,<hostname>,<ip address>,<lease time> #
# Example: #
# dhcp-host=01:0C:29:36:D8:18,artep,192.168.27.200,24h
#-------------------#
# Dual-Homed Host #
#-------------------#
# An even cooler feature of Dnsmasq is that it allows you to #
# specifiy two <mac address> type entries to which the *same* #
# ip address is given out. This is very handy for notebooks #
# Example: #
# dhcp-host=01:17:f2:f4:4f:72,01:19:e3:05:3c:67,crow,192.168.27.8,24h
#-------------------#
# CNames (a.k.a.) #
#-------------------#
# Using the cname feature, you can give more than one name #
# to a single host. #
# Syntax: #
# cname=<aka name>,<original name> #
# You can have multiple cname entries for one host. Just make #
# sure they come *after* the dhcp-host entry for the host #
# Example: #
# This would make the host 'crow' from above get known as #
# 'raven' and 'blackbird' as well #
# cname=raven,crow
# cname=blackbird,crow
#-------------------#
# Lease file #
#-------------------#
# The DHCP server needs somewhere on disk to keep its lease database.
# This defaults to a sane location, but if you want to change it, use
# the line below. Don't change if you don't have to!
dhcp-leasefile=/opt/rfw/var/lib/misc/dnsmasq.leases
# Set the DHCP server to authoritative mode. In this mode it will barge in
# and take over the lease for any client which broadcasts on the network,
# whether it has a record of the lease or not. This avoids long timeouts
# when a machine wakes up on a new network. DO NOT enable this if there's
# the slighest chance that you might end up accidentally configuring a DHCP
# server for your campus/company accidentally. The ISC server uses
# the same option, and this URL provides more information:
# http://www.isc.org/index.pl?/sw/dhcp/authoritative.php
dhcp-authoritative
Make sure to replace the variables enclosed in '%' sign with actual values. I also suggest you have a look at the DAP add-on: viewtopic.php?f=47&t=59683
It includes DNSmasq in a newer version.
-Stefan
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!