]> git.proxmox.com Git - mirror_frr.git/blob - doc/user/ospfd.rst
doc: spelling fixes
[mirror_frr.git] / doc / user / ospfd.rst
1 .. _ospfv2:
2
3 ******
4 OSPFv2
5 ******
6
7 :abbr:`OSPF (Open Shortest Path First)` version 2 is a routing protocol which
8 is described in :rfc:`2328`. OSPF is an :abbr:`IGP (Interior Gateway
9 Protocol)`. Compared with :abbr:`RIP`, :abbr:`OSPF` can provide scalable
10 network support and faster convergence times. OSPF is widely used in large
11 networks such as :abbr:`ISP (Internet Service Provider)` backbone and
12 enterprise networks.
13
14 .. include:: ospf_fundamentals.rst
15
16 .. _configuring-ospfd:
17
18 Configuring ospfd
19 =================
20
21 There are no *ospfd* specific options. Common options can be specified
22 (:ref:`common-invocation-options`) to *ospfd*. *ospfd* needs to acquire
23 interface information from *zebra* in order to function. Therefore *zebra* must
24 be running before invoking *ospfd*. Also, if *zebra* is restarted then *ospfd*
25 must be too.
26
27 Like other daemons, *ospfd* configuration is done in :abbr:`OSPF` specific
28 configuration file :file:`ospfd.conf`.
29
30 .. _ospf-router:
31
32 OSPF router
33 ===========
34
35 To start OSPF process you have to specify the OSPF router. As of this
36 writing, *ospfd* does not support multiple OSPF processes.
37
38 .. index:: router ospf
39 .. clicmd:: router ospf
40
41 .. index:: no router ospf
42 .. clicmd:: no router ospf
43
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.
47
48 .. index:: ospf router-id A.B.C.D
49 .. clicmd:: ospf router-id A.B.C.D
50
51 .. index:: no ospf router-id
52 .. clicmd:: no ospf router-id
53
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*.
61
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
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 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.
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."
97
98 .. index:: ospf rfc1583compatibility
99 .. clicmd:: ospf rfc1583compatibility
100
101 .. index:: no ospf rfc1583compatibility
102 .. clicmd:: no ospf rfc1583compatibility
103
104 :rfc:`2328`, the successor to :rfc:`1583`, suggests according
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
128
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.
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
154 Consecutive SPF calculations will always be separated by at least
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
160 hold-time elapses without any SPF-triggering event occurring then
161 the current holdtime is reset to the `initial-holdtime`. The current
162 holdtime can be viewed with :clicmd:`show ip ospf`, where it is expressed as
163 a multiplier of the `initial-holdtime`.
164
165 .. code-block:: frr
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
174 calculation. Further consecutive SPF calculations will always be separated
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.
178
179 This command supercedes the *timers spf* command in previous FRR
180 releases.
181
182 .. index:: max-metric router-lsa [on-startup|on-shutdown] (5-86400)
183 .. clicmd:: max-metric router-lsa [on-startup|on-shutdown] (5-86400)
184
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]
190
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.
195
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.
200
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.
206
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.
213
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
216 viewed with the :clicmd:`show ip ospf` command.
217
218 .. index:: auto-cost reference-bandwidth (1-4294967)
219 .. clicmd:: auto-cost reference-bandwidth (1-4294967)
220
221 .. index:: no auto-cost reference-bandwidth
222 .. clicmd:: no auto-cost reference-bandwidth
223
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).
230
231 This configuration setting MUST be consistent across all routers within the
232 OSPF domain.
233
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
236
237 .. index:: network A.B.C.D/M area (0-4294967295)
238 .. clicmd:: network A.B.C.D/M area (0-4294967295)
239
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
242
243 .. index:: no network A.B.C.D/M area (0-4294967295)
244 .. clicmd:: no network A.B.C.D/M area (0-4294967295)
245
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.
250
251 .. code-block:: frr
252
253 router ospf
254 network 192.168.1.0/24 area 0.0.0.0
255
256 Prefix length in interface must be equal or bigger (i.e. smaller network) than
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.
260
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.
267
268 In some cases it may be more convenient to enable OSPF on a per
269 interface/subnet basis (:clicmd:`ip ospf area AREA [ADDR]`).
270
271
272 .. _ospf-area:
273
274 OSPF area
275 =========
276
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
279
280 .. index:: area (0-4294967295) range A.B.C.D/M
281 .. clicmd:: area (0-4294967295) range A.B.C.D/M
282
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
285
286 .. index:: no area (0-4294967295) range A.B.C.D/M
287 .. clicmd:: no area (0-4294967295) range A.B.C.D/M
288
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
291 router-LSAs (Type-1) and network-LSAs (Type-2) (i.e. LSAs with scope area) can
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.
294
295 .. code-block:: frr
296
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
301
302
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
305 network (i.e. described with router or network LSA) from this range.
306
307 .. index:: area A.B.C.D range IPV4_PREFIX not-advertise
308 .. clicmd:: area A.B.C.D range IPV4_PREFIX not-advertise
309
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
312
313 Instead of summarizing intra area paths filter them - i.e. intra area paths from this
314 range are not advertised into other areas.
315 This command makes sense in ABR only.
316
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
319
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
322
323 Substitute summarized prefix with another prefix.
324
325 .. code-block:: frr
326
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
331
332
333 One Type-3 summary-LSA with routing info 11.0.0.0/8 is announced into backbone area if
334 area 0.0.0.10 contains at least one intra-area network (i.e. described with router-LSA or
335 network-LSA) from range 10.0.0.0/8.
336 This command makes sense in ABR only.
337
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
340
341 .. index:: area (0-4294967295) virtual-link A.B.C.D
342 .. clicmd:: area (0-4294967295) virtual-link A.B.C.D
343
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
346
347 .. index:: no area (0-4294967295) virtual-link A.B.C.D
348 .. clicmd:: no area (0-4294967295) virtual-link A.B.C.D
349
350 .. index:: area A.B.C.D shortcut
351 .. clicmd:: area A.B.C.D shortcut
352
353 .. index:: area (0-4294967295) shortcut
354 .. clicmd:: area (0-4294967295) shortcut
355
356 .. index:: no area A.B.C.D shortcut
357 .. clicmd:: no area A.B.C.D shortcut
358
359 .. index:: no area (0-4294967295) shortcut
360 .. clicmd:: no area (0-4294967295) shortcut
361
362 Configure the area as Shortcut capable. See :rfc:`3509`. This requires
363 that the 'abr-type' be set to 'shortcut'.
364
365 .. index:: area A.B.C.D stub
366 .. clicmd:: area A.B.C.D stub
367
368 .. index:: area (0-4294967295) stub
369 .. clicmd:: area (0-4294967295) stub
370
371 .. index:: no area A.B.C.D stub
372 .. clicmd:: no area A.B.C.D stub
373
374 .. index:: no area (0-4294967295) stub
375 .. clicmd:: no area (0-4294967295) stub
376
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.
383
384 .. index:: area A.B.C.D stub no-summary
385 .. clicmd:: area A.B.C.D stub no-summary
386
387 .. index:: area (0-4294967295) stub no-summary
388 .. clicmd:: area (0-4294967295) stub no-summary
389
390 .. index:: no area A.B.C.D stub no-summary
391 .. clicmd:: no area A.B.C.D stub no-summary
392
393 .. index:: no area (0-4294967295) stub no-summary
394 .. clicmd:: no area (0-4294967295) stub no-summary
395
396 Prevents an *ospfd* ABR from injecting inter-area
397 summaries into the specified stub area.
398
399 .. index:: area A.B.C.D default-cost (0-16777215)
400 .. clicmd:: area A.B.C.D default-cost (0-16777215)
401
402 .. index:: no area A.B.C.D default-cost (0-16777215)
403 .. clicmd:: no area A.B.C.D default-cost (0-16777215)
404
405 Set the cost of default-summary LSAs announced to stubby areas.
406
407 .. index:: area A.B.C.D export-list NAME
408 .. clicmd:: area A.B.C.D export-list NAME
409
410 .. index:: area (0-4294967295) export-list NAME
411 .. clicmd:: area (0-4294967295) export-list NAME
412
413 .. index:: no area A.B.C.D export-list NAME
414 .. clicmd:: no area A.B.C.D export-list NAME
415
416 .. index:: no area (0-4294967295) export-list NAME
417 .. clicmd:: no area (0-4294967295) export-list NAME
418
419 Filter Type-3 summary-LSAs announced to other areas originated from intra-
420 area paths from specified area.
421
422 .. code-block:: frr
423
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
431
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.
436
437 This command is only relevant if the router is an ABR for the specified
438 area.
439
440 .. index:: area A.B.C.D import-list NAME
441 .. clicmd:: area A.B.C.D import-list NAME
442
443 .. index:: area (0-4294967295) import-list NAME
444 .. clicmd:: area (0-4294967295) import-list NAME
445
446 .. index:: no area A.B.C.D import-list NAME
447 .. clicmd:: no area A.B.C.D import-list NAME
448
449 .. index:: no area (0-4294967295) import-list NAME
450 .. clicmd:: no area (0-4294967295) import-list NAME
451
452 Same as export-list, but it applies to paths announced into specified area
453 as Type-3 summary-LSAs.
454
455 .. index:: area A.B.C.D filter-list prefix NAME in
456 .. clicmd:: area A.B.C.D filter-list prefix NAME in
457
458 .. index:: area A.B.C.D filter-list prefix NAME out
459 .. clicmd:: area A.B.C.D filter-list prefix NAME out
460
461 .. index:: area (0-4294967295) filter-list prefix NAME in
462 .. clicmd:: area (0-4294967295) filter-list prefix NAME in
463
464 .. index:: area (0-4294967295) filter-list prefix NAME out
465 .. clicmd:: area (0-4294967295) filter-list prefix NAME out
466
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
469
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
472
473 .. index:: no area (0-4294967295) filter-list prefix NAME in
474 .. clicmd:: no area (0-4294967295) filter-list prefix NAME in
475
476 .. index:: no area (0-4294967295) filter-list prefix NAME out
477 .. clicmd:: no area (0-4294967295) filter-list prefix NAME out
478
479 Filtering Type-3 summary-LSAs to/from area using prefix lists. This command
480 makes sense in ABR only.
481
482 .. index:: area A.B.C.D authentication
483 .. clicmd:: area A.B.C.D authentication
484
485 .. index:: area (0-4294967295) authentication
486 .. clicmd:: area (0-4294967295) authentication
487
488 .. index:: no area A.B.C.D authentication
489 .. clicmd:: no area A.B.C.D authentication
490
491 .. index:: no area (0-4294967295) authentication
492 .. clicmd:: no area (0-4294967295) authentication
493
494 Specify that simple password authentication should be used for the given
495 area.
496
497 .. index:: area A.B.C.D authentication message-digest
498 .. clicmd:: area A.B.C.D authentication message-digest
499
500 .. index:: area (0-4294967295) authentication message-digest
501 .. clicmd:: area (0-4294967295) authentication message-digest
502
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`).
506
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.
510
511 .. _ospf-interface:
512
513 OSPF interface
514 ==============
515
516 .. index:: ip ospf area AREA [ADDR]
517 .. clicmd:: ip ospf area AREA [ADDR]
518
519 .. index:: no ip ospf area [ADDR]
520 .. clicmd:: no ip ospf area [ADDR]
521
522 Enable OSPF on the interface, optionally restricted to just the IP address
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`).
526
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.
529
530 .. index:: ip ospf authentication-key AUTH_KEY
531 .. clicmd:: ip ospf authentication-key AUTH_KEY
532
533 .. index:: no ip ospf authentication-key
534 .. clicmd:: no ip ospf authentication-key
535
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.
538
539 Simple text password authentication is insecure and deprecated in favour of
540 MD5 HMAC authentication.
541
542 .. index:: ip ospf authentication message-digest
543 .. clicmd:: ip ospf authentication message-digest
544
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`)
549
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
552 across resets, if ospfd is to be able to promptly reestablish adjacencies
553 with its neighbours after restarts/reboots. The host should have system time
554 be set at boot from an external or non-volatile source (e.g. battery backed
555 clock, NTP, etc.) or else the system clock should be periodically saved to
556 non-volatile storage and restored at boot if MD5 authentication is to be
557 expected to work reliably.
558
559 .. index:: ip ospf message-digest-key KEYID md5 KEY
560 .. clicmd:: ip ospf message-digest-key KEYID md5 KEY
561
562 .. index:: no ip ospf message-digest-key
563 .. clicmd:: no ip ospf message-digest-key
564
565 Set OSPF authentication key to a cryptographic password. The cryptographic
566 algorithm is MD5.
567
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.
570
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.
573
574 .. index:: ip ospf cost (1-65535)
575 .. clicmd:: ip ospf cost (1-65535)
576
577 .. index:: no ip ospf cost
578 .. clicmd:: no ip ospf cost
579
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.
582
583 .. index:: ip ospf dead-interval (1-65535)
584 .. clicmd:: ip ospf dead-interval (1-65535)
585
586 .. index:: ip ospf dead-interval minimal hello-multiplier (2-20)
587 .. clicmd:: ip ospf dead-interval minimal hello-multiplier (2-20)
588
589 .. index:: no ip ospf dead-interval
590 .. clicmd:: no ip ospf dead-interval
591
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.
595
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.
604
605 .. index:: ip ospf hello-interval (1-65535)
606 .. clicmd:: ip ospf hello-interval (1-65535)
607
608 .. index:: no ip ospf hello-interval
609 .. clicmd:: no ip ospf hello-interval
610
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.
615
616 This command has no effect if
617 :clicmd:`ip ospf dead-interval minimal hello-multiplier (2-20)` is also
618 specified for the interface.
619
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)
622
623 .. index:: no ip ospf network
624 .. clicmd:: no ip ospf network
625
626 Set explicitly network type for specified interface.
627
628 .. index:: ip ospf priority (0-255)
629 .. clicmd:: ip ospf priority (0-255)
630
631 .. index:: no ip ospf priority
632 .. clicmd:: no ip ospf priority
633
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.
637
638 .. index:: ip ospf retransmit-interval (1-65535)
639 .. clicmd:: ip ospf retransmit-interval (1-65535)
640
641 .. index:: no ip ospf retransmit interval
642 .. clicmd:: no ip ospf retransmit interval
643
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.
647
648 .. index:: ip ospf transmit-delay
649 .. clicmd:: ip ospf transmit-delay
650
651 .. index:: no ip ospf transmit-delay
652 .. clicmd:: no ip ospf transmit-delay
653
654 Set number of seconds for InfTransDelay value. LSAs' age should be
655 incremented by this value when transmitting. The default value is 1 second.
656
657 .. index:: ip ospf area (A.B.C.D|(0-4294967295))
658 .. clicmd:: ip ospf area (A.B.C.D|(0-4294967295))
659
660 .. index:: no ip ospf area
661 .. clicmd:: no ip ospf area
662
663 Enable ospf on an interface and set associated area.
664
665 .. _redistribute-routes-to-ospf:
666
667 Redistribute routes to OSPF
668 ===========================
669
670 .. index:: redistribute (kernel|connected|static|rip|bgp)
671 .. clicmd:: redistribute (kernel|connected|static|rip|bgp)
672
673 .. index:: redistribute (kernel|connected|static|rip|bgp) ROUTE-MAP
674 .. clicmd:: redistribute (kernel|connected|static|rip|bgp) ROUTE-MAP
675
676 .. index:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)
677 .. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)
678
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
681
682 .. index:: redistribute (kernel|connected|static|rip|bgp) metric (0-16777214)
683 .. clicmd:: redistribute (kernel|connected|static|rip|bgp) metric (0-16777214)
684
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
687
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)
690
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
693
694 .. index:: no redistribute (kernel|connected|static|rip|bgp)
695 .. clicmd:: no redistribute (kernel|connected|static|rip|bgp)
696
697 .. _ospf-redistribute:
698
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
703 :ref:`ospf distribute-list configuration <ospf-distribute-list>`.
704
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.
709
710 Note that for connected routes, one may instead use the `passive-interface`
711 configuration.
712
713 .. seealso::
714
715 clicmd:`passive-interface INTERFACE`.
716
717 .. index:: default-information originate
718 .. clicmd:: default-information originate
719
720 .. index:: default-information originate metric (0-16777214)
721 .. clicmd:: default-information originate metric (0-16777214)
722
723 .. index:: default-information originate metric (0-16777214) metric-type (1|2)
724 .. clicmd:: default-information originate metric (0-16777214) metric-type (1|2)
725
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
728
729 .. index:: default-information originate always
730 .. clicmd:: default-information originate always
731
732 .. index:: default-information originate always metric (0-16777214)
733 .. clicmd:: default-information originate always metric (0-16777214)
734
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)
737
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
740
741 .. index:: no default-information originate
742 .. clicmd:: no default-information originate
743
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.
748
749 .. index:: distribute-list NAME out (kernel|connected|static|rip|ospf
750 .. clicmd:: distribute-list NAME out (kernel|connected|static|rip|ospf
751
752 .. index:: no distribute-list NAME out (kernel|connected|static|rip|ospf
753 .. clicmd:: no distribute-list NAME out (kernel|connected|static|rip|ospf
754
755 .. _ospf-distribute-list:
756
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>`).
760
761 .. index:: default-metric (0-16777214)
762 .. clicmd:: default-metric (0-16777214)
763
764 .. index:: no default-metric
765 .. clicmd:: no default-metric
766
767 .. index:: distance (1-255)
768 .. clicmd:: distance (1-255)
769
770 .. index:: no distance (1-255)
771 .. clicmd:: no distance (1-255)
772
773 .. index:: distance ospf (intra-area|inter-area|external) (1-255)
774 .. clicmd:: distance ospf (intra-area|inter-area|external) (1-255)
775
776 .. index:: no distance ospf
777 .. clicmd:: no distance ospf
778
779 .. index:: router zebra
780 .. clicmd:: router zebra
781
782 .. index:: no router zebra
783 .. clicmd:: no router zebra
784
785
786 .. _showing-ospf-information:
787
788 Showing OSPF information
789 ========================
790
791 .. _show-ip-ospf:
792
793 .. index:: show ip ospf
794 .. clicmd:: show ip ospf
795
796 Show information on a variety of general OSPF and area state and
797 configuration information.
798
799 .. index:: show ip ospf interface [INTERFACE]
800 .. clicmd:: show ip ospf interface [INTERFACE]
801
802 Show state and configuration of OSPF the specified interface, or all
803 interfaces if no interface is given.
804
805 .. index:: show ip ospf neighbor
806 .. clicmd:: show ip ospf neighbor
807
808 .. index:: show ip ospf neighbor INTERFACE
809 .. clicmd:: show ip ospf neighbor INTERFACE
810
811 .. index:: show ip ospf neighbor detail
812 .. clicmd:: show ip ospf neighbor detail
813
814 .. index:: show ip ospf neighbor INTERFACE detail
815 .. clicmd:: show ip ospf neighbor INTERFACE detail
816
817 .. index:: show ip ospf database
818 .. clicmd:: show ip ospf database
819
820 .. index:: show ip ospf database (asbr-summary|external|network|router|summary)
821 .. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary)
822
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
825
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
828
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
831
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
834
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
837
838 .. index:: show ip ospf database max-age
839 .. clicmd:: show ip ospf database max-age
840
841 .. index:: show ip ospf database self-originate
842 .. clicmd:: show ip ospf database self-originate
843
844 .. index:: show ip ospf route
845 .. clicmd:: show ip ospf route
846
847 Show the OSPF routing table, as determined by the most recent SPF
848 calculation.
849
850 .. _opaque-lsa:
851
852 Opaque LSA
853 ==========
854
855 .. index:: ospf opaque-lsa
856 .. clicmd:: ospf opaque-lsa
857
858 .. index:: capability opaque
859 .. clicmd:: capability opaque
860
861 .. index:: no ospf opaque-lsa
862 .. clicmd:: no ospf opaque-lsa
863
864 .. index:: no capability opaque
865 .. clicmd:: no capability opaque
866
867 *ospfd* supports Opaque LSA (:rfc:`2370`) as fundamental for MPLS Traffic
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"
870 (:ref:`ospf-traffic-engineering`).
871
872 .. index:: show ip ospf database (opaque-link|opaque-area|opaque-external)
873 .. clicmd:: show ip ospf database (opaque-link|opaque-area|opaque-external)
874
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
877
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
880
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
883
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
886
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
889
890 Show Opaque LSA from the database.
891
892 .. _ospf-traffic-engineering:
893
894 Traffic Engineering
895 ===================
896
897 .. index:: mpls-te on
898 .. clicmd:: mpls-te on
899
900 .. index:: no mpls-te
901 .. clicmd:: no mpls-te
902
903 Enable Traffic Engineering LSA flooding.
904
905 .. index:: mpls-te router-address <A.B.C.D>
906 .. clicmd:: mpls-te router-address <A.B.C.D>
907
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).
910
911 .. index:: mpls-te inter-as area <area-id>|as
912 .. clicmd:: mpls-te inter-as area <area-id>|as
913
914 .. index:: no mpls-te inter-as
915 .. clicmd:: no mpls-te inter-as
916
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.
921
922 .. index:: show ip ospf mpls-te interface
923 .. clicmd:: show ip ospf mpls-te interface
924
925 .. index:: show ip ospf mpls-te interface INTERFACE
926 .. clicmd:: show ip ospf mpls-te interface INTERFACE
927
928 Show MPLS Traffic Engineering parameters for all or specified interface.
929
930 .. index:: show ip ospf mpls-te router
931 .. clicmd:: show ip ospf mpls-te router
932
933 Show Traffic Engineering router parameters.
934
935 .. _router-information:
936
937 Router Information
938 ==================
939
940 .. index:: router-info [as | area <A.B.C.D>]
941 .. clicmd:: router-info [as | area <A.B.C.D>]
942
943 .. index:: no router-info
944 .. clicmd:: no router-info
945
946 Enable Router Information (:rfc:`4970`) LSA advertisement with AS scope
947 (default) or Area scope flooding when area is specified.
948
949 .. index:: pce address <A.B.C.D>
950 .. clicmd:: pce address <A.B.C.D>
951
952 .. index:: no pce address
953 .. clicmd:: no pce address
954
955 .. index:: pce domain as (0-65535)
956 .. clicmd:: pce domain as (0-65535)
957
958 .. index:: no pce domain as (0-65535)
959 .. clicmd:: no pce domain as (0-65535)
960
961 .. index:: pce neighbor as (0-65535)
962 .. clicmd:: pce neighbor as (0-65535)
963
964 .. index:: no pce neighbor as (0-65535)
965 .. clicmd:: no pce neighbor as (0-65535)
966
967 .. index:: pce flag BITPATTERN
968 .. clicmd:: pce flag BITPATTERN
969
970 .. index:: no pce flag
971 .. clicmd:: no pce flag
972
973 .. index:: pce scope BITPATTERN
974 .. clicmd:: pce scope BITPATTERN
975
976 .. index:: no pce scope
977 .. clicmd:: no pce scope
978
979 The commands are conform to :rfc:`5088` and allow OSPF router announce Path
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
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.
986
987 .. index:: show ip ospf router-info
988 .. clicmd:: show ip ospf router-info
989
990 Show Router Capabilities flag.
991
992 .. index:: show ip ospf router-info pce
993 .. clicmd:: show ip ospf router-info pce
994
995 Show Router Capabilities PCE parameters.
996
997 .. _debugging-ospf:
998
999 Segment Routing
1000 ===============
1001
1002 This 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
1027 Set the Segment Routing index for the specified prefix. Note that, only
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.
1031
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]
1034
1035 Show Segment Routing Data Base, all SR nodes, specific advertised router or
1036 self router. Optional JSON output can be obtained by appending 'json' to the
1037 end of the command.
1038
1039 Debugging OSPF
1040 ==============
1041
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]
1044
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]
1047
1048 Dump Packet for debugging
1049
1050 .. index:: debug ospf ism
1051 .. clicmd:: debug ospf ism
1052
1053 .. index:: debug ospf ism (status|events|timers)
1054 .. clicmd:: debug ospf ism (status|events|timers)
1055
1056 .. index:: no debug ospf ism
1057 .. clicmd:: no debug ospf ism
1058
1059 .. index:: no debug ospf ism (status|events|timers)
1060 .. clicmd:: no debug ospf ism (status|events|timers)
1061
1062 Show debug information of Interface State Machine
1063
1064 .. index:: debug ospf nsm
1065 .. clicmd:: debug ospf nsm
1066
1067 .. index:: debug ospf nsm (status|events|timers)
1068 .. clicmd:: debug ospf nsm (status|events|timers)
1069
1070 .. index:: no debug ospf nsm
1071 .. clicmd:: no debug ospf nsm
1072
1073 .. index:: no debug ospf nsm (status|events|timers)
1074 .. clicmd:: no debug ospf nsm (status|events|timers)
1075
1076 Show debug information of Network State Machine
1077
1078 .. index:: debug ospf event
1079 .. clicmd:: debug ospf event
1080
1081 .. index:: no debug ospf event
1082 .. clicmd:: no debug ospf event
1083
1084 Show debug information of OSPF event
1085
1086 .. index:: debug ospf nssa
1087 .. clicmd:: debug ospf nssa
1088
1089 .. index:: no debug ospf nssa
1090 .. clicmd:: no debug ospf nssa
1091
1092 Show debug information about Not So Stub Area
1093
1094 .. index:: debug ospf lsa
1095 .. clicmd:: debug ospf lsa
1096
1097 .. index:: debug ospf lsa (generate|flooding|refresh)
1098 .. clicmd:: debug ospf lsa (generate|flooding|refresh)
1099
1100 .. index:: no debug ospf lsa
1101 .. clicmd:: no debug ospf lsa
1102
1103 .. index:: no debug ospf lsa (generate|flooding|refresh)
1104 .. clicmd:: no debug ospf lsa (generate|flooding|refresh)
1105
1106 Show debug detail of Link State messages
1107
1108 .. index:: debug ospf te
1109 .. clicmd:: debug ospf te
1110
1111 .. index:: no debug ospf te
1112 .. clicmd:: no debug ospf te
1113
1114 Show debug information about Traffic Engineering LSA
1115
1116 .. index:: debug ospf zebra
1117 .. clicmd:: debug ospf zebra
1118
1119 .. index:: debug ospf zebra (interface|redistribute)
1120 .. clicmd:: debug ospf zebra (interface|redistribute)
1121
1122 .. index:: no debug ospf zebra
1123 .. clicmd:: no debug ospf zebra
1124
1125 .. index:: no debug ospf zebra (interface|redistribute)
1126 .. clicmd:: no debug ospf zebra (interface|redistribute)
1127
1128 Show debug information of ZEBRA API
1129
1130 .. index:: show debugging ospf
1131 .. clicmd:: show debugging ospf
1132
1133
1134 OSPF Configuration Examples
1135 ===========================
1136
1137 A simple example, with MD5 authentication enabled:
1138
1139 .. code-block:: frr
1140
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
1149
1150
1151 An :abbr:`ABR` router, with MD5 authentication and performing summarisation
1152 of networks between the areas:
1153
1154 .. code-block:: frr
1155
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 !
1184
1185
1186 A Traffic Engineering configuration, with Inter-ASv2 support.
1187
1188 First, the :file:`zebra.conf` part:
1189
1190 .. code-block:: frr
1191
1192 interface eth0
1193 ip address 198.168.1.1/24
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
1208 !
1209 interface eth1
1210 ip address 192.168.2.1/24
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
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
1245 !
1246 interface eth1
1247 ip address 192.168.2.1/24
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
1262
1263 Then the :file:`ospfd.conf` itself:
1264
1265 .. code-block:: frr
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
1285 mpls-te
1286 mpls-te router-address 192.168.1.1
1287 mpls-te inter-as area 1
1288 !
1289 line vty
1290
1291 A router information example with PCE advertisement:
1292
1293 .. code-block:: frr
1294
1295 !
1296 router ospf
1297 ospf router-id 192.168.1.1
1298 network 192.168.0.0/16 area 1
1299 capability opaque
1300 mpls-te
1301 mpls-te router-address 192.168.1.1
1302 router-info area 0.0.0.1
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
1309 !