Purpose
Default configuration
information for the Dynamic Host Configuration Protocol (DHCP) client
program (dhcpcd).
Description
The dhcpcd configuration file contains entries for
logging information, requested options, interfaces to configure,
and other items.
Following are the formats for the data in
the configuration file.
- # Comment line
- The # character means that there is a comment from that point
to the end of the line.
- numLogFiles n
- Specifies the number of log files. If 0 is specified, no log
file will be maintained and no log message is displayed anywhere.
n is the maximum number of log files maintained as the size
of the most recent log file reaches its maximum size and a new log
file is created.
- logFileSize n
- Maximum size of a log file. When the size of the most recent
log file reaches this value, it is renamed and a new log file is
created. n is measured in kilobytes(KB).
- logFileName filename
- Name and path of the most recent log file. Less recent log files
have the number 1 to (n - 1) appended to their names; the larger
the number, the older the file.
- logItem <option name>
- One item that will be logged. Multiple of these lines are allowed.
This allows for the specified logging level to be turned on. The
following are option names:
- SYSERR
- System error, at the interface to the platform
- OBJERR
- Object error, in between objects in the process
- PROTERR
- Protocol error, between client and server
- WARNING
- Warning, worth attention from the user
- EVENT
- Event occurred to the process
- ACTION
- Action taken by the process
- INFO
- Information that might be useful
- ACNTING
- Who was served, and when
- TRACE
- Code flow, for debugging.
- interface <ifName>
- The interface to configure DHCP on. This may be the interface
that is to be configured. Multiples of these are allowed. There is
a special entry, any. This tells the DHCP client to configure
the first one it finds and completes successfully. If the any option is used, there should not be any other interface specified.
The interface statement may be immediately followed by a pair of
curly braces, in which the options requested for this interface can
be specified. Options requested within interface curly braces apply
only to this interface. See DHCP Server Configuration File for a list of options and
formats.
- clientid <MAC | HOSTNAME>
- Specifies the client id to use in all communication with the
server. MAC denotes that the hardware address for the particular
interface should be used as the client id. HOSTNAME denotes
that the domain host name should be used as the client id. The default
is MAC.
- sniffer <exec string>
- Specifies a string enclosed in quotes, indicating a program
to execute to detect hardware failure/recovery for an interface.
The dhcp client will look for signal 23(SIGIO) to indicate that the
network interface is up and signal 16(SIGURG) to indicate that the
network interface is down.
- option <code> [<value>] [exec <string>]
- Specifies an option requested by this client. Its scope is determined
by whether it is inside a set of curly braces for a particular interface,
or if it is outside all curly braces. If outside, it applies to all
interfaces. code is the option code of the option requested. value is the requested value for that option. This value is
passed to the server with the option. The value is not required.
The keyword exec denotes a string following which should
be executed if this option is returned by the server. This string
is expected to be an executable shell script or program. An "%s"
may be included in the string. If present, the value returned by the
server will be provided in ascii.
- vendor
- Specifies the special syntax for the specification of the vendor
extensions field. It is followed by a set of curly braces. Inside
the curly braces, the options and values for the vendor extensions
field are specified. The exec string on an option inside the vendor
extensions options is not valid. It is ignored.
- reject <code>
- Specifies that if this option code is returned by the server,
this option should be ignored by the client. Its value should not
be used.
- otherOptions <accept | reject>
- Specifies how all other options should be handled by the client.
This refers to any options not specifically requested with an "option"
statement or rejected with a "reject" statement. The default is that
all options are accepted.
- updateDNS <string>
- A string enclosed in quotes, indicating a program to execute
to update the DNS server with the new inverse mapping for the IP
address and names served by dhcp. This string should include
four %s's to indicate the placement of the following information from
the dhcp client:
- hostname
- Value of option 12. The value returned by the dhcp server
is used, if one is supplied. Else, if the client specified a value
in this file, the client-requested value is used. If neither
the client specified a requested hostname nor the server supplied
one, this exec string will not be executed.
- domainname
- Value of option 15. The value returned by the dhcp server
is used, if one is supplied. Else, if the client specified a value
in this file, the client-requested value is used. If neither
the client specified a requested hostname nor the server supplied
one, a null string (" ") will be supplied by dhcp. Therefore,
this value is optional.
- Ip Address
- IP address leased to this client by the server. The string is
supplied in dotted notation, for example, 9.2.23.43.
- leasetime
- Lease time granted by the server. This string is a decimal number
representing the number of seconds of the lease.
These values are output by dhcp in this
order:
hostname domainname Ip Address leasetime
A script /usr/sbin/dhcpaction has been provided with
this function, as well as actions to help NIM interact with DHCP
clients. Run the script as follows:
/usr/sbin/dhcpaction hostname domainname ipaddress
leasetime < A | PTR | BOTH | NONE > NONIM
The
first four parameters are what will be used to update the DNS server.
The fifth parameter tells dhcpaction to update the A record,
the PTR record, or both, or none. The options are A, PTR, BOTH, NONE. The sixth parameter is used
to tell servers that NIM is being used, and processing needs to be
done when a client changes address. The options for this are NIM
and NONIM. On clients, this must be set to NONIM.
An example
follows:
updateDNS "/usr/sbin/dhcpaction %s %s %s %s %s PTR
NONIM 2>&1 >>/tmp/updns.out"
- initTimeout <timeout>
- Specifies the timeout value in minutes. If the dhcp client fails
to configure an address for an interface within this timeout value,
it stops making further attempts. This entry applies to systems running AIX® 5.2 and subsequent releases.
This file is part of TCP/IP in Network Support
Facilities in Base Operating System (BOS) Runtime.
Example
This example
tells the dhcpcd daemon to use log files of a maximum of 100Kb
in size and at most four of them.
The base name for the log
files is /usr/tmp/dhcpsd.log. The user also would like to
only log four of the nine possible log entry types. The user also
specified a string to use for updating the Dynamic Domain Name Server.
The user also specified that the clientid to the server should
be based on the mac-address of the interface adapter that is trying
to be configured. The user also specified that all options should
be accepted and instantiated (otheroptions accept), except
for option 9 (reject 9).
The options the user specified
were the domain (option 15), but since this option is global to the
interface keywords, it applies to both interfaces.
Inside each
interface, the hostname is specified with option 12.
numLogFiles 4
logFileSize 100
logFileName /usr/tmp/dhcpsd.log
logItem SYSERR
logItem OBJERR
logItem PROTERR
logItem TRACE
updateDNS "nsupdate -h%s -d%s -i% %s"
clientid MAC
otheroptions accept
reject 9
option 15 "austin.ibm.com"
interface en0
{
option 12 "e-chisos"
}
interface tr0
{
option 12 "t-chisos"
}