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