26: Configuring DHCP server and DNS (Dnsmasq)
_______________________________________________________________________________________________________
_______________________________________________________________________________________________________
© Virtual Access 2018
GW6600 Series User manual
Issue: 1.7
Page 294 of 519
Web Field/UCI/Package Option
Description
Web: Dynamic DHCP
UCI: dhcp.@dhcp[x].dynamicdhcp
Opt: dynamicdhcp
Defines whether to dynamically allocate DHCP leases.
1
Dynamically allocate leases.
0
Use /etc/ethers file for serving DHCP
leases.
Web: Force
UCI: dhcp.@dhcp[x].force
Opt: force
Forces DHCP serving on the specified interface even if another
DHCP server is detected on the same network segment.
0
Disabled.
1
Enabled.
Web: IPv4-Netmask
UCI: dhcp.@dhcp[x].netmask
Opt: netmask
Defines a netmask sent to clients that overrides the netmask as
calculated from the interface subnet.
Use netmask from interface subnet.
Range
Web: DHCP-Options
UCI: dhcp.@dhcp[x].dhcp_option
Opt: list dhcp_option
Defines additional options to be added for this dhcp pool.
For example, with 'list dhcp_option 26,1470' or 'list dhcp_option
mtu, 1470' you can assign a specific MTU per DHCP pool. Your
client must accept the MTU option for this to work. Options that
contain multiple values should be separated by a comma.
Example: list dhcp_option 6,192.168.2.1,192.168.2.2
No options defined.
Syntax
Option_number, option_value
Web: n/a
UCI: dhcp.@dhcp[x].networkid
Opt: networkid
Assigns a network-id to all clients that obtain an IP address from
this pool.
Use network from interface subnet.
Range
Table 107: Information table for DHCP advanced settings page
26.3
Configuring DHCP and DNS using command line
Possible section types of the DHCP configuration file include Common Options
(dnsmasq), DHCP Pools (dhcp) and Static Leases (host). Not all types may appear in the
file and most of them are only needed for special configurations.
26.3.1
Dnsmasq using command line
The configuration section type dnsmasq determines values and options relevant to the
overall operation of dnsmasq and the DHCP options on all interfaces served.
26.3.1.1
Dnsmasq using UCI
root@VA_router:~# uci show dhcp
dhcp.@dnsmasq[0]=dnsmasq
dhcp.@dnsmasq[0].domainneeded=1
dhcp.@dnsmasq[0].boguspriv=1
dhcp.@dnsmasq[0].filterwin2k=0
dhcp.@dnsmasq[0].localise_queries=1
dhcp.@dnsmasq[0].logqueries=1
dhcp.@dnsmasq[0].rebind_protection=1
dhcp.@dnsmasq[0].rebind_localhost=1