]> git.proxmox.com Git - mirror_frr.git/blob - doc/user/pim.rst
Merge pull request #6557 from opensourcerouting/zlogbuf-litter
[mirror_frr.git] / doc / user / pim.rst
1 .. _pim:
2
3 ***
4 PIM
5 ***
6
7 PIM -- Protocol Independent Multicast
8
9 *pimd* supports pim-sm as well as igmp v2 and v3. pim is
10 vrf aware and can work within the context of vrf's in order to
11 do S,G mrouting. Additionally PIM can be used in the EVPN underlay
12 network for optimizing forwarding of overlay BUM traffic.
13
14 .. note::
15
16 On Linux for PIM-SM operation you *must* have kernel version 4.18 or greater.
17 To use PIM for EVPN BUM forwarding, kernels 5.0 or greater are required.
18 OpenBSD has no multicast support and FreeBSD, NetBSD and Solaris only
19 have support for SSM.
20
21 .. _starting-and-stopping-pimd:
22
23 Starting and Stopping pimd
24 ==========================
25
26 The default configuration file name of *pimd*'s is :file:`pimd.conf`. When
27 invoked *pimd* searches directory |INSTALL_PREFIX_ETC|. If
28 :file:`pimd.conf` is not there then next search current directory.
29
30 *pimd* requires zebra for proper operation. Additionally *pimd* depends on
31 routing properly setup and working in the network that it is working on.
32
33 ::
34
35 # zebra -d
36 # pimd -d
37
38
39 Please note that *zebra* must be invoked before *pimd*.
40
41 To stop *pimd* please use::
42
43 kill `cat /var/run/pimd.pid`
44
45 Certain signals have special meanings to *pimd*.
46
47 +---------+---------------------------------------------------------------------+
48 | Signal | Meaning |
49 +=========+=====================================================================+
50 | SIGUSR1 | Rotate the *pimd* logfile |
51 +---------+---------------------------------------------------------------------+
52 | SIGINT | *pimd* sweeps all installed PIM mroutes then terminates gracefully. |
53 | SIGTERM | |
54 +---------+---------------------------------------------------------------------+
55
56 *pimd* invocation options. Common options that can be specified
57 (:ref:`common-invocation-options`).
58
59 .. index:: ip pim rp A.B.C.D A.B.C.D/M
60 .. clicmd:: ip pim rp A.B.C.D A.B.C.D/M
61
62 In order to use pim, it is necessary to configure a RP for join messages to
63 be sent to. Currently the only methodology to do this is via static rp
64 commands. All routers in the pim network must agree on these values. The
65 first ip address is the RP's address and the second value is the matching
66 prefix of group ranges covered. This command is vrf aware, to configure for
67 a vrf, enter the vrf submode.
68
69 .. index:: ip pim register-accept-list PLIST
70 .. clicmd:: ip pim register-accept-list PLIST
71
72 When pim receives a register packet the source of the packet will be compared
73 to the prefix-list specified, PLIST, and if a permit is received normal
74 processing continues. If a deny is returned for the source address of the
75 register packet a register stop message is sent to the source.
76
77 .. index:: ip pim spt-switchover infinity-and-beyond
78 .. clicmd:: ip pim spt-switchover infinity-and-beyond
79
80 On the last hop router if it is desired to not switch over to the SPT tree.
81 Configure this command. This command is vrf aware, to configure for a vrf,
82 enter the vrf submode.
83
84 .. index:: ip pim ecmp
85 .. clicmd:: ip pim ecmp
86
87 If pim has the a choice of ECMP nexthops for a particular RPF, pim will
88 cause S,G flows to be spread out amongst the nexthops. If this command is
89 not specified then the first nexthop found will be used. This command is vrf
90 aware, to configure for a vrf, enter the vrf submode.
91
92 .. index:: ip pim ecmp rebalance
93 .. clicmd:: ip pim ecmp rebalance
94
95 If pim is using ECMP and an interface goes down, cause pim to rebalance all
96 S,G flows across the remaining nexthops. If this command is not configured
97 pim only modifies those S,G flows that were using the interface that went
98 down. This command is vrf aware, to configure for a vrf, enter the vrf
99 submode.
100
101 .. index:: ip pim join-prune-interval (60-600)
102 .. clicmd:: ip pim join-prune-interval (60-600)
103
104 Modify the join/prune interval that pim uses to the new value. Time is
105 specified in seconds. This command is vrf aware, to configure for a vrf,
106 enter the vrf submode.
107
108 .. index:: ip pim keep-alive-timer (31-60000)
109 .. clicmd:: ip pim keep-alive-timer (31-60000)
110
111 Modify the time out value for a S,G flow from 31-60000 seconds. 31 seconds
112 is chosen for a lower bound because some hardware platforms cannot see data
113 flowing in better than 30 second chunks. This command is vrf aware, to
114 configure for a vrf, enter the vrf submode.
115
116 .. index:: ip pim packets (1-100)
117 .. clicmd:: ip pim packets (1-100)
118
119 When processing packets from a neighbor process the number of packets
120 incoming at one time before moving on to the next task. The default value is
121 3 packets. This command is only useful at scale when you can possibly have
122 a large number of pim control packets flowing. This command is vrf aware, to
123 configure for a vrf, enter the vrf submode.
124
125 .. index:: ip pim register-suppress-time (5-60000)
126 .. clicmd:: ip pim register-suppress-time (5-60000)
127
128 Modify the time that pim will register suppress a FHR will send register
129 notifications to the kernel. This command is vrf aware, to configure for a
130 vrf, enter the vrf submode.
131
132 .. index:: ip pim send-v6-secondary
133 .. clicmd:: ip pim send-v6-secondary
134
135 When sending pim hello packets tell pim to send any v6 secondary addresses
136 on the interface. This information is used to allow pim to use v6 nexthops
137 in it's decision for RPF lookup. This command is vrf aware, to configure for
138 a vrf, enter the vrf submode.
139
140 .. index:: ip pim ssm prefix-list WORD
141 .. clicmd:: ip pim ssm prefix-list WORD
142
143 Specify a range of group addresses via a prefix-list that forces pim to
144 never do SM over. This command is vrf aware, to configure for a vrf, enter
145 the vrf submode.
146
147 .. index:: ip multicast rpf-lookup-mode WORD
148 .. clicmd:: ip multicast rpf-lookup-mode WORD
149
150 Modify how PIM does RPF lookups in the zebra routing table. You can use
151 these choices:
152
153 longer-prefix
154 Lookup the RPF in both tables using the longer prefix as a match
155
156 lower-distance
157 Lookup the RPF in both tables using the lower distance as a match
158
159 mrib-only
160 Lookup in the Multicast RIB only
161
162 mrib-then-urib
163 Lookup in the Multicast RIB then the Unicast Rib, returning first found.
164 This is the default value for lookup if this command is not entered
165
166 urib-only
167 Lookup in the Unicast Rib only.
168
169 .. index:: no ip msdp mesh-group [WORD]
170 .. clicmd:: no ip msdp mesh-group [WORD]
171
172 Delete multicast source discovery protocol mesh-group
173
174 .. index:: ip igmp generate-query-once [version (2-3)]
175 .. clicmd:: ip igmp generate-query-once [version (2-3)]
176
177 Generate IGMP query (v2/v3) on user requirement. This will not depend on
178 the existing IGMP general query timer.If no version is provided in the cli,
179 it will be considered as default v2 query.This is a hidden command.
180
181 .. index:: [no] ip igmp watermark-warn (10-60000)
182 .. clicmd:: [no] ip igmp watermark-warn (10-60000)
183
184 Configure watermark warning generation for an igmp group limit. Generates
185 warning once the configured group limit is reached while adding new groups.
186 'no' form of the command disables the warning generation. This command is
187 vrf aware. To configure per vrf, enter vrf submode.
188
189 .. _pim-interface-configuration:
190
191 PIM Interface Configuration
192 ===========================
193
194 PIM interface commands allow you to configure an interface as either a Receiver
195 or a interface that you would like to form pim neighbors on. If the interface
196 is in a vrf, enter the interface command with the vrf keyword at the end.
197
198 .. index:: ip pim active-active
199 .. clicmd:: ip pim active-active
200
201 Turn on pim active-active configuration for a Vxlan interface. This
202 command will not do anything if you do not have the underlying ability
203 of a mlag implementation.
204
205 .. index:: ip pim bfd
206 .. clicmd:: ip pim bfd
207
208 Turns on BFD support for PIM for this interface.
209
210 .. index:: ip pim bsm
211 .. clicmd:: ip pim bsm
212
213 Tell pim that we would like to use this interface to process bootstrap
214 messages. This is enabled by default. 'no' form of this command is used to
215 restrict bsm messages on this interface.
216
217 .. index:: ip pim unicast-bsm
218 .. clicmd:: ip pim unicast-bsm
219
220 Tell pim that we would like to allow interface to process unicast bootstrap
221 messages. This is enabled by default. 'no' form of this command is used to
222 restrict processing of unicast bsm messages on this interface.
223
224 .. index:: ip pim drpriority (1-4294967295)
225 .. clicmd:: ip pim drpriority (1-4294967295)
226
227 Set the DR Priority for the interface. This command is useful to allow the
228 user to influence what node becomes the DR for a lan segment.
229
230 .. index:: ip pim hello (1-180) (1-180)
231 .. clicmd:: ip pim hello (1-180) (1-180)
232
233 Set the pim hello and hold interval for a interface.
234
235 .. index:: ip pim
236 .. clicmd:: ip pim
237
238 Tell pim that we would like to use this interface to form pim neighbors
239 over. Please note that this command does not enable the reception of IGMP
240 reports on the interface. Refer to the next `ip igmp` command for IGMP
241 management.
242
243 .. index:: ip igmp
244 .. clicmd:: ip igmp
245
246 Tell pim to receive IGMP reports and Query on this interface. The default
247 version is v3. This command is useful on a LHR.
248
249 .. index:: ip igmp join A.B.C.D [A.B.C.D]
250 .. clicmd:: ip igmp join A.B.C.D [A.B.C.D]
251
252 Join multicast group or source-group on an interface.
253
254 .. index:: ip igmp query-interval (1-1800)
255 .. clicmd:: ip igmp query-interval (1-1800)
256
257 Set the IGMP query interval that PIM will use.
258
259 .. index:: ip igmp query-max-response-time (10-250)
260 .. clicmd:: ip igmp query-max-response-time (10-250)
261
262 Set the IGMP query response timeout value. If an report is not returned in
263 the specified time we will assume the S,G or \*,G has timed out.
264
265 .. index:: ip igmp version (2-3)
266 .. clicmd:: ip igmp version (2-3)
267
268 Set the IGMP version used on this interface. The default value is 3.
269
270 .. index:: ip multicast boundary oil WORD
271 .. clicmd:: ip multicast boundary oil WORD
272
273 Set a pim multicast boundary, based upon the WORD prefix-list. If a pim join
274 or IGMP report is received on this interface and the Group is denied by the
275 prefix-list, PIM will ignore the join or report.
276
277 .. index:: ip igmp last-member-query-count (1-7)
278 .. clicmd:: ip igmp last-member-query-count (1-7)
279
280 Set the IGMP last member query count. The default value is 2. 'no' form of
281 this command is used to to configure back to the default value.
282
283 .. index:: ip igmp last-member-query-interval (1-255)
284 .. clicmd:: ip igmp last-member-query-interval (1-255)
285
286 Set the IGMP last member query interval in deciseconds. The default value is
287 10 deciseconds. 'no' form of this command is used to to configure back to the
288 default value.
289
290 .. index:: ip mroute INTERFACE A.B.C.D [A.B.C.D]
291 .. clicmd:: ip mroute INTERFACE A.B.C.D [A.B.C.D]
292
293 Set a static multicast route for a traffic coming on the current interface to
294 be forwarded on the given interface if the traffic matches the group address
295 and optionally the source address.
296
297 .. _pim-multicast-rib-insertion:
298
299 PIM Multicast RIB insertion:
300 ============================
301
302 In order to influence Multicast RPF lookup, it is possible to insert
303 into zebra routes for the Multicast RIB. These routes are only
304 used for RPF lookup and will not be used by zebra for insertion
305 into the kernel *or* for normal rib processing. As such it is
306 possible to create weird states with these commands. Use with
307 caution. Most of the time this will not be necessary.
308
309 .. index:: ip mroute A.B.C.D/M A.B.C.D (1-255)
310 .. clicmd:: ip mroute A.B.C.D/M A.B.C.D (1-255)
311
312 Insert into the Multicast Rib Route A.B.C.D/M with specified nexthop. The
313 distance can be specified as well if desired.
314
315 .. index:: ip mroute A.B.C.D/M INTERFACE (1-255)
316 .. clicmd:: ip mroute A.B.C.D/M INTERFACE (1-255)
317
318 Insert into the Multicast Rib Route A.B.C.D/M using the specified INTERFACE.
319 The distance can be specified as well if desired.
320
321 .. _show-pim-information:
322
323 Show PIM Information
324 ====================
325
326 All PIM show commands are vrf aware and typically allow you to insert a
327 specified vrf command if information is desired about a specific vrf. If no
328 vrf is specified then the default vrf is assumed. Finally the special keyword
329 'all' allows you to look at all vrfs for the command. Naming a vrf 'all' will
330 cause great confusion.
331
332 .. index:: show ip igmp interface
333 .. clicmd:: show ip igmp interface
334
335 Display IGMP interface information.
336
337 .. index:: show ip igmp join
338 .. clicmd:: show ip igmp join
339
340 Display IGMP static join information.
341
342 .. index:: show ip igmp groups
343 .. clicmd:: show ip igmp groups
344
345 Display IGMP groups information.
346
347 .. index:: show ip igmp groups retransmissions
348 .. clicmd:: show ip igmp groups retransmissions
349
350 Display IGMP group retransmission information.
351
352 .. index:: show ip igmp sources
353 .. clicmd:: show ip igmp sources
354
355 Display IGMP sources information.
356
357 .. index:: show ip igmp sources retransmissions
358 .. clicmd:: show ip igmp sources retransmissions
359
360 Display IGMP source retransmission information.
361
362 .. index:: show ip igmp statistics
363 .. clicmd:: show ip igmp statistics
364
365 Display IGMP statistics information.
366
367 .. index:: show ip multicast
368 .. clicmd:: show ip multicast
369
370 Display various information about the interfaces used in this pim instance.
371
372 .. index:: show ip mroute [vrf NAME] [A.B.C.D [A.B.C.D]] [fill] [json]
373 .. clicmd:: show ip mroute [vrf NAME] [A.B.C.D [A.B.C.D]] [fill] [json]
374
375 Display information about installed into the kernel S,G mroutes. If
376 one address is specified we assume it is the Group we are interested
377 in displaying data on. If the second address is specified then it is
378 Source Group. The keyword `fill` says to fill in all assumed data
379 for test/data gathering purposes.
380
381 .. index:: show ip mroute count
382 .. clicmd:: show ip mroute count
383
384 Display information about installed into the kernel S,G mroutes and in
385 addition display data about packet flow for the mroutes.
386
387 .. index:: show ip mroute summary
388 .. clicmd:: show ip mroute summary
389
390 Display total number of S,G mroutes and number of S,G mroutes installed
391 into the kernel.
392
393 .. index:: show ip pim assert
394 .. clicmd:: show ip pim assert
395
396 Display information about asserts in the PIM system for S,G mroutes.
397
398 .. index:: show ip pim assert-internal
399 .. clicmd:: show ip pim assert-internal
400
401 Display internal assert state for S,G mroutes
402
403 .. index:: show ip pim assert-metric
404 .. clicmd:: show ip pim assert-metric
405
406 Display metric information about assert state for S,G mroutes
407
408 .. index:: show ip pim assert-winner-metric
409 .. clicmd:: show ip pim assert-winner-metric
410
411 Display winner metric for assert state for S,G mroutes
412
413 .. index:: show ip pim group-type
414 .. clicmd:: show ip pim group-type
415
416 Display SSM group ranges.
417
418 .. index:: show ip pim interface
419 .. clicmd:: show ip pim interface
420
421 Display information about interfaces PIM is using.
422
423 .. index:: show ip pim mlag [vrf NAME] interface [detail|WORD] [json]
424 .. clicmd:: show ip pim mlag [vrf NAME|all] interface [detail|WORD] [json]
425
426 Display mlag interface information.
427
428 .. index:: show ip pim [vrf NAME] join [A.B.C.D [A.B.C.D]] [json]
429 .. clicmd:: show ip pim join
430
431 Display information about PIM joins received. If one address is specified
432 then we assume it is the Group we are interested in displaying data on.
433 If the second address is specified then it is Source Group.
434
435 .. index:: show ip pim local-membership
436 .. clicmd:: show ip pim local-membership
437
438 Display information about PIM interface local-membership.
439
440 .. index:: show ip pim mlag summary [json]
441 .. clicmd:: show ip pim mlag summary [json]
442
443 Display mlag information state that PIM is keeping track of.
444
445 .. index:: show ip pim neighbor
446 .. clicmd:: show ip pim neighbor
447
448 Display information about PIM neighbors.
449
450 .. index:: show ip pim nexthop
451 .. clicmd:: show ip pim nexthop
452
453 Display information about pim nexthops that are being used.
454
455 .. index:: show ip pim nexthop-lookup
456 .. clicmd:: show ip pim nexthop-lookup
457
458 Display information about a S,G pair and how the RPF would be chosen. This
459 is especially useful if there are ECMP's available from the RPF lookup.
460
461 .. index:: show ip pim rp-info
462 .. clicmd:: show ip pim rp-info
463
464 Display information about RP's that are configured on this router.
465
466 .. index:: show ip pim rpf
467 .. clicmd:: show ip pim rpf
468
469 Display information about currently being used S,G's and their RPF lookup
470 information. Additionally display some statistics about what has been
471 happening on the router.
472
473 .. index:: show ip pim secondary
474 .. clicmd:: show ip pim secondary
475
476 Display information about an interface and all the secondary addresses
477 associated with it.
478
479 .. index:: show ip pim state
480 .. clicmd:: show ip pim state
481
482 Display information about known S,G's and incoming interface as well as the
483 OIL and how they were chosen.
484
485 .. index:: show ip pim [vrf NAME] upstream [A.B.C.D [A.B.C.D]] [json]
486 .. clicmd:: show ip pim upstream
487
488 Display upstream information about a S,G mroute. Allow the user to
489 specify sub Source and Groups that we are only interested in.
490
491 .. index:: show ip pim upstream-join-desired
492 .. clicmd:: show ip pim upstream-join-desired
493
494 Display upstream information for S,G's and if we desire to
495 join the multicast tree
496
497 .. index:: show ip pim upstream-rpf
498 .. clicmd:: show ip pim upstream-rpf
499
500 Display upstream information for S,G's and the RPF data associated with them.
501
502 .. index:: show ip pim [vrf NAME] mlag upstream [A.B.C.D [A.B.C.D]] [json]
503 .. clicmd:: show ip pim mlag upstream
504
505 Display upstream entries that are synced across MLAG switches.
506 Allow the user to specify sub Source and Groups address filters.
507
508 .. index:: show ip pim mlag summary
509 .. clicmd:: show ip pim mlag summary
510
511 Display PIM MLAG (multi-chassis link aggregation) session status and
512 control message statistics.
513
514 .. index:: show ip pim bsr
515 .. clicmd:: show ip pim bsr
516
517 Display current bsr, its uptime and last received bsm age.
518
519 .. index:: show ip pim bsrp-info
520 .. clicmd:: show ip pim bsrp-info
521
522 Display group-to-rp mappings received from E-BSR.
523
524 .. index:: show ip pim bsm-database
525 .. clicmd:: show ip pim bsm-database
526
527 Display all fragments ofstored bootstrap message in user readable format.
528
529 .. index:: show ip rpf
530 .. clicmd:: show ip rpf
531
532 Display the multicast RIB created in zebra.
533
534 .. index:: mtrace A.B.C.D [A.B.C.D]
535 .. clicmd:: mtrace A.B.C.D [A.B.C.D]
536
537 Display multicast traceroute towards source, optionally for particular group.
538
539 .. index:: show ip multicast count [vrf NAME] [json]
540 .. clicmd:: show ip multicast count [vrf NAME] [json]
541
542 Display multicast data packets count per interface for a vrf.
543
544 .. index:: show ip multicast count vrf all [json]
545 .. clicmd:: show ip multicast count vrf all [json]
546
547 Display multicast data packets count per interface for all vrf.
548
549 PIM Debug Commands
550 ==================
551
552 The debugging subsystem for PIM behaves in accordance with how FRR handles
553 debugging. You can specify debugging at the enable CLI mode as well as the
554 configure CLI mode. If you specify debug commands in the configuration cli
555 mode, the debug commands can be persistent across restarts of the FRR pimd if
556 the config was written out.
557
558 .. index:: debug igmp
559 .. clicmd:: debug igmp
560
561 This turns on debugging for IGMP protocol activity.
562
563 .. index:: debug mtrace
564 .. clicmd:: debug mtrace
565
566 This turns on debugging for mtrace protocol activity.
567
568 .. index:: debug mroute
569 .. clicmd:: debug mroute
570
571 This turns on debugging for PIM interaction with kernel MFC cache.
572
573 .. index:: debug pim events
574 .. clicmd:: debug pim events
575
576 This turns on debugging for PIM system events. Especially timers.
577
578 .. index:: debug pim nht
579 .. clicmd:: debug pim nht
580
581 This turns on debugging for PIM nexthop tracking. It will display
582 information about RPF lookups and information about when a nexthop changes.
583
584 .. index:: debug pim packet-dump
585 .. clicmd:: debug pim packet-dump
586
587 This turns on an extraordinary amount of data. Each pim packet sent and
588 received is dumped for debugging purposes. This should be considered a
589 developer only command.
590
591 .. index:: debug pim packets
592 .. clicmd:: debug pim packets
593
594 This turns on information about packet generation for sending and about
595 packet handling from a received packet.
596
597 .. index:: debug pim trace
598 .. clicmd:: debug pim trace
599
600 This traces pim code and how it is running.
601
602 .. index:: debug pim bsm
603 .. clicmd:: debug pim bsm
604
605 This turns on debugging for BSR message processing.
606
607 .. index:: debug pim zebra
608 .. clicmd:: debug pim zebra
609
610 This gathers data about events from zebra that come up through the ZAPI.
611
612 PIM Clear Commands
613 ==================
614 Clear commands reset various variables.
615
616 .. index:: clear ip interfaces
617 .. clicmd:: clear ip interfaces
618
619 Reset interfaces.
620
621 .. index:: clear ip igmp interfaces
622 .. clicmd:: clear ip igmp interfaces
623
624 Reset IGMP interfaces.
625
626 .. index:: clear ip mroute
627 .. clicmd:: clear ip mroute
628
629 Reset multicast routes.
630
631 .. index:: clear ip mroute [vrf NAME] count
632 .. clicmd:: clear ip mroute [vrf NAME] count
633
634 When this command is issued, reset the counts of data shown for
635 packet count, byte count and wrong interface to 0 and start count
636 up from this spot.
637
638 .. index:: clear ip pim interfaces
639 .. clicmd:: clear ip pim interfaces
640
641 Reset PIM interfaces.
642
643 .. index:: clear ip pim oil
644 .. clicmd:: clear ip pim oil
645
646 Rescan PIM OIL (output interface list).
647
648 PIM EVPN configuration
649 ======================
650 To use PIM in the underlay for overlay BUM forwarding associate a multicast
651 group with the L2 VNI. The actual configuration is based on your distribution.
652 Here is an ifupdown2 example::
653
654 auto vx-10100
655 iface vx-10100
656 vxlan-id 10100
657 bridge-access 100
658 vxlan-local-tunnelip 27.0.0.11
659 vxlan-mcastgrp 239.1.1.100
660
661 .. note::
662
663 PIM will see the ``vxlan-mcastgrp`` configuration and auto configure state
664 to properly forward BUM traffic.
665
666 PIM also needs to be configured in the underlay to allow the BUM MDT to be
667 setup. This is existing PIM configuration:
668
669 - Enable pim on the underlay L3 interface via the "ip pim" command.
670 - Configure RPs for the BUM multicast group range.
671 - Ensure the PIM is enabled on the lo of the VTEPs and the RP.