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