summaryrefslogtreecommitdiff
path: root/usr.sbin/ripd/ripd.conf.5
blob: 6df856c94a13bf599031c84cbe81fd725db1d221 (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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
.\"	$OpenBSD: ripd.conf.5,v 1.20 2020/05/16 16:58:12 jmc Exp $
.\"
.\" Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
.\" Copyright (c) 2005, 2006 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 16 2020 $
.Dt RIPD.CONF 5
.Os
.Sh NAME
.Nm ripd.conf
.Nd Routing Information Protocol daemon configuration file
.Sh DESCRIPTION
The
.Xr ripd 8
daemon implements the Routing Information Protocol version 2 as described
in RFC 2453.
.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 ripd 8 .
.It Sy Interfaces Configuration
Interface-specific parameters.
.El
.Sh MACROS
Much like
.Xr cpp 1
or
.Xr m4 1 ,
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 cost ) .
Macros are not expanded inside quotes.
.Pp
For example:
.Bd -literal -offset indent
hi="2"
interface em0 {
	cost $hi
}
.Ed
.Sh GLOBAL CONFIGURATION
Global settings concerns the main behaviour of the daemon.
.Pp
.Bl -tag -width Ds -compact
.It Ic fib-priority Ar prio
Set the routing priority to
.Ar prio .
The default is 40.
.Pp
.It Xo
.Ic fib-update
.Pq Ic yes Ns | Ns Ic no
.Xc
If set to
.Ic no ,
do not update the Forwarding Information Base, a.k.a. the kernel routing
table.
The default is
.Ic yes .
.Pp
.It Ic rdomain Ar tableid
Specifies the routing table
.Xr ripd 8
should modify.
Table 0 is the default table.
.Pp
.It Xo
.Op Ic no
.Ic redistribute
.Sm off
.Po Ic static Ns | Ns Ic connected Ns | Ns
.Ic default Pc
.Sm on
.Xc
.It Xo
.Op Ic no
.Ic redistribute Ar prefix
.Xc
.It Xo
.Op Ic no
.Ic redistribute rtlabel Ar label
.Xc
If set to
.Ic connected ,
routes to directly attached networks will be
announced over RIP.
If set to
.Ic static ,
static routes will be announced over RIP.
If set to
.Ic default ,
a default route pointing to this router will be announced over RIP.
It is possible to specify a network range with
.Ar prefix ;
networks need to be part of that range to be redistributed.
Additionally it is possible to redistribute based on route labels
using the
.Ic rtlabel
keyword.
By default no additional routes will be announced over RIP.
.Pp
.Ic redistribute
statements are evaluated in sequential order, from first to last.
The first matching rule decides if a route should be redistributed or not.
Matching rules starting with
.Ic no
will force the route to be not announced.
.Pp
.It Xo
.Ic split-horizon
.Sm off
.Po Ic simple Ns | Ns Ic poisoned Ns | Ns
.Ic none Pc
.Sm on
.Xc
If set to
.Ic simple ,
do not redistribute routes to the interface from which they were learned.
If set to
.Ic poisoned ,
redistribute routes to the interface from which they were learned, by
forcing the metric to infinity.
Both these behaviours can resolve routing loops when a router goes down.
The default is
.Ic poisoned .
.Pp
.It Xo
.Ic triggered-updates
.Pq Ic yes Ns | Ns Ic no
.Xc
Immediately trigger responses when a route changes.
The default is
.Ic no .
.El
.Sh INTERFACES
Each interface can have several parameters configured individually, otherwise
they are inherited.
.Bd -literal -offset indent
interface em0 {
	cost 9
	auth-type none
}
interface ix1
.Ed
.Pp
Interface-specific parameters are listed below.
.Bl -tag -width Ds
.It Ic auth-key Ar key
Set the authentication key for
.Ic simple
authentication.
Up to 16 characters can be specified.
.It Ic auth-md Ar key-id key
Set the authentication
.Ar key-id
and
.Ar key
for
.Ic crypt
authentication.
The valid range for
.Ar key-id
is 0\-255.
Up to 16 characters can be specified for
.Ar key .
Multiple keys may be specified.
.It Ic auth-md-keyid Ar key-id
Configure the
.Ar key-id
to use for
.Ic crypt
authentication.
The valid range for
.Ar key-id
is 0\-255.
The default key-id is 1.
.It Xo
.Ic auth-type
.Po Ic none Ns | Ns
.Ic simple Ns | Ns Ic crypt Pc
.Xc
Set the authentication type.
The default is
.Ic none .
Simple authentication uses a plaintext password, up to 16 characters.
Crypt authentication uses an MD5 hash.
.It Ic cost Ar number
Cost of the network connected through this interface.
Values must be between 1 and 16, inclusive.
.It Ic demote Ar group
Increase the
.Xr carp 4
demotion counter by 1 on the given interface group, usually
.Ar carp ,
when the interface state is going down.
The demotion counter will be decreased when the interface
state is active again.
.It Ic passive
Prevent transmission and reception of RIP packets on this interface.
.El
.Sh FILES
.Bl -tag -width /etc/examples/ripd.conf -compact
.It Pa /etc/ripd.conf
.Xr ripd 8
configuration file.
.It Pa /etc/examples/ripd.conf
Example configuration file.
.El
.Sh SEE ALSO
.Xr rc.conf.local 8 ,
.Xr ripctl 8 ,
.Xr ripd 8
.Sh HISTORY
The
.Nm
file format first appeared in
.Ox 4.1 .