6 @acronym{OSPF,Open Shortest Path First} version 2 is a routing protocol
7 which is described in @cite{RFC2328, OSPF Version 2}. OSPF is an
8 @acronym{IGP,Interior Gateway Protocol}. Compared with @acronym{RIP},
9 @acronym{OSPF} can provide scalable network support and faster
10 convergence times. OSPF is widely used in large networks such as
11 @acronym{ISP,Internet Service Provider} backbone and enterprise
20 * Redistribute routes to OSPF::
21 * Showing OSPF information::
23 * OSPF Traffic Engineering::
24 * Router Information::
26 * OSPF Configuration Examples::
29 @include ospf_fundamentals.texi
31 @node Configuring ospfd
32 @section Configuring ospfd
34 There are no @command{ospfd} specific options. Common options can be
35 specified (@pxref{Common Invocation Options}) to @command{ospfd}.
36 @command{ospfd} needs to acquire interface information from
37 @command{zebra} in order to function. Therefore @command{zebra} must be
38 running before invoking @command{ospfd}. Also, if @command{zebra} is
39 restarted then @command{ospfd} must be too.
41 Like other daemons, @command{ospfd} configuration is done in @acronym{OSPF}
42 specific configuration file @file{ospfd.conf}.
47 To start OSPF process you have to specify the OSPF router. As of this
48 writing, @command{ospfd} does not support multiple OSPF processes.
50 @deffn Command {router ospf} {}
51 @deffnx Command {no router ospf} {}
52 Enable or disable the OSPF process. @command{ospfd} does not yet
53 support multiple OSPF processes. So you can not specify an OSPF process
57 @deffn {OSPF Command} {ospf router-id @var{a.b.c.d}} {}
58 @deffnx {OSPF Command} {no ospf router-id} {}
59 @anchor{ospf router-id}This sets the router-ID of the OSPF process. The
60 router-ID may be an IP address of the router, but need not be - it can
61 be any arbitrary 32bit number. However it MUST be unique within the
62 entire OSPF domain to the OSPF speaker - bad things will happen if
63 multiple OSPF speakers are configured with the same router-ID! If one
64 is not specified then @command{ospfd} will obtain a router-ID
65 automatically from @command{zebra}.
68 @deffn {OSPF Command} {ospf abr-type @var{type}} {}
69 @deffnx {OSPF Command} {no ospf abr-type @var{type}} {}
70 @var{type} can be cisco|ibm|shortcut|standard. The "Cisco" and "IBM" types
73 The OSPF standard for ABR behaviour does not allow an ABR to consider
74 routes through non-backbone areas when its links to the backbone are
75 down, even when there are other ABRs in attached non-backbone areas
76 which still can reach the backbone - this restriction exists primarily
77 to ensure routing-loops are avoided.
79 With the "Cisco" or "IBM" ABR type, the default in this release of
80 Quagga, this restriction is lifted, allowing an ABR to consider
81 summaries learnt from other ABRs through non-backbone areas, and hence
82 route via non-backbone areas as a last resort when, and only when,
83 backbone links are down.
85 Note that areas with fully-adjacent virtual-links are considered to be
86 "transit capable" and can always be used to route backbone traffic, and
87 hence are unaffected by this setting (@pxref{OSPF virtual-link}).
89 More information regarding the behaviour controlled by this command can
90 be found in @cite{RFC 3509, Alternative Implementations of OSPF Area
91 Border Routers}, and @cite{draft-ietf-ospf-shortcut-abr-02.txt}.
93 Quote: "Though the definition of the @acronym{ABR,Area Border Router}
94 in the OSPF specification does not require a router with multiple
95 attached areas to have a backbone connection, it is actually
96 necessary to provide successful routing to the inter-area and
97 external destinations. If this requirement is not met, all traffic
98 destined for the areas not connected to such an ABR or out of the
99 OSPF domain, is dropped. This document describes alternative ABR
100 behaviors implemented in Cisco and IBM routers."
103 @deffn {OSPF Command} {ospf rfc1583compatibility} {}
104 @deffnx {OSPF Command} {no ospf rfc1583compatibility} {}
105 @cite{RFC2328}, the sucessor to @cite{RFC1583}, suggests according
106 to section G.2 (changes) in section 16.4 a change to the path
107 preference algorithm that prevents possible routing loops that were
108 possible in the old version of OSPFv2. More specifically it demands
109 that inter-area paths and intra-area backbone path are now of equal preference
110 but still both preferred to external paths.
112 This command should NOT be set normally.
115 @deffn {OSPF Command} {log-adjacency-changes [detail]} {}
116 @deffnx {OSPF Command} {no log-adjacency-changes [detail]} {}
117 Configures ospfd to log changes in adjacency. With the optional
118 detail argument, all changes in adjacency status are shown. Without detail,
119 only changes to full or regressions are shown.
122 @deffn {OSPF Command} {passive-interface @var{interface}} {}
123 @deffnx {OSPF Command} {no passive-interface @var{interface}} {}
124 @anchor{OSPF passive-interface} Do not speak OSPF interface on the
125 given interface, but do advertise the interface as a stub link in the
126 router-@acronym{LSA,Link State Advertisement} for this router. This
127 allows one to advertise addresses on such connected interfaces without
128 having to originate AS-External/Type-5 LSAs (which have global flooding
129 scope) - as would occur if connected addresses were redistributed into
130 OSPF (@pxref{Redistribute routes to OSPF})@. This is the only way to
131 advertise non-OSPF links into stub areas.
134 @deffn {OSPF Command} {timers throttle spf @var{delay} @var{initial-holdtime} @var{max-holdtime}} {}
135 @deffnx {OSPF Command} {no timers throttle spf} {}
136 This command sets the initial @var{delay}, the @var{initial-holdtime}
137 and the @var{maximum-holdtime} between when SPF is calculated and the
138 event which triggered the calculation. The times are specified in
139 milliseconds and must be in the range of 0 to 600000 milliseconds.
141 The @var{delay} specifies the minimum amount of time to delay SPF
142 calculation (hence it affects how long SPF calculation is delayed after
143 an event which occurs outside of the holdtime of any previous SPF
144 calculation, and also serves as a minimum holdtime).
146 Consecutive SPF calculations will always be seperated by at least
147 'hold-time' milliseconds. The hold-time is adaptive and initially is
148 set to the @var{initial-holdtime} configured with the above command.
149 Events which occur within the holdtime of the previous SPF calculation
150 will cause the holdtime to be increased by @var{initial-holdtime}, bounded
151 by the @var{maximum-holdtime} configured with this command. If the adaptive
152 hold-time elapses without any SPF-triggering event occuring then
153 the current holdtime is reset to the @var{initial-holdtime}. The current
154 holdtime can be viewed with @ref{show ip ospf}, where it is expressed as
155 a multiplier of the @var{initial-holdtime}.
160 timers throttle spf 200 400 10000
164 In this example, the @var{delay} is set to 200ms, the @var{initial
165 holdtime} is set to 400ms and the @var{maximum holdtime} to 10s. Hence
166 there will always be at least 200ms between an event which requires SPF
167 calculation and the actual SPF calculation. Further consecutive SPF
168 calculations will always be seperated by between 400ms to 10s, the
169 hold-time increasing by 400ms each time an SPF-triggering event occurs
170 within the hold-time of the previous SPF calculation.
172 This command supercedes the @command{timers spf} command in previous Quagga
176 @deffn {OSPF Command} {max-metric router-lsa [on-startup|on-shutdown] <5-86400>} {}
177 @deffnx {OSPF Command} {max-metric router-lsa administrative} {}
178 @deffnx {OSPF Command} {no max-metric router-lsa [on-startup|on-shutdown|administrative]} {}
179 This enables @cite{RFC3137, OSPF Stub Router Advertisement} support,
180 where the OSPF process describes its transit links in its router-LSA as
181 having infinite distance so that other routers will avoid calculating
182 transit paths through the router while still being able to reach
183 networks through the router.
185 This support may be enabled administratively (and indefinitely) or
186 conditionally. Conditional enabling of max-metric router-lsas can be
187 for a period of seconds after startup and/or for a period of seconds
190 Enabling this for a period after startup allows OSPF to converge fully
191 first without affecting any existing routes used by other routers,
192 while still allowing any connected stub links and/or redistributed
193 routes to be reachable. Enabling this for a period of time in advance
194 of shutdown allows the router to gracefully excuse itself from the OSPF
197 Enabling this feature administratively allows for administrative
198 intervention for whatever reason, for an indefinite period of time.
199 Note that if the configuration is written to file, this administrative
200 form of the stub-router command will also be written to file. If
201 @command{ospfd} is restarted later, the command will then take effect
202 until manually deconfigured.
204 Configured state of this feature as well as current status, such as the
205 number of second remaining till on-startup or on-shutdown ends, can be
206 viewed with the @ref{show ip ospf} command.
209 @deffn {OSPF Command} {auto-cost reference-bandwidth <1-4294967>} {}
210 @deffnx {OSPF Command} {no auto-cost reference-bandwidth} {}
211 @anchor{OSPF auto-cost reference-bandwidth}This sets the reference
212 bandwidth for cost calculations, where this bandwidth is considered
213 equivalent to an OSPF cost of 1, specified in Mbits/s. The default is
214 100Mbit/s (i.e. a link of bandwidth 100Mbit/s or higher will have a
215 cost of 1. Cost of lower bandwidth links will be scaled with reference
218 This configuration setting MUST be consistent across all routers within the
222 @deffn {OSPF Command} {network @var{a.b.c.d/m} area @var{a.b.c.d}} {}
223 @deffnx {OSPF Command} {network @var{a.b.c.d/m} area @var{<0-4294967295>}} {}
224 @deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{a.b.c.d}} {}
225 @deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{<0-4294967295>}} {}
226 @anchor{OSPF network command}
227 This command specifies the OSPF enabled interface(s). If the interface has
228 an address from range 192.168.1.0/24 then the command below enables ospf
229 on this interface so router can provide network information to the other
230 ospf routers via this interface.
235 network 192.168.1.0/24 area 0.0.0.0
239 Prefix length in interface must be equal or bigger (ie. smaller network) than
240 prefix length in network statement. For example statement above doesn't enable
241 ospf on interface with address 192.168.1.1/23, but it does on interface with
242 address 192.168.1.129/25.
244 Note that the behavior when there is a peer address
245 defined on an interface changed after release 0.99.7.
246 Currently, if a peer prefix has been configured,
247 then we test whether the prefix in the network command contains
248 the destination prefix. Otherwise, we test whether the network command prefix
249 contains the local address prefix of the interface.
251 In some cases it may be more convenient to enable OSPF on a per
252 interface/subnet basis (@pxref{OSPF ip ospf area command}).
259 @deffn {OSPF Command} {area @var{a.b.c.d} range @var{a.b.c.d/m}} {}
260 @deffnx {OSPF Command} {area <0-4294967295> range @var{a.b.c.d/m}} {}
261 @deffnx {OSPF Command} {no area @var{a.b.c.d} range @var{a.b.c.d/m}} {}
262 @deffnx {OSPF Command} {no area <0-4294967295> range @var{a.b.c.d/m}} {}
263 Summarize intra area paths from specified area into one Type-3 summary-LSA
264 announced to other areas. This command can be used only in ABR and ONLY
265 router-LSAs (Type-1) and network-LSAs (Type-2) (ie. LSAs with scope area) can
266 be summarized. Type-5 AS-external-LSAs can't be summarized - their scope is AS.
267 Summarizing Type-7 AS-external-LSAs isn't supported yet by Quagga.
272 network 192.168.1.0/24 area 0.0.0.0
273 network 10.0.0.0/8 area 0.0.0.10
274 area 0.0.0.10 range 10.0.0.0/8
278 With configuration above one Type-3 Summary-LSA with routing info 10.0.0.0/8 is
279 announced into backbone area if area 0.0.0.10 contains at least one intra-area
280 network (ie. described with router or network LSA) from this range.
283 @deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {}
284 @deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {}
285 Instead of summarizing intra area paths filter them - ie. intra area paths from this
286 range are not advertised into other areas.
287 This command makes sense in ABR only.
290 @deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {}
291 @deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {}
292 Substitute summarized prefix with another prefix.
297 network 192.168.1.0/24 area 0.0.0.0
298 network 10.0.0.0/8 area 0.0.0.10
299 area 0.0.0.10 range 10.0.0.0/8 substitute 11.0.0.0/8
303 One Type-3 summary-LSA with routing info 11.0.0.0/8 is announced into backbone area if
304 area 0.0.0.10 contains at least one intra-area network (ie. described with router-LSA or
305 network-LSA) from range 10.0.0.0/8.
306 This command makes sense in ABR only.
309 @deffn {OSPF Command} {area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {}
310 @deffnx {OSPF Command} {area <0-4294967295> virtual-link @var{a.b.c.d}} {}
311 @deffnx {OSPF Command} {no area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {}
312 @deffnx {OSPF Command} {no area <0-4294967295> virtual-link @var{a.b.c.d}} {}
313 @anchor{OSPF virtual-link}
316 @deffn {OSPF Command} {area @var{a.b.c.d} shortcut} {}
317 @deffnx {OSPF Command} {area <0-4294967295> shortcut} {}
318 @deffnx {OSPF Command} {no area @var{a.b.c.d} shortcut} {}
319 @deffnx {OSPF Command} {no area <0-4294967295> shortcut} {}
320 Configure the area as Shortcut capable. See @cite{RFC3509}. This requires
321 that the 'abr-type' be set to 'shortcut'.
324 @deffn {OSPF Command} {area @var{a.b.c.d} stub} {}
325 @deffnx {OSPF Command} {area <0-4294967295> stub} {}
326 @deffnx {OSPF Command} {no area @var{a.b.c.d} stub} {}
327 @deffnx {OSPF Command} {no area <0-4294967295> stub} {}
328 Configure the area to be a stub area. That is, an area where no router
329 originates routes external to OSPF and hence an area where all external
330 routes are via the ABR(s). Hence, ABRs for such an area do not need
331 to pass AS-External LSAs (type-5s) or ASBR-Summary LSAs (type-4) into the
332 area. They need only pass Network-Summary (type-3) LSAs into such an area,
333 along with a default-route summary.
336 @deffn {OSPF Command} {area @var{a.b.c.d} stub no-summary} {}
337 @deffnx {OSPF Command} {area <0-4294967295> stub no-summary} {}
338 @deffnx {OSPF Command} {no area @var{a.b.c.d} stub no-summary} {}
339 @deffnx {OSPF Command} {no area <0-4294967295> stub no-summary} {}
340 Prevents an @command{ospfd} ABR from injecting inter-area
341 summaries into the specified stub area.
344 @deffn {OSPF Command} {area @var{a.b.c.d} default-cost <0-16777215>} {}
345 @deffnx {OSPF Command} {no area @var{a.b.c.d} default-cost <0-16777215>} {}
346 Set the cost of default-summary LSAs announced to stubby areas.
349 @deffn {OSPF Command} {area @var{a.b.c.d} export-list NAME} {}
350 @deffnx {OSPF Command} {area <0-4294967295> export-list NAME} {}
351 @deffnx {OSPF Command} {no area @var{a.b.c.d} export-list NAME} {}
352 @deffnx {OSPF Command} {no area <0-4294967295> export-list NAME} {}
353 Filter Type-3 summary-LSAs announced to other areas originated from intra-
354 area paths from specified area.
359 network 192.168.1.0/24 area 0.0.0.0
360 network 10.0.0.0/8 area 0.0.0.10
361 area 0.0.0.10 export-list foo
363 access-list foo permit 10.10.0.0/16
364 access-list foo deny any
368 With example above any intra-area paths from area 0.0.0.10 and from range
369 10.10.0.0/16 (for example 10.10.1.0/24 and 10.10.2.128/30) are announced into
370 other areas as Type-3 summary-LSA's, but any others (for example 10.11.0.0/16
371 or 10.128.30.16/30) aren't.
373 This command is only relevant if the router is an ABR for the specified
377 @deffn {OSPF Command} {area @var{a.b.c.d} import-list NAME} {}
378 @deffnx {OSPF Command} {area <0-4294967295> import-list NAME} {}
379 @deffnx {OSPF Command} {no area @var{a.b.c.d} import-list NAME} {}
380 @deffnx {OSPF Command} {no area <0-4294967295> import-list NAME} {}
381 Same as export-list, but it applies to paths announced into specified area as
385 @deffn {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME in} {}
386 @deffnx {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME out} {}
387 @deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME in} {}
388 @deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME out} {}
389 @deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME in} {}
390 @deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME out} {}
391 @deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME in} {}
392 @deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME out} {}
393 Filtering Type-3 summary-LSAs to/from area using prefix lists. This command
394 makes sense in ABR only.
397 @deffn {OSPF Command} {area @var{a.b.c.d} authentication} {}
398 @deffnx {OSPF Command} {area <0-4294967295> authentication} {}
399 @deffnx {OSPF Command} {no area @var{a.b.c.d} authentication} {}
400 @deffnx {OSPF Command} {no area <0-4294967295> authentication} {}
401 Specify that simple password authentication should be used for the given
405 @deffn {OSPF Command} {area @var{a.b.c.d} authentication message-digest} {}
406 @deffnx {OSPF Command} {area <0-4294967295> authentication message-digest} {}
408 @anchor{area authentication message-digest}Specify that OSPF packets
409 must be authenticated with MD5 HMACs within the given area. Keying
410 material must also be configured on a per-interface basis (@pxref{ip
411 ospf message-digest-key}).
413 MD5 authentication may also be configured on a per-interface basis
414 (@pxref{ip ospf authentication message-digest}). Such per-interface
415 settings will override any per-area authentication setting.
419 @section OSPF interface
421 @deffn {Interface Command} {ip ospf area @var{AREA} [@var{ADDR}]} {}
422 @deffnx {Interface Command} {no ip ospf area [@var{ADDR}]} {}
423 @anchor{OSPF ip ospf area command}
425 Enable OSPF on the interface, optionally restricted to just the IP address
426 given by @var{ADDR}, putting it in the @var{AREA} area. Per interface area
427 settings take precedence to network commands (@pxref{OSPF network command}).
429 If you have a lot of interfaces, and/or a lot of subnets, then enabling OSPF
430 via this command may result in a slight performance improvement.
434 @deffn {Interface Command} {ip ospf authentication-key @var{AUTH_KEY}} {}
435 @deffnx {Interface Command} {no ip ospf authentication-key} {}
436 Set OSPF authentication key to a simple password. After setting @var{AUTH_KEY},
437 all OSPF packets are authenticated. @var{AUTH_KEY} has length up to 8 chars.
439 Simple text password authentication is insecure and deprecated in favour of
440 MD5 HMAC authentication (@pxref{ip ospf authentication message-digest}).
443 @deffn {Interface Command} {ip ospf authentication message-digest} {}
444 @anchor{ip ospf authentication message-digest}Specify that MD5 HMAC
445 authentication must be used on this interface. MD5 keying material must
446 also be configured (@pxref{ip ospf message-digest-key}). Overrides any
447 authentication enabled on a per-area basis (@pxref{area
448 authentication message-digest}).
450 Note that OSPF MD5 authentication requires that time never go backwards
451 (correct time is NOT important, only that it never goes backwards), even
452 across resets, if ospfd is to be able to promptly reestabish adjacencies
453 with its neighbours after restarts/reboots. The host should have system
454 time be set at boot from an external or non-volatile source (eg battery backed clock, NTP,
455 etc.) or else the system clock should be periodically saved to non-volative
456 storage and restored at boot if MD5 authentication is to be expected to work
460 @deffn {Interface Command} {ip ospf message-digest-key KEYID md5 KEY} {}
461 @deffnx {Interface Command} {no ip ospf message-digest-key} {}
462 @anchor{ip ospf message-digest-key}Set OSPF authentication key to a
463 cryptographic password. The cryptographic algorithm is MD5.
465 KEYID identifies secret key used to create the message digest. This ID
466 is part of the protocol and must be consistent across routers on a
469 KEY is the actual message digest key, of up to 16 chars (larger strings
470 will be truncated), and is associated with the given KEYID.
473 @deffn {Interface Command} {ip ospf cost <1-65535>} {}
474 @deffnx {Interface Command} {no ip ospf cost} {}
475 Set link cost for the specified interface. The cost value is set to router-LSA's
476 metric field and used for SPF calculation.
479 @deffn {Interface Command} {ip ospf dead-interval <1-65535>} {}
480 @deffnx {Interface Command} {ip ospf dead-interval minimal hello-multiplier <2-20>} {}
481 @deffnx {Interface Command} {no ip ospf dead-interval} {}
482 @anchor{ip ospf dead-interval minimal} Set number of seconds for
483 RouterDeadInterval timer value used for Wait Timer and Inactivity
484 Timer. This value must be the same for all routers attached to a
485 common network. The default value is 40 seconds.
487 If 'minimal' is specified instead, then the dead-interval is set to 1
488 second and one must specify a hello-multiplier. The hello-multiplier
489 specifies how many Hellos to send per second, from 2 (every 500ms) to
490 20 (every 50ms). Thus one can have 1s convergence time for OSPF. If this form
491 is specified, then the hello-interval advertised in Hello packets is set to
492 0 and the hello-interval on received Hello packets is not checked, thus
493 the hello-multiplier need NOT be the same across multiple routers on a common
497 @deffn {Interface Command} {ip ospf hello-interval <1-65535>} {}
498 @deffnx {Interface Command} {no ip ospf hello-interval} {}
499 Set number of seconds for HelloInterval timer value. Setting this value,
500 Hello packet will be sent every timer value seconds on the specified interface.
501 This value must be the same for all routers attached to a common network.
502 The default value is 10 seconds.
504 This command has no effect if @ref{ip ospf dead-interval minimal} is also
505 specified for the interface.
508 @deffn {Interface Command} {ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)} {}
509 @deffnx {Interface Command} {no ip ospf network} {}
510 Set explicitly network type for specifed interface.
513 @deffn {Interface Command} {ip ospf priority <0-255>} {}
514 @deffnx {Interface Command} {no ip ospf priority} {}
515 Set RouterPriority integer value. The router with the highest priority
516 will be more eligible to become Designated Router. Setting the value
517 to 0, makes the router ineligible to become Designated Router. The
521 @deffn {Interface Command} {ip ospf retransmit-interval <1-65535>} {}
522 @deffnx {Interface Command} {no ip ospf retransmit interval} {}
523 Set number of seconds for RxmtInterval timer value. This value is used
524 when retransmitting Database Description and Link State Request packets.
525 The default value is 5 seconds.
528 @deffn {Interface Command} {ip ospf transmit-delay} {}
529 @deffnx {Interface Command} {no ip ospf transmit-delay} {}
530 Set number of seconds for InfTransDelay value. LSAs' age should be
531 incremented by this value when transmitting.
532 The default value is 1 seconds.
535 @node Redistribute routes to OSPF
536 @section Redistribute routes to OSPF
538 @deffn {OSPF Command} {redistribute (kernel|connected|static|rip|bgp)} {}
539 @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) @var{route-map}} {}
540 @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)} {}
541 @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map @var{word}} {}
542 @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214>} {}
543 @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> route-map @var{word}} {}
544 @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214>} {}
545 @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214> route-map @var{word}} {}
546 @deffnx {OSPF Command} {no redistribute (kernel|connected|static|rip|bgp)} {}
547 @anchor{OSPF redistribute}Redistribute routes of the specified protocol
548 or kind into OSPF, with the metric type and metric set if specified,
549 filtering the routes using the given route-map if specified.
550 Redistributed routes may also be filtered with distribute-lists, see
551 @ref{ospf distribute-list}.
553 Redistributed routes are distributed as into OSPF as Type-5 External
554 LSAs into links to areas that accept external routes, Type-7 External LSAs
555 for NSSA areas and are not redistributed at all into Stub areas, where
556 external routes are not permitted.
558 Note that for connected routes, one may instead use
559 @dfn{passive-interface}, see @ref{OSPF passive-interface}.
562 @deffn {OSPF Command} {default-information originate} {}
563 @deffnx {OSPF Command} {default-information originate metric <0-16777214>} {}
564 @deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2)} {}
565 @deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
566 @deffnx {OSPF Command} {default-information originate always} {}
567 @deffnx {OSPF Command} {default-information originate always metric <0-16777214>} {}
568 @deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2)} {}
569 @deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
570 @deffnx {OSPF Command} {no default-information originate} {}
571 Originate an AS-External (type-5) LSA describing a default route into
572 all external-routing capable areas, of the specified metric and metric
573 type. If the 'always' keyword is given then the default is always
574 advertised, even when there is no default present in the routing table.
577 @deffn {OSPF Command} {distribute-list NAME out (kernel|connected|static|rip|ospf} {}
578 @deffnx {OSPF Command} {no distribute-list NAME out (kernel|connected|static|rip|ospf} {}
579 @anchor{ospf distribute-list}Apply the access-list filter, NAME, to
580 redistributed routes of the given type before allowing the routes to
581 redistributed into OSPF (@pxref{OSPF redistribute}).
584 @deffn {OSPF Command} {default-metric <0-16777214>} {}
585 @deffnx {OSPF Command} {no default-metric} {}
588 @deffn {OSPF Command} {distance <1-255>} {}
589 @deffnx {OSPF Command} {no distance <1-255>} {}
592 @deffn {OSPF Command} {distance ospf (intra-area|inter-area|external) <1-255>} {}
593 @deffnx {OSPF Command} {no distance ospf} {}
596 @node Showing OSPF information
597 @section Showing OSPF information
599 @deffn {Command} {show ip ospf} {}
600 @anchor{show ip ospf}Show information on a variety of general OSPF and
601 area state and configuration information.
604 @deffn {Command} {show ip ospf interface [INTERFACE]} {}
605 Show state and configuration of OSPF the specified interface, or all
606 interfaces if no interface is given.
609 @deffn {Command} {show ip ospf neighbor} {}
610 @deffnx {Command} {show ip ospf neighbor INTERFACE} {}
611 @deffnx {Command} {show ip ospf neighbor detail} {}
612 @deffnx {Command} {show ip ospf neighbor INTERFACE detail} {}
615 @deffn {Command} {show ip ospf database} {}
616 @deffnx {Command} {show ip ospf database asbr-summary} {}
617 @deffnx {Command} {show ip ospf database external} {}
618 @deffnx {Command} {show ip ospf database network} {}
619 @deffnx {Command} {show ip ospf database asbr-router} {}
620 @deffnx {Command} {show ip ospf database summary} {}
621 @deffnx {Command} {show ip ospf database @dots{} @var{link-state-id}} {}
622 @deffnx {Command} {show ip ospf database @dots{} @var{link-state-id} adv-router @var{adv-router}} {}
623 @deffnx {Command} {show ip ospf database @dots{} adv-router @var{adv-router}} {}
624 @deffnx {Command} {show ip ospf database @dots{} @var{link-state-id} self-originate} {}
625 @deffnx {Command} {show ip ospf database @dots{} self-originate} {}
628 @deffn {Command} {show ip ospf database max-age} {}
631 @deffn {Command} {show ip ospf database self-originate} {}
634 @deffn {Command} {show ip ospf route} {}
635 Show the OSPF routing table, as determined by the most recent SPF calculation.
641 @deffn {OSPF Command} {ospf opaque-lsa} {}
642 @deffnx {OSPF Command} {capability opaque} {}
643 @deffnx {OSPF Command} {no ospf opaque-lsa} {}
644 @deffnx {OSPF Command} {no capability opaque} {}
645 @command{ospfd} support Opaque LSA (RFC2370) as fondment for MPLS Traffic Engineering LSA. Prior to used MPLS TE, opaque-lsa must be enable in the configuration file. Alternate command could be "mpls-te on" (@ref{OSPF Traffic Engineering}).
648 @deffn {Command} {show ip ospf database (opaque-link|opaque-area|opaque-external)} {}
649 @deffnx {Command} {show ip ospf database (opaque-link|opaque-area|opaque-external) @var{link-state-id}} {}
650 @deffnx {Command} {show ip ospf database (opaque-link|opaque-area|opaque-external) @var{link-state-id} adv-router @var{adv-router}} {}
651 @deffnx {Command} {show ip ospf database (opaque-link|opaque-area|opaque-external) adv-router @var{adv-router}} {}
652 @deffnx {Command} {show ip ospf database (opaque-link|opaque-area|opaque-external) @var{link-state-id} self-originate} {}
653 @deffnx {Command} {show ip ospf database (opaque-link|opaque-area|opaque-external) self-originate} {}
654 Show Opaque LSA from the database.
657 @node OSPF Traffic Engineering
658 @section Traffic Engineering
660 @deffn {OSPF Command} {mpls-te on} {}
661 @deffnx {OSPF Command} {no mpls-te} {}
662 Enable Traffic Engineering LSA flooding.
665 @deffn {OSPF Command} {mpls-te router-address <A.B.C.D>} {}
666 @deffnx {OSPF Command} {no mpls-te} {}
667 Configure stable IP address for MPLS-TE. This IP address is then advertise in Opaque LSA Type-10 TLV=1 (TE)
668 option 1 (Router-Address).
671 @deffn {OSPF Command} {mpls-te inter-as area <area-id>|as} {}
672 @deffnx {OSPF Command} {no mpls-te inter-as} {}
673 Enable RFC5392 suuport - Inter-AS TE v2 - to flood Traffic Engineering parameters of Inter-AS link.
674 2 modes are supported: AREA and AS; LSA are flood in AREA <area-id> with Opaque Type-10,
675 respectively in AS with Opaque Type-11. In all case, Opaque-LSA TLV=6.
678 @deffn {Command} {show ip ospf mpls-te interface} {}
679 @deffnx {Command} {show ip ospf mpls-te interface @var{interface}} {}
680 Show MPLS Traffic Engineering parameters for all or specified interface.
683 @deffn {Command} {show ip ospf mpls-te router} {}
684 Show Traffic Engineering router parameters.
687 @node Router Information
688 @section Router Information
690 @deffn {OSPF Command} {router-info [as | area <A.B.C.D>]} {}
691 @deffnx {OSPF Command} {no router-info} {}
692 Enable Router Information (RFC4970) LSA advertisement with AS scope (default) or Area scope flooding
693 when area is specified.
696 @deffn {OSPF Command} {pce address <A.B.C.D>} {}
697 @deffnx {OSPF Command} {no pce address} {}
698 @deffnx {OSPF Command} {pce domain as <0-65535>} {}
699 @deffnx {OSPF Command} {no pce domain as <0-65535>} {}
700 @deffnx {OSPF Command} {pce neighbor as <0-65535>} {}
701 @deffnx {OSPF Command} {no pce neighbor as <0-65535>} {}
702 @deffnx {OSPF Command} {pce flag BITPATTERN} {}
703 @deffnx {OSPF Command} {no pce flag} {}
704 @deffnx {OSPF Command} {pce scope BITPATTERN} {}
705 @deffnx {OSPF Command} {no pce scope} {}
706 The commands are conform to RFC 5088 and allow OSPF router announce Path Compuatation Elemenent (PCE) capabilities
707 through the Router Information (RI) LSA. Router Information must be enable prior to this. The command set/unset
708 respectively the PCE IP adress, Autonomous System (AS) numbers of controlled domains, neighbor ASs, flag and scope.
709 For flag and scope, please refer to RFC5088 for the BITPATTERN recognition. Multiple 'pce neighbor' command could
710 be specified in order to specify all PCE neighbours.
713 @deffn {Command} {show ip ospf router-info} {}
714 Show Router Capabilities flag.
716 @deffn {Command} {show ip ospf router-info pce} {}
717 Show Router Capabilities PCE parameters.
721 @section Debugging OSPF
723 @deffn {Command} {debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
724 @deffnx {Command} {no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
725 Dump Packet for debugging
728 @deffn {Command} {debug ospf ism} {}
729 @deffnx {Command} {debug ospf ism (status|events|timers)} {}
730 @deffnx {Command} {no debug ospf ism} {}
731 @deffnx {Command} {no debug ospf ism (status|events|timers)} {}
732 Show debug information of Interface State Machine
735 @deffn {Command} {debug ospf nsm} {}
736 @deffnx {Command} {debug ospf nsm (status|events|timers)} {}
737 @deffnx {Command} {no debug ospf nsm} {}
738 @deffnx {Command} {no debug ospf nsm (status|events|timers)} {}
739 Show debug information of Network State Machine
742 @deffn {Command} {debug ospf event} {}
743 @deffnx {Command} {no debug ospf event} {}
744 Show debug information of OSPF event
747 @deffn {Command} {debug ospf nssa} {}
748 @deffnx {Command} {no debug ospf nssa} {}
749 Show debug information about Not So Stub Area
752 @deffn {Command} {debug ospf lsa} {}
753 @deffnx {Command} {debug ospf lsa (generate|flooding|refresh)} {}
754 @deffnx {Command} {no debug ospf lsa} {}
755 @deffnx {Command} {no debug ospf lsa (generate|flooding|refresh)} {}
756 Show debug detail of Link State messages
759 @deffn {Command} {debug ospf te} {}
760 @deffnx {Command} {no debug ospf te} {}
761 Show debug information about Traffic Engineering LSA
764 @deffn {Command} {debug ospf zebra} {}
765 @deffnx {Command} {debug ospf zebra (interface|redistribute)} {}
766 @deffnx {Command} {no debug ospf zebra} {}
767 @deffnx {Command} {no debug ospf zebra (interface|redistribute)} {}
768 Show debug information of ZEBRA API
771 @deffn {Command} {show debugging ospf} {}
774 @node OSPF Configuration Examples
775 @section OSPF Configuration Examples
776 A simple example, with MD5 authentication enabled:
782 ip ospf authentication message-digest
783 ip ospf message-digest-key 1 md5 ABCDEFGHIJK
786 network 192.168.0.0/16 area 0.0.0.1
787 area 0.0.0.1 authentication message-digest
791 An @acronym{ABR} router, with MD5 authentication and performing summarisation
792 of networks between the areas:
798 log file /var/log/quagga/ospfd.log
802 ip ospf authentication message-digest
803 ip ospf message-digest-key 1 md5 ABCDEFGHIJK
808 ip ospf authentication message-digest
809 ip ospf message-digest-key 2 md5 XYZ12345
812 ospf router-id 192.168.0.1
813 redistribute connected
814 passive interface ppp0
815 network 192.168.0.0/24 area 0.0.0.0
816 network 10.0.0.0/16 area 0.0.0.0
817 network 192.168.1.0/24 area 0.0.0.1
818 area 0.0.0.0 authentication message-digest
819 area 0.0.0.0 range 10.0.0.0/16
820 area 0.0.0.0 range 192.168.0.0/24
821 area 0.0.0.1 authentication message-digest
822 area 0.0.0.1 range 10.2.0.0/16
827 A Traffic Engineering configuration, with Inter-ASv2 support.
829 - First, the 'zebra.conf' part:
835 log file /var/log/zebra.log
838 ip address 198.168.1.1/24
840 mpls-te link metric 10
841 mpls-te link max-bw 1.25e+06
842 mpls-te link max-rsv-bw 1.25e+06
843 mpls-te link unrsv-bw 0 1.25e+06
844 mpls-te link unrsv-bw 1 1.25e+06
845 mpls-te link unrsv-bw 2 1.25e+06
846 mpls-te link unrsv-bw 3 1.25e+06
847 mpls-te link unrsv-bw 4 1.25e+06
848 mpls-te link unrsv-bw 5 1.25e+06
849 mpls-te link unrsv-bw 6 1.25e+06
850 mpls-te link unrsv-bw 7 1.25e+06
851 mpls-te link rsc-clsclr 0xab
854 ip address 192.168.2.1/24
856 mpls-te link metric 10
857 mpls-te link max-bw 1.25e+06
858 mpls-te link max-rsv-bw 1.25e+06
859 mpls-te link unrsv-bw 0 1.25e+06
860 mpls-te link unrsv-bw 1 1.25e+06
861 mpls-te link unrsv-bw 2 1.25e+06
862 mpls-te link unrsv-bw 3 1.25e+06
863 mpls-te link unrsv-bw 4 1.25e+06
864 mpls-te link unrsv-bw 5 1.25e+06
865 mpls-te link unrsv-bw 6 1.25e+06
866 mpls-te link unrsv-bw 7 1.25e+06
867 mpls-te link rsc-clsclr 0xab
868 mpls-te neighbor 192.168.2.2 as 65000
872 - Then the 'ospfd.conf' itself:
878 log file /var/log/ospfd.log
882 ip ospf hello-interval 60
883 ip ospf dead-interval 240
886 ip ospf hello-interval 60
887 ip ospf dead-interval 240
891 ospf router-id 192.168.1.1
892 network 192.168.0.0/16 area 1
895 mpls-te router-address 192.168.1.1
896 mpls-te inter-as area 1
902 A router information example with PCE advsertisement:
908 ospf router-id 192.168.1.1
909 network 192.168.0.0/16 area 1
912 mpls-te router-address 192.168.1.1
913 router-info area 0.0.0.1
914 pce address 192.168.1.1
917 pce neighbor as 65500
918 pce neighbor as 65200