]>
Commit | Line | Data |
---|---|---|
0efdf0fe | 1 | .. _pim: |
e3c1296c QY |
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 | |
745fc7a5 AK |
11 | do S,G mrouting. Additionally PIM can be used in the EVPN underlay |
12 | network for optimizing forwarding of overlay BUM traffic. | |
e3c1296c | 13 | |
0efdf0fe | 14 | .. _starting-and-stopping-pimd: |
e3c1296c QY |
15 | |
16 | Starting and Stopping pimd | |
17 | ========================== | |
18 | ||
19 | The default configuration file name of *pimd*'s is :file:`pimd.conf`. When | |
20 | invoked *pimd* searches directory |INSTALL_PREFIX_ETC|. If | |
21 | :file:`pimd.conf` is not there then next search current directory. | |
22 | ||
23 | *pimd* requires zebra for proper operation. Additionally *pimd* depends on | |
24 | routing properly setup and working in the network that it is working on. | |
25 | ||
26 | :: | |
27 | ||
28 | # zebra -d | |
29 | # pimd -d | |
30 | ||
31 | ||
32 | Please note that *zebra* must be invoked before *pimd*. | |
33 | ||
34 | To stop *pimd* please use:: | |
35 | ||
36 | kill `cat /var/run/pimd.pid` | |
37 | ||
38 | Certain signals have special meanings to *pimd*. | |
39 | ||
40 | +---------+---------------------------------------------------------------------+ | |
41 | | Signal | Meaning | | |
42 | +=========+=====================================================================+ | |
43 | | SIGUSR1 | Rotate the *pimd* logfile | | |
44 | +---------+---------------------------------------------------------------------+ | |
45 | | SIGINT | *pimd* sweeps all installed PIM mroutes then terminates gracefully. | | |
46 | | SIGTERM | | | |
47 | +---------+---------------------------------------------------------------------+ | |
48 | ||
49 | *pimd* invocation options. Common options that can be specified | |
0efdf0fe | 50 | (:ref:`common-invocation-options`). |
e3c1296c QY |
51 | |
52 | .. index:: ip pim rp A.B.C.D A.B.C.D/M | |
53 | .. clicmd:: ip pim rp A.B.C.D A.B.C.D/M | |
54 | ||
55 | In order to use pim, it is necessary to configure a RP for join messages to | |
56 | be sent to. Currently the only methodology to do this is via static rp | |
57 | commands. All routers in the pim network must agree on these values. The | |
58 | first ip address is the RP's address and the second value is the matching | |
59 | prefix of group ranges covered. This command is vrf aware, to configure for | |
60 | a vrf, enter the vrf submode. | |
61 | ||
62 | .. index:: ip pim spt-switchover infinity-and-beyond | |
63 | .. clicmd:: ip pim spt-switchover infinity-and-beyond | |
64 | ||
65 | On the last hop router if it is desired to not switch over to the SPT tree. | |
66 | Configure this command. This command is vrf aware, to configure for a vrf, | |
67 | enter the vrf submode. | |
68 | ||
69 | .. index:: ip pim ecmp | |
70 | .. clicmd:: ip pim ecmp | |
71 | ||
72 | If pim has the a choice of ECMP nexthops for a particular RPF, pim will | |
73 | cause S,G flows to be spread out amongst the nexthops. If this command is | |
74 | not specified then the first nexthop found will be used. This command is vrf | |
75 | aware, to configure for a vrf, enter the vrf submode. | |
76 | ||
77 | .. index:: ip pim ecmp rebalance | |
78 | .. clicmd:: ip pim ecmp rebalance | |
79 | ||
80 | If pim is using ECMP and an interface goes down, cause pim to rebalance all | |
d1e7591e | 81 | S,G flows across the remaining nexthops. If this command is not configured |
e3c1296c QY |
82 | pim only modifies those S,G flows that were using the interface that went |
83 | down. This command is vrf aware, to configure for a vrf, enter the vrf | |
84 | submode. | |
85 | ||
86 | .. index:: ip pim join-prune-interval (60-600) | |
87 | .. clicmd:: ip pim join-prune-interval (60-600) | |
88 | ||
89 | Modify the join/prune interval that pim uses to the new value. Time is | |
90 | specified in seconds. This command is vrf aware, to configure for a vrf, | |
91 | enter the vrf submode. | |
92 | ||
93 | .. index:: ip pim keep-alive-timer (31-60000) | |
94 | .. clicmd:: ip pim keep-alive-timer (31-60000) | |
95 | ||
96 | Modify the time out value for a S,G flow from 31-60000 seconds. 31 seconds | |
d1e7591e QY |
97 | is chosen for a lower bound because some hardware platforms cannot see data |
98 | flowing in better than 30 second chunks. This command is vrf aware, to | |
e3c1296c QY |
99 | configure for a vrf, enter the vrf submode. |
100 | ||
101 | .. index:: ip pim packets (1-100) | |
102 | .. clicmd:: ip pim packets (1-100) | |
103 | ||
104 | When processing packets from a neighbor process the number of packets | |
105 | incoming at one time before moving on to the next task. The default value is | |
106 | 3 packets. This command is only useful at scale when you can possibly have | |
107 | a large number of pim control packets flowing. This command is vrf aware, to | |
108 | configure for a vrf, enter the vrf submode. | |
109 | ||
110 | .. index:: ip pim register-suppress-time (5-60000) | |
111 | .. clicmd:: ip pim register-suppress-time (5-60000) | |
112 | ||
113 | Modify the time that pim will register suppress a FHR will send register | |
114 | notifications to the kernel. This command is vrf aware, to configure for a | |
115 | vrf, enter the vrf submode. | |
116 | ||
117 | .. index:: ip pim send-v6-secondary | |
118 | .. clicmd:: ip pim send-v6-secondary | |
119 | ||
120 | When sending pim hello packets tell pim to send any v6 secondary addresses | |
121 | on the interface. This information is used to allow pim to use v6 nexthops | |
122 | in it's decision for RPF lookup. This command is vrf aware, to configure for | |
123 | a vrf, enter the vrf submode. | |
124 | ||
125 | .. index:: ip pim ssm prefix-list WORD | |
126 | .. clicmd:: ip pim ssm prefix-list WORD | |
127 | ||
128 | Specify a range of group addresses via a prefix-list that forces pim to | |
129 | never do SM over. This command is vrf aware, to configure for a vrf, enter | |
130 | the vrf submode. | |
131 | ||
132 | .. index:: ip multicast rpf-lookup-mode WORD | |
133 | .. clicmd:: ip multicast rpf-lookup-mode WORD | |
134 | ||
135 | Modify how PIM does RPF lookups in the zebra routing table. You can use | |
136 | these choices: | |
137 | ||
138 | longer-prefix | |
139 | Lookup the RPF in both tables using the longer prefix as a match | |
140 | ||
141 | lower-distance | |
142 | Lookup the RPF in both tables using the lower distance as a match | |
143 | ||
144 | mrib-only | |
145 | Lookup in the Multicast RIB only | |
146 | ||
147 | mrib-then-urib | |
148 | Lookup in the Multicast RIB then the Unicast Rib, returning first found. | |
149 | This is the default value for lookup if this command is not entered | |
150 | ||
151 | urib-only | |
152 | Lookup in the Unicast Rib only. | |
153 | ||
154 | ||
0efdf0fe | 155 | .. _pim-interface-configuration: |
e3c1296c QY |
156 | |
157 | PIM Interface Configuration | |
158 | =========================== | |
159 | ||
160 | PIM interface commands allow you to configure an interface as either a Receiver | |
161 | or a interface that you would like to form pim neighbors on. If the interface | |
162 | is in a vrf, enter the interface command with the vrf keyword at the end. | |
163 | ||
164 | .. index:: ip pim bfd | |
165 | .. clicmd:: ip pim bfd | |
166 | ||
167 | Turns on BFD support for PIM for this interface. | |
168 | ||
169 | .. index:: ip pim drpriority (1-4294967295) | |
170 | .. clicmd:: ip pim drpriority (1-4294967295) | |
171 | ||
172 | Set the DR Priority for the interface. This command is useful to allow the | |
173 | user to influence what node becomes the DR for a lan segment. | |
174 | ||
175 | .. index:: ip pim hello (1-180) (1-180) | |
176 | .. clicmd:: ip pim hello (1-180) (1-180) | |
177 | ||
178 | Set the pim hello and hold interval for a interface. | |
179 | ||
180 | .. index:: ip pim sm | |
181 | .. clicmd:: ip pim sm | |
182 | ||
183 | Tell pim that we would like to use this interface to form pim neighbors | |
184 | over. Please note we will *not* accept igmp reports over this interface with | |
185 | this command. | |
186 | ||
187 | .. index:: ip igmp | |
188 | .. clicmd:: ip igmp | |
189 | ||
190 | Tell pim to receive IGMP reports and Query on this interface. The default | |
191 | version is v3. This command is useful on the LHR. | |
192 | ||
f93128c1 MS |
193 | .. index:: ip igmp join A.B.C.D A.B.C.D |
194 | .. clicmd:: ip igmp join A.B.C.D A.B.C.D | |
14916095 MS |
195 | |
196 | Join multicast source-group on an interface. | |
197 | ||
e3c1296c QY |
198 | .. index:: ip igmp query-interval (1-1800) |
199 | .. clicmd:: ip igmp query-interval (1-1800) | |
200 | ||
201 | Set the IGMP query interval that PIM will use. | |
202 | ||
203 | .. index:: ip igmp query-max-response-time (10-250) | |
204 | .. clicmd:: ip igmp query-max-response-time (10-250) | |
205 | ||
206 | Set the IGMP query response timeout value. If an report is not returned in | |
207 | the specified time we will assume the S,G or \*,G has timed out. | |
208 | ||
209 | .. index:: ip igmp version (2-3) | |
210 | .. clicmd:: ip igmp version (2-3) | |
211 | ||
212 | Set the IGMP version used on this interface. The default value is 3. | |
213 | ||
56f0bea7 RK |
214 | .. index:: ip multicast boundary oil WORD |
215 | .. clicmd:: ip multicast boundary oil WORD | |
e3c1296c QY |
216 | |
217 | Set a pim multicast boundary, based upon the WORD prefix-list. If a pim join | |
d1e7591e | 218 | or IGMP report is received on this interface and the Group is denied by the |
e3c1296c QY |
219 | prefix-list, PIM will ignore the join or report. |
220 | ||
0efdf0fe | 221 | .. _pim-multicast-rib-insertion: |
e3c1296c | 222 | |
9eb95b3b QY |
223 | PIM Multicast RIB insertion: |
224 | ============================ | |
e3c1296c QY |
225 | |
226 | In order to influence Multicast RPF lookup, it is possible to insert | |
227 | into zebra routes for the Multicast RIB. These routes are only | |
228 | used for RPF lookup and will not be used by zebra for insertion | |
229 | into the kernel *or* for normal rib processing. As such it is | |
230 | possible to create weird states with these commands. Use with | |
231 | caution. Most of the time this will not be necessary. | |
232 | ||
233 | .. index:: ip mroute A.B.C.D/M A.B.C.D (1-255) | |
234 | .. clicmd:: ip mroute A.B.C.D/M A.B.C.D (1-255) | |
235 | ||
236 | Insert into the Multicast Rib Route A.B.C.D/M with specified nexthop. The | |
237 | distance can be specified as well if desired. | |
238 | ||
239 | .. index:: ip mroute A.B.C.D/M INTERFACE (1-255) | |
240 | .. clicmd:: ip mroute A.B.C.D/M INTERFACE (1-255) | |
241 | ||
242 | Insert into the Multicast Rib Route A.B.C.D/M using the specified INTERFACE. | |
243 | The distance can be specified as well if desired. | |
244 | ||
0efdf0fe | 245 | .. _show-pim-information: |
e3c1296c QY |
246 | |
247 | Show PIM Information | |
248 | ==================== | |
249 | ||
250 | All PIM show commands are vrf aware and typically allow you to insert a | |
251 | specified vrf command if information is desired about a specific vrf. If no | |
252 | vrf is specified then the default vrf is assumed. Finally the special keyword | |
253 | 'all' allows you to look at all vrfs for the command. Naming a vrf 'all' will | |
254 | cause great confusion. | |
255 | ||
14916095 MS |
256 | .. index:: show ip igmp interface |
257 | .. clicmd:: show ip igmp interface | |
258 | ||
259 | Display IGMP interface information. | |
260 | ||
261 | .. index:: show ip igmp join | |
262 | .. clicmd:: show ip igmp join | |
263 | ||
264 | Display IGMP static join information. | |
265 | ||
266 | .. index:: show ip igmp groups | |
267 | .. clicmd:: show ip igmp groups | |
268 | ||
269 | Display IGMP groups information. | |
270 | ||
271 | .. index:: show ip igmp groups retransmissions | |
272 | .. clicmd:: show ip igmp groups retransmissions | |
273 | ||
274 | Display IGMP group retransmission information. | |
275 | ||
276 | .. index:: show ip igmp sources | |
277 | .. clicmd:: show ip igmp sources | |
278 | ||
279 | Display IGMP sources information. | |
280 | ||
281 | .. index:: show ip igmp sources retransmissions | |
282 | .. clicmd:: show ip igmp sources retransmissions | |
283 | ||
284 | Display IGMP source retransmission information. | |
285 | ||
286 | .. index:: show ip igmp statistics | |
287 | .. clicmd:: show ip igmp statistics | |
288 | ||
289 | Display IGMP statistics information. | |
290 | ||
e3c1296c QY |
291 | .. index:: show ip multicast |
292 | .. clicmd:: show ip multicast | |
293 | ||
294 | Display various information about the interfaces used in this pim instance. | |
295 | ||
79b50aa5 DS |
296 | .. index:: show ip mroute [vrf NAME] [A.B.C.D [A.B.C.D]] [fill] [json] |
297 | .. clicmd:: show ip mroute [vrf NAME] [A.B.C.D [A.B.C.D]] [fill] [json] | |
298 | ||
299 | Display information about installed into the kernel S,G mroutes. If | |
300 | one address is specified we assume it is the Group we are interested | |
301 | in displaying data on. If the second address is specified then it is | |
302 | Source Group. The keyword `fill` says to fill in all assumed data | |
303 | for test/data gathering purposes. | |
e3c1296c QY |
304 | |
305 | .. index:: show ip mroute count | |
306 | .. clicmd:: show ip mroute count | |
307 | ||
308 | Display information about installed into the kernel S,G mroutes and in | |
309 | addition display data about packet flow for the mroutes. | |
310 | ||
311 | .. index:: show ip pim assert | |
312 | .. clicmd:: show ip pim assert | |
313 | ||
314 | Display information about asserts in the PIM system for S,G mroutes. | |
315 | ||
316 | .. index:: show ip pim assert-internal | |
317 | .. clicmd:: show ip pim assert-internal | |
318 | ||
319 | Display internal assert state for S,G mroutes | |
320 | ||
321 | .. index:: show ip pim assert-metric | |
322 | .. clicmd:: show ip pim assert-metric | |
323 | ||
324 | Display metric information about assert state for S,G mroutes | |
325 | ||
326 | .. index:: show ip pim assert-winner-metric | |
327 | .. clicmd:: show ip pim assert-winner-metric | |
328 | ||
329 | Display winner metric for assert state for S,G mroutes | |
330 | ||
331 | .. index:: show ip pim group-type | |
332 | .. clicmd:: show ip pim group-type | |
333 | ||
334 | Display SSM group ranges. | |
335 | ||
336 | .. index:: show ip pim interface | |
337 | .. clicmd:: show ip pim interface | |
338 | ||
339 | Display information about interfaces PIM is using. | |
340 | ||
ca02cf8d | 341 | .. index:: show ip pim [vrf NAME] join [A.B.C.D [A.B.C.D]] [json] |
e3c1296c QY |
342 | .. clicmd:: show ip pim join |
343 | ||
ca02cf8d DS |
344 | Display information about PIM joins received. If one address is specified |
345 | then we assume it is the Group we are interested in displaying data on. | |
346 | If the second address is specified then it is Source Group. | |
e3c1296c QY |
347 | |
348 | .. index:: show ip pim local-membership | |
349 | .. clicmd:: show ip pim local-membership | |
350 | ||
351 | Display information about PIM interface local-membership. | |
352 | ||
353 | .. index:: show ip pim neighbor | |
354 | .. clicmd:: show ip pim neighbor | |
355 | ||
356 | Display information about PIM neighbors. | |
357 | ||
358 | .. index:: show ip pim nexthop | |
359 | .. clicmd:: show ip pim nexthop | |
360 | ||
361 | Display information about pim nexthops that are being used. | |
362 | ||
363 | .. index:: show ip pim nexthop-lookup | |
364 | .. clicmd:: show ip pim nexthop-lookup | |
365 | ||
d1e7591e | 366 | Display information about a S,G pair and how the RPF would be chosen. This |
e3c1296c QY |
367 | is especially useful if there are ECMP's available from the RPF lookup. |
368 | ||
369 | .. index:: show ip pim rp-info | |
370 | .. clicmd:: show ip pim rp-info | |
371 | ||
372 | Display information about RP's that are configured on this router. | |
373 | ||
374 | .. index:: show ip pim rpf | |
375 | .. clicmd:: show ip pim rpf | |
376 | ||
377 | Display information about currently being used S,G's and their RPF lookup | |
378 | information. Additionally display some statistics about what has been | |
379 | happening on the router. | |
380 | ||
381 | .. index:: show ip pim secondary | |
382 | .. clicmd:: show ip pim secondary | |
383 | ||
384 | Display information about an interface and all the secondary addresses | |
385 | associated with it. | |
386 | ||
387 | .. index:: show ip pim state | |
388 | .. clicmd:: show ip pim state | |
389 | ||
390 | Display information about known S,G's and incoming interface as well as the | |
d1e7591e | 391 | OIL and how they were chosen. |
e3c1296c | 392 | |
ca02cf8d | 393 | .. index:: show ip pim [vrf NAME] upstream [A.B.C.D [A.B.C.D]] [json] |
e3c1296c QY |
394 | .. clicmd:: show ip pim upstream |
395 | ||
ca02cf8d DS |
396 | Display upstream information about a S,G mroute. Allow the user to |
397 | specify sub Source and Groups that we are only interested in. | |
e3c1296c QY |
398 | |
399 | .. index:: show ip pim upstream-join-desired | |
400 | .. clicmd:: show ip pim upstream-join-desired | |
401 | ||
d1e7591e QY |
402 | Display upstream information for S,G's and if we desire to |
403 | join the multicast tree | |
e3c1296c QY |
404 | |
405 | .. index:: show ip pim upstream-rpf | |
406 | .. clicmd:: show ip pim upstream-rpf | |
407 | ||
408 | Display upstream information for S,G's and the RPF data associated with them. | |
409 | ||
410 | .. index:: show ip rpf | |
411 | .. clicmd:: show ip rpf | |
412 | ||
413 | Display the multicast RIB created in zebra. | |
414 | ||
f93128c1 MS |
415 | .. index:: mtrace A.B.C.D [A.B.C.D] |
416 | .. clicmd:: mtrace A.B.C.D [A.B.C.D] | |
14916095 | 417 | |
f93128c1 | 418 | Display multicast traceroute towards source, optionally for particular group. |
14916095 | 419 | |
e3c1296c QY |
420 | PIM Debug Commands |
421 | ================== | |
422 | ||
423 | The debugging subsystem for PIM behaves in accordance with how FRR handles | |
d1e7591e QY |
424 | debugging. You can specify debugging at the enable CLI mode as well as the |
425 | configure CLI mode. If you specify debug commands in the configuration cli | |
e3c1296c QY |
426 | mode, the debug commands can be persistent across restarts of the FRR pimd if |
427 | the config was written out. | |
428 | ||
14916095 MS |
429 | .. index:: debug igmp |
430 | .. clicmd:: debug igmp | |
431 | ||
432 | This turns on debugging for IGMP protocol activity. | |
433 | ||
434 | .. index:: debug mtrace | |
435 | .. clicmd:: debug mtrace | |
436 | ||
437 | This turns on debugging for mtrace protocol activity. | |
438 | ||
439 | .. index:: debug mroute | |
440 | .. clicmd:: debug mroute | |
441 | ||
442 | This turns on debugging for PIM interaction with kernel MFC cache. | |
443 | ||
e3c1296c QY |
444 | .. index:: debug pim events |
445 | .. clicmd:: debug pim events | |
446 | ||
447 | This turns on debugging for PIM system events. Especially timers. | |
448 | ||
449 | .. index:: debug pim nht | |
450 | .. clicmd:: debug pim nht | |
451 | ||
452 | This turns on debugging for PIM nexthop tracking. It will display | |
453 | information about RPF lookups and information about when a nexthop changes. | |
454 | ||
455 | .. index:: debug pim packet-dump | |
456 | .. clicmd:: debug pim packet-dump | |
457 | ||
458 | This turns on an extraordinary amount of data. Each pim packet sent and | |
459 | received is dumped for debugging purposes. This should be considered a | |
460 | developer only command. | |
461 | ||
462 | .. index:: debug pim packets | |
463 | .. clicmd:: debug pim packets | |
464 | ||
465 | This turns on information about packet generation for sending and about | |
466 | packet handling from a received packet. | |
467 | ||
468 | .. index:: debug pim trace | |
469 | .. clicmd:: debug pim trace | |
470 | ||
471 | This traces pim code and how it is running. | |
472 | ||
473 | .. index:: debug pim zebra | |
474 | .. clicmd:: debug pim zebra | |
475 | ||
d1e7591e | 476 | This gathers data about events from zebra that come up through the ZAPI. |
14916095 MS |
477 | |
478 | PIM Clear Commands | |
479 | ================== | |
480 | Clear commands reset various variables. | |
481 | ||
482 | .. index:: clear ip interfaces | |
483 | .. clicmd:: clear ip interfaces | |
484 | ||
485 | Reset interfaces. | |
486 | ||
487 | .. index:: clear ip igmp interfaces | |
488 | .. clicmd:: clear ip igmp interfaces | |
489 | ||
490 | Reset IGMP interfaces. | |
491 | ||
492 | .. index:: clear ip mroute | |
493 | .. clicmd:: clear ip mroute | |
494 | ||
495 | Reset multicast routes. | |
496 | ||
497 | .. index:: clear ip pim interfaces | |
498 | .. clicmd:: clear ip pim interfaces | |
499 | ||
500 | Reset PIM interfaces. | |
501 | ||
502 | .. index:: clear ip pim oil | |
503 | .. clicmd:: clear ip pim oil | |
504 | ||
505 | Rescan PIM OIL (output interface list). | |
745fc7a5 AK |
506 | |
507 | PIM EVPN configuration | |
508 | ====================== | |
e7a664c1 QY |
509 | To use PIM in the underlay for overlay BUM forwarding associate a multicast |
510 | group with the L2 VNI. The actual configuration is based on your distribution. | |
511 | Here is an ifupdown2 example:: | |
e2b5880e DS |
512 | |
513 | auto vx-10100 | |
514 | iface vx-10100 | |
e7a664c1 QY |
515 | vxlan-id 10100 |
516 | bridge-access 100 | |
517 | vxlan-local-tunnelip 27.0.0.11 | |
518 | vxlan-mcastgrp 239.1.1.100 | |
e2b5880e DS |
519 | |
520 | .. note:: | |
521 | ||
e7a664c1 QY |
522 | PIM will see the ``vxlan-mcastgrp`` configuration and auto configure state |
523 | to properly forward BUM traffic. | |
e2b5880e | 524 | |
e7a664c1 QY |
525 | PIM also needs to be configured in the underlay to allow the BUM MDT to be |
526 | setup. This is existing PIM configuration: | |
745fc7a5 | 527 | |
745fc7a5 AK |
528 | - Enable pim on the underlay L3 interface via the "ip pim" command. |
529 | - Configure RPs for the BUM multicast group range. | |
530 | - Ensure the PIM is enabled on the lo of the VTEPs and the RP. |