summaryrefslogtreecommitdiff
path: root/usr.sbin/rad/rad.conf.5
blob: 7c95a8cce8355948a556c7b9d8af2b7e66f3abcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
.\"	$OpenBSD: rad.conf.5,v 1.25 2024/05/31 16:19:53 florian Exp $
.\"
.\" Copyright (c) 2018 Florian Obser <florian@openbsd.org>
.\" Copyright (c) 2005 Esben Norby <norby@openbsd.org>
.\" Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
.\" Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
.\" Copyright (c) 2002 Daniel Hartmeier <dhartmei@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: May 31 2024 $
.Dt RAD.CONF 5
.Os
.Sh NAME
.Nm rad.conf
.Nd router advertisement daemon configuration file
.Sh DESCRIPTION
The
.Xr rad 8
daemon is an IPv6 router advertisement daemon.
.Pp
The
.Nm
config file is divided into the following main sections:
.Bl -tag -width xxxx
.It Sy Macros
User-defined variables may be defined and used later, simplifying the
configuration file.
.It Sy Global Configuration
Global settings for
.Xr rad 8 .
These are used as default values for
.Ic interface
definitions and can be overwritten in an
.Ic interface
block.
.It Sy Interfaces
.Xr rad 8
sends IPv6 router advertisement messages.
This section defines on which interfaces to advertise prefix information
and their associated parameters.
.El
.Pp
Additional configuration files can be included with the
.Ic include
keyword.
.Sh MACROS
Macros can be defined that will later be expanded in context.
Macro names must start with a letter, digit, or underscore,
and may contain any of those characters.
Macro names may not be reserved words (for example,
.Ic interface )
Macros are not expanded inside quotes.
.Sh GLOBAL CONFIGURATION
The global configuration section sets defaults for router advertisement
messages.
These can be overwritten in interface blocks.
.Bl -tag -width Ds
.It Ic default router Pq Ic yes Ns | Ns Ic no
Act as a default router or not.
The default is yes.
.It Ic dns Brq dns options
.Ic dns
options are as follows:
.Bl -tag -width Ds
.It Ic lifetime Ar seconds
The number of seconds the dns options are valid after receiving a router
advertisement message.
The default is 900 seconds.
.It Ic nameserver Pq Ar IP Ns | Ns { nameserver list }
IPv6 address or list of IPv6 addresses of DNS name servers.
.It Ic search Pq Ar domain Ns | Ns { domain list }
Domain or list of domains for the
.Xr resolv.conf 5
search list.
.El
.It Ic hop limit Ar hops
Specify the diameter of the internet.
The default is 0, meaning unspecified by this router.
.It Ic managed address configuration Pq Ic yes Ns | Ns Ic no
If set to yes, indicate that stateless address configuration prefixes are
not available and hosts should consult DHCPv6.
The default is no.
.It Ic mtu Ar bytes
The MTU option is used in Router Advertisement messages to ensure that all
nodes on a link use the same MTU value in those cases where the link MTU
is not well known.
The default is 0, meaning unspecified by this router.
.It Ic nat64 prefix Ar prefix Op Brq nat64 options
Add a PREF64 router advertisement option to communicate prefixes used
for Network Address and Protocol Translation from IPv6 to IPv4 (NAT64).
If
.Ar prefix
is specified without a prefix length, its default is 64.
.Pp
.Ic nat64 prefix
options are as follows:
.Bl -tag -width Ds
.It Ic lifetime Ar seconds
The number of seconds the nat64 prefix option is valid after receiving a router
advertisement message.
A value of zero indicates to not use the prefix anymore.
The maximum is 65528 seconds.
The default is 1800 seconds.
.El
.It Ic other configuration Pq Ic yes Ns | Ns Ic no
If set to yes, hosts should consult DHCPv6 for additional configuration
like NTP servers or DNS name servers.
.It Ic router lifetime Ar seconds
The number of seconds this router is a valid default router after receiving
a router advertisement message.
The default is 1800 seconds.
.It Ic router preference Pq Ic high Ns | Ns Ic medium Ns | Ns Ic low
Indicate whether to prefer this router over other default routers.
The default is medium.
.\" .It Ic reachable time Ar number
.\" XXX
.\" .It Ic retrans timer Ar number
.\" XXX
.It Ic source link-layer address Pq Ic yes Ns | Ns Ic no
Add a source link-layer address option to router advertisement messages, to
communicate the link-layer address of the sending interface.
The default is yes.
.El
.Sh INTERFACES
A list of interfaces or interface groups to send advertisements on:
.Bd -unfilled -offset indent
.Ic interface Ar name Op { prefix list }
.Ed
.Pp
Options set in the global section can be overwritten inside an interface
block.
In addition an interface block can contain a list of prefixes:
.Bd -unfilled -offset indent
.Oo Ic no Oc Ic auto prefix Op { prefix options }
.Ic prefix Ar prefix Op { prefix options }
.Ed
.Pp
The default is to discover prefixes to announce by inspecting the IPv6
addresses configured on an interface.
This can be disabled with
.Ic no auto prefix .
If
.Ar prefix
is specified without a prefix length, its default is 64.
.Pp
.Ic prefix
options are as follows:
.Bl -tag -width Ds
.It Ic autonomous address-configuration Pq Ic yes Ns | Ns Ic no
This prefix can be used to generate IPv6 addresses.
The default is yes.
.It Ic on-link Pq Ic yes Ns | Ns Ic no
This prefix is considered on-link.
The default is yes.
.It Ic preferred lifetime Ar seconds
The preferred lifetime (pltime) in seconds for addresses generated from this
prefix.
The default is 2700.
This option is ignored if the prefix is discovered from a network interface
and it has a preferred lifetime configured.
.It Ic valid lifetime Ar seconds
The valid lifetime (vltime) in seconds for addresses generated from this
prefix.
The default is 5400.
This option is ignored if the prefix is discovered from a network interface
and it has a valid lifetime configured.
.El
.Sh FILES
.Bl -tag -width /etc/examples/rad.conf -compact
.It Pa /etc/rad.conf
.Xr rad 8
configuration file.
.It Pa /etc/examples/rad.conf
Example configuration file.
.El
.Sh EXAMPLES
With the following example configuration,
.Xr rad 8
will pick a prefix from the ix1 interface and send router advertisements on it:
.Pp
.Dl interface ix1
.Sh SEE ALSO
.Xr ractl 8 ,
.Xr rad 8 ,
.Xr rc.conf.local 8
.Sh HISTORY
The
.Nm
file format first appeared in
.Ox 6.4 .