Next Previous Contents

5. Explaination of DHCP Configuration

A brief explanation of this config file isn't so simple. Read the following sections for a brief explanation of each line. Some of these are taken from dhcpd.conf(5).

5.1 Global section

This defines the defaults for dhcp.


The ddns-update-style controls how to update the dns record for the leased IP. In this case, I use 'none' so it doesn't update dns entries.


The one-lease-per-client makes sure, when the dhcp server recieves a DHCPREQUEST, that the client releases any other IP it currently has on the interface the client is using.


The domain-name is set in the global section to be used as the default domain for clients that request IP's and is appended to the hostname to form a FQDN.


The domain-name-servers is seperated by a comma and contains a list of DNS servers to be used for the clients.


The subnet-mask can be used in the global section or in a subnet declaration. When it is used in the global section, it is the default. When it is used in a subnet declaration, the global subnet-mask is overwritten by the subnet-mask with-in that declaration.


The default-lease-time is the length in seconds of the lease in seconds unless requested differently from the client.


The max-lease-time is the length in seconds that the lease will be assigned.


With authoritative set, it will send DHCPNAK messages to clients that have obtained address from a legitimate DHCP Server. The DHCP server will normally assume that the configuration information about a given network segment is not known to be correct and is not authoritative with out authoritative set. This means that if, by accident or something, another dhcp server is on the network without authoritative set it will not broadcast DHCPNAK messages to clients and the clients won't get updated with wrong leases.

5.2 Failover declaration

First off, in order to use this, you can only have two servers for this configuration. No more, no less. Secondly, you need the same version of dhcpd running on both machines.

failover peer "dhcp"

This specifies the name of the peer to use. Not the hostname, but the name of the failover delclaration. In this case, " dhcp" is used.


This specifies if the server is the primary or secondary.


This is the address that the server should listen for connections from its failover peer. This can be an IP or FQDN.


This defines what TCP port the server should listen for connections from its failover peer.

peer address

This defines which server it should connect to reach its failover peer. This can be an IP or FQDN.

peer port

This defines which TCP port to connect to its failover peer for failover messages.


This tells the DHCP server how many seconds can pass without receiving a message from its failover peer before it assumes the connection has failed.


This tells the DHCP server how man BNDUPD messages it can send before it receives a BNDACK from its peer.


This defines the Maximum Client Lead Time. It only needs to be specified on the primary failover peer. This is the length of time for which a lease may be renewed by either failover peer without contacting the other.


The split statement specifies the split between the primary and secondary Whenever a client makes a DHCP request, the DHCP server runs a hash on the client identification. If the hash comes out to less than the split value, the primary answers. If it comes out to equal to or more than the split, the secondary answers. The only meaningful value is 128, and can only be configured on the primary.

load balance max seconds

This statement allows you to configure a cutoff after which load balancing is disabled. The cutoff is based on the number of seconds since the client sent its first DHCPDISCOVER or DHCPREQUEST message, and only works with clients that correctly implement the secs field - fortunately most clients do.

5.3 Subnet declaration

The subnet declaration is specified in /etc/dhcpd.master.

subnet x.x.x.x netmask x.x.x.x

The subnet statement is used to provide the server with enough information to tell whether or not an IP address is on that subnet. It may also be used to provide subnet-specific parameters and to specify what addresses may be dynamically allocated to clients booting on that subnet. Such addresses are specified using the range declaration.


The pool declaration can be used to specify a pool of addresses that will be treated differently than another pool of addresses, even on the same network segment or subnet. This is used to define the failover peer, range and basically any other options that can be used in a subnet declaration.

failover peer

This defines which failover peer to use that is specified in the failover declaration. In this case, we use " dhcp" .


This defines which IP's to use for dhcp. The IP's should be on the same subnet as defined in the subnet declaration.

dynamic bootp clients

This deny's allocation from this pool to any bootp client. To allow it, use 'allow' instead of 'deny'.


This is an option to use that specifies which gateway/router the clients should use.

Next Previous Contents