7 PIM -- Protocol Independent Multicast
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.
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
21 .. _starting-and-stopping-pimd:
23 Starting and Stopping pimd
24 ==========================
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.
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.
39 Please note that *zebra* must be invoked before *pimd*.
41 To stop *pimd* please use::
43 kill `cat /var/run/pimd.pid`
45 Certain signals have special meanings to *pimd*.
47 +---------+---------------------------------------------------------------------+
49 +=========+=====================================================================+
50 | SIGUSR1 | Rotate the *pimd* logfile |
51 +---------+---------------------------------------------------------------------+
52 | SIGINT | *pimd* sweeps all installed PIM mroutes then terminates gracefully. |
54 +---------+---------------------------------------------------------------------+
56 *pimd* invocation options. Common options that can be specified
57 (:ref:`common-invocation-options`).
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
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.
69 .. index:: ip pim register-accept-list PLIST
70 .. clicmd:: ip pim register-accept-list PLIST
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.
77 .. index:: ip pim spt-switchover infinity-and-beyond
78 .. clicmd:: ip pim spt-switchover infinity-and-beyond
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.
84 .. index:: ip pim ecmp
85 .. clicmd:: ip pim ecmp
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.
92 .. index:: ip pim ecmp rebalance
93 .. clicmd:: ip pim ecmp rebalance
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
101 .. index:: ip pim join-prune-interval (60-600)
102 .. clicmd:: ip pim join-prune-interval (60-600)
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.
108 .. index:: ip pim keep-alive-timer (31-60000)
109 .. clicmd:: ip pim keep-alive-timer (31-60000)
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.
116 .. index:: ip pim packets (1-100)
117 .. clicmd:: ip pim packets (1-100)
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.
125 .. index:: ip pim register-suppress-time (5-60000)
126 .. clicmd:: ip pim register-suppress-time (5-60000)
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.
132 .. index:: ip pim send-v6-secondary
133 .. clicmd:: ip pim send-v6-secondary
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.
140 .. index:: ip pim ssm prefix-list WORD
141 .. clicmd:: ip pim ssm prefix-list WORD
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
147 .. index:: ip multicast rpf-lookup-mode WORD
148 .. clicmd:: ip multicast rpf-lookup-mode WORD
150 Modify how PIM does RPF lookups in the zebra routing table. You can use
154 Lookup the RPF in both tables using the longer prefix as a match
157 Lookup the RPF in both tables using the lower distance as a match
160 Lookup in the Multicast RIB only
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
167 Lookup in the Unicast Rib only.
169 .. index:: [no] ip msdp mesh-group [WORD]
170 .. clicmd:: [no] ip msdp mesh-group [WORD]
172 Create or Delete a multicast source discovery protocol mesh-group using
173 [WORD] as the group name.
175 .. index:: [no] ip msdp mesh-group WORD member A.B.C.D
176 .. clicmd:: [no] ip msdp mesh-group WORD member A.B.C.D
178 Attach or Delete A.B.C.D to the MSDP mesh group WORD specified.
180 .. index:: [no] ip msdp mesh-group WORD source A.B.C.D
181 .. clicmd:: [no] ip msdp mesh-group WORD source A.B.C.D
183 For the address specified A.B.C.D use that as the source address for
184 mesh group packets being sent.
186 .. index:: ip igmp generate-query-once [version (2-3)]
187 .. clicmd:: ip igmp generate-query-once [version (2-3)]
189 Generate IGMP query (v2/v3) on user requirement. This will not depend on
190 the existing IGMP general query timer.If no version is provided in the cli,
191 it will be considered as default v2 query.This is a hidden command.
193 .. index:: [no] ip igmp watermark-warn (10-60000)
194 .. clicmd:: [no] ip igmp watermark-warn (10-60000)
196 Configure watermark warning generation for an igmp group limit. Generates
197 warning once the configured group limit is reached while adding new groups.
198 'no' form of the command disables the warning generation. This command is
199 vrf aware. To configure per vrf, enter vrf submode.
201 .. _pim-interface-configuration:
203 PIM Interface Configuration
204 ===========================
206 PIM interface commands allow you to configure an interface as either a Receiver
207 or a interface that you would like to form pim neighbors on. If the interface
208 is in a vrf, enter the interface command with the vrf keyword at the end.
210 .. index:: ip pim active-active
211 .. clicmd:: ip pim active-active
213 Turn on pim active-active configuration for a Vxlan interface. This
214 command will not do anything if you do not have the underlying ability
215 of a mlag implementation.
217 .. index:: ip pim bfd
218 .. clicmd:: ip pim bfd
220 Turns on BFD support for PIM for this interface.
222 .. index:: ip pim bsm
223 .. clicmd:: ip pim bsm
225 Tell pim that we would like to use this interface to process bootstrap
226 messages. This is enabled by default. 'no' form of this command is used to
227 restrict bsm messages on this interface.
229 .. index:: ip pim unicast-bsm
230 .. clicmd:: ip pim unicast-bsm
232 Tell pim that we would like to allow interface to process unicast bootstrap
233 messages. This is enabled by default. 'no' form of this command is used to
234 restrict processing of unicast bsm messages on this interface.
236 .. index:: ip pim drpriority (1-4294967295)
237 .. clicmd:: ip pim drpriority (1-4294967295)
239 Set the DR Priority for the interface. This command is useful to allow the
240 user to influence what node becomes the DR for a lan segment.
242 .. index:: ip pim hello (1-180) (1-180)
243 .. clicmd:: ip pim hello (1-180) (1-180)
245 Set the pim hello and hold interval for a interface.
250 Tell pim that we would like to use this interface to form pim neighbors
251 over. Please note that this command does not enable the reception of IGMP
252 reports on the interface. Refer to the next `ip igmp` command for IGMP
258 Tell pim to receive IGMP reports and Query on this interface. The default
259 version is v3. This command is useful on a LHR.
261 .. index:: ip igmp join A.B.C.D [A.B.C.D]
262 .. clicmd:: ip igmp join A.B.C.D [A.B.C.D]
264 Join multicast group or source-group on an interface.
266 .. index:: ip igmp query-interval (1-1800)
267 .. clicmd:: ip igmp query-interval (1-1800)
269 Set the IGMP query interval that PIM will use.
271 .. index:: ip igmp query-max-response-time (10-250)
272 .. clicmd:: ip igmp query-max-response-time (10-250)
274 Set the IGMP query response timeout value. If an report is not returned in
275 the specified time we will assume the S,G or \*,G has timed out.
277 .. index:: ip igmp version (2-3)
278 .. clicmd:: ip igmp version (2-3)
280 Set the IGMP version used on this interface. The default value is 3.
282 .. index:: ip multicast boundary oil WORD
283 .. clicmd:: ip multicast boundary oil WORD
285 Set a pim multicast boundary, based upon the WORD prefix-list. If a pim join
286 or IGMP report is received on this interface and the Group is denied by the
287 prefix-list, PIM will ignore the join or report.
289 .. index:: ip igmp last-member-query-count (1-7)
290 .. clicmd:: ip igmp last-member-query-count (1-7)
292 Set the IGMP last member query count. The default value is 2. 'no' form of
293 this command is used to to configure back to the default value.
295 .. index:: ip igmp last-member-query-interval (1-255)
296 .. clicmd:: ip igmp last-member-query-interval (1-255)
298 Set the IGMP last member query interval in deciseconds. The default value is
299 10 deciseconds. 'no' form of this command is used to to configure back to the
302 .. index:: ip mroute INTERFACE A.B.C.D [A.B.C.D]
303 .. clicmd:: ip mroute INTERFACE A.B.C.D [A.B.C.D]
305 Set a static multicast route for a traffic coming on the current interface to
306 be forwarded on the given interface if the traffic matches the group address
307 and optionally the source address.
309 .. _pim-multicast-rib-insertion:
311 PIM Multicast RIB insertion:
312 ============================
314 In order to influence Multicast RPF lookup, it is possible to insert
315 into zebra routes for the Multicast RIB. These routes are only
316 used for RPF lookup and will not be used by zebra for insertion
317 into the kernel *or* for normal rib processing. As such it is
318 possible to create weird states with these commands. Use with
319 caution. Most of the time this will not be necessary.
321 .. index:: ip mroute A.B.C.D/M A.B.C.D (1-255)
322 .. clicmd:: ip mroute A.B.C.D/M A.B.C.D (1-255)
324 Insert into the Multicast Rib Route A.B.C.D/M with specified nexthop. The
325 distance can be specified as well if desired.
327 .. index:: ip mroute A.B.C.D/M INTERFACE (1-255)
328 .. clicmd:: ip mroute A.B.C.D/M INTERFACE (1-255)
330 Insert into the Multicast Rib Route A.B.C.D/M using the specified INTERFACE.
331 The distance can be specified as well if desired.
333 .. _show-pim-information:
338 All PIM show commands are vrf aware and typically allow you to insert a
339 specified vrf command if information is desired about a specific vrf. If no
340 vrf is specified then the default vrf is assumed. Finally the special keyword
341 'all' allows you to look at all vrfs for the command. Naming a vrf 'all' will
342 cause great confusion.
344 .. index:: show ip igmp interface
345 .. clicmd:: show ip igmp interface
347 Display IGMP interface information.
349 .. index:: show ip igmp join
350 .. clicmd:: show ip igmp join
352 Display IGMP static join information.
354 .. index:: show ip igmp groups
355 .. clicmd:: show ip igmp groups
357 Display IGMP groups information.
359 .. index:: show ip igmp groups retransmissions
360 .. clicmd:: show ip igmp groups retransmissions
362 Display IGMP group retransmission information.
364 .. index:: show ip igmp sources
365 .. clicmd:: show ip igmp sources
367 Display IGMP sources information.
369 .. index:: show ip igmp sources retransmissions
370 .. clicmd:: show ip igmp sources retransmissions
372 Display IGMP source retransmission information.
374 .. index:: show ip igmp statistics
375 .. clicmd:: show ip igmp statistics
377 Display IGMP statistics information.
379 .. index:: show ip multicast
380 .. clicmd:: show ip multicast
382 Display various information about the interfaces used in this pim instance.
384 .. index:: show ip mroute [vrf NAME] [A.B.C.D [A.B.C.D]] [fill] [json]
385 .. clicmd:: show ip mroute [vrf NAME] [A.B.C.D [A.B.C.D]] [fill] [json]
387 Display information about installed into the kernel S,G mroutes. If
388 one address is specified we assume it is the Group we are interested
389 in displaying data on. If the second address is specified then it is
390 Source Group. The keyword `fill` says to fill in all assumed data
391 for test/data gathering purposes.
393 .. index:: show ip mroute [vrf NAME] count [json]
394 .. clicmd:: show ip mroute [vrf NAME] count [json]
396 Display information about installed into the kernel S,G mroutes and in
397 addition display data about packet flow for the mroutes for a specific
400 .. index:: show ip mroute vrf all count [json]
401 .. clicmd:: show ip mroute vrf all count [json]
403 Display information about installed into the kernel S,G mroutes and in
404 addition display data about packet flow for the mroutes for all vrfs.
406 .. index:: show ip mroute [vrf NAME] summary [json]
407 .. clicmd:: show ip mroute [vrf NAME] summary [json]
409 Display total number of S,G mroutes and number of S,G mroutes installed
410 into the kernel for a specific vrf.
412 .. index:: show ip mroute vrf all summary [json]
413 .. clicmd:: show ip mroute vrf all summary [json]
415 Display total number of S,G mroutes and number of S,G mroutes
416 installed into the kernel for all vrfs.
418 .. index:: show ip pim assert
419 .. clicmd:: show ip pim assert
421 Display information about asserts in the PIM system for S,G mroutes.
423 .. index:: show ip pim assert-internal
424 .. clicmd:: show ip pim assert-internal
426 Display internal assert state for S,G mroutes
428 .. index:: show ip pim assert-metric
429 .. clicmd:: show ip pim assert-metric
431 Display metric information about assert state for S,G mroutes
433 .. index:: show ip pim assert-winner-metric
434 .. clicmd:: show ip pim assert-winner-metric
436 Display winner metric for assert state for S,G mroutes
438 .. index:: show ip pim group-type
439 .. clicmd:: show ip pim group-type
441 Display SSM group ranges.
443 .. index:: show ip pim interface
444 .. clicmd:: show ip pim interface
446 Display information about interfaces PIM is using.
448 .. index:: show ip pim mlag [vrf NAME] interface [detail|WORD] [json]
449 .. clicmd:: show ip pim mlag [vrf NAME|all] interface [detail|WORD] [json]
451 Display mlag interface information.
453 .. index:: show ip pim [vrf NAME] join [A.B.C.D [A.B.C.D]] [json]
454 .. clicmd:: show ip pim join
456 Display information about PIM joins received. If one address is specified
457 then we assume it is the Group we are interested in displaying data on.
458 If the second address is specified then it is Source Group.
460 .. index:: show ip pim local-membership
461 .. clicmd:: show ip pim local-membership
463 Display information about PIM interface local-membership.
465 .. index:: show ip pim mlag summary [json]
466 .. clicmd:: show ip pim mlag summary [json]
468 Display mlag information state that PIM is keeping track of.
470 .. index:: show ip pim neighbor
471 .. clicmd:: show ip pim neighbor
473 Display information about PIM neighbors.
475 .. index:: show ip pim nexthop
476 .. clicmd:: show ip pim nexthop
478 Display information about pim nexthops that are being used.
480 .. index:: show ip pim nexthop-lookup
481 .. clicmd:: show ip pim nexthop-lookup
483 Display information about a S,G pair and how the RPF would be chosen. This
484 is especially useful if there are ECMP's available from the RPF lookup.
486 .. index:: show ip pim rp-info
487 .. clicmd:: show ip pim rp-info
489 Display information about RP's that are configured on this router.
491 .. index:: show ip pim rpf
492 .. clicmd:: show ip pim rpf
494 Display information about currently being used S,G's and their RPF lookup
495 information. Additionally display some statistics about what has been
496 happening on the router.
498 .. index:: show ip pim secondary
499 .. clicmd:: show ip pim secondary
501 Display information about an interface and all the secondary addresses
504 .. index:: show ip pim state
505 .. clicmd:: show ip pim state
507 Display information about known S,G's and incoming interface as well as the
508 OIL and how they were chosen.
510 .. index:: show ip pim [vrf NAME] upstream [A.B.C.D [A.B.C.D]] [json]
511 .. clicmd:: show ip pim upstream
513 Display upstream information about a S,G mroute. Allow the user to
514 specify sub Source and Groups that we are only interested in.
516 .. index:: show ip pim upstream-join-desired
517 .. clicmd:: show ip pim upstream-join-desired
519 Display upstream information for S,G's and if we desire to
520 join the multicast tree
522 .. index:: show ip pim upstream-rpf
523 .. clicmd:: show ip pim upstream-rpf
525 Display upstream information for S,G's and the RPF data associated with them.
527 .. index:: show ip pim [vrf NAME] mlag upstream [A.B.C.D [A.B.C.D]] [json]
528 .. clicmd:: show ip pim mlag upstream
530 Display upstream entries that are synced across MLAG switches.
531 Allow the user to specify sub Source and Groups address filters.
533 .. index:: show ip pim mlag summary
534 .. clicmd:: show ip pim mlag summary
536 Display PIM MLAG (multi-chassis link aggregation) session status and
537 control message statistics.
539 .. index:: show ip pim bsr
540 .. clicmd:: show ip pim bsr
542 Display current bsr, its uptime and last received bsm age.
544 .. index:: show ip pim bsrp-info
545 .. clicmd:: show ip pim bsrp-info
547 Display group-to-rp mappings received from E-BSR.
549 .. index:: show ip pim bsm-database
550 .. clicmd:: show ip pim bsm-database
552 Display all fragments ofstored bootstrap message in user readable format.
554 .. index:: show ip rpf
555 .. clicmd:: show ip rpf
557 Display the multicast RIB created in zebra.
559 .. index:: mtrace A.B.C.D [A.B.C.D]
560 .. clicmd:: mtrace A.B.C.D [A.B.C.D]
562 Display multicast traceroute towards source, optionally for particular group.
564 .. index:: show ip multicast count [vrf NAME] [json]
565 .. clicmd:: show ip multicast count [vrf NAME] [json]
567 Display multicast data packets count per interface for a vrf.
569 .. index:: show ip multicast count vrf all [json]
570 .. clicmd:: show ip multicast count vrf all [json]
572 Display multicast data packets count per interface for all vrf.
577 The debugging subsystem for PIM behaves in accordance with how FRR handles
578 debugging. You can specify debugging at the enable CLI mode as well as the
579 configure CLI mode. If you specify debug commands in the configuration cli
580 mode, the debug commands can be persistent across restarts of the FRR pimd if
581 the config was written out.
583 .. index:: debug igmp
584 .. clicmd:: debug igmp
586 This turns on debugging for IGMP protocol activity.
588 .. index:: debug mtrace
589 .. clicmd:: debug mtrace
591 This turns on debugging for mtrace protocol activity.
593 .. index:: debug mroute
594 .. clicmd:: debug mroute
596 This turns on debugging for PIM interaction with kernel MFC cache.
598 .. index:: debug pim events
599 .. clicmd:: debug pim events
601 This turns on debugging for PIM system events. Especially timers.
603 .. index:: debug pim nht
604 .. clicmd:: debug pim nht
606 This turns on debugging for PIM nexthop tracking. It will display
607 information about RPF lookups and information about when a nexthop changes.
609 .. index:: debug pim packet-dump
610 .. clicmd:: debug pim packet-dump
612 This turns on an extraordinary amount of data. Each pim packet sent and
613 received is dumped for debugging purposes. This should be considered a
614 developer only command.
616 .. index:: debug pim packets
617 .. clicmd:: debug pim packets
619 This turns on information about packet generation for sending and about
620 packet handling from a received packet.
622 .. index:: debug pim trace
623 .. clicmd:: debug pim trace
625 This traces pim code and how it is running.
627 .. index:: debug pim bsm
628 .. clicmd:: debug pim bsm
630 This turns on debugging for BSR message processing.
632 .. index:: debug pim zebra
633 .. clicmd:: debug pim zebra
635 This gathers data about events from zebra that come up through the ZAPI.
639 Clear commands reset various variables.
641 .. index:: clear ip interfaces
642 .. clicmd:: clear ip interfaces
646 .. index:: clear ip igmp interfaces
647 .. clicmd:: clear ip igmp interfaces
649 Reset IGMP interfaces.
651 .. index:: clear ip mroute
652 .. clicmd:: clear ip mroute
654 Reset multicast routes.
656 .. index:: clear ip mroute [vrf NAME] count
657 .. clicmd:: clear ip mroute [vrf NAME] count
659 When this command is issued, reset the counts of data shown for
660 packet count, byte count and wrong interface to 0 and start count
663 .. index:: clear ip pim interfaces
664 .. clicmd:: clear ip pim interfaces
666 Reset PIM interfaces.
668 .. index:: clear ip pim oil
669 .. clicmd:: clear ip pim oil
671 Rescan PIM OIL (output interface list).
673 PIM EVPN configuration
674 ======================
675 To use PIM in the underlay for overlay BUM forwarding associate a multicast
676 group with the L2 VNI. The actual configuration is based on your distribution.
677 Here is an ifupdown2 example::
683 vxlan-local-tunnelip 27.0.0.11
684 vxlan-mcastgrp 239.1.1.100
688 PIM will see the ``vxlan-mcastgrp`` configuration and auto configure state
689 to properly forward BUM traffic.
691 PIM also needs to be configured in the underlay to allow the BUM MDT to be
692 setup. This is existing PIM configuration:
694 - Enable pim on the underlay L3 interface via the "ip pim" command.
695 - Configure RPs for the BUM multicast group range.
696 - Ensure the PIM is enabled on the lo of the VTEPs and the RP.