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, and NetBSD 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 .. clicmd:: ip pim rp A.B.C.D A.B.C.D/M
61 In order to use pim, it is necessary to configure a RP for join messages to
62 be sent to. Currently the only methodology to do this is via static rp
63 commands. All routers in the pim network must agree on these values. The
64 first ip address is the RP's address and the second value is the matching
65 prefix of group ranges covered. This command is vrf aware, to configure for
66 a vrf, enter the vrf submode.
68 .. clicmd:: ip pim rp keep-alive-timer (1-65535)
70 Modify the time out value for a S,G flow from 1-65535 seconds at RP.
71 The normal keepalive period for the KAT(S,G) defaults to 210 seconds.
72 However, at the RP, the keepalive period must be at least the
73 Register_Suppression_Time, or the RP may time out the (S,G) state
74 before the next Null-Register arrives. Thus, the KAT(S,G) is set to
75 max(Keepalive_Period, RP_Keepalive_Period) when a Register-Stop is sent.
76 If choosing a value below 31 seconds be aware that some hardware platforms
77 cannot see data flowing in better than 30 second chunks. This command is
78 vrf aware, to configure for a vrf, enter the vrf submode.
80 .. clicmd:: ip pim register-accept-list PLIST
82 When pim receives a register packet the source of the packet will be compared
83 to the prefix-list specified, PLIST, and if a permit is received normal
84 processing continues. If a deny is returned for the source address of the
85 register packet a register stop message is sent to the source.
87 .. clicmd:: ip pim spt-switchover infinity-and-beyond [prefix-list PLIST]
89 On the last hop router if it is desired to not switch over to the SPT tree
90 configure this command. Optional parameter prefix-list can be use to control
91 which groups to switch or not switch. If a group is PERMIT as per the
92 PLIST, then the SPT switchover does not happen for it and if it is DENY,
93 then the SPT switchover happens.
94 This command is vrf aware, to configure for a vrf,
95 enter the vrf submode.
97 .. clicmd:: ip pim ecmp
99 If pim has the a choice of ECMP nexthops for a particular RPF, pim will
100 cause S,G flows to be spread out amongst the nexthops. If this command is
101 not specified then the first nexthop found will be used. This command is vrf
102 aware, to configure for a vrf, enter the vrf submode.
104 .. clicmd:: ip pim ecmp rebalance
106 If pim is using ECMP and an interface goes down, cause pim to rebalance all
107 S,G flows across the remaining nexthops. If this command is not configured
108 pim only modifies those S,G flows that were using the interface that went
109 down. This command is vrf aware, to configure for a vrf, enter the vrf
112 .. clicmd:: ip pim join-prune-interval (1-65535)
114 Modify the join/prune interval that pim uses to the new value. Time is
115 specified in seconds. This command is vrf aware, to configure for a vrf,
116 enter the vrf submode. The default time is 60 seconds. If you enter
117 a value smaller than 60 seconds be aware that this can and will affect
118 convergence at scale.
120 .. clicmd:: ip pim keep-alive-timer (1-65535)
122 Modify the time out value for a S,G flow from 1-65535 seconds. If choosing
123 a value below 31 seconds be aware that some hardware platforms cannot see data
124 flowing in better than 30 second chunks. This command is vrf aware, to
125 configure for a vrf, enter the vrf submode.
127 .. clicmd:: ip pim packets (1-255)
129 When processing packets from a neighbor process the number of packets
130 incoming at one time before moving on to the next task. The default value is
131 3 packets. This command is only useful at scale when you can possibly have
132 a large number of pim control packets flowing. This command is vrf aware, to
133 configure for a vrf, enter the vrf submode.
135 .. clicmd:: ip pim register-suppress-time (1-65535)
137 Modify the time that pim will register suppress a FHR will send register
138 notifications to the kernel. This command is vrf aware, to configure for a
139 vrf, enter the vrf submode.
141 .. clicmd:: ip pim send-v6-secondary
143 When sending pim hello packets tell pim to send any v6 secondary addresses
144 on the interface. This information is used to allow pim to use v6 nexthops
145 in it's decision for RPF lookup. This command is vrf aware, to configure for
146 a vrf, enter the vrf submode.
148 .. clicmd:: ip pim ssm prefix-list WORD
150 Specify a range of group addresses via a prefix-list that forces pim to
151 never do SM over. This command is vrf aware, to configure for a vrf, enter
154 .. clicmd:: ip multicast rpf-lookup-mode WORD
156 Modify how PIM does RPF lookups in the zebra routing table. You can use
160 Lookup the RPF in both tables using the longer prefix as a match
163 Lookup the RPF in both tables using the lower distance as a match
166 Lookup in the Multicast RIB only
169 Lookup in the Multicast RIB then the Unicast Rib, returning first found.
170 This is the default value for lookup if this command is not entered
173 Lookup in the Unicast Rib only.
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 .. clicmd:: ip igmp watermark-warn (1-65535)
183 Configure watermark warning generation for an igmp group limit. Generates
184 warning once the configured group limit is reached while adding new groups.
185 'no' form of the command disables the warning generation. This command is
186 vrf aware. To configure per vrf, enter vrf submode.
188 .. _pim-interface-configuration:
190 PIM Interface Configuration
191 ===========================
193 PIM interface commands allow you to configure an interface as either a Receiver
194 or a interface that you would like to form pim neighbors on. If the interface
195 is in a vrf, enter the interface command with the vrf keyword at the end.
197 .. clicmd:: ip pim active-active
199 Turn on pim active-active configuration for a Vxlan interface. This
200 command will not do anything if you do not have the underlying ability
201 of a mlag implementation.
203 .. clicmd:: ip pim bsm
205 Tell pim that we would like to use this interface to process bootstrap
206 messages. This is enabled by default. 'no' form of this command is used to
207 restrict bsm messages on this interface.
209 .. clicmd:: ip pim unicast-bsm
211 Tell pim that we would like to allow interface to process unicast bootstrap
212 messages. This is enabled by default. 'no' form of this command is used to
213 restrict processing of unicast bsm messages on this interface.
215 .. clicmd:: ip pim drpriority (1-4294967295)
217 Set the DR Priority for the interface. This command is useful to allow the
218 user to influence what node becomes the DR for a lan segment.
220 .. clicmd:: ip pim hello (1-65535) (1-65535)
222 Set the pim hello and hold interval for a interface.
226 Tell pim that we would like to use this interface to form pim neighbors
227 over. Please note that this command does not enable the reception of IGMP
228 reports on the interface. Refer to the next `ip igmp` command for IGMP
231 .. clicmd:: ip pim use-source A.B.C.D
233 If you have multiple addresses configured on a particular interface
234 and would like pim to use a specific source address associated with
239 Tell pim to receive IGMP reports and Query on this interface. The default
240 version is v3. This command is useful on a LHR.
242 .. clicmd:: ip igmp join A.B.C.D [A.B.C.D]
244 Join multicast group or source-group on an interface.
246 .. clicmd:: ip igmp query-interval (1-65535)
248 Set the IGMP query interval that PIM will use.
250 .. clicmd:: ip igmp query-max-response-time (1-65535)
252 Set the IGMP query response timeout value. If an report is not returned in
253 the specified time we will assume the S,G or \*,G has timed out.
255 .. clicmd:: ip igmp version (2-3)
257 Set the IGMP version used on this interface. The default value is 3.
259 .. clicmd:: ip multicast boundary oil WORD
261 Set a pim multicast boundary, based upon the WORD prefix-list. If a pim join
262 or IGMP report is received on this interface and the Group is denied by the
263 prefix-list, PIM will ignore the join or report.
265 .. clicmd:: ip igmp last-member-query-count (1-255)
267 Set the IGMP last member query count. The default value is 2. 'no' form of
268 this command is used to to configure back to the default value.
270 .. clicmd:: ip igmp last-member-query-interval (1-65535)
272 Set the IGMP last member query interval in deciseconds. The default value is
273 10 deciseconds. 'no' form of this command is used to to configure back to the
276 .. clicmd:: ip mroute INTERFACE A.B.C.D [A.B.C.D]
278 Set a static multicast route for a traffic coming on the current interface to
279 be forwarded on the given interface if the traffic matches the group address
280 and optionally the source address.
285 :ref:`bfd-pim-peer-config`
288 .. _pim-multicast-rib:
293 In order to influence Multicast RPF lookup, it is possible to insert
294 into zebra routes for the Multicast RIB. These routes are only
295 used for RPF lookup and will not be used by zebra for insertion
296 into the kernel *or* for normal rib processing. As such it is
297 possible to create weird states with these commands. Use with
298 caution. Most of the time this will not be necessary.
300 .. clicmd:: ip mroute A.B.C.D/M A.B.C.D (1-255)
302 Insert into the Multicast Rib Route A.B.C.D/M with specified nexthop. The
303 distance can be specified as well if desired.
305 .. clicmd:: ip mroute A.B.C.D/M INTERFACE (1-255)
307 Insert into the Multicast Rib Route A.B.C.D/M using the specified INTERFACE.
308 The distance can be specified as well if desired.
310 .. _msdp-configuration:
312 Multicast Source Discovery Protocol (MSDP) Configuration
313 ========================================================
315 MSDP can be setup in different ways:
317 * MSDP meshed-group: where all peers are connected with each other creating
318 a fully meshed network. SAs (source active) messages are not forwarded in
319 this mode because the origin is able to send SAs to all members.
321 This setup is commonly used with anycast.
323 * MSDP peering: when there is one or more peers that are not fully meshed. SAs
324 may be forwarded depending on the result of filtering and RPF checks.
326 This setup is commonly consistent with BGP peerings (for RPF checks).
328 * MSDP default peer: there is only one peer and all SAs will be forwarded
333 MSDP default peer and SA filtering is not implemented.
336 Commands available for MSDP:
338 .. clicmd:: ip msdp timers (1-65535) (1-65535) [(1-65535)]
340 Configure global MSDP timers.
342 First value is the keep-alive interval. This configures the interval in
343 seconds between keep-alive messages. The default value is 60 seconds. It
344 should be less than the remote hold time.
346 Second value is the hold-time. This configures the interval in seconds before
347 closing a non responding connection. The default value is 75. This value
348 should be greater than the remote keep alive time.
350 Third value is the connection retry interval and it is optional. This
351 configures the interval between connection attempts. The default value
354 .. clicmd:: ip msdp mesh-group WORD member A.B.C.D
356 Create or update a mesh group to include the specified MSDP peer.
358 .. clicmd:: ip msdp mesh-group WORD source A.B.C.D
360 Create or update a mesh group to set the source address used to connect to
363 .. clicmd:: ip msdp peer A.B.C.D source A.B.C.D
365 Create a regular MSDP session with peer using the specified source address.
368 .. _show-pim-information:
373 All PIM show commands are vrf aware and typically allow you to insert a
374 specified vrf command if information is desired about a specific vrf. If no
375 vrf is specified then the default vrf is assumed. Finally the special keyword
376 'all' allows you to look at all vrfs for the command. Naming a vrf 'all' will
377 cause great confusion.
379 .. clicmd:: show ip igmp interface
381 Display IGMP interface information.
383 .. clicmd:: show ip igmp [vrf NAME] join [json]
385 Display IGMP static join information for a specific vrf.
386 If "vrf all" is provided, it displays information for all the vrfs present.
388 .. clicmd:: show ip igmp groups
390 Display IGMP groups information.
392 .. clicmd:: show ip igmp groups retransmissions
394 Display IGMP group retransmission information.
396 .. clicmd:: show ip igmp sources
398 Display IGMP sources information.
400 .. clicmd:: show ip igmp sources retransmissions
402 Display IGMP source retransmission information.
404 .. clicmd:: show ip igmp statistics
406 Display IGMP statistics information.
408 .. clicmd:: show ip multicast
410 Display various information about the interfaces used in this pim instance.
412 .. clicmd:: show ip mroute [vrf NAME] [A.B.C.D [A.B.C.D]] [fill] [json]
414 Display information about installed into the kernel S,G mroutes. If
415 one address is specified we assume it is the Group we are interested
416 in displaying data on. If the second address is specified then it is
417 Source Group. The keyword `fill` says to fill in all assumed data
418 for test/data gathering purposes.
420 .. clicmd:: show ip mroute [vrf NAME] count [json]
422 Display information about installed into the kernel S,G mroutes and in
423 addition display data about packet flow for the mroutes for a specific
426 .. clicmd:: show ip mroute vrf all count [json]
428 Display information about installed into the kernel S,G mroutes and in
429 addition display data about packet flow for the mroutes for all vrfs.
431 .. clicmd:: show ip mroute [vrf NAME] summary [json]
433 Display total number of S,G mroutes and number of S,G mroutes installed
434 into the kernel for a specific vrf.
436 .. clicmd:: show ip mroute vrf all summary [json]
438 Display total number of S,G mroutes and number of S,G mroutes
439 installed into the kernel for all vrfs.
441 .. clicmd:: show ip msdp mesh-group
443 Display the configured mesh-groups, the local address associated with each
444 mesh-group, the peer members included in each mesh-group, and their status.
446 .. clicmd:: show ip msdp peer
448 Display information about the MSDP peers. That includes the peer address,
449 the local address used to establish the connection to the peer, the
450 connection status, and the number of active sources.
452 .. clicmd:: show ip pim assert
454 Display information about asserts in the PIM system for S,G mroutes.
456 .. clicmd:: show ip pim assert-internal
458 Display internal assert state for S,G mroutes
460 .. clicmd:: show ip pim assert-metric
462 Display metric information about assert state for S,G mroutes
464 .. clicmd:: show ip pim assert-winner-metric
466 Display winner metric for assert state for S,G mroutes
468 .. clicmd:: show ip pim group-type
470 Display SSM group ranges.
472 .. clicmd:: show ip pim interface
474 Display information about interfaces PIM is using.
476 .. clicmd:: show ip pim mlag [vrf NAME|all] interface [detail|WORD] [json]
478 Display mlag interface information.
480 .. clicmd:: show ip pim join
482 Display information about PIM joins received. If one address is specified
483 then we assume it is the Group we are interested in displaying data on.
484 If the second address is specified then it is Source Group.
486 .. clicmd:: show ip pim local-membership
488 Display information about PIM interface local-membership.
490 .. clicmd:: show ip pim mlag summary [json]
492 Display mlag information state that PIM is keeping track of.
494 .. clicmd:: show ip pim neighbor
496 Display information about PIM neighbors.
498 .. clicmd:: show ip pim nexthop
500 Display information about pim nexthops that are being used.
502 .. clicmd:: show ip pim nexthop-lookup
504 Display information about a S,G pair and how the RPF would be chosen. This
505 is especially useful if there are ECMP's available from the RPF lookup.
507 .. clicmd:: show ip pim rp-info
509 Display information about RP's that are configured on this router.
511 .. clicmd:: show ip pim rpf
513 Display information about currently being used S,G's and their RPF lookup
514 information. Additionally display some statistics about what has been
515 happening on the router.
517 .. clicmd:: show ip pim secondary
519 Display information about an interface and all the secondary addresses
522 .. clicmd:: show ip pim state
524 Display information about known S,G's and incoming interface as well as the
525 OIL and how they were chosen.
527 .. clicmd:: show ip pim [vrf NAME] upstream [A.B.C.D [A.B.C.D]] [json]
529 Display upstream information about a S,G mroute. Allow the user to
530 specify sub Source and Groups that we are only interested in.
532 .. clicmd:: show ip pim upstream-join-desired
534 Display upstream information for S,G's and if we desire to
535 join the multicast tree
537 .. clicmd:: show ip pim upstream-rpf
539 Display upstream information for S,G's and the RPF data associated with them.
541 .. clicmd:: show ip pim [vrf NAME] mlag upstream [A.B.C.D [A.B.C.D]] [json]
543 Display upstream entries that are synced across MLAG switches.
544 Allow the user to specify sub Source and Groups address filters.
546 .. clicmd:: show ip pim mlag summary
548 Display PIM MLAG (multi-chassis link aggregation) session status and
549 control message statistics.
551 .. clicmd:: show ip pim bsr
553 Display current bsr, its uptime and last received bsm age.
555 .. clicmd:: show ip pim bsrp-info
557 Display group-to-rp mappings received from E-BSR.
559 .. clicmd:: show ip pim bsm-database
561 Display all fragments ofstored bootstrap message in user readable format.
563 .. clicmd:: mtrace A.B.C.D [A.B.C.D]
565 Display multicast traceroute towards source, optionally for particular group.
567 .. clicmd:: show ip multicast count [vrf NAME] [json]
569 Display multicast data packets count per interface for a vrf.
571 .. clicmd:: show ip multicast count vrf all [json]
573 Display multicast data packets count per interface for all vrf.
578 :ref:`multicast-rib-commands`
584 The debugging subsystem for PIM behaves in accordance with how FRR handles
585 debugging. You can specify debugging at the enable CLI mode as well as the
586 configure CLI mode. If you specify debug commands in the configuration cli
587 mode, the debug commands can be persistent across restarts of the FRR pimd if
588 the config was written out.
590 .. clicmd:: debug igmp
592 This turns on debugging for IGMP protocol activity.
594 .. clicmd:: debug mtrace
596 This turns on debugging for mtrace protocol activity.
598 .. clicmd:: debug mroute
600 This turns on debugging for PIM interaction with kernel MFC cache.
602 .. clicmd:: debug pim events
604 This turns on debugging for PIM system events. Especially timers.
606 .. clicmd:: debug pim nht
608 This turns on debugging for PIM nexthop tracking. It will display
609 information about RPF lookups and information about when a nexthop changes.
611 .. clicmd:: debug pim packet-dump
613 This turns on an extraordinary amount of data. Each pim packet sent and
614 received is dumped for debugging purposes. This should be considered a
615 developer only command.
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 .. clicmd:: debug pim trace
624 This traces pim code and how it is running.
626 .. clicmd:: debug pim bsm
628 This turns on debugging for BSR message processing.
630 .. clicmd:: debug pim zebra
632 This gathers data about events from zebra that come up through the ZAPI.
636 Clear commands reset various variables.
638 .. clicmd:: clear ip interfaces
642 .. clicmd:: clear ip igmp interfaces
644 Reset IGMP interfaces.
646 .. clicmd:: clear ip mroute
648 Reset multicast routes.
650 .. clicmd:: clear ip mroute [vrf NAME] count
652 When this command is issued, reset the counts of data shown for
653 packet count, byte count and wrong interface to 0 and start count
656 .. clicmd:: clear ip pim interfaces
658 Reset PIM interfaces.
660 .. clicmd:: clear ip pim oil
662 Rescan PIM OIL (output interface list).
664 .. clicmd:: clear ip pim [vrf NAME] bsr-data
666 This command will clear the BSM scope data struct. This command also
667 removes the next hop tracking for the bsr and resets the upstreams
668 for the dynamically learnt RPs.
670 PIM EVPN configuration
671 ======================
672 To use PIM in the underlay for overlay BUM forwarding associate a multicast
673 group with the L2 VNI. The actual configuration is based on your distribution.
674 Here is an ifupdown2 example::
680 vxlan-local-tunnelip 27.0.0.11
681 vxlan-mcastgrp 239.1.1.100
685 PIM will see the ``vxlan-mcastgrp`` configuration and auto configure state
686 to properly forward BUM traffic.
688 PIM also needs to be configured in the underlay to allow the BUM MDT to be
689 setup. This is existing PIM configuration:
691 - Enable pim on the underlay L3 interface via the "ip pim" command.
692 - Configure RPs for the BUM multicast group range.
693 - Ensure the PIM is enabled on the lo of the VTEPs and the RP.
705 ! You may want to enable ssmpingd for troubleshooting
706 ! See http://www.venaas.no/multicast/ssmping/
712 ! - Enable "ip pim ssm" on the interface directly attached to the
713 ! multicast source host (if this is the first-hop router)
714 ! - Enable "ip pim ssm" on pim-routers-facing interfaces
715 ! - Enable "ip igmp" on IGMPv3-hosts-facing interfaces
716 ! - In order to inject IGMPv3 local membership information in the
717 ! PIM protocol state, enable both "ip pim ssm" and "ip igmp" on
718 ! the same interface; otherwise PIM won't advertise
719 ! IGMPv3-learned membership to other PIM routers