xref: /openbsd/usr.sbin/ospf6d/ospf6d.conf.5 (revision a6445c1d)
1.\"	$OpenBSD: ospf6d.conf.5,v 1.11 2012/06/12 18:54:49 claudio Exp $
2.\"
3.\" Copyright (c) 2005 Esben Norby <norby@openbsd.org>
4.\" Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
5.\" Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
6.\" Copyright (c) 2002 Daniel Hartmeier <dhartmei@openbsd.org>
7.\"
8.\" Permission to use, copy, modify, and distribute this software for any
9.\" purpose with or without fee is hereby granted, provided that the above
10.\" copyright notice and this permission notice appear in all copies.
11.\"
12.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19.\"
20.Dd $Mdocdate: June 12 2012 $
21.Dt OSPF6D.CONF 5
22.Os
23.Sh NAME
24.Nm ospf6d.conf
25.Nd Open Shortest Path First daemon configuration file
26.Sh DESCRIPTION
27The
28.Xr ospf6d 8
29daemon implements the Open Shortest Path First protocol version 3 as described
30in RFC 5340.
31.Sh SECTIONS
32The
33.Nm
34config file is divided into three 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 Global Configuration
40Global settings for
41.Xr ospf6d 8 .
42A number of global settings can be overruled in specific areas or interfaces.
43.It Sy Areas
44An OSPF router must be a member of at least one area.
45Areas are used to group interfaces, simplifying configuration.
46.El
47.Pp
48Argument names not beginning with a letter, digit, or underscore
49must be quoted.
50.Pp
51Additional configuration files can be included with the
52.Ic include
53keyword, for example:
54.Bd -literal -offset indent
55include "/etc/ospf6d.sub.conf"
56.Ed
57.Sh MACROS
58Macros can be defined that will later be expanded in context.
59Macro names must start with a letter, digit, or underscore,
60and may contain any of those characters.
61Macro names may not be reserved words (for example,
62.Ic area ,
63.Ic interface ,
64or
65.Ic hello-interval ) .
66Macros are not expanded inside quotes.
67.Pp
68For example:
69.Bd -literal -offset indent
70hi="5"
71area 0.0.0.0 {
72	interface em0 {
73		hello-interval $hi
74	}
75}
76.Ed
77.Pp
78The same can be accomplished by specifying the hello-interval
79globally or within the area declaration.
80.Sh GLOBAL CONFIGURATION
81All interface related settings can be configured globally, per area and per
82interface.
83The only settings that can be set globally and not overruled are listed below.
84.Pp
85.Bl -tag -width Ds -compact
86.It Xo
87.Ic fib-update
88.Pq Ic yes Ns | Ns Ic no
89.Xc
90If set to
91.Ic \&no ,
92do not update the Forwarding Information Base, a.k.a. the kernel
93routing table.
94The default is
95.Ic yes .
96Setting
97.Ic fib-update
98to
99.Ic \&no
100will implicitly set the
101.Ic stub Ic router
102option to ensure that no traffic tries to transit via this router.
103.Pp
104.It Xo
105.Op Ic no
106.Ic redistribute
107.Sm off
108.Po Ic static Ns | Ns Ic connected Ns | Ns
109.Ic default Pc
110.Sm on
111.Op Ic set ...\&
112.Xc
113.It Xo
114.Op Ic no
115.Ic redistribute Ar prefix Op Ic set ...\&
116.Xc
117.It Xo
118.Op Ic no
119.Ic redistribute rtlabel Ar label Op Ic set ...\&
120.Xc
121If set to
122.Ic connected ,
123routes to directly attached networks will be announced over OSPF.
124If set to
125.Ic static ,
126static routes will be announced over OSPF.
127If set to
128.Ic default ,
129a default route pointing to this router will be announced over OSPF.
130It is possible to specify a network range with
131.Ar prefix ;
132networks need to be part of that range to be redistributed.
133Additionally it is possible to redistribute based on route labels
134using the
135.Ic rtlabel
136keyword.
137By default no additional routes will be announced over OSPF.
138.Pp
139.Ic redistribute
140statements are evaluated in sequential order, from first to last.
141The first matching rule decides if a route should be redistributed or not.
142Matching rules starting with
143.Ic no
144will force the route to be not announced.
145The only exception is
146.Ic default ,
147which will be set no matter what, and additionally
148.Ic no
149cannot be used together with it.
150.Pp
151It is possible to set the route
152.Ic metric
153and
154.Ic type
155for each redistribute rule.
156.Ic type
157is either 1 or 2.
158The default value for
159.Ic type
160is 1 and for
161.Ic metric
162is 100.
163Setting more than one option needs curly brackets:
164.Bd -literal -offset indent
165redistribute static set { metric 300 type 2 }
166.Ed
167.Pp
168.It Ic router-id Ar address
169Set the router ID; if not specified, the lowest IPv4 address of
170the interfaces used by
171.Xr ospf6d 8
172will be used.
173A router ID must be specified if no IPv4 address is configured on
174any interfaces used by
175.Xr ospf6d 8 .
176.Pp
177.It Ic rtlabel Ar label Ic external-tag Ar number
178Map route labels to external route tags and vice versa.
179The external route tag is a non-negative 32-bit number attached to
180AS-external OSPF LSAs.
181.Pp
182.It Ic spf-delay Ar seconds
183Set SPF delay in seconds.
184The delay between receiving an update to the link
185state database and starting the shortest path first calculation.
186The default value is 1; valid range is 1\-10 seconds.
187.Pp
188.It Ic spf-holdtime Ar seconds
189Set the SPF holdtime in seconds.
190The minimum time between two consecutive
191shortest path first calculations.
192The default value is 5 seconds; the valid range is 1\-5 seconds.
193.Pp
194.It Xo
195.Ic stub Ic router
196.Pq Ic yes Ns | Ns Ic no
197.Xc
198If set to
199.Ic yes ,
200all interfaces with active neighbors will have a metric of infinity.
201This ensures that the other routers prefer routes around this router while
202still being able to reach directly connected IP prefixes.
203The
204.Ic stub Ic router
205option is automatically enabled if either the
206.Xr sysctl 8
207variable
208.Va net.inet.ip.forwarding
209is set to a value different to 1 or if the FIB is not coupled.
210.El
211.Sh AREAS
212Areas are used for grouping interfaces.
213All interface-specific parameters can
214be configured per area, overruling the global settings.
215.Bl -tag -width Ds
216.It Ic area Ar address
217Specify an area section, grouping one or more interfaces.
218.Bd -literal -offset indent
219area 0.0.0.0 {
220	interface em0
221	interface em1 {
222		metric 10
223	}
224}
225.Ed
226.El
227.Pp
228Area specific parameters are listed below.
229.Bl -tag -width Ds
230.It Ic demote Ar group Op Ar count
231Increase the
232.Xr carp 4
233demotion counter by
234.Ar count
235on the given interface group, usually
236.Ar carp ,
237when no neighbor in the area is in an active state.
238The demotion counter will be decreased when one neighbor in that
239area is in an active state.
240The default value for
241.Ar count
242is 1.
243.Pp
244For more information on interface groups,
245see the
246.Ic group
247keyword in
248.Xr ifconfig 8 .
249.El
250.Sh INTERFACES
251Each interface can have several parameters configured individually, otherwise
252they are inherited.
253An interface is specified by its name.
254.Bd -literal -offset indent
255interface em0 {
256	...
257}
258.Ed
259.Pp
260Interface-specific parameters are listed below.
261.Bl -tag -width Ds
262.It Ic demote Ar group
263Increase the
264.Xr carp 4
265demotion counter by 1 on the given interface group, usually
266.Ar carp ,
267when the interface state is going down.
268The demotion counter will be decreased when the interface
269state is active again.
270.It Ic hello-interval Ar seconds
271Set the hello interval.
272The default value is 10; valid range is 1\-65535 seconds.
273.It Ic metric Ar cost
274Set the interface metric a.k.a. cost.
275The default value is 10; valid range is 1\-65535.
276.It Ic passive
277Prevent transmission and reception of OSPF packets on this interface.
278The specified interface will be announced as a stub network.
279.It Ic retransmit-interval Ar seconds
280Set retransmit interval.
281The default value is 5 seconds; valid range is 5\-3600 seconds.
282.It Ic router-dead-time Ar seconds
283Set the router dead time, a.k.a. neighbor inactivity timer.
284The default value is 40 seconds; valid range is 2\-65535 seconds.
285When a neighbor has been
286inactive for router-dead-time its state is set to DOWN.
287Neighbors
288that have been inactive for more than 24 hours are completely removed.
289.It Ic router-priority Ar priority
290Set the router priority.
291The default value is 1; valid range is 0\-255.
292If set
293to 0 the router is not eligible as a Designated Router or Backup Designated
294Router.
295.It Ic transmit-delay Ar seconds
296Set the transmit delay.
297The default value is 1; valid range is 1\-3600 seconds.
298.El
299.Sh FILES
300.Bl -tag -width "/etc/ospf6d.conf" -compact
301.It Pa /etc/ospf6d.conf
302.Xr ospf6d 8
303configuration file
304.El
305.Sh SEE ALSO
306.Xr ospf6ctl 8 ,
307.Xr ospf6d 8 ,
308.Xr rc.conf.local 8
309.Sh HISTORY
310The
311.Nm
312file format first appeared in
313.Ox 4.2 .
314