1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
.\" $OpenBSD: ospfd.8,v 1.19 2007/10/14 12:27:35 krw Exp $
.\"
.\" Copyright (c) 2004, 2005, 2007 Esben Norby <norby@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: October 14 2007 $
.Dt OSPFD 8
.Os
.Sh NAME
.Nm ospfd
.Nd "Open Shortest Path First daemon"
.Sh SYNOPSIS
.Nm
.Op Fl dnv
.Op Fl f Ar file
.Sh DESCRIPTION
.Nm
is an Open Shortest Path First
.Pq OSPF
daemon which manages routing tables.
This implementation supports OSPF version 2, thus it is only capable of
maintaining IPv4 routing tables.
.Pp
OSPF is an interior gateway protocol designed to supersede RIP.
The OSPF daemon maintains a Link State Database
.Pq LSDB
consisting of routers and networks.
.Pp
Dijkstra's shortest path first algorithm is used to compute the Route
Information Base using the LSDB as input.
The Forwarding Information Base a.k.a. the kernel route table is updated
with information from the RIB.
.Pp
OSPF routers communicate via two multicast groups: 224.0.0.5 all Shortest
Path First routers and 224.0.0.6 all Designated Routers.
The IP protocol number 89 is reserved for OSPF, furthermore OSPF packets
omit the use of TCP and UDP.
.Pp
OSPF has several advantages over RIP.
For example every router has a complete network topology.
Response to changes in the network are faster.
Furthermore fail detection is much improved.
.Pp
All routers in an OSPF network spend most of their time keeping each others
LSDBs in sync.
All routers must have the same information in the LSDB at all times.
Every time the LSDB is updated the RIB is updated; if needed the FIB is
also updated.
.Pp
OSPF aware routers discover each other via OSPF hello packets.
.Pp
In a multiaccess network such as Ethernet it is unfeasible for all routers
to synchronize with all other routers in the network.
In such networks a Designated Router
.Pq DR
and a Backup Designated Router
.Pq BDR
is elected.
The DR's responsibility is to synchronize with all routers; the BDR will
not do much until the DR fails.
The first router in a network is automatically elected DR, the second
router BDR.
All routers have a FULL adjacency with the DR and the BDR.
A router not elected either DR or BDR will have 2-WAY adjacency with all
routers but the DR and BDR.
Routers that form 2-WAY adjacency recognize that they know each other.
In case a DR or BDR should fail another router is elected and all routers
change state on the newly elected router and synchronize to it.
.Pp
When routers are connected via point to point links, the DR and BDR
election is skipped since only two routers are connected.
.Pp
To limit the impact changes in the network have on the LSDB it is possible
to segement OSPF network into areas.
Area 0.0.0.0 a.k.a. the backbone area must always be present.
Routers can be configured as Area Border Router
.Pq ABR ,
being part of multiple areas.
Every area must have direct access to the backbone area.
ABRs not directly connected to the backbone area need to establish a
virtual link to a router in the backbone area.
Virtual links are currently not available in
.Nm .
.Pp
AS Border Routers
.Pq ASBR
are connected to an OSPF network and other external networks, BGP, RIP,
or statically routed.
.Pp
.Nm
is usually started at boot time, and can be enabled by
setting the following in
.Pa /etc/rc.conf.local :
.Pp
.Dl ospfd_flags=\&"\&"
.Pp
See
.Xr rc 8
and
.Xr rc.conf 8
for more information on the boot process
and enabling daemons.
.Pp
A running
.Nm
can be controlled with the
.Xr ospfctl 8
utility.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl d
Do not daemonize.
If this option is specified,
.Nm
will run in the foreground and log to
.Em stderr .
.It Fl f Ar file
Specify an alternative configuration file.
.It Fl n
Configtest mode.
Only check the configuration file for validity.
.It Fl v
Produce more verbose output.
.El
.Sh FILES
.Bl -tag -width "/var/run/ospfd.sockXX" -compact
.It /etc/ospfd.conf
Default
.Nm
configuration file.
.It /var/run/ospfd.sock
Unix-domain socket used for communication with
.Xr ospfctl 8 .
.El
.Sh SEE ALSO
.Xr ospfd.conf 5 ,
.Xr ospfctl 8
.Rs
.%R RFC 2328
.%T "OSPF Version 2"
.%D April 1998
.Re
.Rs
.%R RFC 3137
.%T "OSPF Stub Router Advertisement"
.%D June 2001
.Re
.Sh HISTORY
The
.Nm
program first appeared in
.Ox 3.7 .
|