]> git.proxmox.com Git - mirror_frr.git/blob - doc/user/ospf6d.rst
f8595ef3f5a983895ca52a82de1b223d7eda1136
[mirror_frr.git] / doc / user / ospf6d.rst
1 .. _ospfv3:
2
3 ******
4 OSPFv3
5 ******
6
7 *ospf6d* is a daemon support OSPF version 3 for IPv6 network. OSPF for IPv6 is
8 described in :rfc:`2740`.
9
10 .. _ospf6-router:
11
12 OSPF6 router
13 ============
14
15 .. clicmd:: router ospf6 [vrf NAME]
16
17 .. clicmd:: ospf6 router-id A.B.C.D
18
19 Set router's Router-ID.
20
21 .. clicmd:: timers throttle spf (0-600000) (0-600000) (0-600000)
22
23 This command sets the initial `delay`, the `initial-holdtime`
24 and the `maximum-holdtime` between when SPF is calculated and the
25 event which triggered the calculation. The times are specified in
26 milliseconds and must be in the range of 0 to 600000 milliseconds.
27
28 The `delay` specifies the minimum amount of time to delay SPF
29 calculation (hence it affects how long SPF calculation is delayed after
30 an event which occurs outside of the holdtime of any previous SPF
31 calculation, and also serves as a minimum holdtime).
32
33 Consecutive SPF calculations will always be separated by at least
34 'hold-time' milliseconds. The hold-time is adaptive and initially is
35 set to the `initial-holdtime` configured with the above command.
36 Events which occur within the holdtime of the previous SPF calculation
37 will cause the holdtime to be increased by `initial-holdtime`, bounded
38 by the `maximum-holdtime` configured with this command. If the adaptive
39 hold-time elapses without any SPF-triggering event occurring then
40 the current holdtime is reset to the `initial-holdtime`.
41
42 .. code-block:: frr
43
44 router ospf6
45 timers throttle spf 200 400 10000
46
47
48 In this example, the `delay` is set to 200ms, the initial holdtime is set
49 to 400ms and the `maximum holdtime` to 10s. Hence there will always be at
50 least 200ms between an event which requires SPF calculation and the actual
51 SPF calculation. Further consecutive SPF calculations will always be
52 separated by between 400ms to 10s, the hold-time increasing by 400ms each
53 time an SPF-triggering event occurs within the hold-time of the previous
54 SPF calculation.
55
56 .. clicmd:: auto-cost reference-bandwidth COST
57
58
59 This sets the reference bandwidth for cost calculations, where this
60 bandwidth is considered equivalent to an OSPF cost of 1, specified in
61 Mbits/s. The default is 100Mbit/s (i.e. a link of bandwidth 100Mbit/s
62 or higher will have a cost of 1. Cost of lower bandwidth links will be
63 scaled with reference to this cost).
64
65 This configuration setting MUST be consistent across all routers
66 within the OSPF domain.
67
68 .. clicmd:: maximum-paths (1-64)
69
70 Use this command to control the maximum number of parallel routes that
71 OSPFv3 can support. The default is 64.
72
73 .. clicmd:: write-multiplier (1-100)
74
75 Use this command to tune the amount of work done in the packet read and
76 write threads before relinquishing control. The parameter is the number
77 of packets to process before returning. The default value of this parameter
78 is 20.
79
80 .. clicmd:: clear ipv6 ospf6 process [vrf NAME]
81
82 This command clears up the database and routing tables and resets the
83 neighborship by restarting the interface state machine. This will be
84 helpful when there is a change in router-id and if user wants the router-id
85 change to take effect, user can use this cli instead of restarting the
86 ospf6d daemon.
87
88 ASBR Summarisation Support in OSPFv3
89 ====================================
90
91 External routes in OSPFv3 are carried by type 5/7 LSA (external LSAs).
92 External LSAs are generated by ASBR (Autonomous System Boundary Router).
93 Large topology database requires a large amount of router memory, which
94 slows down all processes, including SPF calculations.
95 It is necessary to reduce the size of the OSPFv3 topology database,
96 especially in a large network. Summarising routes keeps the routing
97 tables smaller and easier to troubleshoot.
98
99 External route summarization must be configured on ASBR.
100 Stub area do not allow ASBR because they don’t allow type 5 LSAs.
101
102 An ASBR will inject a summary route into the OSPFv3 domain.
103
104 Summary route will only be advertised if you have at least one subnet
105 that falls within the summary range.
106
107 Users will be allowed an option in the CLI to not advertise range of
108 ipv6 prefixes as well.
109
110 The configuration of ASBR Summarisation is supported using the CLI command
111
112 .. clicmd:: summary-address X:X::X:X/M [tag (1-4294967295)] [{metric (0-16777215) | metric-type (1-2)}]
113
114 This command will advertise a single External LSA on behalf of all the
115 prefixes falling under this range configured by the CLI.
116 The user is allowed to configure tag, metric and metric-type as well.
117 By default, tag is not configured, default metric as 20 and metric-type
118 as type-2 gets advertised.
119 A summary route is created when one or more specific routes are learned and
120 removed when no more specific route exist.
121 The summary route is also installed in the local system with Null0 as
122 next-hop to avoid leaking traffic.
123
124 .. clicmd:: no summary-address X:X::X:X/M [tag (1-4294967295)] [{metric (0-16777215) | metric-type (1-2)}]
125
126 This command can be used to remove the summarisation configuration.
127 This will flush the single External LSA if it was originated and advertise
128 the External LSAs for all the existing individual prefixes.
129
130 .. clicmd:: summary-address X:X::X:X/M no-advertise
131
132 This command can be used when user do not want to advertise a certain
133 range of prefixes using the no-advertise option.
134 This command when configured will flush all the existing external LSAs
135 falling under this range.
136
137 .. clicmd:: no summary-address X:X::X:X/M no-advertise
138
139 This command can be used to remove the previous configuration.
140 When configured, tt will resume originating external LSAs for all the prefixes
141 falling under the configured range.
142
143 .. clicmd:: aggregation timer (5-1800)
144
145 The summarisation command takes effect after the aggregation timer expires.
146 By default the value of this timer is 5 seconds. User can modify the time
147 after which the external LSAs should get originated using this command.
148
149 .. clicmd:: no aggregation timer (5-1800)
150
151 This command removes the timer configuration. It reverts back to default
152 5 second timer.
153
154 .. clicmd:: show ipv6 ospf6 summary-address [detail] [json]
155
156 This command can be used to see all the summary-address related information.
157 When detail option is used, it shows all the prefixes falling under each
158 summary-configuration apart from other information.
159
160 .. clicmd:: debug ospf6 lsa aggregation
161
162 This command can be used to enable the debugs related to the summarisation
163 of these LSAs.
164
165 .. _ospf6-debugging:
166
167 OSPFv3 Debugging
168 ================
169
170 The following debug commands are supported:
171
172 .. clicmd:: debug ospf6 abr
173
174 Toggle OSPFv3 ABR debugging messages.
175
176 .. clicmd:: debug ospf6 asbr
177
178 Toggle OSPFv3 ASBR debugging messages.
179
180 .. clicmd:: debug ospf6 border-routers
181
182 Toggle OSPFv3 border router debugging messages.
183
184 .. clicmd:: debug ospf6 flooding
185
186 Toggle OSPFv3 flooding debugging messages.
187
188 .. clicmd:: debug ospf6 interface
189
190 Toggle OSPFv3 interface related debugging messages.
191
192 .. clicmd:: debug ospf6 lsa
193
194 Toggle OSPFv3 Link State Advertisements debugging messages.
195
196 .. clicmd:: debug ospf6 message
197
198 Toggle OSPFv3 message exchange debugging messages.
199
200 .. clicmd:: debug ospf6 neighbor
201
202 Toggle OSPFv3 neighbor interaction debugging messages.
203
204 .. clicmd:: debug ospf6 nssa
205
206 Toggle OSPFv3 Not So Stubby Area (NSSA) debugging messages.
207
208 .. clicmd:: debug ospf6 route
209
210 Toggle OSPFv3 routes debugging messages.
211
212 .. clicmd:: debug ospf6 spf
213
214 Toggle OSPFv3 Shortest Path calculation debugging messages.
215
216 .. clicmd:: debug ospf6 zebra
217
218 Toggle OSPFv3 zebra interaction debugging messages.
219
220 .. _ospf6-area:
221
222 OSPF6 area
223 ==========
224
225 .. clicmd:: area A.B.C.D nssa
226
227 NSSA Support in OSPFv3
228 =======================
229
230 The configuration of NSSA areas in OSPFv3 is supported using the CLI command
231 ``area A.B.C.D nssa`` in ospf6 router configuration mode.
232 The following functionalities are implemented as per RFC 3101:
233
234 1. Advertising Type-7 LSA into NSSA area when external route is redistributed
235 into OSPFv3
236 2. Processing Type-7 LSA received from neighbor and installing route in the
237 route table
238 3. Support for NSSA ABR functionality which is generating Type-5 LSA when
239 backbone area is configured. Currently translation of Type-7 LSA to Type-5 LSA
240 is enabled by default.
241 4. Support for NSSA Translator functionality when there are multiple NSSA ABR
242 in an area
243
244 .. _ospf6-interface:
245
246 OSPF6 interface
247 ===============
248
249 .. clicmd:: ipv6 ospf6 area <A.B.C.D|(0-4294967295)>
250
251 Enable OSPFv3 on the interface and add it to the specified area.
252
253 .. clicmd:: ipv6 ospf6 cost COST
254
255 Sets interface's output cost. Default value depends on the interface
256 bandwidth and on the auto-cost reference bandwidth.
257
258 .. clicmd:: ipv6 ospf6 hello-interval HELLOINTERVAL
259
260 Sets interface's Hello Interval. Default 10
261
262 .. clicmd:: ipv6 ospf6 dead-interval DEADINTERVAL
263
264 Sets interface's Router Dead Interval. Default value is 40.
265
266 .. clicmd:: ipv6 ospf6 retransmit-interval RETRANSMITINTERVAL
267
268 Sets interface's Rxmt Interval. Default value is 5.
269
270 .. clicmd:: ipv6 ospf6 priority PRIORITY
271
272 Sets interface's Router Priority. Default value is 1.
273
274 .. clicmd:: ipv6 ospf6 transmit-delay TRANSMITDELAY
275
276 Sets interface's Inf-Trans-Delay. Default value is 1.
277
278 .. clicmd:: ipv6 ospf6 network (broadcast|point-to-point)
279
280 Set explicitly network type for specified interface.
281
282 OSPF6 route-map
283 ===============
284
285 Usage of *ospfd6*'s route-map support.
286
287 .. clicmd:: set metric [+|-](0-4294967295)
288
289 Set a metric for matched route when sending announcement. Use plus (+) sign
290 to add a metric value to an existing metric. Use minus (-) sign to
291 substract a metric value from an existing metric.
292
293 .. _redistribute-routes-to-ospf6:
294
295 Redistribute routes to OSPF6
296 ============================
297
298 .. clicmd:: redistribute <babel|bgp|connected|isis|kernel|openfabric|ripng|sharp|static|table> [route-map WORD]
299
300 Redistribute routes from other protocols into OSPFv3.
301
302 .. clicmd:: default-information originate [{always|metric (0-16777214)|metric-type (1-2)|route-map WORD}]
303
304 The command injects default route in the connected areas. The always
305 argument injects the default route regardless of it being present in the
306 router. Metric values and route-map can also be specified optionally.
307
308 .. _showing-ospf6-information:
309
310 Showing OSPF6 information
311 =========================
312
313 .. clicmd:: show ipv6 ospf6 [vrf <NAME|all>] [json]
314
315 Show information on a variety of general OSPFv3 and area state and
316 configuration information. JSON output can be obtained by appending 'json'
317 to the end of command.
318
319 .. clicmd:: show ipv6 ospf6 [vrf <NAME|all>] database [<detail|dump|internal>] [json]
320
321 This command shows LSAs present in the LSDB. There are three view options.
322 These options helps in viewing all the parameters of the LSAs. JSON output
323 can be obtained by appending 'json' to the end of command. JSON option is
324 not applicable with 'dump' option.
325
326 .. clicmd:: show ipv6 ospf6 [vrf <NAME|all>] database <router|network|inter-prefix|inter-router|as-external|group-membership|type-7|link|intra-prefix> [json]
327
328 These options filters out the LSA based on its type. The three views options
329 works here as well. JSON output can be obtained by appending 'json' to the
330 end of command.
331
332 .. clicmd:: show ipv6 ospf6 [vrf <NAME|all>] database adv-router A.B.C.D linkstate-id A.B.C.D [json]
333
334 The LSAs additinally can also be filtered with the linkstate-id and
335 advertising-router fields. We can use the LSA type filter and views with
336 this command as well and visa-versa. JSON output can be obtained by
337 appending 'json' to the end of command.
338
339 .. clicmd:: show ipv6 ospf6 [vrf <NAME|all>] database self-originated [json]
340
341 This command is used to filter the LSAs which are originated by the present
342 router. All the other filters are applicable here as well.
343
344 .. clicmd:: show ipv6 ospf6 [vrf <NAME|all>] interface [json]
345
346 To see OSPF interface configuration like costs. JSON output can be
347 obtained by appending "json" in the end.
348
349 .. clicmd:: show ipv6 ospf6 [vrf <NAME|all>] neighbor [json]
350
351 Shows state and chosen (Backup) DR of neighbor. JSON output can be
352 obtained by appending 'json' at the end.
353
354 .. clicmd:: show ipv6 ospf6 [vrf <NAME|all>] interface traffic [json]
355
356 Shows counts of different packets that have been recieved and transmitted
357 by the interfaces. JSON output can be obtained by appending "json" at the
358 end.
359
360 .. clicmd:: show ipv6 route ospf6
361
362 This command shows internal routing table.
363
364 .. clicmd:: show ipv6 ospf6 zebra [json]
365
366 Shows state about what is being redistributed between zebra and OSPF6.
367 JSON output can be obtained by appending "json" at the end.
368
369 .. clicmd:: show ipv6 ospf6 [vrf <NAME|all>] redistribute [json]
370
371 Shows the routes which are redistributed by the router. JSON output can
372 be obtained by appending 'json' at the end.
373
374 .. clicmd:: show ipv6 ospf6 [vrf <NAME|all>] route [<intra-area|inter-area|external-1|external-2|X:X::X:X|X:X::X:X/M|detail|summary>] [json]
375
376 This command displays the ospfv3 routing table as determined by the most
377 recent SPF calculations. Options are provided to view the different types
378 of routes. Other than the standard view there are two other options, detail
379 and summary. JSON output can be obtained by appending 'json' to the end of
380 command.
381
382 .. clicmd:: show ipv6 ospf6 [vrf <NAME|all>] route X:X::X:X/M match [detail] [json]
383
384 The additional match option will match the given address to the destination
385 of the routes, and return the result accordingly.
386
387 .. clicmd:: show ipv6 ospf6 [vrf <NAME|all>] interface [IFNAME] prefix [detail|<X:X::X:X|X:X::X:X/M> [<match|detail>]] [json]
388
389 This command shows the prefixes present in the interface routing table.
390 Interface name can also be given. JSON output can be obtained by appending
391 'json' to the end of command.
392
393 .. clicmd:: show ipv6 ospf6 [vrf <NAME|all>] spf tree [json]
394
395 This commands shows the spf tree from the recent spf calculation with the
396 calling router as the root. If json is appended in the end, we can get the
397 tree in JSON format. Each area that the router belongs to has it's own
398 JSON object, with each router having "cost", "isLeafNode" and "children" as
399 arguments.
400
401
402 Sample configuration
403 ====================
404
405 Example of ospf6d configured on one interface and area:
406
407 .. code-block:: frr
408
409 interface eth0
410 ipv6 ospf6 area 0.0.0.0
411 ipv6 ospf6 instance-id 0
412 !
413 router ospf6
414 ospf6 router-id 212.17.55.53
415 area 0.0.0.0 range 2001:770:105:2::/64
416 !
417
418
419 Larger example with policy and various options set:
420
421
422 .. code-block:: frr
423
424 debug ospf6 neighbor state
425 !
426 interface fxp0
427 ipv6 ospf6 area 0.0.0.0
428 ipv6 ospf6 cost 1
429 ipv6 ospf6 hello-interval 10
430 ipv6 ospf6 dead-interval 40
431 ipv6 ospf6 retransmit-interval 5
432 ipv6 ospf6 priority 0
433 ipv6 ospf6 transmit-delay 1
434 ipv6 ospf6 instance-id 0
435 !
436 interface lo0
437 ipv6 ospf6 cost 1
438 ipv6 ospf6 hello-interval 10
439 ipv6 ospf6 dead-interval 40
440 ipv6 ospf6 retransmit-interval 5
441 ipv6 ospf6 priority 1
442 ipv6 ospf6 transmit-delay 1
443 ipv6 ospf6 instance-id 0
444 !
445 router ospf6
446 router-id 255.1.1.1
447 redistribute static route-map static-ospf6
448 !
449 access-list access4 permit 127.0.0.1/32
450 !
451 ipv6 access-list access6 permit 3ffe:501::/32
452 ipv6 access-list access6 permit 2001:200::/48
453 ipv6 access-list access6 permit ::1/128
454 !
455 ipv6 prefix-list test-prefix seq 1000 deny any
456 !
457 route-map static-ospf6 permit 10
458 match ipv6 address prefix-list test-prefix
459 set metric-type type-2
460 set metric 2000
461 !
462 line vty
463 access-class access4
464 ipv6 access-class access6
465 exec-timeout 0 0
466 !