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