NAME
ospf6d.conf —
OSPF for IPv6 routing daemon
configuration file
DESCRIPTION
The ospf6d(8) daemon implements the Open Shortest Path First protocol version 3 as described in RFC 5340.
The ospf6d.conf config file is divided
into the following main sections:
- Macros
- Definitions of variables that can be used later, simplifying the configuration file.
- Global configuration
- Global settings for ospf6d(8). A number of global settings can be overruled in specific areas or interfaces.
- Areas
- 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 quoted.
Additional configuration files can be included with the
include keyword, for example:
include "/etc/ospf6d.sub.conf"
Macros
A macro is defined with a command of the form
name=value. The macro
name can contain letters, digits, and underscores and
cannot be a reserved word (for example, area,
interface, or
hello-interval). Within unquoted arguments, the
string $name is later expanded to
value.
For example:
hi="5"
area 0.0.0.0 {
interface em0 {
hello-interval $hi
}
}
The same can be accomplished by specifying the hello-interval globally or within the area declaration.
Global configuration
All interface related settings can be configured globally, per area and per interface. The only settings that can be set globally and not overruled are listed below.
fib-priorityprio- 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 isyes. Settingfib-updatetonowill implicitly set thestub routeroption to ensure that no traffic tries to transit via this router. rdomaintableid- Specifies the routing table ospfd(8) should modify. Table 0 is the default table.
- [
no]redistribute(static|connected|default) [set ...] [depend oninterface] - [
no]redistributeprefix [set ...] [depend oninterface] - [
no]redistribute rtlabellabel [set ...] [depend oninterface] - If set to
connected, routes to directly attached networks will be announced over OSPF. If set tostatic, static routes will be announced over OSPF. If set todefault, 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 thertlabelkeyword. By default no additional routes will be announced over OSPF.redistributestatements 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 withnowill force the route to be not announced. The only exception isdefault, which will be set no matter what, and additionallynocannot be used together with it.With the
depend onoption, redistributed routes will have a metric 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
metricandtypefor each redistribute rule.typeis either 1 or 2. The default value fortypeis 1 and formetricis 100. Setting more than one option needs curly brackets:redistribute static set { metric 300 type 2 } router-idaddress- Set the router ID; if not specified, the lowest IPv4 address of the interfaces used by ospf6d(8) will be used. A router ID must be specified if no IPv4 address is configured on any interfaces used by ospf6d(8).
rtlabellabelexternal-tagnumber- Map route labels to external route tags and vice versa. The external route tag is a non-negative 32-bit number attached to AS-external OSPF LSAs.
spf-delayseconds- Set SPF delay in seconds. The delay between receiving an update to the link state database and starting the shortest path first calculation. The default value is 1; valid range is 1-10 seconds.
spf-holdtimeseconds- Set the SPF holdtime in seconds. The minimum time between two consecutive shortest path first calculations. The default value is 5 seconds; the valid range is 1-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 directly connected IP prefixes. Thestub routeroption is automatically enabled if either the sysctl(8) variable net.inet6.ip6.forwarding is set to a value different to 1 or if the FIB is not coupled.
Areas
Areas are used for grouping interfaces. All interface-specific parameters can be configured per area, overruling the global settings. These interface-specific parameters need to be defined before the interfaces.
areaaddress|id- Specify an area section, grouping one or more interfaces.
area 0.0.0.0 { hello-interval 3 interface em0 interface em1 { metric 10 } }
Area specific parameters are listed below.
demotegroup [count]- Increase the carp(4)
demotion counter by count on the given interface
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
groupkeyword in ifconfig(8).
Interfaces
Each interface can have several parameters configured individually, otherwise they are inherited. An interface is specified by its name.
interface em0 {
...
}
Interface-specific parameters are listed below.
demotegroup- 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 oninterface- A metric of 65535 is used if the specified interface is down or in status backup.
hello-intervalseconds- Set the hello interval. The default value is 10; valid range is 1-65535 seconds.
metriccost- 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.
passive- Prevent transmission and reception of OSPF packets on this interface. The specified interface will be announced as a stub network. Passive mode is enforced for carp(4) interfaces.
retransmit-intervalseconds- Set retransmit interval. The default value is 5 seconds; valid range is 5-3600 seconds.
router-dead-timeseconds- Set the router dead time, a.k.a. neighbor inactivity timer. The default value is 40 seconds; valid range is 2-65535 seconds. 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-prioritypriority- 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-delayseconds- 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.
FILES
- /etc/ospf6d.conf
- ospf6d(8) configuration file.
- /etc/examples/ospf6d.conf
- Example configuration file.
SEE ALSO
HISTORY
The ospf6d.conf file format first appeared
in OpenBSD 4.2.