Annotation of src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in, Revision 1.1.1.4.2.2
1.1.1.4.2.1 snj 1: .\" Copyright (c) 2006-2018 Roy Marples
1.1 roy 2: .\" All rights reserved
3: .\"
4: .\" Redistribution and use in source and binary forms, with or without
5: .\" modification, are permitted provided that the following conditions
6: .\" are met:
7: .\" 1. Redistributions of source code must retain the above copyright
8: .\" notice, this list of conditions and the following disclaimer.
9: .\" 2. Redistributions in binary form must reproduce the above copyright
10: .\" notice, this list of conditions and the following disclaimer in the
11: .\" documentation and/or other materials provided with the distribution.
12: .\"
13: .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23: .\" SUCH DAMAGE.
24: .\"
1.1.1.4.2.2! martin 25: .Dd January 8, 2018
1.1 roy 26: .Dt DHCPCD 8
27: .Os
28: .Sh NAME
29: .Nm dhcpcd
30: .Nd a DHCP client
31: .Sh SYNOPSIS
32: .Nm
33: .Op Fl 146ABbDdEGgHJKLMNPpqTV
34: .Op Fl C , Fl Fl nohook Ar hook
35: .Op Fl c , Fl Fl script Ar script
36: .Op Fl e , Fl Fl env Ar value
37: .Op Fl F , Fl Fl fqdn Ar FQDN
38: .Op Fl f , Fl Fl config Ar file
39: .Op Fl h , Fl Fl hostname Ar hostname
40: .Op Fl I , Fl Fl clientid Ar clientid
41: .Op Fl i , Fl Fl vendorclassid Ar vendorclassid
1.1.1.3 roy 42: .Op Fl j , Fl Fl logfile Ar logfile
1.1 roy 43: .Op Fl l , Fl Fl leasetime Ar seconds
44: .Op Fl m , Fl Fl metric Ar metric
45: .Op Fl O , Fl Fl nooption Ar option
46: .Op Fl o , Fl Fl option Ar option
47: .Op Fl Q , Fl Fl require Ar option
48: .Op Fl r , Fl Fl request Ar address
49: .Op Fl S , Fl Fl static Ar value
1.1.1.4.2.2! martin 50: .Op Fl s , Fl Fl inform Ar address Ns Op Ar /cidr Ns Op Ar /broadcast_address
1.1 roy 51: .Op Fl Fl inform6
52: .Op Fl t , Fl Fl timeout Ar seconds
53: .Op Fl u , Fl Fl userclass Ar class
54: .Op Fl v , Fl Fl vendor Ar code , Ar value
55: .Op Fl W , Fl Fl whitelist Ar address Ns Op Ar /cidr
56: .Op Fl w
57: .Op Fl Fl waitip Op 4 | 6
58: .Op Fl y , Fl Fl reboot Ar seconds
59: .Op Fl X , Fl Fl blacklist Ar address Ns Op Ar /cidr
60: .Op Fl Z , Fl Fl denyinterfaces Ar pattern
61: .Op Fl z , Fl Fl allowinterfaces Ar pattern
62: .Op Fl Fl inactive
63: .Op interface
64: .Op ...
65: .Nm
66: .Fl n , Fl Fl rebind
67: .Op interface
68: .Nm
69: .Fl k , Fl Fl release
70: .Op interface
71: .Nm
72: .Fl U, Fl Fl dumplease
73: .Ar interface
74: .Nm
75: .Fl Fl version
76: .Nm
77: .Fl x , Fl Fl exit
78: .Op interface
79: .Sh DESCRIPTION
80: .Nm
81: is an implementation of the DHCP client specified in
82: .Li RFC 2131 .
83: .Nm
84: gets the host information
85: .Po
86: IP address, routes, etc
87: .Pc
88: from a DHCP server and configures the network
89: .Ar interface
90: of the
91: machine on which it is running.
92: .Nm
93: then runs the configuration script which writes DNS information to
94: .Xr resolvconf 8 ,
95: if available, otherwise directly to
96: .Pa /etc/resolv.conf .
97: If the hostname is currently blank, (null) or localhost, or
98: .Va force_hostname
99: is YES or TRUE or 1 then
100: .Nm
101: sets the hostname to the one supplied by the DHCP server.
102: .Nm
103: then daemonises and waits for the lease renewal time to lapse.
104: It will then attempt to renew its lease and reconfigure if the new lease
105: changes when the lease beings to expire or the DHCP server sends message
106: to renew early.
107: .Pp
108: If any interface reports a working carrier then
109: .Nm
110: will try and obtain a lease before forking to the background,
111: otherwise it will fork right away.
112: This behaviour can be modified with the
113: .Fl b , Fl Fl background
114: and
115: .Fl w , Fl Fl waitip
116: options.
117: .Pp
118: .Nm
119: is also an implementation of the BOOTP client specified in
120: .Li RFC 951 .
121: .Pp
122: .Nm
123: is also an implementation of the IPv6 Router Solicitor as specified in
124: .Li RFC 4861
125: and
126: .Li RFC 6106 .
127: .Pp
128: .Nm
129: is also an implementation of the IPv6 Privacy Extensions to AutoConf as
130: specified in
131: .Li RFC 4941 .
132: This feature needs to be enabled in the kernel and
133: .Nm
134: will start using it.
135: .Pp
136: .Nm
137: is also an implementation of the DHCPv6 client as specified in
138: .Li RFC 3315 .
139: By default,
140: .Nm
141: only starts DHCPv6 when instructed to do so by an IPV6 Router Advertisement.
142: If no Identity Association is configured,
143: then a Non-temporary Address is requested.
144: .Ss Local Link configuration
145: If
146: .Nm
147: failed to obtain a lease, it probes for a valid IPv4LL address
148: .Po
149: aka ZeroConf, aka APIPA
150: .Pc .
151: Once obtained it restarts the process of looking for a DHCP server to get a
152: proper address.
153: .Pp
154: When using IPv4LL,
155: .Nm
156: nearly always succeeds and returns an exit code of 0.
157: In the rare case it fails, it normally means that there is a reverse ARP proxy
158: installed which always defeats IPv4LL probing.
159: To disable this behaviour, you can use the
160: .Fl L , Fl Fl noipv4ll
161: option.
162: .Ss Multiple interfaces
163: If a list of interfaces are given on the command line, then
164: .Nm
165: only works with those interfaces, otherwise
166: .Nm
167: discovers available Ethernet interfaces that can be configured.
168: When
169: .Nm
170: not limited to one interface on the command line,
171: it is running in Master mode.
172: The
173: .Nm dhcpcd-ui
174: project expects dhcpcd to be running this way.
175: .Pp
176: If a single interface is given then
177: .Nm
178: only works for that interface and runs as a separate instance to other
179: .Nm
180: processes.
181: .Fl w , Fl Fl waitip
182: option is enabled in this instance to maintain compatibility with older
183: versions.
184: Using a single interface also affects the
185: .Fl k ,
186: .Fl N ,
187: .Fl n
188: and
189: .Fl x
190: options where the same interface will need to be specified as a lack of an
191: interafce will imply Master mode which this is not.
192: To force starting in Master mode with only one interface, the
193: .Fl M , Fl Fl master
194: option can be used.
195: .Pp
196: Interfaces are preferred by carrier, DHCP lease/IPv4LL and then lowest metric.
197: For systems that support route metrics, each route will be tagged with the
198: metric, otherwise
199: .Nm
200: changes the routes to use the interface with the same route and the lowest
201: metric.
202: See options below for controlling which interfaces we allow and deny through
203: the use of patterns.
204: .Ss Hooking into events
205: .Nm
206: runs
207: .Pa @SCRIPT@ ,
208: or the script specified by the
209: .Fl c , Fl Fl script
210: option.
211: This script runs each script found in
212: .Pa @HOOKDIR@
213: in a lexical order.
214: The default installation supplies the scripts
215: .Pa 01-test ,
216: .Pa 02-dump ,
217: .Pa 20-resolv.conf
218: and
219: .Pa 30-hostname .
220: You can disable each script by using the
221: .Fl C , Fl Fl nohook
222: option.
223: See
224: .Xr dhcpcd-run-hooks 8
225: for details on how these scripts work.
226: .Nm
227: currently ignores the exit code of the script.
228: .Pp
229: More scripts are supplied in
230: .Pa @DATADIR@/dhcpcd/hooks
231: and need to be copied to
232: .Pa @HOOKDIR@
233: if you intend to use them.
234: For example, you could install
235: .Pa 10-wpa_supplicant
236: so that
237: .Nm
238: can ensure that
239: .Xr wpa_supplicant 8
240: is always running on a hot-plugged wireless interface.
241: .Ss Fine tuning
242: You can fine-tune the behaviour of
243: .Nm
244: with the following options:
245: .Bl -tag -width indent
246: .It Fl b , Fl Fl background
247: Background immediately.
248: This is useful for startup scripts which don't disable link messages for
249: carrier status.
250: .It Fl c , Fl Fl script Ar script
251: Use this
252: .Ar script
253: instead of the default
254: .Pa @SCRIPT@ .
255: .It Fl D , Fl Fl duid
256: Generate an
257: .Li RFC 4361
258: compliant clientid.
259: This requires persistent storage and not all DHCP servers work with it so it
260: is not enabled by default.
261: .Nm
262: generates the DUID and stores it in
1.1.1.3 roy 263: .Pa @DBDIR@/duid .
1.1 roy 264: This file should not be copied to other hosts.
265: .It Fl d , Fl Fl debug
266: Echo debug messages to the stderr and syslog.
267: .It Fl E , Fl Fl lastlease
268: If
269: .Nm
270: cannot obtain a lease, then try to use the last lease acquired for the
271: interface.
272: .It Fl Fl lastleaseextend
273: Same as the above, but he lease will be retained even if it expires.
274: .Nm
275: will give it up if any other host tries to claim it for their own via ARP.
276: This is does violate RFC2131 section 3.7 which states the lease should be
277: dropped once it has expired.
278: .It Fl e , Fl Fl env Ar value
279: Push
280: .Ar value
281: to the environment for use in
282: .Xr dhcpcd-run-hooks 8 .
283: For example, you can force the hostname hook to always set the hostname with
284: .Fl e
285: .Va force_hostname=YES .
286: .It Fl g , Fl Fl reconfigure
287: .Nm
288: will re-apply IP address, routing and run
289: .Xr dhcpcd-run-hooks 8
290: for each interface.
291: This is useful so that a 3rd party such as PPP or VPN can change the routing
292: table and / or DNS, etc and then instruct
293: .Nm
294: to put things back afterwards.
295: .Nm
296: does not read a new configuration when this happens - you should rebind if you
297: need that functionality.
298: .It Fl F , Fl Fl fqdn Ar fqdn
299: Requests that the DHCP server updates DNS using FQDN instead of just a
300: hostname.
301: Valid values for
302: .Ar fqdn
303: are disable, none, ptr and both.
304: .Nm
305: itself never does any DNS updates.
306: .Nm
307: encodes the FQDN hostname as specified in
308: .Li RFC1035 .
309: .It Fl f , Fl Fl config Ar file
310: Specify a config to load instead of
311: .Pa @SYSCONFDIR@/dhcpcd.conf .
312: .Nm
313: always processes the config file before any command line options.
314: .It Fl h , Fl Fl hostname Ar hostname
315: Sends
316: .Ar hostname
317: to the DHCP server so it can be registered in DNS.
318: If
319: .Ar hostname
320: is an empty string then the current system hostname is sent.
321: If
322: .Ar hostname
323: is a FQDN (ie, contains a .) then it will be encoded as such.
324: .It Fl I , Fl Fl clientid Ar clientid
325: Send the
326: .Ar clientid .
327: If the string is of the format 01:02:03 then it is encoded as hex.
328: For interfaces whose hardware address is longer than 8 bytes, or if the
329: .Ar clientid
330: is an empty string then
331: .Nm
332: sends a default
333: .Ar clientid
334: of the hardware family and the hardware address.
335: .It Fl i , Fl Fl vendorclassid Ar vendorclassid
336: Override the DHCPv4
337: .Ar vendorclassid
338: field sent.
339: The default is
340: dhcpcd-<version>:<os>:<machine>:<platform>.
341: For example
342: .D1 dhcpcd-5.5.6:NetBSD-6.99.5:i386:i386
343: If not set then none is sent.
344: Some badly configured DHCP servers reject unknown vendorclassids.
345: To work around it, try and impersonate Windows by using the MSFT vendorclassid.
1.1.1.3 roy 346: .It Fl j , Fl Fl logfile Ar logfile
347: Writes to the specified
348: .Ar logfile
349: rather than
350: .Xr syslog 3 .
351: The
352: .Ar logfile
353: is s reopened when
354: .Nm
355: receives the
356: .Dv SIGUSR2
357: signal.
1.1 roy 358: .It Fl k , Fl Fl release Op Ar interface
359: This causes an existing
360: .Nm
361: process running on the
362: .Ar interface
363: to release its lease and de-configure the
364: .Ar interface
365: regardless of the
366: .Fl p , Fl Fl persistent
367: option.
368: If no
369: .Ar interface
370: is specified then this applies to all interfaces in Master mode.
371: If no interfaces are left running,
372: .Nm
373: will exit.
374: .It Fl l , Fl Fl leasetime Ar seconds
375: Request a specific lease time in
376: .Ar seconds .
377: By default
378: .Nm
379: does not request any lease time and leaves it in the hands of the
380: DHCP server.
381: .It Fl M , Fl Fl master
382: Start
383: .Nm
384: in Master mode even if only one interface specified on the command line.
385: See the Multiple Interfaces section above.
386: .It Fl m , Fl Fl metric Ar metric
387: Metrics are used to prefer an interface over another one, lowest wins.
388: .Nm
389: will supply a default metic of 200 +
390: .Xr if_nametoindex 3 .
391: An extra 100 will be added for wireless interfaces.
392: .It Fl n , Fl Fl rebind Op Ar interface
393: Notifies
394: .Nm
395: to reload its configuration and rebind the specified
396: .Ar interface .
397: If no
398: .Ar interface
399: is specified then this applies to all interfaces in Master mode.
400: If
401: .Nm
402: is not running, then it starts up as normal.
403: This may also cause
404: .Xr wpa_supplicant 8
405: to reload its configuration for each interface as well if the
406: relevant hook script has been installed.
407: .It Fl N , Fl Fl renew Op Ar interface
408: Notifies
409: .Nm
410: to renew existing addresses on the specified
411: .Ar interface .
412: If no
413: .Ar interface
414: is specified then this applies to all interfaces in Master mode.
415: If
416: .Nm
417: is not running, then it starts up as normal.
418: Unlike the
419: .Fl n , Fl Fl rebind
420: option above, the configuration for
421: .Nm
422: is not reloaded.
423: .It Fl o , Fl Fl option Ar option
424: Request the DHCP
425: .Ar option
426: variable for use in
427: .Pa @SCRIPT@ .
428: .It Fl p , Fl Fl persistent
429: .Nm
430: normally de-configures the
431: .Ar interface
432: and configuration when it exits.
433: Sometimes, this isn't desirable if, for example, you have root mounted over
434: NFS or SSH clients connect to this host and they need to be notified of
435: the host shutting down.
436: You can use this option to stop this from happening.
1.1.1.4.2.1 snj 437: .It Fl r , Fl Fl request Ar address
1.1 roy 438: Request the
439: .Ar address
440: in the DHCP DISCOVER message.
441: There is no guarantee this is the address the DHCP server will actually give.
442: If no
443: .Ar address
444: is given then the first address currently assigned to the
445: .Ar interface
446: is used.
1.1.1.4.2.2! martin 447: .It Fl s , Fl Fl inform Ar address Ns Op Ar /cidr Ns Op Ar /broadcast_address
1.1 roy 448: Behaves like
449: .Fl r , Fl Fl request
450: as above, but sends a DHCP INFORM instead of DISCOVER/REQUEST.
451: This does not get a lease as such, just notifies the DHCP server of the
452: .Ar address
453: in use.
454: You should also include the optional
455: .Ar cidr
456: network number in case the address is not already configured on the interface.
457: .Nm
458: remains running and pretends it has an infinite lease.
459: .Nm
460: will not de-configure the interface when it exits.
461: If
462: .Nm
463: fails to contact a DHCP server then it returns a failure instead of falling
464: back on IPv4LL.
465: .It Fl Fl inform6
466: Performs a DHCPv6 Information Request.
467: No address is requested or specified, but all other DHCPv6 options are allowed.
468: This is normally performed automatically when the IPv6 Router Advertises
469: that the client should perform this operation.
470: This option is only needed when
471: .Nm
472: is not processing IPv6RA messages and the need for DHCPv6 Information Request
473: exists.
474: .It Fl S, Fl Fl static Ar value
475: Configures a static DHCP
476: .Ar value .
477: If you set
478: .Ic ip_address
479: then
480: .Nm
481: will not attempt to obtain a lease and just use the value for the address with
482: an infinite lease time.
483: .Pp
484: Here is an example which configures a static address, routes and dns.
485: .D1 dhcpcd -S ip_address=192.168.0.10/24 \e
486: .D1 -S routers=192.168.0.1 \e
487: .D1 -S domain_name_servers=192.168.0.1 \e
488: .D1 eth0
489: .Pp
490: You cannot presently set static DHCPv6 values.
491: Use the
492: .Fl e , Fl Fl env
493: option instead.
494: .It Fl t , Fl Fl timeout Ar seconds
495: Timeout after
496: .Ar seconds ,
497: instead of the default 30.
498: A setting of 0
499: .Ar seconds
500: causes
501: .Nm
502: to wait forever to get a lease.
503: If
504: .Nm
505: is working on a single interface then
506: .Nm
507: will exit when a timeout occurs, otherwise
508: .Nm
509: will fork into the background.
510: .It Fl u , Fl Fl userclass Ar class
511: Tags the DHCPv4 message with the userclass
512: .Ar class .
513: DHCP servers use this to give members of the class DHCP options other than the
514: default, without having to know things like hardware address or hostname.
515: .It Fl v , Fl Fl vendor Ar code , Ns Ar value
516: Add an encapsulated vendor option.
517: .Ar code
518: should be between 1 and 254 inclusive.
519: To add a raw vendor string, omit
520: .Ar code
521: but keep the comma.
522: Examples.
523: .Pp
524: Set the vendor option 01 with an IP address.
525: .D1 dhcpcd \-v 01,192.168.0.2 eth0
526: Set the vendor option 02 with a hex code.
527: .D1 dhcpcd \-v 02,01:02:03:04:05 eth0
528: Set the vendor option 03 with an IP address as a string.
529: .D1 dhcpcd \-v 03,\e"192.168.0.2\e" eth0
530: Set un-encapsulated vendor option to hello world.
531: .D1 dhcpcd \-v ,"hello world" eth0
532: .It Fl Fl version
533: Display both program version and copyright information.
534: .Nm
535: then exits before doing any configuration.
536: .It Fl w
537: Wait for an address to be assigned before forking to the background.
538: Does not take an argument, unlike the below option.
539: .It Fl Fl waitip Op 4 | 6
540: Wait for an address to be assigned before forking to the background.
541: 4 means wait for an IPv4 address to be assigned.
542: 6 means wait for an IPv6 address to be assigned.
543: If no argument is given,
544: .Nm
545: will wait for any address protocol to be assigned.
546: It is possible to wait for more than one address protocol and
547: .Nm
548: will only fork to the background when all waiting conditions are satisfied.
549: .It Fl x , Fl Fl exit Op Ar interface
550: This will signal an existing
551: .Nm
552: process running on the
553: .Ar interface
554: to exit.
555: If no
556: .Ar interface
557: is specified, then the above is applied to all interfaces in Master mode.
558: See the
559: .Fl p , Fl Fl persistent
560: option to control configuration persistence on exit,
561: which is enabled by default in
562: .Xr dhcpcd.conf 5 .
563: .Nm
564: then waits until this process has exited.
565: .It Fl y , Fl Fl reboot Ar seconds
566: Allow
567: .Ar reboot
568: seconds before moving to the discover phase if we have an old lease to use.
569: Allow
570: .Ar reboot
571: seconds before starting fallback states from the discover phase.
572: IPv4LL is started when the first
573: .Ar reboot
574: timeout is reached.
575: The default is 5 seconds.
576: A setting of 0 seconds causes
577: .Nm
578: to skip the reboot phase and go straight into discover.
579: This has no effect on DHCPv6 other than skipping the reboot phase.
580: .El
581: .Ss Restricting behaviour
582: .Nm
583: will try to do as much as it can by default.
584: However, there are sometimes situations where you don't want the things to be
585: configured exactly how the the DHCP server wants.
586: Here are some options that deal with turning these bits off.
1.1.1.4.2.1 snj 587: .Pp
588: Note that when
589: .Nm
590: is restricted to a single interface then the interface also needs to be
591: specified when asking
592: .Nm
593: to exit using the commandline.
594: If the protocol is restricted as well then the protocol needs to be included
595: with the exit instruction.
1.1 roy 596: .Bl -tag -width indent
597: .It Fl 1 , Fl Fl oneshot
598: Exit after configuring an interface.
599: Use the
600: .Fl w , Fl Fl waitip
601: option to specify which protocol(s) to configure before exiting.
602: .It Fl 4 , Fl Fl ipv4only
603: Configure IPv4 only.
604: .It Fl 6 , Fl Fl ipv6only
605: Configure IPv6 only.
606: .It Fl A , Fl Fl noarp
607: Don't request or claim the address by ARP.
608: This also disables IPv4LL.
609: .It Fl B , Fl Fl nobackground
610: Don't run in the background when we acquire a lease.
611: This is mainly useful for running under the control of another process, such
612: as a debugger or a network manager.
613: .It Fl C , Fl Fl nohook Ar script
614: Don't run this hook script.
615: Matches full name, or prefixed with 2 numbers optionally ending with
616: .Pa .sh .
617: .Pp
618: So to stop
619: .Nm
620: from touching your DNS settings you would do:-
621: .D1 dhcpcd -C resolv.conf eth0
1.1.1.4 roy 622: .It Fl G , Fl Fl nogateway
623: Don't set any default routes.
1.1 roy 624: .It Fl H , Fl Fl xidhwaddr
625: Use the last four bytes of the hardware address as the DHCP xid instead
626: of a randomly generated number.
627: .It Fl J , Fl Fl broadcast
628: Instructs the DHCP server to broadcast replies back to the client.
629: Normally this is only set for non Ethernet interfaces,
630: such as FireWire and InfiniBand.
631: In most instances,
632: .Nm
633: will set this automatically.
634: .It Fl K , Fl Fl nolink
635: Don't receive link messages for carrier status.
636: You should only have to use this with buggy device drivers or running
637: .Nm
638: through a network manager.
639: .It Fl L , Fl Fl noipv4ll
640: Don't use IPv4LL (aka APIPA, aka Bonjour, aka ZeroConf).
641: .It Fl O , Fl Fl nooption Ar option
642: Removes the
643: .Ar option
644: from the DHCP message before processing.
645: .It Fl P , Fl Fl printpidfile
646: Print the
647: .Pa pidfile
648: .Nm
649: will use based on commmand-line arguments to stdout.
650: .It Fl Q , Fl Fl require Ar option
651: Requires the
652: .Ar option
653: to be present in all DHCP messages, otherwise the message is ignored.
654: To enforce that
655: .Nm
656: only responds to DHCP servers and not BOOTP servers, you can
657: .Fl Q
658: .Ar dhcp_message_type .
659: .It Fl q , Fl Fl quiet
660: Quiet
661: .Nm
662: on the command line, only warnings and errors will be displayed.
663: The messages are still logged though.
664: .It Fl T, Fl Fl test
665: On receipt of DHCP messages just call
666: .Pa @SCRIPT@
667: with the reason of TEST which echos the DHCP variables found in the message
668: to the console.
669: The interface configuration isn't touched and neither are any configuration
670: files.
671: The
672: .Ar rapid_commit
673: option is not sent in TEST mode so that the server does not lease an address.
674: To test INFORM the interface needs to be configured with the desired address
675: before starting
676: .Nm .
677: .It Fl U, Fl Fl dumplease Ar interface
678: Dumps the last lease for the
679: .Ar interface
680: to stdout.
681: If omitted, standard input is used to read a DHCP wire formatted message.
682: Use the
683: .Fl 4
684: or
685: .Fl 6
686: flags to specify an address family.
687: .It Fl V, Fl Fl variables
688: Display a list of option codes, the associated variable and encoding for use in
689: .Xr dhcpcd-run-hooks 8 .
690: Variables are prefixed with new_ and old_ unless the option number is -.
691: Variables without an option are part of the DHCP message and cannot be
692: directly requested.
693: .It Fl W, Fl Fl whitelist Ar address Ns Op /cidr
694: Only accept packets from
695: .Ar address Ns Op /cidr .
696: .Fl X, Fl Fl blacklist
697: is ignored if
698: .Fl W, Fl Fl whitelist
699: is set.
700: .It Fl X, Fl Fl blacklist Ar address Ns Op Ar /cidr
701: Ignore all packets from
702: .Ar address Ns Op Ar /cidr .
703: .It Fl Z , Fl Fl denyinterfaces Ar pattern
704: When discovering interfaces, the interface name must not match
705: .Ar pattern
706: which is a space or comma separated list of patterns passed to
707: .Xr fnmatch 3 .
708: .It Fl z , Fl Fl allowinterfaces Ar pattern
709: When discovering interfaces, the interface name must match
710: .Ar pattern
711: which is a space or comma separated list of patterns passed to
712: .Xr fnmatch 3 .
713: If the same interface is matched in
714: .Fl Z , Fl Fl denyinterfaces
715: then it is still denied.
716: .It Fl Fl inactive
717: Don't start any interfaces other than those specified on the command line.
718: This allows
719: .Nm
720: to be started in Master mode and then wait for subsequent
721: .Nm
722: commands to start each interface as required.
723: .It Fl Fl nodev
724: Don't load any
725: .Pa /dev
726: management modules.
727: .El
728: .Sh 3RDPARTY LINK MANAGEMENT
729: Some interfaces require configuration by 3rd parties, such as PPP or VPN.
730: When an interface configuration in
731: .Nm
732: is marked as STATIC or INFORM without an address then
733: .Nm
734: will monitor the interface until an address is added or removed from it and
735: act accordingly.
736: For point to point interfaces (like PPP), a default route to its
737: destination is automatically added to the configuration.
738: If the point to point interface is configured for INFORM, then
739: .Nm
740: unicasts INFORM to the destination, otherwise it defaults to STATIC.
741: .Sh NOTES
742: .Nm
743: requires a Berkley Packet Filter, or BPF device on BSD based systems and a
744: Linux Socket Filter, or LPF device on Linux based systems for all IPv4
745: configuration.
746: .Pp
747: If restricting
748: .Nm
749: to a single interface and optionally address family via the command-line
750: then all further calls to
751: .Nm
752: to rebind, reconfigure or exit need to include the same restrictive flags
753: so that
754: .Nm
755: knows which process to signal.
756: .Sh FILES
757: .Bl -ohang
758: .It Pa @SYSCONFDIR@/dhcpcd.conf
759: Configuration file for dhcpcd.
760: If you always use the same options, put them here.
761: .It Pa @SCRIPT@
762: Bourne shell script that is run to configure or de-configure an interface.
763: .It Pa @LIBDIR@/dhcpcd/dev
764: .Pa /dev
765: management modules.
766: .It Pa @HOOKDIR@
767: A directory containing bourne shell scripts that are run by the above script.
768: Each script can be disabled by using the
769: .Fl C , Fl Fl nohook
770: option described above.
771: .It Pa @DBDIR@/duid
772: Text file that holds the DUID used to identify the host.
773: .It Pa @DBDIR@/secret
774: Text file that holds a secret key known only to the host.
775: .It Pa @DBDIR@/ Ns Ar interface Ns Ar -ssid Ns .lease
776: The actual DHCP message sent by the server.
777: We use this when reading the last
778: lease and use the files mtime as when it was issued.
779: .It Pa @DBDIR@/ Ns Ar interface Ns Ar -ssid Ns .lease6
780: The actual DHCPv6 message sent by the server.
781: We use this when reading the last
782: lease and use the files mtime as when it was issued.
783: .It Pa @DBDIR@/rdm_monotonic
784: Stores the monotonic counter used in the
785: .Ar replay
786: field in Authentication Options.
787: .It Pa @RUNDIR@/dhcpcd.pid
788: Stores the PID of
789: .Nm
790: running on all interfaces.
791: .It Pa @RUNDIR@/dhcpcd\- Ns Ar interface Ns .pid
792: Stores the PID of
793: .Nm
794: running on the
795: .Ar interface .
796: .It Pa @RUNDIR@/dhcpcd.sock
797: Control socket to the master daemon.
798: .It Pa @RUNDIR@/dhcpcd.unpriv.sock
799: Unprivileged socket to the master daemon, only allows state retrieval.
800: .It Pa @RUNDIR@/dhcpcd\- Ns Ar interface Ns .sock
801: Control socket to per interface daemon.
802: .El
803: .Sh SEE ALSO
804: .Xr fnmatch 3 ,
805: .Xr if_nametoindex 3 ,
806: .Xr dhcpcd.conf 5 ,
807: .Xr resolv.conf 5 ,
808: .Xr dhcpcd-run-hooks 8 ,
809: .Xr resolvconf 8
810: .Sh STANDARDS
811: RFC\ 951, RFC\ 1534, RFC\ 2104, RFC\ 2131, RFC\ 2132, RFC\ 2563, RFC\ 2855,
812: RFC\ 3004, RFC\ 3118, RFC\ 3203, RFC\ 3315, RFC\ 3361, RFC\ 3633, RFC\ 3396,
813: RFC\ 3397, RFC\ 3442, RFC\ 3495, RFC\ 3925, RFC\ 3927, RFC\ 4039, RFC\ 4075,
814: RFC\ 4242, RFC\ 4361, RFC\ 4390, RFC\ 4702, RFC\ 4074, RFC\ 4861, RFC\ 4833,
815: RFC\ 4941, RFC\ 5227, RFC\ 5942, RFC\ 5969, RFC\ 6106, RFC\ 6334, RFC\ 6603,
816: RFC\ 6704, RFC\ 7217, RFC\ 7550.
817: .Sh AUTHORS
818: .An Roy Marples Aq Mt roy@marples.name
819: .Sh BUGS
820: Please report them to
821: .Lk http://roy.marples.name/projects/dhcpcd
CVSweb <webmaster@jp.NetBSD.org>