14: Configuring DHCP server and DNS (Dnsmasq)
_______________________________________________________________________________________________________
_____________________________________________________________________________________________________
© Virtual Access 2017
GW7304 Series User Manual
Issue: 1.9
Page 123 of 336
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.
14.4
Configuring DHCP pools using UCI
Sections of the type dhcp specify per interface lease pools and settings. Typically there is
at least one section of this type present in the /etc/config/dhcp file to cover the LAN
interface.
You can disable a lease pool for a specific interface by specifying the ignore option in the
corresponding section.
A minimal example of a dhcp section is shown below.
root@VA_router:~# uci show dhcp.lan
dhcp.lan=dhcp
dhcp.lan.interface=lan
dhcp.lan.start=100
dhcp.lan.limit=150
dhcp.lan.leasetime=12h
dhcp.lan.ignore=0
root@VA_router:~# uci export dhcp
config 'dhcp' 'lan'
option 'interface' 'lan'
option 'start' '100'
option 'limit'
'150'
option 'leasetime' '12h'
option ignore 0
UCI/Package Option
Description
Web: n/a
UCI: dhcp.<pool_name>.interface
Opt: interface
Defines the interface that is served by this DHCP pool. This must
be one of the configured interfaces.
lan
Enabled.
Range
Web: n/a
UCI: dhcp.<pool_name>.start
Opt: start
Defines the offset from the network address for the start of the
DHCP pool. It may be greater than 255 to span subnets
100
Range
Web: n/a
UCI: dhcp.<pool_name>.limit
Opt: limit
Defines the offset from the network address for the end of the
DHCP pool
150
Range
0 - 255