Tip

This is the documentation for the 19.05 version. Looking for the documentation of the latest version? Have a look here.

DHCP Configuration

The main IPv4 DHCP configuration mode, entered with dhcp4 server, defines global options for IPv4 DHCP that affect the general behavior of DHCP as well as options that cover all subnets and pools.

To enter IPv4 DHCP configuration mode, enter:

tnsr# configure
tnsr(config)# dhcp4 server
tnsr(config-kea-dhcp4)#

From this mode, there are a variety of possibilities, including:

subnet

Subnet configuration, see Subnet Configuration.

description

Description of the DHCP server

option

A DHCP Option declaration, see DHCP Options.

decline-probation-period <n>

Decline lease probation period, in seconds.

echo-client-id <boolean>

Controls whether or not the DHCP server sends the client-id back to the client in its responses.

interface listen <if-name>

The interface upon which the DHCP daemon will listen. This is required.

interface socket (raw|udp)

Controls whether the DHCP daemon uses raw or UDP sockets.

lease filename <path>

Lease database file

lease lfc-interval <n>

Lease file cleanup frequency, in seconds.

lease persist <boolean>

Whether or not the lease database will persist.

logging <logger-name>

Controls which DHCP daemon logger names will create log entries, or * for all. See the Kea documentation for Logging. for a list of values and their meanings.

match-client-id <boolean>

When true, DHCP will attempt to match clients first based on client ID and then by MAC address if the client ID doesn’t produce a match. When false, it prefers the MAC address.

next-server <IP Address>

Specifies a TFTP server to be used by a client.

rebind-timer <n>

Sets the period, in seconds, at which a client must rebind its address.

renew-timer <n>

Sets the period, in seconds, at which a client must renew its lease.

valid-lifetime <n>

The period of time, in seconds, for which a lease will be valid.

Some of these values may be set here globally, and again inside subnets or pools. In each case, the more specific value will be used. For example, if an option is defined in a pool, that would be used in place of a global or subnet definition; A subnet option will be favored over a global option. In this way, the global space may define defaults and then these defaults can be changed if needed for certain areas.