DHCPcd

client

linux

dhcpcd [-146ABbDdEGgHJKLMNPpqTV] [-C| --nohook hook] [-c| --script script] [-e| --env value]
[-F| --fqdn FQDN] [-f| --config file] [-h| --hostname hostname] [-I| --clientid clientid] [-i| --vendorclassid vendorclassid]
[-j| --logfile logfile] [-l| --leasetime seconds] [-m| --metric metric]
[-O| --nooption option] [-o| --option option] [-Q| --require option] [-r| --request address] [-S| --static value]
[-s| --inform address [/cidr]] [--inform6] [-t| --timeout seconds] [-u| --userclass class] [-v| --vendor code, value]
[-W| --whitelist address [-X| --blacklist address [/cidr]] [-w] [--waitip [4 | 6]]
[-y| --reboot seconds] [/cidr]] [-Z| --denyinterfaces pattern] [-z| --allowinterfaces pattern]
[--inactive] [interface] [interface] []

dhcpcd -n --rebind [interface]
dhcpcd -k --release [interface]
dhcpcd -U --dumplease interface
dhcpcd -x --exit
dhcpcd --version
     dhcpcd 6.11.5 on raspberry pi 4/18/19
     Copyright (c) 2006-2016 Roy Marples
     Compiled in features: INET IPv4LL INET6 DHCPv6 AUTH

Gets the host information (IP address, routes, etc) from a DHCP server and configures the network interfaces

Then runs configuration script which writes DNS information to resolvconf(8), or /etc/resolv.conf.
If the hostname is currently blank, (null) or localhost, or force_hostname is YES or TRUE or 1 sets the hostname to the one supplied by the DHCP server.
then daemonises and waits for the lease renewal time to lapse.
then attempt to renew its lease and reconfigure if the new lease changes when the lease beings to expire or the DHCP server sends message to renew early.

If an interface reports carrier then dhcpcd obtains a lease then forks.

Local Link configuration

If dhcpcd failed to obtain a lease, it probes for a valid IPv4LL address (aka ZeroConf, aka APIPA). Once obtained it restarts the process of looking for a DHCP server to get a proper address.
When using IPv4LL, dhcpcd usually succeeds. In the rare case it fails, it normally means that there is a reverse ARP proxy installed which always defeats IPv4LL probing. To disable this behaviour, use -L, --noipv4ll

Multiple interfaces

If a list of interfaces are not given on the command line dhcpcd discovers available Ethernet interfaces that can be configured. When dhcpcd not limited to one interface on the command line, it is running in Master mode. dhcpcd is expected to be running this way.

If a single interface is given then dhcpcd only works for that interface and runs as a separate instance to other dhcpcd processes. --waitip is enabled in this instance to maintain compatibility with older versions. also affects the -k, -N, -n and -x where the same interface will need to be specified .
To force starting in Master mode with only one interface, use --master.

Interfaces are preferred by carrier, DHCP lease/IPv4LL and then lowest metric. For systems that support route metrics, each route will be tagged with the metric, otherwise dhcpcd changes the routes to use the interface with the same route and the lowest metric. See options below for controlling which interfaces we allow and deny through the use of patterns.

Hooking into events

dhcpcd runs /lib/dhcpcd/dhcpcd-run-hooks in lexical order, or the script specified by --script .
The default installation supplies the scripts 01-test, 02-dump, 20-resolv.conf and 30-hostname.
Disable a script by using --nohook . See dhcpcd-run-hooks(8)
dhcpcd ignores the exit code of the script.

Additional scripts are in /usr/share/dhcpcd/hooks and need to be copied to /lib/dhcpcd/dhcpcd-hooks
For example, 10-wpa_supplicant ensures that
wpa_supplicant is always running on a hot-plugged wireless interface.

-b
--background
Background immediately. useful for startup scripts which don't disable link messages for carrier status.
-B
--nobackground
-w Wait for an address to be assigned before forking to the background.
--waitip [4 | 6] Wait for an address to be assigned before forking to the background. 4 IPv4, 6 IPv6 address to be assigned. It is possible to wait for more than one address protocol and dhcpcd will only fork to the background when all waiting conditions are satisfied.
-c
--script script
script instead of the default /lib/dhcpcd/dhcpcd-run-hooks.
-e
--env value
Push value to the environment for use in dhcpcd-run-hooks(8). For example, force the hostname hook to always set the hostname with -e force_hostname=YES.
-j
--logfile logfile
Writes to the logfile not syslog, truncated when opened and is reopened on SIGUSR2
-f
--config file
Default:/etc/dhcpcd.conf. processes the config file before any command line options.
-M
--master
Start dhcpcd in Master mode even if only one interface specified on the command line. See the Multiple Interfaces .
-D
--duid
Generate an RFC 4361 compliant clientid. This requires persistent storage and not all DHCP servers work with it so it is not enabled by default. dhcpcd generates the DUID and stores it in /etc/dhcpcd.duid. This file should not be copied to other hosts.
-d
--debug
messages to the stderr and syslog.
-P
--printpidfile
Print the pidfile dhcpcd will use based on commmand-line arguments to stdout.
-q
--quiet
only warnings and errors will be displayed. The messages are logged .
--version Display program version and copyright , and exits
-x
--exit [interface]
signal an existing dhcpcd process running on the interface to exit.
If no interface is specified, then the above is applied to all interfaces in Master mode.
See the --persistent to control configuration persistence on exit, which is enabled by default in dhcpcd.conf(5). dhcpcd then waits until this process has exited.
-p
--persistent
prevent dhcpcd from de-configuring the interface and configuration when it exits.
-t
--timeout seconds
Default 30. A setting of 0 seconds causes dhcpcd to wait forever Don;t use.
If is working on a single interface then exits, otherwise forks to the background.
-T
--test
On receipt of DHCP messages call /lib/dhcpcd/dhcpcd-run-hooks with the reason of TEST which echos the DHCP variables found in the message to the console. The interface and configuration files are not changed.
The rapid_commit option is not sent in TEST mode so that the server does not lease an address.
To test INFORM the interface needs to be configured with the desired address before starting dhcpcd.
-U
--dumplease interface
Dumps the last lease for the interface to stdout. If omitted, standard input is used to read a DHCP wire formatted message. Use the -4 or -6 flags to specify an address family.
-V
--variables
Display a list of option codes, the associated variable and encoding for use in dhcpcd-run-hooks(8).
Variables are pre-fixed with new_ and old_ unless the option number is -.
Variables without an option are part of the DHCP message and cannot be directly requested.
/home/dgerman > sudo dhcpcd --test --debug -V
Interface options:
 -  interface
 -  reason
 -  pid
 -  ifcarrier
 -  ifmetric
 -  ifwireless
 -  ifflags
 -  ssid
 -  profile
 -  interface_order 
DHCPv4 options:
    ip_address
    subnet_cidr
    network_number
    filename
    server_name
  1 subnet_mask                  ipaddress request
121 classless_static_routes      string rfc3442
249 ms_classless_static_routes   string rfc3442
 33 static_routes                IPaddresses request
  3 routers                      IPaddresses request
  2 time_offset                  uint32
  4 time_servers                 IPaddresses
  5 ien116_name_servers          IPaddresses
  6 domain_name_servers          IPaddresses
  7 log_servers                  IPaddresses
  8 cookie_servers               IPaddresses
  9 lpr_servers                  IPaddresses
 10 impress_servers              IPaddresses
 11 resource_location_servers    IPaddresses

 12 host_name                    dname

 13 boot_size                    uint16
 14 merit_dump                   string

 15 domain_name                  array dname

 16 swap_server                  ipaddress

 17 root_path                    string
 18 extensions_path              string
 19 ip_forwarding                uint8
 20 non_local_source_routing     uint8
 21 policy_filter                IPaddresses
 22 max_dgram_reassembly         uint16
 23 default_ip_ttl               uint8
 24 path_mtu_aging_timeout       uint32
 25 path_mtu_plateau_table       array uint16
 26 interface_mtu                uint16
 27 all_subnets_local            uint8
 28 broadcast_address            ipaddress request
 29 perform_mask_discovery       uint8
 30 mask_supplier                uint8
 31 router_discovery             uint8
 32 router_solicitation_address  ipaddress
 34 trailer_encapsulation        uint8
 35 arp_cache_timeout            uint32
 36 ieee802_3_encapsulation      uint16
 37 default_tcp_ttl              uint8
 38 tcp_keepalive_interval       uint32
 39 tcp_keepalive_garbage        uint8
 40 nis_domain                   string
 41 nis_servers                  IPaddresses
 42 ntp_servers                  IPaddresses
 43 vendor_encapsulated_options  binhex
 44 netbios_name_servers         IPaddresses
 45 netbios_dd_server            ipaddress
 46 netbios_node_type            uint8
 47 netbios_scope                string
 48 font_servers                 IPaddresses
 49 x_display_manager            IPaddresses
 50 dhcp_requested_address       ipaddress
 51 dhcp_lease_time              uint32 request
 52 dhcp_option_overload         uint8
 53 dhcp_message_type            uint8
 54 dhcp_server_identifier       ipaddress
 55 dhcp_parameter_request_list  array uint8
 56 dhcp_message                 string
 57 dhcp_max_message_size        uint16
 58 dhcp_renewal_time            uint32 request
 59 dhcp_rebinding_time          uint32 request

 60 vendor_class_identifier      string
 61 dhcp_client_identifier       binhex
 64 nisplus_domain               string
 65 nisplus_servers              IPaddresses

 66 tftp_server_name             dname
 67 bootfile_name                string

 68 mobile_ip_home_agent         IPaddresses

 69 smtp_server                  IPaddresses
 70 pop_server                  IPaddresses
 71 nntp_server                 IPaddresses
 72 www_server                  IPaddresses
 73 finger_server               IPaddresses
 74 irc_server                  IPaddresses
 75 streettalk_server           IPaddresses
 76 streettalk_directory_assistance_serverarray 
                                ipaddress
 77 user_class                  binhex
 78 slp_agent                   embed
 79 slp_service                 embed
 80 rapid_commit                flag norequest
 81 fqdn                        embed
 83 isns                        embed
 85 nds_servers                 IPaddresses
 86 nds_tree_name               raw
 87 nds_context                 raw
 88 bcms_controller_names       array domain
 89 bcms_controller_address     IPaddresses
 90 auth                         embed
 91 client_last_transaction_time uint32
 92 associated_ip                IPaddresses
 98 uap_servers                  string
 99 geoconf_civic                encap
100 posix_timezone               string
101 tzdb_timezone                string
116 auto_configure               uint8
117 name_service_search          array uint16
118 subnet_selection             ipaddress
119 domain_search                array domain
120 sip_server                   string rfc3361
122 tsp                          encap
123 geoconf                      binhex
124 vivco                        binhex
125 vivso                        embed
136 pana_agent                   IPaddresses
137 lost_server                  domain
138 capwap_ac                    IPaddresses
139 mos_ip                       encap
140 mos_domain               encap
141 sip_ua_cs_list           array domain
142 andsf                    IPaddresses
143 andsf6                   array ip6address
144 geoloc                   binhex
145 forcerenew_nonce_capable array uint8
146 rdnss_selection          embed
150 tftp_servers             IPaddresses
208 pxelinux_magic           binhex
209 config_file              string
210 path_prefix              string
211 reboot_time              uint32
212 sixrd                    embed
213 access_domain            domain
221 vss                      encap
252 wpad_url                 string

ND options:
  1 source_address               binhex
  2 target_address               binhex
  3 prefix_information           embed index
  5 mtu                          embed
 25 rdnss                        embed index
 31 dnssl                        embed index

 DHCPv6 options:
 1 client_id             binhex
 2 server_id             binhex
 3 ia_na                 embed index norequest
 4 ia_ta                 embed index norequest
 5 ia_addr               embed index norequest
 6 option_request        array uint16
 7 preference            uint8
 8 elased_time           uint16
 9 dhcp_relay_msg        binhex
11 auth                  embed
12 unicast               ip6address
13 status_code           embed norequest
14 rapid_commit          flag norequest
15 user_class            binhex
16 vivco                 binhex
17 vivso                 embed
18 interface_id          binhex
19 reconfigure_msg       uint8
20 reconfigure_accept    flag
21 sip_servers_names     array domain
22 sip_servers_addresses array ip6address
23 name_servers          array ip6address
24 domain_search         array domain
25 ia_pd                 embed index norequest
26 prefix                embed index
27 nis_servers        array ip6address
28 nisp_servers       array ip6address
29 nis_domain_name    string
30 nisp_domain_name   string
31 sntp_servers       array ip6address
32 info_refresh_time  uint32
33 bcms_server_d      array domain
34 bcms_server_a      array ip6address
36 geoconf_civic      encap
37 remote_id          embed
38 subscriber_id      binhex
39 fqdn               embed
40 pana_agent         array ip6address
41 posix_timezone     string
42 tzdb_timezone      string
43 ero                array uint16
49 mip6_hnidf         domain
50 mip6_vdinf         encap
51 lost_server        domain
52 capwap_ac          array ip6address
53 relay_id           binhex
54 mos_ip             encap
55 mos_domain         encap
56 ntp_server         encap
57 access_domain      domain
58 sip_ua_cs_list     array domain
59 bootfile_url       string
60 bootfile_param     binhex
61 architecture_types array uint16
62 nii                embed
63 geoloc             binhex
64 aftr_name          domain
67 pd_exclude         embed
69 mip6_idinf         encap
70 mip6_udinf         encap
71 mip6_hnp           embed
72 mip6_haa           ip6address
73 mip6_haf           domain
74 rdnss_selection    embed
75 krb_principal_name string
76 krb_realm_name     string
78 krb_kdc            embed
80 link_address       ip6address
82 sol_max_rt         uint32 request
83 inf_max_rt         uint32 request

Restricting behaviour
-1
--oneshot
Exit after configuring an interface. Use the --waitip to specify which protocol(s) to configure before exiting.
-4
--ipv4only
-6
--ipv6only
-A
--noarp
Don't request or claim the address by ARP. disables IPv4LL.
-C
--nohook script
Don't run this hook script. Matches full name, or prefixed with 2 numbers optionally ending with .sh

To changing DNS settings : dhcpcd -C resolv.conf eth0

Actions
-g
--reconfigure
re-apply IP address, routing and run dhcpcd-run-hooks(8) for each interface. useful so a 3rd party such as PPP or VPN can change the routing table and / or DNS, etc and then instruct dhcpcd to put things back afterwards.
does not read a new configuration
-n
--rebind [interface]
Notifies dhcpcd to reload its configuration and rebind the specified interface. If no interface is specified then this applies to all interfaces in Master mode. If dhcpcd is not running, then it starts up as normal. This may also cause wpa_supplicant(8) to reload its configuration for each interface as well if the relevant hook script has been installed.
-N
--renew [interface]
renew existing addresses
. If no interface is specified applies to all in Master mode.
If dhcpcd is not running, then it starts up as normal. Unlike -n
--rebind the configuration is not reloaded.
-k
--release [interface]
release lease and de-configure the interface regardless of --persistent.
`If no interface is specified then applies to all in Master mode.
If no interfaces are left running, dhcpcd exits.
-y
--reboot seconds
before moving to the discover phase if we have an old lease to use.
before starting fallback states from the discover phase.
IPv4LL is started when the first reboot timeout is reached.
Default 5 seconds.
skips the reboot phase and go into discover. This on DHCPv6 only than skips the reboot phase.
-l
--leasetime seconds
Request a specific lease time in seconds. By default leaves leasing to the DHCP server.
-E
--lastlease
If dhcpcd cannot obtain a lease, then try to use the last lease acquired for the interface.
--lastleaseextend lease will be retained after it expires. dhcpcd will give it up if any other host tries to claim it for their own via ARP. violates RFC2131 7 which states the lease should be dropped once expired.
-r
--request [address]
Request the address in the DHCP DISCOVER message. There is no guarantee the DHCP server will give it.
If no address is given then the first address currently assigned to the interface is used.
-s
--inform [address[/cidr]]
like --request but sends a DHCP INFORM instead of DISCOVER/REQUEST.
This does not get a lease, just notifies the DHCP server of the address in use.
include the optional cidr network number in case the address is not already configured on the interface.
dhcpcd remains running and as if it has an infinite lease.
Will not de-configure the interface when it exits.
If dhcpcd fails to contact a DHCP server then it returns a fail ure instead of falling back on IPv4LL.
--inform6 Performs a DHCPv6 Information Request. No address is requested or specified, but all other DHCPv6 options are allowed. This is normally performed automatically when the IPv6 Router Advertises that the client should perform this operation. Only needed when dhcpcd is not processing IPv6RA messages and the need for DHCPv6 Information Request exists.
-F
--fqdn disable|none| ptr|both
DHCP server updates DNS using FQDN instead of just a hostname. dhcpcd does no DNS updates. dhcpcd encodes the FQDN hostname as specified in RFC1035.
-h
--hostname hostname
Sends hostname to the DHCP server so it can be registered in DNS. Default current system hostname .
If hostname is a FQDN (ie, contains a dot) then it will be encoded as such.
-I
--clientid clientid
Send the clientid. If the string is of the format 01:02:03 then it is encoded as hex.
For interfaces whose hardware address is longer than 8 bytes, or if the clientid is an empty string then sends a default clientid of the hardware family and the hardware address.
-i
--vendorclassid vendorclassid
Override the DHCPv4 vendorclassid field sent. The default is dhcpcd-&;lt;version>:::. For example
dhcpcd-5.5.6:NetBSD-6.99.5:i386:i386
If not set then none is sent. Some badly configured DHCP servers reject unknown vendorclassids. To work around it, try and impersonate Windows by using the MSFT vendorclassid.
-S
--static value
Configures a static DHCP value.
With an ip_address then dhcpcd will not attempt to obtain a lease and use the value for the address with an infinite lease time. Example configure a static address, routes and dns. dhcpcd -S ip_address=192.168.0.10/24 \ -S routers=192.168.0.1 \ -S domain_name_servers=192.168.0.1 \ eth0 Cannot set static DHCPv6 values. Use --env
-u
--userclass class
Tags the DHCPv4 message with the userclass class. DHCP servers use this to give members of the class DHCP options other than the default, without having to know things like hardware address or hostname.
-v
--vendor code,value
Add an encapsulated vendor option. code should be between 1 and 254 inclusive. To add a raw vendor string, omit code but keep the comma. Examples.
             IP address.
                   dhcpcd -v 01,192.168.0.2 eth0
             hex code.
                   dhcpcd -v 02,01:02:03:04:05 eth0
             IP address as a string.
                   dhcpcd -v 03,\"192.168.0.2\" eth0
             un-encapsulated vendor option to hello world.
                   dhcpcd -v ,"hello world" eth0

-o
--option option
Request the DHCP option variable for use in /lib/dhcpcd/dhcpcd-run-hooks.
-m
--metric metric
Metrics are used to prefer an interface over another one, lowest wins. dhcpcd will supply a default metic of 200 + if_nametoindex(3). An extra 100 will be added for wireless interfaces.
-G
--nogateway
Don't any default routes.
-H
--xidhwaddr
Use the last four bytes of the hardware address as the DHCP xid instead of a random number.
-J
--broadcast
Instructs the DHCP server to broadcast replies back to the client.
-K
--nolink
Don't receive link messages for carrier status.
-L
--noipv4ll
Don't use IPv4LL (aka APIPA, aka Bonjour, aka ZeroConf).
-O
--nooption option
Removes option from the DHCP message before processing.
-Q
--require option
Requires the option to be present in all DHCP messages, otherwise the message is ignored.
To enforce that dhcpcd only responds to DHCP servers and not BOOTP servers, --require dhcp_message_type.
-W
--whitelist address[/cidr]
Only accept packets from address[/cidr]
--blacklist
is ignored if --whitelist is set.
-X
--blacklist address[/cidr]
Ignore all packets from address[/cidr].
-Z
--denyinterfaces pattern […]
When discovering interfaces, the interface name must not match pattern which is a space or comma separated list of patterns
-z
--allowinterfaces pattern
When discovering interfaces, the interface name must match pattern --denyinterfaces takes precedence!
--inactive Don't start any interfaces other than those specified on the command line. This allows dhcpcd to be started in Master mode and then wait for subsequent dhcpcd commands to start each interface as required.
--nodev Don't load any /dev management modules.
3RDPARTY LINK MANAGEMENT Some interfaces require configuration by 3rd parties, such as PPP or VPN. When an interface configuration in dhcpcd is marked as STATIC or INFORM without an address then dhcpcd will monitor the interface until an address is added or removed from it and act accordingly. For point to point interfaces (like PPP), a default route to its destination is automatically added to the configura- tion. If the point to point interface is configured for INFORM, then dhcpcd unicasts INFORM to the destination, otherwise it defaults to STATIC. NOTES dhcpcd requires a Berkley Packet Filter, or BPF device on BSD based systems and a Linux Socket Filter, or LPF device on Linux based systems for all IPv4 configuration. If restricting dhcpcd to a single interface and optionally address family via the command-line then all further calls to dhcpcd to rebind, reconfigure or exit need to include the same restrictive flags so that dhcpcd knows which process to signal.

Log as result of sudo ifconfig wlan0 down; sudo ifconfig wlan0 up

12:55:16 daemon.info systemd[1]: Starting dhcpcd on all interfaces...
12:55:17 daemon.err dhcpcd[279]: no valid interfaces found
12:55:17 daemon.info dhcpcd[279]: forked to background, child pid 289
12:55:17 daemon.info systemd[1]: Started dhcpcd on all interfaces.

12:55:20 daemon.info dhcpcd-run-hooks[378]: wlan0: starting wpa_supplicant

12:55:24 daemon.info dhcpcd[289]: wlan0: waiting for carrier
12:55:25 daemon.info dhcpcd[289]:                                              eth0: waiting for carrier

12:55:25 daemon.info dhcpcd[289]: wlan0: carrier acquired
12:55:25 daemon.info dhcpcd[289]: DUID 00:01:00:01:21:b0:de:59:b8:27:eb:0f:cf:06
12:55:25 daemon.info dhcpcd[289]: wlan0: IAID eb:1c:5b:93
12:55:25 daemon.info dhcpcd[289]: wlan0: adding address fe80::2360:c560:acef:fd7e
12:55:25 daemon.info dhcpcd[289]: wlan0: carrier lost
12:55:25 daemon.info dhcpcd[289]: wlan0: deleting address fe80::2360:c560:acef:fd7e

12:55:25 daemon.info dhcpcd[289]:                                              eth0: carrier acquired
12:55:25 daemon.info dhcpcd[289]:                                              eth0: IAID 4c:53:44:58
12:55:25 daemon.info dhcpcd[289]:                                              eth0: adding address fe80::dbd3:57ef:a88c:c782

12:55:25 daemon.info dhcpcd[289]: wlan0: carrier acquired
12:55:25 daemon.info dhcpcd[289]: wlan0: IAID eb:1c:5b:93
12:55:25 daemon.info dhcpcd[289]: wlan0: adding address fe80::314c:5853:cd9c:11c3
12:55:25 daemon.info dhcpcd[289]: wlan0: soliciting a DHCP lease

12:55:26 daemon.info dhcpcd[289]:                                              eth0: soliciting an IPv6 router
12:55:26 daemon.info dhcpcd[289]:                                              eth0: rebinding lease of 192.168.1.10
12:55:26 daemon.info dhcpcd[289]:                                              eth0: probing address 192.168.1.10/24

12:55:26 daemon.info dhcpcd[289]: wlan0: soliciting an IPv6 router
12:55:26 daemon.info dhcpcd[289]: wlan0: offered 192.168.1.3 from 192.168.1.1
12:55:26 daemon.info dhcpcd[289]: wlan0: probing address 192.168.1.3/24

12:55:31 daemon.info dhcpcd[289]: wlan0: leased 192.168.1.3 for 600 seconds
12:55:31 daemon.info dhcpcd[289]: wlan0: adding route to 192.168.1.0/24
12:55:31 daemon.info dhcpcd[289]: wlan0: adding default route via 192.168.1.1

12:55:32 daemon.info dhcpcd[289]:                                              eth0: leased 192.168.1.10 for 600 seconds
12:55:32 daemon.info dhcpcd[289]:                                              eth0: adding route to 192.168.1.0/24
12:55:32 daemon.info dhcpcd[289]:                                              eth0: adding default route via 192.168.1.1

12:55:38 daemon.warning dhcpcd[289]:                                           eth0: no IPv6 Routers available
12:55:38 daemon.warning dhcpcd[289]: wlan0: no IPv6 Routers available

FILES

/etc/dhcpcd.conf 
     /etc/dhcpcd.duid               DUID used to identify the host.  
     /etc/dhcpcd.secret             secret key known only to the host.  
     /lib/dhcpcd/dhcpcd-run-hooks   Bourne shell script that is run to configure or de-configure an interface.  
     /lib/arm-linux-gnueabihf/dhcpcd/dev management modules.  
     /lib/dhcpcd/dhcpcd-hooks 

     /var/lib/dhcpcd5/dhcpcd-interface-ssid.lease actual DHCP message sent by the server.
          used when reading the last lease and use the files mtime as when it was issued.  
     /var/lib/dhcpcd5/dhcpcd-interface-ssid.lease6 

     /var/lib/dhcpcd5/dhcpcd-rdm.monotonic counter used in the replay field in Authentication Options.  
     /var/run/dhcpcd.pid            PID of dhcpcd running on all interfaces.  
     /var/run/dhcpcd-interface.pid  PID of dhcpcd running on the interface.

     /var/run/dhcpcd.sock            Control socket to the master daemon.

     /var/run/dhcpcd.unpriv.sock     Unpriviledged socket to the master daemon, only for state retrieval.  
     /var/run/dhcpcd-interface.sock Control socket to per interface daemon.

     dhcpcd is also an implementation of 
     BOOTP client specified in RFC 951.  
     IPv6 Router Solicitor as specified in RFC 4861 and RFC 6106.  
     IPv6 Privacy Extensions to AutoConf as specified in RFC 4941.  needs to be enabled in the kernel 
     DHCPv6 client as specified in RFC 3315.  By default, dhcpcd only starts DHCPv6 when instructed by an IPV6 Router Advertisement. 
         If no Identity Association is configured, then a Non-temporary Address is requested.

See

fnmatch(3), if_nametoindex(3), dhcpcd.conf(5), resolv.conf(5), dhcpcd-run-hooks(8), resolvconf(8)

/etc/syslog.conf : local0.* /var/log/dhcpcd.log
and refresh syslogd daemon: kill -1 `cat /var/run/syslogd.pid`

dhcpd [-knrCRSY] [-c ExecFilePath] [-s[ipaddr]] [-G[gateway]] [-w windowsize] [-LConfigDir] [interface]

-k Sends SIGHUP signal to the dhcpcd process that is currently running which sends DCHP_RELEASE the server and destroy dhcpcd cache.

SIGTERM normally used by shutdown(8) will not send DHCP_RELEASE and will not destroy cache. When system boots will use cache to request the same IP address from server

-n Sends SIGALRM renew the lease. If dhcpcd is not running the flag is ignored and follows the normal startup procedure.
-r Makes dhcpcd RFC1541 (obsolete) compliant. is RFC2131 compliant unless this option is specified.
-B Requests broadcast response from DHCP server.
-C calculate checksum on received packets.
-D set domainname as supplied by DHCP server. By default will NOT set domainname
-H set hostname of the host to the hostname option supplied by DHCP server. By default will NOT set hostname
-L ConfigDir ConfigDir instead of default /etc/dhcpc
-R Prevents from replacing existing /etc/resolv.conf
-Y Prevents from replacing existing /etc/yp.conf . Domainname is not updated unless -D is specified.
-N Prevents from replacing existing /etc/ntp.conf
-S send second DHCP_DISCOVER message even after receiving DHCP_OFFER on the first one.
-T Test case, goes through the DHCP negotiation sequence but doesn't configure the interface.
writes the ConfigDir/dhcpcd-interface.info and ConfigDir/dhcpcd-interface.cache files and it attempt to execute ConfigDir/dhcpcd.exe script.
The pathname of dhcpcd.exe executable script can be changed with -c ExecFilePathgt; .
-t timeout seconds for how long will try to get an IP address. default 60 seconds. will not fork into background until it gets a valid IP address in which case returns 0
In a case times out before receiving a valid IP address from DHCP server return exit code 1
-c <ExecFilePath> will try to execute ExecFilePath instead of default ConfigDir/dhcpcd.exe every time it configures or brings down the interface.
-hhostname string used for the hostname option field when dhcpcd sends DHCP messages. Some DHCP servers, notably those used by @Home Networks, require the hostname option field containing a specific string in the DHCP messages from clients.
-i vendorClassID vendor class identifier string.
-I ClientID client identifier string. Default MAC address
-l leasetime seconds the recommended lease time to the server. (server can override this value ). used in the DHCP_DISCOVER message. The default is infinite (0xFFFFFFFF).
-G [gateway] Prevents installing default routes provided by DHCP server. If optional gateway ip address parameter is supplied then use it for default route.
-s [ipaddr] Sends DHCP_INFORM message to DHCP server using ipaddr. The optional ipaddr parameter must be in the form xxx.xxx.xxx.xxx. If no ipaddr parameter is given on the command line uses the IP address currently assigned to the interface. If there is no IP address currently assigned uses previously obtained IP address stored in ConfigDir/dhcpcd-interface.cache
-w <windowsize> Specifies window size for the gateway route. Default=32768.
interface network interface name Default eth0

FILES

/etc/dhcpc Default ConfigDir directory used for storing files See option -L ConfigDir above.
ConfigDir/dhcpcd-interface.info the host information. The interface is replaced with the network interface name like eth0 to which dhcpcd is attached.
ConfigDir/dhcpcd.exe execute whenever it configures or brings down the interface.
The path with -c ExecFilePath .
3 parameters are passed to dhcpcd.exe script:
dhcpcd.exe HostInfoFilePath up|down|new [-d]
The first parameter HostInfoFilePath is path to dhcpcd-interface.info , interface is replaced with interface name dhcpcd is attached to, for example eth0.
The second parameter values >up|down|new means the interface has been brought up with the same address, with a new IP address or brought down ("down").
Parameter -d is passed if started with -d debug
ConfigDir/dhcpcd-interface.cache contains the previously assigned IP address and some other things. interface is replaced with the network interface name like eth0 to which dhcpcd is attached.
/etc/resolv.conf created when the client receives DNS and domain name options. The old file is renamed to /etc/resolv.conf.sv and restored when dhcpcd exits for any reason.
/etc/yp.conf created when the client receives NIS options. The old file is renamed to /etc/yp.conf.sv and restored when dhcpcd exits for any reason.
/etc/ntp.conf created when the client receives NTP options. The old file is renamed to /etc/ntp.conf.sv and restored when dhcpcd exits for any reason.
ConfigDir/dhcpcd-interface.pid containing the process id The interface is replaced with the network interface name like eth0 to which dhcpcd is attached.

See

Dynamic Host Configuration Protocol, RFC2131 and RFC1541 (obsolete)
DHCP Options and BOOTP Vendor Extensions, RFC2132

Bugs

Uses time(3) to calculate the lease expiration time. If the system time is changed while the client is running, the lease expiration time may not be predictable.
01-test 
# Echo the interface flags, reason and message options

if [ "$reason" = "TEST" ]; then
    set | grep "^\(interface\|pid\|reason\|profile\|skip_hooks\)=" | sort
    set | grep "^if\(carrier\|flags\|mtu\|wireless\|ssid\)=" | sort
    set | grep "^\(new_\|old_\|nd[0-9]*_\)" | sort
    exit 0
fi

reformatted
sudo dhcpcd --test --debug
dhcpcd-6.11.5 starting
wlan0: IPv6 kernel autoconf disabled
DUID 00:01:00:01:21:b0:de:59:b8:27:eb:0f:cf:06
wlan0: IAID eb:1c:5b:93
wlan0: delaying IPv6 router solicitation for 1.0 seconds         wlan0: delaying IPv4 for 0.5 seconds
wlan0: using ClientID 01:b8:27:eb:1c:5b:93
wlan0: reading lease `/var/lib/dhcpcd5/dhcpcd-wlan0-disabled.lease'
wlan0: rebinding lease of 192.168.1.3
wlan0: sending REQUEST (xid 0x14488837), next in 3.6 seconds
wlan0: acknowledged 192.168.1.3 from 192.168.1.1
wlan0: leased 192.168.1.3 for 3600 seconds

wlan0: executing `/lib/dhcpcd/dhcpcd-run-hooks' TEST
interface='wlan0'        pid='32063'         reason='TEST'       ifcarrier='up'      ifflags='4163'  ifmtu='1500'

ifssid='disabled'        ifwireless='1'

new_broadcast_address='192.168.1.255'            new_dhcp_lease_time='3600'
new_dhcp_message_type='5'                        new_dhcp_server_identifier='192.168.1.1'
new_domain_name='germans'                        new_domain_name_servers='192.168.1.1'           new_domain_search='germans'
new_ip_address='192.168.1.3'                     new_network_number='192.168.1.0'                new_routers='192.168.1.1'
new_subnet_cidr='24'                             new_subnet_mask='255.255.255.0'

old_broadcast_address='192.168.1.255'            old_dhcp_lease_time='3600'
old_dhcp_message_type='5'                        old_dhcp_server_identifier='192.168.1.1'
old_domain_name='germans'                        old_domain_name_servers='192.168.1.1'           old_domain_search='germans'
old_ip_address='192.168.1.3'                     old_network_number='192.168.1.0'                old_routers='192.168.1.1'
old_subnet_cidr='24'                             old_subnet_mask='255.255.255.0'
dhcpcd exited


/etc

dhcpcd.duid
rc5.d/S01dhcpcd
rc2.d/S01dhcpcd
rc4.d/S01dhcpcd
rc1.d/K01dhcpcd
systemd/system/multi-user.target.wants/dhcpcd.service
systemd/system/dhcpcd5.service
init.d/dhcpcd
dhcp
dhcpcd.conf
rc0.d/K01dhcpcd
dhcpcd.secret
rc3.d/S01dhcpcd
rc6.d/K01dhcpcd
alternatives/dhcpcd.8.gz
alternatives/dhcpcd