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 Delete multicast source discovery protocol mesh-group
174 .. index:: ip igmp generate-query-once [version (2-3)]
175 .. clicmd:: ip igmp generate-query-once [version (2-3)]
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.
181 .. index:: [no] ip igmp watermark-warn (10-60000)
182 .. clicmd:: [no] ip igmp watermark-warn (10-60000)
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.
189 .. _pim-interface-configuration:
191 PIM Interface Configuration
192 ===========================
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.
198 .. index:: ip pim active-active
199 .. clicmd:: ip pim active-active
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.
205 .. index:: ip pim bfd
206 .. clicmd:: ip pim bfd
208 Turns on BFD support for PIM for this interface.
210 .. index:: ip pim bsm
211 .. clicmd:: ip pim bsm
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.
217 .. index:: ip pim unicast-bsm
218 .. clicmd:: ip pim unicast-bsm
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.
224 .. index:: ip pim drpriority (1-4294967295)
225 .. clicmd:: ip pim drpriority (1-4294967295)
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.
230 .. index:: ip pim hello (1-180) (1-180)
231 .. clicmd:: ip pim hello (1-180) (1-180)
233 Set the pim hello and hold interval for a interface.
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
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.
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]
252 Join multicast group or source-group on an interface.
254 .. index:: ip igmp query-interval (1-1800)
255 .. clicmd:: ip igmp query-interval (1-1800)
257 Set the IGMP query interval that PIM will use.
259 .. index:: ip igmp query-max-response-time (10-250)
260 .. clicmd:: ip igmp query-max-response-time (10-250)
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.
265 .. index:: ip igmp version (2-3)
266 .. clicmd:: ip igmp version (2-3)
268 Set the IGMP version used on this interface. The default value is 3.
270 .. index:: ip multicast boundary oil WORD
271 .. clicmd:: ip multicast boundary oil WORD
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.
277 .. index:: ip igmp last-member-query-count (1-7)
278 .. clicmd:: ip igmp last-member-query-count (1-7)
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.
283 .. index:: ip igmp last-member-query-interval (1-255)
284 .. clicmd:: ip igmp last-member-query-interval (1-255)
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
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]
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.
297 .. _pim-multicast-rib-insertion:
299 PIM Multicast RIB insertion:
300 ============================
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.
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)
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.
315 .. index:: ip mroute A.B.C.D/M INTERFACE (1-255)
316 .. clicmd:: ip mroute A.B.C.D/M INTERFACE (1-255)
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.
321 .. _show-pim-information:
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.
332 .. index:: show ip igmp interface
333 .. clicmd:: show ip igmp interface
335 Display IGMP interface information.
337 .. index:: show ip igmp join
338 .. clicmd:: show ip igmp join
340 Display IGMP static join information.
342 .. index:: show ip igmp groups
343 .. clicmd:: show ip igmp groups
345 Display IGMP groups information.
347 .. index:: show ip igmp groups retransmissions
348 .. clicmd:: show ip igmp groups retransmissions
350 Display IGMP group retransmission information.
352 .. index:: show ip igmp sources
353 .. clicmd:: show ip igmp sources
355 Display IGMP sources information.
357 .. index:: show ip igmp sources retransmissions
358 .. clicmd:: show ip igmp sources retransmissions
360 Display IGMP source retransmission information.
362 .. index:: show ip igmp statistics
363 .. clicmd:: show ip igmp statistics
365 Display IGMP statistics information.
367 .. index:: show ip multicast
368 .. clicmd:: show ip multicast
370 Display various information about the interfaces used in this pim instance.
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]
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.
381 .. index:: show ip mroute count
382 .. clicmd:: show ip mroute count
384 Display information about installed into the kernel S,G mroutes and in
385 addition display data about packet flow for the mroutes.
387 .. index:: show ip mroute summary
388 .. clicmd:: show ip mroute summary
390 Display total number of S,G mroutes and number of S,G mroutes installed
393 .. index:: show ip pim assert
394 .. clicmd:: show ip pim assert
396 Display information about asserts in the PIM system for S,G mroutes.
398 .. index:: show ip pim assert-internal
399 .. clicmd:: show ip pim assert-internal
401 Display internal assert state for S,G mroutes
403 .. index:: show ip pim assert-metric
404 .. clicmd:: show ip pim assert-metric
406 Display metric information about assert state for S,G mroutes
408 .. index:: show ip pim assert-winner-metric
409 .. clicmd:: show ip pim assert-winner-metric
411 Display winner metric for assert state for S,G mroutes
413 .. index:: show ip pim group-type
414 .. clicmd:: show ip pim group-type
416 Display SSM group ranges.
418 .. index:: show ip pim interface
419 .. clicmd:: show ip pim interface
421 Display information about interfaces PIM is using.
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]
426 Display mlag interface information.
428 .. index:: show ip pim [vrf NAME] join [A.B.C.D [A.B.C.D]] [json]
429 .. clicmd:: show ip pim join
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.
435 .. index:: show ip pim local-membership
436 .. clicmd:: show ip pim local-membership
438 Display information about PIM interface local-membership.
440 .. index:: show ip pim mlag summary [json]
441 .. clicmd:: show ip pim mlag summary [json]
443 Display mlag information state that PIM is keeping track of.
445 .. index:: show ip pim neighbor
446 .. clicmd:: show ip pim neighbor
448 Display information about PIM neighbors.
450 .. index:: show ip pim nexthop
451 .. clicmd:: show ip pim nexthop
453 Display information about pim nexthops that are being used.
455 .. index:: show ip pim nexthop-lookup
456 .. clicmd:: show ip pim nexthop-lookup
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.
461 .. index:: show ip pim rp-info
462 .. clicmd:: show ip pim rp-info
464 Display information about RP's that are configured on this router.
466 .. index:: show ip pim rpf
467 .. clicmd:: show ip pim rpf
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.
473 .. index:: show ip pim secondary
474 .. clicmd:: show ip pim secondary
476 Display information about an interface and all the secondary addresses
479 .. index:: show ip pim state
480 .. clicmd:: show ip pim state
482 Display information about known S,G's and incoming interface as well as the
483 OIL and how they were chosen.
485 .. index:: show ip pim [vrf NAME] upstream [A.B.C.D [A.B.C.D]] [json]
486 .. clicmd:: show ip pim upstream
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.
491 .. index:: show ip pim upstream-join-desired
492 .. clicmd:: show ip pim upstream-join-desired
494 Display upstream information for S,G's and if we desire to
495 join the multicast tree
497 .. index:: show ip pim upstream-rpf
498 .. clicmd:: show ip pim upstream-rpf
500 Display upstream information for S,G's and the RPF data associated with them.
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
505 Display upstream entries that are synced across MLAG switches.
506 Allow the user to specify sub Source and Groups address filters.
508 .. index:: show ip pim mlag summary
509 .. clicmd:: show ip pim mlag summary
511 Display PIM MLAG (multi-chassis link aggregation) session status and
512 control message statistics.
514 .. index:: show ip pim bsr
515 .. clicmd:: show ip pim bsr
517 Display current bsr, its uptime and last received bsm age.
519 .. index:: show ip pim bsrp-info
520 .. clicmd:: show ip pim bsrp-info
522 Display group-to-rp mappings received from E-BSR.
524 .. index:: show ip pim bsm-database
525 .. clicmd:: show ip pim bsm-database
527 Display all fragments ofstored bootstrap message in user readable format.
529 .. index:: show ip rpf
530 .. clicmd:: show ip rpf
532 Display the multicast RIB created in zebra.
534 .. index:: mtrace A.B.C.D [A.B.C.D]
535 .. clicmd:: mtrace A.B.C.D [A.B.C.D]
537 Display multicast traceroute towards source, optionally for particular group.
539 .. index:: show ip multicast count [vrf NAME] [json]
540 .. clicmd:: show ip multicast count [vrf NAME] [json]
542 Display multicast data packets count per interface for a vrf.
544 .. index:: show ip multicast count vrf all [json]
545 .. clicmd:: show ip multicast count vrf all [json]
547 Display multicast data packets count per interface for all vrf.
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.
558 .. index:: debug igmp
559 .. clicmd:: debug igmp
561 This turns on debugging for IGMP protocol activity.
563 .. index:: debug mtrace
564 .. clicmd:: debug mtrace
566 This turns on debugging for mtrace protocol activity.
568 .. index:: debug mroute
569 .. clicmd:: debug mroute
571 This turns on debugging for PIM interaction with kernel MFC cache.
573 .. index:: debug pim events
574 .. clicmd:: debug pim events
576 This turns on debugging for PIM system events. Especially timers.
578 .. index:: debug pim nht
579 .. clicmd:: debug pim nht
581 This turns on debugging for PIM nexthop tracking. It will display
582 information about RPF lookups and information about when a nexthop changes.
584 .. index:: debug pim packet-dump
585 .. clicmd:: debug pim packet-dump
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.
591 .. index:: debug pim packets
592 .. clicmd:: debug pim packets
594 This turns on information about packet generation for sending and about
595 packet handling from a received packet.
597 .. index:: debug pim trace
598 .. clicmd:: debug pim trace
600 This traces pim code and how it is running.
602 .. index:: debug pim bsm
603 .. clicmd:: debug pim bsm
605 This turns on debugging for BSR message processing.
607 .. index:: debug pim zebra
608 .. clicmd:: debug pim zebra
610 This gathers data about events from zebra that come up through the ZAPI.
614 Clear commands reset various variables.
616 .. index:: clear ip interfaces
617 .. clicmd:: clear ip interfaces
621 .. index:: clear ip igmp interfaces
622 .. clicmd:: clear ip igmp interfaces
624 Reset IGMP interfaces.
626 .. index:: clear ip mroute
627 .. clicmd:: clear ip mroute
629 Reset multicast routes.
631 .. index:: clear ip mroute [vrf NAME] count
632 .. clicmd:: clear ip mroute [vrf NAME] count
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
638 .. index:: clear ip pim interfaces
639 .. clicmd:: clear ip pim interfaces
641 Reset PIM interfaces.
643 .. index:: clear ip pim oil
644 .. clicmd:: clear ip pim oil
646 Rescan PIM OIL (output interface list).
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::
658 vxlan-local-tunnelip 27.0.0.11
659 vxlan-mcastgrp 239.1.1.100
663 PIM will see the ``vxlan-mcastgrp`` configuration and auto configure state
664 to properly forward BUM traffic.
666 PIM also needs to be configured in the underlay to allow the BUM MDT to be
667 setup. This is existing PIM configuration:
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.