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