xref: /openbsd/usr.sbin/ripd/ripd.conf.5 (revision d415bd75)
1.\"	$OpenBSD: ripd.conf.5,v 1.21 2023/03/02 17:09:54 jmc Exp $
2.\"
3.\" Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
4.\" Copyright (c) 2005, 2006 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: March 2 2023 $
22.Dt RIPD.CONF 5
23.Os
24.Sh NAME
25.Nm ripd.conf
26.Nd RIP routing daemon configuration file
27.Sh DESCRIPTION
28The
29.Xr ripd 8
30daemon implements the Routing Information Protocol version 2 as described
31in RFC 2453.
32.Pp
33The
34.Nm
35config file is divided into the following main sections:
36.Bl -tag -width xxxx
37.It Sy Macros
38User-defined variables may be defined and used later, simplifying the
39configuration file.
40.It Sy Global Configuration
41Global settings for
42.Xr ripd 8 .
43.It Sy Interfaces Configuration
44Interface-specific parameters.
45.El
46.Sh MACROS
47Much like
48.Xr cpp 1
49or
50.Xr m4 1 ,
51macros can be defined that will later be expanded in context.
52Macro names must start with a letter, digit, or underscore,
53and may contain any of those characters.
54Macro names may not be reserved words (for example,
55.Ic cost ) .
56Macros are not expanded inside quotes.
57.Pp
58For example:
59.Bd -literal -offset indent
60hi="2"
61interface em0 {
62	cost $hi
63}
64.Ed
65.Sh GLOBAL CONFIGURATION
66Global settings concerns the main behaviour of the daemon.
67.Pp
68.Bl -tag -width Ds -compact
69.It Ic fib-priority Ar prio
70Set the routing priority to
71.Ar prio .
72The default is 40.
73.Pp
74.It Xo
75.Ic fib-update
76.Pq Ic yes Ns | Ns Ic no
77.Xc
78If set to
79.Ic no ,
80do not update the Forwarding Information Base, a.k.a. the kernel routing
81table.
82The default is
83.Ic yes .
84.Pp
85.It Ic rdomain Ar tableid
86Specifies the routing table
87.Xr ripd 8
88should modify.
89Table 0 is the default table.
90.Pp
91.It Xo
92.Op Ic no
93.Ic redistribute
94.Sm off
95.Po Ic static Ns | Ns Ic connected Ns | Ns
96.Ic default Pc
97.Sm on
98.Xc
99.It Xo
100.Op Ic no
101.Ic redistribute Ar prefix
102.Xc
103.It Xo
104.Op Ic no
105.Ic redistribute rtlabel Ar label
106.Xc
107If set to
108.Ic connected ,
109routes to directly attached networks will be
110announced over RIP.
111If set to
112.Ic static ,
113static routes will be announced over RIP.
114If set to
115.Ic default ,
116a default route pointing to this router will be announced over RIP.
117It is possible to specify a network range with
118.Ar prefix ;
119networks need to be part of that range to be redistributed.
120Additionally it is possible to redistribute based on route labels
121using the
122.Ic rtlabel
123keyword.
124By default no additional routes will be announced over RIP.
125.Pp
126.Ic redistribute
127statements are evaluated in sequential order, from first to last.
128The first matching rule decides if a route should be redistributed or not.
129Matching rules starting with
130.Ic no
131will force the route to be not announced.
132.Pp
133.It Xo
134.Ic split-horizon
135.Sm off
136.Po Ic simple Ns | Ns Ic poisoned Ns | Ns
137.Ic none Pc
138.Sm on
139.Xc
140If set to
141.Ic simple ,
142do not redistribute routes to the interface from which they were learned.
143If set to
144.Ic poisoned ,
145redistribute routes to the interface from which they were learned, by
146forcing the metric to infinity.
147Both these behaviours can resolve routing loops when a router goes down.
148The default is
149.Ic poisoned .
150.Pp
151.It Xo
152.Ic triggered-updates
153.Pq Ic yes Ns | Ns Ic no
154.Xc
155Immediately trigger responses when a route changes.
156The default is
157.Ic no .
158.El
159.Sh INTERFACES
160Each interface can have several parameters configured individually, otherwise
161they are inherited.
162.Bd -literal -offset indent
163interface em0 {
164	cost 9
165	auth-type none
166}
167interface ix1
168.Ed
169.Pp
170Interface-specific parameters are listed below.
171.Bl -tag -width Ds
172.It Ic auth-key Ar key
173Set the authentication key for
174.Ic simple
175authentication.
176Up to 16 characters can be specified.
177.It Ic auth-md Ar key-id key
178Set the authentication
179.Ar key-id
180and
181.Ar key
182for
183.Ic crypt
184authentication.
185The valid range for
186.Ar key-id
187is 0\-255.
188Up to 16 characters can be specified for
189.Ar key .
190Multiple keys may be specified.
191.It Ic auth-md-keyid Ar key-id
192Configure the
193.Ar key-id
194to use for
195.Ic crypt
196authentication.
197The valid range for
198.Ar key-id
199is 0\-255.
200The default key-id is 1.
201.It Xo
202.Ic auth-type
203.Po Ic none Ns | Ns
204.Ic simple Ns | Ns Ic crypt Pc
205.Xc
206Set the authentication type.
207The default is
208.Ic none .
209Simple authentication uses a plaintext password, up to 16 characters.
210Crypt authentication uses an MD5 hash.
211.It Ic cost Ar number
212Cost of the network connected through this interface.
213Values must be between 1 and 16, inclusive.
214.It Ic demote Ar group
215Increase the
216.Xr carp 4
217demotion counter by 1 on the given interface group, usually
218.Ar carp ,
219when the interface state is going down.
220The demotion counter will be decreased when the interface
221state is active again.
222.It Ic passive
223Prevent transmission and reception of RIP packets on this interface.
224.El
225.Sh FILES
226.Bl -tag -width /etc/examples/ripd.conf -compact
227.It Pa /etc/ripd.conf
228.Xr ripd 8
229configuration file.
230.It Pa /etc/examples/ripd.conf
231Example configuration file.
232.El
233.Sh SEE ALSO
234.Xr rc.conf.local 8 ,
235.Xr ripctl 8 ,
236.Xr ripd 8
237.Sh HISTORY
238The
239.Nm
240file format first appeared in
241.Ox 4.1 .
242