26: Configuring DHCP server and DNS (Dnsmasq)
_______________________________________________________________________________________________________
_______________________________________________________________________________________________________
© Virtual Access 2018
GW1000 Series User Manual
Issue: 2.3
Page 273 of 463
By default, all dhcp pool instances are named ‘dhcp’, it is identified by
@dhcp
then the
dhcp pool position in the package as a number. For example, for the first dhcp pool in
the package using UCI:
dhcp.@dhcp[0]=dhcp
dhcp.@dhcp[0].interface=LAN
Or using package options:
config dhcp
option interface ‘LAN’
However, to better identify, it is recommended to give the dhcp pool instance a name.
For example, to create a dhcp pool instance named LAN.
To define a named dhcp pool instance using UCI, enter:
dhcp.LAN=dhcp
dhcp.LAN.interface=LAN
To define a named dhcp pool instance using package options, enter:
config dhcp 'LAN'
option interface 'LAN'
26.3.3.1
Configuring DHCP pools using UCI
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
26.3.3.2
Configuring DHCP pools using package options
root@VA_router:~# uci export dhcp
package dhcp
…..
config 'dhcp' 'LAN'
option 'interface' 'LAN'
option 'start' '100'
option 'limit'
'150'
option 'leasetime' '12h'
option ignore 0