blob: ff0d78b956659f1b8ad4e78f0dc57b9f72162ed3 [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
93@deffn {OSPF Command} {passive interface @var{interface}} {}
94@deffnx {OSPF Command} {no passive interface @var{interface}} {}
paule5b308d2005-10-29 20:19:49 +000095
96Do not speak OSPF interface on the given interface, but do advertise
97the interface as a stub link in the router-@acronym{LSA,Link State
98Advertisement} for this router. This allows one to advertise addresses
99on such connected interfaces without having to originate
100AS-External/Type-5 LSAs (which have global flooding scope) - as would
101occur if connected addresses were redistributed into OSPF,
102@xref{Redistribute routes to OSPF}.
103
paul718e3742002-12-13 20:15:29 +0000104@end deffn
105
paule5b308d2005-10-29 20:19:49 +0000106@deffn {OSPF Command} {timers throttle spf @var{delay} @var{initial-holdtime} @var{max-holdtime}} {}
107@deffnx {OSPF Command} {no timers throttle spf} {}
108This command sets the initial @var{delay}, the @var{initial-holdtime}
109and the @var{maximum-holdtime} between when SPF is calculated and the
110event which triggered the calculation. The times are specified in
111milliseconds and must be in the range of 0 to 600000 milliseconds.
112
113The @var{delay} specifies the minimum amount of time to delay SPF
114calculation (hence it affects how long SPF calculation is delayed after
115an event which occurs outside of the holdtime of any previous SPF
116calculation, and also serves as a minimum holdtime).
117
118Consecutive SPF calculations will always be seperated by at least
119'hold-time' milliseconds. The hold-time is adaptive and initially is
120set to the @var{initial-holdtime} configured with the above command.
121Events which occur within the holdtime of the previous SPF calculation
122will cause the holdtime to be increased by @var{initial-holdtime}, bounded
123by the @var{maximum-holdtime} configured with this command. If the adaptive
124hold-time elapses without any SPF-triggering event occuring then
125the current holdtime is reset to the @var{initial-holdtime}. The current
126holdtime can be viewed with @ref{show ip ospf}, where it is expressed as
127a multiplier of the @var{initial-holdtime}.
128
129@example
130@group
131router ospf
132 timers throttle spf 200 400 10000
133@end group
134@end example
135
136In this example, the @var{delay} is set to 200ms, the @var{initial
137holdtime} is set to 400ms and the @var{maximum holdtime} to 10s. Hence
138there will always be at least 200ms between an event which requires SPF
139calculation and the actual SPF calculation. Further consecutive SPF
140calculations will always be seperated by between 400ms to 10s, the
141hold-time increasing by 400ms each time an SPF-triggering event occurs
142within the hold-time of the previous SPF calculation.
143
144This command supercedes the @command{timers spf} command in previous Quagga
145releases.
paul718e3742002-12-13 20:15:29 +0000146@end deffn
147
paule5b308d2005-10-29 20:19:49 +0000148@deffn {OSPF Command} {max-metric router-lsa [on-startup|on-shutdown] <5-86400>} {}
149@deffnx {OSPF Command} {max-metric router-lsa administrative} {}
150@deffnx {OSPF Command} {no max-metric router-lsa [on-startup|on-shutdown|administrative]} {}
151This enables @cite{RFC3137, OSPF Stub Router Advertisement} support,
152where the OSPF process describes its transit links in its router-LSA as
153having infinite distance so that other routers will avoid calculating
154transit paths through the router while still being able to reach
155networks through the router.
156
157This support may be enabled administratively (and indefinitely) or
158conditionally. Conditional enabling of max-metric router-lsas can be
159for a period of seconds after startup and/or for a period of seconds
160prior to shutdown.
161
162Enabling this for a period after startup allows OSPF to converge fully
163first without affecting any existing routes used by other routers,
164while still allowing any connected stub links and/or redistributed
165routes to be reachable. Enabling this for a period of time in advance
166of shutdown allows the router to gracefully excuse itself from the OSPF
167domain.
168
169Enabling this feature administratively allows for administrative
170intervention for whatever reason, for an indefinite period of time.
171Note that if the configuration is written to file, this administrative
172form of the stub-router command will also be written to file. If
173@command{ospfd} is restarted later, the command will then take effect
174until manually deconfigured.
175
176Configured state of this feature as well as current status, such as the
177number of second remaining till on-startup or on-shutdown ends, can be
178viewed with the @ref{show ip ospf} command.
paul718e3742002-12-13 20:15:29 +0000179@end deffn
180
paule5b308d2005-10-29 20:19:49 +0000181@deffn {OSPF Command} {auto-cost reference-bandwidth <1-4294967>} {}
182@deffnx {OSPF Command} {no auto-cost reference-bandwidth} {}
183This sets the reference bandwidth for cost calculations, where this
184bandwidth is considered equivalent to an OSPF cost of 1, specified in
185Mbits/s. The default is 100Mbit/s (i.e. a link of bandwidth 100Mbit/s
186or higher will have a cost of 1. Cost of lower bandwidth links will be
187scaled with reference to this cost).
188
189This configuration setting MUST be consistent across all routers within the
190OSPF domain.
paul718e3742002-12-13 20:15:29 +0000191@end deffn
192
193@deffn {OSPF Command} {network @var{a.b.c.d/m} area @var{a.b.c.d}} {}
194@deffnx {OSPF Command} {network @var{a.b.c.d/m} area @var{<0-4294967295>}} {}
195@deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{a.b.c.d}} {}
196@deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{<0-4294967295>}} {}
hassoa5b2b592004-04-17 10:09:29 +0000197This command specifies the OSPF enabled interface(s). If the interface has
198an address from range 192.168.1.0/24 then the command below enables ospf
199on this interface so router can provide network information to the other
200ospf routers via this interface.
paule5b308d2005-10-29 20:19:49 +0000201
paul718e3742002-12-13 20:15:29 +0000202@example
203@group
204router ospf
hassoa5b2b592004-04-17 10:09:29 +0000205 network 192.168.1.0/24 area 0.0.0.0
paul718e3742002-12-13 20:15:29 +0000206@end group
207@end example
paule5b308d2005-10-29 20:19:49 +0000208
hassoa5b2b592004-04-17 10:09:29 +0000209Prefix length in interface must be equal or bigger (ie. smaller network) than
210prefix length in network statement. For example statement above doesn't enable
211ospf on interface with address 192.168.1.1/23, but it does on interface with
212address 192.168.1.129/25.
paul718e3742002-12-13 20:15:29 +0000213@end deffn
214
paul76b89b42004-11-06 17:13:09 +0000215@node OSPF area
paul718e3742002-12-13 20:15:29 +0000216@section OSPF area
217
218@deffn {OSPF Command} {area @var{a.b.c.d} range @var{a.b.c.d/m}} {}
219@deffnx {OSPF Command} {area <0-4294967295> range @var{a.b.c.d/m}} {}
220@deffnx {OSPF Command} {no area @var{a.b.c.d} range @var{a.b.c.d/m}} {}
221@deffnx {OSPF Command} {no area <0-4294967295> range @var{a.b.c.d/m}} {}
hasso63869f12004-04-19 14:43:46 +0000222Summarize intra area paths from specified area into one Type-3 summary-LSA
223announced to other areas. This command can be used only in ABR and ONLY
224router-LSAs (Type-1) and network-LSAs (Type-2) (ie. LSAs with scope area) can
225be summarized. Type-5 AS-external-LSAs can't be summarized - their scope is AS.
226Summarizing Type-7 AS-external-LSAs isn't supported yet by Quagga.
paule5b308d2005-10-29 20:19:49 +0000227
hasso63869f12004-04-19 14:43:46 +0000228@example
229@group
230router ospf
231 network 192.168.1.0/24 area 0.0.0.0
232 network 10.0.0.0/8 area 0.0.0.10
233 area 0.0.0.10 range 10.0.0.0/8
234@end group
235@end example
paule5b308d2005-10-29 20:19:49 +0000236
hasso63869f12004-04-19 14:43:46 +0000237With configuration above one Type-3 Summary-LSA with routing info 10.0.0.0/8 is
238announced into backbone area if area 0.0.0.10 contains at least one intra-area
239network (ie. described with router or network LSA) from this range.
paul718e3742002-12-13 20:15:29 +0000240@end deffn
241
hasso63869f12004-04-19 14:43:46 +0000242@deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {}
243@deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {}
244Instead of summarizing intra area paths filter them - ie. intra area paths from this
245range are not advertised into other areas.
246This command makes sense in ABR only.
247@end deffn
248
hasso6b3fac02004-04-20 04:11:36 +0000249@deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {}
paul718e3742002-12-13 20:15:29 +0000250@deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {}
hasso63869f12004-04-19 14:43:46 +0000251Substitute summarized prefix with another prefix.
paule5b308d2005-10-29 20:19:49 +0000252
hasso63869f12004-04-19 14:43:46 +0000253@example
254@group
255router ospf
256 network 192.168.1.0/24 area 0.0.0.0
257 network 10.0.0.0/8 area 0.0.0.10
258 area 0.0.0.10 range 10.0.0.0/8 substitute 11.0.0.0/8
259@end group
260@end example
paule5b308d2005-10-29 20:19:49 +0000261
hasso63869f12004-04-19 14:43:46 +0000262One Type-3 summary-LSA with routing info 11.0.0.0/8 is announced into backbone area if
263area 0.0.0.10 contains at least one intra-area network (ie. described with router-LSA or
264network-LSA) from range 10.0.0.0/8.
265This command makes sense in ABR only.
paul718e3742002-12-13 20:15:29 +0000266@end deffn
267
268@deffn {OSPF Command} {area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {}
269@deffnx {OSPF Command} {area <0-4294967295> virtual-link @var{a.b.c.d}} {}
270@deffnx {OSPF Command} {no area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {}
271@deffnx {OSPF Command} {no area <0-4294967295> virtual-link @var{a.b.c.d}} {}
272@end deffn
273
274@deffn {OSPF Command} {area @var{a.b.c.d} shortcut} {}
275@deffnx {OSPF Command} {area <0-4294967295> shortcut} {}
276@deffnx {OSPF Command} {no area @var{a.b.c.d} shortcut} {}
277@deffnx {OSPF Command} {no area <0-4294967295> shortcut} {}
paule5b308d2005-10-29 20:19:49 +0000278Configure th area as Shortcut capable. See @cite{RFC3509}. This requires
279that the 'abr-type' be set to 'shortcut'.
paul718e3742002-12-13 20:15:29 +0000280@end deffn
281
282@deffn {OSPF Command} {area @var{a.b.c.d} stub} {}
283@deffnx {OSPF Command} {area <0-4294967295> stub} {}
284@deffnx {OSPF Command} {no area @var{a.b.c.d} stub} {}
285@deffnx {OSPF Command} {no area <0-4294967295> stub} {}
paule5b308d2005-10-29 20:19:49 +0000286Configure the area to be a stub area. That is, an area where no router
287originates routes external to OSPF and hence an area where all external
288routes are via the ABR(s). Hence, ABRs for such an area do not need
289to pass AS-External LSAs (type-5s) or ASBR-Summary LSAs (type-4) into the
290area. They need only pass Network-Summary (type-3) LSAs into such an area,
291just a default summary.
paul718e3742002-12-13 20:15:29 +0000292@end deffn
293
294@deffn {OSPF Command} {area @var{a.b.c.d} stub no-summary} {}
295@deffnx {OSPF Command} {area <0-4294967295> stub no-summary} {}
296@deffnx {OSPF Command} {no area @var{a.b.c.d} stub no-summary} {}
297@deffnx {OSPF Command} {no area <0-4294967295> stub no-summary} {}
paule5b308d2005-10-29 20:19:49 +0000298Prevents an @command{ospfd} ABR from injecting inter-area
299summaries into the specified stub area.
paul718e3742002-12-13 20:15:29 +0000300@end deffn
301
302@deffn {OSPF Command} {area @var{a.b.c.d} default-cost <0-16777215>} {}
303@deffnx {OSPF Command} {no area @var{a.b.c.d} default-cost <0-16777215>} {}
paule5b308d2005-10-29 20:19:49 +0000304Set the cost of default-summary LSAs announced to stubby areas.
paul718e3742002-12-13 20:15:29 +0000305@end deffn
306
307@deffn {OSPF Command} {area @var{a.b.c.d} export-list NAME} {}
308@deffnx {OSPF Command} {area <0-4294967295> export-list NAME} {}
309@deffnx {OSPF Command} {no area @var{a.b.c.d} export-list NAME} {}
310@deffnx {OSPF Command} {no area <0-4294967295> export-list NAME} {}
hasso63869f12004-04-19 14:43:46 +0000311Filter Type-3 summary-LSAs announced to other areas originated from intra-
312area paths from specified area.
paule5b308d2005-10-29 20:19:49 +0000313
hasso63869f12004-04-19 14:43:46 +0000314@example
315@group
316router ospf
317 network 192.168.1.0/24 area 0.0.0.0
318 network 10.0.0.0/8 area 0.0.0.10
319 area 0.0.0.10 export-list foo
320!
321access-list foo permit 10.10.0.0/16
322access-list foo deny any
323@end group
324@end example
paule5b308d2005-10-29 20:19:49 +0000325
hasso63869f12004-04-19 14:43:46 +0000326With example above any intra-area paths from area 0.0.0.10 and from range
32710.10.0.0/16 (for example 10.10.1.0/24 and 10.10.2.128/30) are announced into
328other areas as Type-3 summary-LSA's, but any others (for example 10.11.0.0/16
329or 10.128.30.16/30) aren't.
paule5b308d2005-10-29 20:19:49 +0000330
331This command is only relevant if the router is an ABR for the specified
332area.
paul718e3742002-12-13 20:15:29 +0000333@end deffn
334
335@deffn {OSPF Command} {area @var{a.b.c.d} import-list NAME} {}
336@deffnx {OSPF Command} {area <0-4294967295> import-list NAME} {}
337@deffnx {OSPF Command} {no area @var{a.b.c.d} import-list NAME} {}
338@deffnx {OSPF Command} {no area <0-4294967295> import-list NAME} {}
hasso63869f12004-04-19 14:43:46 +0000339Same as export-list, but it applies to paths announced into specified area as
340Type-3 summary-LSAs.
341@end deffn
342
hasso808c0a72004-04-19 15:10:20 +0000343@deffn {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME in} {}
344@deffnx {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME out} {}
345@deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME in} {}
346@deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME out} {}
347@deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME in} {}
348@deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME out} {}
349@deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME in} {}
350@deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME out} {}
hassoc266ac72004-04-19 17:31:00 +0000351Filtering Type-3 summary-LSAs to/from area using prefix lists. This command
352makes sense in ABR only.
paul718e3742002-12-13 20:15:29 +0000353@end deffn
354
355@deffn {OSPF Command} {area @var{a.b.c.d} authentication} {}
356@deffnx {OSPF Command} {area <0-4294967295> authentication} {}
357@deffnx {OSPF Command} {no area @var{a.b.c.d} authentication} {}
358@deffnx {OSPF Command} {no area <0-4294967295> authentication} {}
paule5b308d2005-10-29 20:19:49 +0000359Specify that simple password authentication should be used for the given
360area.
paul718e3742002-12-13 20:15:29 +0000361@end deffn
362
363@deffn {OSPF Command} {area @var{a.b.c.d} authentication message-digest} {}
364@deffnx {OSPF Command} {area <0-4294967295> authentication message-digest} {}
paule5b308d2005-10-29 20:19:49 +0000365Specify that OSPF packets should be authenticated with MD5 HMACs for the given
366area.
paul718e3742002-12-13 20:15:29 +0000367@end deffn
368
paul76b89b42004-11-06 17:13:09 +0000369@node OSPF interface
paul718e3742002-12-13 20:15:29 +0000370@section OSPF interface
371
paule5b308d2005-10-29 20:19:49 +0000372@deffn {Interface Command} {ip ospf authentication-key @var{AUTH_KEY}} {}
paul718e3742002-12-13 20:15:29 +0000373@deffnx {Interface Command} {no ip ospf authentication-key} {}
374Set OSPF authentication key to a simple password. After setting @var{AUTH_KEY},
375all OSPF packets are authenticated. @var{AUTH_KEY} has length up to 8 chars.
376@end deffn
377
378@deffn {Interface Command} {ip ospf message-digest-key KEYID md5 KEY} {}
379@deffnx {Interface Command} {no ip ospf message-digest-key} {}
380Set OSPF authentication key to a cryptographic password. The cryptographic
Paul Jakma466c9652006-06-26 12:55:58 +0000381algorithm is MD5.
382
383KEYID identifies secret key used to create the message digest. This ID
384is part of the protocol and must be consistent across routers on a
385link.
386
387KEY is the actual message digest key, of up to 16 chars (larger strings
388will be truncated), and is associated with the given KEYID.
paule2ea9fe2004-10-11 14:33:23 +0000389
390Note that OSPF MD5 authentication requires that time never go backwards
paule5b308d2005-10-29 20:19:49 +0000391(correct time is NOT important, only that it never goes backwards), even
paule2ea9fe2004-10-11 14:33:23 +0000392across resets, if ospfd is to be able to promptly reestabish adjacencies
393with its neighbours after restarts/reboots. The host should have system
Paul Jakma466c9652006-06-26 12:55:58 +0000394time be set at boot from an external or non-volatile source (eg battery backed clock, NTP,
paule2ea9fe2004-10-11 14:33:23 +0000395etc.) or else the system clock should be periodically saved to non-volative
396storage and restored at boot if MD5 authentication is to be expected to work
397reliably.
paul718e3742002-12-13 20:15:29 +0000398@end deffn
399
400@deffn {Interface Command} {ip ospf cost <1-65535>} {}
401@deffnx {Interface Command} {no ip ospf cost} {}
402Set link cost for the specified interface. The cost value is set to router-LSA's
403metric field and used for SPF calculation.
404@end deffn
405
paule5b308d2005-10-29 20:19:49 +0000406@anchor{ip ospf dead-interval minimal}
paul718e3742002-12-13 20:15:29 +0000407@deffn {Interface Command} {ip ospf dead-interval <1-65535>} {}
paule5b308d2005-10-29 20:19:49 +0000408@deffnx {Interface Command} {ip ospf dead-interval minimal hello-multiplier <2-20>} {}
paul718e3742002-12-13 20:15:29 +0000409@deffnx {Interface Command} {no ip ospf dead-interval} {}
410Set number of seconds for RouterDeadInterval timer value used for Wait Timer
411and Inactivity Timer. This value must be the same for all routers attached
412to a common network. The default value is 40 seconds.
paule5b308d2005-10-29 20:19:49 +0000413
414If 'minimal' is specified instead, then the dead-interval is set to 1
415second and one must specify a hello-multiplier. The hello-multiplier
416specifies how many Hellos to send per second, from 2 (every 500ms) to
41720 (every 50ms). Thus one can have 1s convergence time for OSPF. If this form
418is specified, then the hello-interval advertised in Hello packets is set to
4190 and the hello-interval on received Hello packets is not checked, thus
420the hello-multiplier need NOT be the same across multiple routers on a common
421link.
paul718e3742002-12-13 20:15:29 +0000422@end deffn
423
424@deffn {Interface Command} {ip ospf hello-interval <1-65535>} {}
425@deffnx {Interface Command} {no ip ospf hello-interval} {}
426Set number of seconds for HelloInterval timer value. Setting this value,
427Hello packet will be sent every timer value seconds on the specified interface.
428This value must be the same for all routers attached to a common network.
429The default value is 10 seconds.
paule5b308d2005-10-29 20:19:49 +0000430
431This command has no effect if @ref{ip ospf dead-interval minimal} is also
432specified for the interface.
paul718e3742002-12-13 20:15:29 +0000433@end deffn
434
435@deffn {Interface Command} {ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)} {}
436@deffnx {Interface Command} {no ip ospf network} {}
437Set explicitly network type for specifed interface.
438@end deffn
439
440@deffn {Interface Command} {ip ospf priority <0-255>} {}
441@deffnx {Interface Command} {no ip ospf priority} {}
442Set RouterPriority integer value. Setting higher value, router will be more
443eligible to become Designated Router. Setting the value to 0, router is no
444longer eligible to Designated Router.
445The default value is 1.
446@end deffn
447
448@deffn {Interface Command} {ip ospf retransmit-interval <1-65535>} {}
449@deffnx {Interface Command} {no ip ospf retransmit interval} {}
450Set number of seconds for RxmtInterval timer value. This value is used
451when retransmitting Database Description and Link State Request packets.
452The default value is 5 seconds.
453@end deffn
454
455@deffn {Interface Command} {ip ospf transmit-delay} {}
456@deffnx {Interface Command} {no ip ospf transmit-delay} {}
457Set number of seconds for InfTransDelay value. LSAs' age should be
458incremented by this value when transmitting.
459The default value is 1 seconds.
460@end deffn
461
paul76b89b42004-11-06 17:13:09 +0000462@node Redistribute routes to OSPF
paul718e3742002-12-13 20:15:29 +0000463@section Redistribute routes to OSPF
464
465@deffn {OSPF Command} {redistribute (kernel|connected|static|rip|bgp)} {}
466@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) @var{route-map}} {}
467@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)} {}
468@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map @var{word}} {}
469@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214>} {}
470@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> route-map @var{word}} {}
471@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214>} {}
472@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214> route-map @var{word}} {}
473@deffnx {OSPF Command} {no redistribute (kernel|connected|static|rip|bgp)} {}
paule5b308d2005-10-29 20:19:49 +0000474Redistribute routes of the specified protocol or kind into OSPF, with the
475metric type and metric set if specified, filtering the routes using the given
476route-map if specified.
paul718e3742002-12-13 20:15:29 +0000477@end deffn
478
479@deffn {OSPF Command} {default-information originate} {}
480@deffnx {OSPF Command} {default-information originate metric <0-16777214>} {}
481@deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2)} {}
482@deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
483@deffnx {OSPF Command} {default-information originate always} {}
484@deffnx {OSPF Command} {default-information originate always metric <0-16777214>} {}
485@deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2)} {}
486@deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
487@deffnx {OSPF Command} {no default-information originate} {}
paule5b308d2005-10-29 20:19:49 +0000488Originate an AS-External (type-5) LSA describing a default route into
489all external-routing capable areas, of the specified metric and metric
490type. If the 'always' keyword is given then the default is always
491advertised, even when there is no default present in the routing table.
paul718e3742002-12-13 20:15:29 +0000492@end deffn
493
494@deffn {OSPF Command} {distribute-list NAME out (kernel|connected|static|rip|ospf} {}
495@deffnx {OSPF Command} {no distribute-list NAME out (kernel|connected|static|rip|ospf} {}
496@end deffn
497
498@deffn {OSPF Command} {default-metric <0-16777214>} {}
499@deffnx {OSPF Command} {no default-metric} {}
500@end deffn
501
502@deffn {OSPF Command} {distance <1-255>} {}
503@deffnx {OSPF Command} {no distance <1-255>} {}
504@end deffn
505
506@deffn {OSPF Command} {distance ospf (intra-area|inter-area|external) <1-255>} {}
507@deffnx {OSPF Command} {no distance ospf} {}
508@end deffn
509
510@deffn {Command} {router zebra} {}
511@deffnx {Command} {no router zebra} {}
512@end deffn
513
paul76b89b42004-11-06 17:13:09 +0000514@node Showing OSPF information
paul718e3742002-12-13 20:15:29 +0000515@section Showing OSPF information
516
paule5b308d2005-10-29 20:19:49 +0000517@anchor{show ip ospf}
paul718e3742002-12-13 20:15:29 +0000518@deffn {Command} {show ip ospf} {}
paule5b308d2005-10-29 20:19:49 +0000519Show information on a variety of general OSPF and area state and configuration
520information.
paul718e3742002-12-13 20:15:29 +0000521@end deffn
522
523@deffn {Command} {show ip ospf interface [INTERFACE]} {}
paule5b308d2005-10-29 20:19:49 +0000524Show state and configuration of OSPF the specified interface, or all
525interfaces if no interface is given.
paul718e3742002-12-13 20:15:29 +0000526@end deffn
527
528@deffn {Command} {show ip ospf neighbor} {}
529@deffnx {Command} {show ip ospf neighbor INTERFACE} {}
530@deffnx {Command} {show ip ospf neighbor detail} {}
531@deffnx {Command} {show ip ospf neighbor INTERFACE detail} {}
532@end deffn
533
534@deffn {Command} {show ip ospf database} {}
535@end deffn
536
537@deffn {Command} {show ip ospf database (asbr-summary|external|network|router|summary)} {}
538@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id}} {}
539@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} adv-router @var{adv-router}} {}
540@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) adv-router @var{adv-router}} {}
541@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} self-originate} {}
542@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) self-originate} {}
543@end deffn
544
545@deffn {Command} {show ip ospf database max-age} {}
546@end deffn
547
548@deffn {Command} {show ip ospf database self-originate} {}
549@end deffn
550
paul718e3742002-12-13 20:15:29 +0000551@deffn {Command} {show ip ospf route} {}
paule5b308d2005-10-29 20:19:49 +0000552Show the OSPF routing table, as determined by the most recent SPF calculation.
paul718e3742002-12-13 20:15:29 +0000553@end deffn
554
paul76b89b42004-11-06 17:13:09 +0000555@node Debugging OSPF
paul718e3742002-12-13 20:15:29 +0000556@section Debugging OSPF
557
558@deffn {Command} {debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
559@deffnx {Command} {no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
560@end deffn
561
562@deffn {Command} {debug ospf ism} {}
563@deffnx {Command} {debug ospf ism (status|events|timers)} {}
564@deffnx {Command} {no debug ospf ism} {}
565@deffnx {Command} {no debug ospf ism (status|events|timers)} {}
566@end deffn
567
568@deffn {Command} {debug ospf nsm} {}
569@deffnx {Command} {debug ospf nsm (status|events|timers)} {}
570@deffnx {Command} {no debug ospf nsm} {}
571@deffnx {Command} {no debug ospf nsm (status|events|timers)} {}
572@end deffn
573
574@deffn {Command} {debug ospf lsa} {}
575@deffnx {Command} {debug ospf lsa (generate|flooding|refresh)} {}
576@deffnx {Command} {no debug ospf lsa} {}
577@deffnx {Command} {no debug ospf lsa (generate|flooding|refresh)} {}
578@end deffn
579
580@deffn {Command} {debug ospf zebra} {}
581@deffnx {Command} {debug ospf zebra (interface|redistribute)} {}
582@deffnx {Command} {no debug ospf zebra} {}
583@deffnx {Command} {no debug ospf zebra (interface|redistribute)} {}
584@end deffn
585
586@deffn {Command} {show debugging ospf} {}
587@end deffn
588
paule5b308d2005-10-29 20:19:49 +0000589@node OSPF Configuration Examples
590@section OSPF Configuration Examples
591A simple example, with MD5 authentication enabled:
592
593@example
594@group
595!
596interface bge0
597 ip ospf authentication message-digest
598 ip ospf message-digest-key 1 md5 ABCDEFGHIJK
599!
600router ospf
601 network 192.168.0.0/16 area 0.0.0.1
602 area 0.0.0.1 authentication message-digest
603@end group
604@end example
605
606An @acronym{ABR} router, with MD5 authentication and performing summarisation
607of networks between the areas:
608
609@example
610@group
611!
612password ABCDEF
613log file /var/log/quagga/ospfd.log
614service advanced-vty
615!
616interface eth0
617 ip ospf authentication message-digest
618 ip ospf message-digest-key 1 md5 ABCDEFGHIJK
619!
620interface ppp0
621!
622interface br0
623 ip ospf authentication message-digest
624 ip ospf message-digest-key 2 md5 XYZ12345
625!
626router ospf
627 ospf router-id 192.168.0.1
628 redistribute connected
629 passive interface ppp0
630 network 192.168.0.0/24 area 0.0.0.0
631 network 10.0.0.0/16 area 0.0.0.0
632 network 192.168.1.0/24 area 0.0.0.1
633 area 0.0.0.0 authentication message-digest
634 area 0.0.0.0 range 10.0.0.0/16
635 area 0.0.0.0 range 192.168.0.0/24
636 area 0.0.0.1 authentication message-digest
637 area 0.0.0.1 range 10.2.0.0/16
638!
639@end group
640@end example