1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
|
Network Working Group B. Fenner
Request for Comments: 4601 AT&T Labs - Research
Obsoletes: 2362 M. Handley
Category: Standards Track UCL
H. Holbrook
Arastra
I. Kouvelas
Cisco
August 2006
Protocol Independent Multicast - Sparse Mode (PIM-SM):
Protocol Specification (Revised)
Status of This Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2006).
Abstract
This document specifies Protocol Independent Multicast - Sparse Mode
(PIM-SM). PIM-SM is a multicast routing protocol that can use the
underlying unicast routing information base or a separate multicast-
capable routing information base. It builds unidirectional shared
trees rooted at a Rendezvous Point (RP) per group, and optionally
creates shortest-path trees per source.
This document obsoletes RFC 2362, an Experimental version of PIM-SM.
Fenner, et al. Standards Track [Page 1]
^L
RFC 4601 PIM-SM Specification August 2006
Table of Contents
1. Introduction ....................................................5
2. Terminology .....................................................5
2.1. Definitions ................................................5
2.2. Pseudocode Notation ........................................7
3. PIM-SM Protocol Overview ........................................7
3.1. Phase One: RP Tree .........................................8
3.2. Phase Two: Register-Stop ...................................8
3.3. Phase Three: Shortest-Path Tree ............................9
3.4. Source-Specific Joins .....................................10
3.5. Source-Specific Prunes ....................................11
3.6. Multi-Access Transit LANs .................................11
3.7. RP Discovery ..............................................12
4. Protocol Specification .........................................12
4.1. PIM Protocol State ........................................13
4.1.1. General Purpose State ..............................14
4.1.2. (*,*,RP) State .....................................15
4.1.3. (*,G) State ........................................16
4.1.4. (S,G) State ........................................17
4.1.5. (S,G,rpt) State ....................................20
4.1.6. State Summarization Macros .........................21
4.2. Data Packet Forwarding Rules ..............................26
4.2.1. Last-Hop Switchover to the SPT .....................28
4.2.2. Setting and Clearing the (S,G) SPTbit ..............29
4.3. Designated Routers (DR) and Hello Messages ................30
4.3.1. Sending Hello Messages .............................30
4.3.2. DR Election ........................................32
4.3.3. Reducing Prune Propagation Delay on LANs ...........34
4.3.4. Maintaining Secondary Address Lists ................37
4.4. PIM Register Messages .....................................38
4.4.1. Sending Register Messages from the DR ..............38
4.4.2. Receiving Register Messages at the RP ..............43
4.5. PIM Join/Prune Messages ...................................45
4.5.1. Receiving (*,*,RP) Join/Prune Messages .............45
4.5.2. Receiving (*,G) Join/Prune Messages ................49
4.5.3. Receiving (S,G) Join/Prune Messages ................53
4.5.4. Receiving (S,G,rpt) Join/Prune Messages ............56
4.5.5. Sending (*,*,RP) Join/Prune Messages ...............62
4.5.6. Sending (*,G) Join/Prune Messages ..................66
4.5.7. Sending (S,G) Join/Prune Messages ..................71
4.5.8. (S,G,rpt) Periodic Messages ........................76
4.5.9. State Machine for (S,G,rpt) Triggered Messages .....77
4.5.10. Background: (*,*,RP) and (S,G,rpt) Interaction ....82
4.6. PIM Assert Messages .......................................83
4.6.1. (S,G) Assert Message State Machine .................83
4.6.2. (*,G) Assert Message State Machine .................91
4.6.3. Assert Metrics .....................................98
Fenner, et al. Standards Track [Page 2]
^L
RFC 4601 PIM-SM Specification August 2006
4.6.4. AssertCancel Messages ..............................99
4.6.5. Assert State Macros ...............................100
4.7. PIM Bootstrap and RP Discovery ...........................103
4.7.1. Group-to-RP Mapping ...............................104
4.7.2. Hash Function .....................................105
4.8. Source-Specific Multicast ................................106
4.8.1. Protocol Modifications for SSM Destination
Addresses .........................................106
4.8.2. PIM-SSM-Only Routers ..............................107
4.9. PIM Packet Formats .......................................108
4.9.1. Encoded Source and Group Address Formats ..........110
4.9.2. Hello Message Format ..............................113
4.9.3. Register Message Format ...........................116
4.9.4. Register-Stop Message Format ......................119
4.9.5. Join/Prune Message Format .........................119
4.9.5.1. Group Set Source List Rules ..............122
4.9.5.2. Group Set Fragmentation ..................126
4.9.6. Assert Message Format .............................126
4.10. PIM Timers ..............................................128
4.11. Timer Values ............................................129
5. IANA Considerations ...........................................135
5.1. PIM Address Family .......................................135
5.2. PIM Hello Options ........................................136
6. Security Considerations .......................................136
6.1. Attacks Based on Forged Messages .........................136
6.1.1. Forged Link-Local Messages ........................136
6.1.2. Forged Unicast Messages ...........................137
6.2. Non-Cryptographic Authentication Mechanisms ..............137
6.3. Authentication Using IPsec ...............................138
6.3.1. Protecting Link-Local Multicast Messages ..........138
6.3.2. Protecting Unicast Messages .......................139
6.3.2.1. Register Messages ........................139
6.3.2.2. Register-Stop Messages ...................139
6.4. Denial-of-Service Attacks ................................140
7. Acknowledgements ..............................................140
8. Normative References ..........................................141
9. Informative References ........................................141
Appendix A. PIM Multicast Border Router Behavior .................143
A.1. Sources External to the PIM-SM Domain ....................143
A.2. Sources Internal to the PIM-SM Domain ...................144
Appendix B. Index ................................................146
Fenner, et al. Standards Track [Page 3]
^L
RFC 4601 PIM-SM Specification August 2006
List of Figures
Figure 1. Per-(S,G) register state machine at a DR ................38
Figure 2. Downstream per-interface (*,*,RP) state machine .........46
Figure 3. Downstream per-interface (*,G) state machine ............50
Figure 4. Downstream per-interface (S,G) state machine ............53
Figure 5. Downstream per-interface (S,G,rpt) state machine ........57
Figure 6. Upstream (*,*,RP) state machine .........................62
Figure 7. Upstream (*,G) state machine ............................67
Figure 8. Upstream (S,G) state machine ............................71
Figure 9. Upstream (S,G,rpt) state machine for triggered
messages ................................................77
Figure 10. Per-interface (S,G) Assert State machine ...............84
Figure 11. Per-interface (*,G) Assert State machine ...............92
Fenner, et al. Standards Track [Page 4]
^L
RFC 4601 PIM-SM Specification August 2006
1. Introduction
This document specifies a protocol for efficiently routing multicast
groups that may span wide-area (and inter-domain) internets. This
protocol is called Protocol Independent Multicast - Sparse Mode
(PIM-SM) because, although it may use the underlying unicast routing
to provide reverse-path information for multicast tree building, it
is not dependent on any particular unicast routing protocol.
PIM-SM version 2 was originally specified in RFC 2117 and was revised
in RFC 2362, both Experimental RFCs. This document is intended to
obsolete RFC 2362, to correct a number of deficiencies that have been
identified with the way PIM-SM was previously specified, and to bring
PIM-SM onto the IETF Standards Track. As far as possible, this
document specifies the same protocol as RFC 2362 and only diverges
from the behavior intended by RFC 2362 when the previously specified
behavior was clearly incorrect. Routers implemented according to the
specification in this document will be able to interoperate
successfully with routers implemented according to RFC 2362.
2. Terminology
In this document, the key words "MUST", "MUST NOT", "REQUIRED",
"SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
and "OPTIONAL" are to be interpreted as described in RFC 2119 [1] and
indicate requirement levels for compliant PIM-SM implementations.
2.1. Definitions
The following terms have special significance for PIM-SM:
Rendezvous Point (RP):
An RP is a router that has been configured to be used as the
root of the non-source-specific distribution tree for a
multicast group. Join messages from receivers for a group are
sent towards the RP, and data from senders is sent to the RP so
that receivers can discover who the senders are and start to
receive traffic destined for the group.
Designated Router (DR):
A shared-media LAN like Ethernet may have multiple PIM-SM
routers connected to it. A single one of these routers, the
DR, will act on behalf of directly connected hosts with respect
to the PIM-SM protocol. A single DR is elected per interface
(LAN or otherwise) using a simple election process.
Fenner, et al. Standards Track [Page 5]
^L
RFC 4601 PIM-SM Specification August 2006
MRIB Multicast Routing Information Base. This is the multicast
topology table, which is typically derived from the unicast
routing table, or routing protocols such as Multiprotocol BGP
(MBGP) that carry multicast-specific topology information. In
PIM-SM, the MRIB is used to decide where to send Join/Prune
messages. A secondary function of the MRIB is to provide
routing metrics for destination addresses; these metrics are
used when sending and processing Assert messages.
RPF Neighbor
RPF stands for "Reverse Path Forwarding". The RPF Neighbor of
a router with respect to an address is the neighbor that the
MRIB indicates should be used to forward packets to that
address. In the case of a PIM-SM multicast group, the RPF
neighbor is the router that a Join message for that group would
be directed to, in the absence of modifying Assert state.
TIB Tree Information Base. This is the collection of state at a
PIM router that has been created by receiving PIM Join/Prune
messages, PIM Assert messages, and Internet Group Management
Protocol (IGMP) or Multicast Listener Discovery (MLD)
information from local hosts. It essentially stores the state
of all multicast distribution trees at that router.
MFIB Multicast Forwarding Information Base. The TIB holds all the
state that is necessary to forward multicast packets at a
router. However, although this specification defines
forwarding in terms of the TIB, to actually forward packets
using the TIB is very inefficient. Instead, a real router
implementation will normally build an efficient MFIB from the
TIB state to perform forwarding. How this is done is
implementation-specific and is not discussed in this document.
Upstream
Towards the root of the tree. The root of tree may be either
the source or the RP, depending on the context.
Downstream
Away from the root of the tree.
GenID Generation Identifier, used to detect reboots.
PMBR PIM Multicast Border Router, joining a PIM domain with another
multicast domain.
Fenner, et al. Standards Track [Page 6]
^L
RFC 4601 PIM-SM Specification August 2006
2.2. Pseudocode Notation
We use set notation in several places in this specification.
A (+) B is the union of two sets, A and B.
A (-) B is the elements of set A that are not in set B.
NULL is the empty set or list.
In addition, we use C-like syntax:
= denotes assignment of a variable.
== denotes a comparison for equality.
!= denotes a comparison for inequality.
Braces { and } are used for grouping.
3. PIM-SM Protocol Overview
This section provides an overview of PIM-SM behavior. It is intended
as an introduction to how PIM-SM works, and it is NOT definitive.
For the definitive specification, see Section 4.
PIM relies on an underlying topology-gathering protocol to populate a
routing table with routes. This routing table is called the
Multicast Routing Information Base (MRIB). The routes in this table
may be taken directly from the unicast routing table, or they may be
different and provided by a separate routing protocol such as MBGP
[10]. Regardless of how it is created, the primary role of the MRIB
in the PIM protocol is to provide the next-hop router along a
multicast-capable path to each destination subnet. The MRIB is used
to determine the next-hop neighbor to which any PIM Join/Prune
message is sent. Data flows along the reverse path of the Join
messages. Thus, in contrast to the unicast RIB, which specifies the
next hop that a data packet would take to get to some subnet, the
MRIB gives reverse-path information and indicates the path that a
multicast data packet would take from its origin subnet to the router
that has the MRIB.
Like all multicast routing protocols that implement the service model
from RFC 1112 [3], PIM-SM must be able to route data packets from
sources to receivers without either the sources or receivers knowing
a priori of the existence of the others. This is essentially done in
three phases, although as senders and receivers may come and go at
any time, all three phases may occur simultaneously.
Fenner, et al. Standards Track [Page 7]
^L
RFC 4601 PIM-SM Specification August 2006
3.1. Phase One: RP Tree
In phase one, a multicast receiver expresses its interest in
receiving traffic destined for a multicast group. Typically, it does
this using IGMP [2] or MLD [4], but other mechanisms might also serve
this purpose. One of the receiver's local routers is elected as the
Designated Router (DR) for that subnet. On receiving the receiver's
expression of interest, the DR then sends a PIM Join message towards
the RP for that multicast group. This Join message is known as a
(*,G) Join because it joins group G for all sources to that group.
The (*,G) Join travels hop-by-hop towards the RP for the group, and
in each router it passes through, multicast tree state for group G is
instantiated. Eventually, the (*,G) Join either reaches the RP or
reaches a router that already has (*,G) Join state for that group.
When many receivers join the group, their Join messages converge on
the RP and form a distribution tree for group G that is rooted at the
RP. This is known as the RP Tree (RPT), and is also known as the
shared tree because it is shared by all sources sending to that
group. Join messages are resent periodically so long as the receiver
remains in the group. When all receivers on a leaf-network leave the
group, the DR will send a PIM (*,G) Prune message towards the RP for
that multicast group. However, if the Prune message is not sent for
any reason, the state will eventually time out.
A multicast data sender just starts sending data destined for a
multicast group. The sender's local router (DR) takes those data
packets, unicast-encapsulates them, and sends them directly to the
RP. The RP receives these encapsulated data packets, decapsulates
them, and forwards them onto the shared tree. The packets then
follow the (*,G) multicast tree state in the routers on the RP Tree,
being replicated wherever the RP Tree branches, and eventually
reaching all the receivers for that multicast group. The process of
encapsulating data packets to the RP is called registering, and the
encapsulation packets are known as PIM Register packets.
At the end of phase one, multicast traffic is flowing encapsulated to
the RP, and then natively over the RP tree to the multicast
receivers.
3.2. Phase Two: Register-Stop
Register-encapsulation of data packets is inefficient for two
reasons:
o Encapsulation and decapsulation may be relatively expensive
operations for a router to perform, depending on whether or not the
router has appropriate hardware for these tasks.
Fenner, et al. Standards Track [Page 8]
^L
RFC 4601 PIM-SM Specification August 2006
o Traveling all the way to the RP, and then back down the shared tree
may result in the packets traveling a relatively long distance to
reach receivers that are close to the sender. For some
applications, this increased latency or bandwidth consumption is
undesirable.
Although Register-encapsulation may continue indefinitely, for these
reasons, the RP will normally choose to switch to native forwarding.
To do this, when the RP receives a register-encapsulated data packet
from source S on group G, it will normally initiate an (S,G) source-
specific Join towards S. This Join message travels hop-by-hop
towards S, instantiating (S,G) multicast tree state in the routers
along the path. (S,G) multicast tree state is used only to forward
packets for group G if those packets come from source S. Eventually
the Join message reaches S's subnet or a router that already has
(S,G) multicast tree state, and then packets from S start to flow
following the (S,G) tree state towards the RP. These data packets
may also reach routers with (*,G) state along the path towards the
RP; if they do, they can shortcut onto the RP tree at this point.
While the RP is in the process of joining the source-specific tree
for S, the data packets will continue being encapsulated to the RP.
When packets from S also start to arrive natively at the RP, the RP
will be receiving two copies of each of these packets. At this
point, the RP starts to discard the encapsulated copy of these
packets, and it sends a Register-Stop message back to S's DR to
prevent the DR from unnecessarily encapsulating the packets.
At the end of phase 2, traffic will be flowing natively from S along
a source-specific tree to the RP, and from there along the shared
tree to the receivers. Where the two trees intersect, traffic may
transfer from the source-specific tree to the RP tree and thus avoid
taking a long detour via the RP.
Note that a sender may start sending before or after a receiver joins
the group, and thus phase two may happen before the shared tree to
the receiver is built.
3.3. Phase Three: Shortest-Path Tree
Although having the RP join back towards the source removes the
encapsulation overhead, it does not completely optimize the
forwarding paths. For many receivers, the route via the RP may
involve a significant detour when compared with the shortest path
from the source to the receiver.
Fenner, et al. Standards Track [Page 9]
^L
RFC 4601 PIM-SM Specification August 2006
To obtain lower latencies or more efficient bandwidth utilization, a
router on the receiver's LAN, typically the DR, may optionally
initiate a transfer from the shared tree to a source-specific
shortest-path tree (SPT). To do this, it issues an (S,G) Join
towards S. This instantiates state in the routers along the path to
S. Eventually, this join either reaches S's subnet or reaches a
router that already has (S,G) state. When this happens, data packets
from S start to flow following the (S,G) state until they reach the
receiver.
At this point, the receiver (or a router upstream of the receiver)
will be receiving two copies of the data: one from the SPT and one
from the RPT. When the first traffic starts to arrive from the SPT,
the DR or upstream router starts to drop the packets for G from S
that arrive via the RP tree. In addition, it sends an (S,G) Prune
message towards the RP. This is known as an (S,G,rpt) Prune. The
Prune message travels hop-by-hop, instantiating state along the path
towards the RP indicating that traffic from S for G should NOT be
forwarded in this direction. The prune is propagated until it
reaches the RP or a router that still needs the traffic from S for
other receivers.
By now, the receiver will be receiving traffic from S along the
shortest-path tree between the receiver and S. In addition, the RP
is receiving the traffic from S, but this traffic is no longer
reaching the receiver along the RP tree. As far as the receiver is
concerned, this is the final distribution tree.
3.4. Source-Specific Joins
IGMPv3 permits a receiver to join a group and specify that it only
wants to receive traffic for a group if that traffic comes from a
particular source. If a receiver does this, and no other receiver on
the LAN requires all the traffic for the group, then the DR may omit
performing a (*,G) join to set up the shared tree, and instead issue
a source-specific (S,G) join only.
The range of multicast addresses from 232.0.0.0 to 232.255.255.255 is
currently set aside for source-specific multicast in IPv4. For
groups in this range, receivers should only issue source-specific
IGMPv3 joins. If a PIM router receives a non-source-specific join
for a group in this range, it should ignore it, as described in
Section 4.8.
Fenner, et al. Standards Track [Page 10]
^L
RFC 4601 PIM-SM Specification August 2006
3.5. Source-Specific Prunes
IGMPv3 also permits a receiver to join a group and to specify that it
only wants to receive traffic for a group if that traffic does not
come from a specific source or sources. In this case, the DR will
perform a (*,G) join as normal, but may combine this with an
(S,G,rpt) prune for each of the sources the receiver does not wish to
receive.
3.6. Multi-Access Transit LANs
The overview so far has concerned itself with point-to-point transit
links. However, using multi-access LANs such as Ethernet for transit
is not uncommon. This can cause complications for three reasons:
o Two or more routers on the LAN may issue (*,G) Joins to different
upstream routers on the LAN because they have inconsistent MRIB
entries regarding how to reach the RP. Both paths on the RP tree
will be set up, causing two copies of all the shared tree traffic
to appear on the LAN.
o Two or more routers on the LAN may issue (S,G) Joins to different
upstream routers on the LAN because they have inconsistent MRIB
entries regarding how to reach source S. Both paths on the source-
specific tree will be set up, causing two copies of all the traffic
from S to appear on the LAN.
o A router on the LAN may issue a (*,G) Join to one upstream router
on the LAN, and another router on the LAN may issue an (S,G) Join
to a different upstream router on the same LAN. Traffic from S may
reach the LAN over both the RPT and the SPT. If the receiver
behind the downstream (*,G) router doesn't issue an (S,G,rpt)
prune, then this condition would persist.
All of these problems are caused by there being more than one
upstream router with join state for the group or source-group pair.
PIM does not prevent such duplicate joins from occurring; instead,
when duplicate data packets appear on the LAN from different routers,
these routers notice this and then elect a single forwarder. This
election is performed using PIM Assert messages, which resolve the
problem in favor of the upstream router that has (S,G) state; or, if
neither or both router has (S,G) state, then the problem is resolved
in favor of the router with the best metric to the RP for RP trees,
or the best metric to the source to source-specific trees.
These Assert messages are also received by the downstream routers on
the LAN, and these cause subsequent Join messages to be sent to the
upstream router that won the Assert.
Fenner, et al. Standards Track [Page 11]
^L
RFC 4601 PIM-SM Specification August 2006
3.7. RP Discovery
PIM-SM routers need to know the address of the RP for each group for
which they have (*,G) state. This address is obtained automatically
(e.g., embedded-RP), through a bootstrap mechanism, or through static
configuration.
One dynamic way to do this is to use the Bootstrap Router (BSR)
mechanism [11]. One router in each PIM domain is elected the
Bootstrap Router through a simple election process. All the routers
in the domain that are configured to be candidates to be RPs
periodically unicast their candidacy to the BSR. From the
candidates, the BSR picks an RP-set, and periodically announces this
set in a Bootstrap message. Bootstrap messages are flooded hop-by-
hop throughout the domain until all routers in the domain know the
RP-Set.
To map a group to an RP, a router hashes the group address into the
RP-set using an order-preserving hash function (one that minimizes
changes if the RP-Set changes). The resulting RP is the one that it
uses as the RP for that group.
4. Protocol Specification
The specification of PIM-SM is broken into several parts:
o Section 4.1 details the protocol state stored.
o Section 4.2 specifies the data packet forwarding rules.
o Section 4.3 specifies Designated Router (DR) election and the rules
for sending and processing Hello messages.
o Section 4.4 specifies the PIM Register generation and processing
rules.
o Section 4.5 specifies the PIM Join/Prune generation and processing
rules.
o Section 4.6 specifies the PIM Assert generation and processing
rules.
o Section 4.7 specifies the RP discovery mechanisms.
o The subset of PIM required to support Source-Specific Multicast,
PIM-SSM, is described in Section 4.8.
o PIM packet formats are specified in Section 4.9.
Fenner, et al. Standards Track [Page 12]
^L
RFC 4601 PIM-SM Specification August 2006
o A summary of PIM-SM timers and their default values is given in
Section 4.10.
o Appendix A specifies the PIM Multicast Border Router behavior.
4.1. PIM Protocol State
This section specifies all the protocol state that a PIM
implementation should maintain in order to function correctly. We
term this state the Tree Information Base (TIB), as it holds the
state of all the multicast distribution trees at this router. In
this specification, we define PIM mechanisms in terms of the TIB.
However, only a very simple implementation would actually implement
packet forwarding operations in terms of this state. Most
implementations will use this state to build a multicast forwarding
table, which would then be updated when the relevant state in the TIB
changes.
Although we specify precisely the state to be kept, this does not
mean that an implementation of PIM-SM needs to hold the state in this
form. This is actually an abstract state definition, which is needed
in order to specify the router's behavior. A PIM-SM implementation
is free to hold whatever internal state it requires and will still be
conformant with this specification so long as it results in the same
externally visible protocol behavior as an abstract router that holds
the following state.
We divide TIB state into four sections:
(*,*,RP) state
State that maintains per-RP trees, for all groups served by a
given RP.
(*,G) state
State that maintains the RP tree for G.
(S,G) state
State that maintains a source-specific tree for source S and
group G.
(S,G,rpt) state
State that maintains source-specific information about source S
on the RP tree for G. For example, if a source is being
received on the source-specific tree, it will normally have been
pruned off the RP tree. This prune state is (S,G,rpt) state.
Fenner, et al. Standards Track [Page 13]
^L
RFC 4601 PIM-SM Specification August 2006
The state that should be kept is described below. Of course,
implementations will only maintain state when it is relevant to
forwarding operations; for example, the "NoInfo" state might be
assumed from the lack of other state information rather than being
held explicitly.
4.1.1. General Purpose State
A router holds the following non-group-specific state:
For each interface:
o Effective Override Interval
o Effective Propagation Delay
o Suppression state: One of {"Enable", "Disable"}
Neighbor State:
For each neighbor:
o Information from neighbor's Hello
o Neighbor's GenID.
o Neighbor Liveness Timer (NLT)
Designated Router (DR) State:
o Designated Router's IP Address
o DR's DR Priority
The Effective Override Interval, the Effective Propagation Delay and
the Interface suppression state are described in Section 4.3.3.
Designated Router state is described in Section 4.3.
Fenner, et al. Standards Track [Page 14]
^L
RFC 4601 PIM-SM Specification August 2006
4.1.2. (*,*,RP) State
For every RP, a router keeps the following state:
(*,*,RP) state:
For each interface:
PIM (*,*,RP) Join/Prune State:
o State: One of {"NoInfo" (NI), "Join" (J), "Prune-
Pending" (PP)}
o Prune-Pending Timer (PPT)
o Join/Prune Expiry Timer (ET)
Not interface specific:
Upstream (*,*,RP) Join/Prune State:
o State: One of {"NotJoined(*,*,RP)",
"Joined(*,*,RP)"}
o Upstream Join/Prune Timer (JT)
o Last RPF Neighbor towards RP that was used
PIM (*,*,RP) Join/Prune state is the result of receiving PIM (*,*,RP)
Join/Prune messages on this interface and is specified in Section
4.5.1.
The upstream (*,*,RP) Join/Prune State reflects the state of the
upstream (*,*,RP) state machine described in Section 4.5.5.
The upstream (*,*,RP) Join/Prune Timer is used to send out periodic
Join(*,*,RP) messages, and to override Prune(*,*,RP) messages from
peers on an upstream LAN interface.
The last RPF neighbor towards the RP is stored because if the MRIB
changes, then the RPF neighbor towards the RP may change. If it does
so, then we need to trigger a new Join(*,*,RP) to the new upstream
neighbor and a Prune(*,*,RP) to the old upstream neighbor.
Similarly, if a router detects through a changed GenID in a Hello
message that the upstream neighbor towards the RP has rebooted, then
it should re-instantiate state by sending a Join(*,*,RP). These
mechanisms are specified in Section 4.5.5.
Fenner, et al. Standards Track [Page 15]
^L
RFC 4601 PIM-SM Specification August 2006
4.1.3. (*,G) State
For every group G, a router keeps the following state:
(*,G) state:
For each interface:
Local Membership:
State: One of {"NoInfo", "Include"}
PIM (*,G) Join/Prune State:
o State: One of {"NoInfo" (NI), "Join" (J), "Prune-
Pending" (PP)}
o Prune-Pending Timer (PPT)
o Join/Prune Expiry Timer (ET)
(*,G) Assert Winner State
o State: One of {"NoInfo" (NI), "I lost Assert" (L),
"I won Assert" (W)}
o Assert Timer (AT)
o Assert winner's IP Address (AssertWinner)
o Assert winner's Assert Metric (AssertWinnerMetric)
Not interface specific:
Upstream (*,G) Join/Prune State:
o State: One of {"NotJoined(*,G)", "Joined(*,G)"}
o Upstream Join/Prune Timer (JT)
o Last RP Used
o Last RPF Neighbor towards RP that was used
Local membership is the result of the local membership mechanism
(such as IGMP or MLD) running on that interface. It need not be kept
if this router is not the DR on that interface unless this router won
a (*,G) assert on this interface for this group, although
implementations may optionally keep this state in case they become
the DR or assert winner. We recommend storing this information if
Fenner, et al. Standards Track [Page 16]
^L
RFC 4601 PIM-SM Specification August 2006
possible, as it reduces latency converging to stable operating
conditions after a failure causing a change of DR. This information
is used by the pim_include(*,G) macro described in Section 4.1.6.
PIM (*,G) Join/Prune state is the result of receiving PIM (*,G)
Join/Prune messages on this interface and is specified in Section
4.5.2. The state is used by the macros that calculate the outgoing
interface list in Section 4.1.6, and in the JoinDesired(*,G) macro
(defined in Section 4.5.6) that is used in deciding whether a
Join(*,G) should be sent upstream.
(*,G) Assert Winner state is the result of sending or receiving (*,G)
Assert messages on this interface. It is specified in Section 4.6.2.
The upstream (*,G) Join/Prune State reflects the state of the
upstream (*,G) state machine described in Section 4.5.6.
The upstream (*,G) Join/Prune Timer is used to send out periodic
Join(*,G) messages, and to override Prune(*,G) messages from peers on
an upstream LAN interface.
The last RP used must be stored because if the RP-Set changes
(Section 4.7), then state must be torn down and rebuilt for groups
whose RP changes.
The last RPF neighbor towards the RP is stored because if the MRIB
changes, then the RPF neighbor towards the RP may change. If it does
so, then we need to trigger a new Join(*,G) to the new upstream
neighbor and a Prune(*,G) to the old upstream neighbor. Similarly,
if a router detects through a changed GenID in a Hello message that
the upstream neighbor towards the RP has rebooted, then it should
re-instantiate state by sending a Join(*,G). These mechanisms are
specified in Section 4.5.6.
4.1.4. (S,G) State
For every source/group pair (S,G), a router keeps the following
state:
(S,G) state:
For each interface:
Local Membership:
State: One of {"NoInfo", "Include"}
Fenner, et al. Standards Track [Page 17]
^L
RFC 4601 PIM-SM Specification August 2006
PIM (S,G) Join/Prune State:
o State: One of {"NoInfo" (NI), "Join" (J), "Prune-
Pending" (PP)}
o Prune-Pending Timer (PPT)
o Join/Prune Expiry Timer (ET)
(S,G) Assert Winner State
o State: One of {"NoInfo" (NI), "I lost Assert" (L),
"I won Assert" (W)}
o Assert Timer (AT)
o Assert winner's IP Address (AssertWinner)
o Assert winner's Assert Metric (AssertWinnerMetric)
Not interface specific:
Upstream (S,G) Join/Prune State:
o State: One of {"NotJoined(S,G)", "Joined(S,G)"}
o Upstream (S,G) Join/Prune Timer (JT)
o Last RPF Neighbor towards S that was used
o SPTbit (indicates (S,G) state is active)
o (S,G) Keepalive Timer (KAT)
Additional (S,G) state at the DR:
o Register state: One of {"Join" (J), "Prune" (P),
"Join-Pending" (JP), "NoInfo" (NI)}
o Register-Stop timer
Additional (S,G) state at the RP:
o PMBR: the first PMBR to send a Register for this
source with the Border bit set.
Fenner, et al. Standards Track [Page 18]
^L
RFC 4601 PIM-SM Specification August 2006
Local membership is the result of the local source-specific
membership mechanism (such as IGMP version 3) running on that
interface and specifying that this particular source should be
included. As stored here, this state is the resulting state after
any IGMPv3 inconsistencies have been resolved. It need not be kept
if this router is not the DR on that interface unless this router won
a (S,G) assert on this interface for this group. However, we
recommend storing this information if possible, as it reduces latency
converging to stable operating conditions after a failure causing a
change of DR. This information is used by the pim_include(S,G) macro
described in Section 4.1.6.
PIM (S,G) Join/Prune state is the result of receiving PIM (S,G)
Join/Prune messages on this interface and is specified in Section
4.5.2. The state is used by the macros that calculate the outgoing
interface list in Section 4.1.6, and in the JoinDesired(S,G) macro
(defined in Section 4.5.7) that is used in deciding whether a
Join(S,G) should be sent upstream.
(S,G) Assert Winner state is the result of sending or receiving (S,G)
Assert messages on this interface. It is specified in Section 4.6.1.
The upstream (S,G) Join/Prune State reflects the state of the
upstream (S,G) state machine described in Section 4.5.7.
The upstream (S,G) Join/Prune Timer is used to send out periodic
Join(S,G) messages, and to override Prune(S,G) messages from peers on
an upstream LAN interface.
The last RPF neighbor towards S is stored because if the MRIB
changes, then the RPF neighbor towards S may change. If it does so,
then we need to trigger a new Join(S,G) to the new upstream neighbor
and a Prune(S,G) to the old upstream neighbor. Similarly, if the
router detects through a changed GenID in a Hello message that the
upstream neighbor towards S has rebooted, then it should re-
instantiate state by sending a Join(S,G). These mechanisms are
specified in Section 4.5.7.
The SPTbit is used to indicate whether forwarding is taking place on
the (S,G) Shortest Path Tree (SPT) or on the (*,G) tree. A router
can have (S,G) state and still be forwarding on (*,G) state during
the interval when the source-specific tree is being constructed.
When SPTbit is FALSE, only (*,G) forwarding state is used to forward
packets from S to G. When SPTbit is TRUE, both (*,G) and (S,G)
forwarding state are used.
Fenner, et al. Standards Track [Page 19]
^L
RFC 4601 PIM-SM Specification August 2006
The (S,G) Keepalive Timer is updated by data being forwarded using
this (S,G) forwarding state. It is used to keep (S,G) state alive in
the absence of explicit (S,G) Joins. Amongst other things, this is
necessary for the so-called "turnaround rules" -- when the RP uses
(S,G) joins to stop encapsulation, and then (S,G) prunes to prevent
traffic from unnecessarily reaching the RP.
On a DR, the (S,G) Register State is used to keep track of whether to
encapsulate data to the RP on the Register Tunnel; the (S,G)
Register-Stop timer tracks how long before encapsulation begins again
for a given (S,G).
On an RP, the PMBR value must be cleared when the Keepalive Timer
expires.
4.1.5. (S,G,rpt) State
For every source/group pair (S,G) for which a router also has (*,G)
state, it also keeps the following state:
(S,G,rpt) state:
For each interface:
Local Membership:
State: One of {"NoInfo", "Exclude"}
PIM (S,G,rpt) Join/Prune State:
o State: One of {"NoInfo", "Pruned", "Prune-
Pending"}
o Prune-Pending Timer (PPT)
o Join/Prune Expiry Timer (ET)
Not interface specific:
Upstream (S,G,rpt) Join/Prune State:
o State: One of {"RPTNotJoined(G)",
"NotPruned(S,G,rpt)", "Pruned(S,G,rpt)"}
o Override Timer (OT)
Local membership is the result of the local source-specific
membership mechanism (such as IGMPv3) running on that interface and
specifying that although there is (*,G) Include state, this
Fenner, et al. Standards Track [Page 20]
^L
RFC 4601 PIM-SM Specification August 2006
particular source should be excluded. As stored here, this state is
the resulting state after any IGMPv3 inconsistencies between LAN
members have been resolved. It need not be kept if this router is
not the DR on that interface unless this router won a (*,G) assert on
this interface for this group. However, we recommend storing this
information if possible, as it reduces latency converging to stable
operating conditions after a failure causing a change of DR. This
information is used by the pim_exclude(S,G) macro described in
Section 4.1.6.
PIM (S,G,rpt) Join/Prune state is the result of receiving PIM
(S,G,rpt) Join/Prune messages on this interface and is specified in
Section 4.5.4. The state is used by the macros that calculate the
outgoing interface list in Section 4.1.6, and in the rules for adding
Prune(S,G,rpt) messages to Join(*,G) messages specified in Section
4.5.8.
The upstream (S,G,rpt) Join/Prune state is used along with the
Override Timer to send the correct override messages in response to
Join/Prune messages sent by upstream peers on a LAN. This state and
behavior are specified in Section 4.5.9.
4.1.6. State Summarization Macros
Using this state, we define the following "macro" definitions, which
we will use in the descriptions of the state machines and pseudocode
in the following sections.
The most important macros are those that define the outgoing
interface list (or "olist") for the relevant state. An olist can be
"immediate" if it is built directly from the state of the relevant
type. For example, the immediate_olist(S,G) is the olist that would
be built if the router only had (S,G) state and no (*,G) or (S,G,rpt)
state. In contrast, the "inherited" olist inherits state from other
types. For example, the inherited_olist(S,G) is the olist that is
relevant for forwarding a packet from S to G using both source-
specific and group-specific state.
There is no immediate_olist(S,G,rpt) as (S,G,rpt) state is negative
state; it removes interfaces in the (*,G) olist from the olist that
is actually used to forward traffic. The inherited_olist(S,G,rpt) is
therefore the olist that would be used for a packet from S to G
forwarding on the RP tree. It is a strict subset of
(immediate_olist(*,*,RP) (+) immediate_olist(*,G)).
Generally speaking, the inherited olists are used for forwarding, and
the immediate_olists are used to make decisions about state
maintenance.
Fenner, et al. Standards Track [Page 21]
^L
RFC 4601 PIM-SM Specification August 2006
immediate_olist(*,*,RP) =
joins(*,*,RP)
immediate_olist(*,G) =
joins(*,G) (+) pim_include(*,G) (-) lost_assert(*,G)
immediate_olist(S,G) =
joins(S,G) (+) pim_include(S,G) (-) lost_assert(S,G)
inherited_olist(S,G,rpt) =
( joins(*,*,RP(G)) (+) joins(*,G) (-) prunes(S,G,rpt) )
(+) ( pim_include(*,G) (-) pim_exclude(S,G))
(-) ( lost_assert(*,G) (+) lost_assert(S,G,rpt) )
inherited_olist(S,G) =
inherited_olist(S,G,rpt) (+)
joins(S,G) (+) pim_include(S,G) (-) lost_assert(S,G)
The macros pim_include(*,G) and pim_include(S,G) indicate the
interfaces to which traffic might be forwarded because of hosts that
are local members on that interface. Note that normally only the DR
cares about local membership, but when an assert happens, the assert
winner takes over responsibility for forwarding traffic to local
members that have requested traffic on a group or source/group pair.
pim_include(*,G) =
{ all interfaces I such that:
( ( I_am_DR( I ) AND lost_assert(*,G,I) == FALSE )
OR AssertWinner(*,G,I) == me )
AND local_receiver_include(*,G,I) }
pim_include(S,G) =
{ all interfaces I such that:
( (I_am_DR( I ) AND lost_assert(S,G,I) == FALSE )
OR AssertWinner(S,G,I) == me )
AND local_receiver_include(S,G,I) }
pim_exclude(S,G) =
{ all interfaces I such that:
( (I_am_DR( I ) AND lost_assert(*,G,I) == FALSE )
OR AssertWinner(*,G,I) == me )
AND local_receiver_exclude(S,G,I) }
The clause "local_receiver_include(S,G,I)" is true if the IGMP/MLD
module or other local membership mechanism has determined that local
members on interface I desire to receive traffic sent specifically by
S to G. "local_receiver_include(*,G,I)" is true if the IGMP/MLD
module or other local membership mechanism has determined that local
Fenner, et al. Standards Track [Page 22]
^L
RFC 4601 PIM-SM Specification August 2006
members on interface I desire to receive all traffic sent to G
(possibly excluding traffic from a specific set of sources).
"local_receiver_exclude(S,G,I) is true if
"local_receiver_include(*,G,I)" is true but none of the local members
desire to receive traffic from S.
The set "joins(*,*,RP)" is the set of all interfaces on which the
router has received (*,*,RP) Joins:
joins(*,*,RP) =
{ all interfaces I such that
DownstreamJPState(*,*,RP,I) is either Join or
Prune-Pending }
DownstreamJPState(*,*,RP,I) is the state of the finite state machine
in Section 4.5.1.
The set "joins(*,G)" is the set of all interfaces on which the router
has received (*,G) Joins:
joins(*,G) =
{ all interfaces I such that
DownstreamJPState(*,G,I) is either Join or Prune-Pending }
DownstreamJPState(*,G,I) is the state of the finite state machine in
Section 4.5.2.
The set "joins(S,G)" is the set of all interfaces on which the router
has received (S,G) Joins:
joins(S,G) =
{ all interfaces I such that
DownstreamJPState(S,G,I) is either Join or Prune-Pending }
DownstreamJPState(S,G,I) is the state of the finite state machine in
Section 4.5.3.
The set "prunes(S,G,rpt)" is the set of all interfaces on which the
router has received (*,G) joins and (S,G,rpt) prunes.
prunes(S,G,rpt) =
{ all interfaces I such that
DownstreamJPState(S,G,rpt,I) is Prune or PruneTmp }
DownstreamJPState(S,G,rpt,I) is the state of the finite state machine
in Section 4.5.4.
Fenner, et al. Standards Track [Page 23]
^L
RFC 4601 PIM-SM Specification August 2006
The set "lost_assert(*,G)" is the set of all interfaces on which the
router has received (*,G) joins but has lost a (*,G) assert. The
macro lost_assert(*,G,I) is defined in Section 4.6.5.
lost_assert(*,G) =
{ all interfaces I such that
lost_assert(*,G,I) == TRUE }
The set "lost_assert(S,G,rpt)" is the set of all interfaces on which
the router has received (*,G) joins but has lost an (S,G) assert.
The macro lost_assert(S,G,rpt,I) is defined in Section 4.6.5.
lost_assert(S,G,rpt) =
{ all interfaces I such that
lost_assert(S,G,rpt,I) == TRUE }
The set "lost_assert(S,G)" is the set of all interfaces on which the
router has received (S,G) joins but has lost an (S,G) assert. The
macro lost_assert(S,G,I) is defined in Section 4.6.5.
lost_assert(S,G) =
{ all interfaces I such that
lost_assert(S,G,I) == TRUE }
The following pseudocode macro definitions are also used in many
places in the specification. Basically, RPF' is the RPF neighbor
towards an RP or source unless a PIM-Assert has overridden the normal
choice of neighbor.
neighbor RPF'(*,G) {
if ( I_Am_Assert_Loser(*, G, RPF_interface(RP(G))) ) {
return AssertWinner(*, G, RPF_interface(RP(G)) )
} else {
return NBR( RPF_interface(RP(G)), MRIB.next_hop( RP(G) ) )
}
}
neighbor RPF'(S,G,rpt) {
if( I_Am_Assert_Loser(S, G, RPF_interface(RP(G)) ) ) {
return AssertWinner(S, G, RPF_interface(RP(G)) )
} else {
return RPF'(*,G)
}
}
Fenner, et al. Standards Track [Page 24]
^L
RFC 4601 PIM-SM Specification August 2006
neighbor RPF'(S,G) {
if ( I_Am_Assert_Loser(S, G, RPF_interface(S) )) {
return AssertWinner(S, G, RPF_interface(S) )
} else {
return NBR( RPF_interface(S), MRIB.next_hop( S ) )
}
}
RPF'(*,G) and RPF'(S,G) indicate the neighbor from which data packets
should be coming and to which joins should be sent on the RP tree and
SPT, respectively.
RPF'(S,G,rpt) is basically RPF'(*,G) modified by the result of an
Assert(S,G) on RPF_interface(RP(G)). In such a case, packets from S
will be originating from a different router than RPF'(*,G). If we
only have active (*,G) Join state, we need to accept packets from
RPF'(S,G,rpt) and add a Prune(S,G,rpt) to the periodic Join(*,G)
messages that we send to RPF'(*,G) (see Section 4.5.8).
The function MRIB.next_hop( S ) returns an address of the next-hop
PIM neighbor toward the host S, as indicated by the current MRIB. If
S is directly adjacent, then MRIB.next_hop( S ) returns NULL. At the
RP for G, MRIB.next_hop( RP(G)) returns NULL.
The function NBR( I, A ) uses information gathered through PIM Hello
messages to map the IP address A of a directly connected PIM neighbor
router on interface I to the primary IP address of the same router
(Section 4.3.4). The primary IP address of a neighbor is the address
that it uses as the source of its PIM Hello messages. Note that a
neighbor's IP address may be non-unique within the PIM neighbor
database due to scope issues. The address must, however, be unique
amongst the addresses of all the PIM neighbors on a specific
interface.
I_Am_Assert_Loser(S, G, I) is true if the Assert state machine (in
Section 4.6.1) for (S,G) on Interface I is in "I am Assert Loser"
state.
I_Am_Assert_Loser(*, G, I) is true if the Assert state machine (in
Section 4.6.2) for (*,G) on Interface I is in "I am Assert Loser"
state.
Fenner, et al. Standards Track [Page 25]
^L
RFC 4601 PIM-SM Specification August 2006
4.2. Data Packet Forwarding Rules
The PIM-SM packet forwarding rules are defined below in pseudocode.
iif is the incoming interface of the packet.
S is the source address of the packet.
G is the destination address of the packet (group address).
RP is the address of the Rendezvous Point for this group.
RPF_interface(S) is the interface the MRIB indicates would be used
to route packets to S.
RPF_interface(RP) is the interface the MRIB indicates would be
used to route packets to RP, except at the RP when it is the
decapsulation interface (the "virtual" interface on which register
packets are received).
First, we restart (or start) the Keepalive Timer if the source is on
a directly connected subnet.
Second, we check to see if the SPTbit should be set because we've now
switched from the RP tree to the SPT.
Next, we check to see whether the packet should be accepted based on
TIB state and the interface that the packet arrived on.
If the packet should be forwarded using (S,G) state, we then build an
outgoing interface list for the packet. If this list is not empty,
then we restart the (S,G) state Keepalive Timer.
If the packet should be forwarded using (*,*,RP) or (*,G) state, then
we just build an outgoing interface list for the packet. We also
check if we should initiate a switch to start receiving this source
on a shortest path tree.
Finally we remove the incoming interface from the outgoing interface
list we've created, and if the resulting outgoing interface list is
not empty, we forward the packet out of those interfaces.
Fenner, et al. Standards Track [Page 26]
^L
RFC 4601 PIM-SM Specification August 2006
On receipt of data from S to G on interface iif:
if( DirectlyConnected(S) == TRUE AND iif == RPF_interface(S) ) {
set KeepaliveTimer(S,G) to Keepalive_Period
# Note: a register state transition or UpstreamJPState(S,G)
# transition may happen as a result of restarting
# KeepaliveTimer, and must be dealt with here.
}
if( iif == RPF_interface(S) AND UpstreamJPState(S,G) == Joined AND
inherited_olist(S,G) != NULL ) {
set KeepaliveTimer(S,G) to Keepalive_Period
}
Update_SPTbit(S,G,iif)
oiflist = NULL
if( iif == RPF_interface(S) AND SPTbit(S,G) == TRUE ) {
oiflist = inherited_olist(S,G)
} else if( iif == RPF_interface(RP(G)) AND SPTbit(S,G) == FALSE) {
oiflist = inherited_olist(S,G,rpt)
CheckSwitchToSpt(S,G)
} else {
# Note: RPF check failed
# A transition in an Assert FSM may cause an Assert(S,G)
# or Assert(*,G) message to be sent out interface iif.
# See section 4.6 for details.
if ( SPTbit(S,G) == TRUE AND iif is in inherited_olist(S,G) ) {
send Assert(S,G) on iif
} else if ( SPTbit(S,G) == FALSE AND
iif is in inherited_olist(S,G,rpt) {
send Assert(*,G) on iif
}
}
oiflist = oiflist (-) iif
forward packet on all interfaces in oiflist
This pseudocode employs several "macro" definitions:
DirectlyConnected(S) is TRUE if the source S is on any subnet that is
directly connected to this router (or for packets originating on this
router).
inherited_olist(S,G) and inherited_olist(S,G,rpt) are defined in
Section 4.1.
Fenner, et al. Standards Track [Page 27]
^L
RFC 4601 PIM-SM Specification August 2006
Basically, inherited_olist(S,G) is the outgoing interface list for
packets forwarded on (S,G) state, taking into account (*,*,RP) state,
(*,G) state, asserts, etc.
inherited_olist(S,G,rpt) is the outgoing interface list for packets
forwarded on (*,*,RP) or (*,G) state, taking into account (S,G,rpt)
prune state, asserts, etc.
Update_SPTbit(S,G,iif) is defined in Section 4.2.2.
CheckSwitchToSpt(S,G) is defined in Section 4.2.1.
UpstreamJPState(S,G) is the state of the finite state machine in
Section 4.5.7.
Keepalive_Period is defined in Section 4.10.
Data-triggered PIM-Assert messages sent from the above forwarding
code should be rate-limited in a implementation-dependent manner.
4.2.1. Last-Hop Switchover to the SPT
In Sparse-Mode PIM, last-hop routers join the shared tree towards the
RP. Once traffic from sources to joined groups arrives at a last-hop
router, it has the option of switching to receive the traffic on a
shortest path tree (SPT).
The decision for a router to switch to the SPT is controlled as
follows:
void
CheckSwitchToSpt(S,G) {
if ( ( pim_include(*,G) (-) pim_exclude(S,G)
(+) pim_include(S,G) != NULL )
AND SwitchToSptDesired(S,G) ) {
# Note: Restarting the KAT will result in the SPT switch
set KeepaliveTimer(S,G) to Keepalive_Period
}
}
SwitchToSptDesired(S,G) is a policy function that is implementation
defined. An "infinite threshold" policy can be implemented by making
SwitchToSptDesired(S,G) return false all the time. A "switch on
first packet" policy can be implemented by making
SwitchToSptDesired(S,G) return true once a single packet has been
received for the source and group.
Fenner, et al. Standards Track [Page 28]
^L
RFC 4601 PIM-SM Specification August 2006
4.2.2. Setting and Clearing the (S,G) SPTbit
The (S,G) SPTbit is used to distinguish whether to forward on
(*,*,RP)/(*,G) or on (S,G) state. When switching from the RP tree to
the source tree, there is a transition period when data is arriving
due to upstream (*,*,RP)/(*,G) state while upstream (S,G) state is
being established, during which time a router should continue to
forward only on (*,*,RP)/(*,G) state. This prevents temporary
black-holes that would be caused by sending a Prune(S,G,rpt) before
the upstream (S,G) state has finished being established.
Thus, when a packet arrives, the (S,G) SPTbit is updated as follows:
void
Update_SPTbit(S,G,iif) {
if ( iif == RPF_interface(S)
AND JoinDesired(S,G) == TRUE
AND ( DirectlyConnected(S) == TRUE
OR RPF_interface(S) != RPF_interface(RP(G))
OR inherited_olist(S,G,rpt) == NULL
OR ( ( RPF'(S,G) == RPF'(*,G) ) AND
( RPF'(S,G) != NULL ) )
OR ( I_Am_Assert_Loser(S,G,iif) ) {
Set SPTbit(S,G) to TRUE
}
}
Additionally, a router can set SPTbit(S,G) to TRUE in other cases,
such as when it receives an Assert(S,G) on RPF_interface(S) (see
Section 4.6.1).
JoinDesired(S,G) is defined in Section 4.5.7 and indicates whether we
have the appropriate (S,G) Join state to wish to send a Join(S,G)
upstream.
Basically, Update_SPTbit will set the SPTbit if we have the
appropriate (S,G) join state, and if the packet arrived on the
correct upstream interface for S, and if one or more of the following
conditions applies:
1. The source is directly connected, in which case the switch to the
SPT is a no-op.
2. The RPF interface to S is different from the RPF interface to the
RP. The packet arrived on RPF_interface(S), and so the SPT must
have been completed.
3. Noone wants the packet on the RP tree.
Fenner, et al. Standards Track [Page 29]
^L
RFC 4601 PIM-SM Specification August 2006
4. RPF'(S,G) == RPF'(*,G). In this case, the router will never be
able to tell if the SPT has been completed, so it should just
switch immediately.
In the case where the RPF interface is the same for the RP and for S,
but RPF'(S,G) and RPF'(*,G) differ, we wait for an Assert(S,G), which
indicates that the upstream router with (S,G) state believes the SPT
has been completed. However, item (3) above is needed because there
may not be any (*,G) state to trigger an Assert(S,G) to happen.
The SPTbit is cleared in the (S,G) upstream state machine (see
Section 4.5.7) when JoinDesired(S,G) becomes FALSE.
4.3. Designated Routers (DR) and Hello Messages
A shared-media LAN like Ethernet may have multiple PIM-SM routers
connected to it. A single one of these routers, the DR, will act on
behalf of directly connected hosts with respect to the PIM-SM
protocol. Because the distinction between LANs and point-to-point
interfaces can sometimes be blurred, and because routers may also
have multicast host functionality, the PIM-SM specification makes no
distinction between the two. Thus, DR election will happen on all
interfaces, LAN or otherwise.
DR election is performed using Hello messages. Hello messages are
also the way that option negotiation takes place in PIM, so that
additional functionality can be enabled, or parameters tuned.
4.3.1. Sending Hello Messages
PIM Hello messages are sent periodically on each PIM-enabled
interface. They allow a router to learn about the neighboring PIM
routers on each interface. Hello messages are also the mechanism
used to elect a Designated Router (DR), and to negotiate additional
capabilities. A router must record the Hello information received
from each PIM neighbor.
Hello messages MUST be sent on all active interfaces, including
physical point-to-point links, and are multicast to the 'ALL-PIM-
ROUTERS' group address ('224.0.0.13' for IPv4 and 'ff02::d' for
IPv6).
We note that some implementations do not send Hello messages on
point-to-point interfaces. This is non-compliant behavior. A
compliant PIM router MUST send Hello messages, even on point-to-
point interfaces.
Fenner, et al. Standards Track [Page 30]
^L
RFC 4601 PIM-SM Specification August 2006
A per-interface Hello Timer (HT(I)) is used to trigger sending Hello
messages on each active interface. When PIM is enabled on an
interface or a router first starts, the Hello Timer of that interface
is set to a random value between 0 and Triggered_Hello_Delay. This
prevents synchronization of Hello messages if multiple routers are
powered on simultaneously. After the initial randomized interval,
Hello messages must be sent every Hello_Period seconds. The Hello
Timer should not be reset except when it expires.
Note that neighbors will not accept Join/Prune or Assert messages
from a router unless they have first heard a Hello message from that
router. Thus, if a router needs to send a Join/Prune or Assert
message on an interface on which it has not yet sent a Hello message
with the currently configured IP address, then it MUST immediately
send the relevant Hello message without waiting for the Hello Timer
to expire, followed by the Join/Prune or Assert message.
The DR_Priority Option allows a network administrator to give
preference to a particular router in the DR election process by
giving it a numerically larger DR Priority. The DR_Priority Option
SHOULD be included in every Hello message, even if no DR Priority is
explicitly configured on that interface. This is necessary because
priority-based DR election is only enabled when all neighbors on an
interface advertise that they are capable of using the DR_Priority
Option. The default priority is 1.
The Generation_Identifier (GenID) Option SHOULD be included in all
Hello messages. The GenID option contains a randomly generated
32-bit value that is regenerated each time PIM forwarding is started
or restarted on the interface, including when the router itself
restarts. When a Hello message with a new GenID is received from a
neighbor, any old Hello information about that neighbor SHOULD be
discarded and superseded by the information from the new Hello
message. This may cause a new DR to be chosen on that interface.
The LAN Prune Delay Option SHOULD be included in all Hello messages
sent on multi-access LANs. This option advertises a router's
capability to use values other than the defaults for the
Propagation_Delay and Override_Interval, which affect the setting of
the Prune-Pending, Upstream Join, and Override Timers (defined in
Section 4.10).
The Address List Option advertises all the secondary addresses
associated with the source interface of the router originating the
message. The option MUST be included in all Hello messages if there
are secondary addresses associated with the source interface and MAY
be omitted if no secondary addresses exist.
Fenner, et al. Standards Track [Page 31]
^L
RFC 4601 PIM-SM Specification August 2006
To allow new or rebooting routers to learn of PIM neighbors quickly,
when a Hello message is received from a new neighbor, or a Hello
message with a new GenID is received from an existing neighbor, a new
Hello message should be sent on this interface after a randomized
delay between 0 and Triggered_Hello_Delay. This triggered message
need not change the timing of the scheduled periodic message. If a
router needs to send a Join/Prune to the new neighbor or send an
Assert message in response to an Assert message from the new neighbor
before this randomized delay has expired, then it MUST immediately
send the relevant Hello message without waiting for the Hello Timer
to expire, followed by the Join/Prune or Assert message. If it does
not do this, then the new neighbor will discard the Join/Prune or
Assert message.
Before an interface goes down or changes primary IP address, a Hello
message with a zero HoldTime should be sent immediately (with the old
IP address if the IP address changed). This will cause PIM neighbors
to remove this neighbor (or its old IP address) immediately. After
an interface has changed its IP address, it MUST send a Hello message
with its new IP address. If an interface changes one of its
secondary IP addresses, a Hello message with an updated Address_List
option and a non-zero HoldTime should be sent immediately. This will
cause PIM neighbors to update this neighbor's list of secondary
addresses immediately.
4.3.2. DR Election
When a PIM Hello message is received on interface I, the following
information about the sending neighbor is recorded:
neighbor.interface
The interface on which the Hello message arrived.
neighbor.primary_ip_address
The IP address that the PIM neighbor used as the source
address of the Hello message.
neighbor.genid
The Generation ID of the PIM neighbor.
neighbor.dr_priority
The DR Priority field of the PIM neighbor, if it is present in
the Hello message.
neighbor.dr_priority_present
A flag indicating if the DR Priority field was present in the
Hello message.
Fenner, et al. Standards Track [Page 32]
^L
RFC 4601 PIM-SM Specification August 2006
neighbor.timeout
A timer value to time out the neighbor state when it becomes
stale, also known as the Neighbor Liveness Timer.
The Neighbor Liveness Timer (NLT(N,I)) is reset to
Hello_Holdtime (from the Hello Holdtime option) whenever a
Hello message is received containing a Holdtime option, or to
Default_Hello_Holdtime if the Hello message does not contain
the Holdtime option.
Neighbor state is deleted when the neighbor timeout expires.
The function for computing the DR on interface I is:
host
DR(I) {
dr = me
for each neighbor on interface I {
if ( dr_is_better( neighbor, dr, I ) == TRUE ) {
dr = neighbor
}
}
return dr
}
The function used for comparing DR "metrics" on interface I is:
bool
dr_is_better(a,b,I) {
if( there is a neighbor n on I for which n.dr_priority_present
is false ) {
return a.primary_ip_address > b.primary_ip_address
} else {
return ( a.dr_priority > b.dr_priority ) OR
( a.dr_priority == b.dr_priority AND
a.primary_ip_address > b.primary_ip_address )
}
}
The trivial function I_am_DR(I) is defined to aid readability:
bool
I_am_DR(I) {
return DR(I) == me
}
Fenner, et al. Standards Track [Page 33]
^L
RFC 4601 PIM-SM Specification August 2006
The DR Priority is a 32-bit unsigned number, and the numerically
larger priority is always preferred. A router's idea of the current
DR on an interface can change when a PIM Hello message is received,
when a neighbor times out, or when a router's own DR Priority
changes. If the router becomes the DR or ceases to be the DR, this
will normally cause the DR Register state machine to change state.
Subsequent actions are determined by that state machine.
We note that some PIM implementations do not send Hello messages on
point-to-point interfaces and thus cannot perform DR election on
such interfaces. This is non-compliant behavior. DR election MUST
be performed on ALL active PIM-SM interfaces.
4.3.3. Reducing Prune Propagation Delay on LANs
In addition to the information recorded for the DR Election, the
following per neighbor information is obtained from the LAN Prune
Delay Hello option:
neighbor.lan_prune_delay_present
A flag indicating if the LAN Prune Delay option was present in
the Hello message.
neighbor.tracking_support
A flag storing the value of the T bit in the LAN Prune Delay
option if it is present in the Hello message. This indicates
the neighbor's capability to disable Join message suppression.
neighbor.propagation_delay
The Propagation Delay field of the LAN Prune Delay option (if
present) in the Hello message.
neighbor.override_interval
The Override_Interval field of the LAN Prune Delay option (if
present) in the Hello message.
The additional state described above is deleted along with the DR
neighbor state when the neighbor timeout expires.
Just like the DR_Priority option, the information provided in the LAN
Prune Delay option is not used unless all neighbors on a link
advertise the option. The function below computes this state:
Fenner, et al. Standards Track [Page 34]
^L
RFC 4601 PIM-SM Specification August 2006
bool
lan_delay_enabled(I) {
for each neighbor on interface I {
if ( neighbor.lan_prune_delay_present == false ) {
return false
}
}
return true
}
The Propagation Delay inserted by a router in the LAN Prune Delay
option expresses the expected message propagation delay on the link
and should be configurable by the system administrator. It is used
by upstream routers to figure out how long they should wait for a
Join override message before pruning an interface.
PIM implementers should enforce a lower bound on the permitted values
for this delay to allow for scheduling and processing delays within
their router. Such delays may cause received messages to be
processed later as well as triggered messages to be sent later than
intended. Setting this Propagation Delay to too low a value may
result in temporary forwarding outages because a downstream router
will not be able to override a neighbor's Prune message before the
upstream neighbor stops forwarding.
When all routers on a link are in a position to negotiate a
Propagation Delay different from the default, the largest value from
those advertised by each neighbor is chosen. The function for
computing the Effective_Propagation_Delay of interface I is:
time_interval
Effective_Propagation_Delay(I) {
if ( lan_delay_enabled(I) == false ) {
return Propagation_delay_default
}
delay = Propagation_Delay(I)
for each neighbor on interface I {
if ( neighbor.propagation_delay > delay ) {
delay = neighbor.propagation_delay
}
}
return delay
}
To avoid synchronization of override messages when multiple
downstream routers share a multi-access link, sending of such
messages is delayed by a small random amount of time. The period of
randomization should represent the size of the PIM router population
Fenner, et al. Standards Track [Page 35]
^L
RFC 4601 PIM-SM Specification August 2006
on the link. Each router expresses its view of the amount of
randomization necessary in the Override Interval field of the LAN
Prune Delay option.
When all routers on a link are in a position to negotiate an Override
Interval different from the default, the largest value from those
advertised by each neighbor is chosen. The function for computing
the Effective Override Interval of interface I is:
time_interval
Effective_Override_Interval(I) {
if ( lan_delay_enabled(I) == false ) {
return t_override_default
}
delay = Override_Interval(I)
for each neighbor on interface I {
if ( neighbor.override_interval > delay ) {
delay = neighbor.override_interval
}
}
return delay
}
Although the mechanisms are not specified in this document, it is
possible for upstream routers to explicitly track the join membership
of individual downstream routers if Join suppression is disabled. A
router can advertise its willingness to disable Join suppression by
using the T bit in the LAN Prune Delay Hello option. Unless all PIM
routers on a link negotiate this capability, explicit tracking and
the disabling of the Join suppression mechanism are not possible.
The function for computing the state of Suppression on interface I
is:
bool
Suppression_Enabled(I) {
if ( lan_delay_enabled(I) == false ) {
return true
}
for each neighbor on interface I {
if ( neighbor.tracking_support == false ) {
return true
}
}
return false
}
Note that the setting of Suppression_Enabled(I) affects the value of
t_suppressed (see Section 4.10).
Fenner, et al. Standards Track [Page 36]
^L
RFC 4601 PIM-SM Specification August 2006
4.3.4. Maintaining Secondary Address Lists
Communication of a router's interface secondary addresses to its PIM
neighbors is necessary to provide the neighbors with a mechanism for
mapping next_hop information obtained through their MRIB to a primary
address that can be used as a destination for Join/Prune messages.
The mapping is performed through the NBR macro. The primary address
of a PIM neighbor is obtained from the source IP address used in its
PIM Hello messages. Secondary addresses are carried within the Hello
message in an Address List Hello option. The primary address of the
source interface of the router MUST NOT be listed within the Address
List Hello option.
In addition to the information recorded for the DR Election, the
following per neighbor information is obtained from the Address List
Hello option:
neighbor.secondary_address_list
The list of secondary addresses used by the PIM neighbor on
the interface through which the Hello message was transmitted.
When processing a received PIM Hello message containing an Address
List Hello option, the list of secondary addresses in the message
completely replaces any previously associated secondary addresses for
that neighbor. If a received PIM Hello message does not contain an
Address List Hello option, then all secondary addresses associated
with the neighbor must be deleted. If a received PIM Hello message
contains an Address List Hello option that includes the primary
address of the sending router in the list of secondary addresses
(although this is not expected), then the addresses listed in the
message, excluding the primary address, are used to update the
associated secondary addresses for that neighbor.
All the advertised secondary addresses in received Hello messages
must be checked against those previously advertised by all other PIM
neighbors on that interface. If there is a conflict and the same
secondary address was previously advertised by another neighbor, then
only the most recently received mapping MUST be maintained, and an
error message SHOULD be logged to the administrator in a rate-limited
manner.
Within one Address List Hello option, all the addresses MUST be of
the same address family. It is not permitted to mix IPv4 and IPv6
addresses within the same message. In addition, the address family
of the fields in the message SHOULD be the same as the IP source and
destination addresses of the packet header.
Fenner, et al. Standards Track [Page 37]
^L
RFC 4601 PIM-SM Specification August 2006
4.4. PIM Register Messages
The Designated Router (DR) on a LAN or point-to-point link
encapsulates multicast packets from local sources to the RP for the
relevant group unless it recently received a Register-Stop message
for that (S,G) or (*,G) from the RP. When the DR receives a
Register-Stop message from the RP, it starts a Register-Stop Timer to
maintain this state. Just before the Register-Stop Timer expires,
the DR sends a Null-Register Message to the RP to allow the RP to
refresh the Register-Stop information at the DR. If the Register-
Stop Timer actually expires, the DR will resume encapsulating packets
from the source to the RP.
4.4.1. Sending Register Messages from the DR
Every PIM-SM router has the capability to be a DR. The state machine
below is used to implement Register functionality. For the purposes
of specification, we represent the mechanism to encapsulate packets
to the RP as a Register-Tunnel interface, which is added to or
removed from the (S,G) olist. The tunnel interface then takes part
in the normal packet forwarding rules as specified in Section 4.2.
If register state is maintained, it is maintained only for directly
connected sources and is per-(S,G). There are four states in the
DR's per-(S,G) Register state machine:
Join (J)
The register tunnel is "joined" (the join is actually implicit,
but the DR acts as if the RP has joined the DR on the tunnel
interface).
Prune (P)
The register tunnel is "pruned" (this occurs when a Register-
Stop is received).
Join-Pending (JP)
The register tunnel is pruned but the DR is contemplating adding
it back.
NoInfo (NI)
No information. This is the initial state, and the state when
the router is not the DR.
In addition, a Register-Stop Timer (RST) is kept if the state machine
is not in the NoInfo state.
Fenner, et al. Standards Track [Page 38]
^L
RFC 4601 PIM-SM Specification August 2006
Figure 1: Per-(S,G) register state machine at a DR in tabular form
+----------++----------------------------------------------------------+
| || Event |
| ++----------+-----------+-----------+-----------+-----------+
|Prev State||Register- | Could | Could | Register- | RP changed|
| ||Stop Timer| Register | Register | Stop | |
| ||expires | ->True | ->False | received | |
+----------++----------+-----------+-----------+-----------+-----------+
|NoInfo ||- | -> J state| - | - | - |
|(NI) || | add reg | | | |
| || | tunnel | | | |
+----------++----------+-----------+-----------+-----------+-----------+
| ||- | - | -> NI | -> P state| -> J state|
| || | | state | | |
| || | | remove reg| remove reg| update reg|
|Join (J) || | | tunnel | tunnel; | tunnel |
| || | | | set | |
| || | | | Register- | |
| || | | | Stop | |
| || | | | Timer(*) | |
+----------++----------+-----------+-----------+-----------+-----------+
| ||-> J state| - | -> NI | -> P state| -> J state|
| || | | state | | |
|Join- ||add reg | | | set | add reg |
|Pending ||tunnel | | | Register- | tunnel; |
|(JP) || | | | Stop | cancel |
| || | | | Timer(*) | Register- |
| || | | | | Stop Timer|
+----------++----------+-----------+-----------+-----------+-----------+
| ||-> JP | - | -> NI | - | -> J state|
| ||state | | state | | |
| ||set | | | | add reg |
|Prune (P) ||Register- | | | | tunnel; |
| ||Stop | | | | cancel |
| ||Timer(**);| | | | Register- |
| ||send Null-| | | | Stop Timer|
| ||Register | | | | |
+----------++----------+-----------+-----------+-----------+-----------+
Notes:
(*) The Register-Stop Timer is set to a random value chosen
uniformly from the interval ( 0.5 * Register_Suppression_Time,
1.5 * Register_Suppression_Time) minus Register_Probe_Time.
Fenner, et al. Standards Track [Page 39]
^L
RFC 4601 PIM-SM Specification August 2006
Subtracting off Register_Probe_Time is a bit unnecessary because
it is really small compared to Register_Suppression_Time, but
this was in the old spec and is kept for compatibility.
(**) The Register-Stop Timer is set to Register_Probe_Time.
The following three actions are defined:
Add Register Tunnel
A Register-Tunnel virtual interface, VI, is created (if it doesn't
already exist) with its encapsulation target being RP(G).
DownstreamJPState(S,G,VI) is set to Join state, causing the tunnel
interface to be added to immediate_olist(S,G) and
inherited_olist(S,G).
Remove Register Tunnel
VI is the Register-Tunnel virtual interface with encapsulation
target of RP(G). DownstreamJPState(S,G,VI) is set to NoInfo
state, causing the tunnel interface to be removed from
immediate_olist(S,G) and inherited_olist(S,G). If
DownstreamJPState(S,G,VI) is NoInfo for all (S,G), then VI can be
deleted.
Update Register Tunnel
This action occurs when RP(G) changes.
VI_old is the Register-Tunnel virtual interface with encapsulation
target old_RP(G). A Register-Tunnel virtual interface, VI_new, is
created (if it doesn't already exist) with its encapsulation
target being new_RP(G). DownstreamJPState(S,G,VI_old) is set to
NoInfo state and DownstreamJPState(S,G,VI_new) is set to Join
state. If DownstreamJPState(S,G,VI_old) is NoInfo for all (S,G),
then VI_old can be deleted.
Note that we cannot simply change the encapsulation target of
VI_old because not all groups using that encapsulation tunnel will
have moved to the same new RP.
Fenner, et al. Standards Track [Page 40]
^L
RFC 4601 PIM-SM Specification August 2006
CouldRegister(S,G)
The macro "CouldRegister" in the state machine is defined as:
bool CouldRegister(S,G) {
return ( I_am_DR( RPF_interface(S) ) AND
KeepaliveTimer(S,G) is running AND
DirectlyConnected(S) == TRUE )
}
Note that on reception of a packet at the DR from a directly
connected source, KeepaliveTimer(S,G) needs to be set by the
packet forwarding rules before computing CouldRegister(S,G) in the
register state machine, or the first packet from a source won't be
registered.
Encapsulating Data Packets in the Register Tunnel
Conceptually, the Register Tunnel is an interface with a smaller
MTU than the underlying IP interface towards the RP. IP
fragmentation on packets forwarded on the Register Tunnel is
performed based upon this smaller MTU. The encapsulating DR may
perform Path MTU Discovery to the RP to determine the effective
MTU of the tunnel. Fragmentation for the smaller MTU should take
both the outer IP header and the PIM register header overhead into
account. If a multicast packet is fragmented on the way into the
Register Tunnel, each fragment is encapsulated individually so it
contains IP, PIM, and inner IP headers.
In IPv6, the DR MUST perform Path MTU discovery, and an ICMP
Packet Too Big message MUST be sent by the encapsulating DR if it
receives a packet that will not fit in the effective MTU of the
tunnel. If the MTU between the DR and the RP results in the
effective tunnel MTU being smaller than 1280 (the IPv6 minimum
MTU), the DR MUST send Fragmentation Required messages with an MTU
value of 1280 and MUST fragment its PIM register messages as
required, using an IPv6 fragmentation header between the outer
IPv6 header and the PIM Register header.
The TTL of a forwarded data packet is decremented before it is
encapsulated in the Register Tunnel. The encapsulating packet
uses the normal TTL that the router would use for any locally-
generated IP packet.
The IP ECN bits should be copied from the original packet to the
IP header of the encapsulating packet. They SHOULD NOT be set
independently by the encapsulating router.
Fenner, et al. Standards Track [Page 41]
^L
RFC 4601 PIM-SM Specification August 2006
The Diffserv Code Point (DSCP) should be copied from the original
packet to the IP header of the encapsulating packet. It MAY be
set independently by the encapsulating router, based upon static
configuration or traffic classification. See [12] for more
discussion on setting the DSCP on tunnels.
Handling Register-Stop(*,G) Messages at the DR
An old RP might send a Register-Stop message with the source
address set to all zeros. This was the normal course of action in
RFC 2362 when the Register message matched against (*,G) state at
the RP, and it was defined as meaning "stop encapsulating all
sources for this group". However, the behavior of such a
Register-Stop(*,G) is ambiguous or incorrect in some
circumstances.
We specify that an RP should not send Register-Stop(*,G) messages,
but for compatibility, a DR should be able to accept one if it is
received.
A Register-Stop(*,G) should be treated as a Register-Stop(S,G) for
all (S,G) Register state machines that are not in the NoInfo
state. A router should not apply a Register-Stop(*,G) to sources
that become active after the Register-Stop(*,G) was received.
Fenner, et al. Standards Track [Page 42]
^L
RFC 4601 PIM-SM Specification August 2006
4.4.2. Receiving Register Messages at the RP
When an RP receives a Register message, the course of action is
decided according to the following pseudocode:
packet_arrives_on_rp_tunnel( pkt ) {
if( outer.dst is not one of my addresses ) {
drop the packet silently.
# Note: this may be a spoofing attempt
}
if( I_am_RP(G) AND outer.dst == RP(G) ) {
sentRegisterStop = FALSE;
if ( register.borderbit == TRUE ) {
if ( PMBR(S,G) == unknown ) {
PMBR(S,G) = outer.src
} else if ( outer.src != PMBR(S,G) ) {
send Register-Stop(S,G) to outer.src
drop the packet silently.
}
}
if ( SPTbit(S,G) OR
( SwitchToSptDesired(S,G) AND
( inherited_olist(S,G) == NULL ))) {
send Register-Stop(S,G) to outer.src
sentRegisterStop = TRUE;
}
if ( SPTbit(S,G) OR SwitchToSptDesired(S,G) ) {
if ( sentRegisterStop == TRUE ) {
set KeepaliveTimer(S,G) to RP_Keepalive_Period;
} else {
set KeepaliveTimer(S,G) to Keepalive_Period;
}
}
if( !SPTbit(S,G) AND ! pkt.NullRegisterBit ) {
decapsulate and forward the inner packet to
inherited_olist(S,G,rpt) # Note (+)
}
} else {
send Register-Stop(S,G) to outer.src
# Note (*)
}
}
outer.dst is the IP destination address of the encapsulating header.
outer.src is the IP source address of the encapsulating header, i.e.,
the DR's address.
Fenner, et al. Standards Track [Page 43]
^L
RFC 4601 PIM-SM Specification August 2006
I_am_RP(G) is true if the group-to-RP mapping indicates that this
router is the RP for the group.
Note (*): This may block traffic from S for Register_Suppression_Time
if the DR learned about a new group-to-RP mapping before the RP
did. However, this doesn't matter unless we figure out some way
for the RP also to accept (*,G) joins when it doesn't yet realize
that it is about to become the RP for G. This will all get sorted
out once the RP learns the new group-to-rp mapping. We decided to
do nothing about this and just accept the fact that PIM may suffer
interrupted (*,G) connectivity following an RP change.
Note (+): Implementations are advised not to make this a special
case, but to arrange that this path rejoin the normal packet
forwarding path. All of the appropriate actions from the "On
receipt of data from S to G on interface iif" pseudocode in
Section 4.2 should be performed.
KeepaliveTimer(S,G) is restarted at the RP when packets arrive on the
proper tunnel interface and the RP desires to switch to the SPT or
the SPTbit is already set. This may cause the upstream (S,G) state
machine to trigger a join if the inherited_olist(S,G) is not NULL.
An RP should preserve (S,G) state that was created in response to a
Register message for at least ( 3 * Register_Suppression_Time );
otherwise, the RP may stop joining (S,G) before the DR for S has
restarted sending registers. Traffic would then be interrupted until
the Register-Stop Timer expires at the DR.
Thus, at the RP, KeepaliveTimer(S,G) should be restarted to ( 3 *
Register_Suppression_Time + Register_Probe_Time ).
When forwarding a packet from the Register Tunnel, the TTL of the
original data packet is decremented after it is decapsulated.
The IP ECN bits should be copied from the IP header of the Register
packet to the decapsulated packet.
The Diffserv Code Point (DSCP) should be copied from the IP header of
the Register packet to the decapsulated packet. The RP MAY retain
the DSCP of the inner packet or re-classify the packet and apply a
different DSCP. Scenarios where each of these might be useful are
discussed in [12].
Fenner, et al. Standards Track [Page 44]
^L
RFC 4601 PIM-SM Specification August 2006
4.5. PIM Join/Prune Messages
A PIM Join/Prune message consists of a list of groups and a list of
Joined and Pruned sources for each group. When processing a received
Join/Prune message, each Joined or Pruned source for a Group is
effectively considered individually, and applies to one or more of
the following state machines. When considering a Join/Prune message
whose Upstream Neighbor Address field addresses this router, (*,G)
Joins and Prunes can affect both the (*,G) and (S,G,rpt) downstream
state machines, while (*,*,RP), (S,G), and (S,G,rpt) Joins and Prunes
can only affect their respective downstream state machines. When
considering a Join/Prune message whose Upstream Neighbor Address
field addresses another router, most Join or Prune messages could
affect each upstream state machine.
In general, a PIM Join/Prune message should only be accepted for
processing if it comes from a known PIM neighbor. A PIM router hears
about PIM neighbors through PIM Hello messages. If a router receives
a Join/Prune message from a particular IP source address and it has
not seen a PIM Hello message from that source address, then the
Join/Prune message SHOULD be discarded without further processing.
In addition, if the Hello message from a neighbor was authenticated
using IPsec AH (see Section 6.3), then all Join/Prune messages from
that neighbor MUST also be authenticated using IPsec AH.
We note that some older PIM implementations incorrectly fail to send
Hello messages on point-to-point interfaces, so we also RECOMMEND
that a configuration option be provided to allow interoperation with
such older routers, but that this configuration option SHOULD NOT be
enabled by default.
4.5.1. Receiving (*,*,RP) Join/Prune Messages
The per-interface state machine for receiving (*,*,RP) Join/Prune
Messages is given below. There are three states:
NoInfo (NI)
The interface has no (*,*,RP) Join state and no timers
running.
Join (J)
The interface has (*,*,RP) Join state, which will cause the
router to forward packets destined for any group handled by RP
from this interface except if there is also (S,G,rpt) prune
information (see Section 4.5.4) or the router lost an assert
on this interface.
Fenner, et al. Standards Track [Page 45]
^L
RFC 4601 PIM-SM Specification August 2006
Prune-Pending (PP)
The router has received a Prune(*,*,RP) on this interface from
a downstream neighbor and is waiting to see whether the prune
will be overridden by another downstream router. For
forwarding purposes, the Prune-Pending state functions exactly
like the Join state.
In addition, the state machine uses two timers:
ExpiryTimer (ET)
This timer is restarted when a valid Join(*,*,RP) is received.
Expiry of the ExpiryTimer causes the interface state to revert
to NoInfo for this RP.
Prune-Pending Timer (PPT)
This timer is set when a valid Prune(*,*,RP) is received.
Expiry of the Prune-Pending Timer causes the interface state
to revert to NoInfo for this RP.
Figure 2: Downstream per-interface (*,*,RP) state machine
in tabular form
+------------++--------------------------------------------------------+
| || Event |
| ++-------------+-------------+--------------+-------------+
|Prev State ||Receive | Receive | Prune- | Expiry Timer|
| ||Join(*,*,RP) | Prune | Pending | Expires |
| || | (*,*,RP) | Timer | |
| || | | Expires | |
+------------++-------------+-------------+--------------+-------------+
| ||-> J state | -> NI state | - | - |
|NoInfo (NI) ||start Expiry | | | |
| ||Timer | | | |
+------------++-------------+-------------+--------------+-------------+
| ||-> J state | -> PP state | - | -> NI state |
|Join (J) ||restart | start Prune-| | |
| ||Expiry Timer | Pending | | |
| || | Timer | | |
+------------++-------------+-------------+--------------+-------------+
|Prune- ||-> J state | -> PP state | -> NI state | -> NI state |
|Pending (PP)||restart | | Send Prune- | |
| ||Expiry Timer | | Echo(*,*,RP) | |
+------------++-------------+-------------+--------------+-------------+
Fenner, et al. Standards Track [Page 46]
^L
RFC 4601 PIM-SM Specification August 2006
The transition events "Receive Join(*,*,RP)" and "Receive
Prune(*,*,RP)" imply receiving a Join or Prune targeted to this
router's primary IP address on the received interface. If the
upstream neighbor address field is not correct, these state
transitions in this state machine must not occur, although seeing
such a packet may cause state transitions in other state machines.
On unnumbered interfaces on point-to-point links, the router's
address should be the same as the source address it chose for the
Hello message it sent over that interface. However, on point-to-
point links we also recommend that for backwards compatibility PIM
Join/Prune messages with an upstream neighbor address field of all
zeros are also accepted.
Transitions from NoInfo State
When in NoInfo state, the following event may trigger a transition:
Receive Join(*,*,RP)
A Join(*,*,RP) is received on interface I with its Upstream
Neighbor Address set to the router's primary IP address on I.
The (*,*,RP) downstream state machine on interface I
transitions to the Join state. The Expiry Timer (ET) is
started and set to the HoldTime from the triggering Join/Prune
message.
Note that it is possible to receive a Join(*,*,RP) message for
an RP for which we do not have information telling us that it
is an RP. In the case of (*,*,RP) state, so long as we have a
route to the RP, this will not cause a problem, and the
transition should still take place.
Transitions from Join State
When in Join state, the following events may trigger a transition:
Receive Join(*,*,RP)
A Join(*,*,RP) is received on interface I with its Upstream
Neighbor Address set to the router's primary IP address on I.
The (*,*,RP) downstream state machine on interface I remains
in Join state, and the Expiry Timer (ET) is restarted, set to
maximum of its current value and the HoldTime from the
triggering Join/Prune message.
Fenner, et al. Standards Track [Page 47]
^L
RFC 4601 PIM-SM Specification August 2006
Receive Prune(*,*,RP)
A Prune(*,*,RP) is received on interface I with its Upstream
Neighbor Address set to the router's primary IP address on I.
The (*,*,RP) downstream state machine on interface I
transitions to the Prune-Pending state. The Prune-Pending
Timer is started. It is set to the J/P_Override_Interval(I)
if the router has more than one neighbor on that interface;
otherwise, it is set to zero, causing it to expire
immediately.
Expiry Timer Expires
The Expiry Timer for the (*,*,RP) downstream state machine on
interface I expires.
The (*,*,RP) downstream state machine on interface I
transitions to the NoInfo state.
Transitions from Prune-Pending State
When in Prune-Pending state, the following events may trigger a
transition:
Receive Join(*,*,RP)
A Join(*,*,RP) is received on interface I with its Upstream
Neighbor Address set to the router's primary IP address on I.
The (*,*,RP) downstream state machine on interface I
transitions to the Join state. The Prune-Pending Timer is
canceled (without triggering an expiry event). The Expiry
Timer is restarted, set to maximum of its current value and
the HoldTime from the triggering Join/Prune message.
Expiry Timer Expires
The Expiry Timer for the (*,*,RP) downstream state machine on
interface I expires.
The (*,*,RP) downstream state machine on interface I
transitions to the NoInfo state.
Prune-Pending Timer Expires
The Prune-Pending Timer for the (*,*,RP) downstream state
machine on interface I expires.
The (*,*,RP) downstream state machine on interface I
transitions to the NoInfo state. A PruneEcho(*,*,RP) is sent
onto the subnet connected to interface I.
Fenner, et al. Standards Track [Page 48]
^L
RFC 4601 PIM-SM Specification August 2006
The action "Send PruneEcho(*,*,RP)" is triggered when the
router stops forwarding on an interface as a result of a
prune. A PruneEcho(*,*,RP) is simply a Prune(*,*,RP) message
sent by the upstream router on a LAN with its own address in
the Upstream Neighbor Address field. Its purpose is to add
additional reliability so that if a Prune that should have
been overridden by another router is lost locally on the LAN,
then the PruneEcho may be received and cause the override to
happen. A PruneEcho(*,*,RP) need not be sent on an interface
that contains only a single PIM neighbor during the time this
state machine was in Prune-Pending state.
4.5.2. Receiving (*,G) Join/Prune Messages
When a router receives a Join(*,G), it must first check to see
whether the RP in the message matches RP(G) (the router's idea of who
the RP is). If the RP in the message does not match RP(G), the
Join(*,G) should be silently dropped. (Note that other source list
entries, such as (S,G,rpt) or (S,G), in the same Group-Specific Set
should still be processed.) If a router has no RP information (e.g.,
has not recently received a BSR message), then it may choose to
accept Join(*,G) and treat the RP in the message as RP(G). Received
Prune(*,G) messages are processed even if the RP in the message does
not match RP(G).
The per-interface state machine for receiving (*,G) Join/Prune
Messages is given below. There are three states:
NoInfo (NI)
The interface has no (*,G) Join state and no timers running.
Join (J)
The interface has (*,G) Join state, which will cause the
router to forward packets destined for G from this interface
except if there is also (S,G,rpt) prune information (see
Section 4.5.4) or the router lost an assert on this interface.
Prune-Pending (PP)
The router has received a Prune(*,G) on this interface from a
downstream neighbor and is waiting to see whether the prune
will be overridden by another downstream router. For
forwarding purposes, the Prune-Pending state functions exactly
like the Join state.
Fenner, et al. Standards Track [Page 49]
^L
RFC 4601 PIM-SM Specification August 2006
In addition, the state machine uses two timers:
Expiry Timer (ET)
This timer is restarted when a valid Join(*,G) is received.
Expiry of the Expiry Timer causes the interface state to
revert to NoInfo for this group.
Prune-Pending Timer (PPT)
This timer is set when a valid Prune(*,G) is received. Expiry
of the Prune-Pending Timer causes the interface state to
revert to NoInfo for this group.
Figure 3: Downstream per-interface (*,G) state machine in tabular form
+------------++--------------------------------------------------------+
| || Event |
| ++-------------+--------------+-------------+-------------+
|Prev State ||Receive | Receive | Prune- | Expiry Timer|
| ||Join(*,G) | Prune(*,G) | Pending | Expires |
| || | | Timer | |
| || | | Expires | |
+------------++-------------+--------------+-------------+-------------+
| ||-> J state | -> NI state | - | - |
|NoInfo (NI) ||start Expiry | | | |
| ||Timer | | | |
+------------++-------------+--------------+-------------+-------------+
| ||-> J state | -> PP state | - | -> NI state |
|Join (J) ||restart | start Prune- | | |
| ||Expiry Timer | Pending | | |
| || | Timer | | |
+------------++-------------+--------------+-------------+-------------+
|Prune- ||-> J state | -> PP state | -> NI state | -> NI state |
|Pending (PP)||restart | | Send Prune- | |
| ||Expiry Timer | | Echo(*,G) | |
+------------++-------------+--------------+-------------+-------------+
The transition events "Receive Join(*,G)" and "Receive Prune(*,G)"
imply receiving a Join or Prune targeted to this router's primary IP
address on the received interface. If the upstream neighbor address
field is not correct, these state transitions in this state machine
must not occur, although seeing such a packet may cause state
transitions in other state machines.
On unnumbered interfaces on point-to-point links, the router's
address should be the same as the source address it chose for the
Hello message it sent over that interface. However, on point-to-
Fenner, et al. Standards Track [Page 50]
^L
RFC 4601 PIM-SM Specification August 2006
point links we also recommend that for backwards compatibility PIM
Join/Prune messages with an upstream neighbor address field of all
zeros are also accepted.
Transitions from NoInfo State
When in NoInfo state, the following event may trigger a transition:
Receive Join(*,G)
A Join(*,G) is received on interface I with its Upstream
Neighbor Address set to the router's primary IP address on I.
The (*,G) downstream state machine on interface I transitions
to the Join state. The Expiry Timer (ET) is started and set
to the HoldTime from the triggering Join/Prune message.
Transitions from Join State
When in Join state, the following events may trigger a transition:
Receive Join(*,G)
A Join(*,G) is received on interface I with its Upstream
Neighbor Address set to the router's primary IP address on I.
The (*,G) downstream state machine on interface I remains in
Join state, and the Expiry Timer (ET) is restarted, set to
maximum of its current value and the HoldTime from the
triggering Join/Prune message.
Receive Prune(*,G)
A Prune(*,G) is received on interface I with its Upstream
Neighbor Address set to the router's primary IP address on I.
The (*,G) downstream state machine on interface I transitions
to the Prune-Pending state. The Prune-Pending Timer is
started. It is set to the J/P_Override_Interval(I) if the
router has more than one neighbor on that interface;
otherwise, it is set to zero, causing it to expire
immediately.
Expiry Timer Expires
The Expiry Timer for the (*,G) downstream state machine on
interface I expires.
The (*,G) downstream state machine on interface I transitions
to the NoInfo state.
Fenner, et al. Standards Track [Page 51]
^L
RFC 4601 PIM-SM Specification August 2006
Transitions from Prune-Pending State
When in Prune-Pending state, the following events may trigger a
transition:
Receive Join(*,G)
A Join(*,G) is received on interface I with its Upstream
Neighbor Address set to the router's primary IP address on I.
The (*,G) downstream state machine on interface I transitions
to the Join state. The Prune-Pending Timer is canceled
(without triggering an expiry event). The Expiry Timer is
restarted, set to maximum of its current value and the
HoldTime from the triggering Join/Prune message.
Expiry Timer Expires
The Expiry Timer for the (*,G) downstream state machine on
interface I expires.
The (*,G) downstream state machine on interface I transitions
to the NoInfo state.
Prune-Pending Timer Expires
The Prune-Pending Timer for the (*,G) downstream state machine
on interface I expires.
The (*,G) downstream state machine on interface I transitions
to the NoInfo state. A PruneEcho(*,G) is sent onto the subnet
connected to interface I.
The action "Send PruneEcho(*,G)" is triggered when the router
stops forwarding on an interface as a result of a prune. A
PruneEcho(*,G) is simply a Prune(*,G) message sent by the
upstream router on a LAN with its own address in the Upstream
Neighbor Address field. Its purpose is to add additional
reliability so that if a Prune that should have been
overridden by another router is lost locally on the LAN, then
the PruneEcho may be received and cause the override to
happen. A PruneEcho(*,G) need not be sent on an interface
that contains only a single PIM neighbor during the time this
state machine was in Prune-Pending state.
Fenner, et al. Standards Track [Page 52]
^L
RFC 4601 PIM-SM Specification August 2006
4.5.3. Receiving (S,G) Join/Prune Messages
The per-interface state machine for receiving (S,G) Join/Prune
messages is given below and is almost identical to that for (*,G)
messages. There are three states:
NoInfo (NI)
The interface has no (S,G) Join state and no (S,G) timers
running.
Join (J)
The interface has (S,G) Join state, which will cause the
router to forward packets from S destined for G from this
interface if the (S,G) state is active (the SPTbit is set)
except if the router lost an assert on this interface.
Prune-Pending (PP)
The router has received a Prune(S,G) on this interface from a
downstream neighbor and is waiting to see whether the prune
will be overridden by another downstream router. For
forwarding purposes, the Prune-Pending state functions exactly
like the Join state.
In addition, there are two timers:
Expiry Timer (ET)
This timer is set when a valid Join(S,G) is received. Expiry
of the Expiry Timer causes this state machine to revert to
NoInfo state.
Prune-Pending Timer (PPT)
This timer is set when a valid Prune(S,G) is received. Expiry
of the Prune-Pending Timer causes this state machine to revert
to NoInfo state.
Fenner, et al. Standards Track [Page 53]
^L
RFC 4601 PIM-SM Specification August 2006
Figure 4: Downstream per-interface (S,G) state machine in tabular form
+------------++--------------------------------------------------------+
| || Event |
| ++-------------+--------------+-------------+-------------+
|Prev State ||Receive | Receive | Prune- | Expiry Timer|
| ||Join(S,G) | Prune(S,G) | Pending | Expires |
| || | | Timer | |
| || | | Expires | |
+------------++-------------+--------------+-------------+-------------+
| ||-> J state | -> NI state | - | - |
|NoInfo (NI) ||start Expiry | | | |
| ||Timer | | | |
+------------++-------------+--------------+-------------+-------------+
| ||-> J state | -> PP state | - | -> NI state |
|Join (J) ||restart | start Prune- | | |
| ||Expiry Timer | Pending | | |
| || | Timer | | |
+------------++-------------+--------------+-------------+-------------+
|Prune- ||-> J state | -> PP state | -> NI state | -> NI state |
|Pending (PP)||restart | | Send Prune- | |
| ||Expiry Timer | | Echo(S,G) | |
+------------++-------------+--------------+-------------+-------------+
The transition events "Receive Join(S,G)" and "Receive Prune(S,G)"
imply receiving a Join or Prune targeted to this router's primary IP
address on the received interface. If the upstream neighbor address
field is not correct, these state transitions in this state machine
must not occur, although seeing such a packet may cause state
transitions in other state machines.
On unnumbered interfaces on point-to-point links, the router's
address should be the same as the source address it chose for the
Hello message it sent over that interface. However, on point-to-
point links we also recommend that for backwards compatibility PIM
Join/Prune messages with an upstream neighbor address field of all
zeros are also accepted.
Transitions from NoInfo State
When in NoInfo state, the following event may trigger a transition:
Receive Join(S,G)
A Join(S,G) is received on interface I with its Upstream
Neighbor Address set to the router's primary IP address on I.
Fenner, et al. Standards Track [Page 54]
^L
RFC 4601 PIM-SM Specification August 2006
The (S,G) downstream state machine on interface I transitions
to the Join state. The Expiry Timer (ET) is started and set
to the HoldTime from the triggering Join/Prune message.
Transitions from Join State
When in Join state, the following events may trigger a transition:
Receive Join(S,G)
A Join(S,G) is received on interface I with its Upstream
Neighbor Address set to the router's primary IP address on I.
The (S,G) downstream state machine on interface I remains in
Join state, and the Expiry Timer (ET) is restarted, set to
maximum of its current value and the HoldTime from the
triggering Join/Prune message.
Receive Prune(S,G)
A Prune(S,G) is received on interface I with its Upstream
Neighbor Address set to the router's primary IP address on I.
The (S,G) downstream state machine on interface I transitions
to the Prune-Pending state. The Prune-Pending Timer is
started. It is set to the J/P_Override_Interval(I) if the
router has more than one neighbor on that interface;
otherwise, it is set to zero, causing it to expire
immediately.
Expiry Timer Expires
The Expiry Timer for the (S,G) downstream state machine on
interface I expires.
The (S,G) downstream state machine on interface I transitions
to the NoInfo state.
Transitions from Prune-Pending State
When in Prune-Pending state, the following events may trigger a
transition:
Receive Join(S,G)
A Join(S,G) is received on interface I with its Upstream
Neighbor Address set to the router's primary IP address on I.
Fenner, et al. Standards Track [Page 55]
^L
RFC 4601 PIM-SM Specification August 2006
The (S,G) downstream state machine on interface I transitions
to the Join state. The Prune-Pending Timer is canceled
(without triggering an expiry event). The Expiry Timer is
restarted, set to maximum of its current value and the
HoldTime from the triggering Join/Prune message.
Expiry Timer Expires
The Expiry Timer for the (S,G) downstream state machine on
interface I expires.
The (S,G) downstream state machine on interface I transitions
to the NoInfo state.
Prune-Pending Timer Expires
The Prune-Pending Timer for the (S,G) downstream state machine
on interface I expires.
The (S,G) downstream state machine on interface I transitions
to the NoInfo state. A PruneEcho(S,G) is sent onto the subnet
connected to interface I.
The action "Send PruneEcho(S,G)" is triggered when the router
stops forwarding on an interface as a result of a prune. A
PruneEcho(S,G) is simply a Prune(S,G) message sent by the
upstream router on a LAN with its own address in the Upstream
Neighbor Address field. Its purpose is to add additional
reliability so that if a Prune that should have been
overridden by another router is lost locally on the LAN, then
the PruneEcho may be received and cause the override to
happen. A PruneEcho(S,G) need not be sent on an interface
that contains only a single PIM neighbor during the time this
state machine was in Prune-Pending state.
4.5.4. Receiving (S,G,rpt) Join/Prune Messages
The per-interface state machine for receiving (S,G,rpt) Join/Prune
messages is given below. There are five states:
NoInfo (NI)
The interface has no (S,G,rpt) Prune state and no (S,G,rpt)
timers running.
Prune (P)
The interface has (S,G,rpt) Prune state, which will cause the
router not to forward packets from S destined for G from this
interface even though the interface has active (*,G) Join
state.
Fenner, et al. Standards Track [Page 56]
^L
RFC 4601 PIM-SM Specification August 2006
Prune-Pending (PP)
The router has received a Prune(S,G,rpt) on this interface
from a downstream neighbor and is waiting to see whether the
prune will be overridden by another downstream router. For
forwarding purposes, the Prune-Pending state functions exactly
like the NoInfo state.
PruneTmp (P')
This state is a transient state that for forwarding purposes
behaves exactly like the Prune state. A (*,G) Join has been
received (which may cancel the (S,G,rpt) Prune). As we parse
the Join/Prune message from top to bottom, we first enter this
state if the message contains a (*,G) Join. Later in the
message, we will normally encounter an (S,G,rpt) prune to
reinstate the Prune state. However, if we reach the end of
the message without encountering such a (S,G,rpt) prune, then
we will revert to NoInfo state in this state machine.
As no time is spent in this state, no timers can expire.
Prune-Pending-Tmp (PP')
This state is a transient state that is identical to P' except
that it is associated with the PP state rather than the P
state. For forwarding purposes, PP' behaves exactly like PP
state.
In addition, there are two timers:
Expiry Timer (ET)
This timer is set when a valid Prune(S,G,rpt) is received.
Expiry of the Expiry Timer causes this state machine to revert
to NoInfo state.
Prune-Pending Timer (PPT)
This timer is set when a valid Prune(S,G,rpt) is received.
Expiry of the Prune-Pending Timer causes this state machine to
move on to Prune state.
Fenner, et al. Standards Track [Page 57]
^L
RFC 4601 PIM-SM Specification August 2006
Figure 5: Downstream per-interface (S,G,rpt) state machine
in tabular form
+----------++----------------------------------------------------------+
| || Event |
| ++---------+----------+----------+--------+--------+--------+
|Prev ||Receive | Receive | Receive | End of | Prune- | Expiry |
|State ||Join(*,G)| Join | Prune | Message| Pending| Timer |
| || | (S,G,rpt)| (S,G,rpt)| | Timer | Expires|
| || | | | | Expires| |
+----------++---------+----------+----------+--------+--------+--------+
| ||- | - | -> PP | - | - | - |
| || | | state | | | |
| || | | start | | | |
|NoInfo || | | Prune- | | | |
|(NI) || | | Pending | | | |
| || | | Timer; | | | |
| || | | start | | | |
| || | | Expiry | | | |
| || | | Timer | | | |
+----------++---------+----------+----------+--------+--------+--------+
| ||-> P' | -> NI | -> P | - | - | -> NI |
| ||state | state | state | | | state |
|Prune (P) || | | restart | | | |
| || | | Expiry | | | |
| || | | Timer | | | |
+----------++---------+----------+----------+--------+--------+--------+
|Prune- ||-> PP' | -> NI | - | - | -> P | - |
|Pending ||state | state | | | state | |
|(PP) || | | | | | |
+----------++---------+----------+----------+--------+--------+--------+
| ||- | - | -> P | -> NI | - | - |
|PruneTmp || | | state | state | | |
|(P') || | | restart | | | |
| || | | Expiry | | | |
| || | | Timer | | | |
+----------++---------+----------+----------+--------+--------+--------+
| ||- | - | -> PP | -> NI | - | - |
|Prune- || | | state | state | | |
|Pending- || | | restart | | | |
|Tmp (PP') || | | Expiry | | | |
| || | | Timer | | | |
+----------++---------+----------+----------+--------+--------+--------+
The transition events "Receive Join(S,G,rpt)", "Receive
Prune(S,G,rpt)", and "Receive Join(*,G)" imply receiving a Join or
Prune targeted to this router's primary IP address on the received
interface. If the upstream neighbor address field is not correct,
Fenner, et al. Standards Track [Page 58]
^L
RFC 4601 PIM-SM Specification August 2006
these state transitions in this state machine must not occur,
although seeing such a packet may cause state transitions in other
state machines.
On unnumbered interfaces on point-to-point links, the router's
address should be the same as the source address it chose for the
Hello message it sent over that interface. However, on point-to-
point links we also recommend that PIM Join/Prune messages with an
upstream neighbor address field of all zeros are also accepted.
Transitions from NoInfo State
When in NoInfo (NI) state, the following event may trigger a
transition:
Receive Prune(S,G,rpt)
A Prune(S,G,rpt) is received on interface I with its Upstream
Neighbor Address set to the router's primary IP address on I.
The (S,G,rpt) downstream state machine on interface I
transitions to the Prune-Pending state. The Expiry Timer (ET)
is started and set to the HoldTime from the triggering
Join/Prune message. The Prune-Pending Timer is started. It
is set to the J/P_Override_Interval(I) if the router has more
than one neighbor on that interface; otherwise, it is set to
zero, causing it to expire immediately.
Transitions from Prune-Pending State
When in Prune-Pending (PP) state, the following events may trigger a
transition:
Receive Join(*,G)
A Join(*,G) is received on interface I with its Upstream
Neighbor Address set to the router's primary IP address on I.
The (S,G,rpt) downstream state machine on interface I
transitions to Prune-Pending-Tmp state whilst the remainder of
the compound Join/Prune message containing the Join(*,G) is
processed.
Receive Join(S,G,rpt)
A Join(S,G,rpt) is received on interface I with its Upstream
Neighbor Address set to the router's primary IP address on I.
The (S,G,rpt) downstream state machine on interface I
transitions to NoInfo state. ET and PPT are canceled.
Fenner, et al. Standards Track [Page 59]
^L
RFC 4601 PIM-SM Specification August 2006
Prune-Pending Timer Expires
The Prune-Pending Timer for the (S,G,rpt) downstream state
machine on interface I expires.
The (S,G,rpt) downstream state machine on interface I
transitions to the Prune state.
Transitions from Prune State
When in Prune (P) state, the following events may trigger a
transition:
Receive Join(*,G)
A Join(*,G) is received on interface I with its Upstream
Neighbor Address set to the router's primary IP address on I.
The (S,G,rpt) downstream state machine on interface I
transitions to PruneTmp state whilst the remainder of the
compound Join/Prune message containing the Join(*,G) is
processed.
Receive Join(S,G,rpt)
A Join(S,G,rpt) is received on interface I with its Upstream
Neighbor Address set to the router's primary IP address on I.
The (S,G,rpt) downstream state machine on interface I
transitions to NoInfo state. ET and PPT are canceled.
Receive Prune(S,G,rpt)
A Prune(S,G,rpt) is received on interface I with its Upstream
Neighbor Address set to the router's primary IP address on I.
The (S,G,rpt) downstream state machine on interface I remains
in Prune state. The Expiry Timer (ET) is restarted, set to
maximum of its current value and the HoldTime from the
triggering Join/Prune message.
Expiry Timer Expires
The Expiry Timer for the (S,G,rpt) downstream state machine on
interface I expires.
The (S,G,rpt) downstream state machine on interface I
transitions to the NoInfo state.
Transitions from Prune-Pending-Tmp State
When in Prune-Pending-Tmp (PP') state and processing a compound
Join/Prune message, the following events may trigger a transition:
Fenner, et al. Standards Track [Page 60]
^L
RFC 4601 PIM-SM Specification August 2006
Receive Prune(S,G,rpt)
The compound Join/Prune message contains a Prune(S,G,rpt).
The (S,G,rpt) downstream state machine on interface I
transitions back to the Prune-Pending state. The Expiry Timer
(ET) is restarted, set to maximum of its current value and the
HoldTime from the triggering Join/Prune message.
End of Message
The end of the compound Join/Prune message is reached.
The (S,G,rpt) downstream state machine on interface I
transitions to the NoInfo state. ET and PPT are canceled.
Transitions from PruneTmp State
When in PruneTmp (P') state and processing a compound Join/Prune
message, the following events may trigger a transition:
Receive Prune(S,G,rpt)
The compound Join/Prune message contains a Prune(S,G,rpt).
The (S,G,rpt) downstream state machine on interface I
transitions back to the Prune state. The Expiry Timer (ET) is
restarted, set to maximum of its current value and the
HoldTime from the triggering Join/Prune message.
End of Message
The end of the compound Join/Prune message is reached.
The (S,G,rpt) downstream state machine on interface I
transitions to the NoInfo state. ET is canceled.
Notes:
Receiving a Prune(*,G) does not affect the (S,G,rpt) downstream state
machine.
Receiving a Join(*,*,RP) does not affect the (S,G,rpt) downstream
state machine. If a router has originated Join(*,*,RP) and pruned a
source off it using Prune(S,G,rpt), then to receive that source again
it should explicitly re-join using Join(S,G,rpt) or Join(*,G). In
some LAN topologies it is possible for a router sending a new
Join(*,*,RP) to have to wait as much as a Join/Prune Interval before
noticing that it needs to override a neighbor's preexisting
Prune(S,G,rpt). This is considered acceptable, as (*,*,RP) state is
intended to be used only in long-lived and persistent scenarios.
Fenner, et al. Standards Track [Page 61]
^L
RFC 4601 PIM-SM Specification August 2006
4.5.5. Sending (*,*,RP) Join/Prune Messages
The per-interface state machines for (*,*,RP) hold join state from
downstream PIM routers. This state then determines whether a router
needs to propagate a Join(*,*,RP) upstream towards the RP.
If a router wishes to propagate a Join(*,*,RP) upstream, it must also
watch for messages on its upstream interface from other routers on
that subnet, and these may modify its behavior. If it sees a
Join(*,*,RP) to the correct upstream neighbor, it should suppress its
own Join(*,*,RP). If it sees a Prune(*,*,RP) to the correct upstream
neighbor, it should be prepared to override that prune by sending a
Join(*,*,RP) almost immediately. Finally, if it sees the Generation
ID (see Section 4.3) of the correct upstream neighbor change, it
knows that the upstream neighbor has lost state, and it should be
prepared to refresh the state by sending a Join(*,*,RP) almost
immediately.
In addition, if the MRIB changes to indicate that the next hop
towards the RP has changed, the router should prune off from the old
next hop and join towards the new next hop.
The upstream (*,*,RP) state machine contains only two states:
Not Joined
The downstream state machines and local membership information do
not indicate that the router needs to join the (*,*,RP) tree for
this RP.
Joined
The downstream state machines and local membership information
indicate that the router should join the (*,*,RP) tree for this
RP.
In addition, one timer JT(*,*,RP) is kept that is used to trigger the
sending of a Join(*,*,RP) to the upstream next hop towards the RP,
NBR(RPF_interface(RP), MRIB.next_hop(RP)).
Fenner, et al. Standards Track [Page 62]
^L
RFC 4601 PIM-SM Specification August 2006
Figure 6: Upstream (*,*,RP) state machine in tabular form
+-------------------++-------------------------------------------------+
| || Event |
| Prev State ++-------------------------+-----------------------+
| || JoinDesired | JoinDesired |
| || (*,*,RP) ->True | (*,*,RP) ->False |
+-------------------++-------------------------+-----------------------+
| || -> J state | - |
| NotJoined (NJ) || Send Join(*,*,RP); | |
| || Set Join Timer to | |
| || t_periodic | |
+-------------------++-------------------------+-----------------------+
| Joined (J) || - | -> NJ state |
| || | Send Prune |
| || | (*,*,RP); Cancel |
| || | Join Timer |
+-------------------++-------------------------+-----------------------+
In addition, we have the following transitions, which occur within
the Joined state:
+----------------------------------------------------------------------+
| In Joined (J) State |
+-------------------+--------------------+-----------------------------+
| Timer Expires | See | See |
| | Join(*,*,RP) | Prune(*,*,RP) |
| | to MRIB. | to MRIB. |
| | next_hop(RP) | next_hop(RP) |
+-------------------+--------------------+-----------------------------+
| Send | Increase Join | Decrease Join |
| Join(*,*,RP); | Timer to | Timer to |
| Set Join Timer | t_joinsuppress | t_override |
| to t_periodic | | |
+-------------------+--------------------+-----------------------------+
Fenner, et al. Standards Track [Page 63]
^L
RFC 4601 PIM-SM Specification August 2006
+----------------------------------------------------------------------+
| In Joined (J) State |
+-----------------------------------+----------------------------------+
| NBR(RPF_interface(RP), | MRIB.next_hop(RP) GenID |
| MRIB.next_hop(RP)) | changes |
| changes | |
+-----------------------------------+----------------------------------+
| Send Join(*,*,RP) to new | Decrease Join Timer to |
| next hop; Send | t_override |
| Prune(*,*,RP) to old | |
| next hop; set Join Timer | |
| to t_periodic | |
+-----------------------------------+----------------------------------+
This state machine uses the following macro:
bool JoinDesired(*,*,RP) {
if immediate_olist(*,*,RP) != NULL
return TRUE
else
return FALSE
}
JoinDesired(*,*,RP) is true when the router has received (*,*,RP)
Joins from any downstream interface. Note that although JoinDesired
is true, the router's sending of a Join(*,*,RP) message may be
suppressed by another router sending a Join(*,*,RP) onto the upstream
interface.
Transitions from NotJoined State
When the upstream (*,*,RP) state machine is in NotJoined state, the
following event may trigger a state transition:
JoinDesired(*,*,RP) becomes True
The downstream state for (*,*,RP) has changed so that at least
one interface is in immediate_olist(*,*,RP), making
JoinDesired(*,*,RP) become True.
The upstream (*,*,RP) state machine transitions to Joined
state. Send Join(*,*,RP) to the appropriate upstream
neighbor, which is NBR(RPF_interface(RP), MRIB.next_hop(RP)).
Set the Join Timer (JT) to expire after t_periodic seconds.
Transitions from Joined State
When the upstream (*,*,RP) state machine is in Joined state, the
following events may trigger state transitions:
Fenner, et al. Standards Track [Page 64]
^L
RFC 4601 PIM-SM Specification August 2006
JoinDesired(*,*,RP) becomes False
The downstream state for (*,*,RP) has changed so no interface
is in immediate_olist(*,*,RP), making JoinDesired(*,*,RP)
become False.
The upstream (*,*,RP) state machine transitions to NotJoined
state. Send Prune(*,*,RP) to the appropriate upstream
neighbor, which is NBR(RPF_interface(RP), MRIB.next_hop(RP)).
Cancel the Join Timer (JT).
Join Timer Expires
The Join Timer (JT) expires, indicating time to send a
Join(*,*,RP)
Send Join(*,*,RP) to the appropriate upstream neighbor, which
is NBR(RPF_interface(RP), MRIB.next_hop(RP)). Restart the
Join Timer (JT) to expire after t_periodic seconds.
See Join(*,*,RP) to MRIB.next_hop(RP)
This event is only relevant if RPF_interface(RP) is a shared
medium. This router sees another router on RPF_interface(RP)
send a Join(*,*,RP) to NBR(RPF_interface(RP),
MRIB.next_hop(RP)). This causes this router to suppress its
own Join.
The upstream (*,*,RP) state machine remains in Joined state.
Let t_joinsuppress be the minimum of t_suppressed and the
HoldTime from the Join/Prune message triggering this event.
If the Join Timer is set to expire in less than t_joinsuppress
seconds, reset it so that it expires after t_joinsuppress
seconds. If the Join Timer is set to expire in more than
t_joinsuppress seconds, leave it unchanged.
See Prune(*,*,RP) to MRIB.next_hop(RP)
This event is only relevant if RPF_interface(RP) is a shared
medium. This router sees another router on RPF_interface(RP)
send a Prune(*,*,RP) to NBR(RPF_interface(RP),
MRIB.next_hop(RP)). As this router is in Joined state, it
must override the Prune after a short random interval.
The upstream (*,*,RP) state machine remains in Joined state.
If the Join Timer is set to expire in more than t_override
seconds, reset it so that it expires after t_override seconds.
If the Join Timer is set to expire in less than t_override
seconds, leave it unchanged.
Fenner, et al. Standards Track [Page 65]
^L
RFC 4601 PIM-SM Specification August 2006
NBR(RPF_interface(RP), MRIB.next_hop(RP)) changes
A change in the MRIB routing base causes the next hop towards
the RP to change.
The upstream (*,*,RP) state machine remains in Joined state.
Send Join(*,*,RP) to the new upstream neighbor, which is the
new value of NBR(RPF_interface(RP), MRIB.next_hop(RP)). Send
Prune(*,*,RP) to the old upstream neighbor, which is the old
value of NBR(RPF_interface(RP), MRIB.next_hop(RP)). Set the
Join Timer (JT) to expire after t_periodic seconds.
MRIB.next_hop(RP) GenID changes
The Generation ID of the router that is MRIB.next_hop(RP)
changes. This normally means that this neighbor has lost
state, and so the state must be refreshed.
The upstream (*,*,RP) state machine remains in Joined state.
If the Join Timer is set to expire in more than t_override
seconds, reset it so that it expires after t_override seconds.
4.5.6. Sending (*,G) Join/Prune Messages
The per-interface state machines for (*,G) hold join state from
downstream PIM routers. This state then determines whether a router
needs to propagate a Join(*,G) upstream towards the RP.
If a router wishes to propagate a Join(*,G) upstream, it must also
watch for messages on its upstream interface from other routers on
that subnet, and these may modify its behavior. If it sees a
Join(*,G) to the correct upstream neighbor, it should suppress its
own Join(*,G). If it sees a Prune(*,G) to the correct upstream
neighbor, it should be prepared to override that prune by sending a
Join(*,G) almost immediately. Finally, if it sees the Generation ID
(see Section 4.3) of the correct upstream neighbor change, it knows
that the upstream neighbor has lost state, and it should be prepared
to refresh the state by sending a Join(*,G) almost immediately.
If a (*,G) Assert occurs on the upstream interface, and this changes
this router's idea of the upstream neighbor, it should be prepared to
ensure that the Assert winner is aware of downstream routers by
sending a Join(*,G) almost immediately.
In addition, if the MRIB changes to indicate that the next hop
towards the RP has changed, and either the upstream interface changes
or there is no Assert winner on the upstream interface, the router
should prune off from the old next hop and join towards the new next
hop.
Fenner, et al. Standards Track [Page 66]
^L
RFC 4601 PIM-SM Specification August 2006
The upstream (*,G) state machine only contains two states:
Not Joined
The downstream state machines indicate that the router does not
need to join the RP tree for this group.
Joined
The downstream state machines indicate that the router should join
the RP tree for this group.
In addition, one timer JT(*,G) is kept that is used to trigger the
sending of a Join(*,G) to the upstream next hop towards the RP,
RPF'(*,G).
Figure 7: Upstream (*,G) state machine in tabular form
+-------------------++-------------------------------------------------+
| || Event |
| Prev State ++------------------------+------------------------+
| || JoinDesired(*,G) | JoinDesired(*,G) |
| || ->True | ->False |
+-------------------++------------------------+------------------------+
| || -> J state | - |
| NotJoined (NJ) || Send Join(*,G); | |
| || Set Join Timer to | |
| || t_periodic | |
+-------------------++------------------------+------------------------+
| Joined (J) || - | -> NJ state |
| || | Send Prune(*,G); |
| || | Cancel Join Timer |
+-------------------++------------------------+------------------------+
In addition, we have the following transitions, which occur within
the Joined state:
+----------------------------------------------------------------------+
| In Joined (J) State |
+----------------+-----------------+-----------------+-----------------+
|Timer Expires | See Join(*,G) | See Prune(*,G) | RPF'(*,G) |
| | to RPF'(*,G) | to RPF'(*,G) | changes due to |
| | | | an Assert |
+----------------+-----------------+-----------------+-----------------+
|Send | Increase Join | Decrease Join | Decrease Join |
|Join(*,G); Set | Timer to | Timer to | Timer to |
|Join Timer to | t_joinsuppress | t_override | t_override |
|t_periodic | | | |
+----------------+-----------------+-----------------+-----------------+
Fenner, et al. Standards Track [Page 67]
^L
RFC 4601 PIM-SM Specification August 2006
+----------------------------------------------------------------------+
| In Joined (J) State |
+----------------------------------+-----------------------------------+
| RPF'(*,G) changes not | RPF'(*,G) GenID changes |
| due to an Assert | |
+----------------------------------+-----------------------------------+
| Send Join(*,G) to new | Decrease Join Timer to |
| next hop; Send | t_override |
| Prune(*,G) to old next | |
| hop; Set Join Timer to | |
| t_periodic | |
+----------------------------------+-----------------------------------+
This state machine uses the following macro:
bool JoinDesired(*,G) {
if (immediate_olist(*,G) != NULL OR
(JoinDesired(*,*,RP(G)) AND
AssertWinner(*, G, RPF_interface(RP(G))) != NULL))
return TRUE
else
return FALSE
}
JoinDesired(*,G) is true when the router has forwarding state that
would cause it to forward traffic for G using shared tree state.
Note that although JoinDesired is true, the router's sending of a
Join(*,G) message may be suppressed by another router sending a
Join(*,G) onto the upstream interface.
Transitions from NotJoined State
When the upstream (*,G) state machine is in NotJoined state, the
following event may trigger a state transition:
JoinDesired(*,G) becomes True
The macro JoinDesired(*,G) becomes True, e.g., because the
downstream state for (*,G) has changed so that at least one
interface is in immediate_olist(*,G).
The upstream (*,G) state machine transitions to Joined state.
Send Join(*,G) to the appropriate upstream neighbor, which is
RPF'(*,G). Set the Join Timer (JT) to expire after t_periodic
seconds.
Fenner, et al. Standards Track [Page 68]
^L
RFC 4601 PIM-SM Specification August 2006
Transitions from Joined State
When the upstream (*,G) state machine is in Joined state, the
following events may trigger state transitions:
JoinDesired(*,G) becomes False
The macro JoinDesired(*,G) becomes False, e.g., because the
downstream state for (*,G) has changed so no interface is in
immediate_olist(*,G).
The upstream (*,G) state machine transitions to NotJoined
state. Send Prune(*,G) to the appropriate upstream neighbor,
which is RPF'(*,G). Cancel the Join Timer (JT).
Join Timer Expires
The Join Timer (JT) expires, indicating time to send a
Join(*,G)
Send Join(*,G) to the appropriate upstream neighbor, which is
RPF'(*,G). Restart the Join Timer (JT) to expire after
t_periodic seconds.
See Join(*,G) to RPF'(*,G)
This event is only relevant if RPF_interface(RP(G)) is a
shared medium. This router sees another router on
RPF_interface(RP(G)) send a Join(*,G) to RPF'(*,G). This
causes this router to suppress its own Join.
The upstream (*,G) state machine remains in Joined state.
Let t_joinsuppress be the minimum of t_suppressed and the
HoldTime from the Join/Prune message triggering this event.
If the Join Timer is set to expire in less than t_joinsuppress
seconds, reset it so that it expires after t_joinsuppress
seconds. If the Join Timer is set to expire in more than
t_joinsuppress seconds, leave it unchanged.
See Prune(*,G) to RPF'(*,G)
This event is only relevant if RPF_interface(RP(G)) is a
shared medium. This router sees another router on
RPF_interface(RP(G)) send a Prune(*,G) to RPF'(*,G). As this
router is in Joined state, it must override the Prune after a
short random interval.
Fenner, et al. Standards Track [Page 69]
^L
RFC 4601 PIM-SM Specification August 2006
The upstream (*,G) state machine remains in Joined state. If
the Join Timer is set to expire in more than t_override
seconds, reset it so that it expires after t_override seconds.
If the Join Timer is set to expire in less than t_override
seconds, leave it unchanged.
RPF'(*,G) changes due to an Assert
The current next hop towards the RP changes due to an
Assert(*,G) on the RPF_interface(RP(G)).
The upstream (*,G) state machine remains in Joined state. If
the Join Timer is set to expire in more than t_override
seconds, reset it so that it expires after t_override seconds.
If the Join Timer is set to expire in less than t_override
seconds, leave it unchanged.
RPF'(*,G) changes not due to an Assert
An event occurred that caused the next hop towards the RP for
G to change. This may be caused by a change in the MRIB
routing database or the group-to-RP mapping. Note that this
transition does not occur if an Assert is active and the
upstream interface does not change.
The upstream (*,G) state machine remains in Joined state.
Send Join(*,G) to the new upstream neighbor, which is the new
value of RPF'(*,G). Send Prune(*,G) to the old upstream
neighbor, which is the old value of RPF'(*,G). Use the new
value of RP(G) in the Prune(*,G) message or all zeros if RP(G)
becomes unknown (old value of RP(G) may be used instead to
improve behavior in routers implementing older versions of
this spec). Set the Join Timer (JT) to expire after
t_periodic seconds.
RPF'(*,G) GenID changes
The Generation ID of the router that is RPF'(*,G) changes.
This normally means that this neighbor has lost state, and so
the state must be refreshed.
The upstream (*,G) state machine remains in Joined state. If
the Join Timer is set to expire in more than t_override
seconds, reset it so that it expires after t_override seconds.
Fenner, et al. Standards Track [Page 70]
^L
RFC 4601 PIM-SM Specification August 2006
4.5.7. Sending (S,G) Join/Prune Messages
The per-interface state machines for (S,G) hold join state from
downstream PIM routers. This state then determines whether a router
needs to propagate a Join(S,G) upstream towards the source.
If a router wishes to propagate a Join(S,G) upstream, it must also
watch for messages on its upstream interface from other routers on
that subnet, and these may modify its behavior. If it sees a
Join(S,G) to the correct upstream neighbor, it should suppress its
own Join(S,G). If it sees a Prune(S,G), Prune(S,G,rpt), or
Prune(*,G) to the correct upstream neighbor towards S, it should be
prepared to override that prune by scheduling a Join(S,G) to be sent
almost immediately. Finally, if it sees the Generation ID of its
upstream neighbor change, it knows that the upstream neighbor has
lost state, and it should refresh the state by scheduling a Join(S,G)
to be sent almost immediately.
If a (S,G) Assert occurs on the upstream interface, and this changes
the this router's idea of the upstream neighbor, it should be
prepared to ensure that the Assert winner is aware of downstream
routers by scheduling a Join(S,G) to be sent almost immediately.
In addition, if MRIB changes cause the next hop towards the source to
change, and either the upstream interface changes or there is no
Assert winner on the upstream interface, the router should send a
prune to the old next hop and a join to the new next hop.
The upstream (S,G) state machine only contains two states:
Not Joined
The downstream state machines and local membership information do
not indicate that the router needs to join the shortest-path tree
for this (S,G).
Joined
The downstream state machines and local membership information
indicate that the router should join the shortest-path tree for
this (S,G).
In addition, one timer JT(S,G) is kept that is used to trigger the
sending of a Join(S,G) to the upstream next hop towards S, RPF'(S,G).
Fenner, et al. Standards Track [Page 71]
^L
RFC 4601 PIM-SM Specification August 2006
Figure 8: Upstream (S,G) state machine in tabular form
+-------------------+--------------------------------------------------+
| | Event |
| Prev State +-------------------------+------------------------+
| | JoinDesired(S,G) | JoinDesired(S,G) |
| | ->True | ->False |
+-------------------+-------------------------+------------------------+
| NotJoined (NJ) | -> J state | - |
| | Send Join(S,G); | |
| | Set Join Timer to | |
| | t_periodic | |
+-------------------+-------------------------+------------------------+
| Joined (J) | - | -> NJ state |
| | | Send Prune(S,G); |
| | | Set SPTbit(S,G) to |
| | | FALSE; Cancel Join |
| | | Timer |
+-------------------+-------------------------+------------------------+
In addition, we have the following transitions, which occur within
the Joined state:
+----------------------------------------------------------------------+
| In Joined (J) State |
+-----------------+-----------------+-----------------+----------------+
| Timer Expires | See Join(S,G) | See Prune(S,G) | See Prune |
| | to RPF'(S,G) | to RPF'(S,G) | (S,G,rpt) to |
| | | | RPF'(S,G) |
+-----------------+-----------------+-----------------+----------------+
| Send | Increase Join | Decrease Join | Decrease Join |
| Join(S,G); Set | Timer to | Timer to | Timer to |
| Join Timer to | t_joinsuppress | t_override | t_override |
| t_periodic | | | |
+-----------------+-----------------+-----------------+----------------+
Fenner, et al. Standards Track [Page 72]
^L
RFC 4601 PIM-SM Specification August 2006
+----------------------------------------------------------------------+
| In Joined (J) State |
+-----------------+-----------------+----------------+-----------------+
| See Prune(*,G) | RPF'(S,G) | RPF'(S,G) | RPF'(S,G) |
| to RPF'(S,G) | changes not | GenID changes | changes due to |
| | due to an | | an Assert |
| | Assert | | |
+-----------------+-----------------+----------------+-----------------+
| Decrease Join | Send Join(S,G) | Decrease Join | Decrease Join |
| Timer to | to new next | Timer to | Timer to |
| t_override | hop; Send | t_override | t_override |
| | Prune(S,G) to | | |
| | old next hop; | | |
| | Set Join Timer | | |
| | to t_periodic | | |
+-----------------+-----------------+----------------+-----------------+
This state machine uses the following macro:
bool JoinDesired(S,G) {
return( immediate_olist(S,G) != NULL
OR ( KeepaliveTimer(S,G) is running
AND inherited_olist(S,G) != NULL ) )
}
JoinDesired(S,G) is true when the router has forwarding state that
would cause it to forward traffic for G using source tree state. The
source tree state can be as a result of either active source-specific
join state, or the (S,G) Keepalive Timer and active non-source-
specific state. Note that although JoinDesired is true, the router's
sending of a Join(S,G) message may be suppressed by another router
sending a Join(S,G) onto the upstream interface.
Transitions from NotJoined State
When the upstream (S,G) state machine is in NotJoined state, the
following event may trigger a state transition:
JoinDesired(S,G) becomes True
The macro JoinDesired(S,G) becomes True, e.g., because the
downstream state for (S,G) has changed so that at least one
interface is in inherited_olist(S,G).
The upstream (S,G) state machine transitions to Joined state.
Send Join(S,G) to the appropriate upstream neighbor, which is
RPF'(S,G). Set the Join Timer (JT) to expire after t_periodic
seconds.
Fenner, et al. Standards Track [Page 73]
^L
RFC 4601 PIM-SM Specification August 2006
Transitions from Joined State
When the upstream (S,G) state machine is in Joined state, the
following events may trigger state transitions:
JoinDesired(S,G) becomes False
The macro JoinDesired(S,G) becomes False, e.g., because the
downstream state for (S,G) has changed so no interface is in
inherited_olist(S,G).
The upstream (S,G) state machine transitions to NotJoined
state. Send Prune(S,G) to the appropriate upstream neighbor,
which is RPF'(S,G). Cancel the Join Timer (JT), and set
SPTbit(S,G) to FALSE.
Join Timer Expires
The Join Timer (JT) expires, indicating time to send a
Join(S,G)
Send Join(S,G) to the appropriate upstream neighbor, which is
RPF'(S,G). Restart the Join Timer (JT) to expire after
t_periodic seconds.
See Join(S,G) to RPF'(S,G)
This event is only relevant if RPF_interface(S) is a shared
medium. This router sees another router on RPF_interface(S)
send a Join(S,G) to RPF'(S,G). This causes this router to
suppress its own Join.
The upstream (S,G) state machine remains in Joined state.
Let t_joinsuppress be the minimum of t_suppressed and the
HoldTime from the Join/Prune message triggering this event.
If the Join Timer is set to expire in less than t_joinsuppress
seconds, reset it so that it expires after t_joinsuppress
seconds. If the Join Timer is set to expire in more than
t_joinsuppress seconds, leave it unchanged.
See Prune(S,G) to RPF'(S,G)
This event is only relevant if RPF_interface(S) is a shared
medium. This router sees another router on RPF_interface(S)
send a Prune(S,G) to RPF'(S,G). As this router is in Joined
state, it must override the Prune after a short random
interval.
Fenner, et al. Standards Track [Page 74]
^L
RFC 4601 PIM-SM Specification August 2006
The upstream (S,G) state machine remains in Joined state. If
the Join Timer is set to expire in more than t_override
seconds, reset it so that it expires after t_override seconds.
See Prune(S,G,rpt) to RPF'(S,G)
This event is only relevant if RPF_interface(S) is a shared
medium. This router sees another router on RPF_interface(S)
send a Prune(S,G,rpt) to RPF'(S,G). If the upstream router is
an RFC-2362-compliant PIM router, then the Prune(S,G,rpt) will
cause it to stop forwarding. For backwards compatibility,
this router should override the prune so that forwarding
continues.
The upstream (S,G) state machine remains in Joined state. If
the Join Timer is set to expire in more than t_override
seconds, reset it so that it expires after t_override seconds.
See Prune(*,G) to RPF'(S,G)
This event is only relevant if RPF_interface(S) is a shared
medium. This router sees another router on RPF_interface(S)
send a Prune(*,G) to RPF'(S,G). If the upstream router is an
RFC-2362-compliant PIM router, then the Prune(*,G) will cause
it to stop forwarding. For backwards compatibility, this
router should override the prune so that forwarding continues.
The upstream (S,G) state machine remains in Joined state. If
the Join Timer is set to expire in more than t_override
seconds, reset it so that it expires after t_override seconds.
RPF'(S,G) changes due to an Assert
The current next hop towards S changes due to an Assert(S,G)
on the RPF_interface(S).
The upstream (S,G) state machine remains in Joined state. If
the Join Timer is set to expire in more than t_override
seconds, reset it so that it expires after t_override seconds.
If the Join Timer is set to expire in less than t_override
seconds, leave it unchanged.
RPF'(S,G) changes not due to an Assert
An event occurred that caused the next hop towards S to
change. Note that this transition does not occur if an Assert
is active and the upstream interface does not change.
Fenner, et al. Standards Track [Page 75]
^L
RFC 4601 PIM-SM Specification August 2006
The upstream (S,G) state machine remains in Joined state.
Send Join(S,G) to the new upstream neighbor, which is the new
value of RPF'(S,G). Send Prune(S,G) to the old upstream
neighbor, which is the old value of RPF'(S,G). Set the Join
Timer (JT) to expire after t_periodic seconds.
RPF'(S,G) GenID changes
The Generation ID of the router that is RPF'(S,G) changes.
This normally means that this neighbor has lost state, and so
the state must be refreshed.
The upstream (S,G) state machine remains in Joined state. If
the Join Timer is set to expire in more than t_override
seconds, reset it so that it expires after t_override seconds.
4.5.8. (S,G,rpt) Periodic Messages
(S,G,rpt) Joins and Prunes are (S,G) Joins or Prunes sent on the RP
tree with the RPT bit set, either to modify the results of (*,G)
Joins, or to override the behavior of other upstream LAN peers. The
next section describes the rules for sending triggered messages.
This section describes the rules for including a Prune(S,G,rpt)
message with a Join(*,G).
When a router is going to send a Join(*,G), it should use the
following pseudocode, for each (S,G) for which it has state, to
decide whether to include a Prune(S,G,rpt) in the compound Join/Prune
message:
if( SPTbit(S,G) == TRUE ) {
# Note: If receiving (S,G) on the SPT, we only prune off the
# shared tree if the RPF neighbors differ.
if( RPF'(*,G) != RPF'(S,G) ) {
add Prune(S,G,rpt) to compound message
}
} else if ( inherited_olist(S,G,rpt) == NULL ) {
# Note: all (*,G) olist interfaces received RPT prunes for (S,G).
add Prune(S,G,rpt) to compound message
} else if ( RPF'(*,G) != RPF'(S,G,rpt) {
# Note: we joined the shared tree, but there was an (S,G) assert
# and the source tree RPF neighbor is different.
add Prune(S,G,rpt) to compound message
}
Note that Join(S,G,rpt) is normally sent not as a periodic message,
but only as a triggered message.
Fenner, et al. Standards Track [Page 76]
^L
RFC 4601 PIM-SM Specification August 2006
4.5.9. State Machine for (S,G,rpt) Triggered Messages
The state machine for (S,G,rpt) triggered messages is required per-
(S,G) when there is (*,G) or (*,*,RP) join state at a router, and the
router or any of its upstream LAN peers wishes to prune S off the RP
tree.
There are three states in the state machine. One of the states is
when there is neither (*,G) nor (*,*,RP(G)) join state at this
router. If there is (*,G) or (*,*,RP(G)) join state at the router,
then the state machine must be at one of the other two states. The
three states are:
Pruned(S,G,rpt)
(*,G) or (*,*,RP(G)) Joined, but (S,G,rpt) pruned
NotPruned(S,G,rpt)
(*,G) or (*,*,RP(G)) Joined, and (S,G,rpt) not pruned
RPTNotJoined(G)
neither (*,G) nor (*,*,RP(G)) has been joined.
In addition, there is an (S,G,rpt) Override Timer, OT(S,G,rpt), which
is used to delay triggered Join(S,G,rpt) messages to prevent
implosions of triggered messages.
Fenner, et al. Standards Track [Page 77]
^L
RFC 4601 PIM-SM Specification August 2006
Figure 9: Upstream (S,G,rpt) state machine for triggered messages
in tabular form
+------------++--------------------------------------------------------+
| || Event |
| ++--------------+--------------+-------------+------------+
|Prev State || PruneDesired | PruneDesired | RPTJoin | inherited_ |
| || (S,G,rpt) | (S,G,rpt) | Desired(G) | olist |
| || ->True | ->False | ->False | (S,G,rpt) |
| || | | | ->non-NULL |
+------------++--------------+--------------+-------------+------------+
|RPTNotJoined|| -> P state | - | - | -> NP state|
|(G) (NJ) || | | | |
+------------++--------------+--------------+-------------+------------+
|Pruned || - | -> NP state | -> NJ state | - |
|(S,G,rpt) || | Send Join | | |
|(P) || | (S,G,rpt) | | |
+------------++--------------+--------------+-------------+------------+
|NotPruned || -> P state | - | -> NJ state | - |
|(S,G,rpt) || Send Prune | | Cancel OT | |
|(NP) || (S,G,rpt); | | | |
| || Cancel OT | | | |
+------------++--------------+--------------+-------------+------------+
Additionally, we have the following transitions within the
NotPruned(S,G,rpt) state, which are all used for prune override
behavior.
+----------------------------------------------------------------------+
| In NotPruned(S,G,rpt) State |
+----------+--------------+--------------+--------------+--------------+
|Override | See Prune | See Join | See Prune | RPF' |
|Timer | (S,G,rpt) to | (S,G,rpt) to | (S,G) to | (S,G,rpt) -> |
|expires | RPF' | RPF' | RPF' | RPF' (*,G) |
| | (S,G,rpt) | (S,G,rpt) | (S,G,rpt) | |
+----------+--------------+--------------+--------------+--------------+
|Send Join | OT = min(OT, | Cancel OT | OT = min(OT, | OT = min(OT, |
|(S,G,rpt);| t_override) | | t_override) | t_override) |
|Leave OT | | | | |
|unset | | | | |
+----------+--------------+--------------+--------------+--------------+
Note that the min function in the above state machine considers a
non-running timer to have an infinite value (e.g., min(not-running,
t_override) = t_override).
Fenner, et al. Standards Track [Page 78]
^L
RFC 4601 PIM-SM Specification August 2006
This state machine uses the following macros:
bool RPTJoinDesired(G) {
return (JoinDesired(*,G) OR JoinDesired(*,*,RP(G)))
}
RPTJoinDesired(G) is true when the router has forwarding state that
would cause it to forward traffic for G using either (*,G) or
(*,*,RP) shared tree state.
bool PruneDesired(S,G,rpt) {
return ( RPTJoinDesired(G) AND
( inherited_olist(S,G,rpt) == NULL
OR (SPTbit(S,G)==TRUE
AND (RPF'(*,G) != RPF'(S,G)) )))
}
PruneDesired(S,G,rpt) can only be true if RPTJoinDesired(G) is true.
If RPTJoinDesired(G) is true, then PruneDesired(S,G,rpt) is true
either if there are no outgoing interfaces that S would be forwarded
on, or if the router has active (S,G) forwarding state but RPF'(*,G)
!= RPF'(S,G).
The state machine contains the following transition events:
See Join(S,G,rpt) to RPF'(S,G,rpt)
This event is only relevant in the "Not Pruned" state.
The router sees a Join(S,G,rpt) from someone else to
RPF'(S,G,rpt), which is the correct upstream neighbor. If we're
in "NotPruned" state and the (S,G,rpt) Override Timer is running,
then this is because we have been triggered to send our own
Join(S,G,rpt) to RPF'(S,G,rpt). Someone else beat us to it, so
there's no need to send our own Join.
The action is to cancel the Override Timer.
See Prune(S,G,rpt) to RPF'(S,G,rpt)
This event is only relevant in the "NotPruned" state.
The router sees a Prune(S,G,rpt) from someone else to
RPF'(S,G,rpt), which is the correct upstream neighbor. If we're
in the "NotPruned" state, then we want to continue to receive
traffic from S destined for G, and that traffic is being supplied
by RPF'(S,G,rpt). Thus, we need to override the Prune.
Fenner, et al. Standards Track [Page 79]
^L
RFC 4601 PIM-SM Specification August 2006
The action is to set the (S,G,rpt) Override Timer to the
randomized prune-override interval, t_override. However, if the
Override Timer is already running, we only set the timer if doing
so would set it to a lower value. At the end of this interval, if
noone else has sent a Join, then we will do so.
See Prune(S,G) to RPF'(S,G,rpt)
This event is only relevant in the "NotPruned" state.
This transition and action are the same as the above transition
and action, except that the Prune does not have the RPT bit set.
This transition is necessary to be compatible with routers
implemented from RFC2362 that don't maintain separate (S,G) and
(S,G,rpt) state.
The (S,G,rpt) prune Override Timer expires
This event is only relevant in the "NotPruned" state.
When the Override Timer expires, we must send a Join(S,G,rpt) to
RPF'(S,G,rpt) to override the Prune message that caused the timer
to be running. We only send this if RPF'(S,G,rpt) equals
RPF'(*,G); if this were not the case, then the Join might be sent
to a router that does not have (*,G) or (*,*,RP(G)) Join state,
and so the behavior would not be well defined. If RPF'(S,G,rpt)
is not the same as RPF'(*,G), then it may stop forwarding S.
However, if this happens, then the router will send an
AssertCancel(S,G), which would then cause RPF'(S,G,rpt) to become
equal to RPF'(*,G) (see below).
RPF'(S,G,rpt) changes to become equal to RPF'(*,G)
This event is only relevant in the "NotPruned" state.
RPF'(S,G,rpt) can only be different from RPF'(*,G) if an (S,G)
Assert has happened, which means that traffic from S is arriving
on the SPT, and so Prune(S,G,rpt) will have been sent to
RPF'(*,G). When RPF'(S,G,rpt) changes to become equal to
RPF'(*,G), we need to trigger a Join(S,G,rpt) to RPF'(*,G) to
cause that router to start forwarding S again.
The action is to set the (S,G,rpt) Override Timer to the
randomized prune-override interval t_override. However, if the
timer is already running, we only set the timer if doing so would
set it to a lower value. At the end of this interval, if noone
else has sent a Join, then we will do so.
PruneDesired(S,G,rpt)->TRUE
See macro above. This event is relevant in the "NotPruned" and
"RPTNotJoined(G)" states.
Fenner, et al. Standards Track [Page 80]
^L
RFC 4601 PIM-SM Specification August 2006
The router wishes to receive traffic for G, but does not wish to
receive traffic from S destined for G. This causes the router to
transition into the Pruned state.
If the router was previously in NotPruned state, then the action
is to send a Prune(S,G,rpt) to RPF'(S,G,rpt), and to cancel the
Override Timer. If the router was previously in RPTNotJoined(G)
state, then there is no need to trigger an action in this state
machine because sending a Prune(S,G,rpt) is handled by the rules
for sending the Join(*,G) or Join(*,*,RP).
PruneDesired(S,G,rpt)->FALSE
See macro above. This transition is only relevant in the "Pruned"
state.
If the router is in the Pruned(S,G,rpt) state, and
PruneDesired(S,G,rpt) changes to FALSE, this could be because the
router no longer has RPTJoinDesired(G) true, or it now wishes to
receive traffic from S again. If it is the former, then this
transition should not happen, but instead the
"RPTJoinDesired(G)->FALSE" transition should happen. Thus, this
transition should be interpreted as "PruneDesired(S,G,rpt)->FALSE
AND RPTJoinDesired(G)==TRUE".
The action is to send a Join(S,G,rpt) to RPF'(S,G,rpt).
RPTJoinDesired(G)->FALSE
This event is relevant in the "Pruned" and "NotPruned" states.
The router no longer wishes to receive any traffic destined for G
on the RP Tree. This causes a transition to the RPTNotJoined(G)
state, and the Override Timer is canceled if it was running. Any
further actions are handled by the appropriate upstream state
machine for (*,G) or (*,*,RP).
inherited_olist(S,G,rpt) becomes non-NULL
This transition is only relevant in the RPTNotJoined(G) state.
The router has joined the RP tree (handled by the (*,G) or
(*,*,RP) upstream state machine as appropriate) and wants to
receive traffic from S. This does not trigger any events in this
state machine, but causes a transition to the NotPruned(S,G,rpt)
state.
Fenner, et al. Standards Track [Page 81]
^L
RFC 4601 PIM-SM Specification August 2006
4.5.10. Background: (*,*,RP) and (S,G,rpt) Interaction
In Sections 4.5.8 and 4.5.9, the mechanisms for sending periodic and
triggered (S,G,rpt) messages are described. The astute reader will
note that periodic Prune(S,G,rpt) messages are only sent in PIM
Join/Prune messages containing a Join(*,G), whereas it is possible
for a triggered Prune(S,G,rpt) message to be sent when the router has
no (*,G) join state. This may seem like a contradiction, but in fact
it is intentional and is a side effect of not optimizing (*,*,RP)
behavior.
We first note that reception of a Join(*,*,RP) by itself does not
cancel (S,G,rpt) prune state on that interface, whereas receiving a
Join(*,G) by itself does cancel (S,G,rpt) prune state on that
interface. Similarly, reception of a Prune(*,G) on an interface with
(*,*,RP) join state does not by itself prevent forwarding of G using
the (*,*,RP) state; this is because a Prune(*,G) only serves to
cancel (*,G) join state. Conceptually (*,*,RP) state functions
"above" the normal (*,G) and (S,G) mechanisms, and so neither
Join(*,*,RP) nor Prune(*,*,RP) messages affect any other state.
The upshot of this is that to prevent forwarding (S,G) on (*,*,RP)
state, a Prune(S,G,rpt) must be used.
We also note that for historical reasons there is no Assert(*,*,RP)
message, so any forwarding contention is resolved using Assert(*,G)
messages.
We now need to consider the interaction between (*,*,RP) state and
(*,G) state. If there is a need for an assert between two upstream
routers on a LAN, we need to ensure that the correct thing happens
for all combinations of (*,*,RP) and (*,G) forwarding state. As
there is no Assert(*,*,RP) message, no router can tell whether the
assert winner has (*,*,RP) state or (*,G) state. Thus, a downstream
router has to treat the two the same and send its periodic
Prune(S,G,rpt) messages to RPF'(*,G).
To avoid needing to specify all the complex override rules between
(*,*,RP), (*,G), and (S,G,rpt), we simply require that to prune (S,G)
off the (*,*,RP) tree, a Join(*,G) must also be sent.
If a router is receiving on (*,*,RP) state and has not yet had (*,G)
state instantiated, it may still need to send a triggered
Join(S,G,rpt) to override a Prune(S,G,rpt) that it sees directed to
RPF'(*,G) on its upstream interface. Hence, triggered (S,G,rpt)
messages may be sent when JoinDesired(*,G) is false but
JoinDesired(*,*,RP) is true.
Fenner, et al. Standards Track [Page 82]
^L
RFC 4601 PIM-SM Specification August 2006
Finally, we note that there is an unoptimized case when the upstream
router on a LAN already has (*,G) join and (S,G,rpt) prune state
caused by an existing downstream router. If at this time a new
Join(*,*,RP) is sent to the upstream router from a different
downstream router, this will not override the (S,G,rpt) prune state
at the upstream router. The override will not occur until the next
time the original downstream router resends its Prune(S,G,rpt). This
case was not considered worth optimizing, as (*,*,RP) state is
generally very long lived, and so any minor delays in getting traffic
to a new PMBR seem unimportant.
4.6. PIM Assert Messages
Where multiple PIM routers peer over a shared LAN, it is possible for
more than one upstream router to have valid forwarding state for a
packet, which can lead to packet duplication (see Section 3.6). PIM
does not attempt to prevent this from occurring. Instead, it detects
when this has happened and elects a single forwarder amongst the
upstream routers to prevent further duplication. This election is
performed using PIM Assert messages. Assert messages are also
received by downstream routers on the LAN, and these cause subsequent
Join/Prune messages to be sent to the upstream router that won the
Assert.
In general, a PIM Assert message should only be accepted for
processing if it comes from a known PIM neighbor. A PIM router hears
about PIM neighbors through PIM Hello messages. If a router receives
an Assert message from a particular IP source address and it has not
seen a PIM Hello message from that source address, then the Assert
message SHOULD be discarded without further processing. In addition,
if the Hello message from a neighbor was authenticated using the
IPsec Authentication Header (AH) (see Section 6.3), then all Assert
messages from that neighbor MUST also be authenticated using IPsec
AH.
We note that some older PIM implementations incorrectly fail to send
Hello messages on point-to-point interfaces, so we also RECOMMEND
that a configuration option be provided to allow interoperation with
such older routers, but that this configuration option SHOULD NOT be
enabled by default.
4.6.1. (S,G) Assert Message State Machine
The (S,G) Assert state machine for interface I is shown in Figure 10.
There are three states:
NoInfo (NI)
This router has no (S,G) assert state on interface I.
Fenner, et al. Standards Track [Page 83]
^L
RFC 4601 PIM-SM Specification August 2006
I am Assert Winner (W)
This router has won an (S,G) assert on interface I. It is now
responsible for forwarding traffic from S destined for G out of
interface I. Irrespective of whether it is the DR for I, while a
router is the assert winner, it is also responsible for forwarding
traffic onto I on behalf of local hosts on I that have made
membership requests that specifically refer to S (and G).
I am Assert Loser (L)
This router has lost an (S,G) assert on interface I. It must not
forward packets from S destined for G onto interface I. If it is
the DR on I, it is no longer responsible for forwarding traffic
onto I to satisfy local hosts with membership requests that
specifically refer to S and G.
In addition, there is also an Assert Timer (AT) that is used to time
out asserts on the assert losers and to resend asserts on the assert
winner.
Figure 10: Per-interface (S,G) Assert State machine in tabular form
+----------------------------------------------------------------------+
| In NoInfo (NI) State |
+---------------+-------------------+------------------+---------------+
| Receive | Receive Assert | Data arrives | Receive |
| Inferior | with RPTbit | from S to G on | Acceptable |
| Assert with | set and | I and | Assert with |
| RPTbit clear | CouldAssert | CouldAssert | RPTbit clear |
| and | (S,G,I) | (S,G,I) | and AssTrDes |
| CouldAssert | | | (S,G,I) |
| (S,G,I) | | | |
+---------------+-------------------+------------------+---------------+
| -> W state | -> W state | -> W state | -> L state |
| [Actions A1] | [Actions A1] | [Actions A1] | [Actions A6] |
+---------------+-------------------+------------------+---------------+
+----------------------------------------------------------------------+
| In I Am Assert Winner (W) State |
+----------------+------------------+-----------------+----------------+
| Assert Timer | Receive | Receive | CouldAssert |
| Expires | Inferior | Preferred | (S,G,I) -> |
| | Assert | Assert | FALSE |
+----------------+------------------+-----------------+----------------+
| -> W state | -> W state | -> L state | -> NI state |
| [Actions A3] | [Actions A3] | [Actions A2] | [Actions A4] |
+----------------+------------------+-----------------+----------------+
Fenner, et al. Standards Track [Page 84]
^L
RFC 4601 PIM-SM Specification August 2006
+---------------------------------------------------------------------+
| In I Am Assert Loser (L) State |
+-------------+-------------+-------------+-------------+-------------+
|Receive |Receive |Receive |Assert Timer |Current |
|Preferred |Acceptable |Inferior |Expires |Winner's |
|Assert |Assert with |Assert or | |GenID |
| |RPTbit clear |Assert | |Changes or |
| |from Current |Cancel from | |NLT Expires |
| |Winner |Current | | |
| | |Winner | | |
+-------------+-------------+-------------+-------------+-------------+
|-> L state |-> L state |-> NI state |-> NI state |-> NI state |
|[Actions A2] |[Actions A2] |[Actions A5] |[Actions A5] |[Actions A5] |
+-------------+-------------+-------------+-------------+-------------+
+----------------------------------------------------------------------+
| In I Am Assert Loser (L) State |
+----------------+-----------------+------------------+----------------+
| AssTrDes | my_metric -> | RPF_interface | Receive |
| (S,G,I) -> | better than | (S) stops | Join(S,G) on |
| FALSE | winner's | being I | interface I |
| | metric | | |
+----------------+-----------------+------------------+----------------+
| -> NI state | -> NI state | -> NI state | -> NI State |
| [Actions A5] | [Actions A5] | [Actions A5] | [Actions A5] |
+----------------+-----------------+------------------+----------------+
Note that for reasons of compactness, "AssTrDes(S,G,I)" is used in
the state machine table to refer to AssertTrackingDesired(S,G,I).
Terminology:
A "preferred assert" is one with a better metric than the current
winner.
An "acceptable assert" is one that has a better metric than
my_assert_metric(S,G,I). An assert is never considered acceptable
if its metric is infinite.
An "inferior assert" is one with a worse metric than
my_assert_metric(S,G,I). An assert is never considered inferior
if my_assert_metric(S,G,I) is infinite.
Fenner, et al. Standards Track [Page 85]
^L
RFC 4601 PIM-SM Specification August 2006
The state machine uses the following macros:
CouldAssert(S,G,I) =
SPTbit(S,G)==TRUE
AND (RPF_interface(S) != I)
AND (I in ( ( joins(*,*,RP(G)) (+) joins(*,G) (-) prunes(S,G,rpt) )
(+) ( pim_include(*,G) (-) pim_exclude(S,G) )
(-) lost_assert(*,G)
(+) joins(S,G) (+) pim_include(S,G) ) )
CouldAssert(S,G,I) is true for downstream interfaces that would be in
the inherited_olist(S,G) if (S,G) assert information was not taken
into account.
AssertTrackingDesired(S,G,I) =
(I in ( ( joins(*,*,RP(G)) (+) joins(*,G) (-) prunes(S,G,rpt) )
(+) ( pim_include(*,G) (-) pim_exclude(S,G) )
(-) lost_assert(*,G)
(+) joins(S,G) ) )
OR (local_receiver_include(S,G,I) == TRUE
AND (I_am_DR(I) OR (AssertWinner(S,G,I) == me)))
OR ((RPF_interface(S) == I) AND (JoinDesired(S,G) == TRUE))
OR ((RPF_interface(RP(G)) == I) AND (JoinDesired(*,G) == TRUE)
AND (SPTbit(S,G) == FALSE))
AssertTrackingDesired(S,G,I) is true on any interface in which an
(S,G) assert might affect our behavior.
The first three lines of AssertTrackingDesired account for (*,G) join
and local membership information received on I that might cause the
router to be interested in asserts on I.
The 4th line accounts for (S,G) join information received on I that
might cause the router to be interested in asserts on I.
The 5th and 6th lines account for (S,G) local membership information
on I. Note that we can't use the pim_include(S,G) macro since it
uses lost_assert(S,G,I) and would result in the router forgetting
that it lost an assert if the only reason it was interested was local
membership. The AssertWinner(S,G,I) check forces an assert winner to
keep on being responsible for forwarding as long as local receivers
are present. Removing this check would make the assert winner give
up forwarding as soon as the information that originally caused it to
forward went away, and the task of forwarding for local receivers
would revert back to the DR.
Fenner, et al. Standards Track [Page 86]
^L
RFC 4601 PIM-SM Specification August 2006
The last three lines account for the fact that a router must keep
track of assert information on upstream interfaces in order to send
joins and prunes to the proper neighbor.
Transitions from NoInfo State
When in NoInfo state, the following events may trigger transitions:
Receive Inferior Assert with RPTbit cleared AND
CouldAssert(S,G,I)==TRUE
An assert is received for (S,G) with the RPT bit cleared that
is inferior to our own assert metric. The RPT bit cleared
indicates that the sender of the assert had (S,G) forwarding
state on this interface. If the assert is inferior to our
metric, then we must also have (S,G) forwarding state (i.e.,
CouldAssert(S,G,I)==TRUE) as (S,G) asserts beat (*,G) asserts,
and so we should be the assert winner. We transition to the
"I am Assert Winner" state and perform Actions A1 (below).
Receive Assert with RPTbit set AND CouldAssert(S,G,I)==TRUE
An assert is received for (S,G) on I with the RPT bit set
(it's a (*,G) assert). CouldAssert(S,G,I) is TRUE only if we
have (S,G) forwarding state on this interface, so we should be
the assert winner. We transition to the "I am Assert Winner"
state and perform Actions A1 (below).
An (S,G) data packet arrives on interface I, AND
CouldAssert(S,G,I)==TRUE
An (S,G) data packet arrived on an downstream interface that
is in our (S,G) outgoing interface list. We optimistically
assume that we will be the assert winner for this (S,G), and
so we transition to the "I am Assert Winner" state and perform
Actions A1 (below), which will initiate the assert negotiation
for (S,G).
Receive Acceptable Assert with RPT bit clear AND
AssertTrackingDesired(S,G,I)==TRUE
We're interested in (S,G) Asserts, either because I is a
downstream interface for which we have (S,G) or (*,G)
forwarding state, or because I is the upstream interface for S
and we have (S,G) forwarding state. The received assert has a
better metric than our own, so we do not win the Assert. We
transition to "I am Assert Loser" and perform Actions A6
(below).
Fenner, et al. Standards Track [Page 87]
^L
RFC 4601 PIM-SM Specification August 2006
Transitions from "I am Assert Winner" State
When in "I am Assert Winner" state, the following events trigger
transitions:
Assert Timer Expires
The (S,G) Assert Timer expires. As we're in the Winner state,
we must still have (S,G) forwarding state that is actively
being kept alive. We resend the (S,G) Assert and restart the
Assert Timer (Actions A3 below). Note that the assert
winner's Assert Timer is engineered to expire shortly before
timers on assert losers; this prevents unnecessary thrashing
of the forwarder and periodic flooding of duplicate packets.
Receive Inferior Assert
We receive an (S,G) assert or (*,G) assert mentioning S that
has a worse metric than our own. Whoever sent the assert is
in error, and so we resend an (S,G) Assert and restart the
Assert Timer (Actions A3 below).
Receive Preferred Assert
We receive an (S,G) assert that has a better metric than our
own. We transition to "I am Assert Loser" state and perform
Actions A2 (below). Note that this may affect the value of
JoinDesired(S,G) and PruneDesired(S,G,rpt), which could cause
transitions in the upstream (S,G) or (S,G,rpt) state machines.
CouldAssert(S,G,I) -> FALSE
Our (S,G) forwarding state or RPF interface changed so as to
make CouldAssert(S,G,I) become false. We can no longer
perform the actions of the assert winner, and so we transition
to NoInfo state and perform Actions A4 (below). This includes
sending a "canceling assert" with an infinite metric.
Transitions from "I am Assert Loser" State
When in "I am Assert Loser" state, the following transitions can
occur:
Receive Preferred Assert
We receive an assert that is better than that of the current
assert winner. We stay in Loser state and perform Actions A2
below.
Fenner, et al. Standards Track [Page 88]
^L
RFC 4601 PIM-SM Specification August 2006
Receive Acceptable Assert with RPTbit clear from Current Winner
We receive an assert from the current assert winner that is
better than our own metric for this (S,G) (although the metric
may be worse than the winner's previous metric). We stay in
Loser state and perform Actions A2 below.
Receive Inferior Assert or Assert Cancel from Current Winner
We receive an assert from the current assert winner that is
worse than our own metric for this group (typically, because
the winner's metric became worse or because it is an assert
cancel). We transition to NoInfo state, deleting the (S,G)
assert information and allowing the normal PIM Join/Prune
mechanisms to operate. Usually, we will eventually re-assert
and win when data packets from S have started flowing again.
Assert Timer Expires
The (S,G) Assert Timer expires. We transition to NoInfo
state, deleting the (S,G) assert information (Actions A5
below).
Current Winner's GenID Changes or NLT Expires
The Neighbor Liveness Timer associated with the current winner
expires or we receive a Hello message from the current winner
reporting a different GenID from the one it previously
reported. This indicates that the current winner's interface
or router has gone down (and may have come back up), and so we
must assume it no longer knows it was the winner. We
transition to the NoInfo state, deleting this (S,G) assert
information (Actions A5 below).
AssertTrackingDesired(S,G,I)->FALSE
AssertTrackingDesired(S,G,I) becomes FALSE. Our forwarding
state has changed so that (S,G) Asserts on interface I are no
longer of interest to us. We transition to the NoInfo state,
deleting the (S,G) assert information.
My metric becomes better than the assert winner's metric
my_assert_metric(S,G,I) has changed so that now my assert
metric for (S,G) is better than the metric we have stored for
current assert winner. This might happen when the underlying
routing metric changes, or when CouldAssert(S,G,I) becomes
true; for example, when SPTbit(S,G) becomes true. We
transition to NoInfo state, delete this (S,G) assert state
(Actions A5 below), and allow the normal PIM Join/Prune
mechanisms to operate. Usually, we will eventually re-assert
and win when data packets from S have started flowing again.
Fenner, et al. Standards Track [Page 89]
^L
RFC 4601 PIM-SM Specification August 2006
RPF_interface(S) stops being interface I
Interface I used to be the RPF interface for S, and now it is
not. We transition to NoInfo state, deleting this (S,G)
assert state (Actions A5 below).
Receive Join(S,G) on Interface I
We receive a Join(S,G) that has the Upstream Neighbor Address
field set to my primary IP address on interface I. The action
is to transition to NoInfo state, delete this (S,G) assert
state (Actions A5 below), and allow the normal PIM Join/Prune
mechanisms to operate. If whoever sent the Join was in error,
then the normal assert mechanism will eventually re-apply, and
we will lose the assert again. However, whoever sent the
assert may know that the previous assert winner has died, and
so we may end up being the new forwarder.
(S,G) Assert State machine Actions
A1: Send Assert(S,G).
Set Assert Timer to (Assert_Time - Assert_Override_Interval).
Store self as AssertWinner(S,G,I).
Store spt_assert_metric(S,I) as AssertWinnerMetric(S,G,I).
A2: Store new assert winner as AssertWinner(S,G,I) and assert
winner metric as AssertWinnerMetric(S,G,I).
Set Assert Timer to Assert_Time.
A3: Send Assert(S,G).
Set Assert Timer to (Assert_Time - Assert_Override_Interval).
A4: Send AssertCancel(S,G).
Delete assert info (AssertWinner(S,G,I) and
AssertWinnerMetric(S,G,I) will then return their default
values).
A5: Delete assert info (AssertWinner(S,G,I) and
AssertWinnerMetric(S,G,I) will then return their default
values).
A6: Store new assert winner as AssertWinner(S,G,I) and assert
winner metric as AssertWinnerMetric(S,G,I).
Set Assert Timer to Assert_Time.
If (I is RPF_interface(S)) AND (UpstreamJPState(S,G) == true)
set SPTbit(S,G) to TRUE.
Note that some of these actions may cause the value of
JoinDesired(S,G), PruneDesired(S,G,rpt), or RPF'(S,G) to change,
which could cause further transitions in other state machines.
Fenner, et al. Standards Track [Page 90]
^L
RFC 4601 PIM-SM Specification August 2006
4.6.2. (*,G) Assert Message State Machine
The (*,G) Assert state machine for interface I is shown in Figure 11.
There are three states:
NoInfo (NI)
This router has no (*,G) assert state on interface I.
I am Assert Winner (W)
This router has won an (*,G) assert on interface I. It is now
responsible for forwarding traffic destined for G onto interface I
with the exception of traffic for which it has (S,G) "I am Assert
Loser" state. Irrespective of whether it is the DR for I, it is
also responsible for handling the membership requests for G from
local hosts on I.
I am Assert Loser (L)
This router has lost an (*,G) assert on interface I. It must not
forward packets for G onto interface I with the exception of
traffic from sources for which is has (S,G) "I am Assert Winner"
state. If it is the DR, it is no longer responsible for handling
the membership requests for group G from local hosts on I.
In addition, there is also an Assert Timer (AT) that is used to time
out asserts on the assert losers and to resend asserts on the assert
winner.
When an Assert message is received with a source address other than
zero, a PIM implementation must first match it against the possible
events in the (S,G) assert state machine and process any transitions
and actions, before considering whether the Assert message matches
against the (*,G) assert state machine.
It is important to note that NO TRANSITION CAN OCCUR in the (*,G)
state machine as a result of receiving an Assert message unless the
(S,G) assert state machine for the relevant S and G is in the
"NoInfo" state after the (S,G) state machine has processed the
message. Also, NO TRANSITION CAN OCCUR in the (*,G) state machine as
a result of receiving an assert message if that message triggers any
change of state in the (S,G) state machine. Obviously, when the
source address in the received message is set to zero, an (S,G) state
machine for the S and G does not exist and can be assumed to be in
the "NoInfo" state.
Fenner, et al. Standards Track [Page 91]
^L
RFC 4601 PIM-SM Specification August 2006
For example, if both the (S,G) and (*,G) assert state machines are in
the NoInfo state when an Assert message arrives, and the message
causes the (S,G) state machine to transition to either "W" or "L"
state, then the assert will not be processed by the (*,G) assert
state machine.
Another example: if the (S,G) assert state machine is in "L" state
when an assert message is received, and the assert metric in the
message is worse than my_assert_metric(S,G,I), then the (S,G) assert
state machine will transition to NoInfo state. In such a case, if
the (*,G) assert state machine were in NoInfo state, it might appear
that it would transition to "W" state, but this is not the case
because this message already triggered a transition in the (S,G)
assert state machine.
Figure 11: Per-interface (*,G) Assert State machine in tabular form
+----------------------------------------------------------------------+
| In NoInfo (NI) State |
+-----------------------+-----------------------+----------------------+
| Receive Inferior | Data arrives for G | Receive Acceptable |
| Assert with RPTbit | on I and | Assert with RPTbit |
| set and | CouldAssert | set and AssTrDes |
| CouldAssert(*,G,I) | (*,G,I) | (*,G,I) |
+-----------------------+-----------------------+----------------------+
| -> W state | -> W state | -> L state |
| [Actions A1] | [Actions A1] | [Actions A2] |
+-----------------------+-----------------------+----------------------+
+---------------------------------------------------------------------+
| In I Am Assert Winner (W) State |
+----------------+-----------------+-----------------+----------------+
| Assert Timer | Receive | Receive | CouldAssert |
| Expires | Inferior | Preferred | (*,G,I) -> |
| | Assert | Assert | FALSE |
+----------------+-----------------+-----------------+----------------+
| -> W state | -> W state | -> L state | -> NI state |
| [Actions A3] | [Actions A3] | [Actions A2] | [Actions A4] |
+----------------+-----------------+-----------------+----------------+
Fenner, et al. Standards Track [Page 92]
^L
RFC 4601 PIM-SM Specification August 2006
+---------------------------------------------------------------------+
| In I Am Assert Loser (L) State |
+-------------+-------------+-------------+-------------+-------------+
|Receive |Receive |Receive |Assert Timer |Current |
|Preferred |Acceptable |Inferior |Expires |Winner's |
|Assert with |Assert from |Assert or | |GenID |
|RPTbit set |Current |Assert | |Changes or |
| |Winner with |Cancel from | |NLT Expires |
| |RPTbit set |Current | | |
| | |Winner | | |
+-------------+-------------+-------------+-------------+-------------+
|-> L state |-> L state |-> NI state |-> NI state |-> NI state |
|[Actions A2] |[Actions A2] |[Actions A5] |[Actions A5] |[Actions A5] |
+-------------+-------------+-------------+-------------+-------------+
+----------------------------------------------------------------------+
| In I Am Assert Loser (L) State |
+----------------+----------------+-----------------+------------------+
| AssTrDes | my_metric -> | RPF_interface | Receive |
| (*,G,I) -> | better than | (RP(G)) stops | Join(*,G) or |
| FALSE | Winner's | being I | Join |
| | metric | | (*,*,RP(G)) on |
| | | | Interface I |
+----------------+----------------+-----------------+------------------+
| -> NI state | -> NI state | -> NI state | -> NI State |
| [Actions A5] | [Actions A5] | [Actions A5] | [Actions A5] |
+----------------+----------------+-----------------+------------------+
The state machine uses the following macros:
CouldAssert(*,G,I) =
( I in ( joins(*,*,RP(G)) (+) joins(*,G)
(+) pim_include(*,G)) )
AND (RPF_interface(RP(G)) != I)
CouldAssert(*,G,I) is true on downstream interfaces for which we have
(*,*,RP(G)) or (*,G) join state, or local members that requested any
traffic destined for G.
AssertTrackingDesired(*,G,I) =
CouldAssert(*,G,I)
OR (local_receiver_include(*,G,I)==TRUE
AND (I_am_DR(I) OR AssertWinner(*,G,I) == me))
OR (RPF_interface(RP(G)) == I AND RPTJoinDesired(G))
AssertTrackingDesired(*,G,I) is true on any interface on which an
(*,G) assert might affect our behavior.
Fenner, et al. Standards Track [Page 93]
^L
RFC 4601 PIM-SM Specification August 2006
Note that for reasons of compactness, "AssTrDes(*,G,I)" is used in
the state machine table to refer to AssertTrackingDesired(*,G,I).
Terminology:
A "preferred assert" is one with a better metric than the current
winner.
An "acceptable assert" is one that has a better metric than
my_assert_metric(*,G,I). An assert is never considered acceptable
if its metric is infinite.
An "inferior assert" is one with a worse metric than
my_assert_metric(*,G,I). An assert is never considered inferior
if my_assert_metric(*,G,I) is infinite.
Transitions from NoInfo State
When in NoInfo state, the following events trigger transitions, but
only if the (S,G) assert state machine is in NoInfo state before and
after consideration of the received message:
Receive Inferior Assert with RPTbit set AND
CouldAssert(*,G,I)==TRUE
An Inferior (*,G) assert is received for G on Interface I. If
CouldAssert(*,G,I) is TRUE, then I is our downstream
interface, and we have (*,G) forwarding state on this
interface, so we should be the assert winner. We transition
to the "I am Assert Winner" state and perform Actions A1
(below).
A data packet destined for G arrives on interface I, AND
CouldAssert(*,G,I)==TRUE
A data packet destined for G arrived on a downstream interface
that is in our (*,G) outgoing interface list. We therefore
believe we should be the forwarder for this (*,G), and so we
transition to the "I am Assert Winner" state and perform
Actions A1 (below).
Receive Acceptable Assert with RPT bit set AND
AssertTrackingDesired(*,G,I)==TRUE
We're interested in (*,G) Asserts, either because I is a
downstream interface for which we have (*,G) forwarding state,
or because I is the upstream interface for RP(G) and we have
(*,G) forwarding state. We get a (*,G) Assert that has a
better metric than our own, so we do not win the Assert. We
transition to "I am Assert Loser" and perform Actions A2
(below).
Fenner, et al. Standards Track [Page 94]
^L
RFC 4601 PIM-SM Specification August 2006
Transitions from "I am Assert Winner" State
When in "I am Assert Winner" state, the following events trigger
transitions, but only if the (S,G) assert state machine is in NoInfo
state before and after consideration of the received message:
Receive Inferior Assert
We receive a (*,G) assert that has a worse metric than our
own. Whoever sent the assert has lost, and so we resend a
(*,G) Assert and restart the Assert Timer (Actions A3 below).
Receive Preferred Assert
We receive a (*,G) assert that has a better metric than our
own. We transition to "I am Assert Loser" state and perform
Actions A2 (below).
When in "I am Assert Winner" state, the following events trigger
transitions:
Assert Timer Expires
The (*,G) Assert Timer expires. As we're in the Winner state,
then we must still have (*,G) forwarding state that is
actively being kept alive. To prevent unnecessary thrashing
of the forwarder and periodic flooding of duplicate packets,
we resend the (*,G) Assert and restart the Assert Timer
(Actions A3 below).
CouldAssert(*,G,I) -> FALSE
Our (*,G) forwarding state or RPF interface changed so as to
make CouldAssert(*,G,I) become false. We can no longer
perform the actions of the assert winner, and so we transition
to NoInfo state and perform Actions A4 (below).
Transitions from "I am Assert Loser" State
When in "I am Assert Loser" state, the following events trigger
transitions, but only if the (S,G) assert state machine is in NoInfo
state before and after consideration of the received message:
Receive Preferred Assert with RPTbit set
We receive a (*,G) assert that is better than that of the
current assert winner. We stay in Loser state and perform
Actions A2 below.
Fenner, et al. Standards Track [Page 95]
^L
RFC 4601 PIM-SM Specification August 2006
Receive Acceptable Assert from Current Winner with RPTbit set
We receive a (*,G) assert from the current assert winner that
is better than our own metric for this group (although the
metric may be worse than the winner's previous metric). We
stay in Loser state and perform Actions A2 below.
Receive Inferior Assert or Assert Cancel from Current Winner
We receive an assert from the current assert winner that is
worse than our own metric for this group (typically because
the winner's metric became worse or is now an assert cancel).
We transition to NoInfo state, delete this (*,G) assert state
(Actions A5), and allow the normal PIM Join/Prune mechanisms
to operate. Usually, we will eventually re-assert and win
when data packets for G have started flowing again.
When in "I am Assert Loser" state, the following events trigger
transitions:
Assert Timer Expires
The (*,G) Assert Timer expires. We transition to NoInfo state
and delete this (*,G) assert info (Actions A5).
Current Winner's GenID Changes or NLT Expires
The Neighbor Liveness Timer associated with the current winner
expires or we receive a Hello message from the current winner
reporting a different GenID from the one it previously
reported. This indicates that the current winner's interface
or router has gone down (and may have come back up), and so we
must assume it no longer knows it was the winner. We
transition to the NoInfo state, deleting the (*,G) assert
information (Actions A5).
AssertTrackingDesired(*,G,I)->FALSE
AssertTrackingDesired(*,G,I) becomes FALSE. Our forwarding
state has changed so that (*,G) Asserts on interface I are no
longer of interest to us. We transition to NoInfo state and
delete this (*,G) assert info (Actions A5).
My metric becomes better than the assert winner's metric
My routing metric, rpt_assert_metric(G,I), has changed so that
now my assert metric for (*,G) is better than the metric we
have stored for current assert winner. We transition to
NoInfo state, delete this (*,G) assert state (Actions A5), and
allow the normal PIM Join/Prune mechanisms to operate.
Usually, we will eventually re-assert and win when data
packets for G have started flowing again.
Fenner, et al. Standards Track [Page 96]
^L
RFC 4601 PIM-SM Specification August 2006
RPF_interface(RP(G)) stops being interface I
Interface I used to be the RPF interface for RP(G), and now it
is not. We transition to NoInfo state and delete this (*,G)
assert state (Actions A5).
Receive Join(*,G) or Join(*,*,RP(G)) on interface I
We receive a Join(*,G) or a Join(*,*,RP(G)) that has the
Upstream Neighbor Address field set to my primary IP address
on interface I. The action is to transition to NoInfo state,
delete this (*,G) assert state (Actions A5), and allow the
normal PIM Join/Prune mechanisms to operate. If whoever sent
the Join was in error, then the normal assert mechanism will
eventually re-apply, and we will lose the assert again.
However, whoever sent the assert may know that the previous
assert winner has died, so we may end up being the new
forwarder.
(*,G) Assert State machine Actions
A1: Send Assert(*,G).
Set Assert Timer to (Assert_Time - Assert_Override_Interval).
Store self as AssertWinner(*,G,I).
Store rpt_assert_metric(G,I) as AssertWinnerMetric(*,G,I).
A2: Store new assert winner as AssertWinner(*,G,I) and assert
winner metric as AssertWinnerMetric(*,G,I).
Set Assert Timer to Assert_Time.
A3: Send Assert(*,G)
Set Assert Timer to (Assert_Time - Assert_Override_Interval).
A4: Send AssertCancel(*,G).
Delete assert info (AssertWinner(*,G,I) and
AssertWinnerMetric(*,G,I) will then return their default
values).
A5: Delete assert info (AssertWinner(*,G,I) and
AssertWinnerMetric(*,G,I) will then return their default
values).
Note that some of these actions may cause the value of
JoinDesired(*,G) or RPF'(*,G)) to change, which could cause further
transitions in other state machines.
Fenner, et al. Standards Track [Page 97]
^L
RFC 4601 PIM-SM Specification August 2006
4.6.3. Assert Metrics
Assert metrics are defined as:
struct assert_metric {
rpt_bit_flag;
metric_preference;
route_metric;
ip_address;
};
When comparing assert_metrics, the rpt_bit_flag, metric_preference,
and route_metric field are compared in order, where the first lower
value wins. If all fields are equal, the primary IP address of the
router that sourced the Assert message is used as a tie-breaker, with
the highest IP address winning.
An assert metric for (S,G) to include in (or compare against) an
Assert message sent on interface I should be computed using the
following pseudocode:
assert_metric
my_assert_metric(S,G,I) {
if( CouldAssert(S,G,I) == TRUE ) {
return spt_assert_metric(S,I)
} else if( CouldAssert(*,G,I) == TRUE ) {
return rpt_assert_metric(G,I)
} else {
return infinite_assert_metric()
}
}
spt_assert_metric(S,I) gives the assert metric we use if we're
sending an assert based on active (S,G) forwarding state:
assert_metric
spt_assert_metric(S,I) {
return {0,MRIB.pref(S),MRIB.metric(S),my_ip_address(I)}
}
rpt_assert_metric(G,I) gives the assert metric we use if we're
sending an assert based only on (*,G) forwarding state:
assert_metric
rpt_assert_metric(G,I) {
return {1,MRIB.pref(RP(G)),MRIB.metric(RP(G)),my_ip_address(I)}
}
Fenner, et al. Standards Track [Page 98]
^L
RFC 4601 PIM-SM Specification August 2006
MRIB.pref(X) and MRIB.metric(X) are the routing preference and
routing metrics associated with the route to a particular (unicast)
destination X, as determined by the MRIB. my_ip_address(I) is simply
the router's primary IP address that is associated with the local
interface I.
infinite_assert_metric() gives the assert metric we need to send an
assert but don't match either (S,G) or (*,G) forwarding state:
assert_metric
infinite_assert_metric() {
return {1,infinity,infinity,0}
}
4.6.4. AssertCancel Messages
An AssertCancel message is simply an RPT Assert message but with
infinite metric. It is sent by the assert winner when it deletes the
forwarding state that had caused the assert to occur. Other routers
will see this metric, and it will cause any other router that has
forwarding state to send its own assert, and to take over forwarding.
An AssertCancel(S,G) is an infinite metric assert with the RPT bit
set that names S as the source.
An AssertCancel(*,G) is an infinite metric assert with the RPT bit
set and the source set to zero.
AssertCancel messages are simply an optimization. The original
Assert timeout mechanism will allow a subnet to eventually become
consistent; the AssertCancel mechanism simply causes faster
convergence. No special processing is required for an AssertCancel
message, since it is simply an Assert message from the current
winner.
Fenner, et al. Standards Track [Page 99]
^L
RFC 4601 PIM-SM Specification August 2006
4.6.5. Assert State Macros
The macros lost_assert(S,G,rpt,I), lost_assert(S,G,I), and
lost_assert(*,G,I) are used in the olist computations of Section 4.1,
and are defined as:
bool lost_assert(S,G,rpt,I) {
if ( RPF_interface(RP(G)) == I OR
( RPF_interface(S) == I AND SPTbit(S,G) == TRUE ) ) {
return FALSE
} else {
return ( AssertWinner(S,G,I) != NULL AND
AssertWinner(S,G,I) != me )
}
}
bool lost_assert(S,G,I) {
if ( RPF_interface(S) == I ) {
return FALSE
} else {
return ( AssertWinner(S,G,I) != NULL AND
AssertWinner(S,G,I) != me AND
(AssertWinnerMetric(S,G,I) is better
than spt_assert_metric(S,I) )
}
}
Note: the term "AssertWinnerMetric(S,G,I) is better than
spt_assert_metric(S,I)" is required to correctly handle the
transition phase when a router has (S,G) join state, but has not yet
set the SPT bit. In this case, it needs to ignore the assert state
if it will win the assert once the SPTbit is set.
bool lost_assert(*,G,I) {
if ( RPF_interface(RP(G)) == I ) {
return FALSE
} else {
return ( AssertWinner(*,G,I) != NULL AND
AssertWinner(*,G,I) != me )
}
}
AssertWinner(S,G,I) is the IP source address of the Assert(S,G)
packet that won an Assert.
AssertWinner(*,G,I) is the IP source address of the Assert(*,G)
packet that won an Assert.
Fenner, et al. Standards Track [Page 100]
^L
RFC 4601 PIM-SM Specification August 2006
AssertWinnerMetric(S,G,I) is the Assert metric of the Assert(S,G)
packet that won an Assert.
AssertWinnerMetric(*,G,I) is the Assert metric of the Assert(*,G)
packet that won an Assert.
AssertWinner(S,G,I) defaults to NULL and AssertWinnerMetric(S,G,I)
defaults to Infinity when in the NoInfo state.
Summary of Assert Rules and Rationale
This section summarizes the key rules for sending and reacting to
asserts and the rationale for these rules. This section is not
intended to be and should not be treated as a definitive
specification of protocol behavior. The state machines and
pseudocode should be consulted for that purpose. Rather, this
section is intended to document important aspects of the Assert
protocol behavior and to provide information that may prove helpful
to the reader in understanding and implementing this part of the
protocol.
1. Behavior: Downstream neighbors send Join(*,G) and Join(S,G)
periodic messages to the appropriate RPF' neighbor, i.e., the RPF
neighbor as modified by the assert process. They are not always
sent to the RPF neighbor as indicated by the MRIB. Normal
suppression and override rules apply.
Rationale: By sending the periodic and triggered Join messages to
the RPF' neighbor instead of to the RPF neighbor, the downstream
router avoids re-triggering the Assert process with every Join.
A side effect of sending Joins to the Assert winner is that
traffic will not switch back to the "normal" RPF neighbor until
the Assert times out. This will not happen until data stops
flowing, if item 8, below, is implemented.
2. Behavior: The assert winner for (*,G) acts as the local DR for
(*,G) on behalf of IGMP/MLD members.
Rationale: This is required to allow a single router to merge PIM
and IGMP/MLD joins and leaves. Without this, overrides don't
work.
3. Behavior: The assert winner for (S,G) acts as the local DR for
(S,G) on behalf of IGMPv3 members.
Rationale: Same rationale as for item 2.
Fenner, et al. Standards Track [Page 101]
^L
RFC 4601 PIM-SM Specification August 2006
4. Behavior: (S,G) and (*,G) prune overrides are sent to the RPF'
neighbor and not to the regular RPF neighbor.
Rationale: Same rationale as for item 1.
5. Behavior: An (S,G,rpt) prune override is not sent (at all) if
RPF'(S,G,rpt) != RPF'(*,G).
Rationale: This avoids keeping state alive on the (S,G) tree when
only (*,G) downstream members are left. Also, it avoids sending
(S,G,rpt) joins to a router that is not on the (*,G) tree. This
behavior might be confusing although this specification does
indicate that such a join should be dropped.
6. Behavior: An assert loser that receives a Join(S,G) with an
Upstream Neighbor Address that is its primary IP address on that
interface cancels the (S,G) Assert Timer.
Rationale: This is necessary in order to have rapid convergence
in the event that the downstream router that initially sent a
join to the prior Assert winner has undergone a topology change.
7. Behavior: An assert loser that receives a Join(*,G) or a
Join(*,*,RP(G)) with an Upstream Neighbor Address that is its
primary IP address on that interface cancels the (*,G) Assert
Timer and all (S,G) assert timers that do not have corresponding
Prune(S,G,rpt) messages in the compound Join/Prune message.
Rationale: Same rationale as for item 6.
8. Behavior: An assert winner for (*,G) or (S,G) sends a canceling
assert when it is about to stop forwarding on a (*,G) or an (S,G)
entry. This behavior does not apply to (S,G,rpt).
Rationale: This allows switching back to the shared tree after
the last SPT router on the LAN leaves. Doing this prevents
downstream routers on the shared tree from keeping SPT state
alive.
9. Behavior: Resend the assert messages before timing out an assert.
(This behavior is optional.)
Rationale: This prevents the periodic duplicates that would
otherwise occur each time that an assert times out and is then
re-established.
10. Behavior: When RPF'(S,G,rpt) changes to be the same as RPF'(*,G)
we need to trigger a Join(S,G,rpt) to RPF'(*,G).
Fenner, et al. Standards Track [Page 102]
^L
RFC 4601 PIM-SM Specification August 2006
Rationale: This allows switching back to the RPT after the last
SPT member leaves.
4.7. PIM Bootstrap and RP Discovery
For correct operation, every PIM router within a PIM domain must be
able to map a particular multicast group address to the same RP. If
this is not the case, then black holes may appear, where some
receivers in the domain cannot receive some groups. A domain in this
context is a contiguous set of routers that all implement PIM and are
configured to operate within a common boundary.
A notable exception to this is where a PIM domain is broken up into
multiple administrative scope regions; these are regions where a
border has been configured so that a range of multicast groups will
not be forwarded across that border. For more information on
Administratively Scoped IP Multicast, see RFC 2365. The modified
criteria for admin-scoped regions are that the region is convex with
respect to forwarding based on the MRIB, and that all PIM routers
within the scope region map scoped groups to the same RP within that
region.
This specification does not mandate the use of a single mechanism to
provide routers with the information to perform the group-to-RP
mapping. Currently four mechanisms are possible, and all four have
associated problems:
Static Configuration
A PIM router MUST support the static configuration of group-to-
RP mappings. Such a mechanism is not robust to failures, but
does at least provide a basic interoperability mechanism.
Embedded-RP
Embedded-RP defines an address allocation policy in which the
address of the Rendezvous Point (RP) is encoded in an IPv6
multicast group address [17].
Cisco's Auto-RP
Auto-RP uses a PIM Dense-Mode multicast group to announce
group-to-RP mappings from a central location. This mechanism is
not useful if PIM Dense-Mode is not being run in parallel with
PIM Sparse-Mode, and was only intended for use with PIM Sparse-
Mode Version 1. No standard specification currently exists.
BootStrap Router (BSR)
RFC 2362 specifies a bootstrap mechanism based on the automatic
election of a bootstrap router (BSR). Any router in the domain
that is configured to be a possible RP reports its candidacy to
Fenner, et al. Standards Track [Page 103]
^L
RFC 4601 PIM-SM Specification August 2006
the BSR, and then a domain-wide flooding mechanism distributes
the BSR's chosen set of RPs throughout the domain. As specified
in RFC 2362, BSR is flawed in its handling of admin-scoped
regions that are smaller than a PIM domain, but the mechanism
does work for global-scoped groups.
As far as PIM-SM is concerned, the only important requirement is that
all routers in the domain (or admin scope zone for scoped regions)
receive the same set of group-range-to-RP mappings. This may be
achieved through the use of any of these mechanisms, or through
alternative mechanisms not currently specified.
It must be operationally ensured that any RP address configured,
learned, or advertised is reachable from all routers in the PIM
domain.
4.7.1. Group-to-RP Mapping
Using one of the mechanisms described above, a PIM router receives
one or more possible group-range-to-RP mappings. Each mapping
specifies a range of multicast groups (expressed as a group and mask)
and the RP to which such groups should be mapped. Each mapping may
also have an associated priority. It is possible to receive multiple
mappings, all of which might match the same multicast group; this is
the common case with BSR. The algorithm for performing the group-
to-RP mapping is as follows:
1. Perform longest match on group-range to obtain a list of RPs.
2. From this list of matching RPs, find the one with highest
priority. Eliminate any RPs from the list that have lower
priorities.
3. If only one RP remains in the list, use that RP.
4. If multiple RPs are in the list, use the PIM hash function to
choose one.
Thus, if two or more group-range-to-RP mappings cover a particular
group, the one with the longest mask is the mapping to use. If the
mappings have the same mask length, then the one with the highest
priority is chosen. If there is more than one matching entry with
the same longest mask and the priorities are identical, then a hash
function (see Section 4.7.2) is applied to choose the RP.
This algorithm is invoked by a DR when it needs to determine an RP
for a given group, e.g., upon reception of a packet or IGMP/MLD
membership indication for a group for which the DR does not know the
Fenner, et al. Standards Track [Page 104]
^L
RFC 4601 PIM-SM Specification August 2006
RP. It is invoked by any router that has (*,*,RP) state when a
packet is received for which there is no corresponding (S,G) or (*,G)
entry. Furthermore, the mapping function is invoked by all routers
upon receiving a (*,G) or (*,*,RP) Join/Prune message.
Note that if the set of possible group-range-to-RP mappings changes,
each router will need to check whether any existing groups are
affected. This may, for example, cause a DR or acting DR to re-join
a group, or cause it to restart register encapsulation to the new RP.
Implementation note: the bootstrap mechanism described in RFC 2362
omitted step 1 above. However, of the implementations we are aware
of, approximately half performed step 1 anyway. Note that
implementations of BSR that omit step 1 will not correctly
interoperate with implementations of this specification when used
with the BSR mechanism described in [11].
4.7.2. Hash Function
The hash function is used by all routers within a domain, to map a
group to one of the RPs from the matching set of group-range-to-RP
mappings (this set all have the same longest mask length and same
highest priority). The algorithm takes as input the group address,
and the addresses of the candidate RPs from the mappings, and gives
as output one RP address to be used.
The protocol requires that all routers hash to the same RP within a
domain (except for transients). The following hash function must be
used in each router:
1. For RP addresses in the matching group-range-to-RP mappings,
compute a value:
Value(G,M,C(i))=
(1103515245 * ((1103515245 * (G&M)+12345) XOR C(i)) + 12345) mod 2^31
where C(i) is the RP address and M is a hash-mask. If BSR is
being used, the hash-mask is given in the Bootstrap messages. If
BSR is not being used, the alternative mechanism that supplies
the group-range-to-RP mappings may supply the value, or else it
defaults to a mask with the most significant 30 bits being one
for IPv4 and the most significant 126 bits being one for IPv6.
The hash-mask allows a small number of consecutive groups (e.g.,
4) to always hash to the same RP. For instance, hierarchically-
encoded data can be sent on consecutive group addresses to get
the same delay and fate-sharing characteristics.
Fenner, et al. Standards Track [Page 105]
^L
RFC 4601 PIM-SM Specification August 2006
For address families other than IPv4, a 32-bit digest to be used
as C(i) and G must first be derived from the actual RP or group
address. Such a digest method must be used consistently
throughout the PIM domain. For IPv6 addresses, we recommend
using the equivalent IPv4 address for an IPv4-compatible address,
and the exclusive-or of each 32-bit segment of the address for
all other IPv6 addresses. For example, the digest of the IPv6
address 3ffe:b00:c18:1::10 would be computed as 0x3ffe0b00 ^
0x0c180001 ^ 0x00000000 ^ 0x00000010, where ^ represents the
exclusive-or operation.
2. The candidate RP with the highest resulting hash value is then
the RP chosen by this Hash Function. If more than one RP has the
same highest hash value, the RP with the highest IP address is
chosen.
4.8. Source-Specific Multicast
The Source-Specific Multicast (SSM) service model [6] can be
implemented with a strict subset of the PIM-SM protocol mechanisms.
Both regular IP Multicast and SSM semantics can coexist on a single
router, and both can be implemented using the PIM-SM protocol. A
range of multicast addresses, currently 232.0.0.0/8 in IPv4 and
FF3x::/32 for IPv6, is reserved for SSM, and the choice of semantics
is determined by the multicast group address in both data packets and
PIM messages.
4.8.1. Protocol Modifications for SSM Destination Addresses
The following rules override the normal PIM-SM behavior for a
multicast address G in the SSM range:
o A router MUST NOT send a (*,G) Join/Prune message for any reason.
o A router MUST NOT send an (S,G,rpt) Join/Prune message for any
reason.
o A router MUST NOT send a Register message for any packet that is
destined to an SSM address.
o A router MUST NOT forward packets based on (*,G) or (S,G,rpt)
state. The (*,G)- and (S,G,rpt)-related state summarization macros
are NULL for any SSM address, for the purposes of packet
forwarding.
o A router acting as an RP MUST NOT forward any Register-encapsulated
packet that has an SSM destination address.
Fenner, et al. Standards Track [Page 106]
^L
RFC 4601 PIM-SM Specification August 2006
The last two rules are present to deal with "legacy" routers unaware
of SSM that may be sending (*,G) and (S,G,rpt) Join/Prunes, or
Register messages for SSM destination addresses.
Additionally:
o A router MAY be configured to advertise itself as a Candidate RP
for an SSM address. If so, it SHOULD respond with a Register-Stop
message to any Register message containing a packet destined for an
SSM address.
o A router MAY optimize out the creation and maintenance of (S,G,rpt)
and (*,G) state for SSM destination addresses -- this state is not
needed for SSM packets.
4.8.2. PIM-SSM-Only Routers
An implementer may choose to implement only the subset of PIM
Sparse-Mode that provides SSM forwarding semantics.
A PIM-SSM-only router MUST implement the following portions of this
specification:
o Upstream (S,G) state machine (Section 4.5.7)
o Downstream (S,G) state machine (Section 4.5.3)
o (S,G) Assert state machine (Section 4.6.1)
o Hello messages, neighbor discovery, and DR election (Section 4.3)
o Packet forwarding rules (Section 4.2)
A PIM-SSM-only router does not need to implement the following
protocol elements:
o Register state machine (Section 4.4)
o (*,G), (S,G,rpt), and (*,*,RP) Downstream state machines (Sections
4.5.2, 4.5.4, and 4.5.1)
o (*,G), (S,G,rpt), and (*,*,RP) Upstream state machines (Sections
4.5.6, 4.5.8, and 4.5.5)
o (*,G) Assert state machine (Section 4.6.2)
o Bootstrap RP Election (Section 4.7)
Fenner, et al. Standards Track [Page 107]
^L
RFC 4601 PIM-SM Specification August 2006
o Keepalive Timer
o SPTbit (Section 4.2.2)
The Keepalive Timer should be treated as always running, and SPTbit
should be treated as always being set for an SSM address.
Additionally, the Packet forwarding rules of Section 4.2 can be
simplified in a PIM-SSM-only router:
if( iif == RPF_interface(S) AND UpstreamJPState(S,G) == Joined ) {
oiflist = inherited_olist(S,G)
} else if( iif is in inherited_olist(S,G) ) {
send Assert(S,G) on iif
}
oiflist = oiflist (-) iif
forward packet on all interfaces in oiflist
This is nothing more than the reduction of the normal PIM-SM
forwarding rule, with all (S,G,rpt) and (*,G) clauses replaced with
NULL.
4.9. PIM Packet Formats
This section describes the details of the packet formats for PIM
control messages.
All PIM control messages have IP protocol number 103.
PIM messages are either unicast (e.g., Registers and Register-Stop)
or multicast with TTL 1 to the 'ALL-PIM-ROUTERS' group (e.g.,
Join/Prune, Asserts, etc.). The source address used for unicast
messages is a domain-wide reachable address; the source address used
for multicast messages is the link-local address of the interface on
which the message is being sent.
The IPv4 'ALL-PIM-ROUTERS' group is '224.0.0.13'. The IPv6 'ALL-PIM-
ROUTERS' group is 'ff02::d'.
Fenner, et al. Standards Track [Page 108]
^L
RFC 4601 PIM-SM Specification August 2006
The PIM header common to all PIM messages is:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|PIM Ver| Type | Reserved | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
PIM Ver
PIM Version number is 2.
Type Types for specific PIM messages. PIM Types are:
Message Type Destination
---------------------------------------------------------------------
0 = Hello Multicast to ALL-PIM-ROUTERS
1 = Register Unicast to RP
2 = Register-Stop Unicast to source of Register
packet
3 = Join/Prune Multicast to ALL-PIM-ROUTERS
4 = Bootstrap Multicast to ALL-PIM-ROUTERS
5 = Assert Multicast to ALL-PIM-ROUTERS
6 = Graft (used in PIM-DM only) Unicast to RPF'(S)
7 = Graft-Ack (used in PIM-DM only) Unicast to source of Graft
packet
8 = Candidate-RP-Advertisement Unicast to Domain's BSR
Reserved
Set to zero on transmission. Ignored upon receipt.
Checksum
The checksum is a standard IP checksum, i.e., the 16-bit one's
complement of the one's complement sum of the entire PIM
message, excluding the "Multicast data packet" section of the
Register message. For computing the checksum, the checksum
field is zeroed. If the packet's length is not an integral
number of 16-bit words, the packet is padded with a trailing
byte of zero before performing the checksum.
For IPv6, the checksum also includes the IPv6 "pseudo-header",
as specified in RFC 2460, Section 8.1 [5]. This "pseudo-header"
is prepended to the PIM header for the purposes of calculating
the checksum. The "Upper-Layer Packet Length" in the pseudo-
header is set to the length of the PIM message, except in
Register messages where it is set to the length of the PIM
register header (8). The Next Header value used in the pseudo-
header is 103.
Fenner, et al. Standards Track [Page 109]
^L
RFC 4601 PIM-SM Specification August 2006
If a message is received with an unrecognized PIM Ver or Type field,
or if a message's destination does not correspond to the table above,
the message MUST be discarded, and an error message SHOULD be logged
to the administrator in a rate-limited manner.
4.9.1. Encoded Source and Group Address Formats
Encoded-Unicast Address
An Encoded-Unicast address takes the following format:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Addr Family | Encoding Type | Unicast Address
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+...
Addr Family
The PIM address family of the 'Unicast Address' field of this
address.
Values 0-127 are as assigned by the IANA for Internet Address
Families in [7]. Values 128-250 are reserved to be assigned by
the IANA for PIM-specific Address Families. Values 251 though
255 are designated for private use. As there is no assignment
authority for this space, collisions should be expected.
Encoding Type
The type of encoding used within a specific Address Family. The
value '0' is reserved for this field and represents the native
encoding of the Address Family.
Unicast Address
The unicast address as represented by the given Address Family
and Encoding Type.
Fenner, et al. Standards Track [Page 110]
^L
RFC 4601 PIM-SM Specification August 2006
Encoded-Group Address
Encoded-Group addresses take the following format:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Addr Family | Encoding Type |B| Reserved |Z| Mask Len |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Group multicast Address
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+...
Addr Family
Described above.
Encoding Type
Described above.
[B]idirectional PIM
Indicates the group range should use Bidirectional PIM [13].
For PIM-SM defined in this specification, this bit MUST be zero.
Reserved
Transmitted as zero. Ignored upon receipt.
Admin Scope [Z]one
indicates the group range is an admin scope zone. This is used
in the Bootstrap Router Mechanism [11] only. For all other
purposes, this bit is set to zero and ignored on receipt.
Mask Len
The Mask length field is 8 bits. The value is the number of
contiguous one bits that are left justified and used as a mask;
when combined with the group address, it describes a range of
groups. It is less than or equal to the address length in bits
for the given Address Family and Encoding Type. If the message
is sent for a single group, then the Mask length must equal the
address length in bits for the given Address Family and Encoding
Type (e.g., 32 for IPv4 native encoding, 128 for IPv6 native
encoding).
Group multicast Address
Contains the group address.
Fenner, et al. Standards Track [Page 111]
^L
RFC 4601 PIM-SM Specification August 2006
Encoded-Source Address
Encoded-Source address takes the following format:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Addr Family | Encoding Type | Rsrvd |S|W|R| Mask Len |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Address
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-...
Addr Family
Described above.
Encoding Type
Described above.
Reserved
Transmitted as zero, ignored on receipt.
S The Sparse bit is a 1-bit value, set to 1 for PIM-SM. It is
used for PIM version 1 compatibility.
W The WC (or WildCard) bit is a 1-bit value for use with PIM
Join/Prune messages (see Section 4.9.5.1).
R The RPT (or Rendezvous Point Tree) bit is a 1-bit value for use
with PIM Join/Prune messages (see Section 4.9.5.1). If the WC
bit is 1, the RPT bit MUST be 1.
Mask Len
The mask length field is 8 bits. The value is the number of
contiguous one bits left justified used as a mask which,
combined with the Source Address, describes a source subnet.
The mask length MUST be equal to the mask length in bits for the
given Address Family and Encoding Type (32 for IPv4 native and
128 for IPv6 native). A router SHOULD ignore any messages
received with any other mask length.
Source Address
The source address.
Fenner, et al. Standards Track [Page 112]
^L
RFC 4601 PIM-SM Specification August 2006
4.9.2. Hello Message Format
It is sent periodically by routers on all interfaces.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|PIM Ver| Type | Reserved | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| OptionType | OptionLength |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| OptionValue |
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| . |
| . |
| . |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| OptionType | OptionLength |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| OptionValue |
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
PIM Version, Type, Reserved, Checksum
Described in Section 4.9.
OptionType
The type of the option given in the following OptionValue field.
OptionLength
The length of the OptionValue field in bytes.
OptionValue
A variable length field, carrying the value of the option.
Fenner, et al. Standards Track [Page 113]
^L
RFC 4601 PIM-SM Specification August 2006
The Option fields may contain the following values:
o OptionType 1: Holdtime
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type = 1 | Length = 2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Holdtime |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Holdtime is the amount of time a receiver must keep the neighbor
reachable, in seconds. If the Holdtime is set to '0xffff', the
receiver of this message never times out the neighbor. This may be
used with dial-on-demand links, to avoid keeping the link up with
periodic Hello messages.
Hello messages with a Holdtime value set to '0' are also sent by a
router on an interface about to go down or changing IP address (see
Section 4.3.1). These are effectively goodbye messages, and the
receiving routers should immediately time out the neighbor
information for the sender.
o OptionType 2: LAN Prune Delay
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type = 2 | Length = 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|T| Propagation_Delay | Override_Interval |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The LAN Prune Delay option is used to tune the prune propagation
delay on multi-access LANs. The T bit specifies the ability of the
sending router to disable joins suppression. Propagation_Delay and
Override_Interval are time intervals in units of milliseconds. A
router originating a LAN Prune Delay option on interface I sets the
Propagation_Delay field to the configured value of
Propagation_Delay(I) and the value of the Override_Interval field
to the value of Override_Interval(I). On a receiving router, the
values of the fields are used to tune the value of the
Effective_Override_Interval(I) and its derived timer values.
Section 4.3.3 describes how these values affect the behavior of a
router.
Fenner, et al. Standards Track [Page 114]
^L
RFC 4601 PIM-SM Specification August 2006
o OptionType 3 to 16: reserved to be defined in future versions of
this document.
o OptionType 18: deprecated and should not be used.
o OptionType 19: DR Priority
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type = 19 | Length = 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| DR Priority |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
DR Priority is a 32-bit unsigned number and should be considered in
the DR election as described in Section 4.3.2.
o OptionType 20: Generation ID
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type = 20 | Length = 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Generation ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Generation ID is a random 32-bit value for the interface on which
the Hello message is sent. The Generation ID is regenerated
whenever PIM forwarding is started or restarted on the interface.
Fenner, et al. Standards Track [Page 115]
^L
RFC 4601 PIM-SM Specification August 2006
o OptionType 24: Address List
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type = 24 | Length = <Variable> |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Secondary Address 1 (Encoded-Unicast format) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Secondary Address N (Encoded-Unicast format) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The contents of the Address List Hello option are described in
Section 4.3.4. All addresses within a single Address List must
belong to the same address family.
OptionTypes 17 through 65000 are assigned by the IANA. OptionTypes
65001 through 65535 are reserved for Private Use, as defined in [9].
Unknown options MUST be ignored and MUST NOT prevent a neighbor
relationship from being formed. The "Holdtime" option MUST be
implemented; the "DR Priority" and "Generation ID" options SHOULD be
implemented. The "Address List" option MUST be implemented for IPv6.
4.9.3. Register Message Format
A Register message is sent by the DR or a PMBR to the RP when a
multicast packet needs to be transmitted on the RP-tree. The IP
source address is set to the address of the DR, the destination
address to the RP's address. The IP TTL of the PIM packet is the
system's normal unicast TTL.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|PIM Ver| Type | Reserved | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|B|N| Reserved2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
. Multicast data packet .
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Fenner, et al. Standards Track [Page 116]
^L
RFC 4601 PIM-SM Specification August 2006
PIM Version, Type, Reserved, Checksum
Described in Section 4.9. Note that in order to reduce
encapsulation overhead, the checksum for Registers is done only
on the first 8 bytes of the packet, including the PIM header and
the next 4 bytes, excluding the data packet portion. For
interoperability reasons, a message carrying a checksum
calculated over the entire PIM Register message should also be
accepted. When calculating the checksum, the IPv6 pseudoheader
"Upper-Layer Packet Length" is set to 8.
B The Border bit. If the router is a DR for a source that it is
directly connected to, it sets the B bit to 0. If the router is
a PMBR for a source in a directly connected cloud, it sets the B
bit to 1.
N The Null-Register bit. Set to 1 by a DR that is probing the RP
before expiring its local Register-Suppression Timer. Set to 0
otherwise.
Reserved2
Transmitted as zero, ignored on receipt.
Multicast data packet
The original packet sent by the source. This packet must be of
the same address family as the encapsulating PIM packet, e.g.,
an IPv6 data packet must be encapsulated in an IPv6 PIM packet.
Note that the TTL of the original packet is decremented before
encapsulation, just like any other packet that is forwarded. In
addition, the RP decrements the TTL after decapsulating, before
forwarding the packet down the shared tree.
For (S,G) Null-Registers, the Multicast data packet portion
contains a dummy IP header with S as the source address, G as
the destination address. When generating an IPv4 Null-Register
message, the fields in the dummy IPv4 header SHOULD be filled in
according to the following table. Other IPv4 header fields may
contain any value that is valid for that field.
Field Value
---------------------------------------
IP Version 4
Header Length 5
Checksum Header checksum
Fragmentation offset 0
More Fragments 0
Total Length 20
IP Protocol 103 (PIM)
Fenner, et al. Standards Track [Page 117]
^L
RFC 4601 PIM-SM Specification August 2006
On receipt of an (S,G) Null-Register, if the Header Checksum
field is non-zero, the recipient SHOULD check the checksum and
discard null registers that have a bad checksum. The recipient
SHOULD NOT check the value of any individual fields; a correct
IP header checksum is sufficient. If the Header Checksum field
is zero, the recipient MUST NOT check the checksum.
With IPv6, an implementation generates a dummy IP header
followed by a dummy PIM header with values according to the
following table in addition to the source and group. Other IPv6
header fields may contain any value that is valid for that
field.
Header Field Value
--------------------------------------
IP Version 6
Next Header 103 (PIM)
Length 4
PIM Version 0
PIM Type 0
PIM Reserved 0
PIM Checksum PIM checksum including
IPv6 "pseudo-header";
see Section 4.9
On receipt of an IPv6 (S,G) Null-Register, if the dummy PIM
header is present, the recipient SHOULD check the checksum and
discard Null-Registers that have a bad checksum.
Fenner, et al. Standards Track [Page 118]
^L
RFC 4601 PIM-SM Specification August 2006
4.9.4. Register-Stop Message Format
A Register-Stop is unicast from the RP to the sender of the Register
message. The IP source address is the address to which the register
was addressed. The IP destination address is the source address of
the register message.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|PIM Ver| Type | Reserved | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Group Address (Encoded-Group format) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Address (Encoded-Unicast format) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
PIM Version, Type, Reserved, Checksum
Described in Section 4.9.
Group Address
The group address from the multicast data packet in the
Register. Format described in Section 4.9.1. Note that for
Register-Stops the Mask Len field contains the full address
length * 8 (e.g., 32 for IPv4 native encoding), if the message
is sent for a single group.
Source Address
The host address of the source from the multicast data packet in
the register. The format for this address is given in the
Encoded-Unicast address in Section 4.9.1. A special wild card
value consisting of an address field of all zeros can be used to
indicate any source.
4.9.5. Join/Prune Message Format
A Join/Prune message is sent by routers towards upstream sources and
RPs. Joins are sent to build shared trees (RP trees) or source trees
(SPT). Prunes are sent to prune source trees when members leave
groups as well as sources that do not use the shared tree.
Fenner, et al. Standards Track [Page 119]
^L
RFC 4601 PIM-SM Specification August 2006
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|PIM Ver| Type | Reserved | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Upstream Neighbor Address (Encoded-Unicast format) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved | Num groups | Holdtime |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Multicast Group Address 1 (Encoded-Group format) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Number of Joined Sources | Number of Pruned Sources |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Joined Source Address 1 (Encoded-Source format) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| . |
| . |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Joined Source Address n (Encoded-Source format) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Pruned Source Address 1 (Encoded-Source format) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| . |
| . |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Pruned Source Address n (Encoded-Source format) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| . |
| . |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Multicast Group Address m (Encoded-Group format) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Number of Joined Sources | Number of Pruned Sources |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Joined Source Address 1 (Encoded-Source format) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| . |
| . |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Joined Source Address n (Encoded-Source format) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Pruned Source Address 1 (Encoded-Source format) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| . |
| . |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Pruned Source Address n (Encoded-Source format) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Fenner, et al. Standards Track [Page 120]
^L
RFC 4601 PIM-SM Specification August 2006
PIM Version, Type, Reserved, Checksum
Described in Section 4.9.
Unicast Upstream Neighbor Address
The address of the upstream neighbor that is the target of the
message. The format for this address is given in the Encoded-
Unicast address in Section 4.9.1. For IPv6 the source address
used for multicast messages is the link-local address of the
interface on which the message is being sent. For IPv4, the
source address is the primary address associated with that
interface.
Reserved
Transmitted as zero, ignored on receipt.
Holdtime
The amount of time a receiver must keep the Join/Prune state
alive, in seconds. If the Holdtime is set to '0xffff', the
receiver of this message should hold the state until canceled by
the appropriate canceling Join/Prune message, or timed out
according to local policy. This may be used with dial-on-demand
links, to avoid keeping the link up with periodic Join/Prune
messages.
Note that the HoldTime must be larger than the
J/P_Override_Interval(I).
Number of Groups
The number of multicast group sets contained in the message.
Multicast group address
For format description, see Section 4.9.1.
Number of Joined Sources
Number of joined source addresses listed for a given group.
Joined Source Address 1 .. n
This list contains the sources for a given group that the
sending router will forward multicast datagrams from if received
on the interface on which the Join/Prune message is sent.
See Encoded-Source-Address format in Section 4.9.1.
Number of Pruned Sources
Number of pruned source addresses listed for a group.
Fenner, et al. Standards Track [Page 121]
^L
RFC 4601 PIM-SM Specification August 2006
Pruned Source Address 1 .. n
This list contains the sources for a given group that the
sending router does not want to forward multicast datagrams from
when received on the interface on which the Join/Prune message
is sent.
Within one PIM Join/Prune message, all the Multicast Group Addresses,
Joined Source addresses, and Pruned Source addresses MUST be of the
same address family. It is NOT PERMITTED to mix IPv4 and IPv6
addresses within the same message. In addition, the address family
of the fields in the message SHOULD be the same as the IP source and
destination addresses of the packet. This permits maximum
implementation flexibility for dual-stack IPv4/IPv6 routers. If a
router receives a message with mixed family addresses, it SHOULD only
process the addresses that are of the same family as the unicast
upstream neighbor address.
4.9.5.1. Group Set Source List Rules
As described above, Join/Prune messages are composed of one or more
group sets. Each set contains two source lists, the Joined Sources
and the Pruned Sources. This section describes the different types
of group sets and source list entries that can exist in a Join/Prune
message.
There are two valid group set types:
Wildcard Group Set
The wildcard group set is represented by the entire multicast
range: the beginning of the multicast address range in the
group address field and the prefix length of the multicast
address range in the mask length field of the Multicast Group
Address (i.e., '224.0.0.0/4' for IPv4 or 'ff00::/8' for IPv6).
Each Join/Prune message SHOULD contain at most one wildcard
group set. Each wildcard group set may contain one or more
(*,*,RP) source list entries in either the Joined or Pruned
lists.
A (*,*,RP) source list entry may only exist in a wildcard group
set. When added to a Joined source list, this type of source
entry expresses the router's interest in receiving traffic for
all groups mapping to the specified RP. When added to a Pruned
source list a (*,*,RP) entry expresses the router's interest to
stop receiving such traffic. Note that as indicated by the
Join/Prune state machines, such a Join or Prune will NOT
override Join/Prune state created using a Group-Specific Set
(see below).
Fenner, et al. Standards Track [Page 122]
^L
RFC 4601 PIM-SM Specification August 2006
(*,*,RP) source list entries have the Source-Address set to the
address of the RP, the Source-Address Mask-Len set to the full
length of the IP address, and both the WC and RPT bits of the
Source-Address set to 1.
Group-Specific Set
A Group-Specific Set is represented by a valid IP multicast
address in the group address field and the full length of the IP
address in the mask length field of the Multicast Group Address.
Each Join/Prune message SHOULD NOT contain more than one group-
specific set for the same IP multicast address. Each group-
specific set may contain (*,G), (S,G,rpt), and (S,G) source list
entries in the Joined or Pruned lists.
(*,G)
The (*,G) source list entry is used in Join/Prune messages
sent towards the RP for the specified group. It expresses
interest (or lack thereof) in receiving traffic sent to the
group through the Rendezvous-Point shared tree. There may
only be one such entry in both the Joined and Pruned lists of
a group-specific set.
(*,G) source list entries have the Source-Address set to the
address of the RP for group G, the Source-Address Mask-Len set
to the full length of the IP address, and both the WC and RPT
bits of the Encoded-Source-Address set.
(S,G,rpt)
The (S,G,rpt) source list entry is used in Join/Prune messages
sent towards the RP for the specified group. It expresses
interest (or lack thereof) in receiving traffic through the
shared tree sent by the specified source to this group. For
each source address, the entry may exist in only one of the
Joined and Pruned source lists of a group-specific set, but
not both.
(S,G,rpt) source list entries have the Source-Address set to
the address of the source S, the Source-Address Mask-Len set
to the full length of the IP address, and the WC bit cleared
and the RPT bit set in the Encoded-Source-Address.
(S,G)
The (S,G) source list entry is used in Join/Prune messages
sent towards the specified source. It expresses interest (or
lack thereof) in receiving traffic through the shortest path
tree sent by the source to the specified group. For each
source address, the entry may exist in only one of the Joined
and Pruned source lists of a group-specific set, but not both.
Fenner, et al. Standards Track [Page 123]
^L
RFC 4601 PIM-SM Specification August 2006
(S,G) source list entries have the Source-Address set to the
address of the source S, the Source-Address Mask-Len set to
the full length of the IP address, and both the WC and RPT
bits of the Encoded-Source-Address cleared.
The rules described above are sufficient to prevent invalid
combinations of source list entries in group-specific sets. There
are, however, a number of combinations that have a valid
interpretation but that are not generated by the protocol as
described in this specification:
o Combining a (*,G) Join and a (S,G,rpt) Join entry in the same
message is redundant as the (*,G) entry covers the information
provided by the (S,G,rpt) entry.
o The same applies for a (*,G) Prunes and (S,G,rpt) Prunes.
o The combination of a (*,G) Prune and a (S,G,rpt) Join is also not
generated. (S,G,rpt) Joins are only sent when the router is
receiving all traffic for a group on the shared tree and it wishes
to indicate a change for the particular source. As a (*,G) prune
indicates that the router no longer wishes to receive shared tree
traffic, the (S,G,rpt) Join would be meaningless.
o As Join/Prune messages are targeted to a single PIM neighbor,
including both a (S,G) Join and a (S,G,rpt) Prune in the same
message is usually redundant. The (S,G) Join informs the neighbor
that the sender wishes to receive the particular source on the
shortest path tree. It is therefore unnecessary for the router to
say that it no longer wishes to receive it on the shared tree.
However, there is a valid interpretation for this combination of
entries. A downstream router may have to instruct its upstream
only to start forwarding a specific source once it has started
receiving the source on the shortest-path tree.
o The combination of a (S,G) Prune and a (S,G,rpt) Join could
possibly be used by a router to switch from receiving a particular
source on the shortest-path tree back to receiving it on the shared
tree (provided that the RPF neighbor for the shortest-path and
shared trees is common). However, Sparse-Mode PIM does not provide
a mechanism for explicitly switching back to the shared tree.
Fenner, et al. Standards Track [Page 124]
^L
RFC 4601 PIM-SM Specification August 2006
The rules are summarized in the tables below.
+----------++------+-------+-----------+-----------+-------+-------+
| ||Join | Prune | Join | Prune | Join | Prune |
| ||(*,G) | (*,G) | (S,G,rpt) | (S,G,rpt) | (S,G) | (S,G) |
+----------++------+-------+-----------+-----------+-------+-------+
|Join ||- | no | ? | yes | yes | yes |
|(*,G) || | | | | | |
+----------++------+-------+-----------+-----------+-------+-------+
|Prune ||no | - | ? | ? | yes | yes |
|(*,G) || | | | | | |
+----------++------+-------+-----------+-----------+-------+-------+
|Join ||? | ? | - | no | yes | ? |
|(S,G,rpt) || | | | | | |
+----------++------+-------+-----------+-----------+-------+-------+
|Prune ||yes | ? | no | - | yes | ? |
|(S,G,rpt) || | | | | | |
+----------++------+-------+-----------+-----------+-------+-------+
|Join ||yes | yes | yes | yes | - | no |
|(S,G) || | | | | | |
+----------++------+-------+-----------+-----------+-------+-------+
|Prune ||yes | yes | ? | ? | no | - |
|(S,G) || | | | | | |
+----------++------+-------+-----------+-----------+-------+-------+
+---------------++--------------+----------------+------------+
| ||Join (*,*,RP) | Prune (*,*,RP) | all others |
+---------------++--------------+----------------+------------+
|Join (*,*,RP) ||- | no | yes |
+---------------++--------------+----------------+------------+
|Prune (*,*,RP) ||no | - | yes |
+---------------++--------------+----------------+------------+
|all others ||yes | yes | see above |
+---------------++--------------+----------------+------------+
yes Allowed and expected.
no Combination is not allowed by the protocol and MUST NOT be
generated by a router. A router MAY accept these messages, but
the result is undefined. An error message MAY be logged to the
administrator in a rate-limited manner.
? Combination not expected by the protocol, but well-defined. A
router MAY accept it but SHOULD NOT generate it.
The order of source list entries in a group set source list is not
important, except where limited by the packet format itself.
Fenner, et al. Standards Track [Page 125]
^L
RFC 4601 PIM-SM Specification August 2006
4.9.5.2. Group Set Fragmentation
When building a Join/Prune for a particular neighbor, a router should
try to include in the message as much of the information it needs to
convey to the neighbor as possible. This implies adding one group
set for each multicast group that has information pending
transmission and within each set including all relevant source list
entries.
On a router with a large amount of multicast state, the number of
entries that must be included may result in packets that are larger
than the maximum IP packet size. In most such cases, the information
may be split into multiple messages.
There is an exception with group sets that contain a (*,G) Joined
source list entry. The group set expresses the router's interest in
receiving all traffic for the specified group on the shared tree, and
it MUST include an (S,G,rpt) Pruned source list entry for every
source that the router does not wish to receive. This list of
(S,G,rpt) Pruned source-list entries MUST not be split in multiple
messages.
If only N (S,G,rpt) Prune entries fit into a maximum-sized Join/Prune
message, but the router has more than N (S,G,rpt) Prunes to add, then
the router MUST choose to include the first N (numerically smallest
in network byte order) IP addresses.
4.9.6. Assert Message Format
The Assert message is used to resolve forwarder conflicts between
routers on a link. It is sent when a router receives a multicast
data packet on an interface on which the router would normally have
forwarded that packet. Assert messages may also be sent in response
to an Assert message from another router.
Fenner, et al. Standards Track [Page 126]
^L
RFC 4601 PIM-SM Specification August 2006
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|PIM Ver| Type | Reserved | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Group Address (Encoded-Group format) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Address (Encoded-Unicast format) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|R| Metric Preference |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
PIM Version, Type, Reserved, Checksum
Described in Section 4.9.
Group Address
The group address for which the router wishes to resolve the
forwarding conflict. This is an Encoded-Group address, as
specified in Section 4.9.1.
Source Address
Source address for which the router wishes to resolve the
forwarding conflict. The source address MAY be set to zero for
(*,G) asserts (see below). The format for this address is given
in Encoded-Unicast-Address in Section 4.9.1.
R RPT-bit is a 1-bit value. The RPT-bit is set to 1 for
Assert(*,G) messages and 0 for Assert(S,G) messages.
Metric Preference
Preference value assigned to the unicast routing protocol that
provided the route to the multicast source or Rendezvous-Point.
Metric
The unicast routing table metric associated with the route used
to reach the multicast source or Rendezvous-Point. The metric
is in units applicable to the unicast routing protocol used.
Assert messages can be sent to resolve a forwarding conflict for all
traffic to a given group or for a specific source and group.
Fenner, et al. Standards Track [Page 127]
^L
RFC 4601 PIM-SM Specification August 2006
Assert(S,G)
Source-specific asserts are sent by routers forwarding a
specific source on the shortest-path tree (SPTbit is TRUE).
(S,G) Asserts have the Group-Address field set to the group G
and the Source-Address field set to the source S. The RPT-bit
is set to 0, the Metric-Preference is set to MRIB.pref(S) and
the Metric is set to MRIB.metric(S).
Assert(*,G)
Group-specific asserts are sent by routers forwarding data for
the group and source(s) under contention on the shared tree.
(*,G) asserts have the Group-Address field set to the group G.
For data-triggered Asserts, the Source-Address field MAY be set
to the IP source address of the data packet that triggered the
Assert and is set to zero otherwise. The RPT-bit is set to 1,
the Metric-Preference is set to MRIB.pref(RP(G)), and the Metric
is set to MRIB.metric(RP(G)).
4.10. PIM Timers
PIM-SM maintains the following timers, as discussed in Section 4.1.
All timers are countdown timers; they are set to a value and count
down to zero, at which point they typically trigger an action. Of
course they can just as easily be implemented as count-up timers,
where the absolute expiry time is stored and compared against a
real-time clock, but the language in this specification assumes that
they count downwards to zero.
Global Timers
Per interface (I):
Hello Timer: HT(I)
Per neighbor (N):
Neighbor Liveness Timer: NLT(N,I)
Per active RP (RP):
(*,*,RP) Join Expiry Timer: ET(*,*,RP,I)
(*,*,RP) Prune-Pending Timer: PPT(*,*,RP,I)
Per Group (G):
(*,G) Join Expiry Timer: ET(*,G,I)
Fenner, et al. Standards Track [Page 128]
^L
RFC 4601 PIM-SM Specification August 2006
(*,G) Prune-Pending Timer: PPT(*,G,I)
(*,G) Assert Timer: AT(*,G,I)
Per Source (S):
(S,G) Join Expiry Timer: ET(S,G,I)
(S,G) Prune-Pending Timer: PPT(S,G,I)
(S,G) Assert Timer: AT(S,G,I)
(S,G,rpt) Prune Expiry Timer: ET(S,G,rpt,I)
(S,G,rpt) Prune-Pending Timer: PPT(S,G,rpt,I)
Per active RP (RP):
(*,*,RP) Upstream Join Timer: JT(*,*,RP)
Per Group (G):
(*,G) Upstream Join Timer: JT(*,G)
Per Source (S):
(S,G) Upstream Join Timer: JT(S,G)
(S,G) Keepalive Timer: KAT(S,G)
(S,G,rpt) Upstream Override Timer: OT(S,G,rpt)
At the DRs or relevant Assert Winners only:
Per Source,Group pair (S,G):
Register-Stop Timer: RST(S,G)
4.11. Timer Values
When timers are started or restarted, they are set to default values.
This section summarizes those default values.
Note that protocol events or configuration may change the default
value of a timer on a specific interface. When timers are
initialized in this document, the value specific to the interface in
context must be used.
Fenner, et al. Standards Track [Page 129]
^L
RFC 4601 PIM-SM Specification August 2006
Some of the timers listed below (Prune-Pending, Upstream Join,
Upstream Override) can be set to values that depend on the settings
of the Propagation_Delay and Override_Interval of the corresponding
interface. The default values for these are given below.
Variable Name: Propagation_Delay(I)
+-------------------------------+--------------+----------------------+
| Value Name | Value | Explanation |
+-------------------------------+--------------+----------------------+
| Propagation_delay_default | 0.5 secs | Expected |
| | | propagation delay |
| | | over the local |
| | | link. |
+-------------------------------+--------------+----------------------+
The default value of the Propagation_delay_default is chosen to be
relatively large to provide compatibility with older PIM
implementations.
Variable Name: Override_Interval(I)
+--------------------------+-----------------+-------------------------+
| Value Name | Value | Explanation |
+--------------------------+-----------------+-------------------------+
| t_override_default | 2.5 secs | Default delay |
| | | interval over |
| | | which to randomize |
| | | when scheduling a |
| | | delayed Join |
| | | message. |
+--------------------------+-----------------+-------------------------+
Timer Name: Hello Timer (HT(I))
+---------------------+--------+---------------------------------------+
|Value Name | Value | Explanation |
+---------------------+--------+---------------------------------------+
|Hello_Period | 30 secs| Periodic interval for Hello messages. |
+---------------------+--------+---------------------------------------+
|Triggered_Hello_Delay| 5 secs | Randomized interval for initial Hello |
| | | message on bootup or triggered Hello |
| | | message to a rebooting neighbor. |
+---------------------+--------+---------------------------------------+
Fenner, et al. Standards Track [Page 130]
^L
RFC 4601 PIM-SM Specification August 2006
At system power-up, the timer is initialized to rand(0,
Triggered_Hello_Delay) to prevent synchronization. When a new or
rebooting neighbor is detected, a responding Hello is sent within
rand(0, Triggered_Hello_Delay).
Timer Name: Neighbor Liveness Timer (NLT(N,I))
+--------------------------+----------------------+--------------------+
| Value Name | Value | Explanation |
+--------------------------+----------------------+--------------------+
| Default_Hello_Holdtime | 3.5 * Hello_Period | Default holdtime |
| | | to keep neighbor |
| | | state alive |
+--------------------------+----------------------+--------------------+
| Hello_Holdtime | from message | Holdtime from |
| | | Hello Message |
| | | Holdtime option. |
+--------------------------+----------------------+--------------------+
The Holdtime in a Hello Message should be set to (3.5 *
Hello_Period), giving a default value of 105 seconds.
Timer Names: Expiry Timer (ET(*,*,RP,I), ET(*,G,I), ET(S,G,I),
ET(S,G,rpt,I))
+----------------+----------------+------------------------------------+
| Value Name | Value | Explanation |
+----------------+----------------+------------------------------------+
| J/P_HoldTime | from message | Holdtime from Join/Prune Message |
+----------------+----------------+------------------------------------+
See details of JT(*,G) for the Holdtime that is included in
Join/Prune Messages.
Fenner, et al. Standards Track [Page 131]
^L
RFC 4601 PIM-SM Specification August 2006
Timer Names: Prune-Pending Timer (PPT(*,*,RP,I), PPT(*,G,I),
PPT(S,G,I), PPT(S,G,rpt,I))
+--------------------------+---------------------+---------------------+
|Value Name | Value | Explanation |
+--------------------------+---------------------+---------------------+
|J/P_Override_Interval(I) | Default: | Short period after |
| | Effective_ | a join or prune to |
| | Propagation_ | allow other |
| | Delay(I) + | routers on the LAN |
| | EffectiveOverride_ | to override the |
| | Interval(I) | join or prune |
+--------------------------+---------------------+---------------------+
Note that both the Effective_Propagation_Delay(I) and the
Effective_Override_Interval(I) are interface-specific values that may
change when Hello messages are received (see Section 4.3.3).
Timer Names: Assert Timer (AT(*,G,I), AT(S,G,I))
+---------------------------+---------------------+--------------------+
| Value Name | Value | Explanation |
+---------------------------+---------------------+--------------------+
| Assert_Override_Interval | Default: 3 secs | Short interval |
| | | before an assert |
| | | times out where |
| | | the assert winner |
| | | resends an Assert |
| | | message |
+---------------------------+---------------------+--------------------+
| Assert_Time | Default: 180 secs | Period after last |
| | | assert before |
| | | assert state is |
| | | timed out |
+---------------------------+---------------------+--------------------+
Note that for historical reasons, the Assert message lacks a Holdtime
field. Thus, changing the Assert Time from the default value is not
recommended.
Fenner, et al. Standards Track [Page 132]
^L
RFC 4601 PIM-SM Specification August 2006
Timer Names: Upstream Join Timer (JT(*,*,RP), JT(*,G), JT(S,G))
+-------------+--------------------+-----------------------------------+
|Value Name | Value | Explanation |
+-------------+--------------------+-----------------------------------+
|t_periodic | Default: 60 secs | Period between Join/Prune Messages|
+-------------+--------------------+-----------------------------------+
|t_suppressed | rand(1.1 * | Suppression period when someone |
| | t_periodic, 1.4 * | else sends a J/P message so we |
| | t_periodic) when | don't need to do so. |
| | Suppression_ | |
| | Enabled(I) is | |
| | true, 0 otherwise | |
+-------------+--------------------+-----------------------------------+
|t_override | rand(0, Effective_ | Randomized delay to prevent |
| | Override_ | response implosion when sending a |
| | Interval(I)) | join message to override someone |
| | | else's Prune message. |
+-------------+--------------------+-----------------------------------+
t_periodic may be set to take into account such things as the
configured bandwidth and expected average number of multicast route
entries for the attached network or link (e.g., the period would be
longer for lower-speed links, or for routers in the center of the
network that expect to have a larger number of entries). If the
Join/Prune-Period is modified during operation, these changes should
be made relatively infrequently, and the router should continue to
refresh at its previous Join/Prune-Period for at least Join/Prune-
Holdtime, in order to allow the upstream router to adapt.
The holdtime specified in a Join/Prune message should be set to (3.5
* t_periodic).
t_override depends on the Effective_Override_Interval of the upstream
interface, which may change when Hello messages are received.
t_suppressed depends on the Suppression State of the upstream
interface (Section 4.3.3) and becomes zero when suppression is
disabled.
Fenner, et al. Standards Track [Page 133]
^L
RFC 4601 PIM-SM Specification August 2006
Timer Name: Upstream Override Timer (OT(S,G,rpt))
+---------------+--------------------------+---------------------------+
| Value Name | Value | Explanation |
+---------------+--------------------------+---------------------------+
| t_override | see Upstream Join Timer | see Upstream Join Timer |
+---------------+--------------------------+---------------------------+
The upstream Override Timer is only ever set to t_override; this
value is defined in the section on Upstream Join Timers.
Timer Name: Keepalive Timer (KAT(S,G))
+-----------------------+-----------------------+----------------------+
| Value Name | Value | Explanation |
+-----------------------+-----------------------+----------------------+
| Keepalive_Period | Default: 210 secs | Period after last |
| | | (S,G) data packet |
| | | during which (S,G) |
| | | Join state will be |
| | | maintained even in |
| | | the absence of |
| | | (S,G) Join |
| | | messages. |
+-----------------------+-----------------------+----------------------+
| RP_Keepalive_Period | ( 3 * Register_ | As |
| | Suppression_Time ) | Keepalive_Period, |
| | + Register_ | but at the RP when |
| | Probe_Time | a Register-Stop is |
| | | sent. |
+-----------------------+-----------------------+----------------------+
The normal keepalive period for the KAT(S,G) defaults to 210 seconds.
However, at the RP, the keepalive period must be at least the
Register_Suppression_Time, or the RP may time out the (S,G) state
before the next Null-Register arrives. Thus, the KAT(S,G) is set to
max(Keepalive_Period, RP_Keepalive_Period) when a Register-Stop is
sent.
Fenner, et al. Standards Track [Page 134]
^L
RFC 4601 PIM-SM Specification August 2006
Timer Name: Register-Stop Timer (RST(S,G))
+---------------------------+--------------------+---------------------+
|Value Name | Value | Explanation |
+---------------------------+--------------------+---------------------+
|Register_Suppression_Time | Default: 60 secs | Period during |
| | | which a DR stops |
| | | sending Register- |
| | | encapsulated data |
| | | to the RP after |
| | | receiving a |
| | | Register-Stop |
| | | message. |
+---------------------------+--------------------+---------------------+
|Register_Probe_Time | Default: 5 secs | Time before RST |
| | | expires when a DR |
| | | may send a Null- |
| | | Register to the RP |
| | | to cause it to |
| | | resend a Register- |
| | | Stop message. |
+---------------------------+--------------------+---------------------+
If the Register_Suppression_Time or the Register_Probe_Time are
configured to values other than the defaults, it MUST be ensured that
the value of the Register_Probe_Time is less than half the value of
the Register_Suppression_Time to prevent a possible negative value in
the setting of the Register-Stop Timer.
5. IANA Considerations
5.1. PIM Address Family
The PIM Address Family field was chosen to be 8 bits as a tradeoff
between packet format and use of the IANA assigned numbers. Because
when the PIM packet format was designed only 15 values were assigned
for Address Families, and large numbers of new Address Family values
were not envisioned, 8 bits seemed large enough. However, the IANA
assigns Address Families in a 16-bit field. Therefore, the PIM
Address Family is allocated as follows:
Values 0 through 127 are designated to have the same meaning as
IANA-assigned Address Family Numbers [7].
Values 128 through 250 are designated to be assigned for PIM by the
IANA based upon IESG Approval, as defined in [9].
Values 251 through 255 are designated for Private Use, as defined
Fenner, et al. Standards Track [Page 135]
^L
RFC 4601 PIM-SM Specification August 2006
in [9].
5.2. PIM Hello Options
Values 17 through 65000 are to be assigned by the IANA. Since the
space is large, they may be assigned as First Come First Served as
defined in [9]. Such assignments are valid for one year and may be
renewed. Permanent assignments require a specification (see
"Specification Required" in [9].)
6. Security Considerations
This section describes various possible security concerns related to
the PIM-SM protocol, including a description of how to use IPsec to
secure the protocol. The reader is referred to [15] and [16] for
further discussion of PIM-SM and multicast security. The IPsec
authentication header [8] MAY be used to provide data integrity
protection and groupwise data origin authentication of PIM protocol
messages. Authentication of PIM messages can protect against
unwanted behaviors caused by unauthorized or altered PIM messages.
6.1. Attacks Based on Forged Messages
The extent of possible damage depends on the type of counterfeit
messages accepted. We next consider the impact of possible
forgeries, including forged link-local (Join/Prune, Hello, and
Assert) and forged unicast (Register and Register-Stop) messages.
6.1.1. Forged Link-Local Messages
Join/Prune, Hello, and Assert messages are all sent to the link-local
ALL_PIM_ROUTERS multicast addresses and thus are not forwarded by a
compliant router. A forged message of this type can only reach a LAN
if it was sent by a local host or if it was allowed onto the LAN by a
compromised or non-compliant router.
1. A forged Join/Prune message can cause multicast traffic to be
delivered to links where there are no legitimate requesters,
potentially wasting bandwidth on that link. A forged leave
message on a multi-access LAN is generally not a significant
attack in PIM, because any legitimately joined router on the LAN
would override the leave with a join before the upstream router
stops forwarding data to the LAN.
2. By forging a Hello message, an unauthorized router can cause
itself to be elected as the designated router on a LAN. The
designated router on a LAN is (in the absence of asserts)
responsible for forwarding traffic to that LAN on behalf of any
Fenner, et al. Standards Track [Page 136]
^L
RFC 4601 PIM-SM Specification August 2006
local members. The designated router is also responsible for
register-encapsulating to the RP any packets that are originated
by hosts on the LAN. Thus, the ability of local hosts to send
and receive multicast traffic may be compromised by a forged
Hello message.
3. By forging an Assert message on a multi-access LAN, an attacker
could cause the legitimate designated forwarder to stop
forwarding traffic to the LAN. Such a forgery would prevent any
hosts downstream of that LAN from receiving traffic.
6.1.2. Forged Unicast Messages
Register messages and Register-Stop messages are forwarded by
intermediate routers to their destination using normal IP forwarding.
Without data origin authentication, an attacker who is located
anywhere in the network may be able to forge a Register or Register-
Stop message. We consider the effect of a forgery of each of these
messages next.
1. By forging a Register message, an attacker can cause the RP to
inject forged traffic onto the shared multicast tree.
2. By forging a Register-stop message, an attacker can prevent a
legitimate DR from Registering packets to the RP. This can
prevent local hosts on that LAN from sending multicast packets.
The above two PIM messages are not changed by intermediate routers
and need only be examined by the intended receiver. Thus, these
messages can be authenticated end-to-end, using AH. Attacks on
Register and Register-Stop messages do not apply to a PIM-SSM-only
implementation, as these messages are not required for PIM-SSM.
6.2. Non-Cryptographic Authentication Mechanisms
A PIM router SHOULD provide an option to limit the set of neighbors
from which it will accept Join/Prune, Assert, and Hello messages.
Either static configuration of IP addresses or an IPsec security
association may be used. Furthermore, a PIM router SHOULD NOT accept
protocol messages from a router from which it has not yet received a
valid Hello message.
A Designated Router MUST NOT register-encapsulate a packet and send
it to the RP unless the source address of the packet is a legal
address for the subnet on which the packet was received. Similarly,
a Designated Router SHOULD NOT accept a Register-Stop packet whose IP
source address is not a valid RP address for the local domain.
Fenner, et al. Standards Track [Page 137]
^L
RFC 4601 PIM-SM Specification August 2006
An implementation SHOULD provide a mechanism to allow an RP to
restrict the range of source addresses from which it accepts
Register-encapsulated packets.
All options that restrict the range of addresses from which packets
are accepted MUST default to allowing all packets.
6.3. Authentication Using IPsec
The IPsec [8] transport mode using the Authentication Header (AH) is
the recommended method to prevent the above attacks against PIM. The
specific AH authentication algorithm and parameters, including the
choice of authentication algorithm and the choice of key, are
configured by the network administrator. When IPsec authentication
is used, a PIM router should reject (drop without processing) any
unauthorized PIM protocol messages.
To use IPsec, the administrator of a PIM network configures each PIM
router with one or more security associations (SAs) and associated
Security Parameter Indexes (SPIs) that are used by senders to
authenticate PIM protocol messages and are used by receivers to
authenticate received PIM protocol messages. This document does not
describe protocols for establishing SAs. It assumes that manual
configuration of SAs is performed, but it does not preclude the use
of a negotiation protocol such as the Internet Key Exchange [14] to
establish SAs.
IPsec [8] provides protection against replayed unicast and multicast
messages. The anti-replay option for IPsec SHOULD be enabled on all
SAs.
The following sections describe the SAs required to protect PIM
protocol messages.
6.3.1. Protecting Link-Local Multicast Messages
The network administrator defines an SA and SPI that are to be used
to authenticate all link-local PIM protocol messages (Hello,
Join/Prune, and Assert) on each link in a PIM domain.
IPsec [8] allows (but does not require) different Security Policy
Databases (SPD) for each router interface. If available, it may be
desirable to configure the Security Policy Database at a PIM router
such that all incoming and outgoing Join/Prune, Assert, and Hello
packets use a different SA for each incoming or outgoing interface.
Fenner, et al. Standards Track [Page 138]
^L
RFC 4601 PIM-SM Specification August 2006
6.3.2. Protecting Unicast Messages
IPsec can also be used to provide data origin authentication and data
integrity protection for the Register and Register-Stop unicast
messages.
6.3.2.1. Register Messages
The Security Policy Database at every PIM router is configured to
select an SA to use when sending PIM Register packets to each
rendezvous point.
In the most general mode of operation, the Security Policy Database
at each DR is configured to select a unique SA and SPI for traffic
sent to each RP. This allows each DR to have a different
authentication algorithm and key to talk to the RP. However, this
creates a daunting key management and distribution problem for the
network administrator. Therefore, it may be preferable in PIM
domains where all Designated Routers are under a single
administrative control that the same authentication algorithm
parameters (including the key) be used for all Registered packets in
a domain, regardless of who are the RP and the DR.
In this "single shared key" mode of operation, the network
administrator must choose an SPI for each DR that will be used to
send it PIM protocol packets. The Security Policy Database at every
DR is configured to select an SA (including the authentication
algorithm, authentication parameters, and this SPI) when sending
Register messages to this RP.
By using a single authentication algorithm and associated parameters,
the key distribution problem is simplified. Note, however, that this
method has the property that, in order to change the authentication
method or authentication key used, all routers in the domain must be
updated.
6.3.2.2. Register-Stop Messages
Similarly, the Security Policy Database at each Rendezvous Point
should be configured to choose an SA to use when sending Register-
Stop messages. Because Register-Stop messages are unicast to the
destination DR, a different SA and a potentially unique SPI are
required for each DR.
In order to simplify the management problem, it may be acceptable to
use the same authentication algorithm and authentication parameters,
regardless of the sending RP and regardless of the destination DR.
Although a unique SA is needed for each DR, the same authentication
Fenner, et al. Standards Track [Page 139]
^L
RFC 4601 PIM-SM Specification August 2006
algorithm and authentication algorithm parameters (secret key) can be
shared by all DRs and by all RPs.
6.4. Denial-of-Service Attacks
There are a number of possible denial-of-service attacks against PIM
that can be caused by generating false PIM protocol messages or even
by generating data false traffic. Authenticating PIM protocol
traffic prevents some, but not all, of these attacks. Three of the
possible attacks include:
- Sending packets to many different group addresses quickly can be a
denial-of-service attack in and of itself. This will cause many
register-encapsulated packets, loading the DR, the RP, and the
routers between the DR and the RP.
- Forging Join messages can cause a multicast tree to get set up. A
large number of forged joins can consume router resources and
result in denial of service.
- Forging a (*,*,RP) join presents a possibility for a denial-of-
service attack by causing all traffic in the domain to flow to the
PMBR issuing the join. (*,*,RP) behavior is included here
primarily for backwards compatibility with prior revisions of the
spec. However, the implementation of (*,*,RP) and PMBR is
optional. When using (*,*,RP), the security concerns should be
carefully considered.
7. Acknowledgements
PIM-SM was designed over many years by a large group of people,
including ideas, comments, and corrections from Deborah Estrin, Dino
Farinacci, Ahmed Helmy, David Thaler, Steve Deering, Van Jacobson, C.
Liu, Puneet Sharma, Liming Wei, Tom Pusateri, Tony Ballardie, Scott
Brim, Jon Crowcroft, Paul Francis, Joel Halpern, Horst Hodel, Polly
Huang, Stephen Ostrowski, Lixia Zhang, Girish Chandranmenon, Brian
Haberman, Hal Sandick, Mike Mroz, Garry Kump, Pavlin Radoslavov, Mike
Davison, James Huang, Christopher Thomas Brown, and James Lingard.
Thanks are due to the American Licorice Company, for its obscure but
possibly essential role in the creation of this document.
Fenner, et al. Standards Track [Page 140]
^L
RFC 4601 PIM-SM Specification August 2006
8. Normative References
[1] Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", BCP 14, RFC 2119, March 1997.
[2] Cain, B., Deering, S., Kouvelas, I., Fenner, B., and A.
Thyagarajan, "Internet Group Management Protocol, Version 3",
RFC 3376, October 2002.
[3] Deering, S., "Host extensions for IP multicasting", STD 5, RFC
1112, August 1989.
[4] Deering, S., Fenner, W., and B. Haberman, "Multicast Listener
Discovery (MLD) for IPv6", RFC 2710, October 1999.
[5] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6)
Specification", RFC 2460, December 1998.
[6] Holbrook, H. and B. Cain, "Source-Specific Multicast for IP",
RFC 4507, August 2006.
[7] IANA, "Address Family Numbers",
<http://www.iana.org/assignments/address-family-numbers>.
[8] Kent, S. and K. Seo, "Security Architecture for the Internet
Protocol", RFC 4301, December 2005.
[9] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA
Considerations Section in RFCs", BCP 26, RFC 2434, October 1998.
9. Informative References
[10] Bates, T., Rekhter, Y., Chandra, R., and D. Katz, "Multiprotocol
Extensions for BGP-4", RFC 2858, June 2000.
[11] Bhaskar, N., Gall, A., Lingard, J., and S. Venaas, "Bootstrap
Router (BSR) Mechanism for PIM Sparse Mode", Work in Progress,
May 2006.
[12] Black, D., "Differentiated Services and Tunnels", RFC 2983,
October 2000.
[13] Handley, M., Kouvelas, I., Speakman, T., and L. Vicisano, "Bi-
directional Protocol Independent Multicast", Work in Progress,
October 2005.
[14] Kaufman, C., "Internet Key Exchange (IKEv2) Protocol", RFC 4306,
December 2005.
Fenner, et al. Standards Track [Page 141]
^L
RFC 4601 PIM-SM Specification August 2006
[15] Savola, P., Lehtonen, R., and D. Meyer, "Protocol Independent
Multicast - Sparse Mode (PIM-SM) Multicast Routing Security
Issues and Enhancements", RFC 4609, August 2006.
[16] Savola, P. and J. Lingard, "Last-hop Threats to Protocol
Independent Multicast (PIM)", Work in Progress, January 2005.
[17] Savola, P. and B. Haberman, "Embedding the Rendezvous Point (RP)
Address in an IPv6 Multicast Address", RFC 3956, November 2004.
[18] Thaler, D., "Interoperability Rules for Multicast Routing
Protocols", RFC 2715, October 1999.
Fenner, et al. Standards Track [Page 142]
^L
RFC 4601 PIM-SM Specification August 2006
Appendix A. PIM Multicast Border Router Behavior
In some cases, PIM-SM domains will interconnect with non-PIM
multicast domains. In these cases, the border routers of the PIM
domain speak PIM-SM on some interfaces and speak other multicast
routing protocols on other interfaces. Such routers are termed PIM
Multicast Border Routers (PMBRs). In general, RFC 2715 [18] provides
rules for interoperability between different multicast routing
protocols. In this appendix, we specify how PMBRs differ from
regular PIM-SM routers.
From the point of view of PIM-SM, a PMBR has two tasks:
o To ensure that traffic from sources outside the PIM-SM domain
reaches receivers inside the domain.
o To ensure that traffic from sources inside the PIM-SM domain
reaches receivers outside the domain.
We note that multiple PIM-SM domains are sometimes connected together
using protocols such as Multicast Source Discovery Protocol (MSDP),
which provides information about active external sources, but does
not follow RFC 2715. In such cases, the domains are not connected
via PMBRs because Join(S,G) messages traverse the border between
domains. A PMBR is required when no PIM messages can traverse the
border.
A.1. Sources External to the PIM-SM Domain
A PMBR needs to ensure that traffic from multicast sources external
to the PIM-SM domain reaches receivers inside the domain. The PMBR
will follow the rules in RFC 2715, such that traffic from external
sources reaches the PMBR itself.
According to RFC 2715, the PIM-SM component of the PMBR will receive
an (S,G) Creation event when data from an (S,G) data packet from an
external source first reaches the PMBR. If RPF_interface(S) is an
interface in the PIM-SM domain, the packet cannot be originated into
the PIM domain at this router, and the PIM-SM component of the PMBR
will not process the packet. Otherwise, the PMBR will then act
exactly as if it were the DR for this source (see Section 4.4.1),
with the following modifications:
o The Border-bit is set in all PIM Register messages sent for these
sources.
o DirectlyConnected(S) is treated as being TRUE for these sources.
Fenner, et al. Standards Track [Page 143]
^L
RFC 4601 PIM-SM Specification August 2006
o The PIM-SM forwarding rule "iif == RPF_interface(S)" is relaxed to
be TRUE if iif is any interface that is not part of the PIM-SM
component of the PMBR (see Section 4.2).
A.2. Sources Internal to the PIM-SM Domain
A PMBR needs to ensure that traffic from sources inside the PIM-SM
domain reaches receivers outside the domain. Using terminology from
RFC 2715, there are two possible scenarios for this:
o Another component of the PMBR is a wildcard receiver. In this
case, the PIM-SM component of the PMBR must ensure that traffic
from all internal sources reaches the PMBR until it is informed
otherwise.
Note that certain profiles of PIM-SM (e.g., PIM-SSM, PIM-SM with
Embedded RP) cannot interoperate with a neighboring wildcard
receiver domain.
o No other component of the PMBR is a wildcard receiver. In this
case the PMBR will receive explicit information as to which groups
or (source,group) pairs the external domains wish to receive.
In the former case, the PMBR will need to send a Join(*,*,RP) to all
the active RPs in the PIM-SM domain. It may also send a Join(*,*,RP)
to all the candidate RPs in the PIM-SM domain. This will cause all
traffic in the domain to reach the PMBR. The PMBR may then act as if
it were a DR with directly connected receivers and trigger the
transition to a shortest path tree (see Section 4.2.1).
In the latter case, the PMBR will not need to send Join(*,*,RP)
messages. However, the PMBR will still need to act as a DR with
directly connected receivers on behalf of the external receivers in
terms of being able to switch to the shortest-path tree for
internally-reached sources.
According to RFC 2715, the PIM-SM component of the PMBR may receive a
number of alerts generated by events in the external routing
components. To implement the above behavior, one reasonable way to
map these alerts into PIM-SM state is as follows:
o When a PIM-SM component receives an (S,G) Prune alert, it sets
local_receiver_include(S,G,I) to FALSE for the discard interface.
o When a PIM-SM component receives a (*,G) Prune alert, it sets
local_receiver_include(*,G,I) to FALSE for the discard interface.
Fenner, et al. Standards Track [Page 144]
^L
RFC 4601 PIM-SM Specification August 2006
o When a PIM-SM component receives an (S,G) Join alert, it sets
local_receiver_include(S,G,I) to TRUE for the discard interface.
o When a PIM-SM component receives a (*,G) Join alert, it sets
local_receiver_include(*,G,I) to TRUE for the discard interface.
o When a PIM-SM component receives a (*,*) Join alert, it sets
DownstreamJPState(*,*,RP,I) to Join state on the discard interface
for all RPs in the PIM-SM domain.
o When a PIM-SM component receives a (*,*) Prune alert, it sets
DownstreamJPState(*,*,RP,I) to NoInfo state on the discard
interface for all RPs in the PIM-SM domain.
We refer above to the discard interface because the macros and state
machines are interface specific, but we need to have PIM state that
is not associated with any actual PIM-SM interface. Implementers are
free to implement this in any reasonable manner.
Note that these state changes will then cause additional PIM-SM state
machine transitions in the normal way.
These rules are, however, not sufficient to allow pruning off the
(*,*,RP) tree. Some additional rules provide guidance as to one way
this may be done:
o If the PMBR has joined on the (*,*,RP) tree, then it should set
DownstreamJPState(*,G,I) to JOIN on the discard interface for all
active groups.
o If the router receives a (S,G) prune alert, it will need to set
DownstreamJPState(S,G,rpt,I) to PRUNE on the discard interface.
o If the router receives a (*,G) prune alert, it will need to set
DownstreamJPState(S,G,rpt,I) to PRUNE on the discard interface for
all active sources sending to G.
The rationale for this is that there is no way in PIM-SM to prune
traffic off the (*,*,RP) tree, except by Joining the (*,G) tree and
then pruning each source individually.
Fenner, et al. Standards Track [Page 145]
^L
RFC 4601 PIM-SM Specification August 2006
Appendix B. Index
Address_List. . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Assert(*,G) . . . . . . . . . . . . . . . . . . . . . . . . . .27,128
Assert(S,G) . . . . . . . . . . . . . . . . . . . . . . . . . .27,128
AssertCancel(*,G) . . . . . . . . . . . . . . . . . . . . . . . 97,99
AssertCancel(S,G) . . . . . . . . . . . . . . . . . . . . . .80,90,99
AssertTimer(*,G,I). . . . . . . . . . . . . . . . . . . .16,24,91,132
AssertTimer(S,G,I). . . . . . . . . . . . . . . . . . . .18,24,84,132
AssertTrackingDesired(*,G,I). . . . . . . . . . . . . . . . .93,94,96
AssertTrackingDesired(S,G,I). . . . . . . . . . . . . . . 85,86,87,89
AssertWinner(*,G,I) . . . . . . . . . . . . . . . .16,22,24,93,97,100
AssertWinner(S,G,I) . . . . . . . . . . . . . .18,22,24,86,90,100,100
AssertWinnerMetric(*,G,I) . . . . . . . . . . . . . . . . . 16,97,101
AssertWinnerMetric(S,G,I) . . . . . . . . . . . . . . . . . 18,90,101
assert_metric . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Assert_Override_Interval. . . . . . . . . . . . . . . . . . 90,97,132
Assert_Time . . . . . . . . . . . . . . . . . . . . . . . . 90,97,132
AT(*,G,I) . . . . . . . . . . . . . . . . . . . . . .16,24,91,129,132
AT(S,G,I) . . . . . . . . . . . . . . . . . . . . . .18,24,84,129,132
CheckSwitchToSpt(S,G) . . . . . . . . . . . . . . . . . . . . . 27,28
CouldAssert(*,G,I). . . . . . . . . . . . . . . . . . .92,93,94,95,98
CouldAssert(S,G,I). . . . . . . . . . . . . . . . . 84,86,87,88,89,98
CouldRegister(S,G). . . . . . . . . . . . . . . . . . . . . . . 39,41
Default_Hello_Holdtime. . . . . . . . . . . . . . . . . . . . . . 33
DirectlyConnected(S). . . . . . . . . . . . . . . . . 27,27,29,41,143
DownstreamJPState(*,*,RP,I) . . . . . . . . . . . . . . . . . .23,145
DownstreamJPState(*,G,I). . . . . . . . . . . . . . . . . . . . . 23
DownstreamJPState(S,G,I). . . . . . . . . . . . . . . . . . . . 23,40
DownstreamJPState(S,G,rpt,I). . . . . . . . . . . . . . . . . . . 23
DR(I) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
dr_is_better(a,b,I) . . . . . . . . . . . . . . . . . . . . . . 33,33
DR_Priority . . . . . . . . . . . . . . . . . . . . . . . . .31,32,33
Effective_Override_Interval(I). . . . . . . . . . . . . . .36,114,132
Effective_Propagation_Delay(I). . . . . . . . . . . . . . . . .35,132
ET(*,*,RP,I). . . . . . . . . . . . . . . . . . . . . . 15,46,128,131
ET(*,G,I) . . . . . . . . . . . . . . . . . . . . . . . 16,50,128,131
ET(S,G,I) . . . . . . . . . . . . . . . . . . . . . . . 18,53,129,131
ET(S,G,rpt,I) . . . . . . . . . . . . . . . . . . . .20,57,59,129,131
GenID . . . . . . . . . . . . . . . . . 15,17,19,31,64,68,70,73,85,93
Hash_Function . . . . . . . . . . . . . . . . . . . . . . . . .12,105
Hello_Holdtime. . . . . . . . . . . . . . . . . . . . . . . . .33,131
Hello_Period. . . . . . . . . . . . . . . . . . . . . . . . . .31,130
HT(I) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31,130
IGMP. . . . . . . . . . . . . . . . . . . . . . . . 6,8,17,23,101,105
immediate_olist(*,*,RP) . . . . . . . . . . . . . . . . . . . . 22,64
immediate_olist(*,G). . . . . . . . . . . . . . . . . . . . . . 22,68
immediate_olist(S,G). . . . . . . . . . . . . . . . . . . . .22,40,73
Fenner, et al. Standards Track [Page 146]
^L
RFC 4601 PIM-SM Specification August 2006
infinite_assert_metric(). . . . . . . . . . . . . . . . . . . . . 99
inherited_olist(S,G). . . . . . . . . . . . . . 22,27,40,43,73,86,108
inherited_olist(S,G,rpt). . . . . . . . . . . . . . 22,27,29,76,79,81
I_Am_Assert_Loser(*,G,I). . . . . . . . . . . . . . . . . . . . . 24
I_Am_Assert_Loser(S,G,I). . . . . . . . . . . . . . . . . . . . . 24
I_am_DR(I). . . . . . . . . . . . . . . . . . . . . . .22,33,41,86,93
I_am_RP(G). . . . . . . . . . . . . . . . . . . . . . . . . . . 43,44
J/P_Holdtime. . . . . . . . . . . . .47,51,55,59,65,69,74,121,131,133
J/P_Override_Interval(I). . . . . . . . . . . . . 48,51,55,59,121,132
JoinDesired(*,*,RP) . . . . . . . . . . . . . . . . . . . . . . 64,79
JoinDesired(*,G). . . . . . . . . . . . . . . . . . . .17,68,79,86,97
JoinDesired(S,G). . . . . . . . . . . . . . . . . . 19,29,73,86,88,90
joins(*,*,RP(G)). . . . . . . . . . . . . . . . . . . . . . . . . 22
joins(*,*,RP) . . . . . . . . . . . . . . . . . . . . . . 22,23,86,93
joins(*,G). . . . . . . . . . . . . . . . . . . . . . . . 22,23,86,93
joins(S,G). . . . . . . . . . . . . . . . . . . . . . . . . .22,23,86
JT(*,*,RP). . . . . . . . . . . . . . . . . . . . . . . 15,62,129,133
JT(*,G) . . . . . . . . . . . . . . . . . . . . . . . . 16,67,129,133
JT(S,G) . . . . . . . . . . . . . . . . . . . . . . . . 18,71,129,133
KAT(S,G). . . . . . . . . . . . . . .18,26,27,28,41,43,73,108,129,134
KeepaliveTimer(S,G) . . . . . . . 18,26,27,27,28,41,43,73,108,129,134
Keepalive_Period. . . . . . . . . . . . . . . . . . . . . . . .27,134
lan_delay_enabled(I). . . . . . . . . . . . . . . . . . . . . . 35,36
LAN_Prune_Delay . . . . . . . . . . . . . . . . . . . . . . . . . 31
local_receiver_exclude(S,G,I) . . . . . . . . . . . . . . . . . . 23
local_receiver_include(*,G,I) . . . . . . . . . . . . . . . 23,93,144
local_receiver_include(S,G,I) . . . . . . . . . . . . . . . . . 23,86
local_receiver_include(S,G,I).. . . . . . . . . . . . . . . . . . 144
lost_assert(*,G). . . . . . . . . . . . . . . . . . . . . . .22,24,86
lost_assert(*,G,I). . . . . . . . . . . . . . . . . . . . . 22,24,100
lost_assert(S,G). . . . . . . . . . . . . . . . . . . . . . . . 22,24
lost_assert(S,G,I). . . . . . . . . . . . . . . . . . . . . 22,24,100
lost_assert(S,G,rpt). . . . . . . . . . . . . . . . . . . . . . . 24
lost_assert(S,G,rpt,I). . . . . . . . . . . . . . . . . . . . .24,100
MBGP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6,7
MFIB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6,13
MLD . . . . . . . . . . . . . . . . . . . . . . . . 6,8,17,23,101,105
MRIB. . . . . . . . . . . . . .6,7,11,15,19,25,62,66,66,75,98,103,128
MRIB.next_hop(host) . . . . . . . . . . . . . . . . . . . 24,25,62,64
my_assert_metric(*,G,I) . . . . . . . . . . . . . . . . . . . . . 94
my_assert_metric(S,G,I) . . . . . . . . . . . . . . . . . 85,89,92,98
NBR(Interface,IP_address) . . . . . . . . . . . . . . .25,37,62,64,66
NLT(N,I). . . . . . . . . . . . . . . . . . . . . . . . 14,33,128,131
OT(S,G,rpt) . . . . . . . . . . . . . . . . . . . . . . 20,77,129,134
Override_Interval(I). . . . . . . . . . . . . 14,31,34,36,114,130,132
packet_arrives_on_rp_tunnel(pkt). . . . . . . . . . . . . . . . . 43
pim_exclude(S,G). . . . . . . . . . . . . . . . . . . . . 22,22,28,86
pim_include(*,G). . . . . . . . . . . . . . . . . . 17,22,22,28,86,93
Fenner, et al. Standards Track [Page 147]
^L
RFC 4601 PIM-SM Specification August 2006
pim_include(S,G). . . . . . . . . . . . . . . . . . . .19,22,22,28,86
PPT(*,*,RP,I) . . . . . . . . . . . . . . . . . . . . . 15,46,128,132
PPT(*,G,I). . . . . . . . . . . . . . . . . . . . . . . 16,50,129,132
PPT(S,G,I). . . . . . . . . . . . . . . . . . . . . . . 18,53,129,132
PPT(S,G,rpt,I). . . . . . . . . . . . . . . . . . . .20,57,59,129,132
Propagation_Delay(I). . . . . . . . . . . . . . . . . . 31,35,130,132
Propagation_delay_default . . . . . . . . . . . . . . . . . . .35,130
PruneDesired(S,G,rpt) . . . . . . . . . . . . . . . . . . 79,80,88,90
prunes(S,G,rpt) . . . . . . . . . . . . . . . . . . . . . . .22,23,86
Register-Stop(*,G). . . . . . . . . . . . . . . . . . . . . . . . 42
Register-Stop(S,G). . . . . . . . . . . . . . . . . . . . . . . . 43
Register-StopTimer(S,G) . . . . . . . . . . . . . . . . 38,39,129,135
Register_Probe_Time . . . . . . . . . . . . . . . . . . . . 39,44,135
Register_Suppression_Time . . . . . . . . . . . . . . . . . 39,44,135
RP(G) . . . . . . . . . . . . 5,22,24,40,43,49,68,77,86,93,99,102,128
RPF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
RPF'(*,G) . . . . . . . . . . . . . . . . 24,29,67,68,70,76,79,97,101
RPF'(S,G) . . . . . . . . . . . . . . . . . . . 25,29,71,76,79,90,101
RPF'(S,G,rpt) . . . . . . . . . . . . . . . . . . . . . .24,76,79,102
RPF_interface . . . . . . . . . . . . . . . . . . . . . . . . . . 93
RPF_interface(host) . . . . . .24,27,29,41,68,69,74,86,93,100,108,143
RPTJoinDesired(G) . . . . . . . . . . . . . . . . . . . . . .79,81,93
rpt_assert_metric(G,I). . . . . . . . . . . . . . . . . . . .96,97,99
RST(S,G). . . . . . . . . . . . . . . . . . . . . . . . 38,39,129,135
SPTbit(S,G) . . . . . . . 19,27,29,43,53,74,76,79,86,86,89,90,100,108
spt_assert_metric(S,I). . . . . . . . . . . . . . . . . . . 90,98,100
SSM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10,106
Suppression_Enabled(I). . . . . . . . . . . . . . . . . . . . .36,133
SwitchToSptDesired(S,G) . . . . . . . . . . . . . . . . . . .28,28,43
TIB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6,13,26
Triggered_Hello_Delay . . . . . . . . . . . . . . . . . . . 31,32,130
t_joinsuppress. . . . . . . . . . . . . . . . . . . . .64,65,68,69,74
t_override. . . . . . . . . . . . . . . . . . . . 64,68,73,78,133,134
t_override_default. . . . . . . . . . . . . . . . . . . . . . .36,130
t_periodic. . . . . . . . . . . . . . . . . . . . . . . .64,68,73,133
t_suppressed. . . . . . . . . . . . . . . . . . . .36,65,69,73,74,133
Update_SPTbit(S,G,iif). . . . . . . . . . . . . . . . . . . . . 27,29
UpstreamJPState(S,G). . . . . . . . . . . . . . . . . . . . . .27,108
Fenner, et al. Standards Track [Page 148]
^L
RFC 4601 PIM-SM Specification August 2006
Authors' Addresses
Bill Fenner
AT&T Labs - Research
1 River Oaks Place
San Jose, CA 95134
EMail: fenner@research.att.com
Mark Handley
Department of Computer Science
University College London
Gower Street
London WC1E 6BT
United Kingdom
EMail: M.Handley@cs.ucl.ac.uk
Hugh Holbrook
Arastra, Inc.
P.O. Box 10905
Palo Alto, CA 94303
EMail: holbrook@arastra.com
Isidor Kouvelas
Cisco Systems
170 W. Tasman Drive
San Jose, CA 95134
EMail: kouvelas@cisco.com
Fenner, et al. Standards Track [Page 149]
^L
RFC 4601 PIM-SM Specification August 2006
Full Copyright Statement
Copyright (C) The Internet Society (2006).
This document is subject to the rights, licenses and restrictions
contained in BCP 78, and except as set forth therein, the authors
retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be
found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at
ietf-ipr@ietf.org.
Acknowledgement
Funding for the RFC Editor function is provided by the IETF
Administrative Support Activity (IASA).
Fenner, et al. Standards Track [Page 150]
^L
|