Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
OSPFD.CONF(5)		  FreeBSD File Formats Manual		 OSPFD.CONF(5)

     ospfd.conf	-- Open	Shortest Path First daemon configuration file

     The ospfd(8) daemon implements the	Open Shortest Path First protocol ver-
     sion 2 as described in RFC	2328.

     The ospfd.conf config file	is divided into	the following main sections:

	   User-defined	variables may be defined and used later, simplifying
	   the configuration file.

     Global Configuration
	   Global settings for ospfd(8).  A number of global settings can be
	   overruled in	specific areas or interfaces.

	   An OSPF router must be a member of at least one area.  Areas	are
	   used	to group interfaces, simplifying configuration.

     Argument names not	beginning with a letter, digit,	or underscore must be

     Additional	configuration files can	be included with the include keyword,
     for example:

	   include "/etc/ospfd.sub.conf"

     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,
     area, interface, or hello-interval).  Macros are not expanded inside

     For example:

	   area	{
		   interface em0 {
			   hello-interval $hi

     The same can be accomplished by specifying	the hello-interval globally or
     within the	area declaration.

     All interface related settings can	be configured globally,	per area and
     per interface.  The only settings that can	be set globally	and not	over-
     ruled are listed below.

     fib-priority prio
	     Set the routing priority to prio.	The default is 32.

     fib-update	(yes|no)
	     If	set to no, do not update the Forwarding	Information Base,
	     a.k.a. the	kernel routing table.  The default is yes.  Setting
	     fib-update	to no will implicitly set the stub router option to
	     ensure that no traffic tries to transit via this router.

     rdomain tableid
	     Specifies the routing table ospfd(8) should modify.  Table	0 is
	     the default table.

     [no] redistribute (static|connected|default) [set ...]
	     [depend on	interface]
     [no] redistribute prefix [set ...]	[depend	on interface]
     [no] redistribute rtlabel label [set ...] [depend on interface]
	     If	set to connected, routes to directly attached networks will be
	     announced over OSPF.  If set to static, static routes will	be an-
	     nounced over OSPF.	 If set	to default, a default route pointing
	     to	this router will be announced over OSPF.  It is	possible to
	     specify a network range with prefix; networks need	to be part of
	     that range	to be redistributed.  Additionally it is possible to
	     redistribute based	on route labels	using the rtlabel keyword.  By
	     default no	additional routes will be announced over OSPF.

	     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 no will
	     force the route to	be not announced.  The only exception is
	     default, which will be set	no matter what,	and additionally no
	     cannot be used together with it.

	     With the depend on	option,	redistributed routes will have a met-
	     ric of 65535 if the specified interface is	down or	in state
	     backup.  This is especially useful	on a carp cluster to ensure
	     all traffic goes to the carp master.

	     It	is possible to set the route metric and	type for each redis-
	     tribute rule.  type is either 1 or	2.  The	default	value for type
	     is	1 and for metric is 100.  Setting more than one	option needs
	     curly brackets:

		   redistribute	static set { metric 300	type 2 }

	     The use of	redistribute prefix | rtlabel can result in higher CPU
	     usage, since ospfd(8) will	need to	process	more route updates.

     rfc1583compat (yes|no)
	     If	set to yes, decisions regarding	AS-external routes are evalu-
	     ated according to RFC 2328.  The default is no.

     router-id address
	     Set the router ID;	if not specified, the numerically lowest IP
	     address of	the router will	be used.

     rtlabel label external-tag	number
	     Map route labels to external route	tags and vice versa.  The ex-
	     ternal route tag is a non-negative	32-bit number attached to AS-
	     external OSPF LSAs.

     spf-delay (seconds|msec milliseconds)
	     Set the SPF delay.	 The delay between receiving an	update to the
	     link state	database and starting the shortest path	first calcula-
	     tion.  The	default	value is 1 second; valid range is 10 millisec-
	     onds-10 seconds.

     spf-holdtime (seconds|msec	milliseconds)
	     Set the SPF holdtime.  The	minimum	time between two consecutive
	     shortest path first calculations.	The default value is 5 sec-
	     onds; the valid range is 10 milliseconds-5	seconds.

     stub router (yes|no)
	     If	set to yes, all	interfaces with	active neighbors will have a
	     metric of infinity.  This ensures that the	other routers prefer
	     routes around this	router while still being able to reach di-
	     rectly connected IP prefixes.  The	stub router option is automat-
	     ically enabled if either the sysctl(8) variable
	     net.inet.ip.forwarding is set to a	value other than 1 or if the
	     FIB is not	coupled.

     Areas are used for	grouping interfaces.  All interface-specific parame-
     ters can be configured per	area, overruling the global settings.  These
     interface-specific	parameters need	to be defined before the interfaces.

     area id | address
	     Specify an	area section, grouping one or more interfaces.

		   area	{
			   hello-interval 3
			   interface em0
			   interface em1 {
				   metric 10

     Area specific parameters are listed below.

     demote group [count]
	     Increase the carp(4) demotion counter by count on the given in-
	     terface group, usually carp, when no neighbor in the area is in
	     an	active state.  The demotion counter will be decreased when one
	     neighbor in that area is in an active state.  The default value
	     for count is 1.

	     For more information on interface groups, see the group keyword
	     in	ifconfig(8).

     stub [redistribute	default] [set ...]
	     Mark the area as stub.  Stub areas	will not be flooded by as-ext
	     LSA, resulting in smaller routing tables.	Area border routers
	     should redistribute a default network LSA;	this can be enabled by
	     specifying	the default redistribute option.  A default summary
	     LSA will only be redistributed if the router has an active	con-
	     nection to	the backbone area

     Each interface can	have several parameters	configured individually, oth-
     erwise they are inherited.	 An interface is specified by its name.	 If
     multiple networks are configured an additional IP address can be sup-
     plied.  By	default	the first IP address is	used.

	   interface em0 {
		   auth-type crypt
		   auth-md 1 "yotVoo_Heypp"
		   auth-md-keyid 1
	   interface fxp0:

     Interface-specific	parameters are listed below.

     auth-key key
	     Set the authentication key	for simple authentication.  Up to 8
	     characters	can be specified.

     auth-md key-id key
	     Set the authentication key-id and key for crypt authentication.
	     The valid range for key-id	is 0-255.  Up to 16 characters can be
	     specified for key.	 Multiple keys may be specified.

     auth-md-keyid key-id
	     Configure the key-id to use for crypt authentication.  The	valid
	     range for key-id is 0-255.	 The default key-id is 1.  While key-
	     id	0 is valid, it is unavailable on various other implementa-

     auth-type (none|simple|crypt)
	     Set the authentication type.  The default is none.	 Simple	au-
	     thentication uses a plaintext password, up	to 8 characters.
	     Crypt authentication uses an MD5 hash.

     demote group
	     Increase the carp(4) demotion counter by 1	on the given interface
	     group, usually carp, when the interface state is going down.  The
	     demotion counter will be decreased	when the interface state is
	     active again.

     depend on interface
	     A metric of 65535 is used if the specified	interface is down or
	     in	status backup.

     fast-hello-interval msec milliseconds
	     If	the interface is configured to use router-dead-time minimal,
	     hello packets will	be sent	using this timer.  The default value
	     is	333; valid range is 50-333 milliseconds.

     hello-interval seconds
	     Set the hello interval.  The default value	is 10; valid range is
	     1-65535 seconds.

     metric cost
	     Set the interface metric a.k.a. cost.  The	default	value is 10;
	     valid range is 1-65535.  A	metric of 65535	is used	for carp(4)
	     interfaces	with status backup.

	     Prevent transmission and reception	of OSPF	packets	on this	inter-
	     face.  The	specified interface will be announced as a stub	net-
	     work.  Passive mode is enforced for carp(4) interfaces.

     retransmit-interval seconds
	     Set retransmit interval.  The default value is 5 seconds; valid
	     range is 5-3600 seconds.

     router-dead-time (seconds|minimal)
	     Set the router dead time, a.k.a. neighbor inactivity timer.  The
	     default value is 40 seconds; valid	range is 2-2147483647 seconds.
	     If	the router dead	time has been set to minimal, the timer	is set
	     to	1 second and hello packets are sent using the interval speci-
	     fied by fast-hello-interval.  When	a neighbor has been inactive
	     for router-dead-time its state is set to DOWN.  Neighbors that
	     have been inactive	for more than 24 hours are completely removed.

     router-priority priority
	     Set the router priority.  The default value is 1; valid range is
	     0-255.  If	set to 0 the router is not eligible as a Designated
	     Router or Backup Designated Router.

     transmit-delay seconds
	     Set the transmit delay.  The default value	is 1; valid range is
	     1-3600 seconds.

     type p2p
	     Set the interface type to point to	point.	This disables the
	     election of a DR and BDR for the given interface.

     /etc/ospfd.conf	       ospfd(8)	configuration file.
     /etc/examples/ospfd.conf  Example configuration file.

     ospfctl(8), ospfd(8), rc.conf.local(8)

     The ospfd.conf file format	first appeared in OpenBSD 3.7.

FreeBSD	13.0			 May 16, 2020			  FreeBSD 13.0


Want to link to this manual page? Use this URL:

home | help