Implements a Dynamic Host Configuration Protocol (DHCP) client. Serves addresses and configuration information to DHCP server.
To Implement a DHCP Client by Using the System Resource Controller:
startsrc -s dhcpcd [ -aArgument] ...
To Implement a DHCP Client without Using the System Resource Controller:
dhcpcd [ -f ConfigurationFile] [ -i IPAddress] [ -l LeaseFile ] [ -n ] [ -o OptionsFile ] [ -r ] [ -t Seconds ] [ -T Minutes ]
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 boot time. By default, this is commented out and not run on machine startup. There are smit options to enable the DHCP client.
The dhcpcd daemon reads its configuration file and attempts to bring up 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 will renew an already received address as required.
The dhcpcd daemon also runs in DHCP Inform mode when the -i flag is used. This mode lets a client retrieve configuration information from a DHCP server without getting an IP address. This is useful for static addresses, but not for dynamic items like print servers and other options. The dhcpcd daemon will run once for the specified address.
The refresh command can be used to cause the dhcpcd daemon to reread the configuration file. A SIGHUP may also be used to get the same response.
The default dhcpcd configuration file is /etc/dhcpcd.ini. It contains logging and network interface information.
You can use a Web-based System Manager application (wsm network fast path) to run this command. You could also use the System Management Interface Tool (SMIT) smit usedhcp fast path to run this command.
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 should use DHCP Inform mode. The ip address tells DHCP which interface to get configuration information on. |
-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 the client daemon up then down when run one time. |
-t Seconds | Specifies the amount of seconds that dhcpcd will wait before placing itself in the background. This allows a machine 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, due to non-availability of dhcp server) within this timeout value, it stops further attempt. |
This command returns the following exit values:
Item | Description |
---|---|
0 | Successful completion. |
>0 | An error occurred. |
Access Control: You must have root authority to run this command.
Item | Description |
---|---|
/usr/sbin/dhcpcd | Contains the dhcpcd daemon. |
/etc/dhcpcd.ini | Contains the default client configuration file |
/etc/services | Defines sockets and protocols used for internet services. |
/etc/inetd.conf | Defines the services controlled by the inetd daemon. |