xref: /openbsd/sbin/dhcpleased/dhcpleased.conf.5 (revision 726515c9)
1.\"	$OpenBSD: dhcpleased.conf.5,v 1.15 2024/11/11 15:19:31 florian Exp $
2.\"
3.\" Copyright (c) 2018, 2021 Florian Obser <florian@openbsd.org>
4.\" Copyright (c) 2005 Esben Norby <norby@openbsd.org>
5.\" Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
6.\" Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
7.\" Copyright (c) 2002 Daniel Hartmeier <dhartmei@openbsd.org>
8.\"
9.\" Permission to use, copy, modify, and distribute this software for any
10.\" purpose with or without fee is hereby granted, provided that the above
11.\" copyright notice and this permission notice appear in all copies.
12.\"
13.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20.\"
21.Dd $Mdocdate: November 11 2024 $
22.Dt DHCPLEASED.CONF 5
23.Os
24.Sh NAME
25.Nm dhcpleased.conf
26.Nd DHCP client configuration file
27.Sh DESCRIPTION
28The
29.Xr dhcpleased 8
30daemon is a dynamic host configuration protocol client daemon.
31.Pp
32The
33.Nm
34config file is divided into the following main sections:
35.Bl -tag -width xxxx
36.It Sy Macros
37User-defined variables may be defined and used later, simplifying the
38configuration file.
39.It Sy Interfaces
40If an interface requires non-default options, they can be defined in
41this section.
42Most configurations do not require this.
43.El
44.Sh MACROS
45Macros can be defined that will later be expanded in context.
46Macro names must start with a letter, digit, or underscore,
47and may contain any of those characters.
48Macro names may not be reserved words (for example,
49.Ic interface ) .
50Macros are not expanded inside quotes.
51.Sh INTERFACES
52A list of interfaces to overwrite defaults:
53.Bl -tag -width Ds
54.It Ic interface Ar name Brq Ar option ...
55.Pp
56.Ic interface
57options are as follows:
58.Bl -tag -width Ds
59.It Ic ignore dns
60Ignore nameservers from leases on this interface.
61The default is to not ignore nameservers.
62.It Ic ignore routes
63Ignore routes from leases on this interface.
64The default is to not ignore routes.
65.It Ic ignore Ar server-ip
66Ignore leases from
67.Ar server-ip .
68This option can be listed multiple times.
69The default is to not ignore servers.
70.It Ic prefer ipv6
71Send the IPv6-Only preferred option to the server.
72If the server responds with the option, no lease is configured.
73.It Ic send client id Ar client-id
74Send the DHCP client identifier option with a value of
75.Ar client-id .
76If
77.Ar client-id
78consists of a series of octets of two-digit hexadecimal numbers separated by
79colons, the first octet is used as the type and the rest as value.
80The MAC address 00:53:FF:AA:BB:CC would be configured as:
81.Bd -literal -offset indent
82send client id "01:00:53:FF:AA:BB:CC"
83.Ed
84.Pp
85Otherwise the string
86.Ar client-id
87is sent verbatim.
88The default is to send the interface's MAC address as client identifier.
89.Pp
90When
91.Ar client-id
92is not a hardware address, it is supposed to be sent as hardware type 0 but
93the majority of DHCP clients and servers do not implement this and neither
94does
95.Nm .
96If a server is encountered that requires this, a 0 byte can be encoded as \e0.
97The client identifier
98.Dq foobar
99with hardware type 0 would be configured as:
100.Bd -literal -offset indent
101send client id "\e0foobar"
102.Ed
103.It Ic send host name Ar host-name
104Send the DHCP client host name option with a value of
105.Ar host-name .
106The default is to send the name of the host.
107.It Ic send no host name
108Do not send a DHCP host name option.
109The default is to send a DHCP host name option with the name of the host.
110.It Ic send vendor class id Ar vendor-class-id
111Send the DHCP vendor class identifier option with a value of
112.Ar vendor-class-id .
113The default is to not send a vendor class identifier.
114.El
115.El
116.Sh FILES
117.Bl -tag -width /etc/dhcpleased.conf -compact
118.It Pa /etc/dhcpleased.conf
119.Xr dhcpleased 8
120configuration file.
121.El
122.Sh SEE ALSO
123.Xr dhcpleasectl 8 ,
124.Xr dhcpleased 8
125