]> git.proxmox.com Git - mirror_frr.git/blob - doc/user/ospfd.rst
Merge pull request #3301 from opensourcerouting/bugfix/remove-unused-isis-debugs
[mirror_frr.git] / doc / user / ospfd.rst
1 .. _ospfv2:
2
3 ******
4 OSPFv2
5 ******
6
7 :abbr:`OSPF (Open Shortest Path First)` version 2 is a routing protocol which
8 is described in :rfc:`2328`. OSPF is an :abbr:`IGP (Interior Gateway
9 Protocol)`. Compared with :abbr:`RIP`, :abbr:`OSPF` can provide scalable
10 network support and faster convergence times. OSPF is widely used in large
11 networks such as :abbr:`ISP (Internet Service Provider)` backbone and
12 enterprise networks.
13
14 .. include:: ospf_fundamentals.rst
15
16 .. _configuring-ospfd:
17
18 Configuring OSPF
19 ================
20
21 *ospfd* accepts all :ref:`common-invocation-options`.
22
23 .. option:: -n, --instance
24
25 Specify the instance number for this invocation of *ospfd*.
26
27 .. option:: -a, --apiserver
28
29 Enable the OSPF API server
30
31 *ospfd* must acquire interface information from *zebra* in order to function.
32 Therefore *zebra* must be running before invoking *ospfd*. Also, if *zebra* is
33 restarted then *ospfd* must be too.
34
35 Like other daemons, *ospfd* configuration is done in :abbr:`OSPF` specific
36 configuration file :file:`ospfd.conf` when the integrated config is not used.
37
38 .. _ospf-multi-instance:
39
40 Multi-instance Support
41 ----------------------
42
43 OSPF supports multiple instances. Each instance is identified by a positive
44 nonzero integer that must be provided when adding configuration items specific
45 to that instance. Enabling instances is done with :file:`/etc/frr/daemons` in
46 the following manner:
47
48 ::
49
50 ...
51 ospfd=yes
52 ospfd_instances=1,5,6
53 ...
54
55 The ``ospfd_instances`` variable controls which instances are started and what
56 their IDs are. In this example, after starting FRR you should see the following
57 processes:
58
59 .. code-block:: shell
60
61 # ps -ef | grep "ospfd"
62 frr 11816 1 0 17:30 ? 00:00:00 /usr/lib/frr/ospfd --daemon -A 127.0.0.1 -n 1
63 frr 11822 1 0 17:30 ? 00:00:00 /usr/lib/frr/ospfd --daemon -A 127.0.0.1 -n 2
64 frr 11828 1 0 17:30 ? 00:00:00 /usr/lib/frr/ospfd --daemon -A 127.0.0.1 -n 3
65
66
67 The instance number should be specified in the config when addressing a particular instance:
68
69 .. code-block:: frr
70
71 router ospf 5
72 router-id 1.2.3.4
73 area 0.0.0.0 authentication message-digest
74 ...
75
76 .. _ospf-router:
77
78 Routers
79 -------
80
81 To start OSPF process you have to specify the OSPF router.
82
83 .. index:: router ospf [(1-65535)] vrf NAME
84 .. clicmd:: router ospf [(1-65535)] vrf NAME
85
86 .. index:: no router ospf [(1-65535)] vrf NAME
87 .. clicmd:: no router ospf [(1-65535)] vrf NAME
88
89 Enable or disable the OSPF process.
90
91 .. index:: ospf router-id A.B.C.D
92 .. clicmd:: ospf router-id A.B.C.D
93
94 .. index:: no ospf router-id [A.B.C.D]
95 .. clicmd:: no ospf router-id [A.B.C.D]
96
97 This sets the router-ID of the OSPF process. The router-ID may be an IP
98 address of the router, but need not be - it can be any arbitrary 32bit
99 number. However it MUST be unique within the entire OSPF domain to the OSPF
100 speaker - bad things will happen if multiple OSPF speakers are configured
101 with the same router-ID! If one is not specified then *ospfd* will obtain a
102 router-ID automatically from *zebra*.
103
104 .. index:: ospf abr-type TYPE
105 .. clicmd:: ospf abr-type TYPE
106
107 .. index:: no ospf abr-type TYPE
108 .. clicmd:: no ospf abr-type TYPE
109
110 `type` can be cisco|ibm|shortcut|standard. The "Cisco" and "IBM" types
111 are equivalent.
112
113 The OSPF standard for ABR behaviour does not allow an ABR to consider
114 routes through non-backbone areas when its links to the backbone are
115 down, even when there are other ABRs in attached non-backbone areas
116 which still can reach the backbone - this restriction exists primarily
117 to ensure routing-loops are avoided.
118
119 With the "Cisco" or "IBM" ABR type, the default in this release of FRR, this
120 restriction is lifted, allowing an ABR to consider summaries learned from
121 other ABRs through non-backbone areas, and hence route via non-backbone
122 areas as a last resort when, and only when, backbone links are down.
123
124 Note that areas with fully-adjacent virtual-links are considered to be
125 "transit capable" and can always be used to route backbone traffic, and
126 hence are unaffected by this setting (:clicmd:`area A.B.C.D virtual-link A.B.C.D`).
127
128 More information regarding the behaviour controlled by this command can
129 be found in :rfc:`3509`, and :t:`draft-ietf-ospf-shortcut-abr-02.txt`.
130
131 Quote: "Though the definition of the :abbr:`ABR (Area Border Router)`
132 in the OSPF specification does not require a router with multiple
133 attached areas to have a backbone connection, it is actually
134 necessary to provide successful routing to the inter-area and
135 external destinations. If this requirement is not met, all traffic
136 destined for the areas not connected to such an ABR or out of the
137 OSPF domain, is dropped. This document describes alternative ABR
138 behaviors implemented in Cisco and IBM routers."
139
140 .. index:: ospf rfc1583compatibility
141 .. clicmd:: ospf rfc1583compatibility
142
143 .. index:: no ospf rfc1583compatibility
144 .. clicmd:: no ospf rfc1583compatibility
145
146 :rfc:`2328`, the successor to :rfc:`1583`, suggests according
147 to section G.2 (changes) in section 16.4 a change to the path
148 preference algorithm that prevents possible routing loops that were
149 possible in the old version of OSPFv2. More specifically it demands
150 that inter-area paths and intra-area backbone path are now of equal preference
151 but still both preferred to external paths.
152
153 This command should NOT be set normally.
154
155 .. index:: log-adjacency-changes [detail]
156 .. clicmd:: log-adjacency-changes [detail]
157
158 .. index:: no log-adjacency-changes [detail]
159 .. clicmd:: no log-adjacency-changes [detail]
160
161 Configures ospfd to log changes in adjacency. With the optional
162 detail argument, all changes in adjacency status are shown. Without detail,
163 only changes to full or regressions are shown.
164
165 .. index:: passive-interface INTERFACE
166 .. clicmd:: passive-interface INTERFACE
167
168 .. index:: no passive-interface INTERFACE
169 .. clicmd:: no passive-interface INTERFACE
170
171 Do not speak OSPF interface on the
172 given interface, but do advertise the interface as a stub link in the
173 router-:abbr:`LSA (Link State Advertisement)` for this router. This
174 allows one to advertise addresses on such connected interfaces without
175 having to originate AS-External/Type-5 LSAs (which have global flooding
176 scope) - as would occur if connected addresses were redistributed into
177 OSPF (:ref:`redistribute-routes-to-ospf`). This is the only way to
178 advertise non-OSPF links into stub areas.
179
180 .. index:: timers throttle spf DELAY INITIAL-HOLDTIME MAX-HOLDTIME
181 .. clicmd:: timers throttle spf DELAY INITIAL-HOLDTIME MAX-HOLDTIME
182
183 .. index:: no timers throttle spf
184 .. clicmd:: no timers throttle spf
185
186 This command sets the initial `delay`, the `initial-holdtime`
187 and the `maximum-holdtime` between when SPF is calculated and the
188 event which triggered the calculation. The times are specified in
189 milliseconds and must be in the range of 0 to 600000 milliseconds.
190
191 The `delay` specifies the minimum amount of time to delay SPF
192 calculation (hence it affects how long SPF calculation is delayed after
193 an event which occurs outside of the holdtime of any previous SPF
194 calculation, and also serves as a minimum holdtime).
195
196 Consecutive SPF calculations will always be separated by at least
197 'hold-time' milliseconds. The hold-time is adaptive and initially is
198 set to the `initial-holdtime` configured with the above command.
199 Events which occur within the holdtime of the previous SPF calculation
200 will cause the holdtime to be increased by `initial-holdtime`, bounded
201 by the `maximum-holdtime` configured with this command. If the adaptive
202 hold-time elapses without any SPF-triggering event occurring then
203 the current holdtime is reset to the `initial-holdtime`. The current
204 holdtime can be viewed with :clicmd:`show ip ospf`, where it is expressed as
205 a multiplier of the `initial-holdtime`.
206
207 .. code-block:: frr
208
209 router ospf
210 timers throttle spf 200 400 10000
211
212
213 In this example, the `delay` is set to 200ms, the initial holdtime is set to
214 400ms and the `maximum holdtime` to 10s. Hence there will always be at least
215 200ms between an event which requires SPF calculation and the actual SPF
216 calculation. Further consecutive SPF calculations will always be separated
217 by between 400ms to 10s, the hold-time increasing by 400ms each time an
218 SPF-triggering event occurs within the hold-time of the previous SPF
219 calculation.
220
221 This command supercedes the *timers spf* command in previous FRR
222 releases.
223
224 .. index:: max-metric router-lsa [on-startup|on-shutdown] (5-86400)
225 .. clicmd:: max-metric router-lsa [on-startup|on-shutdown] (5-86400)
226
227 .. index:: max-metric router-lsa administrative
228 .. clicmd:: max-metric router-lsa administrative
229
230 .. index:: no max-metric router-lsa [on-startup|on-shutdown|administrative]
231 .. clicmd:: no max-metric router-lsa [on-startup|on-shutdown|administrative]
232
233 This enables :rfc:`3137` support, where the OSPF process describes its
234 transit links in its router-LSA as having infinite distance so that other
235 routers will avoid calculating transit paths through the router while still
236 being able to reach networks through the router.
237
238 This support may be enabled administratively (and indefinitely) or
239 conditionally. Conditional enabling of max-metric router-lsas can be for a
240 period of seconds after startup and/or for a period of seconds prior to
241 shutdown.
242
243 Enabling this for a period after startup allows OSPF to converge fully first
244 without affecting any existing routes used by other routers, while still
245 allowing any connected stub links and/or redistributed routes to be
246 reachable. Enabling this for a period of time in advance of shutdown allows
247 the router to gracefully excuse itself from the OSPF domain.
248
249 Enabling this feature administratively allows for administrative
250 intervention for whatever reason, for an indefinite period of time. Note
251 that if the configuration is written to file, this administrative form of
252 the stub-router command will also be written to file. If *ospfd* is
253 restarted later, the command will then take effect until manually
254 deconfigured.
255
256 Configured state of this feature as well as current status, such as the
257 number of second remaining till on-startup or on-shutdown ends, can be
258 viewed with the :clicmd:`show ip ospf` command.
259
260 .. index:: auto-cost reference-bandwidth (1-4294967)
261 .. clicmd:: auto-cost reference-bandwidth (1-4294967)
262
263 .. index:: no auto-cost reference-bandwidth
264 .. clicmd:: no auto-cost reference-bandwidth
265
266 This sets the reference
267 bandwidth for cost calculations, where this bandwidth is considered
268 equivalent to an OSPF cost of 1, specified in Mbits/s. The default is
269 100Mbit/s (i.e. a link of bandwidth 100Mbit/s or higher will have a
270 cost of 1. Cost of lower bandwidth links will be scaled with reference
271 to this cost).
272
273 This configuration setting MUST be consistent across all routers within the
274 OSPF domain.
275
276 .. index:: network A.B.C.D/M area A.B.C.D
277 .. clicmd:: network A.B.C.D/M area A.B.C.D
278
279 .. index:: network A.B.C.D/M area (0-4294967295)
280 .. clicmd:: network A.B.C.D/M area (0-4294967295)
281
282 .. index:: no network A.B.C.D/M area A.B.C.D
283 .. clicmd:: no network A.B.C.D/M area A.B.C.D
284
285 .. index:: no network A.B.C.D/M area (0-4294967295)
286 .. clicmd:: no network A.B.C.D/M area (0-4294967295)
287
288 This command specifies the OSPF enabled interface(s). If the interface has
289 an address from range 192.168.1.0/24 then the command below enables ospf
290 on this interface so router can provide network information to the other
291 ospf routers via this interface.
292
293 .. code-block:: frr
294
295 router ospf
296 network 192.168.1.0/24 area 0.0.0.0
297
298 Prefix length in interface must be equal or bigger (i.e. smaller network) than
299 prefix length in network statement. For example statement above doesn't enable
300 ospf on interface with address 192.168.1.1/23, but it does on interface with
301 address 192.168.1.129/25.
302
303 Note that the behavior when there is a peer address
304 defined on an interface changed after release 0.99.7.
305 Currently, if a peer prefix has been configured,
306 then we test whether the prefix in the network command contains
307 the destination prefix. Otherwise, we test whether the network command prefix
308 contains the local address prefix of the interface.
309
310 In some cases it may be more convenient to enable OSPF on a per
311 interface/subnet basis (:clicmd:`ip ospf area AREA [ADDR]`).
312
313
314 .. _ospf-area:
315
316 Areas
317 -----
318
319 .. index:: area A.B.C.D range A.B.C.D/M
320 .. clicmd:: area A.B.C.D range A.B.C.D/M
321
322 .. index:: area (0-4294967295) range A.B.C.D/M
323 .. clicmd:: area (0-4294967295) range A.B.C.D/M
324
325 .. index:: no area A.B.C.D range A.B.C.D/M
326 .. clicmd:: no area A.B.C.D range A.B.C.D/M
327
328 .. index:: no area (0-4294967295) range A.B.C.D/M
329 .. clicmd:: no area (0-4294967295) range A.B.C.D/M
330
331 Summarize intra area paths from specified area into one Type-3 summary-LSA
332 announced to other areas. This command can be used only in ABR and ONLY
333 router-LSAs (Type-1) and network-LSAs (Type-2) (i.e. LSAs with scope area) can
334 be summarized. Type-5 AS-external-LSAs can't be summarized - their scope is AS.
335 Summarizing Type-7 AS-external-LSAs isn't supported yet by FRR.
336
337 .. code-block:: frr
338
339 router ospf
340 network 192.168.1.0/24 area 0.0.0.0
341 network 10.0.0.0/8 area 0.0.0.10
342 area 0.0.0.10 range 10.0.0.0/8
343
344
345 With configuration above one Type-3 Summary-LSA with routing info 10.0.0.0/8 is
346 announced into backbone area if area 0.0.0.10 contains at least one intra-area
347 network (i.e. described with router or network LSA) from this range.
348
349 .. index:: area A.B.C.D range IPV4_PREFIX not-advertise
350 .. clicmd:: area A.B.C.D range IPV4_PREFIX not-advertise
351
352 .. index:: no area A.B.C.D range IPV4_PREFIX not-advertise
353 .. clicmd:: no area A.B.C.D range IPV4_PREFIX not-advertise
354
355 Instead of summarizing intra area paths filter them - i.e. intra area paths from this
356 range are not advertised into other areas.
357 This command makes sense in ABR only.
358
359 .. index:: area A.B.C.D range IPV4_PREFIX substitute IPV4_PREFIX
360 .. clicmd:: area A.B.C.D range IPV4_PREFIX substitute IPV4_PREFIX
361
362 .. index:: no area A.B.C.D range IPV4_PREFIX substitute IPV4_PREFIX
363 .. clicmd:: no area A.B.C.D range IPV4_PREFIX substitute IPV4_PREFIX
364
365 Substitute summarized prefix with another prefix.
366
367 .. code-block:: frr
368
369 router ospf
370 network 192.168.1.0/24 area 0.0.0.0
371 network 10.0.0.0/8 area 0.0.0.10
372 area 0.0.0.10 range 10.0.0.0/8 substitute 11.0.0.0/8
373
374
375 One Type-3 summary-LSA with routing info 11.0.0.0/8 is announced into backbone area if
376 area 0.0.0.10 contains at least one intra-area network (i.e. described with router-LSA or
377 network-LSA) from range 10.0.0.0/8.
378 This command makes sense in ABR only.
379
380 .. index:: area A.B.C.D virtual-link A.B.C.D
381 .. clicmd:: area A.B.C.D virtual-link A.B.C.D
382
383 .. index:: area (0-4294967295) virtual-link A.B.C.D
384 .. clicmd:: area (0-4294967295) virtual-link A.B.C.D
385
386 .. index:: no area A.B.C.D virtual-link A.B.C.D
387 .. clicmd:: no area A.B.C.D virtual-link A.B.C.D
388
389 .. index:: no area (0-4294967295) virtual-link A.B.C.D
390 .. clicmd:: no area (0-4294967295) virtual-link A.B.C.D
391
392 .. index:: area A.B.C.D shortcut
393 .. clicmd:: area A.B.C.D shortcut
394
395 .. index:: area (0-4294967295) shortcut
396 .. clicmd:: area (0-4294967295) shortcut
397
398 .. index:: no area A.B.C.D shortcut
399 .. clicmd:: no area A.B.C.D shortcut
400
401 .. index:: no area (0-4294967295) shortcut
402 .. clicmd:: no area (0-4294967295) shortcut
403
404 Configure the area as Shortcut capable. See :rfc:`3509`. This requires
405 that the 'abr-type' be set to 'shortcut'.
406
407 .. index:: area A.B.C.D stub
408 .. clicmd:: area A.B.C.D stub
409
410 .. index:: area (0-4294967295) stub
411 .. clicmd:: area (0-4294967295) stub
412
413 .. index:: no area A.B.C.D stub
414 .. clicmd:: no area A.B.C.D stub
415
416 .. index:: no area (0-4294967295) stub
417 .. clicmd:: no area (0-4294967295) stub
418
419 Configure the area to be a stub area. That is, an area where no router
420 originates routes external to OSPF and hence an area where all external
421 routes are via the ABR(s). Hence, ABRs for such an area do not need
422 to pass AS-External LSAs (type-5s) or ASBR-Summary LSAs (type-4) into the
423 area. They need only pass Network-Summary (type-3) LSAs into such an area,
424 along with a default-route summary.
425
426 .. index:: area A.B.C.D stub no-summary
427 .. clicmd:: area A.B.C.D stub no-summary
428
429 .. index:: area (0-4294967295) stub no-summary
430 .. clicmd:: area (0-4294967295) stub no-summary
431
432 .. index:: no area A.B.C.D stub no-summary
433 .. clicmd:: no area A.B.C.D stub no-summary
434
435 .. index:: no area (0-4294967295) stub no-summary
436 .. clicmd:: no area (0-4294967295) stub no-summary
437
438 Prevents an *ospfd* ABR from injecting inter-area
439 summaries into the specified stub area.
440
441 .. index:: area A.B.C.D default-cost (0-16777215)
442 .. clicmd:: area A.B.C.D default-cost (0-16777215)
443
444 .. index:: no area A.B.C.D default-cost (0-16777215)
445 .. clicmd:: no area A.B.C.D default-cost (0-16777215)
446
447 Set the cost of default-summary LSAs announced to stubby areas.
448
449 .. index:: area A.B.C.D export-list NAME
450 .. clicmd:: area A.B.C.D export-list NAME
451
452 .. index:: area (0-4294967295) export-list NAME
453 .. clicmd:: area (0-4294967295) export-list NAME
454
455 .. index:: no area A.B.C.D export-list NAME
456 .. clicmd:: no area A.B.C.D export-list NAME
457
458 .. index:: no area (0-4294967295) export-list NAME
459 .. clicmd:: no area (0-4294967295) export-list NAME
460
461 Filter Type-3 summary-LSAs announced to other areas originated from intra-
462 area paths from specified area.
463
464 .. code-block:: frr
465
466 router ospf
467 network 192.168.1.0/24 area 0.0.0.0
468 network 10.0.0.0/8 area 0.0.0.10
469 area 0.0.0.10 export-list foo
470 !
471 access-list foo permit 10.10.0.0/16
472 access-list foo deny any
473
474 With example above any intra-area paths from area 0.0.0.10 and from range
475 10.10.0.0/16 (for example 10.10.1.0/24 and 10.10.2.128/30) are announced into
476 other areas as Type-3 summary-LSA's, but any others (for example 10.11.0.0/16
477 or 10.128.30.16/30) aren't.
478
479 This command is only relevant if the router is an ABR for the specified
480 area.
481
482 .. index:: area A.B.C.D import-list NAME
483 .. clicmd:: area A.B.C.D import-list NAME
484
485 .. index:: area (0-4294967295) import-list NAME
486 .. clicmd:: area (0-4294967295) import-list NAME
487
488 .. index:: no area A.B.C.D import-list NAME
489 .. clicmd:: no area A.B.C.D import-list NAME
490
491 .. index:: no area (0-4294967295) import-list NAME
492 .. clicmd:: no area (0-4294967295) import-list NAME
493
494 Same as export-list, but it applies to paths announced into specified area
495 as Type-3 summary-LSAs.
496
497 .. index:: area A.B.C.D filter-list prefix NAME in
498 .. clicmd:: area A.B.C.D filter-list prefix NAME in
499
500 .. index:: area A.B.C.D filter-list prefix NAME out
501 .. clicmd:: area A.B.C.D filter-list prefix NAME out
502
503 .. index:: area (0-4294967295) filter-list prefix NAME in
504 .. clicmd:: area (0-4294967295) filter-list prefix NAME in
505
506 .. index:: area (0-4294967295) filter-list prefix NAME out
507 .. clicmd:: area (0-4294967295) filter-list prefix NAME out
508
509 .. index:: no area A.B.C.D filter-list prefix NAME in
510 .. clicmd:: no area A.B.C.D filter-list prefix NAME in
511
512 .. index:: no area A.B.C.D filter-list prefix NAME out
513 .. clicmd:: no area A.B.C.D filter-list prefix NAME out
514
515 .. index:: no area (0-4294967295) filter-list prefix NAME in
516 .. clicmd:: no area (0-4294967295) filter-list prefix NAME in
517
518 .. index:: no area (0-4294967295) filter-list prefix NAME out
519 .. clicmd:: no area (0-4294967295) filter-list prefix NAME out
520
521 Filtering Type-3 summary-LSAs to/from area using prefix lists. This command
522 makes sense in ABR only.
523
524 .. index:: area A.B.C.D authentication
525 .. clicmd:: area A.B.C.D authentication
526
527 .. index:: area (0-4294967295) authentication
528 .. clicmd:: area (0-4294967295) authentication
529
530 .. index:: no area A.B.C.D authentication
531 .. clicmd:: no area A.B.C.D authentication
532
533 .. index:: no area (0-4294967295) authentication
534 .. clicmd:: no area (0-4294967295) authentication
535
536 Specify that simple password authentication should be used for the given
537 area.
538
539 .. index:: area A.B.C.D authentication message-digest
540 .. clicmd:: area A.B.C.D authentication message-digest
541
542 .. index:: area (0-4294967295) authentication message-digest
543 .. clicmd:: area (0-4294967295) authentication message-digest
544
545 Specify that OSPF packets must be authenticated with MD5 HMACs within the
546 given area. Keying material must also be configured on a per-interface basis
547 (:clicmd:`ip ospf message-digest-key`).
548
549 MD5 authentication may also be configured on a per-interface basis
550 (:clicmd:`ip ospf authentication message-digest`). Such per-interface
551 settings will override any per-area authentication setting.
552
553 .. _ospf-interface:
554
555 Interfaces
556 ----------
557
558 .. index:: ip ospf area AREA [ADDR]
559 .. clicmd:: ip ospf area AREA [ADDR]
560
561 .. index:: no ip ospf area [ADDR]
562 .. clicmd:: no ip ospf area [ADDR]
563
564 Enable OSPF on the interface, optionally restricted to just the IP address
565 given by `ADDR`, putting it in the `AREA` area. Per interface area settings
566 take precedence to network commands
567 (:clicmd:`network A.B.C.D/M area A.B.C.D`).
568
569 If you have a lot of interfaces, and/or a lot of subnets, then enabling OSPF
570 via this command may result in a slight performance improvement.
571
572 .. index:: ip ospf authentication-key AUTH_KEY
573 .. clicmd:: ip ospf authentication-key AUTH_KEY
574
575 .. index:: no ip ospf authentication-key
576 .. clicmd:: no ip ospf authentication-key
577
578 Set OSPF authentication key to a simple password. After setting `AUTH_KEY`,
579 all OSPF packets are authenticated. `AUTH_KEY` has length up to 8 chars.
580
581 Simple text password authentication is insecure and deprecated in favour of
582 MD5 HMAC authentication.
583
584 .. index:: ip ospf authentication message-digest
585 .. clicmd:: ip ospf authentication message-digest
586
587 Specify that MD5 HMAC authentication must be used on this interface. MD5
588 keying material must also be configured. Overrides any authentication
589 enabled on a per-area basis
590 (:clicmd:`area A.B.C.D authentication message-digest`)
591
592 Note that OSPF MD5 authentication requires that time never go backwards
593 (correct time is NOT important, only that it never goes backwards), even
594 across resets, if ospfd is to be able to promptly reestablish adjacencies
595 with its neighbours after restarts/reboots. The host should have system time
596 be set at boot from an external or non-volatile source (e.g. battery backed
597 clock, NTP, etc.) or else the system clock should be periodically saved to
598 non-volatile storage and restored at boot if MD5 authentication is to be
599 expected to work reliably.
600
601 .. index:: ip ospf message-digest-key KEYID md5 KEY
602 .. clicmd:: ip ospf message-digest-key KEYID md5 KEY
603
604 .. index:: no ip ospf message-digest-key
605 .. clicmd:: no ip ospf message-digest-key
606
607 Set OSPF authentication key to a cryptographic password. The cryptographic
608 algorithm is MD5.
609
610 KEYID identifies secret key used to create the message digest. This ID is
611 part of the protocol and must be consistent across routers on a link.
612
613 KEY is the actual message digest key, of up to 16 chars (larger strings will
614 be truncated), and is associated with the given KEYID.
615
616 .. index:: ip ospf cost (1-65535)
617 .. clicmd:: ip ospf cost (1-65535)
618
619 .. index:: no ip ospf cost
620 .. clicmd:: no ip ospf cost
621
622 Set link cost for the specified interface. The cost value is set to
623 router-LSA's metric field and used for SPF calculation.
624
625 .. index:: ip ospf dead-interval (1-65535)
626 .. clicmd:: ip ospf dead-interval (1-65535)
627
628 .. index:: ip ospf dead-interval minimal hello-multiplier (2-20)
629 .. clicmd:: ip ospf dead-interval minimal hello-multiplier (2-20)
630
631 .. index:: no ip ospf dead-interval
632 .. clicmd:: no ip ospf dead-interval
633
634 Set number of seconds for RouterDeadInterval timer value used for Wait Timer
635 and Inactivity Timer. This value must be the same for all routers attached
636 to a common network. The default value is 40 seconds.
637
638 If 'minimal' is specified instead, then the dead-interval is set to 1 second
639 and one must specify a hello-multiplier. The hello-multiplier specifies how
640 many Hellos to send per second, from 2 (every 500ms) to 20 (every 50ms).
641 Thus one can have 1s convergence time for OSPF. If this form is specified,
642 then the hello-interval advertised in Hello packets is set to 0 and the
643 hello-interval on received Hello packets is not checked, thus the
644 hello-multiplier need NOT be the same across multiple routers on a common
645 link.
646
647 .. index:: ip ospf hello-interval (1-65535)
648 .. clicmd:: ip ospf hello-interval (1-65535)
649
650 .. index:: no ip ospf hello-interval
651 .. clicmd:: no ip ospf hello-interval
652
653 Set number of seconds for HelloInterval timer value. Setting this value,
654 Hello packet will be sent every timer value seconds on the specified interface.
655 This value must be the same for all routers attached to a common network.
656 The default value is 10 seconds.
657
658 This command has no effect if
659 :clicmd:`ip ospf dead-interval minimal hello-multiplier (2-20)` is also
660 specified for the interface.
661
662 .. index:: ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)
663 .. clicmd:: ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)
664
665 .. index:: no ip ospf network
666 .. clicmd:: no ip ospf network
667
668 Set explicitly network type for specified interface.
669
670 .. index:: ip ospf priority (0-255)
671 .. clicmd:: ip ospf priority (0-255)
672
673 .. index:: no ip ospf priority
674 .. clicmd:: no ip ospf priority
675
676 Set RouterPriority integer value. The router with the highest priority will
677 be more eligible to become Designated Router. Setting the value to 0, makes
678 the router ineligible to become Designated Router. The default value is 1.
679
680 .. index:: ip ospf retransmit-interval (1-65535)
681 .. clicmd:: ip ospf retransmit-interval (1-65535)
682
683 .. index:: no ip ospf retransmit interval
684 .. clicmd:: no ip ospf retransmit interval
685
686 Set number of seconds for RxmtInterval timer value. This value is used when
687 retransmitting Database Description and Link State Request packets. The
688 default value is 5 seconds.
689
690 .. index:: ip ospf transmit-delay
691 .. clicmd:: ip ospf transmit-delay
692
693 .. index:: no ip ospf transmit-delay
694 .. clicmd:: no ip ospf transmit-delay
695
696 Set number of seconds for InfTransDelay value. LSAs' age should be
697 incremented by this value when transmitting. The default value is 1 second.
698
699 .. index:: ip ospf area (A.B.C.D|(0-4294967295))
700 .. clicmd:: ip ospf area (A.B.C.D|(0-4294967295))
701
702 .. index:: no ip ospf area
703 .. clicmd:: no ip ospf area
704
705 Enable ospf on an interface and set associated area.
706
707 .. _redistribute-routes-to-ospf:
708
709 Redistribution
710 --------------
711
712 .. index:: redistribute (kernel|connected|static|rip|bgp)
713 .. clicmd:: redistribute (kernel|connected|static|rip|bgp)
714
715 .. index:: redistribute (kernel|connected|static|rip|bgp) ROUTE-MAP
716 .. clicmd:: redistribute (kernel|connected|static|rip|bgp) ROUTE-MAP
717
718 .. index:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)
719 .. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)
720
721 .. index:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map WORD
722 .. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map WORD
723
724 .. index:: redistribute (kernel|connected|static|rip|bgp) metric (0-16777214)
725 .. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric (0-16777214)
726
727 .. index:: redistribute (kernel|connected|static|rip|bgp) metric (0-16777214) route-map WORD
728 .. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric (0-16777214) route-map WORD
729
730 .. index:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric (0-16777214)
731 .. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric (0-16777214)
732
733 .. index:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric (0-16777214) route-map WORD
734 .. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric (0-16777214) route-map WORD
735
736 .. index:: no redistribute (kernel|connected|static|rip|bgp)
737 .. clicmd:: no redistribute (kernel|connected|static|rip|bgp)
738
739 .. _ospf-redistribute:
740
741 Redistribute routes of the specified protocol or kind into OSPF, with the
742 metric type and metric set if specified, filtering the routes using the
743 given route-map if specified. Redistributed routes may also be filtered
744 with distribute-lists, see
745 :ref:`ospf distribute-list configuration <ospf-distribute-list>`.
746
747 Redistributed routes are distributed as into OSPF as Type-5 External LSAs
748 into links to areas that accept external routes, Type-7 External LSAs for
749 NSSA areas and are not redistributed at all into Stub areas, where external
750 routes are not permitted.
751
752 Note that for connected routes, one may instead use the `passive-interface`
753 configuration.
754
755 .. seealso::
756
757 clicmd:`passive-interface INTERFACE`.
758
759 .. index:: default-information originate
760 .. clicmd:: default-information originate
761
762 .. index:: default-information originate metric (0-16777214)
763 .. clicmd:: default-information originate metric (0-16777214)
764
765 .. index:: default-information originate metric (0-16777214) metric-type (1|2)
766 .. clicmd:: default-information originate metric (0-16777214) metric-type (1|2)
767
768 .. index:: default-information originate metric (0-16777214) metric-type (1|2) route-map WORD
769 .. clicmd:: default-information originate metric (0-16777214) metric-type (1|2) route-map WORD
770
771 .. index:: default-information originate always
772 .. clicmd:: default-information originate always
773
774 .. index:: default-information originate always metric (0-16777214)
775 .. clicmd:: default-information originate always metric (0-16777214)
776
777 .. index:: default-information originate always metric (0-16777214) metric-type (1|2)
778 .. clicmd:: default-information originate always metric (0-16777214) metric-type (1|2)
779
780 .. index:: default-information originate always metric (0-16777214) metric-type (1|2) route-map WORD
781 .. clicmd:: default-information originate always metric (0-16777214) metric-type (1|2) route-map WORD
782
783 .. index:: no default-information originate
784 .. clicmd:: no default-information originate
785
786 Originate an AS-External (type-5) LSA describing a default route into all
787 external-routing capable areas, of the specified metric and metric type. If
788 the 'always' keyword is given then the default is always advertised, even
789 when there is no default present in the routing table.
790
791 .. index:: distribute-list NAME out (kernel|connected|static|rip|ospf
792 .. clicmd:: distribute-list NAME out (kernel|connected|static|rip|ospf
793
794 .. index:: no distribute-list NAME out (kernel|connected|static|rip|ospf
795 .. clicmd:: no distribute-list NAME out (kernel|connected|static|rip|ospf
796
797 .. _ospf-distribute-list:
798
799 Apply the access-list filter, NAME, to redistributed routes of the given
800 type before allowing the routes to redistributed into OSPF
801 (:ref:`ospf redistribution <ospf-redistribute>`).
802
803 .. index:: default-metric (0-16777214)
804 .. clicmd:: default-metric (0-16777214)
805
806 .. index:: no default-metric
807 .. clicmd:: no default-metric
808
809 .. index:: distance (1-255)
810 .. clicmd:: distance (1-255)
811
812 .. index:: no distance (1-255)
813 .. clicmd:: no distance (1-255)
814
815 .. index:: distance ospf (intra-area|inter-area|external) (1-255)
816 .. clicmd:: distance ospf (intra-area|inter-area|external) (1-255)
817
818 .. index:: no distance ospf
819 .. clicmd:: no distance ospf
820
821 .. index:: router zebra
822 .. clicmd:: router zebra
823
824 .. index:: no router zebra
825 .. clicmd:: no router zebra
826
827
828 .. _showing-ospf-information:
829
830 Showing Information
831 ===================
832
833 .. _show-ip-ospf:
834
835 .. index:: show ip ospf
836 .. clicmd:: show ip ospf
837
838 Show information on a variety of general OSPF and area state and
839 configuration information.
840
841 .. index:: show ip ospf interface [INTERFACE]
842 .. clicmd:: show ip ospf interface [INTERFACE]
843
844 Show state and configuration of OSPF the specified interface, or all
845 interfaces if no interface is given.
846
847 .. index:: show ip ospf neighbor
848 .. clicmd:: show ip ospf neighbor
849
850 .. index:: show ip ospf neighbor INTERFACE
851 .. clicmd:: show ip ospf neighbor INTERFACE
852
853 .. index:: show ip ospf neighbor detail
854 .. clicmd:: show ip ospf neighbor detail
855
856 .. index:: show ip ospf neighbor INTERFACE detail
857 .. clicmd:: show ip ospf neighbor INTERFACE detail
858
859 .. index:: show ip ospf database
860 .. clicmd:: show ip ospf database
861
862 .. index:: show ip ospf database (asbr-summary|external|network|router|summary)
863 .. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary)
864
865 .. index:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID
866 .. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID
867
868 .. index:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID adv-router ADV-ROUTER
869 .. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID adv-router ADV-ROUTER
870
871 .. index:: show ip ospf database (asbr-summary|external|network|router|summary) adv-router ADV-ROUTER
872 .. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) adv-router ADV-ROUTER
873
874 .. index:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID self-originate
875 .. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID self-originate
876
877 .. index:: show ip ospf database (asbr-summary|external|network|router|summary) self-originate
878 .. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) self-originate
879
880 .. index:: show ip ospf database max-age
881 .. clicmd:: show ip ospf database max-age
882
883 .. index:: show ip ospf database self-originate
884 .. clicmd:: show ip ospf database self-originate
885
886 .. index:: show ip ospf route
887 .. clicmd:: show ip ospf route
888
889 Show the OSPF routing table, as determined by the most recent SPF
890 calculation.
891
892 .. _opaque-lsa:
893
894 Opaque LSA
895 ==========
896
897 .. index:: ospf opaque-lsa
898 .. clicmd:: ospf opaque-lsa
899
900 .. index:: capability opaque
901 .. clicmd:: capability opaque
902
903 .. index:: no ospf opaque-lsa
904 .. clicmd:: no ospf opaque-lsa
905
906 .. index:: no capability opaque
907 .. clicmd:: no capability opaque
908
909 *ospfd* supports Opaque LSA (:rfc:`2370`) as fundamental for MPLS Traffic
910 Engineering LSA. Prior to used MPLS TE, opaque-lsa must be enable in the
911 configuration file. Alternate command could be "mpls-te on"
912 (:ref:`ospf-traffic-engineering`).
913
914 .. index:: show ip ospf database (opaque-link|opaque-area|opaque-external)
915 .. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external)
916
917 .. index:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID
918 .. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID
919
920 .. index:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID adv-router ADV-ROUTER
921 .. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID adv-router ADV-ROUTER
922
923 .. index:: show ip ospf database (opaque-link|opaque-area|opaque-external) adv-router ADV-ROUTER
924 .. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) adv-router ADV-ROUTER
925
926 .. index:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID self-originate
927 .. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID self-originate
928
929 .. index:: show ip ospf database (opaque-link|opaque-area|opaque-external) self-originate
930 .. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) self-originate
931
932 Show Opaque LSA from the database.
933
934 .. _ospf-traffic-engineering:
935
936 Traffic Engineering
937 ===================
938
939 .. index:: mpls-te on
940 .. clicmd:: mpls-te on
941
942 .. index:: no mpls-te
943 .. clicmd:: no mpls-te
944
945 Enable Traffic Engineering LSA flooding.
946
947 .. index:: mpls-te router-address <A.B.C.D>
948 .. clicmd:: mpls-te router-address <A.B.C.D>
949
950 Configure stable IP address for MPLS-TE. This IP address is then advertise
951 in Opaque LSA Type-10 TLV=1 (TE) option 1 (Router-Address).
952
953 .. index:: mpls-te inter-as area <area-id>|as
954 .. clicmd:: mpls-te inter-as area <area-id>|as
955
956 .. index:: no mpls-te inter-as
957 .. clicmd:: no mpls-te inter-as
958
959 Enable :rfc:`5392` support - Inter-AS TE v2 - to flood Traffic Engineering
960 parameters of Inter-AS link. 2 modes are supported: AREA and AS; LSA are
961 flood in AREA <area-id> with Opaque Type-10, respectively in AS with Opaque
962 Type-11. In all case, Opaque-LSA TLV=6.
963
964 .. index:: show ip ospf mpls-te interface
965 .. clicmd:: show ip ospf mpls-te interface
966
967 .. index:: show ip ospf mpls-te interface INTERFACE
968 .. clicmd:: show ip ospf mpls-te interface INTERFACE
969
970 Show MPLS Traffic Engineering parameters for all or specified interface.
971
972 .. index:: show ip ospf mpls-te router
973 .. clicmd:: show ip ospf mpls-te router
974
975 Show Traffic Engineering router parameters.
976
977 .. _router-information:
978
979 Router Information
980 ==================
981
982 .. index:: router-info [as | area]
983 .. clicmd:: router-info [as | area]
984
985 .. index:: no router-info
986 .. clicmd:: no router-info
987
988 Enable Router Information (:rfc:`4970`) LSA advertisement with AS scope
989 (default) or Area scope flooding when area is specified. Old syntax
990 `router-info area <A.B.C.D>` is always supported but mark as deprecated
991 as the area ID is no more necessary. Indeed, router information support
992 multi-area and detect automatically the areas.
993
994 .. index:: pce address <A.B.C.D>
995 .. clicmd:: pce address <A.B.C.D>
996
997 .. index:: no pce address
998 .. clicmd:: no pce address
999
1000 .. index:: pce domain as (0-65535)
1001 .. clicmd:: pce domain as (0-65535)
1002
1003 .. index:: no pce domain as (0-65535)
1004 .. clicmd:: no pce domain as (0-65535)
1005
1006 .. index:: pce neighbor as (0-65535)
1007 .. clicmd:: pce neighbor as (0-65535)
1008
1009 .. index:: no pce neighbor as (0-65535)
1010 .. clicmd:: no pce neighbor as (0-65535)
1011
1012 .. index:: pce flag BITPATTERN
1013 .. clicmd:: pce flag BITPATTERN
1014
1015 .. index:: no pce flag
1016 .. clicmd:: no pce flag
1017
1018 .. index:: pce scope BITPATTERN
1019 .. clicmd:: pce scope BITPATTERN
1020
1021 .. index:: no pce scope
1022 .. clicmd:: no pce scope
1023
1024 The commands are conform to :rfc:`5088` and allow OSPF router announce Path
1025 Computation Element (PCE) capabilities through the Router Information (RI)
1026 LSA. Router Information must be enable prior to this. The command set/unset
1027 respectively the PCE IP address, Autonomous System (AS) numbers of
1028 controlled domains, neighbor ASs, flag and scope. For flag and scope, please
1029 refer to :rfc`5088` for the BITPATTERN recognition. Multiple 'pce neighbor'
1030 command could be specified in order to specify all PCE neighbours.
1031
1032 .. index:: show ip ospf router-info
1033 .. clicmd:: show ip ospf router-info
1034
1035 Show Router Capabilities flag.
1036
1037 .. index:: show ip ospf router-info pce
1038 .. clicmd:: show ip ospf router-info pce
1039
1040 Show Router Capabilities PCE parameters.
1041
1042 .. _debugging-ospf:
1043
1044 Segment Routing
1045 ===============
1046
1047 This is an EXPERIMENTAL support of Segment Routing as per draft
1048 `draft-ietf-ospf-segment-routing-extensions-24.txt` for MPLS dataplane.
1049
1050 .. index:: [no] segment-routing on
1051 .. clicmd:: [no] segment-routing on
1052
1053 Enable Segment Routing. Even if this also activate routing information
1054 support, it is preferable to also activate routing information, and set
1055 accordingly the Area or AS flooding.
1056
1057 .. index:: [no] segment-routing global-block (0-1048575) (0-1048575)
1058 .. clicmd:: [no] segment-routing global-block (0-1048575) (0-1048575)
1059
1060 Fix the Segment Routing Global Block i.e. the label range used by MPLS to
1061 store label in the MPLS FIB.
1062
1063 .. index:: [no] segment-routing node-msd (1-16)
1064 .. clicmd:: [no] segment-routing node-msd (1-16)
1065
1066 Fix the Maximum Stack Depth supported by the router. The value depend of the
1067 MPLS dataplane. E.g. for Linux kernel, since version 4.13 it is 32.
1068
1069 .. index:: [no] segment-routing prefix A.B.C.D/M index (0-65535) [no-php-flag]
1070 .. clicmd:: [no] segment-routing prefix A.B.C.D/M index (0-65535) [no-php-flag]
1071
1072 Set the Segment Routing index for the specified prefix. Note that, only
1073 prefix with /32 corresponding to a loopback interface are currently
1074 supported. The 'no-php-flag' means NO Penultimate Hop Popping that allows SR
1075 node to request to its neighbor to not pop the label.
1076
1077 .. index:: show ip ospf database segment-routing <adv-router ADVROUTER|self-originate> [json]
1078 .. clicmd:: show ip ospf database segment-routing <adv-router ADVROUTER|self-originate> [json]
1079
1080 Show Segment Routing Data Base, all SR nodes, specific advertised router or
1081 self router. Optional JSON output can be obtained by appending 'json' to the
1082 end of the command.
1083
1084 Debugging OSPF
1085 ==============
1086
1087 .. index:: debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]
1088 .. clicmd:: debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]
1089
1090 .. index:: no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]
1091 .. clicmd:: no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]
1092
1093 Dump Packet for debugging
1094
1095 .. index:: debug ospf ism
1096 .. clicmd:: debug ospf ism
1097
1098 .. index:: debug ospf ism (status|events|timers)
1099 .. clicmd:: debug ospf ism (status|events|timers)
1100
1101 .. index:: no debug ospf ism
1102 .. clicmd:: no debug ospf ism
1103
1104 .. index:: no debug ospf ism (status|events|timers)
1105 .. clicmd:: no debug ospf ism (status|events|timers)
1106
1107 Show debug information of Interface State Machine
1108
1109 .. index:: debug ospf nsm
1110 .. clicmd:: debug ospf nsm
1111
1112 .. index:: debug ospf nsm (status|events|timers)
1113 .. clicmd:: debug ospf nsm (status|events|timers)
1114
1115 .. index:: no debug ospf nsm
1116 .. clicmd:: no debug ospf nsm
1117
1118 .. index:: no debug ospf nsm (status|events|timers)
1119 .. clicmd:: no debug ospf nsm (status|events|timers)
1120
1121 Show debug information of Network State Machine
1122
1123 .. index:: debug ospf event
1124 .. clicmd:: debug ospf event
1125
1126 .. index:: no debug ospf event
1127 .. clicmd:: no debug ospf event
1128
1129 Show debug information of OSPF event
1130
1131 .. index:: debug ospf nssa
1132 .. clicmd:: debug ospf nssa
1133
1134 .. index:: no debug ospf nssa
1135 .. clicmd:: no debug ospf nssa
1136
1137 Show debug information about Not So Stub Area
1138
1139 .. index:: debug ospf lsa
1140 .. clicmd:: debug ospf lsa
1141
1142 .. index:: debug ospf lsa (generate|flooding|refresh)
1143 .. clicmd:: debug ospf lsa (generate|flooding|refresh)
1144
1145 .. index:: no debug ospf lsa
1146 .. clicmd:: no debug ospf lsa
1147
1148 .. index:: no debug ospf lsa (generate|flooding|refresh)
1149 .. clicmd:: no debug ospf lsa (generate|flooding|refresh)
1150
1151 Show debug detail of Link State messages
1152
1153 .. index:: debug ospf te
1154 .. clicmd:: debug ospf te
1155
1156 .. index:: no debug ospf te
1157 .. clicmd:: no debug ospf te
1158
1159 Show debug information about Traffic Engineering LSA
1160
1161 .. index:: debug ospf zebra
1162 .. clicmd:: debug ospf zebra
1163
1164 .. index:: debug ospf zebra (interface|redistribute)
1165 .. clicmd:: debug ospf zebra (interface|redistribute)
1166
1167 .. index:: no debug ospf zebra
1168 .. clicmd:: no debug ospf zebra
1169
1170 .. index:: no debug ospf zebra (interface|redistribute)
1171 .. clicmd:: no debug ospf zebra (interface|redistribute)
1172
1173 Show debug information of ZEBRA API
1174
1175 .. index:: show debugging ospf
1176 .. clicmd:: show debugging ospf
1177
1178
1179 OSPF Configuration Examples
1180 ===========================
1181
1182 A simple example, with MD5 authentication enabled:
1183
1184 .. code-block:: frr
1185
1186 !
1187 interface bge0
1188 ip ospf authentication message-digest
1189 ip ospf message-digest-key 1 md5 ABCDEFGHIJK
1190 !
1191 router ospf
1192 network 192.168.0.0/16 area 0.0.0.1
1193 area 0.0.0.1 authentication message-digest
1194
1195
1196 An :abbr:`ABR` router, with MD5 authentication and performing summarisation
1197 of networks between the areas:
1198
1199 .. code-block:: frr
1200
1201 !
1202 password ABCDEF
1203 log file /var/log/frr/ospfd.log
1204 service advanced-vty
1205 !
1206 interface eth0
1207 ip ospf authentication message-digest
1208 ip ospf message-digest-key 1 md5 ABCDEFGHIJK
1209 !
1210 interface ppp0
1211 !
1212 interface br0
1213 ip ospf authentication message-digest
1214 ip ospf message-digest-key 2 md5 XYZ12345
1215 !
1216 router ospf
1217 ospf router-id 192.168.0.1
1218 redistribute connected
1219 passive interface ppp0
1220 network 192.168.0.0/24 area 0.0.0.0
1221 network 10.0.0.0/16 area 0.0.0.0
1222 network 192.168.1.0/24 area 0.0.0.1
1223 area 0.0.0.0 authentication message-digest
1224 area 0.0.0.0 range 10.0.0.0/16
1225 area 0.0.0.0 range 192.168.0.0/24
1226 area 0.0.0.1 authentication message-digest
1227 area 0.0.0.1 range 10.2.0.0/16
1228 !
1229
1230
1231 A Traffic Engineering configuration, with Inter-ASv2 support.
1232
1233 First, the :file:`zebra.conf` part:
1234
1235 .. code-block:: frr
1236
1237 interface eth0
1238 ip address 198.168.1.1/24
1239 link-params
1240 enable
1241 admin-grp 0xa1
1242 metric 100
1243 max-bw 1.25e+07
1244 max-rsv-bw 1.25e+06
1245 unrsv-bw 0 1.25e+06
1246 unrsv-bw 1 1.25e+06
1247 unrsv-bw 2 1.25e+06
1248 unrsv-bw 3 1.25e+06
1249 unrsv-bw 4 1.25e+06
1250 unrsv-bw 5 1.25e+06
1251 unrsv-bw 6 1.25e+06
1252 unrsv-bw 7 1.25e+06
1253 !
1254 interface eth1
1255 ip address 192.168.2.1/24
1256 link-params
1257 enable
1258 metric 10
1259 max-bw 1.25e+07
1260 max-rsv-bw 1.25e+06
1261 unrsv-bw 0 1.25e+06
1262 unrsv-bw 1 1.25e+06
1263 unrsv-bw 2 1.25e+06
1264 unrsv-bw 3 1.25e+06
1265 unrsv-bw 4 1.25e+06
1266 unrsv-bw 5 1.25e+06
1267 unrsv-bw 6 1.25e+06
1268 unrsv-bw 7 1.25e+06
1269 neighbor 192.168.2.2 as 65000
1270 hostname HOSTNAME
1271 password PASSWORD
1272 log file /var/log/zebra.log
1273 !
1274 interface eth0
1275 ip address 198.168.1.1/24
1276 link-params
1277 enable
1278 admin-grp 0xa1
1279 metric 100
1280 max-bw 1.25e+07
1281 max-rsv-bw 1.25e+06
1282 unrsv-bw 0 1.25e+06
1283 unrsv-bw 1 1.25e+06
1284 unrsv-bw 2 1.25e+06
1285 unrsv-bw 3 1.25e+06
1286 unrsv-bw 4 1.25e+06
1287 unrsv-bw 5 1.25e+06
1288 unrsv-bw 6 1.25e+06
1289 unrsv-bw 7 1.25e+06
1290 !
1291 interface eth1
1292 ip address 192.168.2.1/24
1293 link-params
1294 enable
1295 metric 10
1296 max-bw 1.25e+07
1297 max-rsv-bw 1.25e+06
1298 unrsv-bw 0 1.25e+06
1299 unrsv-bw 1 1.25e+06
1300 unrsv-bw 2 1.25e+06
1301 unrsv-bw 3 1.25e+06
1302 unrsv-bw 4 1.25e+06
1303 unrsv-bw 5 1.25e+06
1304 unrsv-bw 6 1.25e+06
1305 unrsv-bw 7 1.25e+06
1306 neighbor 192.168.2.2 as 65000
1307
1308 Then the :file:`ospfd.conf` itself:
1309
1310 .. code-block:: frr
1311
1312 hostname HOSTNAME
1313 password PASSWORD
1314 log file /var/log/ospfd.log
1315 !
1316 !
1317 interface eth0
1318 ip ospf hello-interval 60
1319 ip ospf dead-interval 240
1320 !
1321 interface eth1
1322 ip ospf hello-interval 60
1323 ip ospf dead-interval 240
1324 !
1325 !
1326 router ospf
1327 ospf router-id 192.168.1.1
1328 network 192.168.0.0/16 area 1
1329 ospf opaque-lsa
1330 mpls-te
1331 mpls-te router-address 192.168.1.1
1332 mpls-te inter-as area 1
1333 !
1334 line vty
1335
1336 A router information example with PCE advertisement:
1337
1338 .. code-block:: frr
1339
1340 !
1341 router ospf
1342 ospf router-id 192.168.1.1
1343 network 192.168.0.0/16 area 1
1344 capability opaque
1345 mpls-te
1346 mpls-te router-address 192.168.1.1
1347 router-info area 0.0.0.1
1348 pce address 192.168.1.1
1349 pce flag 0x80
1350 pce domain as 65400
1351 pce neighbor as 65500
1352 pce neighbor as 65200
1353 pce scope 0x80
1354 !