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