]>
Commit | Line | Data |
---|---|---|
91a44b91 | 1 | .\" Copyright 2006-2009 Roy Marples |
ba9dfb7a RM |
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 | .\" | |
1abffd5b | 25 | .Dd March 19, 2009 |
ba9dfb7a | 26 | .Dt DHCPCD.CONF 5 SMM |
918338f2 | 27 | .Os |
ba9dfb7a RM |
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 | |
cf42802e RM |
35 | to do it once in a configuration file. |
36 | Most of the options found in | |
ba9dfb7a | 37 | .Xr dhcpcd 8 |
cf42802e RM |
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. | |
967194ef RM |
42 | .Pp |
43 | Blank lines and lines starting with # are ignored. | |
ba9dfb7a RM |
44 | .Pp |
45 | Here's a list of available options: | |
46 | .Bl -tag -width indent | |
ba97e494 RM |
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 . | |
bac03ede RM |
60 | .It Ic background |
61 | Background immediately. | |
62 | This is useful for startup scripts which don't disable link messages for | |
63 | carrier status. | |
e095a6eb | 64 | .It Ic blacklist Ar address Ns Op Ar /cidr |
ce6b39df RM |
65 | Ignores all packets from |
66 | .Ar address Ns Op Ar /cidr . | |
d2616b08 | 67 | .It Ic clientid Ar string |
c989b023 RM |
68 | Send the |
69 | .Ar clientid . | |
d2616b08 | 70 | If the string is of the format 01:02:03 then it is encoded as hex. |
3faba9e6 RM |
71 | For interfaces whose hardware address is longer than 8 bytes, or if the |
72 | .Ar clientid | |
73 | is an empty string then | |
74 | .Nm dhcpcd | |
75 | sends a default | |
76 | .Ar clientid | |
77 | of the hardware family and the hardware address. | |
d2616b08 RM |
78 | .It Ic duid |
79 | Generate an | |
80 | .Rs | |
81 | .%T "RFC 4361" | |
82 | .Re | |
cf42802e RM |
83 | compliant clientid. |
84 | This requires persistent storage and not all DHCP servers work with it so it's | |
85 | not enabled by default. | |
d2616b08 RM |
86 | The duid generated will be held in |
87 | .Pa @SYSCONFDIR@/dhcpcd.duid | |
88 | and should not be copied to other hosts. | |
ba9dfb7a | 89 | .It Ic hostname Ar name |
35ff0dbb RM |
90 | Sends specified |
91 | .Ar hostname | |
d2616b08 | 92 | to the DHCP server so it can be registered in DNS. If |
35ff0dbb | 93 | .Ar hostname |
d2616b08 | 94 | if a FQDN (ie, contains a .) then it will be encoded as such. |
35ff0dbb RM |
95 | .It Ic fqdn Op none | ptr | both |
96 | none disables FQDN encoding, ptr just asks the DHCP server to update the PTR | |
97 | record of the host in DNS whereas both also updates the A record. | |
1b3bc477 RM |
98 | .Nm dhcpcd |
99 | itself never does any DNS updates. | |
e837a670 RM |
100 | .Nm dhcpcd |
101 | encodes the FQDN hostname as specified in | |
102 | .Li RFC1035 . | |
3adc5520 | 103 | .It Ic interface Ar interface |
012fd5d3 RM |
104 | Subsequent options are only parsed for this |
105 | .Ar interface . | |
ba9dfb7a RM |
106 | .It Ic leasetime Ar seconds |
107 | Request a leasetime of | |
108 | .Ar seconds . | |
065125d4 RM |
109 | .It Ic metric Ar metric |
110 | Metrics are used to prefer an interface over another one, lowest wins. | |
111 | .Nm dhcpcd | |
112 | will supply a default metic of 200 + | |
113 | .Xr if_nametoindex 3 . | |
114 | An extra 100 will be added for wireless interfaces. | |
ba9dfb7a | 115 | .It Ic noarp |
cf42802e RM |
116 | Don't send any ARP requests. |
117 | This also disables IPv4LL. | |
ba9dfb7a RM |
118 | .It Ic nogateway |
119 | Don't install any default routes. | |
37156a6b RM |
120 | .It Ic nohook Ar script |
121 | Don't run this hook script. | |
8276da82 RM |
122 | Matches full name, or prefixed with 2 numbers optionally ending with |
123 | .Pa .sh . | |
fc7ee231 RM |
124 | .Pp |
125 | So to stop | |
126 | .Nm dhcpcd | |
127 | from touching your DNS or MTU settings you would do:- | |
128 | .D1 nohook resolv.conf, mtu | |
ba9dfb7a RM |
129 | .It Ic noipv4ll |
130 | Don't attempt to obtain an IPv4LL address if we failed to get one via DHCP. | |
131 | See | |
132 | .Rs | |
133 | .%T "RFC 3927" | |
134 | .Re | |
a26af491 RM |
135 | .It Ic nolink |
136 | Don't receive link messages about carrier status. | |
137 | You should only set this for buggy interface drivers. | |
cc45fbd7 | 138 | .It Ic option Ar option |
d2616b08 | 139 | Requests the |
cc45fbd7 | 140 | .Ar option |
cf42802e RM |
141 | from the server. |
142 | It can be a variable to be used in | |
ee4e620a | 143 | .Xr dhcpcd-run-hooks 8 |
cf42802e | 144 | or the numerical value. |
cc45fbd7 | 145 | You can specify more options seperated by commas, spaces or more option lines. |
1abffd5b RM |
146 | .It Ic destination Ar option |
147 | If | |
148 | .Nm | |
149 | detects an address added to a point to point interface (PPP, TUN, etc) then | |
150 | it will set the listed DHCP options to the destination address of the | |
151 | interface. | |
152 | .It Ic quiet | |
f19b6499 | 153 | Supress any dhcpcd output to the console, except for errors. |
1abffd5b | 154 | .It Ic reboot Ar seconds |
a2a9a498 RM |
155 | Allow |
156 | .Ar reboot | |
157 | seconds before moving to the discover phase if we have an old lease to use. | |
158 | The default is 10 seconds. | |
159 | A setting if 0 seconds causes | |
160 | .Nm dhcpcd | |
161 | to skip the reboot phase and go straight into discover. | |
2662d519 RM |
162 | .It Ic release |
163 | .Nm dhcpcd | |
164 | will release the lease prior to stopping the interface. | |
cc45fbd7 RM |
165 | .It Ic require Ar option |
166 | Requires the | |
167 | .Ar option | |
168 | to be present in all DHCP messages, otherwise the message is ignored. | |
169 | It can be a variable to be used in | |
170 | .Xr dhcpcd-run-hooks 8 | |
171 | or the numerical value. | |
172 | You can specify more options seperated by commas, spaces or more require lines. | |
02d339e3 RM |
173 | To enforce that |
174 | .Nm dhcpcd | |
175 | only responds to DHCP servers and not BOOTP servers, you can | |
176 | .Ic require | |
177 | .Ar dhcp_message_type . | |
0aeb350c RM |
178 | .It Ic script Ar script |
179 | Use | |
180 | .Ar script | |
181 | instead of the default | |
182 | .Pa @SCRIPT@ . | |
c53cf4ef RM |
183 | .It Ic ssid Ar ssid |
184 | Subsequent options are only parsed for this wireless | |
185 | .Ar ssid . | |
91a44b91 RM |
186 | .It Ic static Ar value |
187 | Configures a static | |
188 | .Ar value . | |
189 | If you set | |
190 | .Ic ip_address | |
191 | then | |
192 | .Nm dhcpcd | |
193 | will not attempt to obtain a lease and just use the value for the address with | |
194 | an infinite lease time. | |
195 | .Pp | |
196 | Here is an example which configures a static address, routes and dns. | |
197 | .D1 interface eth0 | |
198 | .D1 static ip_address=192.168.0.10/24 | |
199 | .D1 static routers=192.168.0.1 | |
200 | .D1 static domain_name_servers=192.168.0.1 | |
1abffd5b RM |
201 | .Pp |
202 | Here is an example for PPP which gives the destination a default route. | |
203 | It uses the special destination keyword to insert the destination address | |
204 | into the value. | |
205 | .D1 interface ppp0 | |
206 | .D1 static ip_address= | |
207 | .D1 destination routers | |
d2616b08 | 208 | .It Ic timeout Ar seconds |
fedb3da0 | 209 | The default timeout for waiting for a DHCP response is 30 seconds which may |
d2616b08 RM |
210 | be too long or too short and can be changed here. |
211 | .It Ic userclass Ar string | |
cf42802e RM |
212 | Tag the DHCP messages with the userclass. |
213 | You can specify more than one. | |
bac03ede | 214 | .It Ic vendor Ar code , Ns Ar value |
757520c5 RM |
215 | Add an enscapulated vendor option. |
216 | .Ar code | |
217 | should be between 1 and 254 inclusive. | |
218 | Examples. | |
219 | .Pp | |
220 | Set the vendor option 01 with an IP address. | |
221 | .D1 vendor 01,192.168.0.2 | |
222 | Set the vendor option 02 with a hex code. | |
223 | .D1 vendor 02,01:02:03:04:05 | |
224 | Set the vendor option 03 with an IP address as a string. | |
225 | .D1 vendor 03,\e"192.168.0.2\e" | |
bac03ede RM |
226 | .It Ic vendorclassid Ar string |
227 | Change the default vendorclassid sent from dhcpcd-version. | |
228 | If not set then none is sent. | |
eaa90296 | 229 | .El |
ba9dfb7a | 230 | .Sh SEE ALSO |
ee4e620a | 231 | .Xr dhcpcd-run-hooks 8 , |
ba97e494 | 232 | .Xr dhcpcd 8 , |
065125d4 | 233 | .Xr if_nametoindex 3 , |
ba97e494 | 234 | .Xr fnmatch 3 |
ba9dfb7a | 235 | .Sh AUTHORS |
760f7628 | 236 | .An Roy Marples Aq roy@marples.name |
ba9dfb7a | 237 | .Sh BUGS |
56d212f2 | 238 | Please report them to http://roy.marples.name/projects/dhcpcd |