dhcpaction Command

Purpose

Provides a script that runs every time a client updates its lease.

Syntax

/usr/sbin/dhcpaction HostName DomainName IPAddress LeaseTime ClientID { A | PTR | BOTH | NONE } { NONIM | NIM }

Description

The dhcpaction command provides methods to update the DNS server by means of calling the nsupdate command with the proper sequence of events to update the A record, PTR record, or both. The dhcpaction command is called by the DHCP client and server daemons. It is called from the updateDNS string. This is configurable because in some environments, mainly heterogenous ones, some clients may not be able to update the A record or the PTR record. The default action is for the client to update the A record and the server to update the PTR record. The options may be set in the daemon configuration files to allow for any policy the network administator wants.

The dhcpaction command also allows you to run NIM and DHCP concurrently. The dhcpaction command, when given the NIM paramete, will try and issue updates to NIM objects when their IP addresses change. This keeps the objects in sync. To do this, some pending operations may have to be canceled. The objects will be commented and a message will be sent to the console of the master machine. The objects should not be reset often. Addresses should not commonly change in the DHCP environment. Only the clients should set the NONIM option.

Parameters

Item Description
ClientID Specifies the client ID to use when updating the DNS server.
DomainName Specifies the domain name to use when updating the DNS server.
HostName Specifies the host name to try and update in the DNS server.
IPAddress Specifies the IP address to associate with the host name in the DNS server.
LeaseTime Specifies the duration of the association between the host name and IP address in the DNS server in seconds.

Options

Item Description
A | PTR | BOTH | NONE Specifies which if any record should be updated in the DNS server.
NONIM | NIM Specifies if the script should take actions to help NIM and DHCP interact correctly. This should only be set to NIM on DHCP Servers.

Exit Status

This command returns the following exit values:

Item Description
0 Successful completion.
>0 An error occurred.

Security

Access Control: Any User, but may need to be root for some NIM actions.

Files

Item Description
/usr/sbin/dhcpaction Contains the dhcpaction command.
/etc/dhcpcd.ini Contains the DHCP Client Configuration File.