aboutsummaryrefslogtreecommitdiffstats
path: root/dhcpcd.conf.5.in
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpcd.conf.5.in')
-rw-r--r--dhcpcd.conf.5.in172
1 files changed, 148 insertions, 24 deletions
diff --git a/dhcpcd.conf.5.in b/dhcpcd.conf.5.in
index 9e0a023..c3bfa8f 100644
--- a/dhcpcd.conf.5.in
+++ b/dhcpcd.conf.5.in
@@ -1,4 +1,4 @@
-.\" Copyright 2006-2008 Roy Marples
+.\" Copyright (c) 2006-2010 Roy Marples
.\" All rights reserved
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -22,12 +22,12 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd November 18, 2008
+.Dd January 28, 2010
.Dt DHCPCD.CONF 5 SMM
.Os
.Sh NAME
.Nm dhcpcd.conf
-.Nd dhcpcd configuration file
+.Nd dhcpcd configuration file
.Sh DESCRIPTION
Although
.Nm dhcpcd
@@ -44,17 +44,60 @@ Blank lines and lines starting with # are ignored.
.Pp
Here's a list of available options:
.Bl -tag -width indent
+.It Ic allowinterfaces Ar pattern
+When discovering interfaces, the interface name must match
+.Ar pattern
+which is a space or comma separated list of patterns passed to
+.Xr fnmatch 3 .
+If the same interface is matched in
+.Ic denyinterfaces
+then it is still denied.
+.It Ic denyinterfaces Ar pattern
+When discovering interfaces, the interface name must not match
+.Ar pattern
+which is a space or comma separated list of patterns passed to
+.Xr fnmatch 3 .
+.It Ic arping Ar address Op address
+.Nm dhcpcd
+will arping each address in order before attempting DHCP.
+If an address is found, we will select the replying hardware address as the
+profile, otherwise the ip address.
+Example:
+.Pp
+.D1 interface bge0
+.D1 arping 192.168.0.1
+.Pp
+.D1 profile 192.168.0.1
+.D1 static ip_address=192.168.0.10/24
.It Ic background
Background immediately.
This is useful for startup scripts which don't disable link messages for
carrier status.
-.It Ic blacklist Ar address
-Ignores all DHCP messages which have this
-.Ar address
-as the server ID.
-This may be expanded in future releases to ignore all packets
-matching either the IP or hardware
-.Ar address .
+.It Ic blacklist Ar address Ns Op /cidr
+Ignores all packets from
+.Ar address Ns Op /cidr .
+.It Ic whitelist Ar address Ns Op /cidr
+Only accept packets from
+.Ar address Ns Op /cidr .
+.Ic blacklist
+is ignored if
+.Ic whitelist
+is set.
+.It Ic broadcast
+Instructs the DHCP server to broadcast replies back to the client.
+Normally this is only set for non Ethernet interfaces,
+such as FireWire and InfiniBand.
+In most cases,
+.Nm dhcpcd
+will set this automatically.
+.It Ic env Ar value
+Push
+.Ar value
+to the environment for use in
+.Xr dhcpcd-run-hooks 8 .
+For example, you can force the hostname hook to always set the hostname with
+.Ic env
+.Va force_hostname=YES .
.It Ic clientid Ar string
Send the
.Ar clientid .
@@ -77,18 +120,22 @@ not enabled by default.
The duid generated will be held in
.Pa @SYSCONFDIR@/dhcpcd.duid
and should not be copied to other hosts.
+.It Ic fallback Ar profile
+Fallback to using this profile if DHCP fails.
+This allows you to configure a static profile instead of using ZeroConf.
.It Ic hostname Ar name
-Sends specified
-.Ar hostname
-to the DHCP server so it can be registered in DNS. If
+Sends
+.Ar hostname
+to the DHCP server so it can be registered in DNS.
+If
.Ar hostname
-if a FQDN (ie, contains a .) then it will be encoded as such.
+is an empty string then the current system hostname is sent.
+If
+.Ar hostname
+is a FQDN (ie, contains a .) then it will be encoded as such.
.It Ic fqdn Op none | ptr | both
none disables FQDN encoding, ptr just asks the DHCP server to update the PTR
record of the host in DNS whereas both also updates the A record.
-The current hostname or the hostname specified using the
-.Ic hostname
-option must be a FQDN.
.Nm dhcpcd
itself never does any DNS updates.
.Nm dhcpcd
@@ -100,6 +147,12 @@ Subsequent options are only parsed for this
.It Ic leasetime Ar seconds
Request a leasetime of
.Ar seconds .
+.It Ic metric Ar metric
+Metrics are used to prefer an interface over another one, lowest wins.
+.Nm dhcpcd
+will supply a default metric of 200 +
+.Xr if_nametoindex 3 .
+An extra 100 will be added for wireless interfaces.
.It Ic noarp
Don't send any ARP requests.
This also disables IPv4LL.
@@ -109,6 +162,11 @@ Don't install any default routes.
Don't run this hook script.
Matches full name, or prefixed with 2 numbers optionally ending with
.Pa .sh .
+.Pp
+So to stop
+.Nm dhcpcd
+from touching your DNS or MTU settings you would do:-
+.D1 nohook resolv.conf, mtu
.It Ic noipv4ll
Don't attempt to obtain an IPv4LL address if we failed to get one via DHCP.
See
@@ -125,9 +183,33 @@ from the server.
It can be a variable to be used in
.Xr dhcpcd-run-hooks 8
or the numerical value.
-You can specify more options seperated by commas, spaces or more option lines.
-.Ic quiet
-Supress any dhcpcd output to the console, except for errors.
+You can specify more options separated by commas, spaces or more option lines.
+.It Ic nooption Ar option
+Remove the option from the DHCP message.
+This should only be used when a DHCP server sends a non requested option
+that should not be processed.
+.It Ic destination Ar option
+If
+.Nm
+detects an address added to a point to point interface (PPP, TUN, etc) then
+it will set the listed DHCP options to the destination address of the
+interface.
+.It Ic profile Ar name
+Subsequent options are only parsed for this profile
+.Ar name .
+.It Ic quiet
+Suppress any dhcpcd output to the console, except for errors.
+.It Ic reboot Ar seconds
+Allow
+.Ar reboot
+seconds before moving to the discover phase if we have an old lease to use.
+The default is 10 seconds.
+A setting if 0 seconds causes
+.Nm dhcpcd
+to skip the reboot phase and go straight into discover.
+.It Ic release
+.Nm dhcpcd
+will release the lease prior to stopping the interface.
.It Ic require Ar option
Requires the
.Ar option
@@ -135,12 +217,42 @@ to be present in all DHCP messages, otherwise the message is ignored.
It can be a variable to be used in
.Xr dhcpcd-run-hooks 8
or the numerical value.
-You can specify more options seperated by commas, spaces or more require lines.
+You can specify more options separated by commas, spaces or more require lines.
+To enforce that
+.Nm dhcpcd
+only responds to DHCP servers and not BOOTP servers, you can
+.Ic require
+.Ar dhcp_message_type .
.It Ic script Ar script
Use
.Ar script
instead of the default
.Pa @SCRIPT@ .
+.It Ic ssid Ar ssid
+Subsequent options are only parsed for this wireless
+.Ar ssid .
+.It Ic static Ar value
+Configures a static
+.Ar value .
+If you set
+.Ic ip_address
+then
+.Nm dhcpcd
+will not attempt to obtain a lease and just use the value for the address with
+an infinite lease time.
+.Pp
+Here is an example which configures a static address, routes and dns.
+.D1 interface eth0
+.D1 static ip_address=192.168.0.10/24
+.D1 static routers=192.168.0.1
+.D1 static domain_name_servers=192.168.0.1
+.Pp
+Here is an example for PPP which gives the destination a default route.
+It uses the special destination keyword to insert the destination address
+into the value.
+.D1 interface ppp0
+.D1 static ip_address=
+.D1 destination routers
.It Ic timeout Ar seconds
The default timeout for waiting for a DHCP response is 30 seconds which may
be too long or too short and can be changed here.
@@ -148,9 +260,12 @@ be too long or too short and can be changed here.
Tag the DHCP messages with the userclass.
You can specify more than one.
.It Ic vendor Ar code , Ns Ar value
-Add an enscapulated vendor option.
+Add an encapsulated vendor option.
.Ar code
should be between 1 and 254 inclusive.
+To add a raw vendor string, omit
+.Ar code
+but keep the comma.
Examples.
.Pp
Set the vendor option 01 with an IP address.
@@ -159,14 +274,23 @@ Set the vendor option 02 with a hex code.
.D1 vendor 02,01:02:03:04:05
Set the vendor option 03 with an IP address as a string.
.D1 vendor 03,\e"192.168.0.2\e"
+Set un-encapsulated vendor option to hello world.
+.D1 vendor ,"hello world"
.It Ic vendorclassid Ar string
Change the default vendorclassid sent from dhcpcd-version.
If not set then none is sent.
+.It Ic waitip
+Wait for an address to be assigned before forking to the background.
+.It Ic xidhwaddr
+Use the last four bytes of the hardware address as the DHCP xid instead
+of a randomly generated number.
.El
.Sh SEE ALSO
.Xr dhcpcd-run-hooks 8 ,
-.Xr dhcpcd 8
+.Xr dhcpcd 8 ,
+.Xr if_nametoindex 3 ,
+.Xr fnmatch 3
.Sh AUTHORS
-.An Roy Marples <roy@marples.name>
+.An Roy Marples Aq roy@marples.name
.Sh BUGS
Please report them to http://roy.marples.name/projects/dhcpcd