]> git.proxmox.com Git - mirror_frr.git/blob - doc/user/ospfd.rst
Merge pull request #7306 from donaldsharp/bgp_dest_print
[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. This is required to use ``ospfclient``.
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 ospf 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 (0-600000) (0-600000) (0-600000)
181 .. clicmd:: timers throttle spf (0-600000) (0-600000) (0-600000)
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 supersedes 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 .. index:: proactive-arp
314 .. clicmd:: proactive-arp
315
316 .. index:: no proactive-arp
317 .. clicmd:: no proactive-arp
318
319 This command enables or disables sending ARP requests to update neighbor
320 table entries. It speeds up convergence for /32 networks on a P2P
321 connection.
322
323 This feature is enabled by default.
324
325 .. _ospf-area:
326
327 Areas
328 -----
329
330 .. index:: area A.B.C.D range A.B.C.D/M
331 .. clicmd:: area A.B.C.D range A.B.C.D/M
332
333 .. index:: area (0-4294967295) range A.B.C.D/M
334 .. clicmd:: area (0-4294967295) range A.B.C.D/M
335
336 .. index:: no area A.B.C.D range A.B.C.D/M
337 .. clicmd:: no area A.B.C.D range A.B.C.D/M
338
339 .. index:: no area (0-4294967295) range A.B.C.D/M
340 .. clicmd:: no area (0-4294967295) range A.B.C.D/M
341
342 Summarize intra area paths from specified area into one Type-3 summary-LSA
343 announced to other areas. This command can be used only in ABR and ONLY
344 router-LSAs (Type-1) and network-LSAs (Type-2) (i.e. LSAs with scope area) can
345 be summarized. Type-5 AS-external-LSAs can't be summarized - their scope is AS.
346 Summarizing Type-7 AS-external-LSAs isn't supported yet by FRR.
347
348 .. code-block:: frr
349
350 router ospf
351 network 192.168.1.0/24 area 0.0.0.0
352 network 10.0.0.0/8 area 0.0.0.10
353 area 0.0.0.10 range 10.0.0.0/8
354
355
356 With configuration above one Type-3 Summary-LSA with routing info 10.0.0.0/8 is
357 announced into backbone area if area 0.0.0.10 contains at least one intra-area
358 network (i.e. described with router or network LSA) from this range.
359
360 .. index:: area A.B.C.D range IPV4_PREFIX not-advertise
361 .. clicmd:: area A.B.C.D range IPV4_PREFIX not-advertise
362
363 .. index:: no area A.B.C.D range IPV4_PREFIX not-advertise
364 .. clicmd:: no area A.B.C.D range IPV4_PREFIX not-advertise
365
366 Instead of summarizing intra area paths filter them - i.e. intra area paths from this
367 range are not advertised into other areas.
368 This command makes sense in ABR only.
369
370 .. index:: area A.B.C.D range IPV4_PREFIX substitute IPV4_PREFIX
371 .. clicmd:: area A.B.C.D range IPV4_PREFIX substitute IPV4_PREFIX
372
373 .. index:: no area A.B.C.D range IPV4_PREFIX substitute IPV4_PREFIX
374 .. clicmd:: no area A.B.C.D range IPV4_PREFIX substitute IPV4_PREFIX
375
376 Substitute summarized prefix with another prefix.
377
378 .. code-block:: frr
379
380 router ospf
381 network 192.168.1.0/24 area 0.0.0.0
382 network 10.0.0.0/8 area 0.0.0.10
383 area 0.0.0.10 range 10.0.0.0/8 substitute 11.0.0.0/8
384
385
386 One Type-3 summary-LSA with routing info 11.0.0.0/8 is announced into backbone area if
387 area 0.0.0.10 contains at least one intra-area network (i.e. described with router-LSA or
388 network-LSA) from range 10.0.0.0/8.
389 This command makes sense in ABR only.
390
391 .. index:: area A.B.C.D virtual-link A.B.C.D
392 .. clicmd:: area A.B.C.D virtual-link A.B.C.D
393
394 .. index:: area (0-4294967295) virtual-link A.B.C.D
395 .. clicmd:: area (0-4294967295) virtual-link A.B.C.D
396
397 .. index:: no area A.B.C.D virtual-link A.B.C.D
398 .. clicmd:: no area A.B.C.D virtual-link A.B.C.D
399
400 .. index:: no area (0-4294967295) virtual-link A.B.C.D
401 .. clicmd:: no area (0-4294967295) virtual-link A.B.C.D
402
403 .. index:: area A.B.C.D shortcut
404 .. clicmd:: area A.B.C.D shortcut
405
406 .. index:: area (0-4294967295) shortcut
407 .. clicmd:: area (0-4294967295) shortcut
408
409 .. index:: no area A.B.C.D shortcut
410 .. clicmd:: no area A.B.C.D shortcut
411
412 .. index:: no area (0-4294967295) shortcut
413 .. clicmd:: no area (0-4294967295) shortcut
414
415 Configure the area as Shortcut capable. See :rfc:`3509`. This requires
416 that the 'abr-type' be set to 'shortcut'.
417
418 .. index:: area A.B.C.D stub
419 .. clicmd:: area A.B.C.D stub
420
421 .. index:: area (0-4294967295) stub
422 .. clicmd:: area (0-4294967295) stub
423
424 .. index:: no area A.B.C.D stub
425 .. clicmd:: no area A.B.C.D stub
426
427 .. index:: no area (0-4294967295) stub
428 .. clicmd:: no area (0-4294967295) stub
429
430 Configure the area to be a stub area. That is, an area where no router
431 originates routes external to OSPF and hence an area where all external
432 routes are via the ABR(s). Hence, ABRs for such an area do not need
433 to pass AS-External LSAs (type-5s) or ASBR-Summary LSAs (type-4) into the
434 area. They need only pass Network-Summary (type-3) LSAs into such an area,
435 along with a default-route summary.
436
437 .. index:: area A.B.C.D stub no-summary
438 .. clicmd:: area A.B.C.D stub no-summary
439
440 .. index:: area (0-4294967295) stub no-summary
441 .. clicmd:: area (0-4294967295) stub no-summary
442
443 .. index:: no area A.B.C.D stub no-summary
444 .. clicmd:: no area A.B.C.D stub no-summary
445
446 .. index:: no area (0-4294967295) stub no-summary
447 .. clicmd:: no area (0-4294967295) stub no-summary
448
449 Prevents an *ospfd* ABR from injecting inter-area
450 summaries into the specified stub area.
451
452 .. index:: area A.B.C.D default-cost (0-16777215)
453 .. clicmd:: area A.B.C.D default-cost (0-16777215)
454
455 .. index:: no area A.B.C.D default-cost (0-16777215)
456 .. clicmd:: no area A.B.C.D default-cost (0-16777215)
457
458 Set the cost of default-summary LSAs announced to stubby areas.
459
460 .. index:: area A.B.C.D export-list NAME
461 .. clicmd:: area A.B.C.D export-list NAME
462
463 .. index:: area (0-4294967295) export-list NAME
464 .. clicmd:: area (0-4294967295) export-list NAME
465
466 .. index:: no area A.B.C.D export-list NAME
467 .. clicmd:: no area A.B.C.D export-list NAME
468
469 .. index:: no area (0-4294967295) export-list NAME
470 .. clicmd:: no area (0-4294967295) export-list NAME
471
472 Filter Type-3 summary-LSAs announced to other areas originated from intra-
473 area paths from specified area.
474
475 .. code-block:: frr
476
477 router ospf
478 network 192.168.1.0/24 area 0.0.0.0
479 network 10.0.0.0/8 area 0.0.0.10
480 area 0.0.0.10 export-list foo
481 !
482 access-list foo permit 10.10.0.0/16
483 access-list foo deny any
484
485 With example above any intra-area paths from area 0.0.0.10 and from range
486 10.10.0.0/16 (for example 10.10.1.0/24 and 10.10.2.128/30) are announced into
487 other areas as Type-3 summary-LSA's, but any others (for example 10.11.0.0/16
488 or 10.128.30.16/30) aren't.
489
490 This command is only relevant if the router is an ABR for the specified
491 area.
492
493 .. index:: area A.B.C.D import-list NAME
494 .. clicmd:: area A.B.C.D import-list NAME
495
496 .. index:: area (0-4294967295) import-list NAME
497 .. clicmd:: area (0-4294967295) import-list NAME
498
499 .. index:: no area A.B.C.D import-list NAME
500 .. clicmd:: no area A.B.C.D import-list NAME
501
502 .. index:: no area (0-4294967295) import-list NAME
503 .. clicmd:: no area (0-4294967295) import-list NAME
504
505 Same as export-list, but it applies to paths announced into specified area
506 as Type-3 summary-LSAs.
507
508 .. index:: area A.B.C.D filter-list prefix NAME in
509 .. clicmd:: area A.B.C.D filter-list prefix NAME in
510
511 .. index:: area A.B.C.D filter-list prefix NAME out
512 .. clicmd:: area A.B.C.D filter-list prefix NAME out
513
514 .. index:: area (0-4294967295) filter-list prefix NAME in
515 .. clicmd:: area (0-4294967295) filter-list prefix NAME in
516
517 .. index:: area (0-4294967295) filter-list prefix NAME out
518 .. clicmd:: area (0-4294967295) filter-list prefix NAME out
519
520 .. index:: no area A.B.C.D filter-list prefix NAME in
521 .. clicmd:: no area A.B.C.D filter-list prefix NAME in
522
523 .. index:: no area A.B.C.D filter-list prefix NAME out
524 .. clicmd:: no area A.B.C.D filter-list prefix NAME out
525
526 .. index:: no area (0-4294967295) filter-list prefix NAME in
527 .. clicmd:: no area (0-4294967295) filter-list prefix NAME in
528
529 .. index:: no area (0-4294967295) filter-list prefix NAME out
530 .. clicmd:: no area (0-4294967295) filter-list prefix NAME out
531
532 Filtering Type-3 summary-LSAs to/from area using prefix lists. This command
533 makes sense in ABR only.
534
535 .. index:: area A.B.C.D authentication
536 .. clicmd:: area A.B.C.D authentication
537
538 .. index:: area (0-4294967295) authentication
539 .. clicmd:: area (0-4294967295) authentication
540
541 .. index:: no area A.B.C.D authentication
542 .. clicmd:: no area A.B.C.D authentication
543
544 .. index:: no area (0-4294967295) authentication
545 .. clicmd:: no area (0-4294967295) authentication
546
547 Specify that simple password authentication should be used for the given
548 area.
549
550 .. index:: area A.B.C.D authentication message-digest
551 .. clicmd:: area A.B.C.D authentication message-digest
552
553 .. index:: area (0-4294967295) authentication message-digest
554 .. clicmd:: area (0-4294967295) authentication message-digest
555
556 Specify that OSPF packets must be authenticated with MD5 HMACs within the
557 given area. Keying material must also be configured on a per-interface basis
558 (:clicmd:`ip ospf message-digest-key`).
559
560 MD5 authentication may also be configured on a per-interface basis
561 (:clicmd:`ip ospf authentication message-digest`). Such per-interface
562 settings will override any per-area authentication setting.
563
564 .. _ospf-interface:
565
566 Interfaces
567 ----------
568
569 .. index:: ip ospf area AREA [ADDR]
570 .. clicmd:: ip ospf area AREA [ADDR]
571
572 .. index:: no ip ospf area [ADDR]
573 .. clicmd:: no ip ospf area [ADDR]
574
575 Enable OSPF on the interface, optionally restricted to just the IP address
576 given by `ADDR`, putting it in the `AREA` area. Per interface area settings
577 take precedence to network commands
578 (:clicmd:`network A.B.C.D/M area A.B.C.D`).
579
580 If you have a lot of interfaces, and/or a lot of subnets, then enabling OSPF
581 via this command may result in a slight performance improvement.
582
583 .. index:: ip ospf authentication-key AUTH_KEY
584 .. clicmd:: ip ospf authentication-key AUTH_KEY
585
586 .. index:: no ip ospf authentication-key
587 .. clicmd:: no ip ospf authentication-key
588
589 Set OSPF authentication key to a simple password. After setting `AUTH_KEY`,
590 all OSPF packets are authenticated. `AUTH_KEY` has length up to 8 chars.
591
592 Simple text password authentication is insecure and deprecated in favour of
593 MD5 HMAC authentication.
594
595 .. index:: ip ospf authentication message-digest
596 .. clicmd:: ip ospf authentication message-digest
597
598 Specify that MD5 HMAC authentication must be used on this interface. MD5
599 keying material must also be configured. Overrides any authentication
600 enabled on a per-area basis
601 (:clicmd:`area A.B.C.D authentication message-digest`)
602
603 Note that OSPF MD5 authentication requires that time never go backwards
604 (correct time is NOT important, only that it never goes backwards), even
605 across resets, if ospfd is to be able to promptly reestablish adjacencies
606 with its neighbours after restarts/reboots. The host should have system time
607 be set at boot from an external or non-volatile source (e.g. battery backed
608 clock, NTP, etc.) or else the system clock should be periodically saved to
609 non-volatile storage and restored at boot if MD5 authentication is to be
610 expected to work reliably.
611
612 .. index:: ip ospf message-digest-key KEYID md5 KEY
613 .. clicmd:: ip ospf message-digest-key KEYID md5 KEY
614
615 .. index:: no ip ospf message-digest-key
616 .. clicmd:: no ip ospf message-digest-key
617
618 Set OSPF authentication key to a cryptographic password. The cryptographic
619 algorithm is MD5.
620
621 KEYID identifies secret key used to create the message digest. This ID is
622 part of the protocol and must be consistent across routers on a link.
623
624 KEY is the actual message digest key, of up to 16 chars (larger strings will
625 be truncated), and is associated with the given KEYID.
626
627 .. index:: ip ospf cost (1-65535)
628 .. clicmd:: ip ospf cost (1-65535)
629
630 .. index:: no ip ospf cost
631 .. clicmd:: no ip ospf cost
632
633 Set link cost for the specified interface. The cost value is set to
634 router-LSA's metric field and used for SPF calculation.
635
636 .. index:: ip ospf dead-interval (1-65535)
637 .. clicmd:: ip ospf dead-interval (1-65535)
638
639 .. index:: ip ospf dead-interval minimal hello-multiplier (2-20)
640 .. clicmd:: ip ospf dead-interval minimal hello-multiplier (2-20)
641
642 .. index:: no ip ospf dead-interval
643 .. clicmd:: no ip ospf dead-interval
644
645 Set number of seconds for RouterDeadInterval timer value used for Wait Timer
646 and Inactivity Timer. This value must be the same for all routers attached
647 to a common network. The default value is 40 seconds.
648
649 If 'minimal' is specified instead, then the dead-interval is set to 1 second
650 and one must specify a hello-multiplier. The hello-multiplier specifies how
651 many Hellos to send per second, from 2 (every 500ms) to 20 (every 50ms).
652 Thus one can have 1s convergence time for OSPF. If this form is specified,
653 then the hello-interval advertised in Hello packets is set to 0 and the
654 hello-interval on received Hello packets is not checked, thus the
655 hello-multiplier need NOT be the same across multiple routers on a common
656 link.
657
658 .. index:: ip ospf hello-interval (1-65535)
659 .. clicmd:: ip ospf hello-interval (1-65535)
660
661 .. index:: no ip ospf hello-interval
662 .. clicmd:: no ip ospf hello-interval
663
664 Set number of seconds for HelloInterval timer value. Setting this value,
665 Hello packet will be sent every timer value seconds on the specified interface.
666 This value must be the same for all routers attached to a common network.
667 The default value is 10 seconds.
668
669 This command has no effect if
670 :clicmd:`ip ospf dead-interval minimal hello-multiplier (2-20)` is also
671 specified for the interface.
672
673 .. index:: ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)
674 .. clicmd:: ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)
675
676 When configuring a point-to-point network on an interface and the interface
677 has a /32 address associated with then OSPF will treat the interface
678 as being `unnumbered`. If you are doing this you *must* set the
679 net.ipv4.conf.<interface name>.rp_filter value to 0. In order for
680 the ospf multicast packets to be delivered by the kernel.
681
682 .. index:: no ip ospf network
683 .. clicmd:: no ip ospf network
684
685 Set explicitly network type for specified interface.
686
687 .. index:: ip ospf priority (0-255)
688 .. clicmd:: ip ospf priority (0-255)
689
690 .. index:: no ip ospf priority
691 .. clicmd:: no ip ospf priority
692
693 Set RouterPriority integer value. The router with the highest priority will
694 be more eligible to become Designated Router. Setting the value to 0, makes
695 the router ineligible to become Designated Router. The default value is 1.
696
697 .. index:: ip ospf retransmit-interval (1-65535)
698 .. clicmd:: ip ospf retransmit-interval (1-65535)
699
700 .. index:: no ip ospf retransmit interval
701 .. clicmd:: no ip ospf retransmit interval
702
703 Set number of seconds for RxmtInterval timer value. This value is used when
704 retransmitting Database Description and Link State Request packets. The
705 default value is 5 seconds.
706
707 .. index:: ip ospf transmit-delay (1-65535) [A.B.C.D]
708 .. clicmd:: ip ospf transmit-delay (1-65535) [A.B.C.D]
709
710 .. index:: no ip ospf transmit-delay [(1-65535)] [A.B.C.D]
711 .. clicmd:: no ip ospf transmit-delay [(1-65535)] [A.B.C.D]
712
713 Set number of seconds for InfTransDelay value. LSAs' age should be
714 incremented by this value when transmitting. The default value is 1 second.
715
716 .. index:: ip ospf area (A.B.C.D|(0-4294967295))
717 .. clicmd:: ip ospf area (A.B.C.D|(0-4294967295))
718
719 .. index:: no ip ospf area
720 .. clicmd:: no ip ospf area
721
722 Enable ospf on an interface and set associated area.
723
724 OSPF route-map
725 ==============
726
727 Usage of *ospfd*'s route-map support.
728
729 .. index:: set metric [+|-](0-4294967295)
730 .. clicmd:: set metric [+|-](0-4294967295)
731
732 Set a metric for matched route when sending announcement. Use plus (+) sign
733 to add a metric value to an existing metric. Use minus (-) sign to
734 substract a metric value from an existing metric.
735
736 .. _redistribute-routes-to-ospf:
737
738 Redistribution
739 --------------
740
741 .. index:: redistribute (kernel|connected|static|rip|bgp)
742 .. clicmd:: redistribute (kernel|connected|static|rip|bgp)
743
744 .. index:: redistribute (kernel|connected|static|rip|bgp) ROUTE-MAP
745 .. clicmd:: redistribute (kernel|connected|static|rip|bgp) ROUTE-MAP
746
747 .. index:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)
748 .. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)
749
750 .. index:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map WORD
751 .. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map WORD
752
753 .. index:: redistribute (kernel|connected|static|rip|bgp) metric (0-16777214)
754 .. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric (0-16777214)
755
756 .. index:: redistribute (kernel|connected|static|rip|bgp) metric (0-16777214) route-map WORD
757 .. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric (0-16777214) route-map WORD
758
759 .. index:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric (0-16777214)
760 .. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric (0-16777214)
761
762 .. index:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric (0-16777214) route-map WORD
763 .. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric (0-16777214) route-map WORD
764
765 .. index:: no redistribute (kernel|connected|static|rip|bgp)
766 .. clicmd:: no redistribute (kernel|connected|static|rip|bgp)
767
768 .. _ospf-redistribute:
769
770 Redistribute routes of the specified protocol or kind into OSPF, with the
771 metric type and metric set if specified, filtering the routes using the
772 given route-map if specified. Redistributed routes may also be filtered
773 with distribute-lists, see
774 :ref:`ospf distribute-list configuration <ospf-distribute-list>`.
775
776 Redistributed routes are distributed as into OSPF as Type-5 External LSAs
777 into links to areas that accept external routes, Type-7 External LSAs for
778 NSSA areas and are not redistributed at all into Stub areas, where external
779 routes are not permitted.
780
781 Note that for connected routes, one may instead use the `passive-interface`
782 configuration.
783
784 .. seealso::
785
786 clicmd:`passive-interface INTERFACE`.
787
788 .. index:: default-information originate
789 .. clicmd:: default-information originate
790
791 .. index:: default-information originate metric (0-16777214)
792 .. clicmd:: default-information originate metric (0-16777214)
793
794 .. index:: default-information originate metric (0-16777214) metric-type (1|2)
795 .. clicmd:: default-information originate metric (0-16777214) metric-type (1|2)
796
797 .. index:: default-information originate metric (0-16777214) metric-type (1|2) route-map WORD
798 .. clicmd:: default-information originate metric (0-16777214) metric-type (1|2) route-map WORD
799
800 .. index:: default-information originate always
801 .. clicmd:: default-information originate always
802
803 .. index:: default-information originate always metric (0-16777214)
804 .. clicmd:: default-information originate always metric (0-16777214)
805
806 .. index:: default-information originate always metric (0-16777214) metric-type (1|2)
807 .. clicmd:: default-information originate always metric (0-16777214) metric-type (1|2)
808
809 .. index:: default-information originate always metric (0-16777214) metric-type (1|2) route-map WORD
810 .. clicmd:: default-information originate always metric (0-16777214) metric-type (1|2) route-map WORD
811
812 .. index:: no default-information originate
813 .. clicmd:: no default-information originate
814
815 Originate an AS-External (type-5) LSA describing a default route into all
816 external-routing capable areas, of the specified metric and metric type. If
817 the 'always' keyword is given then the default is always advertised, even
818 when there is no default present in the routing table.
819
820 .. index:: distribute-list NAME out (kernel|connected|static|rip|ospf
821 .. clicmd:: distribute-list NAME out (kernel|connected|static|rip|ospf
822
823 .. index:: no distribute-list NAME out (kernel|connected|static|rip|ospf
824 .. clicmd:: no distribute-list NAME out (kernel|connected|static|rip|ospf
825
826 .. _ospf-distribute-list:
827
828 Apply the access-list filter, NAME, to redistributed routes of the given
829 type before allowing the routes to redistributed into OSPF
830 (:ref:`ospf redistribution <ospf-redistribute>`).
831
832 .. index:: default-metric (0-16777214)
833 .. clicmd:: default-metric (0-16777214)
834
835 .. index:: no default-metric
836 .. clicmd:: no default-metric
837
838 .. index:: distance (1-255)
839 .. clicmd:: distance (1-255)
840
841 .. index:: no distance (1-255)
842 .. clicmd:: no distance (1-255)
843
844 .. index:: distance ospf (intra-area|inter-area|external) (1-255)
845 .. clicmd:: distance ospf (intra-area|inter-area|external) (1-255)
846
847 .. index:: no distance ospf
848 .. clicmd:: no distance ospf
849
850 .. index:: router zebra
851 .. clicmd:: router zebra
852
853 .. index:: no router zebra
854 .. clicmd:: no router zebra
855
856 Graceful Restart Helper
857 =======================
858
859 .. index:: graceful-restart helper-only [A.B.C.D]
860 .. clicmd:: graceful-restart helper-only [A.B.C.D]
861
862 .. index:: no graceful-restart helper-only [A.B.C.D]
863 .. clicmd:: no graceful-restart helper-only [A.B.C.D]
864
865 Configure Graceful Restart (RFC 3623) helper support.
866 By default, helper support is disabled for all neighbours.
867 This config enables/disables helper support on this router
868 for all neighbours.
869 To enable/disable helper support for a specific
870 neighbour, the router-id (A.B.C.D) has to be specified.
871
872 .. index:: graceful-restart helper strict-lsa-checking
873 .. clicmd:: graceful-restart helper strict-lsa-checking
874
875 .. index:: no graceful-restart helper strict-lsa-checking
876 .. clicmd:: no graceful-restart helper strict-lsa-checking
877
878 If 'strict-lsa-checking' is configured then the helper will
879 abort the Graceful Restart when a LSA change occurs which
880 affects the restarting router.
881 By default 'strict-lsa-checking' is enabled"
882
883 .. index:: graceful-restart helper supported-grace-time
884 .. clicmd:: graceful-restart helper supported-grace-time
885
886 .. index:: no graceful-restart helper supported-grace-time
887 .. clicmd:: no graceful-restart helper supported-grace-time
888
889 Supports as HELPER for configured grace period.
890
891 .. index:: graceful-restart helper planned-only
892 .. clicmd:: graceful-restart helper planned-only
893
894 .. index:: no graceful-restart helper planned-only
895 .. clicmd:: no graceful-restart helper planned-only
896
897 It helps to support as HELPER only for planned
898 restarts. By default, it supports both planned and
899 unplanned outages.
900
901 .. _showing-ospf-information:
902
903 Showing Information
904 ===================
905
906 .. _show-ip-ospf:
907
908 .. index:: show ip ospf
909 .. clicmd:: show ip ospf
910
911 Show information on a variety of general OSPF and area state and
912 configuration information.
913
914 .. index:: show ip ospf interface [INTERFACE]
915 .. clicmd:: show ip ospf interface [INTERFACE]
916
917 Show state and configuration of OSPF the specified interface, or all
918 interfaces if no interface is given.
919
920 .. index:: show ip ospf neighbor
921 .. clicmd:: show ip ospf neighbor
922
923 .. index:: show ip ospf neighbor INTERFACE
924 .. clicmd:: show ip ospf neighbor INTERFACE
925
926 .. index:: show ip ospf neighbor detail
927 .. clicmd:: show ip ospf neighbor detail
928
929 .. index:: show ip ospf neighbor INTERFACE detail
930 .. clicmd:: show ip ospf neighbor INTERFACE detail
931
932 .. index:: show ip ospf database
933 .. clicmd:: show ip ospf database
934
935 .. index:: show ip ospf database (asbr-summary|external|network|router|summary)
936 .. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary)
937
938 .. index:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID
939 .. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID
940
941 .. index:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID adv-router ADV-ROUTER
942 .. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID adv-router ADV-ROUTER
943
944 .. index:: show ip ospf database (asbr-summary|external|network|router|summary) adv-router ADV-ROUTER
945 .. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) adv-router ADV-ROUTER
946
947 .. index:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID self-originate
948 .. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID self-originate
949
950 .. index:: show ip ospf database (asbr-summary|external|network|router|summary) self-originate
951 .. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) self-originate
952
953 .. index:: show ip ospf database max-age
954 .. clicmd:: show ip ospf database max-age
955
956 .. index:: show ip ospf database self-originate
957 .. clicmd:: show ip ospf database self-originate
958
959 .. index:: show ip ospf route
960 .. clicmd:: show ip ospf route
961
962 Show the OSPF routing table, as determined by the most recent SPF
963 calculation.
964
965 .. index:: show ip ospf graceful-restart helper [detail] [json]
966 .. clicmd:: show ip ospf graceful-restart helper [detail] [json]
967
968 Displays the Grcaeful Restart Helper details including helper
969 config changes.
970
971 .. _opaque-lsa:
972
973 Opaque LSA
974 ==========
975
976 .. index:: ospf opaque-lsa
977 .. clicmd:: ospf opaque-lsa
978
979 .. index:: capability opaque
980 .. clicmd:: capability opaque
981
982 .. index:: no ospf opaque-lsa
983 .. clicmd:: no ospf opaque-lsa
984
985 .. index:: no capability opaque
986 .. clicmd:: no capability opaque
987
988 *ospfd* supports Opaque LSA (:rfc:`2370`) as partial support for
989 MPLS Traffic Engineering LSAs. The opaque-lsa capability must be
990 enabled in the configuration. An alternate command could be
991 "mpls-te on" (:ref:`ospf-traffic-engineering`). Note that FRR
992 offers only partial support for some of the routing protocol
993 extensions that are used with MPLS-TE; it does not support a
994 complete RSVP-TE solution.
995
996 .. index:: show ip ospf database (opaque-link|opaque-area|opaque-external)
997 .. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external)
998
999 .. index:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID
1000 .. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID
1001
1002 .. index:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID adv-router ADV-ROUTER
1003 .. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID adv-router ADV-ROUTER
1004
1005 .. index:: show ip ospf database (opaque-link|opaque-area|opaque-external) adv-router ADV-ROUTER
1006 .. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) adv-router ADV-ROUTER
1007
1008 .. index:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID self-originate
1009 .. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID self-originate
1010
1011 .. index:: show ip ospf database (opaque-link|opaque-area|opaque-external) self-originate
1012 .. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external) self-originate
1013
1014 Show Opaque LSA from the database.
1015
1016 .. _ospf-traffic-engineering:
1017
1018 Traffic Engineering
1019 ===================
1020
1021 .. note::
1022
1023 At this time, FRR offers partial support for some of the routing
1024 protocol extensions that can be used with MPLS-TE. FRR does not
1025 support a complete RSVP-TE solution currently.
1026
1027 .. index:: mpls-te on
1028 .. clicmd:: mpls-te on
1029
1030 .. index:: no mpls-te
1031 .. clicmd:: no mpls-te
1032
1033 Enable Traffic Engineering LSA flooding.
1034
1035 .. index:: mpls-te router-address <A.B.C.D>
1036 .. clicmd:: mpls-te router-address <A.B.C.D>
1037
1038 Configure stable IP address for MPLS-TE. This IP address is then advertise
1039 in Opaque LSA Type-10 TLV=1 (TE) option 1 (Router-Address).
1040
1041 .. index:: mpls-te inter-as area <area-id>|as
1042 .. clicmd:: mpls-te inter-as area <area-id>|as
1043
1044 .. index:: no mpls-te inter-as
1045 .. clicmd:: no mpls-te inter-as
1046
1047 Enable :rfc:`5392` support - Inter-AS TE v2 - to flood Traffic Engineering
1048 parameters of Inter-AS link. 2 modes are supported: AREA and AS; LSA are
1049 flood in AREA <area-id> with Opaque Type-10, respectively in AS with Opaque
1050 Type-11. In all case, Opaque-LSA TLV=6.
1051
1052 .. index:: show ip ospf mpls-te interface
1053 .. clicmd:: show ip ospf mpls-te interface
1054
1055 .. index:: show ip ospf mpls-te interface INTERFACE
1056 .. clicmd:: show ip ospf mpls-te interface INTERFACE
1057
1058 Show MPLS Traffic Engineering parameters for all or specified interface.
1059
1060 .. index:: show ip ospf mpls-te router
1061 .. clicmd:: show ip ospf mpls-te router
1062
1063 Show Traffic Engineering router parameters.
1064
1065 .. _router-information:
1066
1067 Router Information
1068 ==================
1069
1070 .. index:: router-info [as | area]
1071 .. clicmd:: router-info [as | area]
1072
1073 .. index:: no router-info
1074 .. clicmd:: no router-info
1075
1076 Enable Router Information (:rfc:`4970`) LSA advertisement with AS scope
1077 (default) or Area scope flooding when area is specified. Old syntax
1078 `router-info area <A.B.C.D>` is always supported but mark as deprecated
1079 as the area ID is no more necessary. Indeed, router information support
1080 multi-area and detect automatically the areas.
1081
1082 .. index:: pce address <A.B.C.D>
1083 .. clicmd:: pce address <A.B.C.D>
1084
1085 .. index:: no pce address
1086 .. clicmd:: no pce address
1087
1088 .. index:: pce domain as (0-65535)
1089 .. clicmd:: pce domain as (0-65535)
1090
1091 .. index:: no pce domain as (0-65535)
1092 .. clicmd:: no pce domain as (0-65535)
1093
1094 .. index:: pce neighbor as (0-65535)
1095 .. clicmd:: pce neighbor as (0-65535)
1096
1097 .. index:: no pce neighbor as (0-65535)
1098 .. clicmd:: no pce neighbor as (0-65535)
1099
1100 .. index:: pce flag BITPATTERN
1101 .. clicmd:: pce flag BITPATTERN
1102
1103 .. index:: no pce flag
1104 .. clicmd:: no pce flag
1105
1106 .. index:: pce scope BITPATTERN
1107 .. clicmd:: pce scope BITPATTERN
1108
1109 .. index:: no pce scope
1110 .. clicmd:: no pce scope
1111
1112 The commands are conform to :rfc:`5088` and allow OSPF router announce Path
1113 Computation Element (PCE) capabilities through the Router Information (RI)
1114 LSA. Router Information must be enable prior to this. The command set/unset
1115 respectively the PCE IP address, Autonomous System (AS) numbers of
1116 controlled domains, neighbor ASs, flag and scope. For flag and scope, please
1117 refer to :rfc`5088` for the BITPATTERN recognition. Multiple 'pce neighbor'
1118 command could be specified in order to specify all PCE neighbours.
1119
1120 .. index:: show ip ospf router-info
1121 .. clicmd:: show ip ospf router-info
1122
1123 Show Router Capabilities flag.
1124
1125 .. index:: show ip ospf router-info pce
1126 .. clicmd:: show ip ospf router-info pce
1127
1128 Show Router Capabilities PCE parameters.
1129
1130 .. _debugging-ospf:
1131
1132 Segment Routing
1133 ===============
1134
1135 This is an EXPERIMENTAL support of Segment Routing as per `RFC 8665` for MPLS
1136 dataplane.
1137
1138 .. index:: [no] segment-routing on
1139 .. clicmd:: [no] segment-routing on
1140
1141 Enable Segment Routing. Even if this also activate routing information
1142 support, it is preferable to also activate routing information, and set
1143 accordingly the Area or AS flooding.
1144
1145 .. index:: [no] segment-routing global-block (0-1048575) (0-1048575)
1146 .. clicmd:: [no] segment-routing global-block (0-1048575) (0-1048575)
1147
1148 Fix the Segment Routing Global Block i.e. the label range used by MPLS to
1149 store label in the MPLS FIB for Prefix SID.
1150
1151 .. index:: [no] segment-routing local-block (0-1048575) (0-1048575)
1152 .. clicmd:: [no] segment-routing local-block (0-1048575) (0-1048575)
1153
1154 Fix the Segment Routing Local Block i.e. the label range used by MPLS to
1155 store label in the MPLS FIB for Adjacency SID.
1156
1157 .. index:: [no] segment-routing node-msd (1-16)
1158 .. clicmd:: [no] segment-routing node-msd (1-16)
1159
1160 Fix the Maximum Stack Depth supported by the router. The value depend of the
1161 MPLS dataplane. E.g. for Linux kernel, since version 4.13 it is 32.
1162
1163 .. index:: [no] segment-routing prefix A.B.C.D/M index (0-65535) [no-php-flag|explicit-null]
1164 .. clicmd:: [no] segment-routing prefix A.B.C.D/M [index (0-65535)|no-php-flag|explicit-null]
1165
1166 Set the Segment Routing index for the specified prefix. Note that, only
1167 prefix with /32 corresponding to a loopback interface are currently
1168 supported. The 'no-php-flag' means NO Penultimate Hop Popping that allows SR
1169 node to request to its neighbor to not pop the label. The 'explicit-null' means that
1170 neighbor nodes must swap the incoming label by the MPLS Explicit Null label
1171 before delivering the packet.
1172
1173 .. index:: show ip ospf database segment-routing <adv-router ADVROUTER|self-originate> [json]
1174 .. clicmd:: show ip ospf database segment-routing <adv-router ADVROUTER|self-originate> [json]
1175
1176 Show Segment Routing Data Base, all SR nodes, specific advertised router or
1177 self router. Optional JSON output can be obtained by appending 'json' to the
1178 end of the command.
1179
1180 Debugging OSPF
1181 ==============
1182
1183 .. index:: debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]
1184 .. clicmd:: debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]
1185
1186 .. index:: no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]
1187 .. clicmd:: no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]
1188
1189 Dump Packet for debugging
1190
1191 .. index:: debug ospf ism
1192 .. clicmd:: debug ospf ism
1193
1194 .. index:: debug ospf ism (status|events|timers)
1195 .. clicmd:: debug ospf ism (status|events|timers)
1196
1197 .. index:: no debug ospf ism
1198 .. clicmd:: no debug ospf ism
1199
1200 .. index:: no debug ospf ism (status|events|timers)
1201 .. clicmd:: no debug ospf ism (status|events|timers)
1202
1203 Show debug information of Interface State Machine
1204
1205 .. index:: debug ospf nsm
1206 .. clicmd:: debug ospf nsm
1207
1208 .. index:: debug ospf nsm (status|events|timers)
1209 .. clicmd:: debug ospf nsm (status|events|timers)
1210
1211 .. index:: no debug ospf nsm
1212 .. clicmd:: no debug ospf nsm
1213
1214 .. index:: no debug ospf nsm (status|events|timers)
1215 .. clicmd:: no debug ospf nsm (status|events|timers)
1216
1217 Show debug information of Network State Machine
1218
1219 .. index:: debug ospf event
1220 .. clicmd:: debug ospf event
1221
1222 .. index:: no debug ospf event
1223 .. clicmd:: no debug ospf event
1224
1225 Show debug information of OSPF event
1226
1227 .. index:: debug ospf nssa
1228 .. clicmd:: debug ospf nssa
1229
1230 .. index:: no debug ospf nssa
1231 .. clicmd:: no debug ospf nssa
1232
1233 Show debug information about Not So Stub Area
1234
1235 .. index:: debug ospf lsa
1236 .. clicmd:: debug ospf lsa
1237
1238 .. index:: debug ospf lsa (generate|flooding|refresh)
1239 .. clicmd:: debug ospf lsa (generate|flooding|refresh)
1240
1241 .. index:: no debug ospf lsa
1242 .. clicmd:: no debug ospf lsa
1243
1244 .. index:: no debug ospf lsa (generate|flooding|refresh)
1245 .. clicmd:: no debug ospf lsa (generate|flooding|refresh)
1246
1247 Show debug detail of Link State messages
1248
1249 .. index:: debug ospf te
1250 .. clicmd:: debug ospf te
1251
1252 .. index:: no debug ospf te
1253 .. clicmd:: no debug ospf te
1254
1255 Show debug information about Traffic Engineering LSA
1256
1257 .. index:: debug ospf zebra
1258 .. clicmd:: debug ospf zebra
1259
1260 .. index:: debug ospf zebra (interface|redistribute)
1261 .. clicmd:: debug ospf zebra (interface|redistribute)
1262
1263 .. index:: no debug ospf zebra
1264 .. clicmd:: no debug ospf zebra
1265
1266 .. index:: no debug ospf zebra (interface|redistribute)
1267 .. clicmd:: no debug ospf zebra (interface|redistribute)
1268
1269 Show debug information of ZEBRA API
1270
1271 .. index:: debug ospf graceful-restart helper
1272 .. clicmd:: debug ospf graceful-restart helper
1273
1274 .. index:: no debug ospf graceful-restart helper
1275 .. clicmd:: no debug ospf graceful-restart helper
1276
1277 Enable/disable debug information for OSPF Graceful Restart Helper
1278
1279 .. index:: show debugging ospf
1280 .. clicmd:: show debugging ospf
1281
1282 OSPF Configuration Examples
1283 ===========================
1284
1285 A simple example, with MD5 authentication enabled:
1286
1287 .. code-block:: frr
1288
1289 !
1290 interface bge0
1291 ip ospf authentication message-digest
1292 ip ospf message-digest-key 1 md5 ABCDEFGHIJK
1293 !
1294 router ospf
1295 network 192.168.0.0/16 area 0.0.0.1
1296 area 0.0.0.1 authentication message-digest
1297
1298
1299 An :abbr:`ABR` router, with MD5 authentication and performing summarisation
1300 of networks between the areas:
1301
1302 .. code-block:: frr
1303
1304 !
1305 password ABCDEF
1306 log file /var/log/frr/ospfd.log
1307 service advanced-vty
1308 !
1309 interface eth0
1310 ip ospf authentication message-digest
1311 ip ospf message-digest-key 1 md5 ABCDEFGHIJK
1312 !
1313 interface ppp0
1314 !
1315 interface br0
1316 ip ospf authentication message-digest
1317 ip ospf message-digest-key 2 md5 XYZ12345
1318 !
1319 router ospf
1320 ospf router-id 192.168.0.1
1321 redistribute connected
1322 passive interface ppp0
1323 network 192.168.0.0/24 area 0.0.0.0
1324 network 10.0.0.0/16 area 0.0.0.0
1325 network 192.168.1.0/24 area 0.0.0.1
1326 area 0.0.0.0 authentication message-digest
1327 area 0.0.0.0 range 10.0.0.0/16
1328 area 0.0.0.0 range 192.168.0.0/24
1329 area 0.0.0.1 authentication message-digest
1330 area 0.0.0.1 range 10.2.0.0/16
1331 !
1332
1333
1334 A Traffic Engineering configuration, with Inter-ASv2 support.
1335
1336 First, the :file:`zebra.conf` part:
1337
1338 .. code-block:: frr
1339
1340 interface eth0
1341 ip address 198.168.1.1/24
1342 link-params
1343 enable
1344 admin-grp 0xa1
1345 metric 100
1346 max-bw 1.25e+07
1347 max-rsv-bw 1.25e+06
1348 unrsv-bw 0 1.25e+06
1349 unrsv-bw 1 1.25e+06
1350 unrsv-bw 2 1.25e+06
1351 unrsv-bw 3 1.25e+06
1352 unrsv-bw 4 1.25e+06
1353 unrsv-bw 5 1.25e+06
1354 unrsv-bw 6 1.25e+06
1355 unrsv-bw 7 1.25e+06
1356 !
1357 interface eth1
1358 ip address 192.168.2.1/24
1359 link-params
1360 enable
1361 metric 10
1362 max-bw 1.25e+07
1363 max-rsv-bw 1.25e+06
1364 unrsv-bw 0 1.25e+06
1365 unrsv-bw 1 1.25e+06
1366 unrsv-bw 2 1.25e+06
1367 unrsv-bw 3 1.25e+06
1368 unrsv-bw 4 1.25e+06
1369 unrsv-bw 5 1.25e+06
1370 unrsv-bw 6 1.25e+06
1371 unrsv-bw 7 1.25e+06
1372 neighbor 192.168.2.2 as 65000
1373 hostname HOSTNAME
1374 password PASSWORD
1375 log file /var/log/zebra.log
1376 !
1377 interface eth0
1378 ip address 198.168.1.1/24
1379 link-params
1380 enable
1381 admin-grp 0xa1
1382 metric 100
1383 max-bw 1.25e+07
1384 max-rsv-bw 1.25e+06
1385 unrsv-bw 0 1.25e+06
1386 unrsv-bw 1 1.25e+06
1387 unrsv-bw 2 1.25e+06
1388 unrsv-bw 3 1.25e+06
1389 unrsv-bw 4 1.25e+06
1390 unrsv-bw 5 1.25e+06
1391 unrsv-bw 6 1.25e+06
1392 unrsv-bw 7 1.25e+06
1393 !
1394 interface eth1
1395 ip address 192.168.2.1/24
1396 link-params
1397 enable
1398 metric 10
1399 max-bw 1.25e+07
1400 max-rsv-bw 1.25e+06
1401 unrsv-bw 0 1.25e+06
1402 unrsv-bw 1 1.25e+06
1403 unrsv-bw 2 1.25e+06
1404 unrsv-bw 3 1.25e+06
1405 unrsv-bw 4 1.25e+06
1406 unrsv-bw 5 1.25e+06
1407 unrsv-bw 6 1.25e+06
1408 unrsv-bw 7 1.25e+06
1409 neighbor 192.168.2.2 as 65000
1410
1411 Then the :file:`ospfd.conf` itself:
1412
1413 .. code-block:: frr
1414
1415 hostname HOSTNAME
1416 password PASSWORD
1417 log file /var/log/ospfd.log
1418 !
1419 !
1420 interface eth0
1421 ip ospf hello-interval 60
1422 ip ospf dead-interval 240
1423 !
1424 interface eth1
1425 ip ospf hello-interval 60
1426 ip ospf dead-interval 240
1427 !
1428 !
1429 router ospf
1430 ospf router-id 192.168.1.1
1431 network 192.168.0.0/16 area 1
1432 ospf opaque-lsa
1433 mpls-te
1434 mpls-te router-address 192.168.1.1
1435 mpls-te inter-as area 1
1436 !
1437 line vty
1438
1439 A router information example with PCE advertisement:
1440
1441 .. code-block:: frr
1442
1443 !
1444 router ospf
1445 ospf router-id 192.168.1.1
1446 network 192.168.0.0/16 area 1
1447 capability opaque
1448 mpls-te
1449 mpls-te router-address 192.168.1.1
1450 router-info area 0.0.0.1
1451 pce address 192.168.1.1
1452 pce flag 0x80
1453 pce domain as 65400
1454 pce neighbor as 65500
1455 pce neighbor as 65200
1456 pce scope 0x80
1457 !