blob: c859782e58916644cae3806b62cd427d0c803731 [file] [log] [blame]
paul76b89b42004-11-06 17:13:09 +00001@node OSPFv2
paul718e3742002-12-13 20:15:29 +00002@chapter OSPFv2
3
paule5b308d2005-10-29 20:19:49 +00004@acronym{OSPF,Open Shortest Path First} version 2 is a routing protocol
5which is described in @cite{RFC2328, OSPF Version 2}. OSPF is an
6@acronym{IGP,Interior Gateway Protocol}@.. Compared with @acronym{RIP},
7@acronym{OSPF} can provide scalable network support and faster
8convergence times. OSPF is widely used in large networks such as
9@acronym{ISP,Internet Service Provider} backbone and enterprise
10networks.
paul718e3742002-12-13 20:15:29 +000011
12@menu
13* Configuring ospfd::
14* OSPF router::
15* OSPF area::
16* OSPF interface::
17* Redistribute routes to OSPF::
18* Showing OSPF information::
19* Debugging OSPF::
paule5b308d2005-10-29 20:19:49 +000020* OSPF Configuration Examples::
paul718e3742002-12-13 20:15:29 +000021@end menu
22
paul76b89b42004-11-06 17:13:09 +000023@node Configuring ospfd
paul718e3742002-12-13 20:15:29 +000024@section Configuring ospfd
25
paule5b308d2005-10-29 20:19:49 +000026There are no @command{ospfd} specific options. Common options can be
paul718e3742002-12-13 20:15:29 +000027specified (@pxref{Common Invocation Options}) to @command{ospfd}.
paule5b308d2005-10-29 20:19:49 +000028@command{ospfd} needs to acquire interface information from
29@command{zebra} in order to function. Therefore @command{zebra} must be
30running before invoking @command{ospfd}. Also, if @command{zebra} is
31restarted then @command{ospfd} must be too.
paul718e3742002-12-13 20:15:29 +000032
paule5b308d2005-10-29 20:19:49 +000033Like other daemons, @command{ospfd} configuration is done in @acronym{OSPF}
paul718e3742002-12-13 20:15:29 +000034specific configuration file @file{ospfd.conf}.
35
paul76b89b42004-11-06 17:13:09 +000036@node OSPF router
paul718e3742002-12-13 20:15:29 +000037@section OSPF router
38
39To start OSPF process you have to specify the OSPF router. As of this
40writing, @command{ospfd} does not support multiple OSPF processes.
41
42@deffn Command {router ospf} {}
43@deffnx Command {no router ospf} {}
44Enable or disable the OSPF process. @command{ospfd} does not yet
45support multiple OSPF processes. So you can not specify an OSPF process
46number.
47@end deffn
48
49@deffn {OSPF Command} {ospf router-id @var{a.b.c.d}} {}
50@deffnx {OSPF Command} {no ospf router-id} {}
paule5b308d2005-10-29 20:19:49 +000051This sets the router-ID of the OSPF process. The router-ID may be an IP
52address of the router, but need not be - it can be any arbitrary 32bit
53number. However it MUST be unique within the entire OSPF domain to the
54OSPF speaker - bad things will happen if multiple OSPF speakers are
55configured with the same router-ID! If one is not specified then
56@command{ospfd} will obtain a router-ID automatically from @command{zebra}.
paul718e3742002-12-13 20:15:29 +000057@end deffn
58
59@deffn {OSPF Command} {ospf abr-type @var{type}} {}
60@deffnx {OSPF Command} {no ospf abr-type @var{type}} {}
paule5b308d2005-10-29 20:19:49 +000061@var{type} can be cisco|ibm|shortcut|standard.
62
pauld4f50312003-01-22 19:26:00 +000063More information regarding the behaviour controlled by this command can
paule5b308d2005-10-29 20:19:49 +000064be found in @cite{RFC 3509, Alternative Implementations of OSPF Area
65Border Routers}, and @cite{draft-ietf-ospf-shortcut-abr-02.txt}.
66
67Quote: "Though the definition of the @acronym{ABR,Area Border Router}
pauld4f50312003-01-22 19:26:00 +000068in the OSPF specification does not require a router with multiple
69attached areas to have a backbone connection, it is actually
70necessary to provide successful routing to the inter-area and
71external destinations. If this requirement is not met, all traffic
72destined for the areas not connected to such an ABR or out of the
73OSPF domain, is dropped. This document describes alternative ABR
74behaviors implemented in Cisco and IBM routers."
paule5b308d2005-10-29 20:19:49 +000075
76The default ABR type is 'Cisco', allowing an ABR to consider summaries
77from non-backbone areas if, and only if, it has lost its link(s) to the
78backbone area.
paul718e3742002-12-13 20:15:29 +000079@end deffn
80
81@deffn {OSPF Command} {ospf rfc1583compatibility} {}
82@deffnx {OSPF Command} {no ospf rfc1583compatibility} {}
paule5b308d2005-10-29 20:19:49 +000083This @cite{RFC2328}, the sucessor to @cite{RFC1583}, suggests according
84to section G.2 (changes) in section 16.4 a change to the path
85preference algorithm that prevents possible routing loops that were
86possible in the old version of OSPFv2. More specifically it demands
87that inter-area paths and intra-area path are now of equal preference
88but still both preferred to external paths.
89
90This command should NOT be set normally.
paul718e3742002-12-13 20:15:29 +000091@end deffn
92
Andrew J. Schorrd7e60dd2006-06-29 20:20:52 +000093@deffn {OSPF Command} {log-adjacency-changes [detail]} {}
94@deffnx {OSPF Command} {no log-adjacency-changes [detail]} {}
95Configures ospfd to log changes in adjacency. With the optional
96detail argument, all changes in adjacency status are shown. Without detail,
97only changes to full or regressions are shown.
98@end deffn
99
paul718e3742002-12-13 20:15:29 +0000100@deffn {OSPF Command} {passive interface @var{interface}} {}
101@deffnx {OSPF Command} {no passive interface @var{interface}} {}
paule5b308d2005-10-29 20:19:49 +0000102
103Do not speak OSPF interface on the given interface, but do advertise
104the interface as a stub link in the router-@acronym{LSA,Link State
105Advertisement} for this router. This allows one to advertise addresses
106on such connected interfaces without having to originate
107AS-External/Type-5 LSAs (which have global flooding scope) - as would
108occur if connected addresses were redistributed into OSPF,
109@xref{Redistribute routes to OSPF}.
110
paul718e3742002-12-13 20:15:29 +0000111@end deffn
112
paule5b308d2005-10-29 20:19:49 +0000113@deffn {OSPF Command} {timers throttle spf @var{delay} @var{initial-holdtime} @var{max-holdtime}} {}
114@deffnx {OSPF Command} {no timers throttle spf} {}
115This command sets the initial @var{delay}, the @var{initial-holdtime}
116and the @var{maximum-holdtime} between when SPF is calculated and the
117event which triggered the calculation. The times are specified in
118milliseconds and must be in the range of 0 to 600000 milliseconds.
119
120The @var{delay} specifies the minimum amount of time to delay SPF
121calculation (hence it affects how long SPF calculation is delayed after
122an event which occurs outside of the holdtime of any previous SPF
123calculation, and also serves as a minimum holdtime).
124
125Consecutive SPF calculations will always be seperated by at least
126'hold-time' milliseconds. The hold-time is adaptive and initially is
127set to the @var{initial-holdtime} configured with the above command.
128Events which occur within the holdtime of the previous SPF calculation
129will cause the holdtime to be increased by @var{initial-holdtime}, bounded
130by the @var{maximum-holdtime} configured with this command. If the adaptive
131hold-time elapses without any SPF-triggering event occuring then
132the current holdtime is reset to the @var{initial-holdtime}. The current
133holdtime can be viewed with @ref{show ip ospf}, where it is expressed as
134a multiplier of the @var{initial-holdtime}.
135
136@example
137@group
138router ospf
139 timers throttle spf 200 400 10000
140@end group
141@end example
142
143In this example, the @var{delay} is set to 200ms, the @var{initial
144holdtime} is set to 400ms and the @var{maximum holdtime} to 10s. Hence
145there will always be at least 200ms between an event which requires SPF
146calculation and the actual SPF calculation. Further consecutive SPF
147calculations will always be seperated by between 400ms to 10s, the
148hold-time increasing by 400ms each time an SPF-triggering event occurs
149within the hold-time of the previous SPF calculation.
150
151This command supercedes the @command{timers spf} command in previous Quagga
152releases.
paul718e3742002-12-13 20:15:29 +0000153@end deffn
154
paule5b308d2005-10-29 20:19:49 +0000155@deffn {OSPF Command} {max-metric router-lsa [on-startup|on-shutdown] <5-86400>} {}
156@deffnx {OSPF Command} {max-metric router-lsa administrative} {}
157@deffnx {OSPF Command} {no max-metric router-lsa [on-startup|on-shutdown|administrative]} {}
158This enables @cite{RFC3137, OSPF Stub Router Advertisement} support,
159where the OSPF process describes its transit links in its router-LSA as
160having infinite distance so that other routers will avoid calculating
161transit paths through the router while still being able to reach
162networks through the router.
163
164This support may be enabled administratively (and indefinitely) or
165conditionally. Conditional enabling of max-metric router-lsas can be
166for a period of seconds after startup and/or for a period of seconds
167prior to shutdown.
168
169Enabling this for a period after startup allows OSPF to converge fully
170first without affecting any existing routes used by other routers,
171while still allowing any connected stub links and/or redistributed
172routes to be reachable. Enabling this for a period of time in advance
173of shutdown allows the router to gracefully excuse itself from the OSPF
174domain.
175
176Enabling this feature administratively allows for administrative
177intervention for whatever reason, for an indefinite period of time.
178Note that if the configuration is written to file, this administrative
179form of the stub-router command will also be written to file. If
180@command{ospfd} is restarted later, the command will then take effect
181until manually deconfigured.
182
183Configured state of this feature as well as current status, such as the
184number of second remaining till on-startup or on-shutdown ends, can be
185viewed with the @ref{show ip ospf} command.
paul718e3742002-12-13 20:15:29 +0000186@end deffn
187
paule5b308d2005-10-29 20:19:49 +0000188@deffn {OSPF Command} {auto-cost reference-bandwidth <1-4294967>} {}
189@deffnx {OSPF Command} {no auto-cost reference-bandwidth} {}
190This sets the reference bandwidth for cost calculations, where this
191bandwidth is considered equivalent to an OSPF cost of 1, specified in
192Mbits/s. The default is 100Mbit/s (i.e. a link of bandwidth 100Mbit/s
193or higher will have a cost of 1. Cost of lower bandwidth links will be
194scaled with reference to this cost).
195
196This configuration setting MUST be consistent across all routers within the
197OSPF domain.
paul718e3742002-12-13 20:15:29 +0000198@end deffn
199
200@deffn {OSPF Command} {network @var{a.b.c.d/m} area @var{a.b.c.d}} {}
201@deffnx {OSPF Command} {network @var{a.b.c.d/m} area @var{<0-4294967295>}} {}
202@deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{a.b.c.d}} {}
203@deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{<0-4294967295>}} {}
hassoa5b2b592004-04-17 10:09:29 +0000204This command specifies the OSPF enabled interface(s). If the interface has
205an address from range 192.168.1.0/24 then the command below enables ospf
206on this interface so router can provide network information to the other
207ospf routers via this interface.
paule5b308d2005-10-29 20:19:49 +0000208
paul718e3742002-12-13 20:15:29 +0000209@example
210@group
211router ospf
hassoa5b2b592004-04-17 10:09:29 +0000212 network 192.168.1.0/24 area 0.0.0.0
paul718e3742002-12-13 20:15:29 +0000213@end group
214@end example
paule5b308d2005-10-29 20:19:49 +0000215
hassoa5b2b592004-04-17 10:09:29 +0000216Prefix length in interface must be equal or bigger (ie. smaller network) than
217prefix length in network statement. For example statement above doesn't enable
218ospf on interface with address 192.168.1.1/23, but it does on interface with
219address 192.168.1.129/25.
paul718e3742002-12-13 20:15:29 +0000220@end deffn
221
paul76b89b42004-11-06 17:13:09 +0000222@node OSPF area
paul718e3742002-12-13 20:15:29 +0000223@section OSPF area
224
225@deffn {OSPF Command} {area @var{a.b.c.d} range @var{a.b.c.d/m}} {}
226@deffnx {OSPF Command} {area <0-4294967295> range @var{a.b.c.d/m}} {}
227@deffnx {OSPF Command} {no area @var{a.b.c.d} range @var{a.b.c.d/m}} {}
228@deffnx {OSPF Command} {no area <0-4294967295> range @var{a.b.c.d/m}} {}
hasso63869f12004-04-19 14:43:46 +0000229Summarize intra area paths from specified area into one Type-3 summary-LSA
230announced to other areas. This command can be used only in ABR and ONLY
231router-LSAs (Type-1) and network-LSAs (Type-2) (ie. LSAs with scope area) can
232be summarized. Type-5 AS-external-LSAs can't be summarized - their scope is AS.
233Summarizing Type-7 AS-external-LSAs isn't supported yet by Quagga.
paule5b308d2005-10-29 20:19:49 +0000234
hasso63869f12004-04-19 14:43:46 +0000235@example
236@group
237router ospf
238 network 192.168.1.0/24 area 0.0.0.0
239 network 10.0.0.0/8 area 0.0.0.10
240 area 0.0.0.10 range 10.0.0.0/8
241@end group
242@end example
paule5b308d2005-10-29 20:19:49 +0000243
hasso63869f12004-04-19 14:43:46 +0000244With configuration above one Type-3 Summary-LSA with routing info 10.0.0.0/8 is
245announced into backbone area if area 0.0.0.10 contains at least one intra-area
246network (ie. described with router or network LSA) from this range.
paul718e3742002-12-13 20:15:29 +0000247@end deffn
248
hasso63869f12004-04-19 14:43:46 +0000249@deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {}
250@deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {}
251Instead of summarizing intra area paths filter them - ie. intra area paths from this
252range are not advertised into other areas.
253This command makes sense in ABR only.
254@end deffn
255
hasso6b3fac02004-04-20 04:11:36 +0000256@deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {}
paul718e3742002-12-13 20:15:29 +0000257@deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {}
hasso63869f12004-04-19 14:43:46 +0000258Substitute summarized prefix with another prefix.
paule5b308d2005-10-29 20:19:49 +0000259
hasso63869f12004-04-19 14:43:46 +0000260@example
261@group
262router ospf
263 network 192.168.1.0/24 area 0.0.0.0
264 network 10.0.0.0/8 area 0.0.0.10
265 area 0.0.0.10 range 10.0.0.0/8 substitute 11.0.0.0/8
266@end group
267@end example
paule5b308d2005-10-29 20:19:49 +0000268
hasso63869f12004-04-19 14:43:46 +0000269One Type-3 summary-LSA with routing info 11.0.0.0/8 is announced into backbone area if
270area 0.0.0.10 contains at least one intra-area network (ie. described with router-LSA or
271network-LSA) from range 10.0.0.0/8.
272This command makes sense in ABR only.
paul718e3742002-12-13 20:15:29 +0000273@end deffn
274
275@deffn {OSPF Command} {area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {}
276@deffnx {OSPF Command} {area <0-4294967295> virtual-link @var{a.b.c.d}} {}
277@deffnx {OSPF Command} {no area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {}
278@deffnx {OSPF Command} {no area <0-4294967295> virtual-link @var{a.b.c.d}} {}
279@end deffn
280
281@deffn {OSPF Command} {area @var{a.b.c.d} shortcut} {}
282@deffnx {OSPF Command} {area <0-4294967295> shortcut} {}
283@deffnx {OSPF Command} {no area @var{a.b.c.d} shortcut} {}
284@deffnx {OSPF Command} {no area <0-4294967295> shortcut} {}
paule5b308d2005-10-29 20:19:49 +0000285Configure th area as Shortcut capable. See @cite{RFC3509}. This requires
286that the 'abr-type' be set to 'shortcut'.
paul718e3742002-12-13 20:15:29 +0000287@end deffn
288
289@deffn {OSPF Command} {area @var{a.b.c.d} stub} {}
290@deffnx {OSPF Command} {area <0-4294967295> stub} {}
291@deffnx {OSPF Command} {no area @var{a.b.c.d} stub} {}
292@deffnx {OSPF Command} {no area <0-4294967295> stub} {}
paule5b308d2005-10-29 20:19:49 +0000293Configure the area to be a stub area. That is, an area where no router
294originates routes external to OSPF and hence an area where all external
295routes are via the ABR(s). Hence, ABRs for such an area do not need
296to pass AS-External LSAs (type-5s) or ASBR-Summary LSAs (type-4) into the
297area. They need only pass Network-Summary (type-3) LSAs into such an area,
298just a default summary.
paul718e3742002-12-13 20:15:29 +0000299@end deffn
300
301@deffn {OSPF Command} {area @var{a.b.c.d} stub no-summary} {}
302@deffnx {OSPF Command} {area <0-4294967295> stub no-summary} {}
303@deffnx {OSPF Command} {no area @var{a.b.c.d} stub no-summary} {}
304@deffnx {OSPF Command} {no area <0-4294967295> stub no-summary} {}
paule5b308d2005-10-29 20:19:49 +0000305Prevents an @command{ospfd} ABR from injecting inter-area
306summaries into the specified stub area.
paul718e3742002-12-13 20:15:29 +0000307@end deffn
308
309@deffn {OSPF Command} {area @var{a.b.c.d} default-cost <0-16777215>} {}
310@deffnx {OSPF Command} {no area @var{a.b.c.d} default-cost <0-16777215>} {}
paule5b308d2005-10-29 20:19:49 +0000311Set the cost of default-summary LSAs announced to stubby areas.
paul718e3742002-12-13 20:15:29 +0000312@end deffn
313
314@deffn {OSPF Command} {area @var{a.b.c.d} export-list NAME} {}
315@deffnx {OSPF Command} {area <0-4294967295> export-list NAME} {}
316@deffnx {OSPF Command} {no area @var{a.b.c.d} export-list NAME} {}
317@deffnx {OSPF Command} {no area <0-4294967295> export-list NAME} {}
hasso63869f12004-04-19 14:43:46 +0000318Filter Type-3 summary-LSAs announced to other areas originated from intra-
319area paths from specified area.
paule5b308d2005-10-29 20:19:49 +0000320
hasso63869f12004-04-19 14:43:46 +0000321@example
322@group
323router ospf
324 network 192.168.1.0/24 area 0.0.0.0
325 network 10.0.0.0/8 area 0.0.0.10
326 area 0.0.0.10 export-list foo
327!
328access-list foo permit 10.10.0.0/16
329access-list foo deny any
330@end group
331@end example
paule5b308d2005-10-29 20:19:49 +0000332
hasso63869f12004-04-19 14:43:46 +0000333With example above any intra-area paths from area 0.0.0.10 and from range
33410.10.0.0/16 (for example 10.10.1.0/24 and 10.10.2.128/30) are announced into
335other areas as Type-3 summary-LSA's, but any others (for example 10.11.0.0/16
336or 10.128.30.16/30) aren't.
paule5b308d2005-10-29 20:19:49 +0000337
338This command is only relevant if the router is an ABR for the specified
339area.
paul718e3742002-12-13 20:15:29 +0000340@end deffn
341
342@deffn {OSPF Command} {area @var{a.b.c.d} import-list NAME} {}
343@deffnx {OSPF Command} {area <0-4294967295> import-list NAME} {}
344@deffnx {OSPF Command} {no area @var{a.b.c.d} import-list NAME} {}
345@deffnx {OSPF Command} {no area <0-4294967295> import-list NAME} {}
hasso63869f12004-04-19 14:43:46 +0000346Same as export-list, but it applies to paths announced into specified area as
347Type-3 summary-LSAs.
348@end deffn
349
hasso808c0a72004-04-19 15:10:20 +0000350@deffn {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME in} {}
351@deffnx {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME out} {}
352@deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME in} {}
353@deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME out} {}
354@deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME in} {}
355@deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME out} {}
356@deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME in} {}
357@deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME out} {}
hassoc266ac72004-04-19 17:31:00 +0000358Filtering Type-3 summary-LSAs to/from area using prefix lists. This command
359makes sense in ABR only.
paul718e3742002-12-13 20:15:29 +0000360@end deffn
361
362@deffn {OSPF Command} {area @var{a.b.c.d} authentication} {}
363@deffnx {OSPF Command} {area <0-4294967295> authentication} {}
364@deffnx {OSPF Command} {no area @var{a.b.c.d} authentication} {}
365@deffnx {OSPF Command} {no area <0-4294967295> authentication} {}
paule5b308d2005-10-29 20:19:49 +0000366Specify that simple password authentication should be used for the given
367area.
paul718e3742002-12-13 20:15:29 +0000368@end deffn
369
370@deffn {OSPF Command} {area @var{a.b.c.d} authentication message-digest} {}
371@deffnx {OSPF Command} {area <0-4294967295> authentication message-digest} {}
paule5b308d2005-10-29 20:19:49 +0000372Specify that OSPF packets should be authenticated with MD5 HMACs for the given
373area.
paul718e3742002-12-13 20:15:29 +0000374@end deffn
375
paul76b89b42004-11-06 17:13:09 +0000376@node OSPF interface
paul718e3742002-12-13 20:15:29 +0000377@section OSPF interface
378
paule5b308d2005-10-29 20:19:49 +0000379@deffn {Interface Command} {ip ospf authentication-key @var{AUTH_KEY}} {}
paul718e3742002-12-13 20:15:29 +0000380@deffnx {Interface Command} {no ip ospf authentication-key} {}
381Set OSPF authentication key to a simple password. After setting @var{AUTH_KEY},
382all OSPF packets are authenticated. @var{AUTH_KEY} has length up to 8 chars.
383@end deffn
384
385@deffn {Interface Command} {ip ospf message-digest-key KEYID md5 KEY} {}
386@deffnx {Interface Command} {no ip ospf message-digest-key} {}
387Set OSPF authentication key to a cryptographic password. The cryptographic
Paul Jakma466c9652006-06-26 12:55:58 +0000388algorithm is MD5.
389
390KEYID identifies secret key used to create the message digest. This ID
391is part of the protocol and must be consistent across routers on a
392link.
393
394KEY is the actual message digest key, of up to 16 chars (larger strings
395will be truncated), and is associated with the given KEYID.
paule2ea9fe2004-10-11 14:33:23 +0000396
397Note that OSPF MD5 authentication requires that time never go backwards
paule5b308d2005-10-29 20:19:49 +0000398(correct time is NOT important, only that it never goes backwards), even
paule2ea9fe2004-10-11 14:33:23 +0000399across resets, if ospfd is to be able to promptly reestabish adjacencies
400with its neighbours after restarts/reboots. The host should have system
Paul Jakma466c9652006-06-26 12:55:58 +0000401time be set at boot from an external or non-volatile source (eg battery backed clock, NTP,
paule2ea9fe2004-10-11 14:33:23 +0000402etc.) or else the system clock should be periodically saved to non-volative
403storage and restored at boot if MD5 authentication is to be expected to work
404reliably.
paul718e3742002-12-13 20:15:29 +0000405@end deffn
406
407@deffn {Interface Command} {ip ospf cost <1-65535>} {}
408@deffnx {Interface Command} {no ip ospf cost} {}
409Set link cost for the specified interface. The cost value is set to router-LSA's
410metric field and used for SPF calculation.
411@end deffn
412
paule5b308d2005-10-29 20:19:49 +0000413@anchor{ip ospf dead-interval minimal}
paul718e3742002-12-13 20:15:29 +0000414@deffn {Interface Command} {ip ospf dead-interval <1-65535>} {}
paule5b308d2005-10-29 20:19:49 +0000415@deffnx {Interface Command} {ip ospf dead-interval minimal hello-multiplier <2-20>} {}
paul718e3742002-12-13 20:15:29 +0000416@deffnx {Interface Command} {no ip ospf dead-interval} {}
417Set number of seconds for RouterDeadInterval timer value used for Wait Timer
418and Inactivity Timer. This value must be the same for all routers attached
419to a common network. The default value is 40 seconds.
paule5b308d2005-10-29 20:19:49 +0000420
421If 'minimal' is specified instead, then the dead-interval is set to 1
422second and one must specify a hello-multiplier. The hello-multiplier
423specifies how many Hellos to send per second, from 2 (every 500ms) to
42420 (every 50ms). Thus one can have 1s convergence time for OSPF. If this form
425is specified, then the hello-interval advertised in Hello packets is set to
4260 and the hello-interval on received Hello packets is not checked, thus
427the hello-multiplier need NOT be the same across multiple routers on a common
428link.
paul718e3742002-12-13 20:15:29 +0000429@end deffn
430
431@deffn {Interface Command} {ip ospf hello-interval <1-65535>} {}
432@deffnx {Interface Command} {no ip ospf hello-interval} {}
433Set number of seconds for HelloInterval timer value. Setting this value,
434Hello packet will be sent every timer value seconds on the specified interface.
435This value must be the same for all routers attached to a common network.
436The default value is 10 seconds.
paule5b308d2005-10-29 20:19:49 +0000437
438This command has no effect if @ref{ip ospf dead-interval minimal} is also
439specified for the interface.
paul718e3742002-12-13 20:15:29 +0000440@end deffn
441
442@deffn {Interface Command} {ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)} {}
443@deffnx {Interface Command} {no ip ospf network} {}
444Set explicitly network type for specifed interface.
445@end deffn
446
447@deffn {Interface Command} {ip ospf priority <0-255>} {}
448@deffnx {Interface Command} {no ip ospf priority} {}
449Set RouterPriority integer value. Setting higher value, router will be more
450eligible to become Designated Router. Setting the value to 0, router is no
451longer eligible to Designated Router.
452The default value is 1.
453@end deffn
454
455@deffn {Interface Command} {ip ospf retransmit-interval <1-65535>} {}
456@deffnx {Interface Command} {no ip ospf retransmit interval} {}
457Set number of seconds for RxmtInterval timer value. This value is used
458when retransmitting Database Description and Link State Request packets.
459The default value is 5 seconds.
460@end deffn
461
462@deffn {Interface Command} {ip ospf transmit-delay} {}
463@deffnx {Interface Command} {no ip ospf transmit-delay} {}
464Set number of seconds for InfTransDelay value. LSAs' age should be
465incremented by this value when transmitting.
466The default value is 1 seconds.
467@end deffn
468
paul76b89b42004-11-06 17:13:09 +0000469@node Redistribute routes to OSPF
paul718e3742002-12-13 20:15:29 +0000470@section Redistribute routes to OSPF
471
472@deffn {OSPF Command} {redistribute (kernel|connected|static|rip|bgp)} {}
473@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) @var{route-map}} {}
474@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)} {}
475@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map @var{word}} {}
476@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214>} {}
477@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> route-map @var{word}} {}
478@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214>} {}
479@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214> route-map @var{word}} {}
480@deffnx {OSPF Command} {no redistribute (kernel|connected|static|rip|bgp)} {}
paule5b308d2005-10-29 20:19:49 +0000481Redistribute routes of the specified protocol or kind into OSPF, with the
482metric type and metric set if specified, filtering the routes using the given
483route-map if specified.
paul718e3742002-12-13 20:15:29 +0000484@end deffn
485
486@deffn {OSPF Command} {default-information originate} {}
487@deffnx {OSPF Command} {default-information originate metric <0-16777214>} {}
488@deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2)} {}
489@deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
490@deffnx {OSPF Command} {default-information originate always} {}
491@deffnx {OSPF Command} {default-information originate always metric <0-16777214>} {}
492@deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2)} {}
493@deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
494@deffnx {OSPF Command} {no default-information originate} {}
paule5b308d2005-10-29 20:19:49 +0000495Originate an AS-External (type-5) LSA describing a default route into
496all external-routing capable areas, of the specified metric and metric
497type. If the 'always' keyword is given then the default is always
498advertised, even when there is no default present in the routing table.
paul718e3742002-12-13 20:15:29 +0000499@end deffn
500
501@deffn {OSPF Command} {distribute-list NAME out (kernel|connected|static|rip|ospf} {}
502@deffnx {OSPF Command} {no distribute-list NAME out (kernel|connected|static|rip|ospf} {}
503@end deffn
504
505@deffn {OSPF Command} {default-metric <0-16777214>} {}
506@deffnx {OSPF Command} {no default-metric} {}
507@end deffn
508
509@deffn {OSPF Command} {distance <1-255>} {}
510@deffnx {OSPF Command} {no distance <1-255>} {}
511@end deffn
512
513@deffn {OSPF Command} {distance ospf (intra-area|inter-area|external) <1-255>} {}
514@deffnx {OSPF Command} {no distance ospf} {}
515@end deffn
516
517@deffn {Command} {router zebra} {}
518@deffnx {Command} {no router zebra} {}
519@end deffn
520
paul76b89b42004-11-06 17:13:09 +0000521@node Showing OSPF information
paul718e3742002-12-13 20:15:29 +0000522@section Showing OSPF information
523
paule5b308d2005-10-29 20:19:49 +0000524@anchor{show ip ospf}
paul718e3742002-12-13 20:15:29 +0000525@deffn {Command} {show ip ospf} {}
paule5b308d2005-10-29 20:19:49 +0000526Show information on a variety of general OSPF and area state and configuration
527information.
paul718e3742002-12-13 20:15:29 +0000528@end deffn
529
530@deffn {Command} {show ip ospf interface [INTERFACE]} {}
paule5b308d2005-10-29 20:19:49 +0000531Show state and configuration of OSPF the specified interface, or all
532interfaces if no interface is given.
paul718e3742002-12-13 20:15:29 +0000533@end deffn
534
535@deffn {Command} {show ip ospf neighbor} {}
536@deffnx {Command} {show ip ospf neighbor INTERFACE} {}
537@deffnx {Command} {show ip ospf neighbor detail} {}
538@deffnx {Command} {show ip ospf neighbor INTERFACE detail} {}
539@end deffn
540
541@deffn {Command} {show ip ospf database} {}
542@end deffn
543
544@deffn {Command} {show ip ospf database (asbr-summary|external|network|router|summary)} {}
545@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id}} {}
546@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} adv-router @var{adv-router}} {}
547@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) adv-router @var{adv-router}} {}
548@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} self-originate} {}
549@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) self-originate} {}
550@end deffn
551
552@deffn {Command} {show ip ospf database max-age} {}
553@end deffn
554
555@deffn {Command} {show ip ospf database self-originate} {}
556@end deffn
557
paul718e3742002-12-13 20:15:29 +0000558@deffn {Command} {show ip ospf route} {}
paule5b308d2005-10-29 20:19:49 +0000559Show the OSPF routing table, as determined by the most recent SPF calculation.
paul718e3742002-12-13 20:15:29 +0000560@end deffn
561
paul76b89b42004-11-06 17:13:09 +0000562@node Debugging OSPF
paul718e3742002-12-13 20:15:29 +0000563@section Debugging OSPF
564
565@deffn {Command} {debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
566@deffnx {Command} {no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
567@end deffn
568
569@deffn {Command} {debug ospf ism} {}
570@deffnx {Command} {debug ospf ism (status|events|timers)} {}
571@deffnx {Command} {no debug ospf ism} {}
572@deffnx {Command} {no debug ospf ism (status|events|timers)} {}
573@end deffn
574
575@deffn {Command} {debug ospf nsm} {}
576@deffnx {Command} {debug ospf nsm (status|events|timers)} {}
577@deffnx {Command} {no debug ospf nsm} {}
578@deffnx {Command} {no debug ospf nsm (status|events|timers)} {}
579@end deffn
580
581@deffn {Command} {debug ospf lsa} {}
582@deffnx {Command} {debug ospf lsa (generate|flooding|refresh)} {}
583@deffnx {Command} {no debug ospf lsa} {}
584@deffnx {Command} {no debug ospf lsa (generate|flooding|refresh)} {}
585@end deffn
586
587@deffn {Command} {debug ospf zebra} {}
588@deffnx {Command} {debug ospf zebra (interface|redistribute)} {}
589@deffnx {Command} {no debug ospf zebra} {}
590@deffnx {Command} {no debug ospf zebra (interface|redistribute)} {}
591@end deffn
592
593@deffn {Command} {show debugging ospf} {}
594@end deffn
595
paule5b308d2005-10-29 20:19:49 +0000596@node OSPF Configuration Examples
597@section OSPF Configuration Examples
598A simple example, with MD5 authentication enabled:
599
600@example
601@group
602!
603interface bge0
604 ip ospf authentication message-digest
605 ip ospf message-digest-key 1 md5 ABCDEFGHIJK
606!
607router ospf
608 network 192.168.0.0/16 area 0.0.0.1
609 area 0.0.0.1 authentication message-digest
610@end group
611@end example
612
613An @acronym{ABR} router, with MD5 authentication and performing summarisation
614of networks between the areas:
615
616@example
617@group
618!
619password ABCDEF
620log file /var/log/quagga/ospfd.log
621service advanced-vty
622!
623interface eth0
624 ip ospf authentication message-digest
625 ip ospf message-digest-key 1 md5 ABCDEFGHIJK
626!
627interface ppp0
628!
629interface br0
630 ip ospf authentication message-digest
631 ip ospf message-digest-key 2 md5 XYZ12345
632!
633router ospf
634 ospf router-id 192.168.0.1
635 redistribute connected
636 passive interface ppp0
637 network 192.168.0.0/24 area 0.0.0.0
638 network 10.0.0.0/16 area 0.0.0.0
639 network 192.168.1.0/24 area 0.0.0.1
640 area 0.0.0.0 authentication message-digest
641 area 0.0.0.0 range 10.0.0.0/16
642 area 0.0.0.0 range 192.168.0.0/24
643 area 0.0.0.1 authentication message-digest
644 area 0.0.0.1 range 10.2.0.0/16
645!
646@end group
647@end example