DHCP Installation - OneIdentity/dnsupdate GitHub Wiki

Dnsupdate DHCP installation notes

This describes how the dnsupdate utility installs itself into the DHCP client on the various supported platforms.

DHCP hook installation

When the quest-dnsupdate package is installed it automatically runs the dnsupdate-install-hooks script found in /opt/quest/libexec. This script detects the system DHCP client in use and attempts to configure it to call dnsupdate whenever the DHCP IP address lease is created or renewed.

The following notes describe how various DHCP clients are configured by dnsupdate-install-hooks. The script assumes your server is single-homed (i.e. it only has one network interface).

Solaris

On Solaris 10 and later, we use DHCP client event scripts to trigger dnsupdate.

We create the executable script /etc/dhcp/eventhook, containing:

#!/bin/sh
# usage: eventhook <interface> <event>
case "$2" in
    BOUND|EXTEND)
        /opt/quest/bin/dnsupdate `/sbin/dhcpinfo -i "$1" Yiaddr`;;
esac

This script will be invoked the next time the interface address is renewed by the DHCP client.

On systems prior to Solaris 10, there is no reliable way to hook DHCP client events, and dnsupdate must be run manually.

AIX

On AIX 4.3.3 systems and later, we edit the file /etc/dhcpcd.ini, and replace the updateDNS line with the following:

updateDNS "/opt/quest/sbin/dnsupdate '%.0s%.0s%s%.0s'"

The next time a DHCP lease is renewed, dnsupdate is run.

HP-UX

We create an executable init script /sbin/rc1.d/S321dnsupdate with the following:

#!/bin/sh
if test 0 -ne 0`/usr/sbin/ch_rc -l -p 'DHCP_ENABLE[0]'`
then
    addr=`/usr/sbin/ch_rc -l -p 'IP_ADDRESS[0]'`
    case "$addr" in
        *.*.*.*) /opt/quest/sbin/dnsupdate $addr;;
    esac
fi

This script is only invoked once, each reboot, because HP-UX's auto_parms assumes that leased addresses will not change. This is usually the case.

SuSE Linux

We install the hook script /etc/sysconfig/network/if-up.d/dnsupdate-vas:

#!/bin/sh
# usage: dnsupdate-vas <cfname> <interface> [-o <opt>...]
test -f /etc/sysconfig/network/ifcfg-$1 &&
. /etc/sysconfig/network/ifcfg-$1
test x"$BOOTPROTO" = x"dhcp" || exit 0
. /var/lib/dhcpcd/dhcpcd-$2.info || exit
/opt/quest/sbin/dnsupdate "$IPADDR"

This script is executed the next time a DHCP lease is renewed.

Red Hat Linux (ISC DHCP)

We create or edit the file /etc/dhclient-exit-hooks so it contains the following shell fragment:

case "$reason" in
    BOUND|RENEW|REBIND|REBOOT)
        /opt/quest/sbin/dnsupdate "$new_ip_address";;
esac

This fragment is 'sourced' from another shell script, that is part of the system DHCP client software, the next time a DHCP lease is renewed.

macOS

We install a daemon process (ipwatchd) which is woken by Apple's System Configuration framework (SC) when a network interface address is changed.

Our ipwatchd daemon is run at startup by placing a configuration file into the /Library/LaunchDaemons directory and loading it with launchctl.

# launchctl load /Library/LaunchDaemons/com.quest.rc.ipwatchd.plist

# launchctl start com.quest.rc.ipwatchd

When ipwatchd is woken up, it runs the program passed to it on the command line, or passed to it via launchd and the ChangeProgram key in the configuration file:

    <key>ChangeProgram</key>
    <string>/opt/quest/sbin/dnsupdate</string>
⚠️ **GitHub.com Fallback** ⚠️