dhcpcd Daemon

Purpose

Implements a Dynamic Host Configuration Protocol (DHCP) client. Serves addresses and configuration information to the DHCP server.

Syntax

To implement a DHCP client by using the System Resource Controller (SRC):

startsrc -s dhcpcd [-a Argument] ...

To implement a DHCP client without using SRC:

dhcpcd [-f ConfigurationFile] [-i IPAddress] [-l LeaseFile] [-n] [-o OptionsFile] [-r] [-t Seconds] [-T Minutes]

Description

The dhcpcd daemon implements a DHCP client by setting up IP (Internet Protocol) addresses and other parameters by using the DHCP protocol.

The dhcpcd daemon is normally started by the /etc/rc.tcpip file that normally runs at start time. By default, it is commented out and not run on system startup. There are System Management Interface Tool (SMIT) options to enable the DHCP client.

The dhcpcd daemon reads its configuration file and attempts to start and get an IP address and other configuration options for the interfaces specified within the configuration file. The dhcpcd daemon runs in the background while the system is up. It renews an already received address as required.

The dhcpcd daemon also runs in DHCP Inform mode when the -i flag is used. By using this mode, a client can retrieve configuration information from a DHCP server without getting an IP address. It is useful for static addresses, but not for dynamic items like print servers and other options. When you use the -i flag with an IP address parameter, the dhcpcd daemon runs once for the specified address.

The refresh command can be used to cause the dhcpcd daemon to reread the configuration file. A SIGHUP might also be used to get the same response.

The default configuration file for the dhcpcd daemon is /etc/dhcpcd.ini. It contains logging and network interface information.

You can use the SMIT smit usedhcp fast path to run this command.

Flags

Item Description
-f ConfigurationFile Specifies the configuration file to be used. The default is the /etc/dhcpcd.ini file.
-i IPAddress Specifies that the dhcpcd daemon must use DHCP Inform mode. The IP address tells DHCP on which interface to get configuration information.
-l LeaseFile Specifies a different lease file. The lease file gets generated by the client when it obtains a lease. By default, the lease file is /etc/dhcpc.db.
-n Prevents the interface from being reconfigured when it receives a new address.
-o OptionsFile Specifies the options file. By default, the options file is /etc/dhcpc.opt.
-r Brings up the client daemon and then down when run once.
-t Seconds Specifies the number of seconds that DHCP waits before it places itself in the background. It allows a system to continue booting if a DHCP server cannot be found.
-T Minutes Specifies the time in minutes. If the DHCP client fails to configure an address for an interface (for example, because of non-availability of DHCP server) within this timeout value, it stops further attempts.

Exit Status

This command returns the following exit values:

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

Security

Access Control: You must have root authority to run this command.

Files

Item Description
/usr/sbin/dhcpcd Contains the dhcpcd daemon.
/etc/dhcpcd.ini Contains the default client configuration file
/etc/services Defines sockets and protocols that are used for internet services.
/etc/inetd.conf Defines the services that are controlled by the inetd daemon.