[BACK]Return to dhcpcd.8.in CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / external / bsd / dhcpcd / dist / src

Annotation of src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in, Revision 1.1.1.13

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

CVSweb <webmaster@jp.NetBSD.org>