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