14: Configuring DHCP server and DNS (Dnsmasq)
_______________________________________________________________________________________________________
_____________________________________________________________________________________________________
© Virtual Access 2017
GW7304 Series User Manual
Issue: 1.9
Page 124 of 336
Web: n/a
UCI: dhcp.<pool_name>.leasetime
Opt: leasetime
Defines the lease time of addresses handed out to clients, for
example 12h or 30m.
12h
12 hours
Range
Web: n/a
UCI: dhcp.<pool_name>.ignore
Opt: ignore
Defines whether this DHCP pool is enabled.
0
DHCP pool enabled.
1
DHCP pool disabled.
Web: n/a
UCI: dhcp.<pool_name>.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: n/a
UCI: dhcp.<pool_name>.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.
No options defined
Syntax
Option_number, option_value.
Web: n/a
UCI: dhcp.<pool_name>.dynamicdhcp
Opt: dynamicdhcp
Defines whether to allocate DHCP leases.
1
Dynamically allocate leases.
0
Use /etc/ethers file for serving DHCP
leases.
Web: n/a
UCI: dhcp.<pool_name>.dynamicdhcp
Opt: networkid
Assigns a network-id to all clients that obtain an IP address from
this pool.
Table 36: Information table for DHCP pool UCI and package options
14.5
Configuring static leases using UCI
You can assign fixed IP addresses to hosts on your network, based on their MAC
(hardware) address.
root@VA_router:~# uci show dhcp.mypc
dhcp.mypc=host
root@VA_router:~# uci show dhcp.mypc
dhcp.mypc.ip=192.168.1.2
dhcp.mypc.mac=00:11:22:33:44:55
dhcp.mypc.name=mypc
root@VA_router:~# uci export dhcp
config host 'mypc'
option ip '192.168.1.2'
option mac '00:11:22:33:44:55'
option name 'mypc'
This adds the fixed IP address 192.168.1.2 and the name "mypc" for a machine with the
(Ethernet) hardware address 00:11:22:33:44:55.