man.openbsd.org/ospf6d.conf.5
ospf6d.conf —
Open Shortest Path First daemon configuration file
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 three main sections.
-
-
- Macros
- User-defined variables may be defined and 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 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 quotes.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.
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-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.
- [no]
redistribute (static|connected|default) [set ...]
-
- [no]
redistribute prefix [set ...]
-
- [no]
redistribute rtlabel
label [set ...]
- If set to connected, routes to directly attached networks will be announced over OSPF. If set to
static, static routes will be announced 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. It is possible to set the route
metric and type for each redistribute 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 }
- router-id
address
- 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).
- rtlabel
label external-tag
number
- 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-delay
seconds
- 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-holdtime
seconds
- 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. The stub router option 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 are used for grouping interfaces. All interface-specific parameters can be configured per area, overruling the global settings.
-
-
- area
address
- Specify an area section, grouping one or more interfaces.
area 0.0.0.0 {
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 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
group keyword in
ifconfig(8).
Each interface can have several parameters configured individually, otherwise they are inherited. An interface is specified by its name.
Interface-specific parameters are listed below.
-
-
- 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.
-
-
- 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.
-
-
- passive
- Prevent transmission and reception of OSPF packets on this interface. The specified interface will be announced as a stub network.
-
-
- retransmit-interval
seconds
- Set retransmit interval. The default value is 5 seconds; valid range is 5-3600 seconds.
-
-
- router-dead-time
seconds
- 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-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.
-
/etc/ospf6d.conf
- ospf6d(8) configuration file
ospf6ctl(8),
ospf6d(8),
rc.conf.local(8)
The
ospf6d.conf file format first appeared in
OpenBSD 4.2.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通