1 | .\" Copyright (c) 2006-2014 Roy Marples |
---|
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 | .\" |
---|
25 | .Dd January 29, 2014 |
---|
26 | .Dt DHCPCD.CONF 5 |
---|
27 | .Os |
---|
28 | .Sh NAME |
---|
29 | .Nm dhcpcd.conf |
---|
30 | .Nd dhcpcd configuration file |
---|
31 | .Sh DESCRIPTION |
---|
32 | Although |
---|
33 | .Nm dhcpcd |
---|
34 | can do everything from the command line, there are cases where it's just easier |
---|
35 | to do it once in a configuration file. |
---|
36 | Most of the options found in |
---|
37 | .Xr dhcpcd 8 |
---|
38 | can be used here. |
---|
39 | The first word on the line is the option and the rest of the line is the value. |
---|
40 | Leading and trailing whitespace for the option and value are trimmed. |
---|
41 | You can escape characters in the value using the \\ character. |
---|
42 | .Pp |
---|
43 | Blank lines and lines starting with # are ignored. |
---|
44 | .Pp |
---|
45 | Here's a list of available options: |
---|
46 | .Bl -tag -width indent |
---|
47 | .It Ic allowinterfaces Ar pattern |
---|
48 | When discovering interfaces, the interface name must match |
---|
49 | .Ar pattern |
---|
50 | which is a space or comma separated list of patterns passed to |
---|
51 | .Xr fnmatch 3 . |
---|
52 | If the same interface is matched in |
---|
53 | .Ic denyinterfaces |
---|
54 | then it is still denied. |
---|
55 | .It Ic denyinterfaces Ar pattern |
---|
56 | When discovering interfaces, the interface name must not match |
---|
57 | .Ar pattern |
---|
58 | which is a space or comma separated list of patterns passed to |
---|
59 | .Xr fnmatch 3 . |
---|
60 | .It Ic arping Ar address Op address |
---|
61 | .Nm dhcpcd |
---|
62 | will arping each address in order before attempting DHCP. |
---|
63 | If an address is found, we will select the replying hardware address as the |
---|
64 | profile, otherwise the ip address. |
---|
65 | Example: |
---|
66 | .Pp |
---|
67 | .D1 interface bge0 |
---|
68 | .D1 arping 192.168.0.1 |
---|
69 | .Pp |
---|
70 | .D1 profile 192.168.0.1 |
---|
71 | .D1 static ip_address=192.168.0.10/24 |
---|
72 | .It Ic authprotocol Ar protocol Ar algorithm Ar rdm |
---|
73 | Authenticate DHCP messages. |
---|
74 | See the Supported Protocols section. |
---|
75 | .It Ic authtoken Ar secretid Ar realm Ar expire Ar key |
---|
76 | Define a shared key for use in authentication. |
---|
77 | .Ar realm can be "" to for use with the |
---|
78 | .Ar delayed |
---|
79 | prptocol. |
---|
80 | .Ar expire |
---|
81 | is the date the token expires and should be formatted "yyy-mm-dd HH:MM". |
---|
82 | You can use the keyword |
---|
83 | .Ar forever |
---|
84 | or |
---|
85 | .Ar 0 |
---|
86 | which means the token never expires. |
---|
87 | .It Ic background |
---|
88 | Background immediately. |
---|
89 | This is useful for startup scripts which don't disable link messages for |
---|
90 | carrier status. |
---|
91 | .It Ic blacklist Ar address Ns Op /cidr |
---|
92 | Ignores all packets from |
---|
93 | .Ar address Ns Op /cidr . |
---|
94 | .It Ic whitelist Ar address Ns Op /cidr |
---|
95 | Only accept packets from |
---|
96 | .Ar address Ns Op /cidr . |
---|
97 | .Ic blacklist |
---|
98 | is ignored if |
---|
99 | .Ic whitelist |
---|
100 | is set. |
---|
101 | .It Ic broadcast |
---|
102 | Instructs the DHCP server to broadcast replies back to the client. |
---|
103 | Normally this is only set for non Ethernet interfaces, |
---|
104 | such as FireWire and InfiniBand. |
---|
105 | In most cases, |
---|
106 | .Nm dhcpcd |
---|
107 | will set this automatically. |
---|
108 | .It Ic dev Ar value |
---|
109 | Load the |
---|
110 | .Ar value |
---|
111 | .Pa /dev |
---|
112 | management module. |
---|
113 | .Nm dhcpcd |
---|
114 | will load the first one found to work, if any. |
---|
115 | .It Ic env Ar value |
---|
116 | Push |
---|
117 | .Ar value |
---|
118 | to the environment for use in |
---|
119 | .Xr dhcpcd-run-hooks 8 . |
---|
120 | For example, you can force the hostname hook to always set the hostname with |
---|
121 | .Ic env |
---|
122 | .Va force_hostname=YES . |
---|
123 | .Pp |
---|
124 | If the hostname is set, will be will set to the FQDN if possible as per |
---|
125 | RFC 4702 section 3.1. |
---|
126 | If the FQDN option is missing, |
---|
127 | .Nm dhcpcd |
---|
128 | will still try and set a FQDN from the hostname and domain options for |
---|
129 | consistency. |
---|
130 | To override this, set |
---|
131 | .Ic env |
---|
132 | .Va hostname_fqdn=[YES|NO|SERVER] . |
---|
133 | A value of server means just what the server says, don't manipulate it. |
---|
134 | This could lead to an inconsistent hostname on a DHCPv4 and DHCPv6 network |
---|
135 | where the DHCPv4 hostname is short and the DHCPv6 has an FQDN. |
---|
136 | DHCPv6 has no hostname option. |
---|
137 | .It Ic clientid Ar string |
---|
138 | Send the |
---|
139 | .Ar clientid . |
---|
140 | If the string is of the format 01:02:03 then it is encoded as hex. |
---|
141 | For interfaces whose hardware address is longer than 8 bytes, or if the |
---|
142 | .Ar clientid |
---|
143 | is an empty string then |
---|
144 | .Nm dhcpcd |
---|
145 | sends a default |
---|
146 | .Ar clientid |
---|
147 | of the hardware family and the hardware address. |
---|
148 | .It Ic duid |
---|
149 | Generate an |
---|
150 | .Rs |
---|
151 | .%T "RFC 4361" |
---|
152 | .Re |
---|
153 | compliant DHCP Unique Identifier. |
---|
154 | If persistent storage is available then a DUID-LLT (link local address + time) |
---|
155 | is generated, otherwise DUID-LL is generated (link local address). |
---|
156 | This, plus the IAID will be used as the |
---|
157 | .Ic clientid . |
---|
158 | The DUID-LLT generated will be held in |
---|
159 | .Pa @SYSCONFDIR@/dhcpcd.duid |
---|
160 | and should not be copied to other hosts. |
---|
161 | .It Ic iaid Ar iaid |
---|
162 | Set the Interface Association Identifier to |
---|
163 | .Ar iaid . |
---|
164 | This option must be used in an |
---|
165 | .Ic interface |
---|
166 | block. |
---|
167 | This defaults to the last 4 bytes of the hardware address assigned to the |
---|
168 | interface. |
---|
169 | Each instance of this should be unique within the scope of the client and |
---|
170 | .Nm dhcpcd |
---|
171 | warns if a conflict is detected. |
---|
172 | If there is a conflict, it is only a problem if the conflicted IAIDs are |
---|
173 | used on the same network. |
---|
174 | .It Ic persistent |
---|
175 | .Nm dhcpcd |
---|
176 | normally de-configures the interface and configuration when it exits. |
---|
177 | Sometimes, this isn't desirable if, for example, you have root mounted over |
---|
178 | NFS or SSH clients connect to this host and they need to be notified of |
---|
179 | the host shutting down. |
---|
180 | You can use this option to stop this from happening. |
---|
181 | .It Ic fallback Ar profile |
---|
182 | Fallback to using this profile if DHCP fails. |
---|
183 | This allows you to configure a static profile instead of using ZeroConf. |
---|
184 | .It Ic hostname Ar name |
---|
185 | Sends |
---|
186 | .Ar hostname |
---|
187 | to the DHCP server so it can be registered in DNS. |
---|
188 | If |
---|
189 | .Ar hostname |
---|
190 | is an empty string then the current system hostname is sent. |
---|
191 | If |
---|
192 | .Ar hostname |
---|
193 | is a FQDN (ie, contains a .) then it will be encoded as such. |
---|
194 | .It Ic hostname_short |
---|
195 | Sends the short hostname to the DHCP server instead of the FQDN. |
---|
196 | This is useful because DHCP servers will not register the FQDN in their |
---|
197 | DNS if the domain part does not match theirs. |
---|
198 | .Pp |
---|
199 | Also, see the |
---|
200 | .Ic env |
---|
201 | option above to control how the hostname is set on the host. |
---|
202 | .It Ic ia_na Op Ar iaid |
---|
203 | Request a DHCPv6 Normal Address for |
---|
204 | .Ar iaid . |
---|
205 | .Ar iaid |
---|
206 | defaults to the |
---|
207 | .Ic iaid |
---|
208 | option as described above. |
---|
209 | You can request more than one ia_na by specifying a unique |
---|
210 | .Ar iaid |
---|
211 | for each one. |
---|
212 | .It Ic ia_ta Op Ar iaid |
---|
213 | Request a DHCPv6 Temporary Address for |
---|
214 | .Ar iaid . |
---|
215 | You can request more than one ia_ta by specifying a unique |
---|
216 | .Ar iaid |
---|
217 | for each one. |
---|
218 | .It Ic ia_pd Op Ar iaid Op Ar interface Op / Ar sla_id Op / Ar prefix_len |
---|
219 | Request a DHCPv6 Delegated Prefix for |
---|
220 | .Ar iaid . |
---|
221 | This option must be used in an |
---|
222 | .Ic interface |
---|
223 | block. |
---|
224 | If no |
---|
225 | .Ar interface |
---|
226 | is given then we will assign a prefix to every other interface with a unique |
---|
227 | .Ar sla_id |
---|
228 | for each, starting from 0. |
---|
229 | Otherwise addresses are only assigned for each |
---|
230 | .Ar interface |
---|
231 | and |
---|
232 | .Ar sla_id . |
---|
233 | You cannot assign a prefix to the requesting interface. |
---|
234 | .Nm dhcpcd |
---|
235 | has to be running for all the interfaces it is delegating to. |
---|
236 | A default |
---|
237 | .Ar prefix_len |
---|
238 | of 64 is assumed. |
---|
239 | .Ar sla_id |
---|
240 | is an integer and is added to the prefix which must fit inside |
---|
241 | .Ar prefix_len |
---|
242 | less the length of the delegated prefix. |
---|
243 | You can specify multiple |
---|
244 | .Ar interface / |
---|
245 | .Ar sla_id / |
---|
246 | .Ar prefix_len |
---|
247 | per |
---|
248 | .Ic ia_pd , |
---|
249 | space separated. |
---|
250 | IPv6RS should be disabled globally when requesting a Prefix Delegation like so: |
---|
251 | .Pp |
---|
252 | .D1 noipv6rs |
---|
253 | .D1 # Don't touch eth3 at all |
---|
254 | .D1 denyinterfaces eth3 |
---|
255 | .Pp |
---|
256 | .D1 interface eth0 |
---|
257 | .D1 ia_pd 1 eth1/0 eth2/1 |
---|
258 | .Pp |
---|
259 | .D1 # Disable automatic address configuration for eth1 |
---|
260 | .D1 # eth1 still gets a delegated prefix |
---|
261 | .D1 interface eth1 |
---|
262 | .D1 noipv4 |
---|
263 | .D1 noipv6 |
---|
264 | .It Ic ipv4only |
---|
265 | Only configure IPv4. |
---|
266 | .It Ic ipv6only |
---|
267 | Only confgiure IPv6. |
---|
268 | .It Ic fqdn Op disable | ptr | both |
---|
269 | ptr just asks the DHCP server to update the PTR |
---|
270 | record of the host in DNS whereas both also updates the A record. |
---|
271 | disable will disable the FQDN option. |
---|
272 | The default is both. |
---|
273 | .Nm dhcpcd |
---|
274 | itself never does any DNS updates. |
---|
275 | .Nm dhcpcd |
---|
276 | encodes the FQDN hostname as specified in |
---|
277 | .Li RFC1035 . |
---|
278 | .It Ic interface Ar interface |
---|
279 | Subsequent options are only parsed for this |
---|
280 | .Ar interface . |
---|
281 | .It Ic ipv6ra_fork |
---|
282 | By default, when |
---|
283 | .Nm dhcpcd |
---|
284 | receives an IPv6 RA, |
---|
285 | .Nm dhcpcd |
---|
286 | will only fork to the background if the RA contains at least one unexpired |
---|
287 | RDNSS option. |
---|
288 | Set this option so to make |
---|
289 | .Nm dhcpcd |
---|
290 | always fork on an RA. |
---|
291 | .It Ic ipv6ra_own |
---|
292 | Disables kernel IPv6 Router Advertisment processing so dhcpcd can manage |
---|
293 | addresses and routes. |
---|
294 | This does not work reliably on any BSD system, probably due to kernel issues. |
---|
295 | .It Ic ipv6ra_own_default |
---|
296 | Each time dhcpcd receives an IPv6 Router Adveristment, dhcpcd will manage |
---|
297 | the default route only. |
---|
298 | This allows dhcpcd to prefer an interface for outbound traffic based on metric |
---|
299 | and/or user selection rather than the kernel. |
---|
300 | This does work reliably on BSD systems. |
---|
301 | .It Ic ipv6rs |
---|
302 | Enables IPv6 Router Advertisment solicitation. |
---|
303 | This is on by default, but is documented here in the case where it is disabled |
---|
304 | globally but needs to be enabled for one interface. |
---|
305 | .It Ic leasetime Ar seconds |
---|
306 | Request a leasetime of |
---|
307 | .Ar seconds . |
---|
308 | .It Ic metric Ar metric |
---|
309 | Metrics are used to prefer an interface over another one, lowest wins. |
---|
310 | .Nm dhcpcd |
---|
311 | will supply a default metric of 200 + |
---|
312 | .Xr if_nametoindex 3 . |
---|
313 | An extra 100 will be added for wireless interfaces. |
---|
314 | .It Ic noalias |
---|
315 | IPv4 addresses added will overwrite a pre-existing address instead of working |
---|
316 | alongside. |
---|
317 | .It Ic noarp |
---|
318 | Don't send any ARP requests. |
---|
319 | This also disables IPv4LL. |
---|
320 | .It Ic noauthrequired |
---|
321 | Don't require authentication even though we requested it. |
---|
322 | .It Ic nodev |
---|
323 | Don't load |
---|
324 | .Pa /dev |
---|
325 | management modules. |
---|
326 | .It Ic nodhcp |
---|
327 | Don't start DHCP or listen to DHCP messages. |
---|
328 | This is only useful when allowing IPv4LL. |
---|
329 | .It Ic nodhcp6 |
---|
330 | Don't start DHCPv6 or listen to DHCPv6 messages. |
---|
331 | Normally DHCPv6 is started by a RA instruction or configuration. |
---|
332 | .It Ic nogateway |
---|
333 | Don't install any default routes. |
---|
334 | .It Ic nohook Ar script |
---|
335 | Don't run this hook script. |
---|
336 | Matches full name, or prefixed with 2 numbers optionally ending with |
---|
337 | .Pa .sh . |
---|
338 | .Pp |
---|
339 | So to stop |
---|
340 | .Nm dhcpcd |
---|
341 | from touching your DNS or MTU settings you would do:- |
---|
342 | .D1 nohook resolv.conf, mtu |
---|
343 | .It Ic noipv4 |
---|
344 | Don't attempt to configure an IPv4 address. |
---|
345 | .It Ic noipv4ll |
---|
346 | Don't attempt to obtain an IPv4LL address if we failed to get one via DHCP. |
---|
347 | See |
---|
348 | .Rs |
---|
349 | .%T "RFC 3927" |
---|
350 | .Re |
---|
351 | .It Ic noipv6 |
---|
352 | Don't attmept to configure an IPv6 address. |
---|
353 | .It Ic noipv6rs |
---|
354 | Disable solicitation and receipt of IPv6 Router Advertisements. |
---|
355 | .It Ic nolink |
---|
356 | Don't receive link messages about carrier status. |
---|
357 | You should only set this for buggy interface drivers. |
---|
358 | .It Ic option Ar option |
---|
359 | Requests the |
---|
360 | .Ar option |
---|
361 | from the server. |
---|
362 | It can be a variable to be used in |
---|
363 | .Xr dhcpcd-run-hooks 8 |
---|
364 | or the numerical value. |
---|
365 | You can specify more |
---|
366 | .Ar option Ns s |
---|
367 | separated by commas, spaces or more |
---|
368 | .Ic option |
---|
369 | lines. |
---|
370 | Prepend dhcp6_ to |
---|
371 | .Ar option |
---|
372 | to request a DHCPv6 option. |
---|
373 | DHCPv4 options are mapped to DHCPv6 where applicable. |
---|
374 | .It Ic nooption Ar option |
---|
375 | Remove the option from the DHCP message. |
---|
376 | This should only be used when a DHCP server sends a non requested option |
---|
377 | that should not be processed. |
---|
378 | .It Ic destination Ar option |
---|
379 | If |
---|
380 | .Nm |
---|
381 | detects an address added to a point to point interface (PPP, TUN, etc) then |
---|
382 | it will set the listed DHCP options to the destination address of the |
---|
383 | interface. |
---|
384 | .It Ic profile Ar name |
---|
385 | Subsequent options are only parsed for this profile |
---|
386 | .Ar name . |
---|
387 | .It Ic quiet |
---|
388 | Suppress any dhcpcd output to the console, except for errors. |
---|
389 | .It Ic reboot Ar seconds |
---|
390 | Allow |
---|
391 | .Ar reboot |
---|
392 | seconds before moving to the DISCOVER phase if we have an old lease to use. |
---|
393 | The default is 5 seconds. |
---|
394 | A setting of 0 seconds causes |
---|
395 | .Nm dhcpcd |
---|
396 | to skip the REBOOT phase and go straight into DISCOVER. |
---|
397 | This is desirable for mobile users because if you change from network A to |
---|
398 | network B and they use the same subnet and the address from network A isn't |
---|
399 | in use on network B, then the DHCP server will remain silent even if authorative |
---|
400 | which means |
---|
401 | .Nm dhcpcd |
---|
402 | will timeout before moving back to the DISCOVER phase. |
---|
403 | .It Ic release |
---|
404 | .Nm dhcpcd |
---|
405 | will release the lease prior to stopping the interface. |
---|
406 | .It Ic require Ar option |
---|
407 | Requires the |
---|
408 | .Ar option |
---|
409 | to be present in all DHCP messages, otherwise the message is ignored. |
---|
410 | It can be a variable to be used in |
---|
411 | .Xr dhcpcd-run-hooks 8 |
---|
412 | or the numerical value. |
---|
413 | You can specify more options separated by commas, spaces or more require lines. |
---|
414 | To enforce that |
---|
415 | .Nm dhcpcd |
---|
416 | only responds to DHCP servers and not BOOTP servers, you can |
---|
417 | .Ic require |
---|
418 | .Ar dhcp_message_type . |
---|
419 | .It Ic script Ar script |
---|
420 | Use |
---|
421 | .Ar script |
---|
422 | instead of the default |
---|
423 | .Pa @SCRIPT@ . |
---|
424 | .It Ic ssid Ar ssid |
---|
425 | Subsequent options are only parsed for this wireless |
---|
426 | .Ar ssid . |
---|
427 | .It Ic static Ar value |
---|
428 | Configures a static |
---|
429 | .Ar value . |
---|
430 | If you set |
---|
431 | .Ic ip_address |
---|
432 | then |
---|
433 | .Nm dhcpcd |
---|
434 | will not attempt to obtain a lease and just use the value for the address with |
---|
435 | an infinite lease time. |
---|
436 | .Pp |
---|
437 | Here is an example which configures a static address, routes and dns. |
---|
438 | .D1 interface eth0 |
---|
439 | .D1 static ip_address=192.168.0.10/24 |
---|
440 | .D1 static routers=192.168.0.1 |
---|
441 | .D1 static domain_name_servers=192.168.0.1 |
---|
442 | .Pp |
---|
443 | Here is an example for PPP which gives the destination a default route. |
---|
444 | It uses the special destination keyword to insert the destination address |
---|
445 | into the value. |
---|
446 | .D1 interface ppp0 |
---|
447 | .D1 static ip_address= |
---|
448 | .D1 destination routers |
---|
449 | .It Ic timeout Ar seconds |
---|
450 | Timeout after |
---|
451 | .Ar seconds , |
---|
452 | instead of the default 30. |
---|
453 | A setting of 0 |
---|
454 | .Ar seconds |
---|
455 | causes |
---|
456 | .Nm dhcpcd |
---|
457 | to wait forever to get a lease. |
---|
458 | If |
---|
459 | .Nm dhcpcd |
---|
460 | is working on a single interface then |
---|
461 | .Nm dhcpcd |
---|
462 | will exit when a timeout occurs, otherwise |
---|
463 | .Nm dhcpcd |
---|
464 | will fork into the background. |
---|
465 | If using IPv4LL then |
---|
466 | .Nm dhcpcd |
---|
467 | start the IPv4LL process after the timeout and then wait a little longer |
---|
468 | before really timing out. |
---|
469 | .It Ic userclass Ar string |
---|
470 | Tag the DHCPv4 messages with the userclass. |
---|
471 | You can specify more than one. |
---|
472 | .It Ic vendor Ar code , Ns Ar value |
---|
473 | Add an encapsulated vendor option. |
---|
474 | .Ar code |
---|
475 | should be between 1 and 254 inclusive. |
---|
476 | To add a raw vendor string, omit |
---|
477 | .Ar code |
---|
478 | but keep the comma. |
---|
479 | Examples. |
---|
480 | .Pp |
---|
481 | Set the vendor option 01 with an IP address. |
---|
482 | .D1 vendor 01,192.168.0.2 |
---|
483 | Set the vendor option 02 with a hex code. |
---|
484 | .D1 vendor 02,01:02:03:04:05 |
---|
485 | Set the vendor option 03 with an IP address as a string. |
---|
486 | .D1 vendor 03,\e"192.168.0.2\e" |
---|
487 | Set un-encapsulated vendor option to hello world. |
---|
488 | .D1 vendor ,"hello world" |
---|
489 | .It Ic vendorclassid Ar string |
---|
490 | Set the DHCP Vendor Class. |
---|
491 | DHCPv6 has it's own option as shown below. |
---|
492 | The default is |
---|
493 | dhcpcd-<version>:<os>:<machine>:<platform>. |
---|
494 | For example |
---|
495 | .D1 dhcpcd-5.5.6:NetBSD-6.99.5:i386:i386 |
---|
496 | If not set then none is sent. |
---|
497 | Some badly configured DHCP servers reject unknown vendorclassids. |
---|
498 | To work around it, try and impersonate Windows by using the MSFT vendorclassid. |
---|
499 | .It Ic vendclass Ar en Ar data |
---|
500 | Add the DHCPv6 Vendor Indetifying Vendor Class with the IANA assigned Enterprise |
---|
501 | Number |
---|
502 | .Ar en |
---|
503 | with the |
---|
504 | .Ar data . |
---|
505 | This option can be set more than once to add more data, but the behaviour, |
---|
506 | as per |
---|
507 | .Xr RFC 3925 |
---|
508 | is undefined if the Enterprise Number differs. |
---|
509 | .It Ic waitip Op 4 | 6 |
---|
510 | Wait for an address to be assigned before forking to the background. |
---|
511 | 4 means wait for an IPv4 address to be assigned. |
---|
512 | 6 means wait for an IPv6 address to be assigned. |
---|
513 | If no argument is given, |
---|
514 | .Nm |
---|
515 | will wait for any address protocol to be assigned. |
---|
516 | It is possible to wait for more than one address protocol and |
---|
517 | .Nm |
---|
518 | will only fork to the background when all waiting conditions are satisfied. |
---|
519 | .It Ic xidhwaddr |
---|
520 | Use the last four bytes of the hardware address as the DHCP xid instead |
---|
521 | of a randomly generated number. |
---|
522 | .El |
---|
523 | .Ss Defining new options |
---|
524 | DHCP allows for the use of custom options. |
---|
525 | Each option needs to be started with the |
---|
526 | .Ic define |
---|
527 | or |
---|
528 | .Ic define6 |
---|
529 | directive. |
---|
530 | This can optionally be followed by both |
---|
531 | .Ic embed |
---|
532 | or |
---|
533 | .Ic encap |
---|
534 | options. |
---|
535 | Both can be specified more than once and |
---|
536 | .Ic embed |
---|
537 | must come before |
---|
538 | .Ic encap . |
---|
539 | .Bl -tag -width indent |
---|
540 | .It Ic define Ar code Ar type Ar variable |
---|
541 | Defines the DHCP option |
---|
542 | .Ar code |
---|
543 | of |
---|
544 | .Ar type |
---|
545 | with a name of |
---|
546 | .Ar variable |
---|
547 | exported to |
---|
548 | .Xr dhcpcd-run-hooks 8 . |
---|
549 | .It Ic define6 Ar code Ar type Ar variable |
---|
550 | Defines the DHCPv6 option |
---|
551 | .Ar code |
---|
552 | of |
---|
553 | .Ar type |
---|
554 | with a name of |
---|
555 | .Ar variable |
---|
556 | exported to |
---|
557 | .Xr dhcpcd-run-hooks 8 , |
---|
558 | with a prefix of |
---|
559 | .Va _dhcp6 . |
---|
560 | .It Ic vendopt Ar code Ar type Ar variable |
---|
561 | Defines the Vendor-Identifying Vendor Options. |
---|
562 | The |
---|
563 | .Ar code |
---|
564 | is the IANA Enterprise Number which will unqiuely describe the encapsulated |
---|
565 | options. |
---|
566 | .Ar type |
---|
567 | is normally |
---|
568 | .Ar encap . |
---|
569 | .Ar variable |
---|
570 | names the Vendor option to be exported. |
---|
571 | .It Ic embed Ar type Ar variable |
---|
572 | Defines an embedded variable within the defined option. |
---|
573 | The length is determined by the |
---|
574 | .Ar type . |
---|
575 | If the |
---|
576 | .Ar variable |
---|
577 | is not the same as defined in the parent option, |
---|
578 | it is prefixed with the parent |
---|
579 | .Ar variable |
---|
580 | first with an underscore. |
---|
581 | .It Ic encap Ar code Ar type Ar variable |
---|
582 | Defines an encapsulated variable within the defined option. |
---|
583 | The length is determined by the |
---|
584 | .Ar type . |
---|
585 | If the |
---|
586 | .Ar variable |
---|
587 | is not the same as defined in the parent option, |
---|
588 | it is prefixed with the parent |
---|
589 | .Ar variable |
---|
590 | first with an underscore. |
---|
591 | .El |
---|
592 | .Ss Type prefix |
---|
593 | These keywords come before the type itself, to describe it more fully. |
---|
594 | You can use more than one, but they must appear in the order listed below. |
---|
595 | .Bl -tag -width -indent |
---|
596 | .It Ic request |
---|
597 | Requests the option by default without having to be specified in user |
---|
598 | configuration |
---|
599 | .It Ic norequest |
---|
600 | This option cannot be requested, regardless of user configuration |
---|
601 | .It Ic index |
---|
602 | The option can appear more than once and will be indexed. |
---|
603 | .It Ic array |
---|
604 | The option data is split into a space seperated array, each element being |
---|
605 | the same type. |
---|
606 | .El |
---|
607 | .Ss Types to define |
---|
608 | The type directly affects the length of data consumed inside the option. |
---|
609 | Any remaining data is normally discarded. |
---|
610 | Lengths can be specified for string and binhex types, but this is generally |
---|
611 | with other data embedded afterwards in the same option. |
---|
612 | .Bl -tag -width indent |
---|
613 | .It Ic ipaddress |
---|
614 | An IPv4 address, 4 bytes |
---|
615 | .It Ic ip6address |
---|
616 | An IPv6 address, 16 bytes |
---|
617 | .It Ic string Op : Ic length |
---|
618 | A shell escaped string (binary data escaped as octal) |
---|
619 | .It Ic byte |
---|
620 | A byte |
---|
621 | .It Ic int16 |
---|
622 | A signed 16bit integer, 2 bytes |
---|
623 | .It Ic uint16 |
---|
624 | An unsigned 16bit integer, 2 bytes |
---|
625 | .It Ic int32 |
---|
626 | A signed 32bit integer, 4 bytes |
---|
627 | .It Ic uint32 |
---|
628 | An unsigned 32bit integer, 4 bytes |
---|
629 | .It Ic flag |
---|
630 | A fixed value (1) to indicate that the option is present, 0 bytes |
---|
631 | .It Ic domain |
---|
632 | A RFC 3397 encoded string |
---|
633 | .It Ic binhex Op : Ic length |
---|
634 | Binary data expressed as hexadecimal |
---|
635 | .It Ic embed |
---|
636 | Contains embedded options (implies encap as well) |
---|
637 | .It Ic encap |
---|
638 | Contains encapsulated options (implies embed as well) |
---|
639 | .It Ic option |
---|
640 | References an option from the global definition |
---|
641 | .El |
---|
642 | .Ss Example definition |
---|
643 | .D1 # DHCP option 81, Fully Qualified Domain Name, RFC4702 |
---|
644 | .D1 define 81 embed fqdn |
---|
645 | .D1 embed byte flags |
---|
646 | .D1 embed byte rcode1 |
---|
647 | .D1 embed byte rcode2 |
---|
648 | .D1 embed domain fqdn |
---|
649 | .Pp |
---|
650 | .D1 # DHCP option 125, Vendor Specific Information Option, RFC3925 |
---|
651 | .D1 define 125 encap vsio |
---|
652 | .D1 embed uint32 enterprise_number |
---|
653 | .D1 # Options defined for the enterprise number |
---|
654 | .D1 encap 1 ipaddress ipaddress |
---|
655 | .Ss Supported protocols |
---|
656 | .Bl -tag -width -indent |
---|
657 | .It Ic token |
---|
658 | Sends and expects the token with the secretid 0 in each message. |
---|
659 | .It Ic delayedrealm |
---|
660 | Delayed Authentication. |
---|
661 | .Nm dhcpcd |
---|
662 | will send an authentication option with no key or MAC. |
---|
663 | The server will see this option, and select a key for |
---|
664 | .Nm , writing the |
---|
665 | .Ar realm |
---|
666 | and |
---|
667 | .Ar secretid |
---|
668 | in it. |
---|
669 | .Nm dhcpcd |
---|
670 | will then look for a non-expired token with a matching realm and secretid. |
---|
671 | This token is used to authenicate all other messages. |
---|
672 | .It Ic delayed |
---|
673 | Same as above, but without a realm. |
---|
674 | .El |
---|
675 | .Ss Supported algorithms |
---|
676 | If none specified, |
---|
677 | .Ic hmac-md5 |
---|
678 | is the default. |
---|
679 | .Bl -tag -width -indent |
---|
680 | .It Ic hmac-md5 |
---|
681 | .El |
---|
682 | .Ss Supported Replay Detection Mechanisms |
---|
683 | If none specified, |
---|
684 | .Ic monotonic |
---|
685 | is the default. |
---|
686 | .Bl -tag -width -indent |
---|
687 | .It Ic monotonic |
---|
688 | .El |
---|
689 | .Sh SEE ALSO |
---|
690 | .Xr fnmatch 3 , |
---|
691 | .Xr if_nametoindex 3 , |
---|
692 | .Xr dhcpcd 8 , |
---|
693 | .Xr dhcpcd-run-hooks 8 |
---|
694 | .Sh AUTHORS |
---|
695 | .An Roy Marples Aq Mt roy@marples.name |
---|
696 | .Sh BUGS |
---|
697 | When configuring DHCPv6 you can only select one IA type. |
---|
698 | I can't think of a use case where you would want different types, |
---|
699 | so if you have one then please bring it up for discussion on the |
---|
700 | .Aq Mt dhcpcd-discuss@marples.name |
---|
701 | mailing list. |
---|
702 | .Pp |
---|
703 | Please report them to |
---|
704 | .Lk http://roy.marples.name/projects/dhcpcd |
---|