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