xref: /openbsd/usr.sbin/ospf6d/ospf6d.conf.5 (revision 404b540a)
1.\"	$OpenBSD: ospf6d.conf.5,v 1.5 2009/01/27 05:58:03 jmc 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: January 27 2009 $
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 2740.
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.Sh MACROS
48Macros can be defined that will later be expanded in context.
49Macro names must start with a letter, and may contain letters, digits,
50and underscores.
51Macro names may not be reserved words (for example,
52.Ic area ,
53.Ic interface ,
54or
55.Ic hello-interval ) .
56Macros are not expanded inside quotes.
57.Pp
58For example:
59.Bd -literal -offset indent
60hi="5"
61area 0.0.0.0 {
62	interface em0 {
63		hello-interval $hi
64	}
65}
66.Ed
67.Pp
68The same can be accomplished by specifying the hello-interval
69globally or within the area declaration.
70.Sh GLOBAL CONFIGURATION
71All interface related settings can be configured globally, per area and per
72interface.
73The only settings that can be set globally and not overruled are listed below.
74.Pp
75.Bl -tag -width Ds -compact
76.It Xo
77.Ic fib-update
78.Pq Ic yes Ns \&| Ns Ic no
79.Xc
80If set to
81.Ic \&no ,
82do not update the Forwarding Information Base, a.k.a. the kernel
83routing table.
84The default is
85.Ic yes .
86Setting
87.Ic fib-update
88to
89.Ic \&no
90will implicitly set the
91.Ic stub Ic router
92option to ensure that no traffic tries to transit via this router.
93.Pp
94.It Xo
95.Op Ic no
96.Ic redistribute
97.Sm off
98.Po Ic static Ns \&| Ns Ic connected Ns \&| Ns
99.Ic default Pc
100.Sm on
101.Op Ic set ...\&
102.Xc
103.It Xo
104.Op Ic no
105.Ic redistribute Ar prefix Op Ic set ...\&
106.Xc
107.It Xo
108.Op Ic no
109.Ic redistribute rtlabel Ar label Op Ic set ...\&
110.Xc
111If set to
112.Ic connected ,
113routes to directly attached networks will be announced over OSPF.
114If set to
115.Ic static ,
116static routes will be announced over OSPF.
117If set to
118.Ic default ,
119a default route pointing to this router will be announced over OSPF.
120It is possible to specify a network range with
121.Ar prefix ;
122networks need to be part of that range to be redistributed.
123Additionally it is possible to redistribute based on route labels
124using the
125.Ic rtlabel
126keyword.
127By default no additional routes will be announced over OSPF.
128.Pp
129.Ic redistribute
130statements are evaluated in sequential order, from first to last.
131The first matching rule decides if a route should be redistributed or not.
132Matching rules starting with
133.Ic no
134will force the route to be not announced.
135The only exception is
136.Ic default ,
137which will be set no matter what, and additionally
138.Ic no
139cannot be used together with it.
140.Pp
141It is possible to set the route
142.Ic metric
143and
144.Ic type
145for each redistribute rule.
146.Ic type
147is either 1 or 2.
148The default value for
149.Ic type
150is 1 and for
151.Ic metric
152is 100.
153Setting more then one option needs curly brackets:
154.Bd -literal -offset indent
155redistribute static set { metric 300 type 2 }
156.Ed
157.Pp
158.It Xo
159.Ic rfc1583compat
160.Pq Ic yes Ns \&| Ns Ic no
161.Xc
162If set to
163.Ic yes ,
164decisions regarding AS-external routes are evaluated according to RFC 1583.
165The default is
166.Ic no .
167.Pp
168.It Ic router-id Ar address
169Set the router ID; if not specified, the lowest IPv4 address of the router
170will be used.
171A router ID must be specified on IPv6-only routers.
172.Pp
173.It Ic rtlabel Ar label Ic external-tag Ar number
174Map route labels to external route tags and vice versa.
175The external route tag is a non-negative 32-bit number attached to
176AS-external OSPF LSAs.
177.Pp
178.It Ic spf-delay Ar seconds
179Set SPF delay in seconds.
180The delay between receiving an update to the link
181state database and starting the shortest path first calculation.
182The default value is 1; valid range is 1\-10 seconds.
183.Pp
184.It Ic spf-holdtime Ar seconds
185Set the SPF holdtime in seconds.
186The minimum time between two consecutive
187shortest path first calculations.
188The default value is 5 seconds; the valid range is 1\-5 seconds.
189.Pp
190.It Xo
191.Ic stub Ic router
192.Pq Ic yes Ns \&| Ns Ic no
193.Xc
194If set to
195.Ic yes ,
196all interfaces with active neighbors will have a metric of infinity.
197This ensures that the other routers prefer routes around this router while
198still being able to reach directly connected IP prefixes.
199The
200.Ic stub Ic router
201option is automatically enabled if either the
202.Xr sysctl 8
203variable
204.Va net.inet.ip.forwarding
205is set to a value different to 1 or if the FIB is not coupled.
206.El
207.Sh AREAS
208Areas are used for grouping interfaces.
209All interface-specific parameters can
210be configured per area, overruling the global settings.
211.Bl -tag -width Ds
212.It Ic area Ar address
213Specify an area section, grouping one or more interfaces.
214.Bd -literal -offset indent
215area 0.0.0.0 {
216	interface em0
217	interface em1 {
218		metric 10
219	}
220}
221.Ed
222.El
223.Pp
224Area specific parameters are listed below.
225.Bl -tag -width Ds
226.It Ic demote Ar group Op Ar count
227Increase the
228.Xr carp 4
229demotion counter by
230.Ar count
231on the given interface group, usually
232.Ar carp ,
233when no neighbor in the area is in an active state.
234The demotion counter will be decreased when one neighbor in that
235area is in an active state.
236The default value for
237.Ar count
238is 1.
239.Pp
240For more information on interface groups,
241see the
242.Ic group
243keyword in
244.Xr ifconfig 8 .
245.El
246.Sh INTERFACES
247Each interface can have several parameters configured individually, otherwise
248they are inherited.
249An interface is specified by its name.
250If multiple networks are configured an additional IP address can be supplied.
251By default the first IP address is used.
252.Bd -literal -offset indent
253interface em0 {
254	...
255}
256interface fxp0:192.168.1.3
257.Ed
258.Pp
259Interface-specific parameters are listed below.
260.Bl -tag -width Ds
261.It Ic demote Ar group
262Increase the
263.Xr carp 4
264demotion counter by 1 on the given interface group, usually
265.Ar carp ,
266when the interface state is going down.
267The demotion counter will be decreased when the interface
268state is active again.
269.It Ic hello-interval Ar seconds
270Set the hello interval.
271The default value is 10; valid range is 1\-65535 seconds.
272.It Ic metric Ar cost
273Set the interface metric a.k.a. cost.
274The default value is 10; valid range is 1\-65535.
275.It Ic passive
276Prevent transmission and reception of OSPF packets on this interface.
277The specified interface will be announced as a stub network.
278.It Ic retransmit-interval Ar seconds
279Set retransmit interval.
280The default value is 5 seconds; valid range is 5\-3600 seconds.
281.It Ic router-dead-time Ar seconds
282Set the router dead time, a.k.a. neighbor inactivity timer.
283The default value is 40 seconds; valid range is 2\-2147483647 seconds.
284When a neighbor has been
285inactive for router-dead-time its state is set to DOWN.
286Neighbors
287that have been inactive for more than 24 hours are completely removed.
288.It Ic router-priority Ar priority
289Set the router priority.
290The default value is 1; valid range is 0\-255.
291If set
292to 0 the router is not eligible as a Designated Router or Backup Designated
293Router.
294.It Ic transmit-delay Ar seconds
295Set the transmit delay.
296The default value is 1; valid range is 1\-3600 seconds.
297.El
298.Sh FILES
299.Bl -tag -width "/etc/ospf6d.conf" -compact
300.It Pa /etc/ospf6d.conf
301.Xr ospf6d 8
302configuration file
303.El
304.Sh SEE ALSO
305.Xr ospf6ctl 8 ,
306.Xr ospf6d 8 ,
307.Xr rc.conf.local 8
308.Sh HISTORY
309The
310.Nm
311file format first appeared in
312.Ox 4.2 .
313