blob: 4c4b04b9472a469ad75c46e827f18ae6a31ca9cb [file] [log] [blame]
Paul Jakmaf912cb42006-07-27 23:30:16 +00001@cindex OSPFv2
paul76b89b42004-11-06 17:13:09 +00002@node OSPFv2
paul718e3742002-12-13 20:15:29 +00003@chapter OSPFv2
4
paule5b308d2005-10-29 20:19:49 +00005@acronym{OSPF,Open Shortest Path First} version 2 is a routing protocol
6which is described in @cite{RFC2328, OSPF Version 2}. OSPF is an
Paul Jakmaf912cb42006-07-27 23:30:16 +00007@acronym{IGP,Interior Gateway Protocol}. Compared with @acronym{RIP},
paule5b308d2005-10-29 20:19:49 +00008@acronym{OSPF} can provide scalable network support and faster
9convergence times. OSPF is widely used in large networks such as
10@acronym{ISP,Internet Service Provider} backbone and enterprise
11networks.
paul718e3742002-12-13 20:15:29 +000012
13@menu
Paul Jakmaf912cb42006-07-27 23:30:16 +000014
paul718e3742002-12-13 20:15:29 +000015* Configuring ospfd::
16* OSPF router::
17* OSPF area::
18* OSPF interface::
19* Redistribute routes to OSPF::
20* Showing OSPF information::
21* Debugging OSPF::
paule5b308d2005-10-29 20:19:49 +000022* OSPF Configuration Examples::
paul718e3742002-12-13 20:15:29 +000023@end menu
24
paul76b89b42004-11-06 17:13:09 +000025@node Configuring ospfd
paul718e3742002-12-13 20:15:29 +000026@section Configuring ospfd
27
paule5b308d2005-10-29 20:19:49 +000028There are no @command{ospfd} specific options. Common options can be
paul718e3742002-12-13 20:15:29 +000029specified (@pxref{Common Invocation Options}) to @command{ospfd}.
paule5b308d2005-10-29 20:19:49 +000030@command{ospfd} needs to acquire interface information from
31@command{zebra} in order to function. Therefore @command{zebra} must be
32running before invoking @command{ospfd}. Also, if @command{zebra} is
33restarted then @command{ospfd} must be too.
paul718e3742002-12-13 20:15:29 +000034
paule5b308d2005-10-29 20:19:49 +000035Like other daemons, @command{ospfd} configuration is done in @acronym{OSPF}
paul718e3742002-12-13 20:15:29 +000036specific configuration file @file{ospfd.conf}.
37
paul76b89b42004-11-06 17:13:09 +000038@node OSPF router
paul718e3742002-12-13 20:15:29 +000039@section OSPF router
40
41To start OSPF process you have to specify the OSPF router. As of this
42writing, @command{ospfd} does not support multiple OSPF processes.
43
44@deffn Command {router ospf} {}
45@deffnx Command {no router ospf} {}
46Enable or disable the OSPF process. @command{ospfd} does not yet
47support multiple OSPF processes. So you can not specify an OSPF process
48number.
49@end deffn
50
Paul Jakmaf912cb42006-07-27 23:30:16 +000051@anchor{ospf router-id}
paul718e3742002-12-13 20:15:29 +000052@deffn {OSPF Command} {ospf router-id @var{a.b.c.d}} {}
53@deffnx {OSPF Command} {no ospf router-id} {}
paule5b308d2005-10-29 20:19:49 +000054This sets the router-ID of the OSPF process. The router-ID may be an IP
55address of the router, but need not be - it can be any arbitrary 32bit
56number. However it MUST be unique within the entire OSPF domain to the
57OSPF speaker - bad things will happen if multiple OSPF speakers are
58configured with the same router-ID! If one is not specified then
59@command{ospfd} will obtain a router-ID automatically from @command{zebra}.
paul718e3742002-12-13 20:15:29 +000060@end deffn
61
62@deffn {OSPF Command} {ospf abr-type @var{type}} {}
63@deffnx {OSPF Command} {no ospf abr-type @var{type}} {}
Paul Jakmaf912cb42006-07-27 23:30:16 +000064@var{type} can be cisco|ibm|shortcut|standard. The "Cisco" and "IBM" types
65are equivalent.
66
67The OSPF standard for ABR behaviour does not allow an ABR to consider
68routes through non-backbone areas when its links to the backbone are
69down, even when there are other ABRs in attached non-backbone areas
70which still can reach the backbone - this restriction exists primarily
71to ensure routing-loops are avoided.
72
73With the "Cisco" or "IBM" ABR type, the default in this release of
74Quagga, this restriction is lifted, allowing an ABR to consider
75summaries learnt from other ABRs through non-backbone areas, and hence
76route via non-backbone areas as a last resort when, and only when,
77backbone links are down.
78
79Note that areas with fully-adjacent virtual-links are considered to be
80"transit capable" and can always be used to route backbone traffic, and
81hence are unaffected by this setting (@pxref{OSPF virtual-link}).
paule5b308d2005-10-29 20:19:49 +000082
pauld4f50312003-01-22 19:26:00 +000083More information regarding the behaviour controlled by this command can
paule5b308d2005-10-29 20:19:49 +000084be found in @cite{RFC 3509, Alternative Implementations of OSPF Area
85Border Routers}, and @cite{draft-ietf-ospf-shortcut-abr-02.txt}.
86
87Quote: "Though the definition of the @acronym{ABR,Area Border Router}
pauld4f50312003-01-22 19:26:00 +000088in the OSPF specification does not require a router with multiple
89attached areas to have a backbone connection, it is actually
90necessary to provide successful routing to the inter-area and
91external destinations. If this requirement is not met, all traffic
92destined for the areas not connected to such an ABR or out of the
93OSPF domain, is dropped. This document describes alternative ABR
94behaviors implemented in Cisco and IBM routers."
paul718e3742002-12-13 20:15:29 +000095@end deffn
96
97@deffn {OSPF Command} {ospf rfc1583compatibility} {}
98@deffnx {OSPF Command} {no ospf rfc1583compatibility} {}
Paul Jakmaf912cb42006-07-27 23:30:16 +000099@cite{RFC2328}, the sucessor to @cite{RFC1583}, suggests according
paule5b308d2005-10-29 20:19:49 +0000100to section G.2 (changes) in section 16.4 a change to the path
101preference algorithm that prevents possible routing loops that were
102possible in the old version of OSPFv2. More specifically it demands
103that inter-area paths and intra-area path are now of equal preference
104but still both preferred to external paths.
105
106This command should NOT be set normally.
paul718e3742002-12-13 20:15:29 +0000107@end deffn
108
Andrew J. Schorrd7e60dd2006-06-29 20:20:52 +0000109@deffn {OSPF Command} {log-adjacency-changes [detail]} {}
110@deffnx {OSPF Command} {no log-adjacency-changes [detail]} {}
111Configures ospfd to log changes in adjacency. With the optional
112detail argument, all changes in adjacency status are shown. Without detail,
113only changes to full or regressions are shown.
114@end deffn
115
Paul Jakmaf912cb42006-07-27 23:30:16 +0000116@anchor{OSPF passive-interface}
117@deffn {OSPF Command} {passive-interface @var{interface}} {}
118@deffnx {OSPF Command} {no passive-interface @var{interface}} {}
paule5b308d2005-10-29 20:19:49 +0000119
120Do not speak OSPF interface on the given interface, but do advertise
121the interface as a stub link in the router-@acronym{LSA,Link State
122Advertisement} for this router. This allows one to advertise addresses
123on such connected interfaces without having to originate
124AS-External/Type-5 LSAs (which have global flooding scope) - as would
Paul Jakmaf912cb42006-07-27 23:30:16 +0000125occur if connected addresses were redistributed into OSPF
126(@pxref{Redistribute routes to OSPF})@. This is the only way to advertise
127non-OSPF links into stub areas.
paul718e3742002-12-13 20:15:29 +0000128@end deffn
129
paule5b308d2005-10-29 20:19:49 +0000130@deffn {OSPF Command} {timers throttle spf @var{delay} @var{initial-holdtime} @var{max-holdtime}} {}
131@deffnx {OSPF Command} {no timers throttle spf} {}
132This command sets the initial @var{delay}, the @var{initial-holdtime}
133and the @var{maximum-holdtime} between when SPF is calculated and the
134event which triggered the calculation. The times are specified in
135milliseconds and must be in the range of 0 to 600000 milliseconds.
136
137The @var{delay} specifies the minimum amount of time to delay SPF
138calculation (hence it affects how long SPF calculation is delayed after
139an event which occurs outside of the holdtime of any previous SPF
140calculation, and also serves as a minimum holdtime).
141
142Consecutive SPF calculations will always be seperated by at least
143'hold-time' milliseconds. The hold-time is adaptive and initially is
144set to the @var{initial-holdtime} configured with the above command.
145Events which occur within the holdtime of the previous SPF calculation
146will cause the holdtime to be increased by @var{initial-holdtime}, bounded
147by the @var{maximum-holdtime} configured with this command. If the adaptive
148hold-time elapses without any SPF-triggering event occuring then
149the current holdtime is reset to the @var{initial-holdtime}. The current
150holdtime can be viewed with @ref{show ip ospf}, where it is expressed as
151a multiplier of the @var{initial-holdtime}.
152
153@example
154@group
155router ospf
156 timers throttle spf 200 400 10000
157@end group
158@end example
159
160In this example, the @var{delay} is set to 200ms, the @var{initial
161holdtime} is set to 400ms and the @var{maximum holdtime} to 10s. Hence
162there will always be at least 200ms between an event which requires SPF
163calculation and the actual SPF calculation. Further consecutive SPF
164calculations will always be seperated by between 400ms to 10s, the
165hold-time increasing by 400ms each time an SPF-triggering event occurs
166within the hold-time of the previous SPF calculation.
167
168This command supercedes the @command{timers spf} command in previous Quagga
169releases.
paul718e3742002-12-13 20:15:29 +0000170@end deffn
171
paule5b308d2005-10-29 20:19:49 +0000172@deffn {OSPF Command} {max-metric router-lsa [on-startup|on-shutdown] <5-86400>} {}
173@deffnx {OSPF Command} {max-metric router-lsa administrative} {}
174@deffnx {OSPF Command} {no max-metric router-lsa [on-startup|on-shutdown|administrative]} {}
175This enables @cite{RFC3137, OSPF Stub Router Advertisement} support,
176where the OSPF process describes its transit links in its router-LSA as
177having infinite distance so that other routers will avoid calculating
178transit paths through the router while still being able to reach
179networks through the router.
180
181This support may be enabled administratively (and indefinitely) or
182conditionally. Conditional enabling of max-metric router-lsas can be
183for a period of seconds after startup and/or for a period of seconds
184prior to shutdown.
185
186Enabling this for a period after startup allows OSPF to converge fully
187first without affecting any existing routes used by other routers,
188while still allowing any connected stub links and/or redistributed
189routes to be reachable. Enabling this for a period of time in advance
190of shutdown allows the router to gracefully excuse itself from the OSPF
191domain.
192
193Enabling this feature administratively allows for administrative
194intervention for whatever reason, for an indefinite period of time.
195Note that if the configuration is written to file, this administrative
196form of the stub-router command will also be written to file. If
197@command{ospfd} is restarted later, the command will then take effect
198until manually deconfigured.
199
200Configured state of this feature as well as current status, such as the
201number of second remaining till on-startup or on-shutdown ends, can be
202viewed with the @ref{show ip ospf} command.
paul718e3742002-12-13 20:15:29 +0000203@end deffn
204
paule5b308d2005-10-29 20:19:49 +0000205@deffn {OSPF Command} {auto-cost reference-bandwidth <1-4294967>} {}
206@deffnx {OSPF Command} {no auto-cost reference-bandwidth} {}
207This sets the reference bandwidth for cost calculations, where this
208bandwidth is considered equivalent to an OSPF cost of 1, specified in
209Mbits/s. The default is 100Mbit/s (i.e. a link of bandwidth 100Mbit/s
210or higher will have a cost of 1. Cost of lower bandwidth links will be
211scaled with reference to this cost).
212
213This configuration setting MUST be consistent across all routers within the
214OSPF domain.
paul718e3742002-12-13 20:15:29 +0000215@end deffn
216
217@deffn {OSPF Command} {network @var{a.b.c.d/m} area @var{a.b.c.d}} {}
218@deffnx {OSPF Command} {network @var{a.b.c.d/m} area @var{<0-4294967295>}} {}
219@deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{a.b.c.d}} {}
220@deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{<0-4294967295>}} {}
hassoa5b2b592004-04-17 10:09:29 +0000221This command specifies the OSPF enabled interface(s). If the interface has
222an address from range 192.168.1.0/24 then the command below enables ospf
223on this interface so router can provide network information to the other
224ospf routers via this interface.
paule5b308d2005-10-29 20:19:49 +0000225
paul718e3742002-12-13 20:15:29 +0000226@example
227@group
228router ospf
hassoa5b2b592004-04-17 10:09:29 +0000229 network 192.168.1.0/24 area 0.0.0.0
paul718e3742002-12-13 20:15:29 +0000230@end group
231@end example
paule5b308d2005-10-29 20:19:49 +0000232
hassoa5b2b592004-04-17 10:09:29 +0000233Prefix length in interface must be equal or bigger (ie. smaller network) than
234prefix length in network statement. For example statement above doesn't enable
235ospf on interface with address 192.168.1.1/23, but it does on interface with
236address 192.168.1.129/25.
paul718e3742002-12-13 20:15:29 +0000237@end deffn
238
paul76b89b42004-11-06 17:13:09 +0000239@node OSPF area
paul718e3742002-12-13 20:15:29 +0000240@section OSPF area
241
242@deffn {OSPF Command} {area @var{a.b.c.d} range @var{a.b.c.d/m}} {}
243@deffnx {OSPF Command} {area <0-4294967295> range @var{a.b.c.d/m}} {}
244@deffnx {OSPF Command} {no area @var{a.b.c.d} range @var{a.b.c.d/m}} {}
245@deffnx {OSPF Command} {no area <0-4294967295> range @var{a.b.c.d/m}} {}
hasso63869f12004-04-19 14:43:46 +0000246Summarize intra area paths from specified area into one Type-3 summary-LSA
247announced to other areas. This command can be used only in ABR and ONLY
248router-LSAs (Type-1) and network-LSAs (Type-2) (ie. LSAs with scope area) can
249be summarized. Type-5 AS-external-LSAs can't be summarized - their scope is AS.
250Summarizing Type-7 AS-external-LSAs isn't supported yet by Quagga.
paule5b308d2005-10-29 20:19:49 +0000251
hasso63869f12004-04-19 14:43:46 +0000252@example
253@group
254router ospf
255 network 192.168.1.0/24 area 0.0.0.0
256 network 10.0.0.0/8 area 0.0.0.10
257 area 0.0.0.10 range 10.0.0.0/8
258@end group
259@end example
paule5b308d2005-10-29 20:19:49 +0000260
hasso63869f12004-04-19 14:43:46 +0000261With configuration above one Type-3 Summary-LSA with routing info 10.0.0.0/8 is
262announced into backbone area if area 0.0.0.10 contains at least one intra-area
263network (ie. described with router or network LSA) from this range.
paul718e3742002-12-13 20:15:29 +0000264@end deffn
265
hasso63869f12004-04-19 14:43:46 +0000266@deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {}
267@deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {}
268Instead of summarizing intra area paths filter them - ie. intra area paths from this
269range are not advertised into other areas.
270This command makes sense in ABR only.
271@end deffn
272
hasso6b3fac02004-04-20 04:11:36 +0000273@deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {}
paul718e3742002-12-13 20:15:29 +0000274@deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {}
hasso63869f12004-04-19 14:43:46 +0000275Substitute summarized prefix with another prefix.
paule5b308d2005-10-29 20:19:49 +0000276
hasso63869f12004-04-19 14:43:46 +0000277@example
278@group
279router ospf
280 network 192.168.1.0/24 area 0.0.0.0
281 network 10.0.0.0/8 area 0.0.0.10
282 area 0.0.0.10 range 10.0.0.0/8 substitute 11.0.0.0/8
283@end group
284@end example
paule5b308d2005-10-29 20:19:49 +0000285
hasso63869f12004-04-19 14:43:46 +0000286One Type-3 summary-LSA with routing info 11.0.0.0/8 is announced into backbone area if
287area 0.0.0.10 contains at least one intra-area network (ie. described with router-LSA or
288network-LSA) from range 10.0.0.0/8.
289This command makes sense in ABR only.
paul718e3742002-12-13 20:15:29 +0000290@end deffn
291
Paul Jakmaf912cb42006-07-27 23:30:16 +0000292@anchor{OSPF virtual-link}
paul718e3742002-12-13 20:15:29 +0000293@deffn {OSPF Command} {area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {}
294@deffnx {OSPF Command} {area <0-4294967295> virtual-link @var{a.b.c.d}} {}
295@deffnx {OSPF Command} {no area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {}
296@deffnx {OSPF Command} {no area <0-4294967295> virtual-link @var{a.b.c.d}} {}
297@end deffn
298
299@deffn {OSPF Command} {area @var{a.b.c.d} shortcut} {}
300@deffnx {OSPF Command} {area <0-4294967295> shortcut} {}
301@deffnx {OSPF Command} {no area @var{a.b.c.d} shortcut} {}
302@deffnx {OSPF Command} {no area <0-4294967295> shortcut} {}
Paul Jakmaf912cb42006-07-27 23:30:16 +0000303Configure the area as Shortcut capable. See @cite{RFC3509}. This requires
paule5b308d2005-10-29 20:19:49 +0000304that the 'abr-type' be set to 'shortcut'.
paul718e3742002-12-13 20:15:29 +0000305@end deffn
306
307@deffn {OSPF Command} {area @var{a.b.c.d} stub} {}
308@deffnx {OSPF Command} {area <0-4294967295> stub} {}
309@deffnx {OSPF Command} {no area @var{a.b.c.d} stub} {}
310@deffnx {OSPF Command} {no area <0-4294967295> stub} {}
paule5b308d2005-10-29 20:19:49 +0000311Configure the area to be a stub area. That is, an area where no router
312originates routes external to OSPF and hence an area where all external
313routes are via the ABR(s). Hence, ABRs for such an area do not need
314to pass AS-External LSAs (type-5s) or ASBR-Summary LSAs (type-4) into the
315area. They need only pass Network-Summary (type-3) LSAs into such an area,
Paul Jakmaf912cb42006-07-27 23:30:16 +0000316along with a default-route summary.
paul718e3742002-12-13 20:15:29 +0000317@end deffn
318
319@deffn {OSPF Command} {area @var{a.b.c.d} stub no-summary} {}
320@deffnx {OSPF Command} {area <0-4294967295> stub no-summary} {}
321@deffnx {OSPF Command} {no area @var{a.b.c.d} stub no-summary} {}
322@deffnx {OSPF Command} {no area <0-4294967295> stub no-summary} {}
paule5b308d2005-10-29 20:19:49 +0000323Prevents an @command{ospfd} ABR from injecting inter-area
324summaries into the specified stub area.
paul718e3742002-12-13 20:15:29 +0000325@end deffn
326
327@deffn {OSPF Command} {area @var{a.b.c.d} default-cost <0-16777215>} {}
328@deffnx {OSPF Command} {no area @var{a.b.c.d} default-cost <0-16777215>} {}
paule5b308d2005-10-29 20:19:49 +0000329Set the cost of default-summary LSAs announced to stubby areas.
paul718e3742002-12-13 20:15:29 +0000330@end deffn
331
332@deffn {OSPF Command} {area @var{a.b.c.d} export-list NAME} {}
333@deffnx {OSPF Command} {area <0-4294967295> export-list NAME} {}
334@deffnx {OSPF Command} {no area @var{a.b.c.d} export-list NAME} {}
335@deffnx {OSPF Command} {no area <0-4294967295> export-list NAME} {}
hasso63869f12004-04-19 14:43:46 +0000336Filter Type-3 summary-LSAs announced to other areas originated from intra-
337area paths from specified area.
paule5b308d2005-10-29 20:19:49 +0000338
hasso63869f12004-04-19 14:43:46 +0000339@example
340@group
341router ospf
342 network 192.168.1.0/24 area 0.0.0.0
343 network 10.0.0.0/8 area 0.0.0.10
344 area 0.0.0.10 export-list foo
345!
346access-list foo permit 10.10.0.0/16
347access-list foo deny any
348@end group
349@end example
paule5b308d2005-10-29 20:19:49 +0000350
hasso63869f12004-04-19 14:43:46 +0000351With example above any intra-area paths from area 0.0.0.10 and from range
35210.10.0.0/16 (for example 10.10.1.0/24 and 10.10.2.128/30) are announced into
353other areas as Type-3 summary-LSA's, but any others (for example 10.11.0.0/16
354or 10.128.30.16/30) aren't.
paule5b308d2005-10-29 20:19:49 +0000355
356This command is only relevant if the router is an ABR for the specified
357area.
paul718e3742002-12-13 20:15:29 +0000358@end deffn
359
360@deffn {OSPF Command} {area @var{a.b.c.d} import-list NAME} {}
361@deffnx {OSPF Command} {area <0-4294967295> import-list NAME} {}
362@deffnx {OSPF Command} {no area @var{a.b.c.d} import-list NAME} {}
363@deffnx {OSPF Command} {no area <0-4294967295> import-list NAME} {}
hasso63869f12004-04-19 14:43:46 +0000364Same as export-list, but it applies to paths announced into specified area as
365Type-3 summary-LSAs.
366@end deffn
367
hasso808c0a72004-04-19 15:10:20 +0000368@deffn {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME in} {}
369@deffnx {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME out} {}
370@deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME in} {}
371@deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME out} {}
372@deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME in} {}
373@deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME out} {}
374@deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME in} {}
375@deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME out} {}
hassoc266ac72004-04-19 17:31:00 +0000376Filtering Type-3 summary-LSAs to/from area using prefix lists. This command
377makes sense in ABR only.
paul718e3742002-12-13 20:15:29 +0000378@end deffn
379
380@deffn {OSPF Command} {area @var{a.b.c.d} authentication} {}
381@deffnx {OSPF Command} {area <0-4294967295> authentication} {}
382@deffnx {OSPF Command} {no area @var{a.b.c.d} authentication} {}
383@deffnx {OSPF Command} {no area <0-4294967295> authentication} {}
paule5b308d2005-10-29 20:19:49 +0000384Specify that simple password authentication should be used for the given
385area.
paul718e3742002-12-13 20:15:29 +0000386@end deffn
387
388@deffn {OSPF Command} {area @var{a.b.c.d} authentication message-digest} {}
389@deffnx {OSPF Command} {area <0-4294967295> authentication message-digest} {}
paule5b308d2005-10-29 20:19:49 +0000390Specify that OSPF packets should be authenticated with MD5 HMACs for the given
391area.
paul718e3742002-12-13 20:15:29 +0000392@end deffn
393
paul76b89b42004-11-06 17:13:09 +0000394@node OSPF interface
paul718e3742002-12-13 20:15:29 +0000395@section OSPF interface
396
paule5b308d2005-10-29 20:19:49 +0000397@deffn {Interface Command} {ip ospf authentication-key @var{AUTH_KEY}} {}
paul718e3742002-12-13 20:15:29 +0000398@deffnx {Interface Command} {no ip ospf authentication-key} {}
399Set OSPF authentication key to a simple password. After setting @var{AUTH_KEY},
400all OSPF packets are authenticated. @var{AUTH_KEY} has length up to 8 chars.
Paul Jakmaf912cb42006-07-27 23:30:16 +0000401
402Simple text password authentication is insecure and deprecated in favour of
403MD5 HMAC authentication (@pxref{OSPF MD5 HMAC authentication}).
paul718e3742002-12-13 20:15:29 +0000404@end deffn
405
Paul Jakmaf912cb42006-07-27 23:30:16 +0000406@anchor{OSPF MD5 HMAC authentication}
paul718e3742002-12-13 20:15:29 +0000407@deffn {Interface Command} {ip ospf message-digest-key KEYID md5 KEY} {}
408@deffnx {Interface Command} {no ip ospf message-digest-key} {}
409Set OSPF authentication key to a cryptographic password. The cryptographic
Paul Jakma466c9652006-06-26 12:55:58 +0000410algorithm is MD5.
411
412KEYID identifies secret key used to create the message digest. This ID
413is part of the protocol and must be consistent across routers on a
414link.
415
416KEY is the actual message digest key, of up to 16 chars (larger strings
417will be truncated), and is associated with the given KEYID.
paule2ea9fe2004-10-11 14:33:23 +0000418
419Note that OSPF MD5 authentication requires that time never go backwards
paule5b308d2005-10-29 20:19:49 +0000420(correct time is NOT important, only that it never goes backwards), even
paule2ea9fe2004-10-11 14:33:23 +0000421across resets, if ospfd is to be able to promptly reestabish adjacencies
422with its neighbours after restarts/reboots. The host should have system
Paul Jakma466c9652006-06-26 12:55:58 +0000423time be set at boot from an external or non-volatile source (eg battery backed clock, NTP,
paule2ea9fe2004-10-11 14:33:23 +0000424etc.) or else the system clock should be periodically saved to non-volative
425storage and restored at boot if MD5 authentication is to be expected to work
426reliably.
paul718e3742002-12-13 20:15:29 +0000427@end deffn
428
429@deffn {Interface Command} {ip ospf cost <1-65535>} {}
430@deffnx {Interface Command} {no ip ospf cost} {}
431Set link cost for the specified interface. The cost value is set to router-LSA's
432metric field and used for SPF calculation.
433@end deffn
434
paule5b308d2005-10-29 20:19:49 +0000435@anchor{ip ospf dead-interval minimal}
paul718e3742002-12-13 20:15:29 +0000436@deffn {Interface Command} {ip ospf dead-interval <1-65535>} {}
paule5b308d2005-10-29 20:19:49 +0000437@deffnx {Interface Command} {ip ospf dead-interval minimal hello-multiplier <2-20>} {}
paul718e3742002-12-13 20:15:29 +0000438@deffnx {Interface Command} {no ip ospf dead-interval} {}
439Set number of seconds for RouterDeadInterval timer value used for Wait Timer
440and Inactivity Timer. This value must be the same for all routers attached
441to a common network. The default value is 40 seconds.
paule5b308d2005-10-29 20:19:49 +0000442
443If 'minimal' is specified instead, then the dead-interval is set to 1
444second and one must specify a hello-multiplier. The hello-multiplier
445specifies how many Hellos to send per second, from 2 (every 500ms) to
44620 (every 50ms). Thus one can have 1s convergence time for OSPF. If this form
447is specified, then the hello-interval advertised in Hello packets is set to
4480 and the hello-interval on received Hello packets is not checked, thus
449the hello-multiplier need NOT be the same across multiple routers on a common
450link.
paul718e3742002-12-13 20:15:29 +0000451@end deffn
452
453@deffn {Interface Command} {ip ospf hello-interval <1-65535>} {}
454@deffnx {Interface Command} {no ip ospf hello-interval} {}
455Set number of seconds for HelloInterval timer value. Setting this value,
456Hello packet will be sent every timer value seconds on the specified interface.
457This value must be the same for all routers attached to a common network.
458The default value is 10 seconds.
paule5b308d2005-10-29 20:19:49 +0000459
460This command has no effect if @ref{ip ospf dead-interval minimal} is also
461specified for the interface.
paul718e3742002-12-13 20:15:29 +0000462@end deffn
463
464@deffn {Interface Command} {ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)} {}
465@deffnx {Interface Command} {no ip ospf network} {}
466Set explicitly network type for specifed interface.
467@end deffn
468
469@deffn {Interface Command} {ip ospf priority <0-255>} {}
470@deffnx {Interface Command} {no ip ospf priority} {}
Paul Jakmaf912cb42006-07-27 23:30:16 +0000471Set RouterPriority integer value. The router with the highest priority
472will be more eligible to become Designated Router. Setting the value
473to 0, makes the router ineligible to become Designated Router. The
474default value is 1.
paul718e3742002-12-13 20:15:29 +0000475@end deffn
476
477@deffn {Interface Command} {ip ospf retransmit-interval <1-65535>} {}
478@deffnx {Interface Command} {no ip ospf retransmit interval} {}
479Set number of seconds for RxmtInterval timer value. This value is used
480when retransmitting Database Description and Link State Request packets.
481The default value is 5 seconds.
482@end deffn
483
484@deffn {Interface Command} {ip ospf transmit-delay} {}
485@deffnx {Interface Command} {no ip ospf transmit-delay} {}
486Set number of seconds for InfTransDelay value. LSAs' age should be
487incremented by this value when transmitting.
488The default value is 1 seconds.
489@end deffn
490
paul76b89b42004-11-06 17:13:09 +0000491@node Redistribute routes to OSPF
paul718e3742002-12-13 20:15:29 +0000492@section Redistribute routes to OSPF
493
Paul Jakmaf912cb42006-07-27 23:30:16 +0000494@anchor{OSPF redistribute}
paul718e3742002-12-13 20:15:29 +0000495@deffn {OSPF Command} {redistribute (kernel|connected|static|rip|bgp)} {}
496@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) @var{route-map}} {}
497@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)} {}
498@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map @var{word}} {}
499@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214>} {}
500@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> route-map @var{word}} {}
501@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214>} {}
502@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214> route-map @var{word}} {}
503@deffnx {OSPF Command} {no redistribute (kernel|connected|static|rip|bgp)} {}
Paul Jakmaf912cb42006-07-27 23:30:16 +0000504Redistribute routes of the specified protocol or kind into OSPF, with
505the metric type and metric set if specified, filtering the routes using
506the given route-map if specified. Redistributed routes may also be
507filtered with distribute-lists, see @ref{ospf distribute-list}.
508
509Redistributed routes are distributed as into OSPF as Type-5 External
510LSAs into links to areas that accept external routes, Type-7 External LSAs
511for NSSA areas and are not redistributed at all into Stub areas, where
512external routes are not permitted.
513
514Note that for connected routes, one may instead use
515@dfn{passive-interface}, see @ref{OSPF passive-interface}.
paul718e3742002-12-13 20:15:29 +0000516@end deffn
517
518@deffn {OSPF Command} {default-information originate} {}
519@deffnx {OSPF Command} {default-information originate metric <0-16777214>} {}
520@deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2)} {}
521@deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
522@deffnx {OSPF Command} {default-information originate always} {}
523@deffnx {OSPF Command} {default-information originate always metric <0-16777214>} {}
524@deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2)} {}
525@deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
526@deffnx {OSPF Command} {no default-information originate} {}
paule5b308d2005-10-29 20:19:49 +0000527Originate an AS-External (type-5) LSA describing a default route into
528all external-routing capable areas, of the specified metric and metric
529type. If the 'always' keyword is given then the default is always
530advertised, even when there is no default present in the routing table.
paul718e3742002-12-13 20:15:29 +0000531@end deffn
532
Paul Jakmaf912cb42006-07-27 23:30:16 +0000533@anchor{ospf distribute-list}
paul718e3742002-12-13 20:15:29 +0000534@deffn {OSPF Command} {distribute-list NAME out (kernel|connected|static|rip|ospf} {}
535@deffnx {OSPF Command} {no distribute-list NAME out (kernel|connected|static|rip|ospf} {}
Paul Jakmaf912cb42006-07-27 23:30:16 +0000536Apply the access-list filter, NAME, to redistributed routes of the given type
537before allowing the routes to redistributed into OSPF (@pxref{OSPF redistribute}).
paul718e3742002-12-13 20:15:29 +0000538@end deffn
539
540@deffn {OSPF Command} {default-metric <0-16777214>} {}
541@deffnx {OSPF Command} {no default-metric} {}
542@end deffn
543
544@deffn {OSPF Command} {distance <1-255>} {}
545@deffnx {OSPF Command} {no distance <1-255>} {}
546@end deffn
547
548@deffn {OSPF Command} {distance ospf (intra-area|inter-area|external) <1-255>} {}
549@deffnx {OSPF Command} {no distance ospf} {}
550@end deffn
551
552@deffn {Command} {router zebra} {}
553@deffnx {Command} {no router zebra} {}
554@end deffn
555
paul76b89b42004-11-06 17:13:09 +0000556@node Showing OSPF information
paul718e3742002-12-13 20:15:29 +0000557@section Showing OSPF information
558
paule5b308d2005-10-29 20:19:49 +0000559@anchor{show ip ospf}
paul718e3742002-12-13 20:15:29 +0000560@deffn {Command} {show ip ospf} {}
paule5b308d2005-10-29 20:19:49 +0000561Show information on a variety of general OSPF and area state and configuration
562information.
paul718e3742002-12-13 20:15:29 +0000563@end deffn
564
565@deffn {Command} {show ip ospf interface [INTERFACE]} {}
paule5b308d2005-10-29 20:19:49 +0000566Show state and configuration of OSPF the specified interface, or all
567interfaces if no interface is given.
paul718e3742002-12-13 20:15:29 +0000568@end deffn
569
570@deffn {Command} {show ip ospf neighbor} {}
571@deffnx {Command} {show ip ospf neighbor INTERFACE} {}
572@deffnx {Command} {show ip ospf neighbor detail} {}
573@deffnx {Command} {show ip ospf neighbor INTERFACE detail} {}
574@end deffn
575
576@deffn {Command} {show ip ospf database} {}
577@end deffn
578
579@deffn {Command} {show ip ospf database (asbr-summary|external|network|router|summary)} {}
580@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id}} {}
581@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} adv-router @var{adv-router}} {}
582@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) adv-router @var{adv-router}} {}
583@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} self-originate} {}
584@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) self-originate} {}
585@end deffn
586
587@deffn {Command} {show ip ospf database max-age} {}
588@end deffn
589
590@deffn {Command} {show ip ospf database self-originate} {}
591@end deffn
592
paul718e3742002-12-13 20:15:29 +0000593@deffn {Command} {show ip ospf route} {}
paule5b308d2005-10-29 20:19:49 +0000594Show the OSPF routing table, as determined by the most recent SPF calculation.
paul718e3742002-12-13 20:15:29 +0000595@end deffn
596
paul76b89b42004-11-06 17:13:09 +0000597@node Debugging OSPF
paul718e3742002-12-13 20:15:29 +0000598@section Debugging OSPF
599
600@deffn {Command} {debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
601@deffnx {Command} {no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
602@end deffn
603
604@deffn {Command} {debug ospf ism} {}
605@deffnx {Command} {debug ospf ism (status|events|timers)} {}
606@deffnx {Command} {no debug ospf ism} {}
607@deffnx {Command} {no debug ospf ism (status|events|timers)} {}
608@end deffn
609
610@deffn {Command} {debug ospf nsm} {}
611@deffnx {Command} {debug ospf nsm (status|events|timers)} {}
612@deffnx {Command} {no debug ospf nsm} {}
613@deffnx {Command} {no debug ospf nsm (status|events|timers)} {}
614@end deffn
615
616@deffn {Command} {debug ospf lsa} {}
617@deffnx {Command} {debug ospf lsa (generate|flooding|refresh)} {}
618@deffnx {Command} {no debug ospf lsa} {}
619@deffnx {Command} {no debug ospf lsa (generate|flooding|refresh)} {}
620@end deffn
621
622@deffn {Command} {debug ospf zebra} {}
623@deffnx {Command} {debug ospf zebra (interface|redistribute)} {}
624@deffnx {Command} {no debug ospf zebra} {}
625@deffnx {Command} {no debug ospf zebra (interface|redistribute)} {}
626@end deffn
627
628@deffn {Command} {show debugging ospf} {}
629@end deffn
630
paule5b308d2005-10-29 20:19:49 +0000631@node OSPF Configuration Examples
632@section OSPF Configuration Examples
633A simple example, with MD5 authentication enabled:
634
635@example
636@group
637!
638interface bge0
639 ip ospf authentication message-digest
640 ip ospf message-digest-key 1 md5 ABCDEFGHIJK
641!
642router ospf
643 network 192.168.0.0/16 area 0.0.0.1
644 area 0.0.0.1 authentication message-digest
645@end group
646@end example
647
648An @acronym{ABR} router, with MD5 authentication and performing summarisation
649of networks between the areas:
650
651@example
652@group
653!
654password ABCDEF
655log file /var/log/quagga/ospfd.log
656service advanced-vty
657!
658interface eth0
659 ip ospf authentication message-digest
660 ip ospf message-digest-key 1 md5 ABCDEFGHIJK
661!
662interface ppp0
663!
664interface br0
665 ip ospf authentication message-digest
666 ip ospf message-digest-key 2 md5 XYZ12345
667!
668router ospf
669 ospf router-id 192.168.0.1
670 redistribute connected
671 passive interface ppp0
672 network 192.168.0.0/24 area 0.0.0.0
673 network 10.0.0.0/16 area 0.0.0.0
674 network 192.168.1.0/24 area 0.0.0.1
675 area 0.0.0.0 authentication message-digest
676 area 0.0.0.0 range 10.0.0.0/16
677 area 0.0.0.0 range 192.168.0.0/24
678 area 0.0.0.1 authentication message-digest
679 area 0.0.0.1 range 10.2.0.0/16
680!
681@end group
682@end example