]> git.proxmox.com Git - mirror_frr.git/blame - doc/user/ospfd.rst
Merge pull request #10537 from mjstapp/fix_dplane_strdup
[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
c1a54c05 198.. clicmd:: max-metric router-lsa [on-startup|on-shutdown] (5-86400)
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
c1a54c05 271 In some cases it may be more convenient to enable OSPF on a per
6ee602cd 272 interface/subnet basis (:clicmd:`ip ospf area AREA [ADDR]`).
42fc5d26 273
dfb2ee85
JU
274.. clicmd:: proactive-arp
275
dfb2ee85
JU
276
277 This command enables or disables sending ARP requests to update neighbor
278 table entries. It speeds up convergence for /32 networks on a P2P
b832909b 279 connection.
dfb2ee85
JU
280
281 This feature is enabled by default.
42fc5d26 282
f91ce319
MR
283.. clicmd:: clear ip ospf [(1-65535)] process
284
285 This command can be used to clear the ospf process data structures. This
286 will clear the ospf neighborship as well and it will get re-established.
287 This will clear the LSDB too. This will be helpful when there is a change
288 in router-id and if user wants the router-id change to take effect, user can
289 use this cli instead of restarting the ospfd daemon.
290
f91ce319
MR
291.. clicmd:: clear ip ospf [(1-65535)] neighbor
292
293 This command can be used to clear the ospf neighbor data structures. This
294 will clear the ospf neighborship and it will get re-established. This
295 command can be used when the neighbor state get stuck at some state and
296 this can be used to recover it from that state.
297
25d6c967 298.. clicmd:: maximum-paths (1-64)
3d5b9855 299
25d6c967
IR
300 Use this command to control the maximum number of equal cost paths to reach
301 a specific destination. The upper limit may differ if you change the value
302 of MULTIPATH_NUM during compilation. The default is MULTIPATH_NUM (64).
3d5b9855 303
44db98df
PR
304.. clicmd:: write-multiplier (1-100)
305
306 Use this command to tune the amount of work done in the packet read and
307 write threads before relinquishing control. The parameter is the number
308 of packets to process before returning. The defult value of this parameter
309 is 20.
310
0efdf0fe 311.. _ospf-area:
42fc5d26 312
e6f1b831
QY
313Areas
314-----
42fc5d26 315
c1a54c05 316.. clicmd:: area A.B.C.D range A.B.C.D/M
42fc5d26 317
c1a54c05 318.. clicmd:: area (0-4294967295) range A.B.C.D/M
42fc5d26 319
42fc5d26 320
42fc5d26 321
9eb95b3b
QY
322 Summarize intra area paths from specified area into one Type-3 summary-LSA
323 announced to other areas. This command can be used only in ABR and ONLY
d1e7591e 324 router-LSAs (Type-1) and network-LSAs (Type-2) (i.e. LSAs with scope area) can
9eb95b3b
QY
325 be summarized. Type-5 AS-external-LSAs can't be summarized - their scope is AS.
326 Summarizing Type-7 AS-external-LSAs isn't supported yet by FRR.
42fc5d26 327
9eb95b3b 328 .. code-block:: frr
42fc5d26 329
9eb95b3b
QY
330 router ospf
331 network 192.168.1.0/24 area 0.0.0.0
332 network 10.0.0.0/8 area 0.0.0.10
333 area 0.0.0.10 range 10.0.0.0/8
a8c90e15 334
42fc5d26 335
9eb95b3b
QY
336 With configuration above one Type-3 Summary-LSA with routing info 10.0.0.0/8 is
337 announced into backbone area if area 0.0.0.10 contains at least one intra-area
d1e7591e 338 network (i.e. described with router or network LSA) from this range.
42fc5d26 339
8bb8273f 340.. clicmd:: area A.B.C.D range A.B.C.D/M not-advertise
341
342.. clicmd:: area (0-4294967295) range A.B.C.D/M not-advertise
42fc5d26 343
42fc5d26 344
d1e7591e 345 Instead of summarizing intra area paths filter them - i.e. intra area paths from this
c1a54c05
QY
346 range are not advertised into other areas.
347 This command makes sense in ABR only.
42fc5d26 348
8bb8273f 349.. clicmd:: area A.B.C.D range A.B.C.D/M substitute A.B.C.D/M
350
351.. clicmd:: area (0-4294967295) range A.B.C.D/M substitute A.B.C.D/M
42fc5d26 352
42fc5d26 353
c1a54c05 354 Substitute summarized prefix with another prefix.
42fc5d26 355
9eb95b3b 356 .. code-block:: frr
42fc5d26 357
9eb95b3b
QY
358 router ospf
359 network 192.168.1.0/24 area 0.0.0.0
360 network 10.0.0.0/8 area 0.0.0.10
361 area 0.0.0.10 range 10.0.0.0/8 substitute 11.0.0.0/8
a8c90e15 362
42fc5d26 363
c1a54c05 364 One Type-3 summary-LSA with routing info 11.0.0.0/8 is announced into backbone area if
d1e7591e 365 area 0.0.0.10 contains at least one intra-area network (i.e. described with router-LSA or
c1a54c05
QY
366 network-LSA) from range 10.0.0.0/8.
367 This command makes sense in ABR only.
42fc5d26 368
c1a54c05 369.. clicmd:: area A.B.C.D virtual-link A.B.C.D
42fc5d26 370
c1a54c05 371.. clicmd:: area (0-4294967295) virtual-link A.B.C.D
42fc5d26 372
42fc5d26 373
42fc5d26 374
c1a54c05 375.. clicmd:: area A.B.C.D shortcut
42fc5d26 376
c1a54c05 377.. clicmd:: area (0-4294967295) shortcut
42fc5d26 378
42fc5d26 379
42fc5d26 380
c1a54c05
QY
381 Configure the area as Shortcut capable. See :rfc:`3509`. This requires
382 that the 'abr-type' be set to 'shortcut'.
42fc5d26 383
c1a54c05 384.. clicmd:: area A.B.C.D stub
42fc5d26 385
c1a54c05 386.. clicmd:: area (0-4294967295) stub
42fc5d26 387
42fc5d26 388
42fc5d26 389
c1a54c05
QY
390 Configure the area to be a stub area. That is, an area where no router
391 originates routes external to OSPF and hence an area where all external
392 routes are via the ABR(s). Hence, ABRs for such an area do not need
393 to pass AS-External LSAs (type-5s) or ASBR-Summary LSAs (type-4) into the
394 area. They need only pass Network-Summary (type-3) LSAs into such an area,
395 along with a default-route summary.
42fc5d26 396
c1a54c05 397.. clicmd:: area A.B.C.D stub no-summary
42fc5d26 398
c1a54c05 399.. clicmd:: area (0-4294967295) stub no-summary
42fc5d26 400
42fc5d26 401
42fc5d26 402
c1a54c05
QY
403 Prevents an *ospfd* ABR from injecting inter-area
404 summaries into the specified stub area.
42fc5d26 405
8807d9f7 406.. clicmd:: area A.B.C.D nssa
407
408.. clicmd:: area (0-4294967295) nssa
409
410 Configure the area to be a NSSA (Not-So-Stubby Area). This is an area that
411 allows OSPF to import external routes into a stub area via a new LSA type
412 (type 7). An NSSA autonomous system boundary router (ASBR) will generate this
413 type of LSA. The area border router (ABR) translates the LSA type 7 into LSA
414 type 5, which is propagated into the OSPF domain. NSSA areas are defined in
415 RFC 3101.
416
d71494e6 417.. clicmd:: area A.B.C.D nssa suppress-fa
418
419.. clicmd:: area (0-4294967295) nssa suppress-fa
420
421 Configure the router to set the forwarding address to 0.0.0.0 in all LSA type 5
422 translated from LSA type 7. The router needs to be elected the translator of the
423 area for this command to take effect. This feature causes routers that are
424 configured not to advertise forwarding addresses into the backbone to direct
425 forwarded traffic to the NSSA ABR translator.
426
c1a54c05 427.. clicmd:: area A.B.C.D default-cost (0-16777215)
42fc5d26 428
42fc5d26 429
c1a54c05 430 Set the cost of default-summary LSAs announced to stubby areas.
42fc5d26 431
c1a54c05 432.. clicmd:: area A.B.C.D export-list NAME
42fc5d26 433
c1a54c05 434.. clicmd:: area (0-4294967295) export-list NAME
42fc5d26 435
42fc5d26 436
42fc5d26 437
c1a54c05
QY
438 Filter Type-3 summary-LSAs announced to other areas originated from intra-
439 area paths from specified area.
42fc5d26 440
9eb95b3b 441 .. code-block:: frr
a8c90e15 442
9eb95b3b
QY
443 router ospf
444 network 192.168.1.0/24 area 0.0.0.0
445 network 10.0.0.0/8 area 0.0.0.10
446 area 0.0.0.10 export-list foo
447 !
448 access-list foo permit 10.10.0.0/16
449 access-list foo deny any
42fc5d26 450
c1a54c05
QY
451 With example above any intra-area paths from area 0.0.0.10 and from range
452 10.10.0.0/16 (for example 10.10.1.0/24 and 10.10.2.128/30) are announced into
453 other areas as Type-3 summary-LSA's, but any others (for example 10.11.0.0/16
454 or 10.128.30.16/30) aren't.
42fc5d26 455
c1a54c05
QY
456 This command is only relevant if the router is an ABR for the specified
457 area.
42fc5d26 458
c1a54c05 459.. clicmd:: area A.B.C.D import-list NAME
42fc5d26 460
c1a54c05 461.. clicmd:: area (0-4294967295) import-list NAME
42fc5d26 462
42fc5d26 463
42fc5d26 464
9eb95b3b
QY
465 Same as export-list, but it applies to paths announced into specified area
466 as Type-3 summary-LSAs.
42fc5d26 467
c1a54c05 468.. clicmd:: area A.B.C.D filter-list prefix NAME in
42fc5d26 469
c1a54c05 470.. clicmd:: area A.B.C.D filter-list prefix NAME out
42fc5d26 471
c1a54c05 472.. clicmd:: area (0-4294967295) filter-list prefix NAME in
42fc5d26 473
c1a54c05 474.. clicmd:: area (0-4294967295) filter-list prefix NAME out
42fc5d26 475
42fc5d26 476
42fc5d26 477
42fc5d26 478
42fc5d26 479
9eb95b3b
QY
480 Filtering Type-3 summary-LSAs to/from area using prefix lists. This command
481 makes sense in ABR only.
42fc5d26 482
c1a54c05 483.. clicmd:: area A.B.C.D authentication
42fc5d26 484
c1a54c05 485.. clicmd:: area (0-4294967295) authentication
42fc5d26 486
42fc5d26 487
42fc5d26 488
9eb95b3b
QY
489 Specify that simple password authentication should be used for the given
490 area.
42fc5d26 491
c1a54c05 492.. clicmd:: area A.B.C.D authentication message-digest
42fc5d26 493
c1a54c05 494.. clicmd:: area (0-4294967295) authentication message-digest
42fc5d26 495
6ee602cd
QY
496 Specify that OSPF packets must be authenticated with MD5 HMACs within the
497 given area. Keying material must also be configured on a per-interface basis
498 (:clicmd:`ip ospf message-digest-key`).
42fc5d26 499
6ee602cd
QY
500 MD5 authentication may also be configured on a per-interface basis
501 (:clicmd:`ip ospf authentication message-digest`). Such per-interface
502 settings will override any per-area authentication setting.
42fc5d26 503
0efdf0fe 504.. _ospf-interface:
42fc5d26 505
e6f1b831
QY
506Interfaces
507----------
42fc5d26 508
c1a54c05 509.. clicmd:: ip ospf area AREA [ADDR]
42fc5d26 510
42fc5d26 511
c1a54c05 512 Enable OSPF on the interface, optionally restricted to just the IP address
6ee602cd
QY
513 given by `ADDR`, putting it in the `AREA` area. Per interface area settings
514 take precedence to network commands
515 (:clicmd:`network A.B.C.D/M area A.B.C.D`).
42fc5d26 516
c1a54c05
QY
517 If you have a lot of interfaces, and/or a lot of subnets, then enabling OSPF
518 via this command may result in a slight performance improvement.
42fc5d26 519
c1a54c05 520.. clicmd:: ip ospf authentication-key AUTH_KEY
42fc5d26 521
42fc5d26 522
c1a54c05
QY
523 Set OSPF authentication key to a simple password. After setting `AUTH_KEY`,
524 all OSPF packets are authenticated. `AUTH_KEY` has length up to 8 chars.
42fc5d26 525
c1a54c05 526 Simple text password authentication is insecure and deprecated in favour of
6ee602cd 527 MD5 HMAC authentication.
42fc5d26 528
c1a54c05 529.. clicmd:: ip ospf authentication message-digest
42fc5d26 530
6ee602cd
QY
531 Specify that MD5 HMAC authentication must be used on this interface. MD5
532 keying material must also be configured. Overrides any authentication
533 enabled on a per-area basis
534 (:clicmd:`area A.B.C.D authentication message-digest`)
42fc5d26 535
c1a54c05
QY
536 Note that OSPF MD5 authentication requires that time never go backwards
537 (correct time is NOT important, only that it never goes backwards), even
d1e7591e 538 across resets, if ospfd is to be able to promptly reestablish adjacencies
6ee602cd 539 with its neighbours after restarts/reboots. The host should have system time
d1e7591e 540 be set at boot from an external or non-volatile source (e.g. battery backed
6ee602cd 541 clock, NTP, etc.) or else the system clock should be periodically saved to
d1e7591e 542 non-volatile storage and restored at boot if MD5 authentication is to be
6ee602cd 543 expected to work reliably.
42fc5d26 544
c1a54c05 545.. clicmd:: ip ospf message-digest-key KEYID md5 KEY
42fc5d26 546
42fc5d26 547
6ee602cd
QY
548 Set OSPF authentication key to a cryptographic password. The cryptographic
549 algorithm is MD5.
42fc5d26 550
9eb95b3b
QY
551 KEYID identifies secret key used to create the message digest. This ID is
552 part of the protocol and must be consistent across routers on a link.
42fc5d26 553
9eb95b3b
QY
554 KEY is the actual message digest key, of up to 16 chars (larger strings will
555 be truncated), and is associated with the given KEYID.
42fc5d26 556
c1a54c05 557.. clicmd:: ip ospf cost (1-65535)
42fc5d26 558
42fc5d26 559
9eb95b3b
QY
560 Set link cost for the specified interface. The cost value is set to
561 router-LSA's metric field and used for SPF calculation.
42fc5d26 562
c1a54c05 563.. clicmd:: ip ospf dead-interval (1-65535)
42fc5d26 564
c1a54c05 565.. clicmd:: ip ospf dead-interval minimal hello-multiplier (2-20)
42fc5d26 566
42fc5d26 567
6ee602cd
QY
568 Set number of seconds for RouterDeadInterval timer value used for Wait Timer
569 and Inactivity Timer. This value must be the same for all routers attached
570 to a common network. The default value is 40 seconds.
42fc5d26 571
6ee602cd
QY
572 If 'minimal' is specified instead, then the dead-interval is set to 1 second
573 and one must specify a hello-multiplier. The hello-multiplier specifies how
574 many Hellos to send per second, from 2 (every 500ms) to 20 (every 50ms).
575 Thus one can have 1s convergence time for OSPF. If this form is specified,
576 then the hello-interval advertised in Hello packets is set to 0 and the
577 hello-interval on received Hello packets is not checked, thus the
578 hello-multiplier need NOT be the same across multiple routers on a common
579 link.
42fc5d26 580
c1a54c05 581.. clicmd:: ip ospf hello-interval (1-65535)
42fc5d26 582
42fc5d26 583
c1a54c05
QY
584 Set number of seconds for HelloInterval timer value. Setting this value,
585 Hello packet will be sent every timer value seconds on the specified interface.
586 This value must be the same for all routers attached to a common network.
587 The default value is 10 seconds.
42fc5d26 588
6ee602cd
QY
589 This command has no effect if
590 :clicmd:`ip ospf dead-interval minimal hello-multiplier (2-20)` is also
c1a54c05 591 specified for the interface.
42fc5d26 592
78980c28 593.. clicmd:: ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point [dmvpn])
42fc5d26 594
56f9b9bf
DS
595 When configuring a point-to-point network on an interface and the interface
596 has a /32 address associated with then OSPF will treat the interface
597 as being `unnumbered`. If you are doing this you *must* set the
598 net.ipv4.conf.<interface name>.rp_filter value to 0. In order for
599 the ospf multicast packets to be delivered by the kernel.
600
78980c28
RD
601 When used in a DMVPN network at a spoke, this OSPF will be configured in
602 point-to-point, but the HUB will be a point-to-multipoint. To make this
603 topology work, specify the optional 'dmvpn' parameter at the spoke.
42fc5d26 604
d1e7591e 605 Set explicitly network type for specified interface.
42fc5d26 606
c1a54c05 607.. clicmd:: ip ospf priority (0-255)
42fc5d26 608
42fc5d26 609
9eb95b3b
QY
610 Set RouterPriority integer value. The router with the highest priority will
611 be more eligible to become Designated Router. Setting the value to 0, makes
612 the router ineligible to become Designated Router. The default value is 1.
42fc5d26 613
c1a54c05 614.. clicmd:: ip ospf retransmit-interval (1-65535)
42fc5d26 615
42fc5d26 616
9eb95b3b
QY
617 Set number of seconds for RxmtInterval timer value. This value is used when
618 retransmitting Database Description and Link State Request packets. The
619 default value is 5 seconds.
42fc5d26 620
7db1c0f0 621.. clicmd:: ip ospf transmit-delay (1-65535) [A.B.C.D]
42fc5d26 622
42fc5d26 623
c1a54c05 624 Set number of seconds for InfTransDelay value. LSAs' age should be
9eb95b3b 625 incremented by this value when transmitting. The default value is 1 second.
42fc5d26 626
29ec6244
IR
627.. clicmd:: ip ospf passive [A.B.C.D]
628
629 Do not speak OSPF on the interface, but do advertise the interface as a stub
630 link in the router-:abbr:`LSA (Link State Advertisement)` for this router.
631 This allows one to advertise addresses on such connected interfaces without
632 having to originate AS-External/Type-5 LSAs (which have global flooding
633 scope) - as would occur if connected addresses were redistributed into
634 OSPF (:ref:`redistribute-routes-to-ospf`). This is the only way to
635 advertise non-OSPF links into stub areas.
636
c1a54c05 637.. clicmd:: ip ospf area (A.B.C.D|(0-4294967295))
42fc5d26 638
42fc5d26 639
9eb95b3b 640 Enable ospf on an interface and set associated area.
42fc5d26 641
243892e0
DA
642OSPF route-map
643==============
644
645Usage of *ospfd*'s route-map support.
646
243892e0
DA
647.. clicmd:: set metric [+|-](0-4294967295)
648
649 Set a metric for matched route when sending announcement. Use plus (+) sign
650 to add a metric value to an existing metric. Use minus (-) sign to
651 substract a metric value from an existing metric.
652
0efdf0fe 653.. _redistribute-routes-to-ospf:
42fc5d26 654
e6f1b831
QY
655Redistribution
656--------------
42fc5d26 657
0efdf0fe 658.. _ospf-redistribute:
42fc5d26 659
1e31580f
QY
660.. clicmd:: redistribute <babel|bgp|connected|eigrp|isis|kernel|openfabric|ospf|rip|sharp|static|table> [metric-type (1-2)] [metric (0-16777214)] [route-map WORD]
661
9eb95b3b
QY
662 Redistribute routes of the specified protocol or kind into OSPF, with the
663 metric type and metric set if specified, filtering the routes using the
664 given route-map if specified. Redistributed routes may also be filtered
665 with distribute-lists, see
11ab5329 666 :ref:`ospf distribute-list configuration <ospf-distribute-list>`.
42fc5d26 667
9eb95b3b
QY
668 Redistributed routes are distributed as into OSPF as Type-5 External LSAs
669 into links to areas that accept external routes, Type-7 External LSAs for
670 NSSA areas and are not redistributed at all into Stub areas, where external
671 routes are not permitted.
42fc5d26 672
29ec6244
IR
673 Note that for connected routes, one may instead use the
674 :clicmd:`ip ospf passive [A.B.C.D]` configuration.
42fc5d26 675
c1a54c05 676.. clicmd:: default-information originate
42fc5d26 677
c1a54c05 678.. clicmd:: default-information originate metric (0-16777214)
42fc5d26 679
c1a54c05 680.. clicmd:: default-information originate metric (0-16777214) metric-type (1|2)
42fc5d26 681
c1a54c05 682.. clicmd:: default-information originate metric (0-16777214) metric-type (1|2) route-map WORD
42fc5d26 683
c1a54c05 684.. clicmd:: default-information originate always
42fc5d26 685
c1a54c05 686.. clicmd:: default-information originate always metric (0-16777214)
42fc5d26 687
c1a54c05 688.. clicmd:: default-information originate always metric (0-16777214) metric-type (1|2)
42fc5d26 689
c1a54c05 690.. clicmd:: default-information originate always metric (0-16777214) metric-type (1|2) route-map WORD
42fc5d26 691
42fc5d26 692
9eb95b3b
QY
693 Originate an AS-External (type-5) LSA describing a default route into all
694 external-routing capable areas, of the specified metric and metric type. If
695 the 'always' keyword is given then the default is always advertised, even
696 when there is no default present in the routing table.
42fc5d26 697
0efdf0fe 698.. _ospf-distribute-list:
42fc5d26 699
e3cb363a
IR
700.. clicmd:: distribute-list NAME out <kernel|connected|static|rip|isis|bgp|eigrp|nhrp|table|vnc|babel|openfabric>
701
9eb95b3b 702 Apply the access-list filter, NAME, to redistributed routes of the given
e3cb363a 703 type before allowing the routes to be redistributed into OSPF
9eb95b3b 704 (:ref:`ospf redistribution <ospf-redistribute>`).
42fc5d26 705
c1a54c05 706.. clicmd:: default-metric (0-16777214)
42fc5d26 707
42fc5d26 708
c1a54c05 709.. clicmd:: distance (1-255)
42fc5d26 710
42fc5d26 711
c1a54c05 712.. clicmd:: distance ospf (intra-area|inter-area|external) (1-255)
42fc5d26 713
42fc5d26 714
42fc5d26 715
10514170
RW
716Graceful Restart
717================
718
719.. clicmd:: graceful-restart [grace-period (1-1800)]
720
721
722 Configure Graceful Restart (RFC 3623) restarting support.
723 When enabled, the default grace period is 120 seconds.
724
725 To perform a graceful shutdown, the "graceful-restart prepare ip ospf"
726 EXEC-level command needs to be issued before restarting the ospfd daemon.
cc1a92d8 727
859bce81 728.. clicmd:: graceful-restart helper enable [A.B.C.D]
cc1a92d8 729
cc1a92d8 730
731 Configure Graceful Restart (RFC 3623) helper support.
732 By default, helper support is disabled for all neighbours.
733 This config enables/disables helper support on this router
734 for all neighbours.
735 To enable/disable helper support for a specific
736 neighbour, the router-id (A.B.C.D) has to be specified.
737
cc1a92d8 738.. clicmd:: graceful-restart helper strict-lsa-checking
739
cc1a92d8 740
741 If 'strict-lsa-checking' is configured then the helper will
742 abort the Graceful Restart when a LSA change occurs which
743 affects the restarting router.
744 By default 'strict-lsa-checking' is enabled"
745
cc1a92d8 746.. clicmd:: graceful-restart helper supported-grace-time
747
cc1a92d8 748
749 Supports as HELPER for configured grace period.
750
cc1a92d8 751.. clicmd:: graceful-restart helper planned-only
752
cc1a92d8 753
754 It helps to support as HELPER only for planned
755 restarts. By default, it supports both planned and
756 unplanned outages.
42fc5d26 757
10514170
RW
758
759.. clicmd:: graceful-restart prepare ip ospf
760
761
762 Initiate a graceful restart for all OSPF instances configured with the
763 "graceful-restart" command. The ospfd daemon should be restarted during
764 the instance-specific grace period, otherwise the graceful restart will fail.
765
766 This is an EXEC-level command.
767
768
0efdf0fe 769.. _showing-ospf-information:
42fc5d26 770
e6f1b831
QY
771Showing Information
772===================
42fc5d26 773
0efdf0fe 774.. _show-ip-ospf:
42fc5d26 775
f328dc60 776.. clicmd:: show ip ospf [json]
42fc5d26 777
c1a54c05
QY
778 Show information on a variety of general OSPF and area state and
779 configuration information.
42fc5d26 780
f328dc60 781.. clicmd:: show ip ospf interface [INTERFACE] [json]
42fc5d26 782
c1a54c05
QY
783 Show state and configuration of OSPF the specified interface, or all
784 interfaces if no interface is given.
42fc5d26 785
f328dc60 786.. clicmd:: show ip ospf neighbor [json]
42fc5d26 787
f328dc60 788.. clicmd:: show ip ospf neighbor INTERFACE [json]
42fc5d26 789
f328dc60 790.. clicmd:: show ip ospf neighbor detail [json]
42fc5d26 791
f328dc60 792.. clicmd:: show ip ospf neighbor INTERFACE detail [json]
42fc5d26 793
f328dc60 794 Display lsa information of LSDB.
795 Json o/p of this command covers base route information
796 i.e all LSAs except opaque lsa info.
42fc5d26 797
a605d719 798.. clicmd:: show ip ospf [vrf <NAME|all>] database [json]
42fc5d26 799
a605d719 800.. clicmd:: show ip ospf [vrf <NAME|all>] database (asbr-summary|external|network|router|summary) [json]
42fc5d26 801
a605d719 802.. clicmd:: show ip ospf [vrf <NAME|all>] database (asbr-summary|external|network|router|summary) LINK-STATE-ID [json]
42fc5d26 803
a605d719 804.. clicmd:: show ip ospf [vrf <NAME|all>] database (asbr-summary|external|network|router|summary) LINK-STATE-ID adv-router ADV-ROUTER [json]
42fc5d26 805
a605d719 806.. clicmd:: show ip ospf [vrf <NAME|all>] database (asbr-summary|external|network|router|summary) adv-router ADV-ROUTER [json]
42fc5d26 807
a605d719 808.. clicmd:: show ip ospf [vrf <NAME|all>] database (asbr-summary|external|network|router|summary) LINK-STATE-ID self-originate [json]
42fc5d26 809
a605d719 810.. clicmd:: show ip ospf [vrf <NAME|all>] database (asbr-summary|external|network|router|summary) self-originate [json]
42fc5d26 811
a605d719 812.. clicmd:: show ip ospf [vrf <NAME|all>] database max-age [json]
42fc5d26 813
a605d719
IR
814.. clicmd:: show ip ospf [vrf <NAME|all>] database self-originate [json]
815
816 Show the OSPF database summary.
f328dc60 817
f328dc60 818.. clicmd:: show ip ospf route [json]
42fc5d26 819
9eb95b3b
QY
820 Show the OSPF routing table, as determined by the most recent SPF
821 calculation.
42fc5d26 822
cc1a92d8 823.. clicmd:: show ip ospf graceful-restart helper [detail] [json]
824
825 Displays the Grcaeful Restart Helper details including helper
826 config changes.
827
0efdf0fe 828.. _opaque-lsa:
42fc5d26
QY
829
830Opaque LSA
831==========
832
c1a54c05 833.. clicmd:: ospf opaque-lsa
42fc5d26 834
c1a54c05 835.. clicmd:: capability opaque
42fc5d26 836
42fc5d26 837
42fc5d26 838
85400b29
MS
839 *ospfd* supports Opaque LSA (:rfc:`2370`) as partial support for
840 MPLS Traffic Engineering LSAs. The opaque-lsa capability must be
841 enabled in the configuration. An alternate command could be
842 "mpls-te on" (:ref:`ospf-traffic-engineering`). Note that FRR
843 offers only partial support for some of the routing protocol
844 extensions that are used with MPLS-TE; it does not support a
845 complete RSVP-TE solution.
42fc5d26 846
a605d719 847.. clicmd:: show ip ospf [vrf <NAME|all>] database (opaque-link|opaque-area|opaque-external)
42fc5d26 848
a605d719 849.. clicmd:: show ip ospf [vrf <NAME|all>] database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID
42fc5d26 850
a605d719 851.. clicmd:: show ip ospf [vrf <NAME|all>] database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID adv-router ADV-ROUTER
42fc5d26 852
a605d719 853.. clicmd:: show ip ospf [vrf <NAME|all>] database (opaque-link|opaque-area|opaque-external) adv-router ADV-ROUTER
42fc5d26 854
a605d719 855.. clicmd:: show ip ospf [vrf <NAME|all>] database (opaque-link|opaque-area|opaque-external) LINK-STATE-ID self-originate
42fc5d26 856
a605d719 857.. clicmd:: show ip ospf [vrf <NAME|all>] database (opaque-link|opaque-area|opaque-external) self-originate
42fc5d26 858
c1a54c05 859 Show Opaque LSA from the database.
42fc5d26 860
c1a54c05 861.. _ospf-traffic-engineering:
42fc5d26
QY
862
863Traffic Engineering
864===================
865
85400b29
MS
866.. note::
867
868 At this time, FRR offers partial support for some of the routing
869 protocol extensions that can be used with MPLS-TE. FRR does not
870 support a complete RSVP-TE solution currently.
871
c1a54c05 872.. clicmd:: mpls-te on
42fc5d26 873
42fc5d26 874
c1a54c05 875 Enable Traffic Engineering LSA flooding.
42fc5d26 876
c1a54c05 877.. clicmd:: mpls-te router-address <A.B.C.D>
42fc5d26 878
c1a54c05
QY
879 Configure stable IP address for MPLS-TE. This IP address is then advertise
880 in Opaque LSA Type-10 TLV=1 (TE) option 1 (Router-Address).
42fc5d26 881
c1a54c05 882.. clicmd:: mpls-te inter-as area <area-id>|as
42fc5d26 883
42fc5d26 884
c1a54c05
QY
885 Enable :rfc:`5392` support - Inter-AS TE v2 - to flood Traffic Engineering
886 parameters of Inter-AS link. 2 modes are supported: AREA and AS; LSA are
887 flood in AREA <area-id> with Opaque Type-10, respectively in AS with Opaque
888 Type-11. In all case, Opaque-LSA TLV=6.
42fc5d26 889
9977e56c 890.. clicmd:: mpls-te export
f173deb3
OD
891
892 Export Traffic Engineering Data Base to other daemons through the ZAPI
893 Opaque Link State messages.
894
c1a54c05 895.. clicmd:: show ip ospf mpls-te interface
42fc5d26 896
c1a54c05 897.. clicmd:: show ip ospf mpls-te interface INTERFACE
42fc5d26 898
c1a54c05 899 Show MPLS Traffic Engineering parameters for all or specified interface.
42fc5d26 900
c1a54c05 901.. clicmd:: show ip ospf mpls-te router
42fc5d26 902
c1a54c05 903 Show Traffic Engineering router parameters.
42fc5d26 904
f173deb3
OD
905.. clicmd:: show ip ospf mpls-te database [verbose|json]
906
f173deb3
OD
907.. clicmd:: show ip ospf mpls-te database vertex [self-originate|adv-router ADV-ROUTER] [verbose|json]
908
f173deb3
OD
909.. clicmd:: show ip ospf mpls-te database edge [A.B.C.D] [verbose|json]
910
f173deb3
OD
911.. clicmd:: show ip ospf mpls-te database subnet [A.B.C.D/M] [verbose|json]
912
913 Show Traffic Engineering Database
914
0efdf0fe 915.. _router-information:
42fc5d26
QY
916
917Router Information
918==================
919
ddd73a96 920.. clicmd:: router-info [as | area]
42fc5d26 921
42fc5d26 922
c1a54c05 923 Enable Router Information (:rfc:`4970`) LSA advertisement with AS scope
ddd73a96
OD
924 (default) or Area scope flooding when area is specified. Old syntax
925 `router-info area <A.B.C.D>` is always supported but mark as deprecated
926 as the area ID is no more necessary. Indeed, router information support
927 multi-area and detect automatically the areas.
42fc5d26 928
c1a54c05 929.. clicmd:: pce address <A.B.C.D>
42fc5d26 930
42fc5d26 931
c1a54c05 932.. clicmd:: pce domain as (0-65535)
42fc5d26 933
42fc5d26 934
c1a54c05 935.. clicmd:: pce neighbor as (0-65535)
42fc5d26 936
42fc5d26 937
c1a54c05 938.. clicmd:: pce flag BITPATTERN
42fc5d26 939
42fc5d26 940
c1a54c05 941.. clicmd:: pce scope BITPATTERN
42fc5d26 942
42fc5d26 943
9eb95b3b 944 The commands are conform to :rfc:`5088` and allow OSPF router announce Path
d1e7591e
QY
945 Computation Element (PCE) capabilities through the Router Information (RI)
946 LSA. Router Information must be enable prior to this. The command set/unset
947 respectively the PCE IP address, Autonomous System (AS) numbers of
9eb95b3b
QY
948 controlled domains, neighbor ASs, flag and scope. For flag and scope, please
949 refer to :rfc`5088` for the BITPATTERN recognition. Multiple 'pce neighbor'
950 command could be specified in order to specify all PCE neighbours.
42fc5d26 951
c1a54c05 952.. clicmd:: show ip ospf router-info
42fc5d26 953
c1a54c05 954 Show Router Capabilities flag.
9eb95b3b 955
c1a54c05 956.. clicmd:: show ip ospf router-info pce
42fc5d26 957
c1a54c05 958 Show Router Capabilities PCE parameters.
42fc5d26 959
50cc7127
QY
960Segment Routing
961===============
962
6f751f14
OD
963This is an EXPERIMENTAL support of Segment Routing as per `RFC 8665` for MPLS
964dataplane.
50cc7127 965
03750f1e 966.. clicmd:: segment-routing on
50cc7127
QY
967
968 Enable Segment Routing. Even if this also activate routing information
969 support, it is preferable to also activate routing information, and set
970 accordingly the Area or AS flooding.
971
6443a4be 972.. clicmd:: segment-routing global-block (16-1048575) (16-1048575) [local-block (16-1048575) (16-1048575)]
50cc7127 973
6443a4be
EDP
974 Set the Segment Routing Global Block i.e. the label range used by MPLS to
975 store label in the MPLS FIB for Prefix SID. Optionally also set the Local
976 Block, i.e. the label range used for Adjacency SID. The negative version
977 of the command always unsets both ranges.
6f751f14 978
6443a4be 979.. clicmd:: segment-routing local-block (16-1048575) (16-1048575)
6f751f14 980
6443a4be
EDP
981 Set the Segment Routing Local Block i.e. the label range used by MPLS to
982 store label in the MPLS FIB for Adjacency SID. This command is deprecated
983 in favor of the combined command above.
50cc7127 984
03750f1e 985.. clicmd:: segment-routing node-msd (1-16)
50cc7127
QY
986
987 Fix the Maximum Stack Depth supported by the router. The value depend of the
988 MPLS dataplane. E.g. for Linux kernel, since version 4.13 it is 32.
989
03750f1e 990.. clicmd:: segment-routing prefix A.B.C.D/M [index (0-65535)|no-php-flag|explicit-null]
50cc7127 991
9eb95b3b
QY
992 prefix with /32 corresponding to a loopback interface are currently
993 supported. The 'no-php-flag' means NO Penultimate Hop Popping that allows SR
f786c4d7
OD
994 node to request to its neighbor to not pop the label. The 'explicit-null' means that
995 neighbor nodes must swap the incoming label by the MPLS Explicit Null label
996 before delivering the packet.
50cc7127 997
e3e3afff 998.. clicmd:: show ip ospf database segment-routing <adv-router ADVROUTER|self-originate> [json]
50cc7127 999
d1e7591e 1000 Show Segment Routing Data Base, all SR nodes, specific advertised router or
e3e3afff
QY
1001 self router. Optional JSON output can be obtained by appending 'json' to the
1002 end of the command.
50cc7127 1003
077abf3b 1004External Route Summarisation
1005============================
1006This feature summarises originated external LSAs(Type-5 and Type-7).
1007Summary Route will be originated on-behalf of all matched external LSAs.
1008
03750f1e 1009.. clicmd:: summary-address A.B.C.D/M [tag (1-4294967295)]
077abf3b 1010
1011 This command enable/disables summarisation for the configured address
1012 range. Tag is the optional parameter. If tag configured Summary route
1013 will be originated with the configured tag.
1014
03750f1e 1015.. clicmd:: summary-address A.B.C.D/M no-advertise
077abf3b 1016
1017 This command to ensure not advertise the summary lsa for the matched
1018 external LSAs.
1019
077abf3b 1020.. clicmd:: aggregation timer (5-1800)
1021
1022 Configure aggregation delay timer interval. Summarisation starts only after
94184417 1023 this delay timer expiry. By default, delay interval is 5 seconds.
077abf3b 1024
077abf3b 1025
94184417 1026 The no form of the command resets the aggregation delay interval to default
1027 value.
077abf3b 1028
077abf3b 1029.. clicmd:: show ip ospf [vrf <NAME|all>] summary-address [detail] [json]
1030
1031 Show configuration for display all configured summary routes with
1032 matching external LSA information.
1033
7fd0729f
G
1034TI-LFA
1035======
1036
1037Experimental support for Topology Independent LFA (Loop-Free Alternate), see
1038for example 'draft-bashandy-rtgwg-segment-routing-ti-lfa-05'. Note that
1039TI-LFA requires a proper Segment Routing configuration.
1040
385a1e07 1041.. clicmd:: fast-reroute ti-lfa [node-protection]
7fd0729f
G
1042
1043 Configured on the router level. Activates TI-LFA for all interfaces.
7fd0729f 1044
3e94c9a4
G
1045 Note that so far only P2P interfaces are supported.
1046
cb00030f
IR
1047.. _debugging-ospf:
1048
42fc5d26
QY
1049Debugging OSPF
1050==============
1051
e5c2d3a8
RZ
1052.. clicmd:: debug ospf bfd
1053
1054 Enable or disable debugging for BFD events. This will show BFD integration
1055 library messages and OSPF BFD integration messages that are mostly state
1056 transitions and validation problems.
1057
c1a54c05 1058.. clicmd:: debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]
42fc5d26 1059
42fc5d26 1060
c1a54c05 1061 Dump Packet for debugging
42fc5d26 1062
c1a54c05 1063.. clicmd:: debug ospf ism
42fc5d26 1064
c1a54c05 1065.. clicmd:: debug ospf ism (status|events|timers)
42fc5d26 1066
42fc5d26 1067
42fc5d26 1068
c1a54c05 1069 Show debug information of Interface State Machine
42fc5d26 1070
c1a54c05 1071.. clicmd:: debug ospf nsm
42fc5d26 1072
c1a54c05 1073.. clicmd:: debug ospf nsm (status|events|timers)
42fc5d26 1074
42fc5d26 1075
42fc5d26 1076
c1a54c05 1077 Show debug information of Network State Machine
42fc5d26 1078
c1a54c05 1079.. clicmd:: debug ospf event
42fc5d26 1080
42fc5d26 1081
c1a54c05 1082 Show debug information of OSPF event
42fc5d26 1083
c1a54c05 1084.. clicmd:: debug ospf nssa
42fc5d26 1085
42fc5d26 1086
c1a54c05 1087 Show debug information about Not So Stub Area
42fc5d26 1088
c1a54c05 1089.. clicmd:: debug ospf lsa
42fc5d26 1090
c1a54c05 1091.. clicmd:: debug ospf lsa (generate|flooding|refresh)
42fc5d26 1092
42fc5d26 1093
42fc5d26 1094
c1a54c05 1095 Show debug detail of Link State messages
42fc5d26 1096
c1a54c05 1097.. clicmd:: debug ospf te
42fc5d26 1098
42fc5d26 1099
c1a54c05 1100 Show debug information about Traffic Engineering LSA
42fc5d26 1101
c1a54c05 1102.. clicmd:: debug ospf zebra
42fc5d26 1103
c1a54c05 1104.. clicmd:: debug ospf zebra (interface|redistribute)
42fc5d26 1105
42fc5d26 1106
42fc5d26 1107
c1a54c05 1108 Show debug information of ZEBRA API
42fc5d26 1109
cc1a92d8 1110.. clicmd:: debug ospf graceful-restart helper
1111
cc1a92d8 1112
1113 Enable/disable debug information for OSPF Graceful Restart Helper
1114
c1a54c05 1115.. clicmd:: show debugging ospf
42fc5d26 1116
03750f1e 1117.. clicmd:: debug ospf lsa aggregate
077abf3b 1118
1119 Debug commnd to enable/disable external route summarisation specific debugs.
1120
b832909b
QY
1121
1122Sample Configuration
1123====================
42fc5d26
QY
1124
1125A simple example, with MD5 authentication enabled:
1126
9eb95b3b 1127.. code-block:: frr
42fc5d26 1128
c1a54c05
QY
1129 !
1130 interface bge0
1131 ip ospf authentication message-digest
1132 ip ospf message-digest-key 1 md5 ABCDEFGHIJK
1133 !
1134 router ospf
1135 network 192.168.0.0/16 area 0.0.0.1
1136 area 0.0.0.1 authentication message-digest
a8c90e15 1137
42fc5d26 1138
d50b2aa0 1139An :abbr:`ABR` router, with MD5 authentication and performing summarisation
42fc5d26
QY
1140of networks between the areas:
1141
9eb95b3b 1142.. code-block:: frr
42fc5d26 1143
c1a54c05
QY
1144 !
1145 password ABCDEF
1146 log file /var/log/frr/ospfd.log
1147 service advanced-vty
1148 !
1149 interface eth0
1150 ip ospf authentication message-digest
1151 ip ospf message-digest-key 1 md5 ABCDEFGHIJK
1152 !
1153 interface ppp0
29ec6244 1154 ip ospf passive
c1a54c05
QY
1155 !
1156 interface br0
1157 ip ospf authentication message-digest
1158 ip ospf message-digest-key 2 md5 XYZ12345
1159 !
1160 router ospf
1161 ospf router-id 192.168.0.1
1162 redistribute connected
c1a54c05
QY
1163 network 192.168.0.0/24 area 0.0.0.0
1164 network 10.0.0.0/16 area 0.0.0.0
1165 network 192.168.1.0/24 area 0.0.0.1
1166 area 0.0.0.0 authentication message-digest
1167 area 0.0.0.0 range 10.0.0.0/16
1168 area 0.0.0.0 range 192.168.0.0/24
1169 area 0.0.0.1 authentication message-digest
1170 area 0.0.0.1 range 10.2.0.0/16
1171 !
a8c90e15 1172
42fc5d26
QY
1173
1174A Traffic Engineering configuration, with Inter-ASv2 support.
1175
9eb95b3b
QY
1176First, the :file:`zebra.conf` part:
1177
1178.. code-block:: frr
c1a54c05 1179
c1a54c05
QY
1180 interface eth0
1181 ip address 198.168.1.1/24
612b3314
QY
1182 link-params
1183 enable
1184 admin-grp 0xa1
1185 metric 100
1186 max-bw 1.25e+07
1187 max-rsv-bw 1.25e+06
1188 unrsv-bw 0 1.25e+06
1189 unrsv-bw 1 1.25e+06
1190 unrsv-bw 2 1.25e+06
1191 unrsv-bw 3 1.25e+06
1192 unrsv-bw 4 1.25e+06
1193 unrsv-bw 5 1.25e+06
1194 unrsv-bw 6 1.25e+06
1195 unrsv-bw 7 1.25e+06
c1a54c05
QY
1196 !
1197 interface eth1
1198 ip address 192.168.2.1/24
612b3314
QY
1199 link-params
1200 enable
1201 metric 10
1202 max-bw 1.25e+07
1203 max-rsv-bw 1.25e+06
1204 unrsv-bw 0 1.25e+06
1205 unrsv-bw 1 1.25e+06
1206 unrsv-bw 2 1.25e+06
1207 unrsv-bw 3 1.25e+06
1208 unrsv-bw 4 1.25e+06
1209 unrsv-bw 5 1.25e+06
1210 unrsv-bw 6 1.25e+06
1211 unrsv-bw 7 1.25e+06
1212 neighbor 192.168.2.2 as 65000
1213 hostname HOSTNAME
1214 password PASSWORD
1215 log file /var/log/zebra.log
1216 !
1217 interface eth0
1218 ip address 198.168.1.1/24
50cc7127
QY
1219 link-params
1220 enable
1221 admin-grp 0xa1
1222 metric 100
1223 max-bw 1.25e+07
1224 max-rsv-bw 1.25e+06
1225 unrsv-bw 0 1.25e+06
1226 unrsv-bw 1 1.25e+06
1227 unrsv-bw 2 1.25e+06
1228 unrsv-bw 3 1.25e+06
1229 unrsv-bw 4 1.25e+06
1230 unrsv-bw 5 1.25e+06
1231 unrsv-bw 6 1.25e+06
1232 unrsv-bw 7 1.25e+06
612b3314
QY
1233 !
1234 interface eth1
1235 ip address 192.168.2.1/24
50cc7127
QY
1236 link-params
1237 enable
1238 metric 10
1239 max-bw 1.25e+07
1240 max-rsv-bw 1.25e+06
1241 unrsv-bw 0 1.25e+06
1242 unrsv-bw 1 1.25e+06
1243 unrsv-bw 2 1.25e+06
1244 unrsv-bw 3 1.25e+06
1245 unrsv-bw 4 1.25e+06
1246 unrsv-bw 5 1.25e+06
1247 unrsv-bw 6 1.25e+06
1248 unrsv-bw 7 1.25e+06
1249 neighbor 192.168.2.2 as 65000
c1a54c05 1250
9eb95b3b
QY
1251Then the :file:`ospfd.conf` itself:
1252
1253.. code-block:: frr
c1a54c05
QY
1254
1255 hostname HOSTNAME
1256 password PASSWORD
1257 log file /var/log/ospfd.log
1258 !
1259 !
1260 interface eth0
1261 ip ospf hello-interval 60
1262 ip ospf dead-interval 240
1263 !
1264 interface eth1
1265 ip ospf hello-interval 60
1266 ip ospf dead-interval 240
1267 !
1268 !
1269 router ospf
1270 ospf router-id 192.168.1.1
1271 network 192.168.0.0/16 area 1
1272 ospf opaque-lsa
42fc5d26
QY
1273 mpls-te
1274 mpls-te router-address 192.168.1.1
1275 mpls-te inter-as area 1
c1a54c05
QY
1276 !
1277 line vty
a8c90e15 1278
d1e7591e 1279A router information example with PCE advertisement:
42fc5d26 1280
9eb95b3b 1281.. code-block:: frr
42fc5d26 1282
c1a54c05
QY
1283 !
1284 router ospf
1285 ospf router-id 192.168.1.1
1286 network 192.168.0.0/16 area 1
1287 capability opaque
42fc5d26
QY
1288 mpls-te
1289 mpls-te router-address 192.168.1.1
c1a54c05 1290 router-info area 0.0.0.1
42fc5d26
QY
1291 pce address 192.168.1.1
1292 pce flag 0x80
1293 pce domain as 65400
1294 pce neighbor as 65500
1295 pce neighbor as 65200
1296 pce scope 0x80
c1a54c05 1297 !