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