26: Configuring DHCP server and DNS (Dnsmasq)
_______________________________________________________________________________________________________
_______________________________________________________________________________________________________
© Virtual Access 2018
GW6600 Series User manual
Issue: 1.7
Page 296 of 519
list server '1.2.3.4'
list server '4.5.6.7'
list rebind_domain 'test1.domain'
list rebind_domain 'tes2.domain'
option logqueries '1'
option resolvfile '/tmp/resolv1.conf.auto'
list addnhosts 'hosts1'
list addnhosts 'hosts2'
option enable_tftp '1'
option tftp_root '/tmp/tftp'
option dhcp_boot 'boot.image'
option filterwin2k '1'
option nonegcache '1'
option strictorder '1'
list bogusnxdomain '1.1.1.1 '
list bogusnxdomain '2.2.2.2'
option port '53'
option dhcpleasemax '150'
option ednspacket_max '1280'
option dnsforwardmax '150'
Options
local
and
domain
enable dnsmasq to serve entries in /etc/hosts as well as the
DHCP client's names as if they were entered into the LAN DNS domain.
For options
domainneeded, boguspriv, localise_queries
, and
expandhosts
make
sure that requests for these local host names (and the reverse lookup) never get
forwarded to the upstream DNS servers.
26.3.2
Configuring static leases using command line
Static leases are configured under the dhcp package, stored at /etc/config/dhcp.
By default, all static leases instances are named host. The static lease is identified by
@host
then the static lease position in the package as a number. For example, for the
first static lease in the package using UCI:
dhcp.@host[0]=dhcp
dhcp.@host[0].name=mypc
Or using package options:
config host
option name ‘mypc’