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
|
<pre>Internet Research Task Force (IRTF) A. Lindgren
Request for Comments: 6693 SICS
Category: Experimental A. Doria
ISSN: 2070-1721 Technicalities
E. Davies
Folly Consulting
S. Grasic
Lulea University of Technology
August 2012
<span class="h1">Probabilistic Routing Protocol for Intermittently Connected Networks</span>
Abstract
This document is a product of the Delay Tolerant Networking Research
Group and has been reviewed by that group. No objections to its
publication as an RFC were raised.
This document defines PRoPHET, a Probabilistic Routing Protocol using
History of Encounters and Transitivity. PRoPHET is a variant of the
epidemic routing protocol for intermittently connected networks that
operates by pruning the epidemic distribution tree to minimize
resource usage while still attempting to achieve the best-case
routing capabilities of epidemic routing. It is intended for use in
sparse mesh networks where there is no guarantee that a fully
connected path between the source and destination exists at any time,
rendering traditional routing protocols unable to deliver messages
between hosts. These networks are examples of networks where there
is a disparity between the latency requirements of applications and
the capabilities of the underlying network (networks often referred
to as delay and disruption tolerant). The document presents an
architectural overview followed by the protocol specification.
Status of This Memo
This document is not an Internet Standards Track specification; it is
published for examination, experimental implementation, and
evaluation.
This document defines an Experimental Protocol for the Internet
community. This document is a product of the Internet Research Task
Force (IRTF). The IRTF publishes the results of Internet-related
research and development activities. These results might not be
suitable for deployment. This RFC represents the consensus of the
Delay Tolerant Networking Research Group of the Internet Research
<span class="grey">Lindgren, et al. Experimental [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
Task Force (IRTF). Documents approved for publication by the IRSG
are not a candidate for any level of Internet Standard; see <a href="./rfc5741#section-2">Section 2
of RFC 5741</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="http://www.rfc-editor.org/info/rfc6693">http://www.rfc-editor.org/info/rfc6693</a>.
Copyright Notice
Copyright (c) 2012 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document.
<span class="grey">Lindgren, et al. Experimental [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
1.1. Relation to the Delay-Tolerant Networking Architecture . 7
<a href="#section-1.2">1.2</a>. Applicability of the Protocol . . . . . . . . . . . . . . <a href="#page-8">8</a>
<a href="#section-1.3">1.3</a>. PRoPHET as Compared to Regular Routing Protocols . . . . <a href="#page-10">10</a>
<a href="#section-1.4">1.4</a>. Requirements Notation . . . . . . . . . . . . . . . . . . <a href="#page-11">11</a>
<a href="#section-2">2</a>. Architecture . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-11">11</a>
<a href="#section-2.1">2.1</a>. PRoPHET . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-11">11</a>
<a href="#section-2.1.1">2.1.1</a>. Characteristic Time Interval . . . . . . . . . . . . <a href="#page-12">12</a>
<a href="#section-2.1.2">2.1.2</a>. Delivery Predictability Calculation . . . . . . . . . <a href="#page-12">12</a>
<a href="#section-2.1.3">2.1.3</a>. Optional Delivery Predictability Optimizations . . . <a href="#page-17">17</a>
<a href="#section-2.1.4">2.1.4</a>. Forwarding Strategies and Queueing Policies . . . . . <a href="#page-18">18</a>
<a href="#section-2.2">2.2</a>. Bundle Protocol Agent to Routing Agent Interface . . . . <a href="#page-19">19</a>
<a href="#section-2.3">2.3</a>. PRoPHET Zone Gateways . . . . . . . . . . . . . . . . . . <a href="#page-20">20</a>
<a href="#section-2.4">2.4</a>. Lower-Layer Requirements and Interface . . . . . . . . . <a href="#page-21">21</a>
<a href="#section-3">3</a>. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . <a href="#page-22">22</a>
<a href="#section-3.1">3.1</a>. Neighbor Awareness . . . . . . . . . . . . . . . . . . . <a href="#page-22">22</a>
<a href="#section-3.2">3.2</a>. Information Exchange Phase . . . . . . . . . . . . . . . <a href="#page-23">23</a>
<a href="#section-3.2.1">3.2.1</a>. Routing Information Base Dictionary . . . . . . . . . <a href="#page-25">25</a>
<a href="#section-3.2.2">3.2.2</a>. Handling Multiple Simultaneous Contacts . . . . . . . <a href="#page-26">26</a>
<a href="#section-3.3">3.3</a>. Routing Algorithm . . . . . . . . . . . . . . . . . . . . <a href="#page-28">28</a>
<a href="#section-3.4">3.4</a>. Bundle Passing . . . . . . . . . . . . . . . . . . . . . <a href="#page-32">32</a>
<a href="#section-3.4.1">3.4.1</a>. Custody . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-33">33</a>
<a href="#section-3.5">3.5</a>. When a Bundle Reaches Its Destination . . . . . . . . . . <a href="#page-33">33</a>
<a href="#section-3.6">3.6</a>. Forwarding Strategies . . . . . . . . . . . . . . . . . . <a href="#page-34">34</a>
<a href="#section-3.7">3.7</a>. Queueing Policies . . . . . . . . . . . . . . . . . . . . <a href="#page-36">36</a>
<a href="#section-4">4</a>. Message Formats . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-38">38</a>
<a href="#section-4.1">4.1</a>. Header . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-39">39</a>
<a href="#section-4.2">4.2</a>. TLV Structure . . . . . . . . . . . . . . . . . . . . . . <a href="#page-44">44</a>
<a href="#section-4.3">4.3</a>. TLVs . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-45">45</a>
<a href="#section-4.3.1">4.3.1</a>. Hello TLV . . . . . . . . . . . . . . . . . . . . . . <a href="#page-45">45</a>
<a href="#section-4.3.2">4.3.2</a>. Error TLV . . . . . . . . . . . . . . . . . . . . . . <a href="#page-47">47</a>
<a href="#section-4.3.3">4.3.3</a>. Routing Information Base Dictionary TLV . . . . . . . <a href="#page-48">48</a>
<a href="#section-4.3.4">4.3.4</a>. Routing Information Base TLV . . . . . . . . . . . . <a href="#page-50">50</a>
<a href="#section-4.3.5">4.3.5</a>. Bundle Offer and Response TLVs (Version 2) . . . . . <a href="#page-51">51</a>
<a href="#section-5">5</a>. Detailed Operation . . . . . . . . . . . . . . . . . . . . . <a href="#page-55">55</a>
<a href="#section-5.1">5.1</a>. High-Level State Tables . . . . . . . . . . . . . . . . . <a href="#page-56">56</a>
<a href="#section-5.2">5.2</a>. Hello Procedure . . . . . . . . . . . . . . . . . . . . . <a href="#page-59">59</a>
<a href="#section-5.2.1">5.2.1</a>. Hello Procedure State Tables . . . . . . . . . . . . <a href="#page-61">61</a>
<a href="#section-5.3">5.3</a>. Information Exchange Phase . . . . . . . . . . . . . . . <a href="#page-62">62</a>
<a href="#section-5.3.1">5.3.1</a>. State Definitions for the Initiator Role . . . . . . <a href="#page-66">66</a>
<a href="#section-5.3.2">5.3.2</a>. State Definitions for the Listener Role . . . . . . . <a href="#page-71">71</a>
5.3.3. Recommendations for Information Exchange Timer
Periods . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-77">77</a>
<a href="#section-5.3.4">5.3.4</a>. State Tables for Information Exchange . . . . . . . . <a href="#page-78">78</a>
<a href="#section-5.4">5.4</a>. Interaction with Nodes Using Version 1 of PRoPHET . . . . <a href="#page-92">92</a>
<span class="grey">Lindgren, et al. Experimental [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<a href="#section-6">6</a>. Security Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-93">93</a>
<a href="#section-6.1">6.1</a>. Attacks on the Operation of the Protocol . . . . . . . . <a href="#page-94">94</a>
<a href="#section-6.1.1">6.1.1</a>. Black-Hole Attack . . . . . . . . . . . . . . . . . . <a href="#page-94">94</a>
<a href="#section-6.1.2">6.1.2</a>. Limited Black-Hole Attack / Identity Spoofing . . . . <a href="#page-95">95</a>
<a href="#section-6.1.3">6.1.3</a>. Fake PRoPHET ACKs . . . . . . . . . . . . . . . . . . <a href="#page-95">95</a>
<a href="#section-6.1.4">6.1.4</a>. Bundle Store Overflow . . . . . . . . . . . . . . . . <a href="#page-96">96</a>
6.1.5. Bundle Store Overflow with Delivery Predictability
Manipulation . . . . . . . . . . . . . . . . . . . . <a href="#page-96">96</a>
<a href="#section-6.2">6.2</a>. Interactions with External Routing Domains . . . . . . . <a href="#page-97">97</a>
<a href="#section-7">7</a>. IANA Considerations . . . . . . . . . . . . . . . . . . . . . <a href="#page-97">97</a>
<a href="#section-7.1">7.1</a>. DTN Routing Protocol Number . . . . . . . . . . . . . . . <a href="#page-98">98</a>
<a href="#section-7.2">7.2</a>. PRoPHET Protocol Version . . . . . . . . . . . . . . . . <a href="#page-98">98</a>
<a href="#section-7.3">7.3</a>. PRoPHET Header Flags . . . . . . . . . . . . . . . . . . <a href="#page-99">99</a>
<a href="#section-7.4">7.4</a>. PRoPHET Result Field . . . . . . . . . . . . . . . . . . <a href="#page-99">99</a>
<a href="#section-7.5">7.5</a>. PRoPHET Codes for Success and Codes for Failure . . . . . <a href="#page-99">99</a>
<a href="#section-7.6">7.6</a>. PRoPHET TLV Type . . . . . . . . . . . . . . . . . . . . <a href="#page-100">100</a>
<a href="#section-7.7">7.7</a>. Hello TLV Flags . . . . . . . . . . . . . . . . . . . . . <a href="#page-101">101</a>
<a href="#section-7.8">7.8</a>. Error TLV Flags . . . . . . . . . . . . . . . . . . . . . <a href="#page-101">101</a>
<a href="#section-7.9">7.9</a>. RIB Dictionary TLV Flags . . . . . . . . . . . . . . . . <a href="#page-102">102</a>
<a href="#section-7.10">7.10</a>. RIB TLV Flags . . . . . . . . . . . . . . . . . . . . . . <a href="#page-102">102</a>
<a href="#section-7.11">7.11</a>. RIB Flags . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-103">103</a>
<a href="#section-7.12">7.12</a>. Bundle Offer and Response TLV Flags . . . . . . . . . . . <a href="#page-103">103</a>
<a href="#section-7.13">7.13</a>. Bundle Offer and Response B Flags . . . . . . . . . . . . <a href="#page-104">104</a>
<a href="#section-8">8</a>. Implementation Experience . . . . . . . . . . . . . . . . . . <a href="#page-104">104</a>
<a href="#section-9">9</a>. Deployment Experience . . . . . . . . . . . . . . . . . . . . <a href="#page-105">105</a>
<a href="#section-10">10</a>. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . <a href="#page-105">105</a>
<a href="#section-11">11</a>. References . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-105">105</a>
<a href="#section-11.1">11.1</a>. Normative References . . . . . . . . . . . . . . . . . . <a href="#page-105">105</a>
<a href="#section-11.2">11.2</a>. Informative References . . . . . . . . . . . . . . . . . <a href="#page-106">106</a>
<a href="#appendix-A">Appendix A</a>. PRoPHET Example . . . . . . . . . . . . . . . . . . <a href="#page-108">108</a>
<a href="#appendix-B">Appendix B</a>. Neighbor Discovery Example . . . . . . . . . . . . . <a href="#page-110">110</a>
<a href="#appendix-C">Appendix C</a>. PRoPHET Parameter Calculation Example . . . . . . . <a href="#page-110">110</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
The Probabilistic Routing Protocol using History of Encounters and
Transitivity (PRoPHET) algorithm enables communication between
participating nodes wishing to communicate in an intermittently
connected network where at least some of the nodes are mobile.
One of the most basic requirements for "traditional" (IP) networking
is that there must exist a fully connected path between communication
endpoints for the duration of a communication session in order for
communication to be possible. There are, however, a number of
scenarios where connectivity is intermittent so that this is not the
case (thus rendering the end-to-end use of traditional networking
protocols impossible), but where it still is desirable to allow
communication between nodes.
<span class="grey">Lindgren, et al. Experimental [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
Consider a network of mobile nodes using wireless communication with
a limited range that is less than the typical excursion distances
over which the nodes travel. Communication between a pair of nodes
at a particular instant is only possible when the distance between
the nodes is less than the range of the wireless communication. This
means that, even if messages are forwarded through other nodes acting
as intermediate routes, there is no guarantee of finding a viable
continuous path when it is needed to transmit a message.
One way to enable communication in such scenarios is by allowing
messages to be buffered at intermediate nodes for a longer time than
normally occurs in the queues of conventional routers (cf. Delay-
Tolerant Networking [<a href="./rfc4838" title=""Delay- Tolerant Networking Architecture"">RFC4838</a>]). It would then be possible to exploit
the mobility of a subset of the nodes to bring messages closer to
their destination by transferring them to other nodes as they meet.
Figure 1 shows how the mobility of nodes in such a scenario can be
used to eventually deliver a message to its destination. In this
figure, the four sub-figures (a) - (d) represent the physical
positions of four nodes (A, B, C, and D) at four time instants,
increasing from (a) to (d). The outline around each letter
represents the range of the radio communication used for
communication by the nodes: communication is only possible when the
ranges overlap. At the start time, node A has a message -- indicated
by an asterisk (*) next to that node -- to be delivered to node D,
but there does not exist a path between nodes A and D because of the
limited range of available wireless connections. As shown in sub-
figures (a) - (d), the mobility of the nodes allows the message to
first be transferred to node B, then to node C, and when finally node
C moves within range of node D, it can deliver the message to its
final destination. This technique is known as "transitive
networking".
Mobility and contact patterns in real application scenarios are
likely to be non-random, but rather be predictable, based on the
underlying activities of the higher-level application (this could,
for example, stem from human mobility having regular traffic patterns
based on repeating behavioral patterns (e.g., going to work or the
market and returning home) and social interactions, or from any
number of other node mobility situations where a proportion of nodes
are mobile and move in ways that are not completely random over time
but have a degree of predictability over time). This means that if a
node has visited a location or been in contact with a certain node
several times before, it is likely that it will visit that location
or meet that node again.
<span class="grey">Lindgren, et al. Experimental [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
PRoPHET can also be used in some networks where such mobility as
described above does not take place. Predictable patterns in node
contacts can also occur among static nodes where varying radio
conditions or power-saving sleeping schedules cause connection
between nodes to be intermittent.
In previously discussed mechanisms to enable communication in
intermittently connected networks, such as Epidemic Routing
[<a href="#ref-vahdat_00" title=""Epidemic Routing for Partially Connected Ad Hoc Networks"">vahdat_00</a>], very general approaches have been taken to the problem
at hand. In an environment where buffer space and bandwidth are
infinite, epidemic routing will give an optimal solution to the
problem of routing in an intermittently connected network with regard
to message delivery ratio and latency. However, in most cases,
neither bandwidth nor buffer space is infinite, but instead they are
rather scarce resources, especially in the case of sensor networks.
PRoPHET is fundamentally an epidemic protocol with strict pruning.
An epidemic protocol works by transferring its data to each and every
node it meets. As data is passed from node to node, it is eventually
passed to all nodes, including the target node. One of the
advantages of an epidemic protocol is that by trying every path, it
is guaranteed to try the best path. One of the disadvantages of an
epidemic protocol is the extensive use of resources with every node
needing to carry every packet and the associated transmission costs.
PRoPHET's goal is to gain the advantages of an epidemic protocol
without paying the price in storage and communication resources
incurred by the basic epidemic protocol. That is, PRoPHET offers an
alternative to basic epidemic routing, with lower demands on buffer
space and bandwidth, with equal or better performance in cases where
those resources are limited, and without loss of generality in
scenarios where it is suitable to use PRoPHET.
In a situation where PRoPHET is applicable, the patterns are expected
to have a characteristic time (such as the expected time between
encounters between mobile stations) that is in turn related to the
expected time that traffic will take to reach its destination in the
part of the network that is using PRoPHET. This characteristic time
provides guidance for configuration of the PRoPHET protocol in a
network. When appropriately configured, the PRoPHET protocol
effectively builds a local model of the expected patterns in the
network that can be used to optimize the usage of resources by
reducing the amount of traffic sent to nodes that are unlikely to
lead to eventual delivery of the traffic to its destination.
<span class="grey">Lindgren, et al. Experimental [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
+----------------------------+ +----------------------------+
| ___ | | ___ |
| ___ / \ | | / \ |
| / \ ( D ) | | ( D ) |
| ( B ) \___/ | | ___ \___/ |
| \___/ ___ | | /___\ ___ |
|___ / \ | | (/ B*\) / \ |
| \ ( C ) | | (\_A_/) ( C ) |
| A* ) \___/ | | \___/ \___/ |
|___/ | | |
+----------------------------+ +----------------------------+
(a) Time t (b) Time (t + dt)
+----------------------------+ +----------------------------+
| _____ ___ | | ___ ___ |
| / / \ \ / \ | | / \ /___\ |
| ( (B C* ) ( D ) | | ( B ) (/ D*\) |
| \_\_/_/ \___/ | | \___/ (\_C_/) |
| ___ | | ___ \___/ |
| / \ | | / \ |
| ( A ) | | ( A ) |
| \___/ | | \___/ |
| | | |
+----------------------------+ +----------------------------+
(c) Time (t + 2*dt) (d) Time (t + 3*dt)
Figure 1: Example of transitive communication
This document presents a framework for probabilistic routing in
intermittently connected networks, using an assumption of non-random
mobility of nodes to improve the delivery rate of messages while
keeping buffer usage and communication overhead at a low level.
First, a probabilistic metric called delivery predictability is
defined. The document then goes on to define a probabilistic routing
protocol using this metric.
<span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>. Relation to the Delay-Tolerant Networking Architecture</span>
The Delay-Tolerant Networking (DTN) architecture [<a href="./rfc4838" title=""Delay- Tolerant Networking Architecture"">RFC4838</a>] defines an
architecture for communication in environments where traditional
communication protocols cannot be used due to excessive delays, link
outages, and other extreme conditions. The intermittently connected
networks considered here are a subset of those covered by the DTN
architecture. The DTN architecture defines routes to be computed
based on a collection of "contacts" indicating the start time,
duration, endpoints, forwarding capacity, and latency of a link in
the topology graph. These contacts may be deterministic or may be
<span class="grey">Lindgren, et al. Experimental [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
derived from estimates. The architecture defines some different
types of intermittent contacts. The ones called "opportunistic" and
"predicted" are the ones addressed by this protocol.
Opportunistic contacts are those that are not scheduled, but rather
present themselves unexpectedly and frequently arise due to node
mobility. Predicted contacts are like opportunistic contacts, but,
based on some information, it might be possible to draw some
statistical conclusion as to whether or not a contact will be present
soon.
The DTN architecture also introduces the bundle protocol [<a href="./rfc5050" title=""Bundle Protocol Specification"">RFC5050</a>],
which provides a way for applications to "bundle" an entire session,
including both data and metadata, into a single message, or bundle,
that can be sent as a unit. The bundle protocol also provides end-
to-end addressing and acknowledgments. PRoPHET is specifically
intended to provide routing services in a network environment that
uses bundles as its data transfer mechanism but could be also be used
in other intermittent environments.
<span class="h3"><a class="selflink" id="section-1.2" href="#section-1.2">1.2</a>. Applicability of the Protocol</span>
The PRoPHET routing protocol is mainly targeted at situations where
at least some of the nodes are mobile in a way that creates
connectivity patterns that are not completely random over time but
have a degree of predictability. Such connectivity patterns can also
occur in networks where nodes switch off radios to preserve power.
Human mobility patterns (often containing daily or weekly periodic
activities) provide one such example where PRoPHET is expected to be
applicable, but the applicability is not limited to scenarios
including humans.
In order for PRoPHET to benefit from such predictability in the
contact patterns between nodes, it is expected that the network exist
under similar circumstances over a longer timescale (in terms of node
encounters) so that the predictability can be accurately estimated.
The PRoPHET protocol expects nodes to be able to establish a local
TCP link in order to exchange the information needed by the PRoPHET
protocol. Protocol signaling is done out-of-band over this TCP link,
without involving the bundle protocol agent [<a href="./rfc5050" title=""Bundle Protocol Specification"">RFC5050</a>]. However, the
PRoPHET protocol is expected to interact with the bundle protocol
agent to retrieve information about available bundles as well as to
request that a bundle be sent to another node (it is expected that
the associated bundle protocol agents are then able to establish a
link (probably over the TCP convergence layer [<a href="#ref-CLAYER" title=""Delay Tolerant Networking TCP Convergence Layer Protocol"">CLAYER</a>]) to perform
this bundle transfer).
<span class="grey">Lindgren, et al. Experimental [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
TCP provides a reliable bidirectional channel between two peers and
guarantees in-order delivery of transmitted data. When using TCP,
the guarantee of reliable, in-order delivery allows information
exchanges of each category of information to be distributed across
several messages without requiring the PRoPHET protocol layer to be
concerned that all messages have been received before starting the
exchange of the next category of information. At most, the last
message of the category needs to be marked as such. This allows the
receiver to process earlier messages while waiting for additional
information and allows implementations to limit the size of messages
so that IP fragmentation will be avoided and memory usage can be
optimized if necessary. However, implementations MAY choose to build
a single message for each category of information that is as large as
necessary and rely on TCP to segment the message.
While PRoPHET is currently defined to run over TCP, in future
versions the information exchange may take place over other transport
protocols, and these may not provide message segmentation or
reliable, in-order delivery. The simple message division used with
TCP MUST NOT be used when the underlying transport does not offer
reliable, in-order delivery, as it would be impossible to verify that
all the messages had arrived. Hence, the capability is provided to
segment protocol messages into submessages directly in the PRoPHET
layer. Submessages are provided with sequence numbers, and this,
together with a capability for positive acknowledgements, would allow
PRoPHET to operate over an unreliable protocol such as UDP or
potentially directly over IP.
Since TCP offers reliable delivery, it is RECOMMENDED that the
positive acknowledgment capability is not used when PRoPHET is run
over a TCP transport or similar protocol. When running over TCP,
implementations MAY safely ignore positive acknowledgments.
Whatever transport protocol is used, PRoPHET expects to use a
bidirectional link for the information exchange; this allows for the
information exchange to take place in both directions over the same
link avoiding the need to establish a second link for information
exchange in the reverse direction.
In a large Delay- and Disruption-Tolerant Network (DTN), network
conditions may vary widely, and in different parts of the network,
different routing protocols may be appropriate. In this
specification, we consider routing within a single "PRoPHET zone",
which is a set of nodes among which messages are routed using
PRoPHET. In many cases, a PRoPHET zone will not span the entire DTN,
but there will be other parts of the network with other
characteristics that run other routing protocols. To handle this,
there may be nodes within the zone that act as gateways to other
<span class="grey">Lindgren, et al. Experimental [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
nodes that are the destinations for bundles generated within the zone
or that insert bundles into the zone. Thus, PRoPHET is not
necessarily used end-to-end, but only within regions of the network
where its use is appropriate.
<span class="h3"><a class="selflink" id="section-1.3" href="#section-1.3">1.3</a>. PRoPHET as Compared to Regular Routing Protocols</span>
While PRoPHET uses a mechanism for pruning the epidemic forwarding
tree that is similar to the mechanism used in metric-based vector
routing protocols (where the metric might be distance or cost), it
should not be confused with a metric vector protocol.
In a traditional metric-based vector routing protocol, the
information passed from node to node is used to create a single non-
looping path from source to destination that is optimal given the
metric used. The path consists of a set of directed edges selected
from the complete graph of communications links between the network
nodes.
In PRoPHET, that information is used to prune the epidemic tree of
paths by removing paths that look less likely to provide an effective
route for delivery of data to its intended destination. One of the
effects of this difference is that the regular notions of split
horizon, as described in [<a href="./rfc1058" title=""Routing Information Protocol"">RFC1058</a>], do not apply to PRoPHET. The
purpose of split horizon is to prevent a distance vector protocol
from ever passing a packet back to the node that sent it the packet
because it is well known that the source does not lie in that
direction as determined when the directed path was computed.
In an epidemic protocol, where that previous system already has the
data, the notion of passing the data back to the node is redundant:
the protocol can readily determine that such a transfer is not
required. Further, given the mobility and constant churn of
encounters possible in a DTN that is dominated by opportunistic
encounters, it is quite possible that, on a future encounter, the
node might have become a better option for reaching the destination.
Such a later encounter may require a re-transfer of the data if
resource constraints have resulted in the data being deleted from the
original carrier between the encounters.
The logic of metric routing protocols does not map directly onto the
family of epidemic protocols. In particular, it is inappropriate to
try to assess such protocols against the criteria used to assess
conventional routing protocols such as the metric vector protocols;
this is not to say that the family of epidemic protocols do not have
weaknesses but they have to be considered independently of
traditional protocols.
<span class="grey">Lindgren, et al. Experimental [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<span class="h3"><a class="selflink" id="section-1.4" href="#section-1.4">1.4</a>. Requirements Notation</span>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in <a href="./rfc2119">RFC 2119</a> [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Architecture</span>
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. PRoPHET</span>
This section presents an overview of the main architecture of
PRoPHET, a Probabilistic Routing Protocol using History of Encounters
and Transitivity. The protocol leverages the observations made on
the non-randomness of mobility patterns present in many application
scenarios to improve routing performance. Instead of doing blind
epidemic replication of bundles through the network as previous
protocols have done, it applies "probabilistic routing".
To accomplish this, a metric called "delivery predictability",
0 <= P_(A,B) <= 1, is established at every node A for each known
destination B. This metric is calculated so that a node with a
higher value for a certain destination is estimated to be a better
candidate for delivering a bundle to that destination (i.e., if
P_(A,B)>P_(C,B), bundles for destination B are preferable to forward
to A rather than C). It is later used when making forwarding
decisions. As routes in a DTN are likely to be asymmetric, the
calculation of the delivery predictability reflects this, and P_(A,B)
may be different from P_(B,A).
The delivery predictability values in each node evolve over time both
as a result of decay of the metrics between encounters between nodes
and due to changes resulting from encounters when metric information
for the encountered node is updated to reflect the encounter and
metric information about other nodes is exchanged.
When two PRoPHET nodes have a communication opportunity, they
initially enter a two-part Information Exchange Phase (IEP). In the
first part of the exchange, the delivery predictabilities for all
destinations known by each node are shared with the encountered node.
The exchanged information is used by each node to update the internal
delivery predictability vector as described below. After that, the
nodes exchange information (including destination and size) about the
bundles each node carries, and the information is used in conjunction
with the updated delivery predictabilities to decide which bundles to
request to be forwarded from the other node based on the forwarding
strategy used (as discussed in <a href="#section-2.1.4">Section 2.1.4</a>). The forwarding of
bundles is carried out in the latter part of the Information Exchange
Phase.
<span class="grey">Lindgren, et al. Experimental [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<span class="h4"><a class="selflink" id="section-2.1.1" href="#section-2.1.1">2.1.1</a>. Characteristic Time Interval</span>
When an application scenario makes PRoPHET applicable, the mobility
pattern will exhibit a characteristic time interval that reflects the
distribution of time intervals between encounters between nodes. The
evolution of the delivery predictabilities, which reflects this
mobility pattern, should reflect this same characteristic time
interval. Accordingly, the parameters used in the equations that
specify the evolution of delivery predictability (see <a href="#section-2.1.2">Section 2.1.2</a>)
need to be configured appropriately so that the evolution reflects a
model of the mobility pattern.
<span class="h4"><a class="selflink" id="section-2.1.2" href="#section-2.1.2">2.1.2</a>. Delivery Predictability Calculation</span>
As stated above, PRoPHET relies on calculating a metric based on the
probability of encountering a certain node, and using that to support
the decision of whether or not to forward a bundle to a certain node.
This section describes the operations performed on the metrics stored
in a node when it encounters another node and a communications
opportunity arises. In the operations described by the equations
that follow, the updates are being performed by node A, P_(A,B) is
the delivery predictability value that node A will have stored for
the destination B after the encounter, and P_(A,B)_old is the
corresponding value that was stored before the encounter. If no
delivery predictability value is stored for a particular destination
B, P_(A,B) is considered to be zero.
As a special case, the metric value for a node itself is always
defined to be 1 (i.e., P_(A,A)=1).
The equations use a number of parameters that can be selected to
match the characteristics of the mobility pattern in the PRoPHET zone
where the node is located (see <a href="#section-2.1.1">Section 2.1.1</a>). Recommended settings
for the various parameters are given in <a href="#section-3.3">Section 3.3</a>. The impact on
the evolution of delivery predictabilities if encountering nodes have
different parameter setting is discussed in <a href="#section-2.1.2.1">Section 2.1.2.1</a>.
The calculation of the updates to the delivery predictabilities
during an encounter has three parts.
When two nodes meet, the first thing they do is to update the
delivery predictability for each other, so that nodes that are often
encountered have a high delivery predictability. If node B has not
met node A for a long time or has never met node B, such that
P_(A,B) < P_first_threshold, then P_(A,B) should be set to
P_encounter_first. Because PRoPHET generally has no prior knowledge
about whether this is an encounter that will be repeated relatively
frequently or one that will be a rare event, P_encounter_first SHOULD
<span class="grey">Lindgren, et al. Experimental [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
be set to 0.5 unless the node has extra information obtained other
than through the PRoPHET protocol about the likelihood of future
encounters. Otherwise, P_(A,B) should be calculated as shown in
Equation 1, where 0 <= P_encounter <= 1 is a scaling factor setting
the rate at which the predictability increases on encounters after
the first, and delta is a small positive number that effectively sets
an upper bound for P_(A,B). The limit is set so that
predictabilities between different nodes stay strictly less than 1.
The value of delta should normally be very small (e.g., 0.01) so as
not to significantly restrict the range of available
predictabilities, but it can be chosen to make calculations efficient
where this is important.
P_(A,B) =
P_(A,B)_old + ( 1 - delta - P_(A,B)_old ) * P_encounter (Eq. 1)
There are practical circumstances where an encounter that is
logically a single encounter in terms of the proximity of the node
hardware and/or from the point of view of the human users of the
nodes results in several communication opportunities closely spaced
in time. For example, mobile nodes communicating with each other
using Wi-Fi ad hoc mode may produce apparent multiple encounters with
a short interval between them but these are frequently due to
artifacts of the underlying physical network when using wireless
connections, where transmission problems or small changes in location
may result in repeated reconnections. In this case, it would be
inappropriate to increase the delivery predictability by the same
amount for each opportunity as it would be increased when encounters
occur at longer intervals in the normal mobility pattern.
In order to reduce the distortion of the delivery predictability in
these circumstances, P_encounter is a function of the interval since
the last encounter resulted in an update of the delivery
predictabilities. The form of the function is as shown in Figure 2.
<span class="grey">Lindgren, et al. Experimental [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
P_encounter
^
|
P_encounter_max + - - .-------------------------------------
| /
| / .
| /
| / .
| /
| / .
|/
+-------+-------------------------------------> I
I_typ
Figure 2: P_encounter as function of time interval, I,
between updates
The form of the function is chosen so that both the increase of
P_(A,B) resulting from Equation 1 and the decrease that results from
Equation 2 are related to the interval between updates for short
intervals. For intervals longer than the "typical" time (I_typ)
between encounters, P_encounter is set to a fixed value
P_encounter_max. The break point reflects the transition between the
"normal" communication opportunity regime (where opportunities result
from the overall mobility pattern) and the closely spaced
opportunities that result from what are effectively local artifacts
of the wireless technology used to deliver those opportunities.
P_encounter_max is chosen so that the increment in P_(A,B) provided
by Equation 1 significantly exceeds the decay of the delivery
predictability over the typical interval between encounters resulting
from Equation 2.
Making P_encounter dependent on the interval time also avoids
inappropriate extra increments of P_(A,B) in situations where node A
is in communication with several other nodes simultaneously. In this
case, updates from each of the communicating nodes have to be
distributed to the other nodes, possibly leading to several updates
being carried out in a short period. This situation is discussed in
more detail in <a href="#section-3.2.2">Section 3.2.2</a>.
If a pair of nodes do not encounter each other during an interval,
they are less likely to be good forwarders of bundles to each other,
thus the delivery predictability values must age, being reduced in
the process. The second part of the updates of the metric values is
application of the aging equation shown in Equation 2, where
0 <= gamma <= 1 is the aging constant, and K is the number of time
units that have elapsed since the last time the metric was aged. The
<span class="grey">Lindgren, et al. Experimental [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
time unit used can differ and should be defined based on the
application and the expected delays in the targeted network.
P_(A,B) = P_(A,B)_old * gamma^K (Eq. 2)
The delivery predictabilities are aged according to Equation 2 before
being passed to an encountered node so that they reflect the time
that has passed since the node had its last encounter with any other
node. The results of the aging process are sent to the encountered
peer for use in the next stage of the process. The aged results
received from node B in node A are referenced as P_(B,x)_recv.
The delivery predictability also has a transitive property that is
based on the observation that if node A frequently encounters node B,
and node B frequently encounters node C, then node C probably is a
good node to which to forward bundles destined for node A.
Equation 3 shows how this transitivity affects the delivery
predictability, where 0 <= beta <= 1 is a scaling constant that
controls how large an impact the transitivity should have on the
delivery predictability.
P_(A,C) = MAX( P_(A,C)_old, P_(A,B) * P_(B,C)_recv * beta ) (Eq. 3)
Node A uses Equation 3 and the metric values received from the
encountered node B (e.g., P_(B,C)_recv) in the third part of updating
the metric values stored in node A.
<span class="h5"><a class="selflink" id="section-2.1.2.1" href="#section-2.1.2.1">2.1.2.1</a>. Impact of Encounters between Nodes with Different Parameter</span>
<span class="h5"> Settings</span>
The various parameters used in the three equations described in
<a href="#section-2.1.2">Section 2.1.2</a> are set independently in each node, and it is therefore
possible that encounters may take place between nodes that have been
configured with different values of the parameters. This section
considers whether this could be problematic for the operation of
PRoPHET in that zone.
It is desirable that all the nodes operating in a PRoPHET zone should
use closely matched values of the parameters and that the parameters
should be set to values that are appropriate for the operating zone.
More details of how to select appropriate values are given in
<a href="#section-3.3">Section 3.3</a>. Using closely matched values means that delivery
predictabilities will evolve in the same way in each node, leading to
consistent decision making about the bundles that should be exchanged
during encounters.
<span class="grey">Lindgren, et al. Experimental [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
Before going on to consider the impact of reasonable but different
settings, it should be noted that malicious nodes can use
inappropriate settings of the parameters to disrupt delivery of
bundles in a PRoPHET zone as described in <a href="#section-6">Section 6</a>.
Firstly and importantly, use of different, but legitimate, settings
in encountering nodes will not cause problems in the protocol itself.
Apart from P_encounter_first, the other parameters control the rate
of change of the metric values or limit the range of valid values
that will be stored in a node. None of the calculations in a node
will be invalidated or result in illegal values if the metric values
received from another node were calculated using different
parameters. Furthermore, the protocol is designed so that it is not
possible to carry delivery predictabilities outside the permissible
range of 0 to 1.
A node MAY consider setting received values greater than (1 - delta)
to (1 - delta) if this would simplify operations. However, there are
some special situations where it may be appropriate for the delivery
predictability for another node to be 1. For example, if a DTN using
PRoPHET has multiple gateways to the continuously connected Internet,
the delivery predictability seen from PRoPHET in one gateway for the
other gateway nodes can be taken as 1 since they are permanently
connected through the Internet. This would allow traffic to be
forwarded into the DTN through the most advantageous gateway even if
it initially arrives at another gateway.
Simulation work indicates that the update calculations are quite
stable in the face of changes to the rate parameters, so that minor
discrepancies will not have a major impact on the performance of the
protocol. The protocol is explicitly designed to deal with
situations where there are random factors in the opportunistic nature
of node encounters, and this randomness dominates over the
discrepancies in the parameters.
More major discrepancies may lead to suboptimal behavior of the
protocol, as certain paths might be more preferred or more deprecated
inappropriately. However, since the protocol overall is epidemic in
nature, this would not generally lead to non-delivery of bundles, as
they would also be passed to other nodes and would still be
delivered, though possibly not on the optimal path.
<span class="grey">Lindgren, et al. Experimental [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<span class="h4"><a class="selflink" id="section-2.1.3" href="#section-2.1.3">2.1.3</a>. Optional Delivery Predictability Optimizations</span>
<span class="h5"><a class="selflink" id="section-2.1.3.1" href="#section-2.1.3.1">2.1.3.1</a>. Smoothing</span>
To give the delivery predictability a smoother rate of change, a node
MAY apply one of the following methods:
1. Keep a list of NUM_P values for each destination instead of only
a single value. (The recommended value is 4, which has been
shown in simulations to give a good trade-off between smoothness
and rate of response to changes.) The list is held in order of
acquisition. When a delivery predictability is updated, the
value at the "newest" position in the list is used as input to
the equations in <a href="#section-2.1.2">Section 2.1.2</a>. The oldest value in the list is
then discarded and the new value is written in the "newest"
position of the list. When a delivery predictability value is
needed (either for sending to a peering PRoPHET node, or for
making a forwarding decision), the average of the values in the
list is calculated, and that value is then used. If less than
NUM_P values have been entered into the list, only the positions
that have been filled should be used for the averaging.
2. In addition to keeping the delivery predictability as described
in <a href="#section-2.1.2">Section 2.1.2</a>, a node MAY also keep an exponential weighted
moving average (EWMA) of the delivery predictability. The EWMA
is then used to make forwarding decisions and to report to
peering nodes, but the value calculated according to
<a href="#section-2.1.2">Section 2.1.2</a> is still used as input to the calculations of new
delivery predictabilities. The EWMA is calculated according to
Equation 4, where 0 <= alpha <= 1 is the weight of the most
current value.
P_ewma = P_ewma_old * (1 - alpha) + P * alpha (Eq. 4)
The appropriate choice of alpha may vary depending on application
scenario circumstances. Unless prior knowledge of the scenario is
available, it is suggested that alpha is set to 0.5.
<span class="h5"><a class="selflink" id="section-2.1.3.2" href="#section-2.1.3.2">2.1.3.2</a>. Removal of Low Delivery Predictabilities</span>
To reduce the data to be transferred between two nodes, a node MAY
treat delivery predictabilities smaller than P_first_threshold, where
P_first_threshold is a small number, as if they were zero, and thus
they do not need to be stored or included in the list sent during the
Information Exchange Phase. If this optimization is used, care must
be taken to select P_first_threshold to be smaller than delivery
predictability values normally present in the network for
destinations for which this node is a forwarder. It is possible that
<span class="grey">Lindgren, et al. Experimental [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
P_first_threshold could be calculated based on delivery
predictability ranges and the amount they change historically, but
this has not been investigated yet.
<span class="h4"><a class="selflink" id="section-2.1.4" href="#section-2.1.4">2.1.4</a>. Forwarding Strategies and Queueing Policies</span>
In traditional routing protocols, choosing where to forward a message
is usually a simple task; the message is sent to the neighbor that
has the path to the destination with the lowest cost (often the
shortest path). Normally, the message is also sent to only a single
node since the reliability of paths is relatively high. However, in
the settings we envision here, things are radically different. The
first possibility that must be considered when a bundle arrives at a
node is that there might not be a path to the destination available,
so the node has to buffer the bundle, and upon each encounter with
another node, the decision must be made whether or not to transfer a
particular bundle. Furthermore, having duplicates of messages (on
different nodes, as the bundle offer/request mechanism described in
<a href="#section-4.3.5">Section 4.3.5</a> ensures that a node does not receive a bundle it
already carries) may also be sensible, as forwarding a bundle to
multiple nodes can increase the delivery probability of that bundle.
Unfortunately, these decisions are not trivial to make. In some
cases, it might be sensible to select a fixed threshold and only give
a bundle to nodes that have a delivery predictability over that
threshold for the destination of the bundle. On the other hand, when
encountering a node with a low delivery predictability, it is not
certain that a node with a higher metric will be encountered within a
reasonable time. Thus, there can also be situations where we might
want to be less strict in deciding who to give bundles to.
Furthermore, there is the problem of deciding how many nodes to give
a certain bundle to. Distributing a bundle to a large number of
nodes will of course increase the probability of delivering that
particular bundle to its destination, but this comes at the cost of
consuming more system resources for bundle storage and possibly
reducing the probability of other bundles being delivered. On the
other hand, giving a bundle to only a few nodes (maybe even just a
single node) will use less system resources, but the probability of
delivering a bundle is lower, and the delay incurred is high.
When resources are constrained, nodes may suffer from storage
shortage, and may have to drop bundles before they have been
delivered to their destinations. They may also wish to consider the
length of bundles being offered by an encountered node before
accepting transfer of the bundle in order to avoid the need to drop
the new bundle immediately or to ensure that there is adequate space
to hold the bundle offered, which might require other bundles to be
dropped. As with the decision as to whether or not to forward a
<span class="grey">Lindgren, et al. Experimental [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
bundle, deciding which bundles to accept and/or drop to still
maintain good performance might require different policies in
different scenarios.
Nodes MAY define their own forwarding strategies and queueing
policies that take into account the special conditions applicable to
the nodes, and local resource constraints. Some default strategies
and policies that should be suitable for most normal operations are
defined in <a href="#section-3.6">Section 3.6</a> and <a href="#section-3.7">Section 3.7</a>.
<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a>. Bundle Protocol Agent to Routing Agent Interface</span>
The bundle protocol [<a href="./rfc5050" title=""Bundle Protocol Specification"">RFC5050</a>] introduces the concept of a "bundle
protocol agent" that manages the interface between applications and
the "convergence layers" that provide the transport of bundles
between nodes during communication opportunities. This specification
extends the bundle protocol agent with a routing agent that controls
the actions of the bundle protocol agent during an (opportunistic)
communications opportunity.
This specification defines the details of the PRoPHET routing agent,
but the interface defines a more general interface that is also
applicable to alternative routing protocols.
To enable the PRoPHET routing agent to operate properly, it must be
aware of the bundles stored at the node, and it must also be able to
tell the bundle protocol agent of that node to send a bundle to a
peering node. Therefore, the bundle protocol agent needs to provide
the following interface/functionality to the routing agent:
Get Bundle List
Returns a list of the stored bundles and their attributes to the
routing agent.
Send Bundle
Makes the bundle protocol agent send a specified bundle.
Accept Bundle
Gives the bundle protocol agent a new bundle to store.
Bundle Delivered
Tells the bundle protocol agent that a bundle was delivered to
its destination.
Drop Bundle Advice
Advises the bundle protocol agent that a specified bundle should
not be offered for forwarding in future and may be dropped by
the bundle protocol agent if appropriate.
<span class="grey">Lindgren, et al. Experimental [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
Route Import
Can be used by a gateway node in a PRoPHET zone to import
reachability information about endpoint IDs (EIDs) that are
external to the PRoPHET zone. Translation functions dependent
on the external routing protocol will be used to set the
appropriate delivery predictabilities for imported destinations
as described in <a href="#section-2.3">Section 2.3</a>.
Route Export
Can be used by a gateway node in a PRoPHET zone to export
reachability information (destination EIDs and corresponding
delivery predictabilities) for use by routing protocols in other
parts of the DTN.
Implementation Note: Depending on the distribution of functions in
a complete bundle protocol agent supporting PRoPHET, reception and
delivery of bundles may not be carried out directly by the PRoPHET
module. In this case, PRoPHET can inform the bundle protocol
agent about bundles that have been requested from communicating
nodes. Then, the Accept Bundle and Bundle Delivered functions can
be implemented as notifications of the PRoPHET module when the
relevant bundles arrive at the node or are delivered to local
applications.
<span class="h3"><a class="selflink" id="section-2.3" href="#section-2.3">2.3</a>. PRoPHET Zone Gateways</span>
PRoPHET is designed to handle routing primarily within a "PRoPHET
zone", i.e., a set of nodes that all implement the PRoPHET routing
scheme. However, since we recognize that a PRoPHET routing zone is
unlikely to encompass an entire DTN, there may be nodes within the
zone that act as gateways to other nodes that are the destinations
for bundles generated within the zone or that insert bundles into the
zone.
PRoPHET MAY elect to export and import routes across a bundle
protocol agent interface. The delivery predictability to use for
routes that are imported depends on the routing protocol used to
manage those routes. If a translation function between the external
routing protocol and PRoPHET exists, it SHOULD be used to set the
delivery predictability. If no such translation function exists, the
delivery predictability SHOULD be set to 1. For those routes that
are exported, the current delivery predictability will be exported
with the route.
<span class="grey">Lindgren, et al. Experimental [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<span class="h3"><a class="selflink" id="section-2.4" href="#section-2.4">2.4</a>. Lower-Layer Requirements and Interface</span>
PRoPHET can be run on a large number of underlying networking
technologies. To accommodate its operation on all kinds of lower
layers, it requires the lower layers to provide the following
functionality and interfaces.
Neighbor discovery and maintenance
A PRoPHET node needs to know the identity of its neighbors and
when new neighbors appear and old neighbors disappear. Some
wireless networking technologies might already contain
mechanisms for detecting neighbors and maintaining this state.
To avoid redundancies and inefficiencies, neighbor discovery is
thus not included as a part of PRoPHET, but PRoPHET relies on
such a mechanism in lower layers. The lower layers MUST provide
the two functions listed below. If the underlying networking
technology does not support such services, a simple neighbor
discovery scheme using local broadcasts of beacon messages could
be run in between PRoPHET and the underlying layer. An example
of a simple neighbor discovery mechanism that could be used is
in <a href="#appendix-B">Appendix B</a>.
New Neighbor
Signals to the PRoPHET agent that a new node has become a
neighbor. A neighbor is defined here as another node that
is currently within communication range of the wireless
networking technology in use. The PRoPHET agent should now
start the Hello procedure as described in <a href="#section-5.2">Section 5.2</a>.
Neighbor Gone
Signals to the PRoPHET agent that one of its neighbors has
left.
Local Address
An address used by the underlying communication layer (e.g., an
IP or Media Access Control (MAC) address) that identifies the
sender address of the current message. This address must be
unique among the nodes that can currently communicate and is
only used in conjunction with an Instance Number to identify a
communicating pair of nodes as described in <a href="#section-4.1">Section 4.1</a>. This
address and its format is dependent on the communication layer
that is being used by the PRoPHET layer.
<span class="grey">Lindgren, et al. Experimental [Page 21]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Protocol Overview</span>
The PRoPHET protocol involves two principal phases:
o becoming aware of new neighbors that implement the protocol and
establishing a point-to-point connection between each pair of
encountering nodes, and
o using the connection for information exchange needed to establish
PRoPHET routing and to exchange bundles.
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Neighbor Awareness</span>
Since the operation of the protocol is dependent on the encounters of
nodes running PRoPHET, the nodes must be able to detect when a new
neighbor is present. The protocol may be run on several different
networking technologies, and as some of them might already have
methods available for detecting neighbors, PRoPHET does not include a
mechanism for neighbor discovery. Instead, it requires the
underlying layer to provide a mechanism to notify the protocol of
when neighbors appear and disappear as described in <a href="#section-2.4">Section 2.4</a>.
When a new neighbor has been detected, the protocol starts to set up
a link with that node through the Hello message exchange as described
in <a href="#section-5.2">Section 5.2</a>. The Hello message exchange allows for negotiation of
capabilities between neighbors. At present, the only capability is a
request that the offering node should or should not include bundle
payload lengths with all offered bundles rather than just for
fragments. Once the link has been set up, the protocol may continue
to the Information Exchange Phase (see <a href="#section-3.2">Section 3.2</a>). Once this has
been completed, the nodes will normally recalculate the delivery
predictabilities using the equations and mechanisms described in
Sections <a href="#section-2.1.2">2.1.2</a> and <a href="#section-2.1.3">2.1.3</a>.
As described in <a href="#section-2.1.2">Section 2.1.2</a>, there are some circumstances in which
a single logical encounter may result in several actual communication
opportunities. To avoid the delivery predictability of the
encountered node being increased excessively under these
circumstances, the value of P_encounter is made dependent on the
interval time between delivery predictability updates when the
interval is less than the typical interval between encounters, but it
is a constant for longer intervals.
In order to make use of this time dependence, PRoPHET maintains a
list of recently encountered nodes identified by the Endpoint
Identifier (EID) that the node uses to identify the communication
session and containing the start time of the last communication
session with that node. The size of this list is controlled because
<span class="grey">Lindgren, et al. Experimental [Page 22]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
nodes that are not in contact and that started their last connection
more than a time I_typ before the present can be dropped from the
list. It also maintains a record of the time at which the decay
function (Equation 2) was last applied to the delivery
predictabilities in the node.
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Information Exchange Phase</span>
The Information Exchange Phase involves two parts:
o establishing the Router Information Base (RIB Exchange Sub-Phase),
and
o exchanging bundles using this information (Bundle Passing Sub-
Phase).
Four types of information are exchanged during this process:
o Routing Information Base Dictionary (RIB Dictionary or RIBD),
o Routing Information Base (RIB),
o Bundle Offers, and
o Bundle Responses.
During a communication opportunity, several sets of each type of
information may be transferred in each direction as explained in the
rest of this section. Each set can be transferred in one or more
messages. When (and only when) using a connection-oriented reliable
transport protocol such as TCP as envisaged in this document, a set
can be partitioned across messages by the software layer above the
PRoPHET protocol engine.
In this case, the last message in a set is flagged in the protocol.
This allows the higher-level software to minimize the buffer memory
requirements by avoiding the need to build very large messages in one
go and allows the message size to be controlled outside of PRoPHET.
However, this scheme is only usable if the transport protocol
provides reliable, in-order delivery of messages, as the messages are
not explicitly sequence numbered and the overall size of the set is
not passed explicitly.
The specification of PRoPHET also provides a submessage mechanism and
retransmission that allows large messages specified by the higher
level to be transmitted in smaller chunks. This mechanism was
originally provided to allow PRoPHET to operate over unreliable
transport protocols such as UDP, but can also be used with reliable
<span class="grey">Lindgren, et al. Experimental [Page 23]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
transports if the higher-level software does not want to handle
message fragmentation. However, the sequencing and length adds
overhead that is redundant if the transport protocol already provides
reliable, in-order delivery.
The first step in the Information Exchange Phase is for the protocol
to send one or more messages containing a RIB Dictionary TLV (Type-
Length-Value message component) to the node with which it is peering.
This set of messages contain a dictionary of the Endpoint Identifiers
(EIDs) of the nodes that will be listed in the Routing Information
Base (RIB); see <a href="#section-3.2.1">Section 3.2.1</a> for more information about this
dictionary. After this, one or more messages containing a Routing
Information Base TLV are sent. This TLV contains a list of the EIDs
that the node has knowledge of, and the corresponding delivery
predictabilities for those nodes, together with flags describing the
capabilities of the sending node. Upon reception of a complete set
of these messages, the peer node updates its delivery predictability
table according to the equations in <a href="#section-2.1.2">Section 2.1.2</a>. The peer node
then applies its forwarding strategy (see <a href="#section-2.1.4">Section 2.1.4</a>) to determine
which of its stored bundles it wishes to offer the node that sent the
RIB; that node will then be the receiver for any bundles to be
transferred.
After making this decision, one or more Bundle Offer TLVs are
prepared, listing the bundle identifiers and their destinations for
all bundles the peer node wishes to offer to the receiver node that
sent the RIB. As described in [<a href="./rfc5050" title=""Bundle Protocol Specification"">RFC5050</a>], a bundle identifier
consists of up to five component parts. For a complete bundle, the
identifier consists of
o source EID,
o creation timestamp - time of creation, and
o creation timestamp - sequence number.
Additionally, for a bundle fragment, the identifier also contains
o offset within the payload at which the fragment payload data
starts, and
o length of the fragment payload data.
If any of the Bundle Offer TLVs lists a bundle for which the source
or destination EID was not included in the previous set of RIBD
information sent, one or more new RIBD TLVs are sent next with an
incremental update of the dictionary. When the receiver node has a
dictionary with all necessary EIDs, the Bundle Offer TLVs are sent to
<span class="grey">Lindgren, et al. Experimental [Page 24]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
it. The Bundle Offer TLVs also contain a list of PRoPHET ACKs (see
<a href="#section-3.5">Section 3.5</a>). If requested by the receiver node during the Hello
phase, the Bundle Offer TLV will also specify the payload length for
all bundles rather than for just fragments. This information can be
used by the receiving node to assist with the selection of bundles to
be accepted from the offered list, especially if the available bundle
storage capacity is limited.
The receiving node then examines the list of offered bundles and
selects bundles that it will accept according to its own policies,
considering the bundles already present in the node and the current
availability of resources in the node. The list is sorted according
to the priority that the policies apply to the selected bundles, with
the highest priority bundle first in the list. The offering node
will forward the selected bundles in this order. The prioritized
list is sent to the offering node in one or more Bundle Response TLVs
using the same EID dictionary as was used for the Bundle Offer TLV.
When a new bundle arrives at a node, the node MAY inspect its list of
available neighbors, and if one of them is a candidate to forward the
bundle, a new Bundle Offer TLV MAY be sent to that node. If two
nodes remain connected over a longer period of time, the Information
Exchange Phase will be periodically re-initiated to allow new
delivery predictability information to be spread through the network
and new bundle exchanges to take place.
The Information Exchange Phase of the protocol is described in more
detail in <a href="#section-5.3">Section 5.3</a>.
<span class="h4"><a class="selflink" id="section-3.2.1" href="#section-3.2.1">3.2.1</a>. Routing Information Base Dictionary</span>
To reduce the overhead of the protocol, the Routing Information Base
and Bundle Offer/Response TLVs utilize an EID dictionary. This
dictionary maps variable-length EIDs (as defined in [<a href="./rfc4838" title=""Delay- Tolerant Networking Architecture"">RFC4838</a>]), which
may potentially be quite long, to shorter numerical identifiers,
coded as Self-Delimiting Numeric Values (SDNVs -- see <a href="./rfc5050#section-4.1">Section 4.1. of
RFC 5050</a> [<a href="./rfc5050" title=""Bundle Protocol Specification"">RFC5050</a>]), which are used in place of the EIDs in
subsequent TLVs.
This dictionary is a shared resource between the two peering nodes.
Each can add to the dictionary by sending a RIB Dictionary TLV to its
peer. To allow either node to add to the dictionary at any time, the
identifiers used by each node are taken from disjoint sets:
identifiers originated by the node that started the Hello procedure
have the least significant bit set to 0 (i.e., are even numbers)
whereas those originated by the other peer have the least significant
bit set to 1 (i.e., are odd numbers). This means that the dictionary
<span class="grey">Lindgren, et al. Experimental [Page 25]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
can be expanded by either node at any point in the Information
Exchange Phase and the new identifiers can then be used in subsequent
TLVs until the dictionary is re-initialized.
The dictionary that is established only persists through a single
encounter with a node (i.e., while the same link set up by the Hello
procedure, with the same instance numbers, remains open).
Having more then one identifier for the same EID does not cause any
problems. This means that it is possible for the peers to create
their dictionary entries independently if required by an
implementation, but this may be inefficient as a dictionary entry for
an EID might be sent in both directions between the peers.
Implementers can choose to inspect entries sent by the node that
started the Hello procedure and thereby eliminate any duplicates
before sending the dictionary entries from the other peer. Whether
postponing sending the other peer's entries is more efficient depends
on the nature of the physical link technology and the transport
protocol used. With a genuinely full-duplex link, it may be faster
to accept possible duplication and send dictionary entries
concurrently in both directions. If the link is effectively half-
duplex (e.g., Wi-Fi), then it will generally be more efficient to
wait and eliminate duplicates.
If a node receives a RIB Dictionary TLV containing an identifier that
is already in use, the node MUST confirm that the EID referred to is
identical to the EID in the existing entry. Otherwise, the node must
send an error response to the message with the TLV containing the
error and ignore the TLV containing the error. If a node receives a
RIB, Bundle Offer, or Bundle Response TLV that uses an identifier
that is not in its dictionary, the node MUST send an error response
and ignore the TLV containing the error.
<span class="h4"><a class="selflink" id="section-3.2.2" href="#section-3.2.2">3.2.2</a>. Handling Multiple Simultaneous Contacts</span>
From time to time, a mobile node may, for example, be in wireless
range of more than one other mobile node. The PRoPHET neighbor
awareness protocol will establish multiple simultaneous contacts with
these nodes and commence information exchanges with each of them.
When updating the delivery predictabilities as described in
<a href="#section-2.1.2">Section 2.1.2</a> using the values passed from each of the contacts in
turn, some special considerations apply when multiple contacts are in
progress:
<span class="grey">Lindgren, et al. Experimental [Page 26]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
SC1 When aging the delivery predictabilities according to
Equation 2, the value of K to be used in each set of
calculations is always the amount of time since the last aging
was done. For example, if node Z makes contact with node A and
then with node B, the value of K used when the delivery
predictabilities are aged in node Z for the contact with node B
will be the time since the delivery predictabilities were aged
for the contact with node A.
SC2 When a new contact starts, the value of P_encounter used when
applying Equation 1 for the newly contacted node is always
selected according to the time since the last encounter with
that node. Thus, the application of Equation 1 to update
P_(Z,A) when the contact of nodes Z and A starts (in the aging
example just given) and the updating of P_(Z,B) when the contact
of nodes Z and B starts will use the appropriate value of
P_encounter according to how long it is since node Z previously
encountered node A and node B, respectively.
SC3 If, as with the contact between nodes Z and B, there is another
active contact in progress, such as with node A when the contact
with node B starts, Equation 1 should *also* be applied to
P_(z,x) for all the nodes "x" that have ongoing contacts with
node Z (i.e., node A in the example given). However, the value
of P_encounter used will be selected according to the time since
the previous update of the delivery predictabilities as a result
of information received from any other node. In the example
given here, P_(Z,A) would also have Equation 1 applied when the
delivery predictabilities are received from node B, but the
value of P_encounter used would be selected according to the
time since the updates done when the encounter between nodes Z
and A started rather than the time since the previous encounter
between nodes A and Z.
If these simultaneous contacts persist for some time, then, as
described in <a href="#section-3.2">Section 3.2</a>, the Information Exchange Phase will be
periodically rerun for each contact according to the configured timer
interval. When the delivery predictability values are recalculated
during each rerun, Equation 1 will be applied as in special
consideration SC3 above, but it will be applied to the delivery
predictability for each active contact using the P_encounter value
selected according to the time since the last set of updates were
performed on the delivery predictabilities, irrespective of which
nodes triggered either the previous or current updates. This means
that, in the example discussed here, P_(Z,A) and P_(Z,B) will be
updated using the same value of P_encounter whether node A or node B
initiated the update while the three nodes remain connected.
<span class="grey">Lindgren, et al. Experimental [Page 27]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
The interval between reruns of the information exchange will
generally be set to a small fraction of the expected time between
independent encounters of pairs of nodes. This ensures that, for
example, the delivery predictability information obtained by node Z
from node A will be passed on to node B whether or not nodes A and B
can communicate directly during this encounter. This avoids problems
that may arise from peculiarities of radio propagation during this
sort of encounter, but the scaling of the P_encounter factor
according to the time between updates of the delivery
predictabilities means that the predictabilities for the nodes that
are in contact are not increased excessively as would be the case if
each information exchange were treated as a separate encounter with
the value of P_encounter_max used each time. When several nodes are
in mutual contact, the delivery predictabilities in each node
stabilize after a few exchanges due to the scaling of P_encounter as
well as the form of Equation 3 where a "max" function is used. This
has been demonstrated by simulation.
The effect of the updates of the delivery predictabilities when there
are multiple simultaneous contacts is that the information about good
routes on which to forward bundles is correctly passed between sets
of nodes that are simultaneously in contact through the transitive
update of Equation 3 during each information exchange, but the
delivery predictabilities for the direct contacts are not
exaggerated.
<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>. Routing Algorithm</span>
The basic routing algorithm of the protocol is described in
<a href="#section-2.1">Section 2.1</a>. The algorithm uses some parameter values in the
calculation of the delivery predictability metric. These parameters
are configurable depending on the usage scenario, but Figure 3
provides some recommended default values. A brief explanation of the
parameters and some advice on setting appropriate values is given
below.
I_typ
I_typ provides a fundamental timescale for the mobility pattern
in the PRoPHET scenario where the protocol is being applied. It
represents the typical or mean time interval between encounters
between a given pair of nodes in the normal course of mobility.
The interval should reflect the "logical" time between
encounters and should not give significant weight to multiple
connection events as explained in <a href="#section-2.1.2">Section 2.1.2</a>. This time
interval informs the settings of many of the other parameters
but is not necessarily directly used as a parameter.
Consideration needs to be given to the higher statistical
moments (e.g., standard deviation) as well as the mean (first
<span class="grey">Lindgren, et al. Experimental [Page 28]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-29" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
moment) of the distribution of intervals between encounters and
the nature of that distribution (e.g., how close to a normal
distribution it is). There is further discussion of this point
later in this section and in <a href="#appendix-C">Appendix C</a>.
P_encounter_max
P_encounter_max is used as the upper limit of a scaling factor
that increases the delivery predictability for a destination
when the destination node is encountered. A larger value of
P_encounter_max will increase the delivery predictability
faster, and fewer encounters will be required for the delivery
predictability to reach a certain level. Given that relative
rather than absolute delivery predictability values are what is
interesting for the forwarding mechanisms defined, the protocol
is very robust to different values of P_encounter as long as the
same value is chosen for all nodes. The value should be chosen
so that the increase in the delivery predictability resulting
from using P_encounter_max in Equation 1 more than compensates
for the decay of the delivery predictability resulting from
Equation 3 with a time interval of I_typ.
P_encounter(intvl)
As explained in <a href="#section-2.1.2">Section 2.1.2</a>, the parameter P_encounter used in
Equation 1 is a function of the time interval "intvl". The
function should be an approximation to
P_encounter(intvl) =
P_encounter_max * (intvl / I_typ) for 0<= intvl <= I_typ
P_encounter_max for intvl > I_typ
The function can be quantized and adapted to suit the mobility
pattern and to make implementation easier. The overall effect
should be that be that if Equation 1 is applied a number of
times during a long-lived communication opportunity lasting
I_typ, the overall increase in the delivery predictability
should be approximately the same as if there had been two
distinct encounters spaced I_typ apart. This second case would
result in one application of Equation 1 using P_encounter_max.
P_first_threshold
As described in <a href="#section-2.1.2">Section 2.1.2</a>, the delivery predictability for a
destination is gradually reduced over time unless increased as a
result of direct encounters or through the transitive property.
If the delivery predictability falls below the value
P_first_threshold, then the node MAY discard the delivery
predictability information for the destination and treat
subsequent encounters as if they had never encountered the node
previously. This allows the node to reduce the storage needed
<span class="grey">Lindgren, et al. Experimental [Page 29]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-30" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
for delivery predictabilities and decreases the amount of
information that has to be exchanged between nodes; otherwise,
the reduction algorithm would result in very small but non-zero
predictabilities being maintained for nodes that were last
encountered a long time ago.
P_encounter_first
As described in <a href="#section-2.1.2">Section 2.1.2</a>, PRoPHET does not, by default,
make any assumptions about the likelihood that an encountered
node will be encountered repeatedly in the future or,
alternatively, that this is a one-off chance encounter that is
unlikely to be repeated. During an encounter where the
encountering node has no delivery predictability information for
the encountered destination node, either because this is really
the first encounter between the nodes or because the previous
encounter was so long ago that the predictability had fallen
below P_first_threshold and therefore had been discarded, the
encountering node sets the delivery predictability for the
destination node to P_encounter_first. The suggested value for
P_encounter_first is 0.5: this value is RECOMMENDED as
appropriate in the usual case where PRoPHET has no extra (e.g.,
out-of-band) information about whether future encounters with
this node will be regular or otherwise.
alpha
The alpha parameter is used in the optional smoothing of the
delivery predictabilities described in <a href="#section-2.1.3.1">Section 2.1.3.1</a>. It is
used to determine the weight of the most current P-value in the
calculation of an EWMA.
beta
The beta parameter adjusts the weight of the transitive property
of PRoPHET, that is, how much consideration should be given to
information about destinations that is received from encountered
nodes. If beta is set to zero, the transitive property of
PRoPHET will not be active, and only direct encounters will be
used in the calculation of the delivery predictability. The
higher the value of beta, the more rapidly encounters will
increase predictabilities through the transitive rule.
gamma
The gamma parameter determines how quickly delivery
predictabilities age. A lower value of gamma will cause the
delivery predictability to age faster. The value of gamma
should be chosen according to the scenario and environment in
which the protocol will be used. If encounters are expected to
be very frequent, a lower value should be chosen for gamma than
if encounters are expected to be rare.
<span class="grey">Lindgren, et al. Experimental [Page 30]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-31" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
delta
The delta parameter sets the maximum value of the delivery
predictability for a destination other than for the node itself
(i.e., P_(A,B) for all cases except P_(A,A)) as (1 - delta).
Delta should be set to a small value to allow the maximum
possible range for predictabilities but can be configured to
make the calculation efficient if needed.
To set an appropriate gamma value, one should consider the "average
expected delivery" time I_aed in the PRoPHET zone where the protocol
is to be used, and the time unit used (the resolution with which the
delivery predictability is being updated). The I_aed time interval
can be estimated according to the average number of hops that bundles
have to pass and the average interval between encounters I_typ.
Clearly, if bundles have a Time To Live (TTL), i.e., the time left
until the expiry time stored in the bundle occurs, that is less than
I_aed, they are unlikely to survive in the network to be delivered to
a node in this PRoPHET zone. However, the TTL for bundles created in
nodes in this zone should not be chosen solely on this basis because
they may pass through other networks.
After estimating I_aed and selecting how much we want the delivery
predictability to age in one I_aed time period (call this A), we can
calculate K, the number of time units in one I_aed, using
K = (I_aed / time unit). This can then be used to calculate gamma as
gamma = K'th-root( A ).
I_typ, I_aed, K, and gamma can then be used to inform the settings of
P_encounter_first, P_encounter_max, P_first_threshold, delta, and the
detailed form of the function P_encounter(intvl).
First, considering the evolution of the delivery predictability
P_(A,B) after a single encounter between nodes A and B, P_(A,B) is
initially set to P_encounter_first and will then steadily decay until
it reaches P_first_threshold. The ratio between P_encounter_first
and P_first_threshold should be set so that P_first_threshold is
reached after a small multiple (e.g., 3 to 5) of I_aed has elapsed,
making it likely that any subsequent encounter between the nodes
would have occurred before P_(A,B) decays below P_first_threshold.
If the statistics of the distribution of times between encounters is
known, then a small multiple of the standard deviation of the
distribution would be a possible period instead of using a multiple
of I_aed.
Second, if a second encounter between A and B occurs, the setting of
P_encounter_max should be sufficiently high to reverse the decay that
would have occurred during I_typ and to increase P_(A,B) above the
value of P_encounter_first. After several further encounters,
<span class="grey">Lindgren, et al. Experimental [Page 31]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-32" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
P_(A,B) will reach (1 - delta), its upper limit. As with setting up
P_first_threshold, P_encounter_max should be set so that the upper
limit is reached after a small number of encounters spaced apart by
I_typ have occurred, but this should generally be more than 2 or 3.
Finally, beta can be chosen to give some smoothing of the influence
of transitivity.
These instructions on how to set the parameters are only given as a
possible method for selecting appropriate values, but network
operators are free to set parameters as they choose. <a href="#appendix-C">Appendix C</a> goes
into some more detail on linking the parameters defined here and the
more conventional ways of expressing the mobility model in terms of
distributions of times between events of various types.
Recommended starting parameter values when specific network
measurements have not been done are below. Note: There are no "one
size fits all" default values, and the ideal values vary based on
network characteristics. It is not inherently necessary for the
parameter values to be identical at all nodes, but it is recommended
that similar values are used at all nodes within a PRoPHET zone as
discussed in <a href="#section-2.1.2.1">Section 2.1.2.1</a>.
+========================================+
| Parameter | Recommended value |
+========================================+
| P_encounter_max | 0.7 |
+----------------------------------------+
| P_encounter_first | 0.5 |
+----------------------------------------+
| P_first_threshold | 0.1 |
+----------------------------------------+
| alpha | 0.5 |
+----------------------------------------+
| beta | 0.9 |
+----------------------------------------+
| gamma | 0.999 |
+----------------------------------------+
| delta | 0.01 |
+========================================+
Figure 3: Default parameter settings
<span class="h3"><a class="selflink" id="section-3.4" href="#section-3.4">3.4</a>. Bundle Passing</span>
Upon reception of the Bundle Offer TLV, the node inspects the list of
bundles and decides which bundles it is willing to store for future
forwarding or that it is able to deliver to their destinations. This
<span class="grey">Lindgren, et al. Experimental [Page 32]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-33" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
decision has to be made using local policies and considering
parameters such as available buffer space and, if the node requested
bundle lengths, the lengths of the offered bundles. For each such
acceptable bundle, the node sends a Bundle Response TLV to its
peering node, which responds by sending the requested bundle. If a
node has some bundles it would prefer to receive ahead of others
offered (e.g., bundles that it can deliver to their final
destination), it MAY request the bundles in that priority order.
This is often desirable as there is no guarantee that the nodes will
remain in contact with each other for long enough to transfer all the
acceptable bundles. Otherwise, the node SHOULD assume that the
bundles are listed in a priority order determined by the peering
node's forwarding strategy and request bundles in that order.
<span class="h4"><a class="selflink" id="section-3.4.1" href="#section-3.4.1">3.4.1</a>. Custody</span>
To free up local resources, a node may give custody of a bundle to
another node that offers custody. This is done to move the
retransmission requirement further toward the destination. The
concept of custody transfer, and more details on the motivation for
its use can be found in [<a href="./rfc4838" title=""Delay- Tolerant Networking Architecture"">RFC4838</a>]. PRoPHET takes no responsibilities
for making custody decisions. Such decisions should be made by a
higher layer.
<span class="h3"><a class="selflink" id="section-3.5" href="#section-3.5">3.5</a>. When a Bundle Reaches Its Destination</span>
A PRoPHET ACK is only a confirmation that a bundle has been delivered
to its destination in the PRoPHET zone (within the part of the
network where PRoPHET is used for routing, bundles might traverse
several different types of networks using different routing
protocols; thus, this might not be the final destination of the
bundle). When nodes exchange Bundle Offer TLVs, bundles that have
been ACKed are also listed, having the "PRoPHET ACK" flag set. The
node that receives this list updates its own list of ACKed bundles to
be the union of its previous list and the received list. To prevent
the list of ACKed bundles growing indefinitely, each PRoPHET ACK
should have a timeout that MUST NOT be longer than the timeout of the
bundle to which the ACK corresponds.
When a node receives a PRoPHET ACK for a bundle it is carrying, it
MAY delete that bundle from its storage, unless the node holds
custody of that bundle. The PRoPHET ACK only indicates that a bundle
has been delivered to its destination within the PRoPHET zone, so the
reception of a PRoPHET ACK is not a guarantee that the bundle has
been delivered to its final destination.
<span class="grey">Lindgren, et al. Experimental [Page 33]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-34" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
Nodes MAY track to which nodes they have sent PRoPHET ACKs for
certain bundles, and MAY in that case refrain from sending multiple
PRoPHET ACKs for the same bundle to the same node.
If necessary in order to preserve system resources, nodes MAY drop
PRoPHET ACKs prematurely but SHOULD refrain from doing so if
possible.
It is important to keep in mind that PRoPHET ACKs and bundle ACKs
[<a href="./rfc5050" title=""Bundle Protocol Specification"">RFC5050</a>] are different things. PRoPHET ACKs are only valid within
the PRoPHET part of the network, while bundle ACKs are end-to-end
acknowledgments that may go outside of the PRoPHET zone.
<span class="h3"><a class="selflink" id="section-3.6" href="#section-3.6">3.6</a>. Forwarding Strategies</span>
During the Information Exchange Phase, nodes need to decide on which
bundles they wish to exchange with the peering node. Because of the
large number of scenarios and environments that PRoPHET can be used
in, and because of the wide range of devices that may be used, it is
not certain that this decision will be based on the same strategy in
every case. Therefore, each node MUST operate a _forwarding
strategy_ to make this decision. Nodes may define their own
strategies, but this section defines a few basic forwarding
strategies that nodes can use. Note: If the node being encountered
is the destination of any of the bundles being carried, those bundles
SHOULD be offered to the destination, even if that would violate the
forwarding strategy. Some of the forwarding strategies listed here
have been evaluated (together with a number of queueing policies)
through simulations, and more information about that and
recommendations on which strategies to use in different situations
can be found in [<a href="#ref-lindgren_06" title=""Evaluation of Queueing Policies and Forwarding Strategies for Routing in Intermittently Connected Networks"">lindgren_06</a>]. If not chosen differently due to the
characteristics of the deployment scenario, nodes SHOULD choose GRTR
as the default forwarding strategy.
The short names applied to the forwarding strategies should be read
as mnemonic handles rather than as specific acronyms for any set of
words in the specification.
We use the following notation in our descriptions below. A and B are
the nodes that encounter each other, and the strategies are described
as they would be applied by node A. The destination node is D.
P_(X,Y) denotes the delivery predictability stored at node X for
destination Y, and NF is the number of times node A has given the
bundle to some other node.
<span class="grey">Lindgren, et al. Experimental [Page 34]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-35" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
GRTR
Forward the bundle only if P_(B,D) > P_(A,D).
When two nodes meet, a bundle is sent to the other node if the
delivery predictability of the destination of the bundle is
higher at the other node. The first node does not delete the
bundle after sending it as long as there is sufficient buffer
space available (since it might encounter a better node, or even
the final destination of the bundle in the future).
GTMX
Forward the bundle only if P_(B,D) > P_(A,D) && NF < NF_max.
This strategy is like the previous one, but each bundle is given
to at most NF_max other nodes in addition to the destination.
GTHR
Forward the bundle only if
P_(B,D) > P_(A,D) OR P_(B,D) > FORW_thres,
where FORW_thres is a threshold value above which a bundle
should always be given to the node unless it is already present
at the other node.
This strategy is similar to GRTR, but among nodes with very high
delivery predictability, bundles for that particular destination
are spread epidemically.
GRTR+
Forward the bundle only if Equation 5 holds, where P_max is the
largest delivery predictability reported by a node to which the
bundle has been sent so far.
P_(B,D) > P_(A,D) && P_(B,D) > P_max (Eq. 5)
This strategy is like GRTR, but each node forwarding a bundle
keeps track of the largest delivery predictability of any node
it has forwarded this bundle to, and only forwards the bundle
again if the currently encountered node has a greater delivery
predictability than the maximum previously encountered.
GTMX+
Forward the bundle only if Equation 6 holds.
P_(B,D) > P_(A,D) && P_(B,D) > P_max && NF < NF_max (Eq. 6)
This strategy is like GTMX, but nodes keep track of P_max as in
GRTR+.
<span class="grey">Lindgren, et al. Experimental [Page 35]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-36" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
GRTRSort
Select bundles in descending order of the value of
P_(B,D) - P_(A,D).
Forward the bundle only if P_(B,D) > P_(A,D).
This strategy is like GRTR, but instead of just going through
the bundle queue linearly, this strategy looks at the difference
in delivery predictabilities for each bundle between the two
nodes and forwards the bundles with the largest difference
first. As bandwidth limitations or disrupted connections may
result in not all bundles that would be desirable being
exchanged, it could be desirable to first send bundles that get
a large improvement in delivery predictability.
GRTRMax
Select bundles in descending order of P_(B,D).
Forward the bundle only if P_(B,D) > P_(A,D).
This strategy begins by considering the bundles for which the
encountered node has the highest delivery predictability. The
motivation for doing this is the same as in GRTRSort, but based
on the idea that it is better to give bundles to nodes with high
absolute delivery predictabilities, instead of trying to
maximize the improvement.
<span class="h3"><a class="selflink" id="section-3.7" href="#section-3.7">3.7</a>. Queueing Policies</span>
Because of limited buffer resources, nodes may need to drop some
bundles. As is the case with the forwarding strategies, which bundle
to drop is also dependent on the scenario. Therefore, each node MUST
also operate a queueing policy that determines how its bundle queue
is handled. This section defines a few basic queueing policies, but
nodes MAY use other policies if desired. Some of the queueing
policies listed here have been evaluated (together with a number of
forwarding strategies) through simulations. More information about
that and recommendations on which policies to use in different
situations can be found in [<a href="#ref-lindgren_06" title=""Evaluation of Queueing Policies and Forwarding Strategies for Routing in Intermittently Connected Networks"">lindgren_06</a>]. If not chosen differently
due to the characteristics of the deployment scenario, nodes SHOULD
choose FIFO as the default queueing policy.
The short names applied to the queueing policies should be read as
mnemonic handles rather than as specific acronyms for any set of
words in the specification.
FIFO - First In First Out.
The bundle that was first entered into the queue is the first
bundle to be dropped.
<span class="grey">Lindgren, et al. Experimental [Page 36]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-37" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
MOFO - Evict most forwarded first.
In an attempt to maximize the delivery rate of bundles, this
policy requires that the routing agent keep track of the number
of times each bundle has been forwarded to some other node. The
bundle that has been forwarded the largest number of times is
the first to be dropped.
MOPR - Evict most favorably forwarded first.
Keep a variable FAV for each bundle in the queue, initialized to
zero. Each time the bundle is forwarded, update FAV according
to Equation 7, where P is the predictability metric that the
node the bundle is forwarded to has for its destination.
FAV_new = FAV_old + ( 1 - FAV_old ) * P (Eq. 7)
The bundle with the highest FAV value is the first to be
dropped.
Linear MOPR - Evict most favorably forwarded first; linear increase.
Keep a variable FAV for each bundle in the queue, initialized to
zero. Each time the bundle is forwarded, update FAV according
to Equation 8, where P is the predictability metric that the
node the bundle is forwarded to has for its destination.
FAV_new = FAV_old + P (Eq. 8)
The bundle with the highest FAV value is the first to be
dropped.
SHLI - Evict shortest life time first.
As described in [<a href="./rfc5050" title=""Bundle Protocol Specification"">RFC5050</a>], each bundle has a timeout value
specifying when it no longer is meaningful to its application
and should be deleted. Since bundles with short remaining Time
To Live will soon be dropped anyway, this policy decides to drop
the bundle with the shortest remaining lifetime first. To
successfully use a policy like this, there needs to be some form
of time synchronization between nodes so that it is possible to
know the exact lifetimes of bundles. However, this is not
specific to this routing protocol, but a more general DTN
problem.
LEPR - Evict least probable first.
Since the node is least likely to deliver a bundle for which it
has a low delivery predictability, drop the bundle for which the
node has the lowest delivery predictability, and that has been
forwarded at least MF times, where MF is a minimum number of
forwards that a bundle must have been forwarded before being
dropped (if such a bundle exists).
<span class="grey">Lindgren, et al. Experimental [Page 37]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-38" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
More than one queueing policy MAY be combined in an ordered set,
where the first policy is used primarily, the second only being used
if there is a need to tie-break between bundles given the same
eviction priority by the primary policy, and so on. As an example,
one could select the queueing policy to be {MOFO; SHLI; FIFO}, which
would start by dropping the bundle that has been forwarded the
largest number of times. If more than one bundle has been forwarded
the same number of times, the one with the shortest remaining
lifetime will be dropped, and if that also is the same, the FIFO
policy will be used to drop the bundle first received.
It is worth noting that a node MUST NOT drop bundles for which it has
custody unless the bundle's lifetime expires.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Message Formats</span>
This section defines the message formats of the PRoPHET routing
protocol. In order to allow for variable-length fields, many numeric
fields are encoded as Self-Delimiting Numeric Values (SDNVs). The
format of SDNVs is defined in [<a href="./rfc5050" title=""Bundle Protocol Specification"">RFC5050</a>]. Since many of the fields
are coded as SDNVs, the size and alignment of fields indicated in
many of the specification diagrams below are indicative rather than
prescriptive. Where SDNVs and/or text strings are used, the octets
of the fields will be packed as closely as possible with no
intervening padding between fields.
Explicit-length fields are specified for all variable-length string
fields. Accordingly, strings are not null terminated and just
contain the exact set of octets in the string.
The basic message format shown in Figure 4 consists of a header (see
<a href="#section-4.1">Section 4.1</a>) followed by a sequence of one or more Type-Length-Value
components (TLVs) taken from the specifications in <a href="#section-4.2">Section 4.2</a>.
<span class="grey">Lindgren, et al. Experimental [Page 38]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-39" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Header ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ TLV 1 ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| . |
~ . ~
| . |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ TLV n ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 4: Basic PRoPHET Message Format
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. Header</span>
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Protocol Number|Version| Flags | Result | Code |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Receiver Instance | Sender Instance |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Transaction Identifier |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|S| SubMessage Number | Length (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Message Body ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 5: PRoPHET Message Header
Protocol Number
The DTN Routing Protocol Number encoded as 8-bit unsigned
integer in network bit order. The value of this field is 0.
The PRoPHET header is organized in this way so that in principle
PRoPHET messages could be sent as the Protocol Data Unit of an
IP packet if an IP protocol number was allocated for PRoPHET.
<span class="grey">Lindgren, et al. Experimental [Page 39]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-40" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
At present, PRoPHET is only specified to use a TCP transport for
carriage of PRoPHET packets, so that the protocol number serves
only to identify the PRoPHET protocol within DTN. Transmitting
PRoPHET packets directly as an IP protocol on a public IP
network such as the Internet would generally not work well
because middleboxes (such as firewalls and NAT boxes) would be
unlikely to allow the protocol to pass through, and the protocol
does not provide any congestion control. However, it could be
so used on private networks for experimentation or in situations
where all communications are between isolated pairs of nodes.
Also, in the future, other protocols that require transmission
of metadata between DTN nodes could potentially use the same
format and protocol state machinery but with a different
Protocol Number.
Version
The version of the PRoPHET Protocol. Encoded as a 4-bit
unsigned integer in network bit order. This document defines
version 2.
Flags
Reserved field of 4 bits.
Result
Field that is used to indicate whether a response is required to
the request message if the outcome is successful. A value of
"NoSuccessAck" indicates that the request message does not
expect a response if the outcome is successful, and a value of
"AckAll" indicates that a response is expected if the outcome is
successful. In both cases, a failure response MUST be generated
if the request fails. If running over a TCP transport or
similar protocol that offers reliable in order delivery,
deployments MAY choose not to send "Success" responses when an
outcome is successful. To achieve this, the Result field is set
to the "NoSuccessAck" value in all request messages.
In a response message, the result field can have two values:
"Success" and "Failure". The "Success" result indicates a
success response. All messages that belong to the same success
response will have the same Transaction Identifier. The
"Success" result indicates a success response that may be
contained in a single message or the final message of a success
response spanning multiple messages.
<span class="grey">Lindgren, et al. Experimental [Page 40]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-41" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
ReturnReceipt is a value of the result field used to indicate
that an acknowledgement is required for the message. The
default for messages is that the controller will not acknowledge
responses. In the case where an acknowledgement is required, it
will set the Result Field to ReturnReceipt in the header of the
Message.
The result field is encoded as an 8-bit unsigned integer in
network bit order. The following values are currently defined:
NoSuccessAck: Result = 1
AckAll: Result = 2
Success: Result = 3
Failure: Result = 4
ReturnReceipt Result = 5
Code
This field gives further information concerning the result in a
response message. It is mostly used to pass an error code in a
failure response but can also be used to give further
information in a success response message or an event message.
In a request message, the code field is not used and is set to
zero.
If the Code field indicates that the Error TLV is included in
the message, further information on the error will be found in
the Error TLV, which MUST be the first TLV after the header.
The Code field is encoded as an 8-bit unsigned integer in
network bit order. Separate number code spaces are used for
success and failure response messages. In each case, a range of
values is reserved for use in specifications and another range
for private and experimental use. For success messages, the
following values are defined:
Generic Success 0x00
Submessage Received 0x01
Unassigned 0x02 - 0x7F
Private/Experimental Use 0x80 - 0xFF
The Submessage Received code is used to acknowledge reception of
a message segment. The Generic Success code is used to
acknowledge receipt of a complete message and successful
processing of the contents.
<span class="grey">Lindgren, et al. Experimental [Page 41]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-42" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
For failure messages, the following values are defined:
Reserved 0x00 - 0x01
Unspecified Failure 0x02
Unassigned 0x03 - 0x7F
Private/Experimental Use 0x80 - 0xFE
Error TLV in message 0xFF
The Unspecified Failure code can be used to report a failure for
which there is no more specific code or Error TLV value defined.
Sender Instance
For messages during the Hello phase with the Hello SYN, Hello
SYNACK, and Hello ACK functions (which are explained in
<a href="#section-5.2">Section 5.2</a>), it is the sender's instance number for the link.
It is used to detect when the link comes back up after going
down or when the identity of the entity at the other end of the
link changes. The instance number is a 16-bit number that is
guaranteed to be unique within the recent past and to change
when the link or node comes back up after going down. Zero is
not a valid instance number. For the RSTACK function (also
explained in detail in <a href="#section-5.2">Section 5.2</a>), the Sender Instance field
is set to the value of the Receiver Instance field from the
incoming message that caused the RSTACK function to be
generated. Messages sent after the Hello phase is completed
should use the sender's instance number for the link. The
Sender Instance is encoded as a 16-bit unsigned integer in
network bit order.
Receiver Instance
For messages during the Hello phase with the Hello SYN, Hello
SYNACK, and Hello ACK functions, it is what the sender believes
is the current instance number for the link, allocated by the
entity at the far end of the link. If the sender of the message
does not know the current instance number at the far end of the
link, this field MUST be set to zero. For the RSTACK message,
the Receiver Instance field is set to the value of the Sender
Instance field from the incoming message that caused the RSTACK
message to be generated. Messages sent after the Hello phase is
completed should use what the sender believes is the current
instance number for the link, allocated by the entity at the far
end of the link. The Sender Instance is encoded as a 16-bit
unsigned integer in network bit order.
<span class="grey">Lindgren, et al. Experimental [Page 42]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-43" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
Transaction Identifier
Used to associate a message with its response message. This
should be set in request messages to a value that is unique for
the sending host within the recent past. Reply messages contain
the Transaction Identifier of the request to which they are
responding. The Transaction Identifier is a bit pattern of 32
bits.
S-flag
If S is set (value 1), then the SubMessage Number field
indicates the total number of SubMessage segments that compose
the entire message. If it is not set (value 0), then the
SubMessage Number field indicates the sequence number of this
SubMessage segment within the whole message. The S field will
only be set in the first submessage of a sequence.
SubMessage Number
When a message is segmented because it exceeds the MTU of the
link layer or otherwise, each segment will include a SubMessage
Number to indicate its position. Alternatively, if it is the
first submessage in a sequence of submessages, the S-flag will
be set, and this field will contain the total count of
SubMessage segments. The SubMessage Number is encoded as a
15-bit unsigned integer in network bit order. The SubMessage
number is zero-based, i.e., for a message divided into n
submessages, they are numbered from 0 to (n - 1). For a message
that is not divided into submessages, the single message has the
S-flag cleared (value 0), and the SubMessage Number is set to 0
(zero).
Length
Length in octets of this message including headers and message
body. If the message is fragmented, this field contains the
length of this SubMessage. The Length is encoded as an SDNV.
Message Body
As specified in <a href="#section-4">Section 4</a>, the Message Body consists of a
sequence of one or more of the TLVs specified in <a href="#section-4.2">Section 4.2</a>.
The protocol also requires extra information about the link that the
underlying communication layer MUST provide. This information is
used in the Hello procedure described in more detail in <a href="#section-5.2">Section 5.2</a>.
Since this information is available from the underlying layer, there
is no need to carry it in PRoPHET messages. The following values are
defined to be provided by the underlying layer:
<span class="grey">Lindgren, et al. Experimental [Page 43]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-44" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
Sender Local Address
An address that is used by the underlying communication layer as
described in <a href="#section-2.4">Section 2.4</a> and identifies the sender address of
the current message. This address must be unique among the
nodes that can currently communicate, and it is only used in
conjunction with the Receiver Local Address, Receiver Instance,
and Sender Instance to identify a communicating pair of nodes.
Receiver Local Address
An address that is used by the underlying communication layer as
described in <a href="#section-2.4">Section 2.4</a> and identifies the receiver address of
the current message. This address must be unique among the
nodes that can currently communicate, and is only used in
conjunction with the Sender Local Address, Receiver Instance,
and Sender Instance to identify a communicating pair of nodes.
When PRoPHET is run over TCP, the IP addresses of the communicating
nodes are used as Sender and Receiver Local Addresses.
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. TLV Structure</span>
All TLVs have the following format, and can be nested.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TLV Type | TLV Flags | TLV Length (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ TLV Data ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 6: TLV Format
TLV Type
Specific TLVs are defined in <a href="#section-4.3">Section 4.3</a>. The TLV Type is
encoded as an 8-bit unsigned integer in network bit order. Each
TLV will have fields defined that are specific to the function
of that TLV.
TLV Flags
These are defined per TLV type. Flag n corresponds to bit 15-n
in the TLV. Any flags that are specified as reserved in
specific TLVs SHOULD be transmitted as 0 and ignored on receipt.
<span class="grey">Lindgren, et al. Experimental [Page 44]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-45" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
TLV Length
Length of the TLV in octets, including the TLV header and any
nested TLVs. Encoded as an SDNV. Note that TLVs are not padded
to any specific alignment unless explicitly required in the
description of the TLV. No TLVs in this document specify any
padding.
<span class="h3"><a class="selflink" id="section-4.3" href="#section-4.3">4.3</a>. TLVs</span>
This section describes the various TLVs that can be used in PRoPHET
messages.
<span class="h4"><a class="selflink" id="section-4.3.1" href="#section-4.3.1">4.3.1</a>. Hello TLV</span>
The Hello TLV is used to set up and maintain a link between two
PRoPHET nodes. Hello messages with the SYN function are transmitted
periodically as beacons or keep-alives. The Hello TLV is the first
TLV exchanged between two PRoPHET nodes when they encounter each
other. No other TLVs can be exchanged until the first Hello sequence
is completed.
Once a communication link is established between two PRoPHET nodes,
the Hello TLV will be sent once for each interval as defined in the
interval timer. If a node experiences the lapse of HELLO_DEAD Hello
intervals without receiving a Hello TLV on a connection in the
INFO_EXCH state (as defined in the state machine in <a href="#section-5.1">Section 5.1</a>), the
connection SHOULD be assumed broken.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TLV Type=0x01 |L| Resv | HF | TLV Length (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Timer (SDNV) |EID Length,SDNV| Sender EID (variable length) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 7: Hello TLV Format
TLV Flags
The TLV Flags field contains two 1-bit flags (S and L) and a
3-bit Hello Function (HF) number that specifies one of four
functions for the Hello TLV. The remaining 3 bits (Resv) are
unused and reserved:
<span class="grey">Lindgren, et al. Experimental [Page 45]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-46" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
HF
TLV Flags bits 0, 1, and 2 are treated as an unsigned 3-bit
integer coded in network bit order. The value of the
integer specifies the Hello Function (HF) of the Hello TLV.
Four functions are specified for the Hello TLV.
The encoding of the Hello Function is:
SYN: HF = 1
SYNACK: HF = 2
ACK: HF = 3
RSTACK: HF = 4
The remaining values (0, 5, 6 and 7) are unused and reserved. If a
Hello TLV with any of these values is received, the link should be
reset.
Resv
TLV Flags bits 3, 4, 5, and 6 are reserved. They SHOULD be
set to 0 on transmission and ignored on reception.
L
The L bit flag (TLV Flags bit 7) is set (value 1) to
request that the Bundle Offer TLV sent during the
Information Exchange Phase contains bundle payload lengths
for all bundles, rather than only for bundle fragments as
when the L flag is cleared (value 0), when carried in a
Hello TLV with Hello Function SYN or SYNACK. The flag is
ignored for other Hello Function values.
TLV Data
Timer
The Timer field is used to inform the receiver of the timer
value used in the Hello processing of the sender. The
timer specifies the nominal time between periodic Hello
messages. It is a constant for the duration of a session.
The timer field is specified in units of 100 ms and is
encoded as an SDNV.
EID Length
The EID Length field is used to specify the length of the
Sender EID field in octets. If the Endpoint Identifier
(EID) has already been sent at least once in a message with
the current Sender Instance, a node MAY choose to set this
field to zero, omitting the Sender EID from the Hello TLV.
The EID Length is encoded as an SDNV, and the field is thus
of variable length.
<span class="grey">Lindgren, et al. Experimental [Page 46]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-47" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
Sender EID
The Sender EID field specifies the DTN endpoint identifier
(EID) of the sender that is to be used in updating routing
information and making forwarding decisions. If a node has
multiple EIDs, one should be chosen for PRoPHET routing.
This field is of variable length.
<span class="h4"><a class="selflink" id="section-4.3.2" href="#section-4.3.2">4.3.2</a>. Error TLV</span>
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TLV type=0x02 | TLV Flags | TLV Length (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ TLV Data ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 8: Error TLV Format
TLV Flags
For Error TLVs, the TLV Flags field carries an identifier for
the Error TLV type as an 8-bit unsigned integer encoded in
network bit order. A range of values is available for private
and experimental use in addition to the values defined here.
The following Error TLV types are defined:
Dictionary Conflict 0x00
Bad String ID 0x01
Reserved 0x02 - 0x7F
Private/Experimental Use 0x80 - 0xFF
TLV Data
The contents and interpretation of the TLV Data field are
specific to the type of Error TLV. For the Error TLVs defined
in this document, the TLV Data is defined as follows:
Dictionary Conflict
The TLV Data consists of the String ID that is causing the
conflict encoded as an SDNV followed by the EID string that
conflicts with the previously installed value. The
Endpoint Identifier is NOT null terminated. The length of
the EID can be determined by subtracting the length of the
TLV Header and the length of the SDNV containing the String
ID from the TLV Length.
<span class="grey">Lindgren, et al. Experimental [Page 47]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-48" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
Bad String ID
The TLV Data consists of the String ID that is not found in
the dictionary encoded as an SDNV.
<span class="h4"><a class="selflink" id="section-4.3.3" href="#section-4.3.3">4.3.3</a>. Routing Information Base Dictionary TLV</span>
The Routing Information Base Dictionary includes the list of endpoint
identifiers used in making routing decisions. The referents remain
constant for the duration of a session over a link where the instance
numbers remain the same and can be used by both the Routing
Information Base messages and the bundle offer/response messages.
The dictionary is a shared resource (see <a href="#section-3.2.1">Section 3.2.1</a>) built in each
of the paired peers from the contents of one or more incoming TLVs of
this type and from the information used to create outgoing TLVs of
this type.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TLV type=0xA0 | TLV Flags | TLV Length (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| RIBD Entry Count (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ ~
~ Variable-Length Routing Address Strings ~
~ ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ Routing Address String 1 ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| String ID 1 (SDNV) | Length (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ Endpoint Identifier 1 (variable length) ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| . |
~ Routing Address String n . ~
| . |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| String ID n (SDNV) | Length (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Endpoint Identifier n (variable length) ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 9: Routing Information Base Dictionary TLV Format
<span class="grey">Lindgren, et al. Experimental [Page 48]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-49" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
TLV Flags
The encoding of the Header flag field relates to the
capabilities of the source node sending the RIB Dictionary:
Flag 0: Sent by Listener 0b1
Flag 1: Reserved 0b1
Flag 2: Reserved 0b1
Flag 3: Unassigned 0b1
Flag 4: Unassigned 0b1
Flag 5: Unassigned 0b1
Flag 6: Unassigned 0b1
Flag 7: Unassigned 0b1
The "Sent by Listener" flag is set to 0 if this TLV was sent by
a node in the Initiator role and set to 1 if this TLV was sent
by a node in the Listener role (see <a href="#section-3.2">Section 3.2</a> for explanations
of these roles).
TLV Data
RIBD Entry Count
Number of entries in the database. Encoded as SDNV.
String ID
SDNV identifier that is constant for the duration of a
session. String ID zero is predefined as the node that
initiates the session through sending the Hello SYN
message, and String ID one is predefined as the node that
responds with the Hello SYNACK message. These entries do
not need to be sent explicitly as the EIDs are exchanged
during the Hello procedure.
In order to ensure that the String IDs originated by the
two peers do not conflict, the String IDs generated in the
node that sent the Hello SYN message MUST have their least
significant bit set to 0 (i.e., are even numbers), and the
String IDs generated in the node that responded with the
Hello SYNACK message MUST have their least significant bit
set to 1 (i.e., they are odd numbers).
Length
Length of Endpoint Identifier in this entry. Encoded as
SDNV.
Endpoint Identifier
Text string representing the Endpoint Identifier. Note
that it is NOT null terminated as the entry contains the
length of the identifier.
<span class="grey">Lindgren, et al. Experimental [Page 49]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-50" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<span class="h4"><a class="selflink" id="section-4.3.4" href="#section-4.3.4">4.3.4</a>. Routing Information Base TLV</span>
The Routing Information Base lists the destinations (endpoints) a
node knows of and the delivery predictabilities it has associated
with them. This information is needed by the PRoPHET algorithm to
make decisions on routing and forwarding.
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TLV Type=0xA1 | TLV Flags | TLV Length (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| RIB String Count (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| RIBD String ID 1 (SDNV) | P-value |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| RIB Flags 1 | . ~
+-+-+-+-+-+-+-+-+ . ~
~ . ~
~ . ~
~ . ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| RIBD String ID n (SDNV) | P-value |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| RIB Flags n |
+-+-+-+-+-+-+-+-+
Figure 10: Routing Information Base TLV Format
TLV Flags
The encoding of the Header flag field relates to the
capabilities of the Source node sending the RIB:
Flag 0: More RIB TLVs 0b1
Flag 1: Reserved 0b1
Flag 2: Reserved 0b1
Flag 3: Unassigned 0b1
Flag 4: Unassigned 0b1
Flag 5: Unassigned 0b1
Flag 6: Unassigned 0b1
Flag 7: Unassigned 0b1
The "More RIB TLVs" flag is set to 1 if the RIB requires more
TLVs to be sent in order to be fully transferred. This flag is
set to 0 if this is the final TLV of this RIB.
<span class="grey">Lindgren, et al. Experimental [Page 50]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-51" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
TLV Data
RIB String Count
Number of routing entries in the TLV. Encoded as an SDNV.
RIBD String ID
String ID of the endpoint identifier of the destination for
which this entry specifies the delivery predictability as
predefined in a dictionary TLV. Encoded as an SDNV.
P-value
Delivery predictability for the destination of this entry
as calculated from previous encounters according to the
equations in <a href="#section-2.1.2">Section 2.1.2</a>, encoded as a 16-bit unsigned
integer. The encoding of this field is a linear mapping
from [0,1] to [0, 0xFFFF] (e.g., for a P-value of 0.75, the
mapping would be 0.75*65535=49151=0xBFFF; thus, the P-value
would be encoded as 0xBFFF).
RIB Flag
The encoding of the 8-bit RIB Flag field is:
Flag 0: Unassigned 0b1
Flag 1: Unassigned 0b1
Flag 2: Unassigned 0b1
Flag 3: Unassigned 0b1
Flag 4: Unassigned 0b1
Flag 5: Unassigned 0b1
Flag 6: Unassigned 0b1
Flag 7: Unassigned 0b1
<span class="h4"><a class="selflink" id="section-4.3.5" href="#section-4.3.5">4.3.5</a>. Bundle Offer and Response TLVs (Version 2)</span>
After the routing information has been passed, the node will ask the
other node to review available bundles and determine which bundles it
will accept for relay. The source relay will determine which bundles
to offer based on relative delivery predictabilities as explained in
<a href="#section-3.6">Section 3.6</a>.
Note: The original versions of these TLVs (TLV Types 0xA2 and
0xA3) used in version 1 of the PRoPHET protocol have been
deprecated, as they did not contain the complete information
needed to uniquely identify bundles and could not handle bundle
fragments.
Depending on the bundles stored in the offering node, the Bundle
Offer TLV might contain descriptions of both complete bundles and
bundle fragments. In order to correctly identify bundle fragments, a
<span class="grey">Lindgren, et al. Experimental [Page 51]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-52" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
bundle fragment descriptor MUST contain the offset of the payload
fragment in the bundle payload and the length of the payload
fragment. If requested by the receiving node by setting the L flag
in the SYN or SYNACK message during the neighbor awareness phase, the
offering node MUST include the length of the payload in the
descriptor for complete bundles. The appropriate flags MUST be set
in the B_flags for the descriptor to indicate if the descriptor
contains the payload length field (set for fragments in all cases and
for complete bundles if the L flag was set) and if the descriptor
contains a payload offset field (fragments only).
The Bundle Offer TLV also lists the bundles for which a PRoPHET
acknowledgement has been issued. Those bundles have the PRoPHET ACK
flag set in their entry in the list. When a node receives a PRoPHET
ACK for a bundle, it SHOULD, if possible, signal to the bundle
protocol agent that this bundle is no longer required for
transmission by PRoPHET. Despite no longer transmitting the bundle,
it SHOULD keep an entry for the acknowledged bundle to be able to
further propagate the PRoPHET ACK.
The Response TLV format is identical to the Offer TLV with the
exception of the TLV Type field. Bundles that are being accepted
from the corresponding Offer are explicitly marked with a B_flag.
Specifications for bundles that are not being accepted MAY either be
omitted or left in but not marked as accepted. The payload length
field MAY be omitted for complete bundles in the Response message
even if it was included in the Offer message. The B_flags payload
length flag MUST be set correctly to indicate if the length field is
included or not. The Response message MUST include both payload
offset and payload length fields for bundle fragments, and the
B_flags MUST be set to indicate that both are present.
<span class="grey">Lindgren, et al. Experimental [Page 52]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-53" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TLV Type | TLV Flags | TLV Length (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Bundle Offer Count (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| B_flags | Bundle Source | Bundle Destination |
| | String ID 1 (SDNV) | String ID 1 (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Bundle 1 Creation Timestamp Time |
| (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Bundle 1 Creation Timestamp Sequence Number |
| (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Bundle 1 Payload Offset - only present if bundle is a fragment|
| (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Bundle 1 Payload Length - only present if bundle is a fragment|
| or transmission of length requested (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~ . ~
~ . ~
~ . ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| B_flags | Bundle Source | Bundle Destination |
| | String ID n (SDNV) | String ID n (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Bundle n Creation Timestamp Time |
| (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Bundle n Creation Timestamp Sequence Number |
| (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Bundle n Payload Offset - only present if bundle is a fragment|
| (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Bundle n Payload Length - only present if bundle is a fragment|
| or transmission of length requested (SDNV) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 11: Bundle Offer and Response TLV Format
<span class="grey">Lindgren, et al. Experimental [Page 53]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-54" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
TLV Type
The TLV Type for a Bundle Offer is 0xA4. The TLV Type for a
Bundle Response is 0xA5.
TLV Flags
The encoding of the Header flag field relates to the
capabilities of the source node sending the RIB:
Flag 0: More Offer/Response
TLVs Following 0b1
Flag 1: Unassigned 0b1
Flag 2: Unassigned 0b1
Flag 3: Unassigned 0b1
Flag 4: Unassigned 0b1
Flag 5: Unassigned 0b1
Flag 6: Unassigned 0b1
Flag 7: Unassigned 0b1
If the Bundle Offers or Bundle Responses are divided between
several TLVs, the "More Offer/Response TLVs Following" flag MUST
be set to 1 in all but the last TLV in the sequence where it
MUST be set to 0.
TLV Data
Bundle Offer Count
Number of bundle offer/response entries. Encoded as an
SDNV. Note that 0 is an acceptable value. In particular,
a Bundle Response TLV with 0 entries is used to signal that
a cycle of information exchange and bundle passing is
completed.
B Flags
The encoding of the B Flags is:
Flag 0: Bundle Accepted 0b1
Flag 1: Bundle is a Fragment 0b1
Flag 2: Bundle Payload Length
included in TLV 0b1
Flag 3: Unassigned 0b1
Flag 4: Unassigned 0b1
Flag 5: Unassigned 0b1
Flag 6: Unassigned 0b1
Flag 7: PRoPHET ACK 0b1
Bundle Source String ID
String ID of the source EID of the bundle as predefined in
a dictionary TLV. Encoded as an SDNV.
<span class="grey">Lindgren, et al. Experimental [Page 54]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-55" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
Bundle Destination String ID
String ID of the destination EID of the bundle as
predefined in a dictionary TLV. Encoded as an SDNV.
Bundle Creation Timestamp Time
Time component of the Bundle Creation Timestamp for the
bundle. Encoded as an SDNV.
Bundle Creation Timestamp Sequence Number
Sequence Number component of the Bundle Creation Timestamp
for the bundle. Encoded as an SDNV.
Bundle Payload Offset
Only included if the bundle is a fragment and the fragment
bit is set (value 1) in the bundle B Flags. Offset of the
start of the fragment payload in the complete bundle
payload. Encoded as an SDNV.
Bundle Payload Length
Only included if the bundle length included bit is set
(value 1) in the bundle B Flags. Length of the payload in
the bundle specified. This is either the total payload
length if the bundle is a complete bundle or the bundle
fragment payload length if the bundle is a fragment.
Encoded as an SDNV.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Detailed Operation</span>
In this section, some more details on the operation of PRoPHET are
given along with state tables to help in implementing the protocol.
As explained in <a href="#section-1.2">Section 1.2</a>, it is RECOMMENDED that "Success"
responses should not be requested or sent when operating over a
reliable, in-order transport protocol such as TCP. If in the future
PRoPHET were operated over an unreliable transport protocol, positive
acknowledgements would be necessary to signal successful delivery of
(sub)messages. In this section, the phrase "send a message" should
be read as *successful* sending of a message, signaled by receipt of
the appropriate "Success" response if running over an unreliable
protocol, but guaranteed by TCP or another reliable protocol
otherwise. Hence, the state descriptions below do not explicitly
mention positive acknowledgements, whether they are being sent or
not.
<span class="grey">Lindgren, et al. Experimental [Page 55]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-56" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>. High-Level State Tables</span>
This section gives high-level state tables for the operation of
PRoPHET. The following sections will describe each part of the
operation in more detail (including state tables for the internal
states of those procedures).
The following main or high-level states are used in the state tables:
WAIT_NB This is the state all nodes start in. Nodes remain in this
state until they are notified that a new neighbor is available.
At that point, the Hello procedure should be started with the
new neighbor, and the node transitions into the HELLO state.
Nodes SHOULD be able to handle multiple neighbors in parallel,
maintaining separate state machines for each neighbor. This
could be handled by creating a new thread or process during the
transition to the HELLO state that then takes care of the
communication with the new neighbor while the parent remains in
state WAIT_NB waiting for additional neighbors to communicate.
In this case, when the neighbor can no longer be communicated
with (described as "Neighbor Gone" in the tables below), the
thread or process created is destroyed and, when a connection-
oriented protocol is being used to communicate with the
neighbor, the connection is closed. The current version of the
protocol is specified to use TCP for neighbor connections so
that these will be closed when the neighbor is no longer
accessible.
HELLO Nodes are in the HELLO state from when a new neighbor is
detected until the Hello procedure is completed and a link is
established (which happens when the Hello procedure enters the
ESTAB state as described in <a href="#section-5.2">Section 5.2</a>; during this procedure,
the states ESTAB, SYNSENT, and SYNRCVD will be used, but these
are internal to the Hello procedure and are not listed here).
If the node is notified that the neighbor is no longer in range
before a link has been established, it returns to the WAIT_NB
state, and, if appropriate, any additional process or thread
created to handle the neighbor MAY be destroyed.
INFO_EXCH After a link has been set up by the Hello procedure, the
node transitions to the INFO_EXCH state in which the
Information Exchange Phase is done. The node remains in this
state as long as Information Exchange Phase TLVs (Routing RIB,
Routing RIB Dictionary, Bundle Offer, Bundle Response) are
being received. If the node is notified that the neighbor is
no longer in range before all information and bundles have been
exchanged, any associated connection is closed and the node
<span class="grey">Lindgren, et al. Experimental [Page 56]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-57" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
returns to the WAIT_NB state to await new neighbors. The
Timer(keep_alive) is used to ensure that the connection remains
active.
In the INFO_EXCH state, the nodes at both ends of the
established link are able to update their delivery
predictability information using data from the connected peer
and then make offers of bundles for exchange which may be
accepted or not by the peer. To manage these processes, each
node acts both as an Initiator and a Listener for the
Information Exchange Phase processes, maintaining subsidiary
state machines for the two roles. The Initiator and Listener
terms refer to the sending of the Routing RIB information: it
is perhaps counterintuitive that the Listener becomes the
bundle offeror and the Initiator the bundle acceptor during the
bundling passing part.
The protocol is designed so that the two exchanges MAY be
carried out independently but concurrently, with the messages
multiplexed onto on a single bidirectional link (such as is
provided by the TCP connection). Alternatively, the exchanges
MAY be carried out partially or wholly sequentially if
appropriate for the implementation. The Information Exchange
Phase is explained in more detail in <a href="#section-3.2">Section 3.2</a>.
When an empty Bundle Response TLV (i.e., no more bundles to
send) is received, the node starts the Timer(next_exchange).
When this timer expires, assuming that the neighbor is still
connected, the Initiator reruns the Information Exchange Phase.
If there is only one neighbor connected at this time, this will
have the effect of further increasing the delivery
predictability for this node in the neighbor, and changing the
delivery predictabilities as a result of the transitive
property (Equation 3). If there is more than one neighbor
connected or other communication opportunities have happened
since the previous information exchange occurred, then the
changes resulting from these other encounters will be passed on
to the connected neighbor. The next_exchange timer is
restarted once the information exchange has completed again.
If one or more new bundles are received by this node while
waiting for the Timer(next_exchange) to expire and the delivery
predictabilities indicate that it would be appropriate to
forward some or all of the bundles to the connected node, the
bundles SHOULD be immediately offered to the connected neighbor
and transferred if accepted.
<span class="grey">Lindgren, et al. Experimental [Page 57]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-58" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
State: WAIT_NB
+==================================================================+
| Condition | Action | New State |
+==================+===================================+===========+
| New Neighbor | Start Hello procedure for neighbor| HELLO |
| | Keep waiting for more neighbors | WAIT_NB |
+==================================================================+
State: HELLO
+==================================================================+
| Condition | Action | New State |
+==================+===================================+===========+
| Hello TLV rcvd | | HELLO |
+------------------+-----------------------------------+-----------+
| Enter ESTAB state| Start Information Exchange Phase | INFO_EXCH |
+------------------+-----------------------------------+-----------+
| Neighbor Gone | | WAIT_NB |
+==================================================================+
State: INFO_EXCH
+==================================================================+
| Condition | Action | New State |
+==================+===================================+===========+
| On entry | Start Timer(keep-alive) | |
| | Uses Hello Timer interval | INFO_EXCH |
+------------------+-----------------------------------+-----------+
|Info Exch TLV rcvd| (processed by subsidiary state | |
| | machines) | INFO_EXCH |
+------------------+-----------------------------------+-----------+
| No more bundles | Start Timer(next_exchange) | INFO_EXCH |
+------------------+-----------------------------------+-----------+
| Keep-alive expiry| Send Hello SYN message | INFO_EXCH |
+------------------+-----------------------------------+-----------+
| Hello SYN rcvd | Record reception | |
| | Restart Timer(keep-alive) | INFO_EXCH |
+------------------+-----------------------------------+-----------+
| Neighbor Gone | | WAIT_NB |
+==================================================================+
<span class="grey">Lindgren, et al. Experimental [Page 58]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-59" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
The keep-alive messages (messages with Hello SYN TLV) are processed
by the high-level state machine in the INFO_EXCH state. All other
messages are delegated to the subsidiary state machines of the
Information Exchange Phase described in <a href="#section-5.3">Section 5.3</a>. The receipt of
keep-alive messages is recorded and may be used by the subsidiary
machines to check if the peer is still functioning. The connection
will be aborted (as described in <a href="#section-4.3.1">Section 4.3.1</a>) if several keep-alive
messages are not received.
<span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a>. Hello Procedure</span>
The Hello procedure is described by the following rules and state
tables. In this section, the messages sent consist of the PRoPHET
header and a single Hello TLV (see Figure 4 and <a href="#section-4.3.1">Section 4.3.1</a>) with
the HF (Hello Function) field set to the specified value (SYN,
SYNACK, ACK or RSTACK).
The state of the L flag in the latest SYN or SYNACK message is
recorded in the node that receives the message. If the L flag is set
(value 1), the receiving node MUST send the payload length for each
bundle that it offers to the peer during the Information Exchange
Phase.
The rules and state tables use the following operations:
o The "Update Peer Verifier" operation is defined as storing the
values of the Sender Instance and Sender Local Address fields from
a Hello SYN or Hello SYNACK function message received from the
entity at the far end of the link.
o The procedure "Reset the link" is defined as:
When using TCP or other reliable connection-oriented transport:
Close the connection and terminate any separate thread or
process managing the connection.
Otherwise:
1. Generate a new instance number for the link.
2. Delete the peer verifier (set to zero the values of
Sender Instance and Sender Local Address previously
stored by the Update Peer Verifier operation).
3. Send a SYN message.
4. Transition to the SYNSENT state.
<span class="grey">Lindgren, et al. Experimental [Page 59]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-60" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
o The state tables use the following Boolean terms and operators:
A The Sender Instance in the incoming message matches the value
stored from a previous message by the "Update Peer Verifier"
operation.
B The Sender Instance and Sender Local Address fields in the
incoming message match the values stored from a previous
message by the "Update Peer Verifier" operation.
C The Receiver Instance and Receiver Local Address fields in
the incoming message match the values of the Sender Instance
and Sender Local Address used in outgoing Hello SYN, Hello
SYNACK, and Hello ACK messages.
SYN A Hello SYN message has been received.
SYNACK A Hello SYNACK message has been received.
ACK A Hello ACK message has been received.
&& Represents the logical AND operation
|| Represents the logical OR operation
! Represents the logical negation (NOT) operation.
o A timer is required for the periodic generation of Hello SYN,
Hello SYNACK, and Hello ACK messages. The value of the timer is
announced in the Timer field. To avoid synchronization effects,
uniformly distributed random jitter of +/-5% of the Timer field
SHOULD be added to the actual interval used for the timer.
There are two independent events: the timer expires, and a packet
arrives. The processing rules for these events are:
Timer Expires: Reset Timer
If state = SYNSENT Send SYN message
If state = SYNRCVD Send SYNACK message
If state = ESTAB Send ACK message
<span class="grey">Lindgren, et al. Experimental [Page 60]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-61" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
Packet Arrives:
If incoming message is an RSTACK message:
If (A && C && !SYNSENT) Reset the link
Else discard the message.
If incoming message is a SYN, SYNACK, or ACK message:
Response defined by the following State Tables.
If incoming message is any other PRoPHET TLV and
state != ESTAB:
Discard incoming message.
If state = SYNSENT Send SYN message(Note 1)
If state = SYNRCVD Send SYNACK message(Note 1)
Note 1: No more than two SYN or SYNACK messages should be
sent within any time period of length defined by the timer.
o A connection across a link is considered to be achieved when the
protocol reaches the ESTAB state. All TLVs, other than Hello
TLVs, that are received before synchronization is achieved will be
discarded.
<span class="h4"><a class="selflink" id="section-5.2.1" href="#section-5.2.1">5.2.1</a>. Hello Procedure State Tables</span>
State: SYNSENT
+==================================================================+
| Condition | Action | New State |
+==================+===================================+===========+
| SYNACK && C | Update Peer Verifier; | ESTAB |
| | Send ACK message | |
+------------------+-----------------------------------+-----------+
| SYNACK && !C | Send RSTACK message | SYNSENT |
+------------------+-----------------------------------+-----------+
| SYN | Update Peer Verifier; | SYNRCVD |
| | Send SYNACK message | |
+------------------+-----------------------------------+-----------+
| ACK | Send RSTACK message | SYNSENT |
+==================================================================+
<span class="grey">Lindgren, et al. Experimental [Page 61]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-62" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
State: SYNRCVD
+==================================================================+
| Condition | Action | New State |
+==================+===================================+===========+
| SYNACK && C | Update Peer Verifier; | ESTAB |
| | Send ACK message | |
+------------------+-----------------------------------+-----------+
| SYNACK && !C | Send RSTACK message | SYNRCVD |
+------------------+-----------------------------------+-----------+
| SYN | Update Peer Verifier; | SYNRCVD |
| | Send SYNACK message | |
+------------------+-----------------------------------+-----------+
| ACK && B && C | Send ACK message | ESTAB |
+------------------+-----------------------------------+-----------+
| ACK && !(B && C) | Send RSTACK message | SYNRCVD |
+==================================================================+
State: ESTAB
+==================================================================+
| Condition | Action | New State |
+=================+====================================+===========+
| SYN || SYNACK | Send ACK message (notes 2 and 3) | ESTAB |
+-----------------+------------------------------------+-----------+
| ACK && B && C | Send ACK message (note 3) | ESTAB |
+-----------------+------------------------------------+-----------+
| ACK && !(B && C)| Send RSTACK message | ESTAB |
+==================================================================+
Note 2: No more than two ACK messages should be sent within any
time period of length defined by the timer. Thus, one ACK message
MUST be sent every time the timer expires. In addition, one
further ACK message may be sent between timer expirations if the
incoming message is a SYN or SYNACK. This additional ACK allows
the Hello functions to reach synchronization more quickly.
Note 3: No more than one ACK message should be sent within any
time period of length defined by the timer.
<span class="h3"><a class="selflink" id="section-5.3" href="#section-5.3">5.3</a>. Information Exchange Phase</span>
After the Hello messages have been exchanged, and the nodes are in
the ESTAB state, the Information Exchange Phase, consisting of the
RIB Exchange and Bundle Passing Sub-Phases, is initiated. This
section describes the procedure and shows the state transitions
<span class="grey">Lindgren, et al. Experimental [Page 62]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-63" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
necessary in these sub-phases; the following sections describe in
detail the various TLVs passed in these phases. On reaching the
ESTAB state in the high-level HELLO state, there is an automatic
transition to the INFO_EXCH high-level state.
PRoPHET runs over a bidirectional transport as documented in
<a href="#section-1.2">Section 1.2</a> so that when a pair of nodes (A and B) have reached the
ESTAB state, they are able to perform the Information Exchange Phase
processes for both the A-to-B and B-to-A directions over the link
that has just been established. In principle, these two processes
are independent of each other and can be performed concurrently.
However, complete concurrency may not be the most efficient way to
implement the complete process. As explained in <a href="#section-3.2.1">Section 3.2.1</a>, the
Routing Information Base Dictionary is a shared resource assembled
from a combination of information generated locally on each node and
information passed from the peer node. Overlaps in this information,
and hence the amount of information that has to be passed between the
nodes, can be minimized by sequential rather than concurrent
operation of the dictionary generation and update processes. It may
also be possible to reduce the number of bundles that need to be
offered by the second offeror by examining the offers received from
the first offeror -- there is no need for the second offeror to offer
a bundle that is already present in the first offeror's offer list,
as it will inevitably be refused.
All implementations MUST be capable of operating in a fully
concurrent manner. Each implementation needs to define a policy,
which SHOULD be configurable, as to whether it will operate in a
concurrent or sequential manner during the Information Exchange
Phase. If it is to operate sequentially, then further choices can be
made as to whether to interleave dictionary, offer, and response
exchange parts, or to complete all parts in one direction before
initiating the other direction.
Sequential operation will generally minimize the amount of data
transferred across the PRoPHET link and is especially appropriate if
the link is half-duplex. However it is probably not desirable to
postpone starting the information exchange in the second direction
until the exchange of bundles has completed. If the contact between
the nodes ends before all possible bundles have been exchanged, it is
possible that postponing the start of bundle exchange in the second
direction can lead to bundle exchange being skewed in favor of one
direction over the other. It may be preferable to share the
available contact time and bandwidth between directions by
overlapping the Information Exchange Phases and running the actual
bundle exchanges concurrently if possible. Also, if encounters
expected in the current PRoPHET zone are expected to be relatively
short, it MAY not be appropriate to use sequential operation.
<span class="grey">Lindgren, et al. Experimental [Page 63]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-64" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
One possible interleaving strategy is to alternate between sending
from the two nodes. For example, if the Hello SYN node sends its
initial dictionary entries while the Hello SYNACK node waits until
this is complete, the Hello SYNACK node can then prune its proposed
dictionary entries before sending in order to avoid duplication.
This approach can be repeated for the second tranche of dictionary
entries needed for the Bundle Offers and Responses, and also for the
Bundle Offers, where any bundles that are offered by the Hello SYN
node that are already present in the Hello SYNACK node need not be
offered to the Hello SYN node. This approach is well suited to a
transport protocol and physical medium that is effectively half-
duplex.
At present, the decision to operate concurrently or sequentially is
purely a matter of local policy in each node. If nodes have
inconsistent policies, the behavior at each encounter will depend on
which node takes the SYN role; this is a matter of chance depending
on random timing of the start of communications during the encounter.
To manage the information transfer, two subsidiary state machines are
created in each node to control the stages of the RIB Exchange Sub-
Phase and Bundle Passing Sub-Phase processes within the INFO_EXCH
high-level state as shown in Figure 12. Each subsidiary state
machine consists of two essentially independent components known as
the "Initiator role" and the "Listener role". One of these
components is instantiated in each node. The Initiator role starts
the Information Exchange Phase in each node and the Listener role
responds to the initial messages, but it is not a passive listener as
it also originates messages. The transition from the ESTAB state is
a "forking" transition in that it starts both subsidiary state
machines. The two subsidiary state machines operate in parallel for
as long as the neighbor remains in range and connected.
<span class="grey">Lindgren, et al. Experimental [Page 64]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-65" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
+ - - - - - - - - + + - - - - - - - - +
| SYN node | PRoPHET messages with: | SYNACK node |
| +-------------+ | A. Delivery Predictabilities | +-------------+ |
| Subsidiary |--->---->---->---->---->---->---->| Subsidiary |
| | State | | C. Bundle Responses | | State | |
| Machine 1: | | Machine 1: |
| | Initiator | | B. Bundle Offers | | Listener | |
| Role |<----<----<----<----<----<----<---| Role |
| +-------------+ | D. Requested Bundles | +-------------+ |
| +-------------+ | A. Delivery Predictabilities | +-------------+ |
| Subsidiary |<----<----<----<----<----<----<---| Subsidiary |
| | State | | C. Bundle Responses | | State | |
| Machine 2: | | Machine 2: |
| | Listener | | B. Bundle Offers | | Initiator | |
| Role |--->---->---->---->---->---->---->| Role |
| +-------------+ | D. Requested Bundles | +-------------+ |
+ - - - - - - - - + + - - - - - - - - +
The letters (A - D) indicate the sequencing of messages.
Figure 12: Information Exchange Phase Subsidiary State Machines
These subsidiary state machines can be thought of as mirror images:
for each state machine, one node takes on the Initiator role while
the other node takes on the Listener role. TLVs sent by a node from
the Initiator role will be processed by the peer node in the Listener
role and vice versa. As indicated in Figure 12, the Initiator role
handles sending that node's current set of delivery predictabilities
for known destinations to the Listener role node. The Listener role
node uses the supplied values to update its delivery predictabilities
according to the update algorithms described in <a href="#section-2.1.2">Section 2.1.2</a>. It
then decides which bundles that it has in store should be offered for
transfer to the Initiator role node as a result of comparing the
local predictabilities and those supplied by the Initiator node.
When these offers are delivered to the Initiator role node, it
decides which ones to accept and supplies the Listener role node with
a prioritized list of bundles that it wishes to accept. The Listener
role node then sends the requested bundles.
These exchanges are repeated periodically for as long as the nodes
remain in contact. Additionally, if new bundles arrive from other
sources, they may be offered, accepted, and sent in between these
exchanges.
<span class="grey">Lindgren, et al. Experimental [Page 65]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-66" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
The PRoPHET protocol is designed so that in most cases the TLV type
determines the role in which it will be processed on reception. The
only exception to this is that both roles may send RIB Dictionary
TLVs: the Initiator role sends dictionary entries for use in the
subsequent RIB TLV(s), and the Listener role may send additional
dictionary entries for use in subsequent Bundle Offer TLVs. The two
cases are distinguished by a TLV flag to ensure that they are
processed in the right role context on reception. If this flag was
not provided, there are states where both roles could accept the RIB
Dictionary TLV, making it impossible to ensure that the correct role
state machine accepts the RIB Dictionary TLV. Note that the correct
updates would be made to the dictionary whichever role processed the
TLV and that the ambiguity would not arise if the roles are adopted
completely sequentially, i.e., if the RIB Exchange Sub-Phase and
associated Bundle Passing Sub-Phase run to completion in one
direction before the process for the reverse direction is started.
If sequential operation is selected, the node that sent the Hello SYN
function message MUST be the node that sends the first message in the
Information Exchange Phase process. This ensures that there is a
well-defined order of events with the Initiator role in the Hello SYN
node (i.e., the node identified by String ID 0) starting first. The
Hello SYNACK node MAY then postpone sending its first message until
the Listener role state machine in the Hello SYNACK node has reached
any of a number of points in its state progression according to
locally configured policy and the nature of the physical link for the
current encounter between the nodes as described above. If
concurrent operation is selected, the Hello SYNACK node can start
sending messages immediately without waiting to receive messages from
the peer.
The original design of the PRoPHET protocol allowed it to operate
over unreliable datagram-type transports as well as the reliable, in-
order delivery transport of TCP that is currently specified. When
running over TCP, protocol errors and repeated timeouts during the
Information Exchange Phase SHOULD result in the connection being
terminated.
<span class="h4"><a class="selflink" id="section-5.3.1" href="#section-5.3.1">5.3.1</a>. State Definitions for the Initiator Role</span>
The state machine component with the Initiator role in each node
starts the transfer of information from one node to its peer during
the Information Exchange Phase. The process from the Initiator's
point of view does the following:
o The Initiator role determines the set of delivery predictabilities
to be sent to the peer node and sends RIB dictionary entries
necessary to interpret the set of RIB predictability values that
<span class="grey">Lindgren, et al. Experimental [Page 66]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-67" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
are sent after the dictionary updates. On second and subsequent
executions of this state machine during a single session with the
same peer, there may be no RIB Dictionary entries to send. Either
an empty TLV can be sent or the TLV can be omitted.
o The Initiator then waits to receive any RIB Dictionary updates
followed by bundle offers from the Listener role on the peer node.
o The Initiator determines which of the bundle offers should be
accepted and, if necessary, reorders the offers to suit its own
priorities. The possibly reordered list of accepted bundles is
sent to the peer node using one or more bundle responses.
o The peer then sends the accepted bundles to the Initiator in turn.
o Assuming that the link remains open during the bundle sending
process, the Initiator signals that the Bundle Passing Sub-Phase
is complete by sending a message with an empty Bundle Response TLV
(i.e, with the Bundle Offer Count set to 0 and no bundle offers
following the TLV header).
o When the bundle transfer is complete, the Initiator starts the
Timer(next_exchange). Assuming that the connection to the
neighbor remains open, when the timer expires, the Initiator
restarts the Information Exchange Phase. During this period,
Hello SYN messages are exchanged as keep-alives to check that the
neighbor is still present. The keep-alive mechanism is common to
the Initiator and Listener machines and is handled in the high-
level state machine (see <a href="#section-5.1">Section 5.1</a>.
A timer is provided that restarts the Initiator role state machine if
Bundle Offers are not received after sending the RIB. If this node
receives a Hello ACK message containing an Error TLV indicating there
has been a protocol problem, then the connection MUST be terminated.
The following states are used:
CREATE_DR
The initial transition to this state from the ESTAB state is
immediate and automatic for the node that sent the Hello SYN
message. For the peer (Hello SYNACK sender) node, it may be
immediate for nodes implementing a fully concurrent process or may
be postponed until the corresponding Listener has reached a
specified state if a sequential process is configured in the node
policy.
<span class="grey">Lindgren, et al. Experimental [Page 67]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-68" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
The local dictionary is initialized when this state is entered for
the first time from the ESTAB state. The initial state of the
dictionary contains two entries: the EID of the node that sent the
Hello SYN (String ID 0) and the EID of the node that sent the
Hello SYNACK (String ID 1). If the peer reports via a Hello ACK
message containing an Error TLV reporting a Dictionary Conflict or
Bad String ID error, then the connection MUST be terminated.
The CREATE_DR state will be entered in the same way from the
REQUEST state when the Timer(next_exchange) expires, signaling the
start of a new round of information exchange and bundle passing.
When in this state:
* Determine the destination EIDs for which delivery
predictabilities will be sent to the peer in a RIB TLV, if any.
Record the prior state of the local dictionary (assuming that
String IDs are numbers allocated sequentially, the state
information needed is just the highest ID used before this
process started) so that the process can be restarted if
necessary. Update the local dictionary if any new EIDS are
required; format one or more RIB Dictionary TLVs and one or
more RIB TLVs and send them to the peer. If there are no
dictionary entries to send, TLVs with zero entries MAY be sent,
or the TLV can be omitted, but an empty RIB TLV MUST be sent if
there is no data to send. The RIB Dictionary TLVs generated
here MUST have the Sent by Listener flag set to 0 to indicate
that they were sent by the Initiator.
* If an Error TLV indicating a Dictionary Conflict or
Bad String ID is received during or after sending the RIB
Dictionary TLVs and/or the RIB TLVs, abort any in-progress
Initiator or Listener process, and terminate the connection to
the peer.
* Start a timer (known as Timer(info)) and transition to the
SEND_DR state.
Note that when (and only when) running over a transport protocol
such as TCP, both the RIB Dictionary and RIB information MAY be
spread across multiple TLVs and messages if required by known
constraints of the transport protocol or to reduce the size of
memory buffers. Alternatively, the information can be formatted
using a single RIB Dictionary TLV and a single RIB TLV. These
TLVs may be quite large, so it may be necessary to segment the
message either using the PRoPHET submessage capability or, if the
transport protocol has appropriate capabilities, using those
inherent capabilities. This discussion of segmentation applies to
<span class="grey">Lindgren, et al. Experimental [Page 68]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-69" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
the other states and the bundle offer and bundle response messages
and will not be repeated.
If more than one RIB TLV is to be used, all but the last one have
the "More RIB TLVs" flag set to 1 in the TLV flags. It is not
necessary to distinguish the last RIB Dictionary TLV because the
actions taken at the receiver are essentially passive (recording
the contents), and the sequence is ended by the sending of the
first RIB TLV.
SEND_DR
In this state, the Initiator node expects to be receiving Bundle
Offers and sending Bundle Responses. The Initiator node builds a
list of bundles offered by the peer while in this state:
* Clear the set of bundles offered by the peer on entry to the
state.
* If the Timer(info) expires, re-send the RIB Dictionary and RIB
information sent in the previous CREATE_DR state using the
stored state to re-create the information. The RIB dictionary
update process in the peer is idempotent provided that the
mappings between the EID and the String ID in the re-sent RIB
Dictionary TLVs are the same as in the original. This means
that it does not matter if some of the RIB Dictionary TLVs had
already been processed in the peer. Similarly, re-sending RIB
TLVs will not cause a problem.
* If a message with a RIB Dictionary TLV marked as sent by a
Listener is received, update the local dictionary based on the
received TLV. If any of the entries in the RIB Dictionary TLV
conflict with existing entries (i.e., an entry is received that
uses the same String ID as some previously received entry but
the EID in the entry is different), send a Response message
with an Error TLV containing a Dictionary Conflict indicator,
abort any in-progress Initiator or Listener process, and
terminate the connection to the peer. Note that in some
circumstances no dictionary updates are needed, and the first
message received in this state will carry a Bundle Offer TLV.
* If a message with a Bundle Offer TLV is received, restart the
Timer(info) if the "More Offer/Response TLVs Following" flag is
set in the TLV; otherwise, stop the Timer(info). Then process
any PRoPHET ACKs in the TLV by informing the bundle protocol
agent, and add the bundles offered in the TLV to the set of
bundles offered. If the "More Offer/Response TLVs Following"
flag is set in the TLV, wait for further Bundle Offer TLVs. If
a Bundle Offer TLV is received with a String ID that is not in
<span class="grey">Lindgren, et al. Experimental [Page 69]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-70" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
the dictionary, send a message with an Error TLV containing a
Bad String ID indicator, abort any in-progress Initiator or
Listener process, and terminate the connection to the peer.
* If the "More Offer/Response TLVs Following" flag is clear in
the last Bundle Offer TLV received, inspect the set of bundles
offered to determine the set of bundles that are to be accepted
using the configured queueing policy. Record the set of
bundles accepted so that reception can be checked in the Bundle
Passing Sub-Phase. Format one or more Bundle Response TLVs
flagging the accepted offers and send them to the peer. If
more than one Bundle Response TLV is sent, all but the last one
should have the "More Offer/Response TLVs Following" flag set
to 1. At least one Bundle Response TLV MUST be sent even if
the node does not wish to accept any of the offers. In this
case, the Bundle Response TLV contains an empty set of
acceptances.
* If an Error TLV indicating a Bad String ID is received during
or after sending the Bundle Response TLVs, abort any in-
progress Initiator or Listener process, re-initialize the local
dictionary, and terminate the connection to the peer.
* Restart the Timer(info) timer in case the peer does not start
sending the requested bundles.
* Transition to state REQUEST.
REQUEST
In this state, the Initiator node expects to be receiving the
bundles accepted in the Bundle Response TLV(s):
* Keep track of the bundles received and delete them from the set
of bundles accepted.
* If the Timer(info) expires while waiting for bundles, format
and send one or more Bundle Response TLVs listing the bundles
previously accepted but not yet received. If more than one
Bundle Response TLV is sent, all but the last one should have
the "More Offer/Response TLVs Following" flag set to 1.
* If an Error TLV indicating a Bad String ID is received during
or after sending the Bundle Response TLVs, abort any in-
progress Initiator or Listener process, re-initialize the local
dictionary, and terminate the connection to the peer.
* Restart the Timer(info) timer after each bundle is received in
case the peer does not continue sending the requested bundles.
<span class="grey">Lindgren, et al. Experimental [Page 70]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-71" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
* When all the requested bundles have been received, format a
Bundle Response TLV with the Bundle Offer Count set to zero and
with the "More Offer/Response TLVs Following" flag cleared to 0
to signal completion to the peer node. Also, signal the
Listener in this node that the Initiator has completed. If the
peer node is using a sequential policy, the Listener may still
be in the initial state, in which case, it needs to start a
timer to ensure that it detects if the peer fails to start the
Initiator state machine. Thereafter, coordinate with the
Listener state machine in the same node: when the Listener has
received the completion notification from the peer node and
this Initiator has sent its completion notification, start
Timer(next_exchange).
* If the Timer(next_exchange) expires, transition to state
CREATE_DR to restart the Information Exchange Phase.
Note that if Timer(info) timeout occurs a number of times
(configurable, typically 3) without any bundles being received,
then this SHOULD generally be interpreted as the problem that the
link to the peer is no longer functional and the session should be
terminated. However, some bundles may be very large and take a
long time to transmit. Before terminating the session, this state
machine needs to check if a large bundle is actually being
received although no new completed bundles have been received
since the last expiry of the timer. In this case the timer should
be restarted without sending the Bundle Response TLV. Also, if
the bundles are being exchanged over a transport protocol that can
detect link failure, then the session MUST be terminated if the
bundle exchange link is shut down because it has failed.
<span class="h4"><a class="selflink" id="section-5.3.2" href="#section-5.3.2">5.3.2</a>. State Definitions for the Listener Role</span>
The state machine component with the Listener role in each node
initially waits to receive a RIB Dictionary update followed by a set
of RIB delivery predictabilities during the Information Exchange
Phase. The process from the point of view of the Listener does the
following:
o Receive RIB Dictionary updates and RIB values from the peer. Note
that in some circumstances no dictionary updates are needed, and
the RIBD TLV will contain no entries or may be omitted completely.
o When all RIB messages have been received, the delivery
predictability update algorithms are run (see <a href="#section-2.1.2">Section 2.1.2</a>) using
the values received from the Initiator node and applying any of
the optional optimizations configured for this node (see
<a href="#section-2.1.3">Section 2.1.3</a>).
<span class="grey">Lindgren, et al. Experimental [Page 71]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-72" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
o Using the updated delivery predictabilities and the queueing
policy and forwarding strategy configured for this node (see
<a href="#section-2.1.4">Section 2.1.4</a>) examine the set of bundles currently stored in the
Listener node to determine the set of bundles to be offered to the
Initiator and order the list according to the forwarding strategy
in use. The Bundle Offer TLVs are also used to notify the peer of
any PRoPHET ACKs that have been received by the Listener role
node.
o Send the list of bundles in one or more bundle offers, preceded if
necessary by one or more RIB dictionary updates to add any EIDs
required for the source or destination EIDs of the offered
bundles. These updates MUST be marked as being sent by the
Listener role so that they will be processed by the Initiator role
in the peer.
o Wait for the Initiator to send bundle responses indicating which
bundles should be sent and possibly a modified order for the
sending. Send the accepted bundles in the specified order. The
bundle sending will normally be carried out over a separate
connection using a suitable DTN convergence layer.
o On completion of the sending, wait for a message with an empty
Bundle Response TLV indicating correct completion of the process.
o The Listener process will be notified if any new bundles or
PRoPHET ACKs are received by the node after the completion of the
bundle sending that results from this information exchange. The
forwarding policy and the current delivery predictabilities will
then be applied to determine if this information should be sent to
the peer. If it is determined that one or more bundles and/or
ACKs ought to be forwarded, a new set of bundle offers are sent to
the peer. If the peer accepts them by sending bundle responses,
the bundles and/or ACKS are transferred as previously.
o Periodically, the Initiator in the peer will restart the complete
information exchange by sending a RIB TLV that may be, optionally,
preceded by RIB Dictionary entries if they are required for the
updated RIB.
Timers are used to ensure that the Listener does not lock up if
messages are not received from the Initiator in a timely fashion.
The Listener is restarted if the RIB is not received, and a Hello ACK
message is sent to force the Initiator to restart. If bundle
response messages are not received in a timely fashion, the Listener
re-sends the bundle offers and associated dictionary updates. The
following states are used:
<span class="grey">Lindgren, et al. Experimental [Page 72]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-73" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
WAIT_DICT
The Listener subsidiary state machine transitions to this state
automatically and immediately from the state ESTAB in both peers.
This state will be entered in the same way if the
Timer(next_exchange) expires in the peer, signaling the start of a
new round of information exchange and bundle passing. This will
result in one or more RIB TLVs being sent to the Listener by the
peer node's Initiator.
* When a RIB Dictionary TLV is received, use the TLV to update
the local dictionary, start or (if it is running) restart the
Timer(peer) and transition to state WAIT_RIB. If any of the
entries in the RIB Dictionary TLV conflict with existing
entries (i.e., an entry is received that uses the same String
ID as some previously received entry, but the EID in the entry
is different), send a Response message with an Error TLV
containing a Dictionary Conflict indicator, abort any in-
progress Initiator or Listener process, and terminate the
connection to the peer.
* If a Hello ACK message is received from the peer node,
transition to state WAIT_DICT and restart the process.
If multiple timeouts occur (configurable, typically 3), assume
that the link is broken and terminate the session. Note that the
RIB Dictionary and RIB TLVs may be combined into a single message.
The RIB TLV should be passed on to be processed in the WAIT_RIB
state.
WAIT_RIB
In this state, the Listener expects to be receiving one or more
RIB TLVs and possibly additional RIB Dictionary TLVs.
* On entry to this state, clear the set of received delivery
predictabilities.
* Whenever a new message is received, restart the Timer(peer)
timer.
* If a RIB dictionary TLV is received, use it to update the local
dictionary and remain in this state. If any of the entries in
the RIB Dictionary TLV conflict with existing entries (i.e., an
entry is received that uses the same String ID as some
previously received entry, but the EID in the entry is
different), send a message with an Error TLV containing a
Dictionary Conflict indicator, abort any in-progress Initiator
or Listener process, and terminate the connection to the peer.
<span class="grey">Lindgren, et al. Experimental [Page 73]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-74" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
* If a RIB TLV is received, record the received delivery
predictabilities for use in recalculating the local delivery
predictabilities. If a delivery predictability value is
received for an EID that is already in the set of received
delivery predictabilities, overwrite the previously received
value with the latest value. If a delivery predictability
value is received with a String ID that is not in the
dictionary, send a message with an Error TLV containing a
Bad String ID indicator, abort any in-progress Initiator or
Listener process, and terminate the connection to the peer.
* When a RIB TLV is received with the "More RIB TLVs" flag
cleared, initiate the recalculation of delivery
predictabilities and stop the Timer(peer). Use the revised
delivery predictabilities and the configured queueing and
forwarding strategies to create a list of bundles to be offered
to the peer node.
* Record the state of the local dictionary in case the offer
procedure has to be restarted. Determine if any new dictionary
entries are required for use in the Bundle Offer TLV(s). If
so, record them in the local dictionary, then format and send
RIB Dictionary entries in zero or more RIB Dictionary TLV
messages to update the dictionary in the peer if necessary.
* Format and send Bundle Offer TLV(s) carrying the identifiers of
the bundles to be offered together with any PRoPHET ACKs
received or generated by this node. If more than one Bundle
Offer TLV is sent, all but the last Bundle Offer TLV sent MUST
have the "More Offer/Response TLVs Following" flag set to 1.
* When all Bundle Offer TLVs have been sent, start the
Timer(info) and transition to state OFFER.
* If the Timer(peer) expires, send a Hello ACK TLV to the peer,
restart the timer, and transition to state WAIT_DICT.
* If an Error TLV indicating a Dictionary Conflict or
Bad String ID is received during or after sending the RIB
Dictionary TLVs and/or the Bundle Offer TLVs, abort any in-
progress Initiator or Listener process, and terminate the
connection to the peer.
* If a Hello ACK message is received from the peer node,
transition to state WAIT_DICT and restart the process.
<span class="grey">Lindgren, et al. Experimental [Page 74]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-75" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
OFFER
In this state, the Listener expects to be receiving one or more
Bundle Response TLVs detailing the bundles accepted by the
Initiator node. The ordered list of accepted bundles is
communicated to the bundle protocol agent, which controls sending
them to the peer node over a separate connection.
* When a Bundle Response TLV is received with a non-zero count of
Bundle Offers, extract the list of accepted bundles and send
the list to the bundle protocol agent so that it can start
transmission to the peer node. Ensure that the order of offers
from the TLV is maintained. Restart the Timer(info) unless the
last Bundle Response TLV received has the "More Offer/
Response TLVs Following" flag set to 0. If a Bundle Response
TLV is received with a String ID that is not in the dictionary,
send a message with an Error TLV containing a Bad String ID
indicator, abort any in-progress Initiator or Listener process,
and terminate the connection to the peer.
* After receiving a Bundle Response TLV with the "More Offer/
Response TLVs Following" flag set to 0 stop the Timer(info) and
transition to state SND_BUNDLE.
* If the Timer(info) expires, send a Hello ACK TLV to the peer,
restart the timer and transition to state WAIT_DICT.
* If a Hello ACK message is received from the peer node,
transition to state WAIT_DICT and restart the process.
SND_BUNDLE
In this state the Listener monitors the sending of bundles to the
Initiator peer node. In the event of disruption in transmission,
the Initiator node will, if possible, re-send the list of bundles
that were accepted but have not yet been received. The bundle
protocol agent has to be informed of any updates to the list of
bundles to send (this is likely to involve re-sending one or more
bundles). Otherwise, the Listener is quiescent in this state.
* When a Bundle Response TLV is received with a non-zero count of
Bundle Offers, extract the list of accepted bundles and update
the list previously passed to the bundle protocol agent so that
it can (re)start transmission to the peer node. Ensure that
the order of offers from the TLV is maintained so far as is
possible. Restart the Timer(info) unless the last Bundle
Response TLV received has the "More Offer/Response TLVs
Following" flag set to 0. If a Bundle Response TLV is received
with a String ID that is not in the dictionary, send a message
with an Error TLV containing a Bad String ID indicator, abort
<span class="grey">Lindgren, et al. Experimental [Page 75]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-76" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
any in-progress Initiator or Listener process, re-initialize
the local dictionary, and restart the Information Exchange
Phase as if the ESTAB state had just been reached.
* After receiving a Bundle Response TLV with the "More Offer/
Response TLVs Following" flag set to 0, stop the Timer(info)
and wait for completion of bundle sending.
* If the Timer(info) expires, send a Hello ACK TLV to the peer,
restart the timer, and transition to state WAIT_DICT.
* If a Hello ACK message is received from the peer node,
transition to state WAIT_DICT and restart the process.
* When a Bundle Response TLV is received with a zero count of
Bundle Offers, the Bundle Passing Sub-Phase is complete.
Notify the Initiator that the Listener process is complete and
transition to state WAIT_MORE.
As explained in the Initiator state REQUEST description, depending
on the transport protocol (convergence layer) used to send the
bundles to the peer node, it may be necessary during the bundle
sending process to monitor the liveness of the connection to the
peer node in the Initiator process using a timer.
WAIT_MORE
In this state, the Listener monitors the reception of new bundles
that might be received from a number of sources, including
* local applications on the node,
* other mobile nodes that connect to the node while this
connection is open, and
* permanent connections such as might occur at an Internet
gateway.
When the Listener is notified of received bundles, it determines
if they should be offered to the peer. The peer may also re-
initiate the Information Exchange Phase periodically.
* When the bundle protocol agent notifies the Listener that new
bundles and/or new PRoPHET ACKs have been received, the
Listener applies the selected forwarding policy and the current
delivery predictabilities to determine if any of the items
ought to be offered to the connected peer. If so, it carries
<span class="grey">Lindgren, et al. Experimental [Page 76]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-77" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
out the same operations as are described in the WAIT_RIB state
to build and send any necessary RIB Dictionary TLVs and RIB
TLVs to the Initiator in the peer.
* When all Bundle Offer TLVs have been sent, start the
Timer(info) and transition to state OFFER.
* If a RIB dictionary TLV is received, use it to update the local
dictionary and transition to state WAIT_RIB. If any of the
entries in the RIB Dictionary TLV conflict with existing
entries (i.e., an entry is received that uses the same String
ID as some previously received entry, but the EID in the entry
is different), send a message with an Error TLV containing a
Dictionary Conflict indicator, abort any in-progress Initiator
or Listener process, and terminate the connection to the peer.
Note that the RIB Dictionary and RIB TLVs may be combined into a
single message. The RIB TLV should be passed on to be processed
in the WAIT_RIB state.
<span class="h4"><a class="selflink" id="section-5.3.3" href="#section-5.3.3">5.3.3</a>. Recommendations for Information Exchange Timer Periods</span>
The Information Exchange Phase (IEP) state definitions include a
number of timers. This section provides advice and recommendations
for the periods that are appropriate for these timers.
Both Timer(info) and Timer(peer) are used to ensure that the state
machines do not become locked into inappropriate states if the peer
node does not apparently respond to messages sent in a timely fashion
either because of message loss in the network or unresponsiveness
from the peer. The appropriate values are to some extent dependent
on the speed of the network connection between the nodes and the
capabilities of the nodes executing the PRoPHET implementations.
Values in the range 1 to 10 seconds SHOULD be used, with a value of 5
seconds RECOMMENDED as default. The period should not be set to too
low a value, as this might lead to inappropriate restarts if the
hardware is relatively slow or there are large numbers of pieces of
information to process before responding. When using a reliable
transport protocol such as TCP, these timers effectively provide a
keep-alive mechanism and ensure that a failed connection is detected
as rapidly as possible so that remedial action can be taken (if
possible) or the connection shut down tidily if the peer node has
moved out of range.
Timer(next_exchange) is used to determine the maximum frequency of
(i.e., minimum period between) successive re-executions of the
information exchange state machines during a single session between a
pair of nodes. Selection of the timer period SHOULD reflect the
<span class="grey">Lindgren, et al. Experimental [Page 77]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-78" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
trade-off between load on the node processor and desire for timely
forwarding of bundles received from other nodes. It is RECOMMENDED
that the timer periods used should be randomized over a range from
50% to 150% of the base value in order to avoid synchronization
between multiple nodes. Consideration SHOULD be given to the
expected length of typical encounters and the likelihood of
encounters between groups of nodes when setting this period. Base
values in the range of 20 to 60 seconds are RECOMMENDED.
<span class="h4"><a class="selflink" id="section-5.3.4" href="#section-5.3.4">5.3.4</a>. State Tables for Information Exchange</span>
This section shows the state transitions that nodes go through during
the Information Exchange Phase. State tables are given for the
Initiator role and for the Listener role of the subsidiary state
machines. Both nodes will be running machines in each role during
the Information Exchange Phase, and this can be done either
concurrently or sequentially, depending on the implementation, as
explained in <a href="#section-5.3">Section 5.3</a>. The state tables in this section should be
read in conjunction with the state descriptions in Sections <a href="#section-5.3.1">5.3.1</a> and
5.3.2.
<span class="h5"><a class="selflink" id="section-5.3.4.1" href="#section-5.3.4.1">5.3.4.1</a>. Common Notation, Operations and Events</span>
The following notation is used:
nS Node that sent the Hello SYN message.
nA Node that sent the Hello SYNACK message.
The following events are common to the Initiator and Listener state
tables:
ErrDC Dictionary Conflict Error TLV received.
ErrBadSI Bad String ID Error TLV received.
HelloAck Hello ACK TLV received. This message is delivered to
both Initiator and Listener roles in order to cause a
restart of the Information Exchange Phase in the event
of message loss or protocol problems.
<span class="grey">Lindgren, et al. Experimental [Page 78]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-79" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
InitStart Sent by Listener role to Initiator role to signal the
Initiator role to commence sending messages to peer.
If the Listener instance is running in the node that
sent the Hello SYN (nS), then InitStart is signaled
immediately when the state is entered. For the node
that sent the Hello SYNACK (nA), InitStart may be
signaled immediately if the operational policy requires
concurrent operation of the Initiator and Listener
roles or postponed until the Listener role state
machine has reached a state defined by the configured
policy.
RIBnotlast RIB TLV received with "More RIB TLVs" flag set to 1.
RIBlast RIB TLV received with "More RIB TLVs" flag set to 0.
REQnotlast Bundle Response TLV received with More Offer/Response
TLVs Following flag set to 1.
REQlast Bundle Response TLV received with More Offer/Response
TLVs Following flag set to 0.
RIBDi RIBD TLV received with Sent by Listener flag set to 0
(i.e., it was sent by Initiator role).
RIBDl RIBD TLV received with Sent by Listener flag set to 1
(i.e., it was sent by Listener role).
Timeout(info) The Timer(info) has expired.
Timeout(peer) The Timer(peer) has expired.
Both the Initiator and Listener state tables use the following common
operations:
o The "Initialize Dictionary" operation is defined as emptying any
existing local dictionary and inserting the two initial entries:
the EID of the node that sent the Hello SYN (String ID 0) and the
EID of the node that sent the Hello SYNACK (String ID 1).
o The "Send RIB Dictionary Updates" operation is defined as:
1. Determining what dictionary updates will be needed for any
extra EIDs in the previously selected RIB entries set that are
not already in the dictionary and updating the local
dictionary with these EIDs. The set of dictionary updates may
be empty if no extra EIDs are needed. The set may be empty
even on the first execution if sequential operation has been
<span class="grey">Lindgren, et al. Experimental [Page 79]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-80" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
selected, this is the second node to start and the necessary
EIDs were in the set previously sent by the first node to
start.
2. Formatting zero or more RIBD TLVs for the set of dictionary
updates identified in the "Build RIB Entries" operation and
sends them to the peer. The RIBD TLVs MUST have the "Sent by
Listener" flag set to 0 if the updates are sent by the
Initiator role and to 1 if sent by the Listener role. In the
case of the Initiator role, an empty RIBD TLV MUST be sent
even if the set of updates is empty in order to trigger the
Listener state machine.
o The "Update Dictionary" operation uses received RIBD TLV entries
to update the local dictionary. The received entries are checked
against the existing dictionary. If the String ID in the entry is
already in use, the entry is accepted if the EID in the received
entry is identical to that stored in the dictionary previously.
If it is identical, the entry is unchanged, but if it is not a
Response message with an Error TLV indicating Dictionary Conflict
is sent to the peer in an Error Response message, the whole
received RIBD TLV is ignored, and the Initiator and Listener
processes are restarted as if the ESTAB state has just been
reached.
o The "Abort Exchange" operation is defined as aborting any in-
progress information exchange state machines and terminating the
connection to the peer.
o The "Start TI" operation is defined as (re)starting the
Timer(info) timer.
o The "Start TP" operation is defined as (re)starting the
Timer(peer) timer.
o The "Cancel TI" operation is defined as canceling the Timer(info)
timer.
o The "Cancel TP" operation is defined as canceling the Timer(info)
timer.
<span class="grey">Lindgren, et al. Experimental [Page 80]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-81" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<span class="h5"><a class="selflink" id="section-5.3.4.2" href="#section-5.3.4.2">5.3.4.2</a>. State Tables for the Initiator Role</span>
The rules and state tables for the Initiator role use the following
operations:
o The "Build RIB Entries" operation is defined as:
1. Recording the state of the local dictionary.
2. Determining the set of EIDs for which RIB entries should be
sent during this execution of the Initiator role state machine
component. If this is a second or subsequent run of the state
machine in this node during the current session with the
connected peer, then the set of EIDs may be empty if no
changes have occurred since the previous run of the state
machine.
3. Determining and extracting the current delivery predictability
information for the set of EIDs selected.
o The "Send RIB Entries" operation formats one or more RIB TLVs with
the set of RIB entries identified in the "Build RIB Entries"
operation and sends them to the peer. If the set is empty, a
single RIB TLV with zero entries is sent. If more than one RIB
TLV is sent, all but the last one MUST have the "More RIB TLVs"
flag set to 1; the last or only one MUST have the flag set to 0.
o The "Clear Bundle Lists" operation is defined as emptying the
lists of bundles offered by the peer and bundles requested from
the peer.
o The "Notify ACKs" operation is defined as informing the bundle
protocol agent that PRoPHET ACKs has been received for one or more
bundles in a Bundle Offer TLV using the Bundle Delivered interface
(see <a href="#section-2.2">Section 2.2</a>).
o The "Record Offers" operation is defined as recording all the
bundles offered in a Bundle Offer TLV in the list of bundles
offers.
o The "Select for Request" operation prunes and sorts the list of
offered bundles held into the list of requested bundles according
to policy and the available resources ready for sending to the
offering node.
<span class="grey">Lindgren, et al. Experimental [Page 81]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-82" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
o The "Send Requests" operation is defined as formatting one or more
non-empty Bundle Response TLVs and sending them to the offering
node. If more than one Bundle Offer TLV is sent, all but the last
one MUST have the "More Offer/Response TLVs Following" flag set to
1; the last or only one MUST have the flag set to 0.
o The "Record Bundle Received" operation deletes a successfully
received bundle from the list of requests.
o The "All Requests Done" operation is defined as formatting and
sending an empty Bundle Offer TLV, with the "More Offer/Response
TLVs Following" flag set to 0, to the offering node.
o The "Check Receiving" operation is defined as checking with the
node bundle protocol agent if bundle reception from the peer node
is currently in progress. This is needed in case a timeout occurs
while waiting for bundle reception and a very large bundle is
being processed.
o The "Start NE" operation is defined as (re)starting the
Timer(next_exchange).
The following events are specific to the Initiator role state
machine:
LastBndlRcvd Bundle received from peer that is the only remaining
bundle in Bundle Requests List.
NotLastBndlRcvd Bundle received from peer that is not the only
remaining bundle in Bundle Requests List.
OFRnotlast Bundle Offer TLV received with "More Offer/Response
TLVs Following" flag set to 1.
OFRlast Bundle Offer TLV received with "More Offer/Response
TLVs Following" flag set to 0
Timeout(next_exch) The Timer(next_exchange) has expired
<span class="grey">Lindgren, et al. Experimental [Page 82]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-83" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
State: CREATE_DR
+==================================================================+
| Condition | Action | New State |
+==================+===================================+===========+
| On Entry | If previous state was ESTAB: | |
| | Initialize Dictionary | |
| | Always: | |
| | Build RIB Entries | |
| | Wait for Init Start | CREATE_DR |
+------------------+-----------------------------------+-----------+
| InitStart | Send RIB Dictionary Updates | |
| | Send RIB Entries | |
| | Start TI | SEND_DR |
+------------------+-----------------------------------+-----------+
| ErrDC | Abort Exchange |(finished) |
+------------------+-----------------------------------+-----------+
| ErrBadSI | Abort Exchange |(finished) |
+------------------+-----------------------------------+-----------+
| HelloAck | Abort Exchange | CREATE_DR |
+==================================================================+
<span class="grey">Lindgren, et al. Experimental [Page 83]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-84" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
State: SEND_DR
+==================================================================+
| Condition | Action | New State |
+==================+===================================+===========+
| On Entry | Clear Bundle Lists | SEND_DR |
+------------------+-----------------------------------+-----------+
| Timeout(info) | Send RIB Dictionary Updates | |
| | Send RIB Entries (note 1) | SEND_DR |
+------------------+-----------------------------------+-----------+
| RIBDl received | Update Dictionary (note 2) | |
| | If Dictionary Conflict found: | |
| | Abort Exchange | CREATE_DR |
| | Else: | |
| | Start TI | SEND_DR |
+------------------+-----------------------------------+-----------+
| OFRnotlast | Notify ACKs | |
| | Record Offers | |
| | Start TI | SEND_DR |
+------------------+-----------------------------------+-----------+
| OFRlast | Cancel TI | |
| | Notify ACKs | |
| | Record Offers | |
| | Select for Request | |
| | Send Requests | |
| | Start TI | REQUEST |
+------------------+-----------------------------------+-----------+
| ErrDC | Abort Exchange |(finished) |
+------------------+-----------------------------------+-----------+
| ErrBadSI | Abort Exchange |(finished) |
+------------------+-----------------------------------+-----------+
| HelloAck | Abort Exchange | CREATE_DR |
+==================================================================+
<span class="grey">Lindgren, et al. Experimental [Page 84]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-85" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
State: REQUEST
+==================================================================+
| Condition | Action | New State |
+==================+===================================+===========+
| Timeout(info) | Check Receiving | |
| | If bundle reception in progress: | |
| | Start TI | REQUEST |
| | Otherwise: | |
| | Send Requests | |
| | Start TI (note 3) | REQUEST |
+------------------+-----------------------------------+-----------+
| NotLastBndlRcvd | Record Bundle Received | |
| | Start TI | REQUEST |
+------------------+-----------------------------------+-----------+
| LastBndlRcvd | Cancel TI | |
| | All Requests Done | |
| | Start NE | REQUEST |
+------------------+-----------------------------------+-----------+
|Timeout(next_exch)| | CREATE_DR |
+------------------+-----------------------------------+-----------+
| HelloAck | Abort Exchange | CREATE_DR |
+==================================================================+
Note 1:
No response to the RIB has been received before the timer expired,
so we re-send the dictionary and RIB TLVs. If the timeout occurs
repeatedly, it is likely that communication has failed and the
connection MUST be terminated.
Note 2:
If a Dictionary Conflict error has to be sent, the state machine
will be aborted. If this event occurs repeatedly, it is likely
that there is either a serious software problem or a security
issue. The connection MUST be terminated.
Note 3:
Remaining requested bundles have not arrived before the timer
expired, so we re-send the list of outstanding requests. If the
timeout occurs repeatedly, it is likely that communication has
failed and the connection MUST be terminated.
<span class="grey">Lindgren, et al. Experimental [Page 85]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-86" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<span class="h5"><a class="selflink" id="section-5.3.4.3" href="#section-5.3.4.3">5.3.4.3</a>. State Tables for the Listener Role</span>
The rules and state tables for the Listener role use the following
operations:
o The "Clear Supplied RIBs" operation is defined as setting up an
empty container to hold the set of RIBs supplied by the peer node.
o The "Record RIBs Supplied" operation is defined as:
1. Taking the RIB entries from a received RIB TLV.
2. Verifying that the String ID used in each entry is present in
the dictionary. If not, an Error TLV containing the offending
String ID is sent to the peer, and the Initiator and Listener
processes are aborted and restarted as if the ESTAB state had
just been reached.
3. If all the String IDs are present in the dictionary, record
the delivery predictabilities for each EID in the entries.
o The "Recalc Dlvy Predictabilities" operation uses the algorithms
defined in <a href="#section-2.1.2">Section 2.1.2</a> to update the local set of delivery
predictabilities using the using the set of delivery
predictabilities supplied by the peer in RIB TLVs.
o The "Determine Offers" operation determines the set of bundles to
be offered to the peer. The local delivery predictabilities and
the delivery predictabilities supplied by the peer are compared,
and a prioritized choice of the bundles stored in this node to be
offered to the peer is made according to the configured queueing
policy and forwarding strategy.
o The "Determine ACKs" operation is defined as obtaining the set of
PRoPHET ACKs recorded by the bundle protocol agent that need to be
forwarded to the peer. The list of PRoPHET ACKs is maintained
internally by the PRoPHET protocol implementation rather than the
main bundle protocol agent (see <a href="#section-3.5">Section 3.5</a>).
o The "Determine Offer Dict Updates" operation is defined as
determining any extra EIDs that are not already in the dictionary,
recording the previous state of the local dictionary, and then
adding the required extra entries to the dictionary.
<span class="grey">Lindgren, et al. Experimental [Page 86]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-87" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
o The "Send Offers" operation is defined as formatting one or more
non-empty Bundle Offer TLVs, incorporating the sets of Offers and
PRoPHET ACKs previously determined, and sending them to the peer
node. If more than one Bundle Offer TLV is sent, all but the last
one MUST have the "More Offer/Response TLVs Following" flag set to
1; the last or only one MUST have the flag set to 0.
o The "Record Requests" operation is defined as recording all the
bundles offered in a Bundle Offer TLV in the list of bundles
offers. Duplicates MUST be ignored. The order of requests in the
TLVs MUST be maintained so far as is possible (it is possible that
a bundle has to be re-sent, and this may result in out-of-order
delivery).
o The "Send Bundles" operation is defined as sending, in the order
requested, the bundles in the requested list. This requires the
list to be communicated to the bundle protocol agent (see
<a href="#section-2.2">Section 2.2</a>).
o The "Check Initiator Start Point" operation is defined as checking
the configured sequential operation policy to determine if the
Listener role has reached the point where the Initiator role
should be started. If so, the InitStart notification is sent to
the Initiator role in the same node.
The following events are specific to the Listener role state machine:
RIBnotlast RIB TLV received with "More RIB TLVs" flag set to 1.
RIBlast RIB TLV received with "More RIB TLVs" flag set to 0 and
a non-zero count of RIB Entries.
REQnotlast Bundle Response TLV received with More Offer/Response
TLVs Following flag set to 1.
REQlast Bundle Response TLV received with More Offer/Response
TLVs Following flag set to 0 and a non-zero count of
bundle offers.
REQempty Bundle Response TLV received with More Offer/Response
TLVs Following flag set to 0 and a zero count of bundle
offers.
<span class="grey">Lindgren, et al. Experimental [Page 87]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-88" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
State: WAIT_DICT
+==================================================================+
| Condition | Action | New State |
+==================+===================================+===========+
| On Entry | Check Initiator Start Point | WAIT_DICT |
+------------------+-----------------------------------+-----------+
| RIBDi | Update Dictionary (note 1) | |
| | If Dictionary Conflict found: | |
| | Abort Exchange |(finished) |
| | Else: | |
| | Start TP | WAIT_RIB |
+------------------+-----------------------------------+-----------+
| HelloAck | Abort Exchange | WAIT_DICT |
+==================================================================+
<span class="grey">Lindgren, et al. Experimental [Page 88]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-89" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
State: WAIT_RIB
+==================================================================+
| Condition | Action | New State |
+==================+===================================+===========+
| On Entry | Clear Supplied RIBS | WAIT_RIB |
+------------------+-----------------------------------+-----------+
| RIBDi | Update Dictionary (note 1) | |
| | If Dictionary Conflict found: | |
| | Abort Exchange |(finished) |
| | Else: | |
| | Start TP | WAIT_RIB |
+------------------+-----------------------------------+-----------+
| RIBnotlast | Record RIBS Supplied (note 2) | |
| | If EID missing in dictionary: | |
| | Abort Exchange |(finished) |
| | Else: | |
| | Start TP | WAIT_RIB |
+------------------+-----------------------------------+-----------
| RIBlast | Check Initiator Start Point | |
| | Record RIBS Supplied (note 2) | |
| | If EID missing in dictionary: | |
| | Abort Exchange |(finished) |
| | Otherwise | |
| | Recalc Dlvy | |
| | Predictabilities | |
| | Cancel TP | |
| | Determine Offers | |
| | Determine ACKs | |
| | Determine Offer | |
| | Dict Updates | |
| | Send RIB Dictionary | |
| | Updates | |
| | Send Offers | |
| | Start TI | OFFER |
+------------------+-----------------------------------+-----------+
| HelloAck | Abort Exchange | WAIT_DICT |
+------------------+-----------------------------------+-----------+
|Any Other TLV rcvd| Abort Exchange |(finished) |
+------------------+-----------------------------------+-----------+
| Timeout(peer) | Send RIB Dictionary Updates | |
| | Send Offers | |
| | Start TI (note 3) | OFFER |
+==================================================================+
<span class="grey">Lindgren, et al. Experimental [Page 89]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-90" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
State: OFFER
+==================================================================+
| Condition | Action | New State |
+==================+===================================+===========+
| REQnotlast | Send Bundles | |
| | Start TI | OFFER |
+------------------+-----------------------------------+-----------+
| REQlast | Cancel TI | |
| | Check Initiator Start Point | |
| | Send Bundles | SND_BUNDLE|
+------------------+-----------------------------------+-----------+
| REQempty | Cancel TI | |
| | Check Initiator Start Point | WAIT_MORE|
+------------------+-----------------------------------+-----------+
| HelloAck | Abort Exchange | WAIT_DICT |
+------------------+-----------------------------------+-----------+
| Timeout(info) | Send RIB Dictionary Updates | |
| | Send Offers | |
| | Start TI (note 3) | OFFER |
+==================================================================+
State: SND_BUNDLE
+==================================================================+
| Condition | Action | New State |
+==================+===================================+===========+
| REQnotlast | Send Bundles | |
| | Start TI | SND_BUNDLE|
+------------------+-----------------------------------+-----------+
| REQlast | Cancel TI | |
| | Send Bundles | SND_BUNDLE|
+------------------+-----------------------------------+-----------+
| REQempty | Cancel TI | |
| | Check Initiator Start Point | WAIT_MORE|
+------------------+-----------------------------------+-----------+
| HelloAck | Abort Exchange | WAIT_DICT |
+------------------+-----------------------------------+-----------+
| Timeout(info) | Send RIB Dictionary Updates | |
| | Send Offers | |
| | Start TI (note 3) | OFFER |
+==================================================================+
<span class="grey">Lindgren, et al. Experimental [Page 90]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-91" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
State: WAIT_MORE
+==================================================================+
| Condition | Action | New State |
+==================+===================================+===========+
| More Bundles | Determine Offers | |
| | Determine ACKs | |
| | Determine Offer | |
| | Dict Updates | |
| | Send RIB Dictionary | |
| | Updates | |
| | Send Offers | |
| | Start TI | OFFER |
+------------------+-----------------------------------+-----------+
| RIBDi | Update Dictionary (note 1) | |
| | If Dictionary Conflict found: | |
| | Abort Exchange |(finished) |
| | Else: | |
| | Start TP | WAIT_RIB |
+------------------+-----------------------------------+-----------+
| REQnotlast | Send Bundles | |
| | Start TI | SND_BUNDLE|
+------------------+-----------------------------------+-----------+
| REQlast | Cancel TI | |
| | Send Bundles | SND_BUNDLE|
+------------------+-----------------------------------+-----------+
| REQempty | Cancel TI | |
| | Check Initiator Start Point | SND_BUNDLE|
+------------------+-----------------------------------+-----------+
| HelloAck | Abort Exchange | WAIT_DICT |
+------------------+-----------------------------------+-----------+
| Timeout(info) | Send RIB Dictionary Updates | |
| | Send Offers | |
| | Start TI (note 3) | OFFER |
+==================================================================+
Note 1:
Both the dictionary and the RIB TLVs may come in the same PRoPHET
message. In that case, the state will change to WAIT_RIB, and the
RIB will then immediately be processed.
Note 2:
Send an ACK if the timer for the peering node expires. Either the
link has been broken, and then the link setup will restart, or it
will trigger the Information Exchange Phase to restart.
<span class="grey">Lindgren, et al. Experimental [Page 91]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-92" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
Note 3:
When the RIB is received, it is possible for the PRoPHET agent to
update its delivery predictabilities according to <a href="#section-2.1.2">Section 2.1.2</a>.
The delivery predictabilities and the RIB is then used together
with the forwarding strategy in use to create a bundle offer TLV.
This is sent to the peering node.
Note 4:
No more bundles are requested by the other node; transfer is
complete.
Note 5:
No response to the bundle offer has been received before the timer
expired, so we re-send the bundle offer.
<span class="h3"><a class="selflink" id="section-5.4" href="#section-5.4">5.4</a>. Interaction with Nodes Using Version 1 of PRoPHET</span>
There are existing implementations of PRoPHET based on draft versions
of this specification that use version 1 of the protocol. There are
a number of significant areas of difference between version 1 and
version 2 as described in this document:
o In version 1, the delivery predictability update equations were
significantly different, and in the case of the transitivity
equation (Equation 3) could lead to degraded performance or non-
delivery of bundles in some circumstances.
o In the current version , constraints were placed on the String IDs
generated by each node to ensure that it was not possible for
there to be a conflict if the IDs were generated concurrently and
independently in the two nodes.
o In the current version, a flag has been added to the Routing
Information Base Dictionary TLV to distinguish dictionary updates
sent by the Initiator role and by the Listener role.
o In the current version, the Bundle Offer and Response TLVs have
been significantly revised. The version 2 TLVs have been
allocated new TLV Type numbers, and the version 1 TLVs (types 0xA2
and 0xA3) are now deprecated. For each bundle specifier, the
source EID is transmitted in addition to the creation timestamp by
version 2 to ensure that the bundle is uniquely identified.
Version 2 also transmits the fragment payload offset and length
when the offered bundle is a bundle fragment. The payload length
can optionally be transmitted for each bundle (whether or not it
is a fragment) to give the receiver additional information that
can be useful when determining which bundle offers to accept.
<span class="grey">Lindgren, et al. Experimental [Page 92]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-93" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
o The behavior of the system after the first Information Exchange
Phase has been better defined. The state machine has been altered
to better describe how the ongoing operations work. This has
involved the removal of the high-level state WAIT_INFO and the
addition of two states in the Listener role subsidiary state
machine (SND_BUNDLE and WAIT_MORE). The protocol on the wire has
not been altered by this change to the description of the state
machine. However, the specification of the later stages of
operation was slightly vague and might have been interpreted
differently by various implementers.
A node implementing version 2 of the PRoPHET protocol as defined in
this document MAY ignore a communication opportunity with a node that
sends a HELLO message indicating that it uses version 1, or it MAY
partially downgrade and respond to messages as if it were a version 1
node. This means that the version field in all message headers MUST
contain 1.
It is RECOMMENDED that the version 2 node use the metric update
equations defined in this document even when communicating with a
version 1 node as this will partially inhibit the problems with the
transitivity equation in version 1, and that the version 2 node
modify any received metrics that are greater than (1 - delta) to be
(1 - delta) to avoid becoming a "sink" for bundles that are not
destined for this node. Also version 1 nodes cannot be explicitly
offered bundle fragments, and an exchange with a node supporting
version 1 MUST use the, now deprecated, previous versions of the
Bundle Offer and Response TLVs.
Generally, nodes using version 1 should be upgraded if at all
possible because of problems that have been identified.
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Security Considerations</span>
Currently, PRoPHET does not specify any special security measures.
As a routing protocol for intermittently connected networks, PRoPHET
is a target for various attacks. The various known possible
vulnerabilities are discussed in this section.
The attacks described here are not problematic if all nodes in the
network can be trusted and are working towards a common goal. If
there exist such a set of nodes, but there also exist malicious
nodes, these security problems can be solved by introducing an
authentication mechanism when two nodes meet, for example, using a
public key system. Thus, only nodes that are known to be members of
the trusted group of nodes are allowed to participate in the routing.
This of course introduces the additional problem of key distribution,
but that is not addressed here.
<span class="grey">Lindgren, et al. Experimental [Page 93]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-94" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
Where suitable, the mechanisms (such as key management and bundle
authentication or integrity checks) and terminology specified by the
Bundle Security Protocol [<a href="./rfc6257" title=""Bundle Security Protocol Specification"">RFC6257</a>] are to be used.
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>. Attacks on the Operation of the Protocol</span>
There are a number of kinds of attacks on the operation of the
protocol that it would be possible to stage on a PRoPHET network.
The attacks and possible remedies are listed here.
<span class="h4"><a class="selflink" id="section-6.1.1" href="#section-6.1.1">6.1.1</a>. Black-Hole Attack</span>
A malicious node sets its delivery predictabilities for all
destinations to a value close to or exactly equal to 1 and/or
requests all bundles from nodes it meets, and does not forward any
bundles. This has two effects, both causing messages to be drawn
towards the black hole instead of to their correct destinations.
1. A node encountering a malicious node will try to forward all its
bundles to the malicious node, creating the belief that the
bundle has been very favorably forwarded. Depending on the
forwarding strategy and queueing policy in use, this might hamper
future forwarding of the bundle and/or lead to premature dropping
of the bundle.
2. Due to the transitivity, the delivery predictabilities reported
by the malicious node will affect the delivery predictabilities
of other nodes. This will create a gradient for all destinations
with the black hole as the "center of gravity" towards which all
bundles traverse. This should be particularly severe in
connected parts of the network.
<span class="h5"><a class="selflink" id="section-6.1.1.1" href="#section-6.1.1.1">6.1.1.1</a>. Attack Detection</span>
A node receiving a set of delivery predictabilities that are all at
or close to 1 should be suspicious. Similarly, a node that accepts
all bundles and offers none might be considered suspicious. However,
these conditions are not impossible in normal operation.
<span class="h5"><a class="selflink" id="section-6.1.1.2" href="#section-6.1.1.2">6.1.1.2</a>. Attack Prevention/Solution</span>
To prevent this attack, authentication between nodes that meet needs
to be present. Nodes can also inspect the received metrics and
bundle acceptances/offers for suspicious patterns and terminate
communications with nodes that appear suspicious. The natural
evolution of delivery predictabilities should mean that a genuine
node would not be permanently ostracized even if the values lead to
<span class="grey">Lindgren, et al. Experimental [Page 94]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-95" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
termination of a communication opportunity on one occasion. The
epidemic nature of PRoPHET would mean that such a termination rarely
leads to non-delivery of bundles.
<span class="h4"><a class="selflink" id="section-6.1.2" href="#section-6.1.2">6.1.2</a>. Limited Black-Hole Attack / Identity Spoofing</span>
A malicious node misrepresents itself by claiming to be someone else.
The effects of this attack are:
1. The effects of the black-hole attack listed above hold for this
attack as well, with the exception that only the delivery
predictabilities and bundles for one particular destination are
affected. This could be used to "steal" the data that should be
going to a particular node.
2. In addition to the above problems, PRoPHET ACKs will be issued
for the bundles that are delivered to the malicious node. This
will cause these bundles to be removed from the network, reducing
the chance that they will reach their real destination.
<span class="h5"><a class="selflink" id="section-6.1.2.1" href="#section-6.1.2.1">6.1.2.1</a>. Attack Detection</span>
The destination can detect that this kind of attack has occurred (but
it cannot prevent the attack) when it receives a PRoPHET ACK for a
bundle destined to itself but for which it did not receive the
corresponding bundle.
<span class="h5"><a class="selflink" id="section-6.1.2.2" href="#section-6.1.2.2">6.1.2.2</a>. Attack Prevention/Solution</span>
To prevent this attack, authentication between nodes that meet needs
to be present.
<span class="h4"><a class="selflink" id="section-6.1.3" href="#section-6.1.3">6.1.3</a>. Fake PRoPHET ACKs</span>
A malicious node may issue fake PRoPHET ACKs for all bundles (or only
bundles for a certain destination if the attack is targeted at a
single node) carried by nodes it met. The affected bundles will be
deleted from the network, greatly reducing their probability of being
delivered to the destination.
<span class="h5"><a class="selflink" id="section-6.1.3.1" href="#section-6.1.3.1">6.1.3.1</a>. Attack Prevention/Solution</span>
If a public key cryptography system is in place, this attack can be
prevented by mandating that all PRoPHET ACKs be signed by the
destination. Similarly to other solutions using public key
cryptography, this introduces the problem of key distribution.
<span class="grey">Lindgren, et al. Experimental [Page 95]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-96" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<span class="h4"><a class="selflink" id="section-6.1.4" href="#section-6.1.4">6.1.4</a>. Bundle Store Overflow</span>
After encountering and receiving the delivery predictability
information from the victim, a malicious node may generate a large
number of fake bundles for the destination for which the victim has
the highest delivery predictability. This will cause the victim to
most likely accept these bundles, filling up its bundle storage,
possibly at the expense of other, legitimate, bundles. This problem
is transient as the messages will be removed when the victim meets
the destination and delivers the messages.
<span class="h5"><a class="selflink" id="section-6.1.4.1" href="#section-6.1.4.1">6.1.4.1</a>. Attack Detection</span>
If it is possible for the destination to figure out that the bundles
it is receiving are fake, it could report that malicious actions are
underway.
<span class="h5"><a class="selflink" id="section-6.1.4.2" href="#section-6.1.4.2">6.1.4.2</a>. Attack Prevention/Solution</span>
This attack could be prevented by requiring sending nodes to sign all
bundles they send. By doing this, intermediate nodes could verify
the integrity of the messages before accepting them for forwarding.
<span class="h4"><a class="selflink" id="section-6.1.5" href="#section-6.1.5">6.1.5</a>. Bundle Store Overflow with Delivery Predictability Manipulation</span>
A more sophisticated version of the attack in the previous section
can be attempted. The effect of the previous attack was lessened
since the destination node of the fake bundles existed. This caused
fake bundles to be purged from the network when the destination was
encountered. The malicious node may now use the transitive property
of the protocol to boost the victim's delivery predictabilities for a
non-existent destination. After this, it creates a large number of
fake bundles for this non-existent destination and offers them to the
victim. As before, these bundles will fill up the bundle storage of
the victim. The impact of this attack will be greater as there is no
probability of the destination being encountered and the bundles
being acknowledged. Thus, they will remain in the bundle storage
until they time out (the malicious node may set the timeout to a
large value) or until they are evicted by the queueing policy.
The delivery predictability for the fake destination may spread in
the network due to the transitivity, but this is not a problem, as it
will eventually age and fade away.
The impact of this attack could be increased if multiple malicious
nodes collude, as network resources can be consumed at a greater
speed and at many different places in the network simultaneously.
<span class="grey">Lindgren, et al. Experimental [Page 96]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-97" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>. Interactions with External Routing Domains</span>
Users may opt to connect two regions of sparsely connected nodes
through a connected network such as the Internet where another
routing protocol is running. To this network, PRoPHET traffic would
look like any other application-layer data. Extra care must be taken
in setting up these gateway nodes and their interconnections to make
sure that malicious nodes cannot use them to launch attacks on the
infrastructure of the connected network. In particular, the traffic
generated should not be significantly more than what a single regular
user end host could create on the network.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. IANA Considerations</span>
Following the policies outlined in "Guidelines for Writing an IANA
Considerations Section in RFCs" (<a href="./rfc5226">RFC 5226</a> [<a href="./rfc5226" title="">RFC5226</a>]), the following
name spaces are defined in PRoPHET.
o For fields in the PRoPHET message header (<a href="#section-4.1">Section 4.1</a>):
* DTN Routing Protocol Number
* PRoPHET Protocol Version
* PRoPHET Header Flags
* PRoPHET Result Field
* PRoPHET Codes for Success and Codes for Failure
o Identifiers for TLVs carried in PRoPHET messages:
* PRoPHET TLV Type (<a href="#section-4.2">Section 4.2</a>)
o Definitions of TLV Flags and other flag fields in TLVs:
* Hello TLV Flags (<a href="#section-4.3.1">Section 4.3.1</a>)
* Error TLV Flags (<a href="#section-4.3.2">Section 4.3.2</a>)
* Routing Information Base (RIB) Dictionary TLV Flags
(<a href="#section-4.3.3">Section 4.3.3</a>)
* Routing Information Base (RIB) TLV Flags (<a href="#section-4.3.4">Section 4.3.4</a>)
* Routing Information Base (RIB) Flags per entry (<a href="#section-4.3.4">Section 4.3.4</a>)
* Bundle Offer and Response TLV Flags (<a href="#section-4.3.5">Section 4.3.5</a>)
<span class="grey">Lindgren, et al. Experimental [Page 97]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-98" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
* Bundle Offer and Response B Flags per offer or response
(<a href="#section-4.3.5">Section 4.3.5</a>)
The following subsections list the registries that have been created.
Initial values for the registries are given below; future assignments
for unassigned values are to be made through the Specification
Required policy. Where specific values are defined in the IANA
registries according to the specifications in the subsections below,
the registry refers to this document as defining the allocation.
<span class="h3"><a class="selflink" id="section-7.1" href="#section-7.1">7.1</a>. DTN Routing Protocol Number</span>
The encoding of the Protocol Number field in the PRoPHET header
(<a href="#section-4.1">Section 4.1</a>) is:
+--------------------------+-----------+---------------+
| Protocol | Value | Reference |
+--------------------------+-----------+---------------+
| PRoPHET Protocol | 0x00 | This document |
| Unassigned | 0x01-0xEF | |
| Private/Experimental Use | 0xF0-0xFF | This document |
+--------------------------+-----------+---------------+
<span class="h3"><a class="selflink" id="section-7.2" href="#section-7.2">7.2</a>. PRoPHET Protocol Version</span>
The encoding of the PRoPHET Version field in the PRoPHET header
(<a href="#section-4.1">Section 4.1</a>) is:
+----------------------------+-----------+---------------+
| Version | Value | Reference |
+----------------------------+-----------+---------------+
| Reserved (do not allocate) | 0x00 | This document |
| PRoPHET v1 | 0x01 | This document |
| PRoPHET v2 | 0x02 | This document |
| Unassigned | 0x03-0xEF | |
| Private/Experimental Use | 0xF0-0xFE | This document |
| Reserved | 0xFF | |
+----------------------------+-----------+---------------+
<span class="grey">Lindgren, et al. Experimental [Page 98]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-99" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<span class="h3"><a class="selflink" id="section-7.3" href="#section-7.3">7.3</a>. PRoPHET Header Flags</span>
The following Flags are defined for the PRoPHET Header (<a href="#section-4.1">Section 4.1</a>):
+------------+--------------+-----------+
| Meaning | Bit Position | Reference |
+------------+--------------+-----------+
| Unassigned | Bit 0 | |
| Unassigned | Bit 1 | |
| Unassigned | Bit 2 | |
| Unassigned | Bit 3 | |
+------------+--------------+-----------+
<span class="h3"><a class="selflink" id="section-7.4" href="#section-7.4">7.4</a>. PRoPHET Result Field</span>
The encoding of the Result field in the PRoPHET header (<a href="#section-4.1">Section 4.1</a>)
is:
+--------------------------+-------------+---------------+
| Result Value | Value | Reference |
+--------------------------+-------------+---------------+
| Reserved | 0x00 | This document |
| NoSuccessAck | 0x01 | This document |
| AckAll | 0x02 | This document |
| Success | 0x03 | This document |
| Failure | 0x04 | This document |
| ReturnReceipt | 0x05 | This document |
| Unassigned | 0x06 - 0x7F | |
| Private/Experimental Use | 0x80 - 0xFF | This document |
+--------------------------+-------------+---------------+
<span class="h3"><a class="selflink" id="section-7.5" href="#section-7.5">7.5</a>. PRoPHET Codes for Success and Codes for Failure</span>
The encoding for Code field in the PRoPHET header (<a href="#section-4.1">Section 4.1</a>) for
"Success" messages is:
+--------------------------+-------------+---------------+
| Code Name | Values | Reference |
+--------------------------+-------------+---------------+
| Generic Success | 0x00 | This document |
| Submessage Received | 0x01 | This document |
| Unassigned | 0x02 - 0x7F | |
| Private/Experimental Use | 0x80 - 0xFF | This document |
+--------------------------+-------------+---------------+
<span class="grey">Lindgren, et al. Experimental [Page 99]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-100" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
The encoding for Code in the PRoPHET header (<a href="#section-4.1">Section 4.1</a>) for
"Failure" messages is:
+----------------------------+-------------+---------------+
| Code Name | Values | Reference |
+----------------------------+-------------+---------------+
| Reserved (do not allocate) | 0x00 - 0x01 | This document |
| Unspecified Failure | 0x02 | This document |
| Unassigned | 0x03 - 0x7F | |
| Private/Experimental Use | 0x80 - 0xFE | This document |
| Error TLV in Message | 0xFF | This document |
+----------------------------+-------------+---------------+
<span class="h3"><a class="selflink" id="section-7.6" href="#section-7.6">7.6</a>. PRoPHET TLV Type</span>
The TLV Types defined for PRoPHET (<a href="#section-4.2">Section 4.2</a>) are:
+------------------------------+-------------+---------------+
| Type | Value | Reference |
+------------------------------+-------------+---------------+
| Reserved (do not allocate) | 0x00 | This document |
| Hello TLV | 0x01 | This document |
| Error TLV | 0x02 | This document |
| Unsassigned | 0x03 - 0x9F | |
| RIB dictionary TLV | 0xA0 | This document |
| RIB TLV | 0xA1 | This document |
| Bundle Offer (deprecated) | 0xA2 | This document |
| Bundle Response (deprecated) | 0xA3 | This document |
| Bundle Offer (v2) | 0xA4 | This document |
| Bundle Response (v2) | 0xA5 | This document |
| Unassigned | 0xA6 - 0xCF | |
| Private/Experimental Use | 0xD0 - 0xFF | This document |
+------------------------------+-------------+---------------+
<span class="grey">Lindgren, et al. Experimental [Page 100]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-101" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<span class="h3"><a class="selflink" id="section-7.7" href="#section-7.7">7.7</a>. Hello TLV Flags</span>
The following TLV Flags are defined for the Hello TLV
(<a href="#section-4.3.1">Section 4.3.1</a>). Flag numbers 0, 1, and 2 are treated as a 3-bit
unsigned integer with 5 of the 8 possible values allocated, and the
other 3 reserved. The remaining bits are treated individually:
+----------------------------+---------------------+---------------+
| Meaning | Value | Reference |
+----------------------------+---------------------+---------------+
| | (Flags 0, 1, and 2) | |
| Reserved (do not allocate) | 0b000 | This document |
| SYN | 0b001 | This document |
| SYNACK | 0b010 | This document |
| ACK | 0b011 | This document |
| RSTACK | 0b100 | This document |
| Unassigned | 0b101 - 0b111 | |
| | (Flags 3 - 7) | |
| Unassigned | Flag 3 | |
| Unassigned | Flag 4 | |
| Unassigned | Flag 5 | |
| Unassigned | Flag 6 | |
| L Flag | Flag 7 | This document |
+----------------------------+---------------------+---------------+
<span class="h3"><a class="selflink" id="section-7.8" href="#section-7.8">7.8</a>. Error TLV Flags</span>
The TLV Flags field in the Error TLV (<a href="#section-4.3.2">Section 4.3.2</a>) is treated as an
unsigned 8-bit integer encoding the Error TLV number. The following
values are defined:
+--------------------------+------------------+---------------+
| Error TLV Name | Error TLV Number | Reference |
+--------------------------+------------------+---------------+
| Dictionary Conflict | 0x00 | This document |
| Bad String ID | 0x01 | This document |
| Unassigned | 0x02 - 0x7F | |
| Private/Experimental Use | 0x80 - 0xFF | This document |
+--------------------------+------------------+---------------+
<span class="grey">Lindgren, et al. Experimental [Page 101]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-102" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<span class="h3"><a class="selflink" id="section-7.9" href="#section-7.9">7.9</a>. RIB Dictionary TLV Flags</span>
The following TLV Flags are defined for the RIB Base Dictionary TLV
(<a href="#section-4.3.3">Section 4.3.3</a>):
+----------------------------+--------------+---------------+
| Meaning | Bit Position | Reference |
+----------------------------+--------------+---------------+
| Sent by Listener | Flag 0 | This document |
| Reserved (do not allocate) | Flag 1 | This document |
| Reserved (do not allocate) | Flag 2 | This document |
| Unassigned | Flag 3 | |
| Unassigned | Flag 4 | |
| Unassigned | Flag 5 | |
| Unassigned | Flag 6 | |
| Unassigned | Flag 7 | |
+----------------------------+--------------+---------------+
<span class="h3"><a class="selflink" id="section-7.10" href="#section-7.10">7.10</a>. RIB TLV Flags</span>
The following TLV Flags are defined for the RIB TLV (<a href="#section-4.3.4">Section 4.3.4</a>):
+----------------------------+--------------+---------------+
| Meaning | Bit Position | Reference |
+----------------------------+--------------+---------------+
| More RIB TLVs | Flag 0 | This document |
| Reserved (do not allocate) | Flag 1 | This document |
| Reserved (do not allocate) | Flag 2 | This document |
| Unassigned | Flag 3 | |
| Unassigned | Flag 4 | |
| Unassigned | Flag 5 | |
| Unassigned | Flag 6 | |
| Unassigned | Flag 7 | |
+----------------------------+--------------+---------------+
<span class="grey">Lindgren, et al. Experimental [Page 102]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-103" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<span class="h3"><a class="selflink" id="section-7.11" href="#section-7.11">7.11</a>. RIB Flags</span>
The following RIB Flags are defined for the individual entries in the
RIB TLV (<a href="#section-4.3.4">Section 4.3.4</a>):
+------------+--------------+-----------+
| Meaning | Bit Position | Reference |
+------------+--------------+-----------+
| Unassigned | Flag 0 | |
| Unassigned | Flag 1 | |
| Unassigned | Flag 2 | |
| Unassigned | Flag 3 | |
| Unassigned | Flag 4 | |
| Unassigned | Flag 5 | |
| Unassigned | Flag 6 | |
| Unassigned | Flag 7 | |
+------------+--------------+-----------+
<span class="h3"><a class="selflink" id="section-7.12" href="#section-7.12">7.12</a>. Bundle Offer and Response TLV Flags</span>
The following TLV Flags are defined for the Bundle Offer and Response
TLV (<a href="#section-4.3.5">Section 4.3.5</a>):
+------------------------------------+--------------+---------------+
| Meaning | Bit Position | Reference |
+------------------------------------+--------------+---------------+
| More Offer/Response TLVs Following | Flag 0 | This document |
| Unassigned | Flag 1 | |
| Unassigned | Flag 2 | |
| Unassigned | Flag 3 | |
| Unassigned | Flag 4 | |
| Unassigned | Flag 5 | |
| Unassigned | Flag 6 | |
| Unassigned | Flag 7 | |
+------------------------------------+--------------+---------------+
<span class="grey">Lindgren, et al. Experimental [Page 103]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-104" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<span class="h3"><a class="selflink" id="section-7.13" href="#section-7.13">7.13</a>. Bundle Offer and Response B Flags</span>
The following B Flags are defined for each Bundle Offer in the Bundle
Offer and Response TLV (<a href="#section-4.3.5">Section 4.3.5</a>):
+------------------------------------+--------------+---------------+
| Meaning | Bit Position | Reference |
+------------------------------------+--------------+---------------+
| Bundle Accepted | Flag 0 | This document |
| Bundle is a Fragment | Flag 1 | This document |
| Bundle Payload Length Included in | Flag 2 | This document |
| TLV | | |
| Unassigned | Flag 3 | |
| Unassigned | Flag 4 | |
| Unassigned | Flag 5 | |
| Unassigned | Flag 6 | |
| PRoPHET ACK | Flag 7 | This document |
+------------------------------------+--------------+---------------+
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Implementation Experience</span>
Multiple independent implementations of the PRoPHET protocol exist.
The first implementation is written in Java, and has been optimized
to run on the Lego MindStorms platform that has very limited
resources. Due to the resource constraints, some parts of the
protocol have been simplified or omitted, but the implementation
contains all the important mechanisms to ensure proper protocol
operation. The implementation is also highly modular and can be run
on another system with only minor modifications (it has currently
been shown to run on the Lego MindStorms platform and on regular
laptops).
Another implementation is written in C++ and runs in the OmNet++
simulator to enable testing and evaluation of the protocol and new
features. Experience and feedback from the implementers on early
versions of the protocol have been incorporated into the current
version.
An implementation compliant to an Internet-Draft (which was posted in
2006 and eventually evolved into this RFC) has been written at Baylor
University. This implementation has been integrated into the DTN2
reference implementation.
An implementation of the protocol in C++ was developed by one of the
authors (Samo Grasic) at Lulea University of Technology (LTU) as part
of the Saami Networking Connectivity project (see <a href="#section-9">Section 9</a>) and
continues to track the development of the protocol. This work is now
<span class="grey">Lindgren, et al. Experimental [Page 104]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-105" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
part of the Networking for Communications Challenged Communities
(N4C) project and is used in N4C testbeds.
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. Deployment Experience</span>
During a week in August 2006, a proof-of-concept deployment of a DTN
system, using the LTU PRoPHET implementation for routing was made in
the Swedish mountains -- the target area for the Saami Network
Connectivity project [<a href="#ref-ccnc07" title=""Experiences from Deploying a Real-life DTN System"">ccnc07</a>] [<a href="#ref-doria_02" title=""Providing connectivity to the Saami nomadic community"">doria_02</a>]. Four fixed camps with
application gateways, one Internet gateway, and seven mobile relays
were deployed. The deployment showed PRoPHET to be able to route
bundles generated by different applications such as email and web
caching.
Within the realms of the SNC and N4C projects, multiple other
deployments, both during summer and winter conditions, have been done
at various scales during 2007-2010 [<a href="#ref-winsdr08" title=""Networking in the Land of Northern Lights - Two Years of Experiences from DTN System Deployments"">winsdr08</a>].
An implementation has been made for Android-based mobile telephones
in the Bytewalla project [<a href="#ref-bytewalla" title=""Bytewalla 3: Network architecture and PRoPHET implementation"">bytewalla</a>].
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. Acknowledgements</span>
The authors would like to thank Olov Schelen and Kaustubh S. Phanse
for contributing valuable feedback regarding various aspects of the
protocol. We would also like to thank all other reviewers and the
DTNRG chairs for the feedback in the process of developing the
protocol. The Hello TLV mechanism is loosely based on the Adjacency
message developed for <a href="./rfc3292">RFC 3292</a>. Luka Birsa and Jeff Wilson have
provided us with feedback from doing implementations of the protocol
based on various preliminary versions of the document. Their
feedback has helped us make the document easier to read for an
implementer and has improved the protocol.
<span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. References</span>
<span class="h3"><a class="selflink" id="section-11.1" href="#section-11.1">11.1</a>. Normative References</span>
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
[<a id="ref-RFC5050">RFC5050</a>] Scott, K. and S. Burleigh, "Bundle Protocol
Specification", <a href="./rfc5050">RFC 5050</a>, November 2007.
<span class="grey">Lindgren, et al. Experimental [Page 105]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-106" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<span class="h3"><a class="selflink" id="section-11.2" href="#section-11.2">11.2</a>. Informative References</span>
[<a id="ref-CLAYER">CLAYER</a>] Demmer, M., Ott, J., and S. Perreault, "Delay Tolerant
Networking TCP Convergence Layer Protocol", Work
in Progress, August 2012.
[<a id="ref-RFC1058">RFC1058</a>] Hedrick, C., "Routing Information Protocol", <a href="./rfc1058">RFC 1058</a>,
June 1988.
[<a id="ref-RFC4838">RFC4838</a>] Cerf, V., Burleigh, S., Hooke, A., Torgerson, L.,
Durst, R., Scott, K., Fall, K., and H. Weiss, "Delay-
Tolerant Networking Architecture", <a href="./rfc4838">RFC 4838</a>,
April 2007.
[<a id="ref-RFC5226">RFC5226</a>] Narten, T. and H. Alvestrand, "Guidelines for Writing
an IANA Considerations Section in RFCs", <a href="https://www.rfc-editor.org/bcp/bcp26">BCP 26</a>,
<a href="./rfc5226">RFC 5226</a>, May 2008.
[<a id="ref-RFC6257">RFC6257</a>] Symington, S., Farrell, S., Weiss, H., and P. Lovell,
"Bundle Security Protocol Specification", <a href="./rfc6257">RFC 6257</a>,
May 2011.
[<a id="ref-bytewalla">bytewalla</a>] Prasad, M., "Bytewalla 3: Network architecture and
PRoPHET implementation", Bytewalla Project, KTH Royal
Institute of Technology, Stockholm, Sweden, October
2010,
<<a href="http://www.bytewalla.org/sites/bytewalla.org/files/Bytewalla3_Network_architecture_and_PRoPHET_v1.0.pdf">http://www.bytewalla.org/sites/bytewalla.org/files/</a>
<a href="http://www.bytewalla.org/sites/bytewalla.org/files/Bytewalla3_Network_architecture_and_PRoPHET_v1.0.pdf">Bytewalla3_Network_architecture_and_PRoPHET_v1.0.pdf</a>>.
[<a id="ref-ccnc07">ccnc07</a>] Lindgren, A. and A. Doria, "Experiences from Deploying
a Real-life DTN System", Proceedings of the 4th Annual
IEEE Consumer Communications and Networking Conference
(CCNC 2007), Las Vegas, Nevada, USA, January 2007.
[<a id="ref-doria_02">doria_02</a>] Doria, A., Uden, M., and D. Pandey, "Providing
connectivity to the Saami nomadic community",
Proceedings of the 2nd International Conference on
Open Collaborative Design for Sustainable Innovation
(dyd 02), Bangalore, India, December 2002.
[<a id="ref-lindgren_06">lindgren_06</a>] Lindgren, A. and K. Phanse, "Evaluation of Queueing
Policies and Forwarding Strategies for Routing in
Intermittently Connected Networks", Proceedings of
COMSWARE 2006, January 2006.
[<a id="ref-vahdat_00">vahdat_00</a>] Vahdat, A. and D. Becker, "Epidemic Routing for
Partially Connected Ad Hoc Networks", Duke University
Technical Report CS-200006, April 2000.
<span class="grey">Lindgren, et al. Experimental [Page 106]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-107" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
[<a id="ref-winsdr08">winsdr08</a>] Lindgren, A., Doria, A., Lindblom, J., and M. Ek,
"Networking in the Land of Northern Lights - Two Years
of Experiences from DTN System Deployments",
Proceedings of the ACM Wireless Networks and Systems
for Developing Regions Workshop (WiNS-DR), San
Francisco, California, USA, September 2008.
<span class="grey">Lindgren, et al. Experimental [Page 107]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-108" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>. PRoPHET Example</span>
To help grasp the concepts of PRoPHET, an example is provided to give
an understanding of the transitive property of the delivery
predictability and the basic operation of PRoPHET. In Figure 13, we
revisit the scenario where node A has a message it wants to send to
node D. In the bottom right corner of subfigures a-c, the delivery
predictability tables for the nodes are shown. Assume that nodes C
and D encounter each other frequently (Figure 13a), making the
delivery predictability values they have for each other high. Now
assume that node C also frequently encounters node B (Figure 13b).
Nodes B and C will get high delivery predictability values for each
other, and the transitive property will also increase the value B has
for D to a medium level. Finally, node B meets node A (Figure 13c),
which has a message for node D. Figure 13d shows the message
exchange between node A and node B. Summary vectors and delivery
predictability information is exchanged, delivery predictabilities
are updated, and node A then realizes that P_(b,d) > P_(a,d), and
thus forwards the message for node D to node B.
<span class="grey">Lindgren, et al. Experimental [Page 108]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-109" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
+----------------------------+ +----------------------------+
| | | |
| C | | D |
| D | | |
| B | | B C |
| | | |
| | | |
| | | |
| | | |
| A* | | A* |
+-------------+--------------+ +-------------+--------------+
| A | B | C | D | | A | B | C | D |
|B:low |A:low |A:low |A:low | |B:low |A:low |A:low |A:low |
|C:low |C:low |B:low |B:low | |C:low |C:high|B:high |B:low |
|D:low |D:low |D:high |C:high| |D:low |D:med |D:high |C:high|
+-------------+--------------+ +-------------+--------------+
(a) (b)
+----------------------------+ A B
| | | |
| D | |Summary vector&delivery pred|
| | |--------------------------->|
| C | |Summary vector&delivery pred|
| | |<---------------------------|
| | | |
| B* | Update delivery predictabilities
| A | | |
| | Packet for D not in SV |
+-------------+--------------+ P(b,d)>P(a,d) |
| A | B | C | D | Thus, send |
|B:low |A:low |A:low |A:low | | |
|C:med |C:high|B:high |B:low | | Packet for D |
|D:low+|D:med |D:high |C:high| |--------------------------->|
+-------------+--------------+ | |
(c) (d)
Figure 13: PRoPHET example
<span class="grey">Lindgren, et al. Experimental [Page 109]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-110" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
<span class="h2"><a class="selflink" id="appendix-B" href="#appendix-B">Appendix B</a>. Neighbor Discovery Example</span>
This section outlines an example of a simple neighbor discovery
protocol that can be run in-between PRoPHET and the underlying layer
in case lower layers do not provide methods for neighbor discovery.
It assumes that the underlying layer supports broadcast messages as
would be the case if a wireless infrastructure was involved.
Each node needs to maintain a list of its active neighbors. The
operation of the protocol is as follows:
1. Every BEACON_INTERVAL milliseconds, the node does a local
broadcast of a beacon that contains its identity and address, as
well as the BEACON_INTERVAL value used by the node.
2. Upon reception of a beacon, the following can happen:
A. The sending node is already in the list of active neighbors.
Update its entry in the list with the current time, and
update the node's BEACON_INTERVAL if it has changed.
B. The sending node is not in the list of active neighbors. Add
the node to the list of active neighbors and record the
current time and the node's BEACON_INTERVAL. Notify the
PRoPHET agent that a new neighbor is available ("New
Neighbor", as described in <a href="#section-2.4">Section 2.4</a>).
3. If a beacon has not been received from a node in the list of
active neighbors within a time period of NUM_ACCEPTED_LOSSES *
BEACON_INTERVAL (for the BEACON_INTERVAL used by that node), it
should be assumed that this node is no longer a neighbor. The
entry for this node should be removed from the list of active
neighbors, and the PRoPHET agent should be notified that a
neighbor has left ("Neighbor Gone", as described in <a href="#section-2.4">Section 2.4</a>).
<span class="h2"><a class="selflink" id="appendix-C" href="#appendix-C">Appendix C</a>. PRoPHET Parameter Calculation Example</span>
The evolution of the delivery predictabilities in a PRoPHET node is
controlled by three main equations defined in <a href="#section-2.1.2">Section 2.1.2</a>. These
equations use a number of parameters that need to be appropriately
configured to ensure that the delivery predictabilities evolve in a
way that mirrors the mobility model that applies in the PRoPHET zone
where the node is operating.
When trying to describe the mobility model, it is more likely that
the model will be couched in terms of statistical distribution of
times between encounters and times to deliver a bundle in the zone.
In this section, one possible way of deriving the PRoPHET parameters
<span class="grey">Lindgren, et al. Experimental [Page 110]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-111" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
from a more usual description of the model is presented. It should
be remembered that this may not be the only solution, and its
appropriateness will depend both on the overall mobility model and
the distribution of the times involved. There is an implicit
assumption in this work that these distributions can be characterized
by a normal-type distribution with a well-defined first moment
(mean). The exact form of the distribution is not considered here,
but more detailed models may wish to use more specific knowledge
about the distributions to refine the derivation of the parameters.
To characterize the model, we consider the following parameters:
P1 The time resolution of the model.
P2 The average time between encounters between nodes, I_typ, where
the identity of the nodes is not taken into account.
P3 The average number of encounters that a node has between meeting
a particular node and meeting the same node again.
P4 The average number of encounters needed to deliver a bundle in
this zone.
P5 The multiple of the average number of encounters needed to
deliver a bundle (P4) after which it can be assumed that a node
is not going to encounter a particular node again in the
foreseeable future so that the delivery predictability ought to
be decayed below P_first_threshold.
P6 The number of encounters between a particular pair of nodes that
should result in the delivery predictability of the encountered
node getting close to the maximum possible delivery
predictability (1 - delta).
We can use these parameters to derive appropriate values for gamma
and P_encounter_max, which are the key parameters in the evolution of
the delivery predictabilities. The values of the other parameters
P_encounter_first (0.5), P_first_threshold (0.1), and delta (0.01),
with the default values suggested in Figure 3, generally are not
specific to the mobility model, although in special cases
P_encounter_first may be different if extra information is available.
To select a value for gamma:
After a single, unrepeated encounter, the delivery predictability of
the encountered node should decay from P_encounter_first to
P_first_threshold in the expected time for P4 * P5 encounters. Thus:
<span class="grey">Lindgren, et al. Experimental [Page 111]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-112" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
P_first_threshold = P_encounter_first * gamma ^ ((P2 * P4 * P5)/P1)
which can be rearranged as
gamma =
exp(ln(P_first_threshold/P_encounter_first) * P1 / (P2* P4 * P5)).
Typical values of gamma will be less than 1, but very close to 1
(usually greater than 0.99). The value has to be stored to several
decimal places of accuracy, but implementations can create a table of
values for specific intervals to reduce the amount of on-the-fly
calculation required.
Selecting a value for P_encounter_max:
Once gamma has been determined, the decay factor for the average time
between encounters between a specific pair of nodes can be
calculated:
Decay_typ = gamma ^ ((P2 * P3)/P1)
Starting with P_encounter_first, using Decay_typ and applying
Equation 1 from <a href="#section-2.1.2">Section 2.1.2</a> (P6 - 1) times, we can calculate the
typical delivery predictability for the encountered node after P6
encounters. The nature of Equation 1 is such that it is not easy to
produce a closed form that generates a value of P_encounter_max from
the parameter values, but using a spreadsheet to apply the equation
repeatedly and tabulate the results will allow a suitable value of
P_encounter_max to be chosen very simply. The evolution is not very
sensitive to the value of P_encounter_max, and values in the range
0.4 to 0.8 will generally be appropriate. A value of 0.7 is
recommended as a default.
Once a PRoPHET zone has been in operation for some time, the logs of
the actual encounters can and should be used to check that the
selected parameters were appropriate and to tune them as necessary.
In the longer term, it may prove possible to install a learning mode
in nodes so that the parameters can be adjusted dynamically to
maintain best congruence with the mobility model that may itself
change over time.
<span class="grey">Lindgren, et al. Experimental [Page 112]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-113" ></span>
<span class="grey"><a href="./rfc6693">RFC 6693</a> PRoPHET August 2012</span>
Authors' Addresses
Anders F. Lindgren
Swedish Institute of Computer Science
Box 1263
Kista SE-164 29
SE
Phone: +46707177269
EMail: andersl@sics.se
URI: <a href="http://www.sics.se/~andersl">http://www.sics.se/~andersl</a>
Avri Doria
Technicalities
Providence RI
US
EMail: avri@acm.org
URI: <a href="http://psg.com/~avri">http://psg.com/~avri</a>
Elwyn Davies
Folly Consulting
Soham
UK
EMail: elwynd@folly.org.uk
Samo Grasic
Lulea University of Technology
Lulea SE-971 87
SE
EMail: samo.grasic@ltu.se
Lindgren, et al. Experimental [Page 113]
</pre>
|