blob: 65d4e845ae6b5bdcfe8cf6a9175c4641eefd2de8 [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
381algorithm is MD5. KEYID identifies secret key used to create the message
paule2ea9fe2004-10-11 14:33:23 +0000382digest. KEY is the actual message digest key up to 16 chars.
383
384Note that OSPF MD5 authentication requires that time never go backwards
paule5b308d2005-10-29 20:19:49 +0000385(correct time is NOT important, only that it never goes backwards), even
paule2ea9fe2004-10-11 14:33:23 +0000386across resets, if ospfd is to be able to promptly reestabish adjacencies
387with its neighbours after restarts/reboots. The host should have system
388time be set at boot from an external source (eg battery backed clock, NTP,
389etc.) or else the system clock should be periodically saved to non-volative
390storage and restored at boot if MD5 authentication is to be expected to work
391reliably.
paul718e3742002-12-13 20:15:29 +0000392@end deffn
393
394@deffn {Interface Command} {ip ospf cost <1-65535>} {}
395@deffnx {Interface Command} {no ip ospf cost} {}
396Set link cost for the specified interface. The cost value is set to router-LSA's
397metric field and used for SPF calculation.
398@end deffn
399
paule5b308d2005-10-29 20:19:49 +0000400@anchor{ip ospf dead-interval minimal}
paul718e3742002-12-13 20:15:29 +0000401@deffn {Interface Command} {ip ospf dead-interval <1-65535>} {}
paule5b308d2005-10-29 20:19:49 +0000402@deffnx {Interface Command} {ip ospf dead-interval minimal hello-multiplier <2-20>} {}
paul718e3742002-12-13 20:15:29 +0000403@deffnx {Interface Command} {no ip ospf dead-interval} {}
404Set number of seconds for RouterDeadInterval timer value used for Wait Timer
405and Inactivity Timer. This value must be the same for all routers attached
406to a common network. The default value is 40 seconds.
paule5b308d2005-10-29 20:19:49 +0000407
408If 'minimal' is specified instead, then the dead-interval is set to 1
409second and one must specify a hello-multiplier. The hello-multiplier
410specifies how many Hellos to send per second, from 2 (every 500ms) to
41120 (every 50ms). Thus one can have 1s convergence time for OSPF. If this form
412is specified, then the hello-interval advertised in Hello packets is set to
4130 and the hello-interval on received Hello packets is not checked, thus
414the hello-multiplier need NOT be the same across multiple routers on a common
415link.
paul718e3742002-12-13 20:15:29 +0000416@end deffn
417
418@deffn {Interface Command} {ip ospf hello-interval <1-65535>} {}
419@deffnx {Interface Command} {no ip ospf hello-interval} {}
420Set number of seconds for HelloInterval timer value. Setting this value,
421Hello packet will be sent every timer value seconds on the specified interface.
422This value must be the same for all routers attached to a common network.
423The default value is 10 seconds.
paule5b308d2005-10-29 20:19:49 +0000424
425This command has no effect if @ref{ip ospf dead-interval minimal} is also
426specified for the interface.
paul718e3742002-12-13 20:15:29 +0000427@end deffn
428
429@deffn {Interface Command} {ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)} {}
430@deffnx {Interface Command} {no ip ospf network} {}
431Set explicitly network type for specifed interface.
432@end deffn
433
434@deffn {Interface Command} {ip ospf priority <0-255>} {}
435@deffnx {Interface Command} {no ip ospf priority} {}
436Set RouterPriority integer value. Setting higher value, router will be more
437eligible to become Designated Router. Setting the value to 0, router is no
438longer eligible to Designated Router.
439The default value is 1.
440@end deffn
441
442@deffn {Interface Command} {ip ospf retransmit-interval <1-65535>} {}
443@deffnx {Interface Command} {no ip ospf retransmit interval} {}
444Set number of seconds for RxmtInterval timer value. This value is used
445when retransmitting Database Description and Link State Request packets.
446The default value is 5 seconds.
447@end deffn
448
449@deffn {Interface Command} {ip ospf transmit-delay} {}
450@deffnx {Interface Command} {no ip ospf transmit-delay} {}
451Set number of seconds for InfTransDelay value. LSAs' age should be
452incremented by this value when transmitting.
453The default value is 1 seconds.
454@end deffn
455
paul76b89b42004-11-06 17:13:09 +0000456@node Redistribute routes to OSPF
paul718e3742002-12-13 20:15:29 +0000457@section Redistribute routes to OSPF
458
459@deffn {OSPF Command} {redistribute (kernel|connected|static|rip|bgp)} {}
460@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) @var{route-map}} {}
461@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)} {}
462@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map @var{word}} {}
463@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214>} {}
464@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> route-map @var{word}} {}
465@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214>} {}
466@deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214> route-map @var{word}} {}
467@deffnx {OSPF Command} {no redistribute (kernel|connected|static|rip|bgp)} {}
paule5b308d2005-10-29 20:19:49 +0000468Redistribute routes of the specified protocol or kind into OSPF, with the
469metric type and metric set if specified, filtering the routes using the given
470route-map if specified.
paul718e3742002-12-13 20:15:29 +0000471@end deffn
472
473@deffn {OSPF Command} {default-information originate} {}
474@deffnx {OSPF Command} {default-information originate metric <0-16777214>} {}
475@deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2)} {}
476@deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
477@deffnx {OSPF Command} {default-information originate always} {}
478@deffnx {OSPF Command} {default-information originate always metric <0-16777214>} {}
479@deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2)} {}
480@deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
481@deffnx {OSPF Command} {no default-information originate} {}
paule5b308d2005-10-29 20:19:49 +0000482Originate an AS-External (type-5) LSA describing a default route into
483all external-routing capable areas, of the specified metric and metric
484type. If the 'always' keyword is given then the default is always
485advertised, even when there is no default present in the routing table.
paul718e3742002-12-13 20:15:29 +0000486@end deffn
487
488@deffn {OSPF Command} {distribute-list NAME out (kernel|connected|static|rip|ospf} {}
489@deffnx {OSPF Command} {no distribute-list NAME out (kernel|connected|static|rip|ospf} {}
490@end deffn
491
492@deffn {OSPF Command} {default-metric <0-16777214>} {}
493@deffnx {OSPF Command} {no default-metric} {}
494@end deffn
495
496@deffn {OSPF Command} {distance <1-255>} {}
497@deffnx {OSPF Command} {no distance <1-255>} {}
498@end deffn
499
500@deffn {OSPF Command} {distance ospf (intra-area|inter-area|external) <1-255>} {}
501@deffnx {OSPF Command} {no distance ospf} {}
502@end deffn
503
504@deffn {Command} {router zebra} {}
505@deffnx {Command} {no router zebra} {}
506@end deffn
507
paul76b89b42004-11-06 17:13:09 +0000508@node Showing OSPF information
paul718e3742002-12-13 20:15:29 +0000509@section Showing OSPF information
510
paule5b308d2005-10-29 20:19:49 +0000511@anchor{show ip ospf}
paul718e3742002-12-13 20:15:29 +0000512@deffn {Command} {show ip ospf} {}
paule5b308d2005-10-29 20:19:49 +0000513Show information on a variety of general OSPF and area state and configuration
514information.
paul718e3742002-12-13 20:15:29 +0000515@end deffn
516
517@deffn {Command} {show ip ospf interface [INTERFACE]} {}
paule5b308d2005-10-29 20:19:49 +0000518Show state and configuration of OSPF the specified interface, or all
519interfaces if no interface is given.
paul718e3742002-12-13 20:15:29 +0000520@end deffn
521
522@deffn {Command} {show ip ospf neighbor} {}
523@deffnx {Command} {show ip ospf neighbor INTERFACE} {}
524@deffnx {Command} {show ip ospf neighbor detail} {}
525@deffnx {Command} {show ip ospf neighbor INTERFACE detail} {}
526@end deffn
527
528@deffn {Command} {show ip ospf database} {}
529@end deffn
530
531@deffn {Command} {show ip ospf database (asbr-summary|external|network|router|summary)} {}
532@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id}} {}
533@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} adv-router @var{adv-router}} {}
534@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) adv-router @var{adv-router}} {}
535@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} self-originate} {}
536@deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) self-originate} {}
537@end deffn
538
539@deffn {Command} {show ip ospf database max-age} {}
540@end deffn
541
542@deffn {Command} {show ip ospf database self-originate} {}
543@end deffn
544
paul718e3742002-12-13 20:15:29 +0000545@deffn {Command} {show ip ospf route} {}
paule5b308d2005-10-29 20:19:49 +0000546Show the OSPF routing table, as determined by the most recent SPF calculation.
paul718e3742002-12-13 20:15:29 +0000547@end deffn
548
paul76b89b42004-11-06 17:13:09 +0000549@node Debugging OSPF
paul718e3742002-12-13 20:15:29 +0000550@section Debugging OSPF
551
552@deffn {Command} {debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
553@deffnx {Command} {no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
554@end deffn
555
556@deffn {Command} {debug ospf ism} {}
557@deffnx {Command} {debug ospf ism (status|events|timers)} {}
558@deffnx {Command} {no debug ospf ism} {}
559@deffnx {Command} {no debug ospf ism (status|events|timers)} {}
560@end deffn
561
562@deffn {Command} {debug ospf nsm} {}
563@deffnx {Command} {debug ospf nsm (status|events|timers)} {}
564@deffnx {Command} {no debug ospf nsm} {}
565@deffnx {Command} {no debug ospf nsm (status|events|timers)} {}
566@end deffn
567
568@deffn {Command} {debug ospf lsa} {}
569@deffnx {Command} {debug ospf lsa (generate|flooding|refresh)} {}
570@deffnx {Command} {no debug ospf lsa} {}
571@deffnx {Command} {no debug ospf lsa (generate|flooding|refresh)} {}
572@end deffn
573
574@deffn {Command} {debug ospf zebra} {}
575@deffnx {Command} {debug ospf zebra (interface|redistribute)} {}
576@deffnx {Command} {no debug ospf zebra} {}
577@deffnx {Command} {no debug ospf zebra (interface|redistribute)} {}
578@end deffn
579
580@deffn {Command} {show debugging ospf} {}
581@end deffn
582
paule5b308d2005-10-29 20:19:49 +0000583@node OSPF Configuration Examples
584@section OSPF Configuration Examples
585A simple example, with MD5 authentication enabled:
586
587@example
588@group
589!
590interface bge0
591 ip ospf authentication message-digest
592 ip ospf message-digest-key 1 md5 ABCDEFGHIJK
593!
594router ospf
595 network 192.168.0.0/16 area 0.0.0.1
596 area 0.0.0.1 authentication message-digest
597@end group
598@end example
599
600An @acronym{ABR} router, with MD5 authentication and performing summarisation
601of networks between the areas:
602
603@example
604@group
605!
606password ABCDEF
607log file /var/log/quagga/ospfd.log
608service advanced-vty
609!
610interface eth0
611 ip ospf authentication message-digest
612 ip ospf message-digest-key 1 md5 ABCDEFGHIJK
613!
614interface ppp0
615!
616interface br0
617 ip ospf authentication message-digest
618 ip ospf message-digest-key 2 md5 XYZ12345
619!
620router ospf
621 ospf router-id 192.168.0.1
622 redistribute connected
623 passive interface ppp0
624 network 192.168.0.0/24 area 0.0.0.0
625 network 10.0.0.0/16 area 0.0.0.0
626 network 192.168.1.0/24 area 0.0.0.1
627 area 0.0.0.0 authentication message-digest
628 area 0.0.0.0 range 10.0.0.0/16
629 area 0.0.0.0 range 192.168.0.0/24
630 area 0.0.0.1 authentication message-digest
631 area 0.0.0.1 range 10.2.0.0/16
632!
633@end group
634@end example