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
|
<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="std" consensus="true" docName="draft-ietf-tram-turnbis-29" indexInclude="true" ipr="trust200902" number="8656" obsoletes="5766, 6156" prepTime="2020-02-21T22:11:30" scripts="Common,Latin" sortRefs="true" submissionType="IETF" symRefs="true" tocDepth="3" tocInclude="true" xml:lang="en">
<link href="https://datatracker.ietf.org/doc/draft-ietf-tram-turnbis-29" rel="prev"/>
<link href="https://dx.doi.org/10.17487/rfc8656" rel="alternate"/>
<link href="urn:issn:2070-1721" rel="alternate"/>
<front>
<title abbrev="TURN">Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN)</title>
<seriesInfo name="RFC" value="8656" stream="IETF"/>
<author fullname="Tirumaleswar Reddy" initials="T." role="editor" surname="Reddy">
<organization abbrev="McAfee" showOnFrontPage="true">McAfee, Inc.</organization>
<address>
<postal>
<street>Embassy Golf Link Business Park</street>
<city>Bangalore</city>
<region>Karnataka</region>
<code>560071</code>
<country>India</country>
</postal>
<email>kondtir@gmail.com</email>
</address>
</author>
<author fullname="Alan Johnston" initials="A." role="editor" surname="Johnston">
<organization showOnFrontPage="true">Villanova University</organization>
<address>
<postal>
<street/>
<city>Villanova</city>
<region>PA</region>
<code/>
<country>United States of America</country>
</postal>
<email>alan.b.johnston@gmail.com</email>
</address>
</author>
<author fullname="Philip Matthews" initials="P." surname="Matthews">
<organization showOnFrontPage="true">Alcatel-Lucent</organization>
<address>
<postal>
<street>600 March Road</street>
<city>Ottawa</city>
<region>Ontario</region>
<code/>
<country>Canada</country>
</postal>
<email>philip_matthews@magma.ca</email>
</address>
</author>
<author fullname="Jonathan Rosenberg" initials="J." surname="Rosenberg">
<organization showOnFrontPage="true">jdrosen.net</organization>
<address>
<postal>
<street/>
<city>Edison</city>
<region>NJ</region>
<country>United States of America</country>
</postal>
<email>jdrosen@jdrosen.net</email>
<uri>http://www.jdrosen.net</uri>
</address>
</author>
<date month="02" year="2020"/>
<area>Transport</area>
<workgroup>TRAM WG</workgroup>
<keyword>NAT</keyword>
<keyword>TURN</keyword>
<keyword>STUN</keyword>
<keyword>ICE</keyword>
<abstract pn="section-abstract">
<t pn="section-abstract-1">If a host is located behind a NAT, it can be impossible for that host
to communicate directly with other hosts (peers) in certain
situations. In these situations, it is necessary for the host to use the
services of an intermediate node that acts as a communication relay.
This specification defines a protocol, called "Traversal Using Relays
around NAT" (TURN), that allows the host to control the operation of the
relay and to exchange packets with its peers using the relay. TURN
differs from other relay control protocols in that it allows a client to
communicate with multiple peers using a single relay address.</t>
<t pn="section-abstract-2">The TURN protocol was designed to be used as part of the Interactive
Connectivity Establishment (ICE) approach to NAT traversal,
though it can also be used without ICE.</t>
<t pn="section-abstract-3">This document obsoletes RFCs 5766 and 6156.</t>
</abstract>
<boilerplate>
<section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
<name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
<t pn="section-boilerplate.1-1">
This is an Internet Standards Track document.
</t>
<t pn="section-boilerplate.1-2">
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by
the Internet Engineering Steering Group (IESG). Further
information on Internet Standards is available in Section 2 of
RFC 7841.
</t>
<t pn="section-boilerplate.1-3">
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
<eref target="https://www.rfc-editor.org/info/rfc8656" brackets="none"/>.
</t>
</section>
<section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
<name slugifiedName="name-copyright-notice">Copyright Notice</name>
<t pn="section-boilerplate.2-1">
Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved.
</t>
<t pn="section-boilerplate.2-2">
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) 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. Code Components extracted from this
document must include Simplified BSD License text as described in
Section 4.e of the Trust Legal Provisions and are provided without
warranty as described in the Simplified BSD License.
</t>
</section>
</boilerplate>
<toc>
<section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
<name slugifiedName="name-table-of-contents">Table of Contents</name>
<ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
<li pn="section-toc.1-1.1">
<t keepWithNext="true" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
</li>
<li pn="section-toc.1-1.2">
<t keepWithNext="true" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-terminology">Terminology</xref></t>
</li>
<li pn="section-toc.1-1.3">
<t keepWithNext="true" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-overview-of-operation">Overview of Operation</xref></t>
<ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2">
<li pn="section-toc.1-1.3.2.1">
<t keepWithNext="true" pn="section-toc.1-1.3.2.1.1"><xref derivedContent="3.1" format="counter" sectionFormat="of" target="section-3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-transports">Transports</xref></t>
</li>
<li pn="section-toc.1-1.3.2.2">
<t keepWithNext="true" pn="section-toc.1-1.3.2.2.1"><xref derivedContent="3.2" format="counter" sectionFormat="of" target="section-3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-allocations">Allocations</xref></t>
</li>
<li pn="section-toc.1-1.3.2.3">
<t keepWithNext="true" pn="section-toc.1-1.3.2.3.1"><xref derivedContent="3.3" format="counter" sectionFormat="of" target="section-3.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-permissions">Permissions</xref></t>
</li>
<li pn="section-toc.1-1.3.2.4">
<t keepWithNext="true" pn="section-toc.1-1.3.2.4.1"><xref derivedContent="3.4" format="counter" sectionFormat="of" target="section-3.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-send-mechanism">Send Mechanism</xref></t>
</li>
<li pn="section-toc.1-1.3.2.5">
<t keepWithNext="true" pn="section-toc.1-1.3.2.5.1"><xref derivedContent="3.5" format="counter" sectionFormat="of" target="section-3.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-channels">Channels</xref></t>
</li>
<li pn="section-toc.1-1.3.2.6">
<t keepWithNext="true" pn="section-toc.1-1.3.2.6.1"><xref derivedContent="3.6" format="counter" sectionFormat="of" target="section-3.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-unprivileged-turn-servers">Unprivileged TURN Servers</xref></t>
</li>
<li pn="section-toc.1-1.3.2.7">
<t keepWithNext="true" pn="section-toc.1-1.3.2.7.1"><xref derivedContent="3.7" format="counter" sectionFormat="of" target="section-3.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-avoiding-ip-fragmentation">Avoiding IP Fragmentation</xref></t>
</li>
<li pn="section-toc.1-1.3.2.8">
<t keepWithNext="true" pn="section-toc.1-1.3.2.8.1"><xref derivedContent="3.8" format="counter" sectionFormat="of" target="section-3.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-rtp-support">RTP Support</xref></t>
</li>
<li pn="section-toc.1-1.3.2.9">
<t keepWithNext="true" pn="section-toc.1-1.3.2.9.1"><xref derivedContent="3.9" format="counter" sectionFormat="of" target="section-3.9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-happy-eyeballs-for-turn">Happy Eyeballs for TURN</xref></t>
</li>
</ul>
</li>
<li pn="section-toc.1-1.4">
<t keepWithNext="true" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-discovery-of-turn-server">Discovery of TURN Server</xref></t>
<ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2">
<li pn="section-toc.1-1.4.2.1">
<t keepWithNext="true" pn="section-toc.1-1.4.2.1.1"><xref derivedContent="4.1" format="counter" sectionFormat="of" target="section-4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-turn-uri-scheme-semantics">TURN URI Scheme Semantics</xref></t>
</li>
</ul>
</li>
<li pn="section-toc.1-1.5">
<t keepWithNext="true" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-general-behavior">General Behavior</xref></t>
</li>
<li pn="section-toc.1-1.6">
<t keepWithNext="true" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-allocations-2">Allocations</xref></t>
</li>
<li pn="section-toc.1-1.7">
<t keepWithNext="true" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-creating-an-allocation">Creating an Allocation</xref></t>
<ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.7.2">
<li pn="section-toc.1-1.7.2.1">
<t keepWithNext="true" pn="section-toc.1-1.7.2.1.1"><xref derivedContent="7.1" format="counter" sectionFormat="of" target="section-7.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-sending-an-allocate-request">Sending an Allocate Request</xref></t>
</li>
<li pn="section-toc.1-1.7.2.2">
<t keepWithNext="true" pn="section-toc.1-1.7.2.2.1"><xref derivedContent="7.2" format="counter" sectionFormat="of" target="section-7.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-receiving-an-allocate-reque">Receiving an Allocate Request</xref></t>
</li>
<li pn="section-toc.1-1.7.2.3">
<t keepWithNext="true" pn="section-toc.1-1.7.2.3.1"><xref derivedContent="7.3" format="counter" sectionFormat="of" target="section-7.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-receiving-an-allocate-succe">Receiving an Allocate Success Response</xref></t>
</li>
<li pn="section-toc.1-1.7.2.4">
<t keepWithNext="true" pn="section-toc.1-1.7.2.4.1"><xref derivedContent="7.4" format="counter" sectionFormat="of" target="section-7.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-receiving-an-allocate-error">Receiving an Allocate Error Response</xref></t>
</li>
</ul>
</li>
<li pn="section-toc.1-1.8">
<t keepWithNext="true" pn="section-toc.1-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-refreshing-an-allocation">Refreshing an Allocation</xref></t>
<ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.8.2">
<li pn="section-toc.1-1.8.2.1">
<t keepWithNext="true" pn="section-toc.1-1.8.2.1.1"><xref derivedContent="8.1" format="counter" sectionFormat="of" target="section-8.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-sending-a-refresh-request">Sending a Refresh Request</xref></t>
</li>
<li pn="section-toc.1-1.8.2.2">
<t keepWithNext="true" pn="section-toc.1-1.8.2.2.1"><xref derivedContent="8.2" format="counter" sectionFormat="of" target="section-8.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-receiving-a-refresh-request">Receiving a Refresh Request</xref></t>
</li>
<li pn="section-toc.1-1.8.2.3">
<t keepWithNext="true" pn="section-toc.1-1.8.2.3.1"><xref derivedContent="8.3" format="counter" sectionFormat="of" target="section-8.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-receiving-a-refresh-respons">Receiving a Refresh Response</xref></t>
</li>
</ul>
</li>
<li pn="section-toc.1-1.9">
<t keepWithNext="true" pn="section-toc.1-1.9.1"><xref derivedContent="9" format="counter" sectionFormat="of" target="section-9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-permissions-2">Permissions</xref></t>
</li>
<li pn="section-toc.1-1.10">
<t keepWithNext="true" pn="section-toc.1-1.10.1"><xref derivedContent="10" format="counter" sectionFormat="of" target="section-10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-createpermission">CreatePermission</xref></t>
<ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2">
<li pn="section-toc.1-1.10.2.1">
<t keepWithNext="true" pn="section-toc.1-1.10.2.1.1"><xref derivedContent="10.1" format="counter" sectionFormat="of" target="section-10.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-forming-a-createpermission-">Forming a CreatePermission Request</xref></t>
</li>
<li pn="section-toc.1-1.10.2.2">
<t keepWithNext="true" pn="section-toc.1-1.10.2.2.1"><xref derivedContent="10.2" format="counter" sectionFormat="of" target="section-10.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-receiving-a-createpermissio">Receiving a CreatePermission Request</xref></t>
</li>
<li pn="section-toc.1-1.10.2.3">
<t keepWithNext="true" pn="section-toc.1-1.10.2.3.1"><xref derivedContent="10.3" format="counter" sectionFormat="of" target="section-10.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-receiving-a-createpermission">Receiving a CreatePermission Response</xref></t>
</li>
</ul>
</li>
<li pn="section-toc.1-1.11">
<t keepWithNext="true" pn="section-toc.1-1.11.1"><xref derivedContent="11" format="counter" sectionFormat="of" target="section-11"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-send-and-data-methods">Send and Data Methods</xref></t>
<ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.11.2">
<li pn="section-toc.1-1.11.2.1">
<t keepWithNext="true" pn="section-toc.1-1.11.2.1.1"><xref derivedContent="11.1" format="counter" sectionFormat="of" target="section-11.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-forming-a-send-indication">Forming a Send Indication</xref></t>
</li>
<li pn="section-toc.1-1.11.2.2">
<t keepWithNext="true" pn="section-toc.1-1.11.2.2.1"><xref derivedContent="11.2" format="counter" sectionFormat="of" target="section-11.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-receiving-a-send-indication">Receiving a Send Indication</xref></t>
</li>
<li pn="section-toc.1-1.11.2.3">
<t keepWithNext="true" pn="section-toc.1-1.11.2.3.1"><xref derivedContent="11.3" format="counter" sectionFormat="of" target="section-11.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-receiving-a-udp-datagram">Receiving a UDP Datagram</xref></t>
</li>
<li pn="section-toc.1-1.11.2.4">
<t keepWithNext="true" pn="section-toc.1-1.11.2.4.1"><xref derivedContent="11.4" format="counter" sectionFormat="of" target="section-11.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-receiving-a-data-indication">Receiving a Data Indication</xref></t>
</li>
<li pn="section-toc.1-1.11.2.5">
<t keepWithNext="true" pn="section-toc.1-1.11.2.5.1"><xref derivedContent="11.5" format="counter" sectionFormat="of" target="section-11.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-receiving-an-icmp-packet">Receiving an ICMP Packet</xref></t>
</li>
<li pn="section-toc.1-1.11.2.6">
<t keepWithNext="true" pn="section-toc.1-1.11.2.6.1"><xref derivedContent="11.6" format="counter" sectionFormat="of" target="section-11.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-receiving-a-data-indication-">Receiving a Data Indication with an ICMP Attribute</xref></t>
</li>
</ul>
</li>
<li pn="section-toc.1-1.12">
<t keepWithNext="true" pn="section-toc.1-1.12.1"><xref derivedContent="12" format="counter" sectionFormat="of" target="section-12"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-channels-2">Channels</xref></t>
<ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.12.2">
<li pn="section-toc.1-1.12.2.1">
<t keepWithNext="true" pn="section-toc.1-1.12.2.1.1"><xref derivedContent="12.1" format="counter" sectionFormat="of" target="section-12.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-sending-a-channelbind-reque">Sending a ChannelBind Request</xref></t>
</li>
<li pn="section-toc.1-1.12.2.2">
<t keepWithNext="true" pn="section-toc.1-1.12.2.2.1"><xref derivedContent="12.2" format="counter" sectionFormat="of" target="section-12.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-receiving-a-channelbind-req">Receiving a ChannelBind Request</xref></t>
</li>
<li pn="section-toc.1-1.12.2.3">
<t keepWithNext="true" pn="section-toc.1-1.12.2.3.1"><xref derivedContent="12.3" format="counter" sectionFormat="of" target="section-12.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-receiving-a-channelbind-res">Receiving a ChannelBind Response</xref></t>
</li>
<li pn="section-toc.1-1.12.2.4">
<t keepWithNext="true" pn="section-toc.1-1.12.2.4.1"><xref derivedContent="12.4" format="counter" sectionFormat="of" target="section-12.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-channeldata-message">The ChannelData Message</xref></t>
</li>
<li pn="section-toc.1-1.12.2.5">
<t keepWithNext="true" pn="section-toc.1-1.12.2.5.1"><xref derivedContent="12.5" format="counter" sectionFormat="of" target="section-12.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-sending-a-channeldata-messa">Sending a ChannelData Message</xref></t>
</li>
<li pn="section-toc.1-1.12.2.6">
<t keepWithNext="true" pn="section-toc.1-1.12.2.6.1"><xref derivedContent="12.6" format="counter" sectionFormat="of" target="section-12.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-receiving-a-channeldata-mes">Receiving a ChannelData Message</xref></t>
</li>
<li pn="section-toc.1-1.12.2.7">
<t keepWithNext="true" pn="section-toc.1-1.12.2.7.1"><xref derivedContent="12.7" format="counter" sectionFormat="of" target="section-12.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-relaying-data-from-the-peer">Relaying Data from the Peer</xref></t>
</li>
</ul>
</li>
<li pn="section-toc.1-1.13">
<t keepWithNext="true" pn="section-toc.1-1.13.1"><xref derivedContent="13" format="counter" sectionFormat="of" target="section-13"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-packet-translations">Packet Translations</xref></t>
<ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.13.2">
<li pn="section-toc.1-1.13.2.1">
<t keepWithNext="true" pn="section-toc.1-1.13.2.1.1"><xref derivedContent="13.1" format="counter" sectionFormat="of" target="section-13.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-ipv4-to-ipv6-translations">IPv4-to-IPv6 Translations</xref></t>
</li>
<li pn="section-toc.1-1.13.2.2">
<t keepWithNext="true" pn="section-toc.1-1.13.2.2.1"><xref derivedContent="13.2" format="counter" sectionFormat="of" target="section-13.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-ipv6-to-ipv6-translations">IPv6-to-IPv6 Translations</xref></t>
</li>
<li pn="section-toc.1-1.13.2.3">
<t keepWithNext="true" pn="section-toc.1-1.13.2.3.1"><xref derivedContent="13.3" format="counter" sectionFormat="of" target="section-13.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-ipv6-to-ipv4-translations">IPv6-to-IPv4 Translations</xref></t>
</li>
</ul>
</li>
<li pn="section-toc.1-1.14">
<t keepWithNext="true" pn="section-toc.1-1.14.1"><xref derivedContent="14" format="counter" sectionFormat="of" target="section-14"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-udp-to-udp-relay">UDP-to-UDP Relay</xref></t>
</li>
<li pn="section-toc.1-1.15">
<t keepWithNext="true" pn="section-toc.1-1.15.1"><xref derivedContent="15" format="counter" sectionFormat="of" target="section-15"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-tcp-to-udp-relay">TCP-to-UDP Relay</xref></t>
</li>
<li pn="section-toc.1-1.16">
<t keepWithNext="true" pn="section-toc.1-1.16.1"><xref derivedContent="16" format="counter" sectionFormat="of" target="section-16"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-udp-to-tcp-relay">UDP-to-TCP Relay</xref></t>
</li>
<li pn="section-toc.1-1.17">
<t keepWithNext="true" pn="section-toc.1-1.17.1"><xref derivedContent="17" format="counter" sectionFormat="of" target="section-17"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-stun-methods">STUN Methods</xref></t>
</li>
<li pn="section-toc.1-1.18">
<t keepWithNext="true" pn="section-toc.1-1.18.1"><xref derivedContent="18" format="counter" sectionFormat="of" target="section-18"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-stun-attributes">STUN Attributes</xref></t>
<ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.18.2">
<li pn="section-toc.1-1.18.2.1">
<t keepWithNext="true" pn="section-toc.1-1.18.2.1.1"><xref derivedContent="18.1" format="counter" sectionFormat="of" target="section-18.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-channel-number">CHANNEL-NUMBER</xref></t>
</li>
<li pn="section-toc.1-1.18.2.2">
<t keepWithNext="true" pn="section-toc.1-1.18.2.2.1"><xref derivedContent="18.2" format="counter" sectionFormat="of" target="section-18.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-lifetime">LIFETIME</xref></t>
</li>
<li pn="section-toc.1-1.18.2.3">
<t keepWithNext="true" pn="section-toc.1-1.18.2.3.1"><xref derivedContent="18.3" format="counter" sectionFormat="of" target="section-18.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-xor-peer-address">XOR-PEER-ADDRESS</xref></t>
</li>
<li pn="section-toc.1-1.18.2.4">
<t keepWithNext="true" pn="section-toc.1-1.18.2.4.1"><xref derivedContent="18.4" format="counter" sectionFormat="of" target="section-18.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-data">DATA</xref></t>
</li>
<li pn="section-toc.1-1.18.2.5">
<t keepWithNext="true" pn="section-toc.1-1.18.2.5.1"><xref derivedContent="18.5" format="counter" sectionFormat="of" target="section-18.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-xor-relayed-address">XOR-RELAYED-ADDRESS</xref></t>
</li>
<li pn="section-toc.1-1.18.2.6">
<t keepWithNext="true" pn="section-toc.1-1.18.2.6.1"><xref derivedContent="18.6" format="counter" sectionFormat="of" target="section-18.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-requested-address-family">REQUESTED-ADDRESS-FAMILY</xref></t>
</li>
<li pn="section-toc.1-1.18.2.7">
<t keepWithNext="true" pn="section-toc.1-1.18.2.7.1"><xref derivedContent="18.7" format="counter" sectionFormat="of" target="section-18.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-even-port">EVEN-PORT</xref></t>
</li>
<li pn="section-toc.1-1.18.2.8">
<t keepWithNext="true" pn="section-toc.1-1.18.2.8.1"><xref derivedContent="18.8" format="counter" sectionFormat="of" target="section-18.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-requested-transport">REQUESTED-TRANSPORT</xref></t>
</li>
<li pn="section-toc.1-1.18.2.9">
<t keepWithNext="true" pn="section-toc.1-1.18.2.9.1"><xref derivedContent="18.9" format="counter" sectionFormat="of" target="section-18.9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-dont-fragment">DONT-FRAGMENT</xref></t>
</li>
<li pn="section-toc.1-1.18.2.10">
<t keepWithNext="true" pn="section-toc.1-1.18.2.10.1"><xref derivedContent="18.10" format="counter" sectionFormat="of" target="section-18.10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-reservation-token">RESERVATION-TOKEN</xref></t>
</li>
<li pn="section-toc.1-1.18.2.11">
<t keepWithNext="true" pn="section-toc.1-1.18.2.11.1"><xref derivedContent="18.11" format="counter" sectionFormat="of" target="section-18.11"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-additional-address-family">ADDITIONAL-ADDRESS-FAMILY</xref></t>
</li>
<li pn="section-toc.1-1.18.2.12">
<t keepWithNext="true" pn="section-toc.1-1.18.2.12.1"><xref derivedContent="18.12" format="counter" sectionFormat="of" target="section-18.12"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-address-error-code">ADDRESS-ERROR-CODE</xref></t>
</li>
<li pn="section-toc.1-1.18.2.13">
<t keepWithNext="true" pn="section-toc.1-1.18.2.13.1"><xref derivedContent="18.13" format="counter" sectionFormat="of" target="section-18.13"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-icmp">ICMP</xref></t>
</li>
</ul>
</li>
<li pn="section-toc.1-1.19">
<t keepWithNext="true" pn="section-toc.1-1.19.1"><xref derivedContent="19" format="counter" sectionFormat="of" target="section-19"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-stun-error-response-codes">STUN Error Response Codes</xref></t>
</li>
<li pn="section-toc.1-1.20">
<t keepWithNext="true" pn="section-toc.1-1.20.1"><xref derivedContent="20" format="counter" sectionFormat="of" target="section-20"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-detailed-example">Detailed Example</xref></t>
</li>
<li pn="section-toc.1-1.21">
<t keepWithNext="true" pn="section-toc.1-1.21.1"><xref derivedContent="21" format="counter" sectionFormat="of" target="section-21"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
<ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.21.2">
<li pn="section-toc.1-1.21.2.1">
<t keepWithNext="true" pn="section-toc.1-1.21.2.1.1"><xref derivedContent="21.1" format="counter" sectionFormat="of" target="section-21.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-outsider-attacks">Outsider Attacks</xref></t>
<ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.21.2.1.2">
<li pn="section-toc.1-1.21.2.1.2.1">
<t keepWithNext="true" pn="section-toc.1-1.21.2.1.2.1.1"><xref derivedContent="21.1.1" format="counter" sectionFormat="of" target="section-21.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-obtaining-unauthorized-allo">Obtaining Unauthorized Allocations</xref></t>
</li>
<li pn="section-toc.1-1.21.2.1.2.2">
<t keepWithNext="true" pn="section-toc.1-1.21.2.1.2.2.1"><xref derivedContent="21.1.2" format="counter" sectionFormat="of" target="section-21.1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-offline-dictionary-attacks">Offline Dictionary Attacks</xref></t>
</li>
<li pn="section-toc.1-1.21.2.1.2.3">
<t keepWithNext="true" pn="section-toc.1-1.21.2.1.2.3.1"><xref derivedContent="21.1.3" format="counter" sectionFormat="of" target="section-21.1.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-faked-refreshes-and-permiss">Faked Refreshes and Permissions</xref></t>
</li>
<li pn="section-toc.1-1.21.2.1.2.4">
<t keepWithNext="true" pn="section-toc.1-1.21.2.1.2.4.1"><xref derivedContent="21.1.4" format="counter" sectionFormat="of" target="section-21.1.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-fake-data">Fake Data</xref></t>
</li>
<li pn="section-toc.1-1.21.2.1.2.5">
<t keepWithNext="true" pn="section-toc.1-1.21.2.1.2.5.1"><xref derivedContent="21.1.5" format="counter" sectionFormat="of" target="section-21.1.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-impersonating-a-server">Impersonating a Server</xref></t>
</li>
<li pn="section-toc.1-1.21.2.1.2.6">
<t keepWithNext="true" pn="section-toc.1-1.21.2.1.2.6.1"><xref derivedContent="21.1.6" format="counter" sectionFormat="of" target="section-21.1.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-eavesdropping-traffic">Eavesdropping Traffic</xref></t>
</li>
<li pn="section-toc.1-1.21.2.1.2.7">
<t keepWithNext="true" pn="section-toc.1-1.21.2.1.2.7.1"><xref derivedContent="21.1.7" format="counter" sectionFormat="of" target="section-21.1.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-turn-loop-attack">TURN Loop Attack</xref></t>
</li>
</ul>
</li>
<li pn="section-toc.1-1.21.2.2">
<t keepWithNext="true" pn="section-toc.1-1.21.2.2.1"><xref derivedContent="21.2" format="counter" sectionFormat="of" target="section-21.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-firewall-considerations">Firewall Considerations</xref></t>
<ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.21.2.2.2">
<li pn="section-toc.1-1.21.2.2.2.1">
<t keepWithNext="true" pn="section-toc.1-1.21.2.2.2.1.1"><xref derivedContent="21.2.1" format="counter" sectionFormat="of" target="section-21.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-faked-permissions">Faked Permissions</xref></t>
</li>
<li pn="section-toc.1-1.21.2.2.2.2">
<t keepWithNext="true" pn="section-toc.1-1.21.2.2.2.2.1"><xref derivedContent="21.2.2" format="counter" sectionFormat="of" target="section-21.2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-blacklisted-ip-addresses">Blacklisted IP Addresses</xref></t>
</li>
<li pn="section-toc.1-1.21.2.2.2.3">
<t keepWithNext="true" pn="section-toc.1-1.21.2.2.2.3.1"><xref derivedContent="21.2.3" format="counter" sectionFormat="of" target="section-21.2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-running-servers-on-well-kno">Running Servers on Well-Known Ports</xref></t>
</li>
</ul>
</li>
<li pn="section-toc.1-1.21.2.3">
<t keepWithNext="true" pn="section-toc.1-1.21.2.3.1"><xref derivedContent="21.3" format="counter" sectionFormat="of" target="section-21.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-insider-attacks">Insider Attacks</xref></t>
<ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.21.2.3.2">
<li pn="section-toc.1-1.21.2.3.2.1">
<t keepWithNext="true" pn="section-toc.1-1.21.2.3.2.1.1"><xref derivedContent="21.3.1" format="counter" sectionFormat="of" target="section-21.3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-dos-against-turn-server">DoS against TURN Server</xref></t>
</li>
<li pn="section-toc.1-1.21.2.3.2.2">
<t keepWithNext="true" pn="section-toc.1-1.21.2.3.2.2.1"><xref derivedContent="21.3.2" format="counter" sectionFormat="of" target="section-21.3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-anonymous-relaying-of-malic">Anonymous Relaying of Malicious Traffic</xref></t>
</li>
<li pn="section-toc.1-1.21.2.3.2.3">
<t keepWithNext="true" pn="section-toc.1-1.21.2.3.2.3.1"><xref derivedContent="21.3.3" format="counter" sectionFormat="of" target="section-21.3.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-manipulating-other-allocati">Manipulating Other Allocations</xref></t>
</li>
</ul>
</li>
<li pn="section-toc.1-1.21.2.4">
<t keepWithNext="true" pn="section-toc.1-1.21.2.4.1"><xref derivedContent="21.4" format="counter" sectionFormat="of" target="section-21.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-tunnel-amplification-attack">Tunnel Amplification Attack</xref></t>
</li>
<li pn="section-toc.1-1.21.2.5">
<t keepWithNext="true" pn="section-toc.1-1.21.2.5.1"><xref derivedContent="21.5" format="counter" sectionFormat="of" target="section-21.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-other-considerations">Other Considerations</xref></t>
</li>
</ul>
</li>
<li pn="section-toc.1-1.22">
<t keepWithNext="true" pn="section-toc.1-1.22.1"><xref derivedContent="22" format="counter" sectionFormat="of" target="section-22"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
</li>
<li pn="section-toc.1-1.23">
<t keepWithNext="true" pn="section-toc.1-1.23.1"><xref derivedContent="23" format="counter" sectionFormat="of" target="section-23"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-iab-considerations">IAB Considerations</xref></t>
</li>
<li pn="section-toc.1-1.24">
<t keepWithNext="true" pn="section-toc.1-1.24.1"><xref derivedContent="24" format="counter" sectionFormat="of" target="section-24"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-changes-since-rfc-5766">Changes since RFC 5766</xref></t>
</li>
<li pn="section-toc.1-1.25">
<t keepWithNext="true" pn="section-toc.1-1.25.1"><xref derivedContent="25" format="counter" sectionFormat="of" target="section-25"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-updates-to-rfc-6156">Updates to RFC 6156</xref></t>
</li>
<li pn="section-toc.1-1.26">
<t keepWithNext="true" pn="section-toc.1-1.26.1"><xref derivedContent="26" format="counter" sectionFormat="of" target="section-26"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-references">References</xref></t>
<ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.26.2">
<li pn="section-toc.1-1.26.2.1">
<t keepWithNext="true" pn="section-toc.1-1.26.2.1.1"><xref derivedContent="26.1" format="counter" sectionFormat="of" target="section-26.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
</li>
<li pn="section-toc.1-1.26.2.2">
<t keepWithNext="true" pn="section-toc.1-1.26.2.2.1"><xref derivedContent="26.2" format="counter" sectionFormat="of" target="section-26.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
</li>
</ul>
</li>
<li pn="section-toc.1-1.27">
<t keepWithNext="true" pn="section-toc.1-1.27.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.a"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgements">Acknowledgements</xref></t>
</li>
<li pn="section-toc.1-1.28">
<t keepWithNext="true" pn="section-toc.1-1.28.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
</li>
</ul>
</section>
</toc>
</front>
<middle>
<section numbered="true" toc="include" removeInRFC="false" pn="section-1">
<name slugifiedName="name-introduction">Introduction</name>
<t pn="section-1-1">A host behind a NAT may wish to exchange packets with other hosts,
some of which may also be behind NATs. To do this, the hosts involved
can use "hole punching" techniques (see <xref target="RFC5128" format="default" sectionFormat="of" derivedContent="RFC5128"/>)
in an attempt to discover a direct communication path; that is, a
communication path that goes from one host to another through
intervening NATs and routers but does not traverse any relays.</t>
<t pn="section-1-2">As described in <xref target="RFC5128" format="default" sectionFormat="of" derivedContent="RFC5128"/> and <xref target="RFC4787" format="default" sectionFormat="of" derivedContent="RFC4787"/>, hole punching techniques will fail
if both hosts are behind NATs that are not well behaved. For example, if
both hosts are behind NATs that have a mapping behavior of
"address-dependent mapping" or "address- and port-dependent mapping"
(see <xref target="RFC4787" sectionFormat="of" section="4.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4787#section-4.1" derivedContent="RFC4787"/>), then
hole punching techniques generally fail.</t>
<t pn="section-1-3">When a direct communication path cannot be found, it is necessary to
use the services of an intermediate host that acts as a relay for the
packets. This relay typically sits in the public Internet and relays
packets between two hosts that both sit behind NATs.</t>
<t pn="section-1-4">In many enterprise networks, direct UDP transmissions are not
permitted between clients on the internal networks and external IP
addresses. To permit media sessions in such a situation to use UDP and
avoid forcing them through TCP, an Enterprise Firewall can be configured
to allow UDP traffic relayed through an Enterprise relay server. WebRTC
requires support for this scenario (see <xref target="RFC7478" sectionFormat="of" section="2.3.5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7478#section-2.3.5.1" derivedContent="RFC7478"/>). Some users of SIP or WebRTC
want IP location privacy from the remote peer. In this scenario, the
client can select a relay server offering IP location privacy and only
convey the relayed candidates to the peer for ICE connectivity checks
(see <xref target="I-D.ietf-rtcweb-security" sectionFormat="of" section="4.2.4" format="default" derivedLink="https://tools.ietf.org/html/draft-ietf-rtcweb-security-12#section-4.2.4" derivedContent="SEC-WEBRTC"/>).</t>
<t pn="section-1-5">This specification defines a protocol, called "TURN", that allows a
host behind a NAT (called the "TURN client") to request that another host
(called the "TURN server") act as a relay.
The client can arrange for the server to relay packets to and from
certain other hosts (called "peers"), and the client can control aspects
of how the relaying is done. The client does this by obtaining an IP
address and port on the server, called the "relayed transport
address". When a peer sends a packet to the relayed transport address,
the server relays the transport protocol data from the packet to the
client. The data encapsulated within a message header that allows the
client to know the peer from which the transport protocol data was
relayed by the server.
If the server receives an ICMP error packet, the server also relays
certain Layer 3 and 4 header fields from the ICMP header to the
client. When the client sends a message to the server, the server
identifies the remote peer from the message header and relays the
message data to the intended peer.</t>
<t pn="section-1-6">A client using TURN must have some way to communicate the relayed
transport address to its peers and to learn each peer's IP address and
port (more precisely, each peer's server-reflexive transport address;
see <xref target="sec-overview" format="default" sectionFormat="of" derivedContent="Section 3"/>). How this is done is out of the
scope of the TURN protocol. One way this might be done is for the client
and peers to exchange email messages. Another way is for the client and
its peers to use a special-purpose "introduction" or "rendezvous"
protocol (see <xref target="RFC5128" format="default" sectionFormat="of" derivedContent="RFC5128"/> for more details).</t>
<t pn="section-1-7">If TURN is used with ICE <xref target="RFC8445" format="default" sectionFormat="of" derivedContent="RFC8445"/>,
then the relayed transport address and the IP addresses and ports of the
peers are included in the ICE candidate information that the rendezvous
protocol must carry. For example, if TURN and ICE are used as part of a
multimedia solution using SIP <xref target="RFC3261" format="default" sectionFormat="of" derivedContent="RFC3261"/>,
then SIP serves the role of the rendezvous protocol, carrying the ICE
candidate information inside the body of SIP messages <xref target="I-D.ietf-mmusic-ice-sip-sdp" format="default" sectionFormat="of" derivedContent="SDP-ICE"/>. If TURN and ICE are used with some
other rendezvous protocol, then ICE provides guidance on the services
the rendezvous protocol must perform.</t>
<t pn="section-1-8">Though the use of a TURN server to enable communication between two
hosts behind NATs is very likely to work, it comes at a high cost to the
provider of the TURN server since the server typically needs a
high-bandwidth connection to the Internet. As a consequence, it is best
to use a TURN server only when a direct communication path cannot be
found. When the client and a peer use ICE to determine the communication
path, ICE will use hole punching techniques to search for a direct path
first and only use a TURN server when a direct path cannot be found.</t>
<t pn="section-1-9">TURN was originally invented to support multimedia sessions signaled
using SIP. Since SIP supports forking, TURN supports multiple peers per
relayed transport address; a feature not supported by other approaches
(e.g., SOCKS <xref target="RFC1928" format="default" sectionFormat="of" derivedContent="RFC1928"/>). However, care has been
taken to make sure that TURN is suitable for other types of
applications.</t>
<t pn="section-1-10">TURN was designed as one piece in the larger ICE approach to NAT
traversal. Implementors of TURN are urged to investigate ICE and
seriously consider using it for their application. However, it is
possible to use TURN without ICE.</t>
<t pn="section-1-11">TURN is an extension to the Session Traversal Utilities for NAT
(STUN) protocol <xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/>. Most, though
not all, TURN messages are STUN-formatted messages. A reader of this
document should be familiar with STUN.</t>
<t pn="section-1-12">The TURN specification was originally published as <xref target="RFC5766" format="default" sectionFormat="of" derivedContent="RFC5766"/>, which was updated by <xref target="RFC6156" format="default" sectionFormat="of" derivedContent="RFC6156"/> to add IPv6 support. This document supersedes
and obsoletes both <xref target="RFC5766" format="default" sectionFormat="of" derivedContent="RFC5766"/> and <xref target="RFC6156" format="default" sectionFormat="of" derivedContent="RFC6156"/>.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-2">
<name slugifiedName="name-terminology">Terminology</name>
<t pn="section-2-1">
The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCPÂ 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/>
when, and only when, they appear in all capitals, as shown here.
</t>
<t pn="section-2-2">Readers are expected to be familiar with <xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/> and the terms defined there.</t>
<t pn="section-2-3">The following terms are used in this document:</t>
<dl newline="true" spacing="normal" pn="section-2-4">
<dt pn="section-2-4.1">TURN:</dt>
<dd pn="section-2-4.2">The protocol spoken between a TURN client and a
TURN server. It is an extension to the STUN protocol <xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/>. The protocol allows a client
to allocate and use a relayed transport address.</dd>
<dt pn="section-2-4.3">TURN client:</dt>
<dd pn="section-2-4.4">A STUN client that implements this
specification.</dd>
<dt pn="section-2-4.5">TURN server:</dt>
<dd pn="section-2-4.6">A STUN server that implements this
specification. It relays data between a TURN client and its
peer(s).</dd>
<dt pn="section-2-4.7">Peer:</dt>
<dd pn="section-2-4.8">A host with which the TURN client wishes to
communicate. The TURN server relays traffic between the TURN client
and its peer(s). The peer does not interact with the TURN server
using the protocol defined in this document; rather, the peer
receives data sent by the TURN server, and the peer sends data
towards the TURN server.</dd>
<dt pn="section-2-4.9">Transport Address:</dt>
<dd pn="section-2-4.10">The combination of an IP address
and a port.</dd>
<dt pn="section-2-4.11">Host Transport Address:</dt>
<dd pn="section-2-4.12">A transport address on a
client or a peer.</dd>
<dt pn="section-2-4.13">Server-Reflexive Transport Address:</dt>
<dd pn="section-2-4.14">A transport
address on the "external side" of a NAT. This address is allocated
by the NAT to correspond to a specific host transport address.</dd>
<dt pn="section-2-4.15">Relayed Transport Address:</dt>
<dd pn="section-2-4.16">A transport address on the
TURN server that is used for relaying packets between the client and
a peer. A peer sends to this address on the TURN server, and the
packet is then relayed to the client.</dd>
<dt pn="section-2-4.17">TURN Server Transport Address:</dt>
<dd pn="section-2-4.18">A transport address on
the TURN server that is used for sending TURN messages to the
server. This is the transport address that the client uses to
communicate with the server.</dd>
<dt pn="section-2-4.19">Peer Transport Address:</dt>
<dd pn="section-2-4.20">The transport address of the
peer as seen by the server. When the peer is behind a NAT, this is
the peer's server-reflexive transport address.</dd>
<dt pn="section-2-4.21">Allocation:</dt>
<dd pn="section-2-4.22">The relayed transport address granted to a
client through an Allocate request, along with related state, such
as permissions and expiration timers.</dd>
<dt pn="section-2-4.23">5-tuple:</dt>
<dd pn="section-2-4.24">The combination (client IP address and port, server IP address and
port, and transport protocol (currently one of UDP, TCP, DTLS/UDP, or
TLS/TCP)) used to communicate between the client and the server. The
5-tuple uniquely identifies this communication stream. The 5-tuple
also uniquely identifies the Allocation on the server.</dd>
<dt pn="section-2-4.25">Transport Protocol:</dt>
<dd pn="section-2-4.26">The protocol above IP that carries TURN Requests, Responses, and
Indications as well as providing identifiable flows using a
5-tuple. In this specification, UDP and TCP are defined as transport
protocols; this document also describes the use of UDP and TCP in
combination with a security layer using DTLS and TLS,
respectively.</dd>
<dt pn="section-2-4.27">Channel:</dt>
<dd pn="section-2-4.28">A channel number and associated peer
transport address. Once a channel number is bound to a peer's
transport address, the client and server can use the more
bandwidth-efficient ChannelData message to exchange data.</dd>
<dt pn="section-2-4.29">Permission:</dt>
<dd pn="section-2-4.30">The IP address and transport protocol (but
not the port) of a peer that is permitted to send traffic to the
TURN server and have that traffic relayed to the TURN client. The
TURN server will only forward traffic to its client from peers that
match an existing permission.</dd>
<dt pn="section-2-4.31">Realm:</dt>
<dd pn="section-2-4.32">A string used to describe the server or a
context within the server. The realm tells the client which username
and password combination to use to authenticate requests.</dd>
<dt pn="section-2-4.33">Nonce:</dt>
<dd pn="section-2-4.34">A string chosen at random by the server and
included in the server response. To prevent replay attacks, the
server should change the nonce regularly.</dd>
<dt pn="section-2-4.35">(D)TLS:</dt>
<dd pn="section-2-4.36">This term is used for statements that apply to
both Transport Layer Security <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="RFC8446"/> and
Datagram Transport Layer Security <xref target="RFC6347" format="default" sectionFormat="of" derivedContent="RFC6347"/>.</dd>
</dl>
</section>
<section anchor="sec-overview" numbered="true" toc="include" removeInRFC="false" pn="section-3">
<name slugifiedName="name-overview-of-operation">Overview of Operation</name>
<t pn="section-3-1">This section gives an overview of the operation of TURN. It is
non-normative.</t>
<t pn="section-3-2">In a typical configuration, a TURN client is connected to a private
network <xref target="RFC1918" format="default" sectionFormat="of" derivedContent="RFC1918"/> and, through one or more
NATs, to the public Internet. On the public Internet is a TURN
server. Elsewhere in the Internet are one or more peers with which the
TURN client wishes to communicate. These peers may or may not be behind
one or more NATs. The client uses the server as a relay to send packets
to these peers and to receive packets from these peers.</t>
<figure anchor="fig-turn-model" align="left" suppress-title="false" pn="figure-1">
<artwork name="" type="" align="left" alt="" pn="section-3-3.1">
Peer A
Server-Reflexive +---------+
Transport Address | |
192.0.2.150:32102 | |
| /| |
TURN | / ^| Peer A |
Client's Server | / || |
Host Transport Transport | // || |
Address Address | // |+---------+
198.51.100.2:49721 192.0.2.15:3478 |+-+ // Peer A
| | ||N| / Host Transport
| +-+ | ||A|/ Address
| | | | v|T| 203.0.113.2:49582
| | | | /+-+
+---------+| | | |+---------+ / +---------+
| || |N| || | // | |
| TURN |v | | v| TURN |/ | |
| Client |----|A|-------| Server |------------------| Peer B |
| | | |^ | |^ ^| |
| | |T|| | || || |
+---------+ | || +---------+| |+---------+
| || | |
| || | |
+-+| | |
| | |
| | |
Client's | Peer B
Server-Reflexive Relayed Transport
Transport Address Transport Address Address
192.0.2.1:7000 192.0.2.15:50000 192.0.2.210:49191</artwork>
</figure>
<t pn="section-3-4"><xref target="fig-turn-model" format="default" sectionFormat="of" derivedContent="Figure 1"/> shows a typical deployment. In
this figure, the TURN client and the TURN server are separated by a NAT,
with the client on the private side and the server on the public side of
the NAT. This NAT is assumed to be a "bad" NAT; for example,
it might have a mapping property of "address-and-port-dependent mapping"
(see <xref target="RFC4787" format="default" sectionFormat="of" derivedContent="RFC4787"/>).</t>
<t pn="section-3-5">The client talks to the server from a (IP address, port) combination
called the client's "host transport address". (The combination of an IP
address and port is called a "transport address".)</t>
<t pn="section-3-6">The client sends TURN messages from its host transport address to a
transport address on the TURN server that is known as the "TURN server
transport address". The client learns the TURN server transport address
through some unspecified means (e.g., configuration), and this address
is typically used by many clients simultaneously.</t>
<t pn="section-3-7">Since the client is behind a NAT, the server sees packets from the
client as coming from a transport address on the NAT itself. This
address is known as the client's "server-reflexive transport
address"; packets sent by the server to the client's
server-reflexive transport address will be forwarded by the NAT to the
client's host transport address.</t>
<t pn="section-3-8">The client uses TURN commands to create and manipulate an ALLOCATION
on the server. An allocation is a data structure on the server. This
data structure contains, amongst other things, the relayed transport
address for the allocation. The relayed transport address is the
transport address on the server that peers can use to have the server
relay data to the client. An allocation is uniquely identified by its
relayed transport address.</t>
<t pn="section-3-9">Once an allocation is created, the client can send application data
to the server along with an indication of to which peer the data is to
be sent, and the server will relay this data to the intended peer. The
client sends the application data to the server inside a TURN message;
at the server, the data is extracted from the TURN message and sent to
the peer in a UDP datagram. In the reverse direction, a peer can send
application data in a UDP datagram to the relayed transport address for
the allocation; the server will then encapsulate this data inside a TURN
message and send it to the client along with an indication of which peer
sent the data. Since the TURN message always contains an indication of
which peer the client is communicating with, the client can use a single
allocation to communicate with multiple peers.</t>
<t pn="section-3-10">When the peer is behind a NAT, the client must identify the peer
using its server-reflexive transport address rather than its host
transport address. For example, to send application data to Peer A in
the example above, the client must specify 192.0.2.150:32102 (Peer A's
server-reflexive transport address) rather than 203.0.113.2:49582 (Peer
A's host transport address).</t>
<t pn="section-3-11">Each allocation on the server belongs to a single client and has
either one or two relayed transport addresses that are used only by that
allocation. Thus, when a packet arrives at a relayed transport address
on the server, the server knows for which client the data is
intended.</t>
<t pn="section-3-12">The client may have multiple allocations on a server at the same
time.</t>
<section anchor="sec-transports" numbered="true" toc="include" removeInRFC="false" pn="section-3.1">
<name slugifiedName="name-transports">Transports</name>
<t pn="section-3.1-1">TURN, as defined in this specification, always uses UDP between the
server and the peer. However, this specification allows the use of any
one of UDP, TCP, Transport Layer Security (TLS) over TCP, or Datagram
Transport Layer Security (DTLS) over UDP to carry the TURN messages
between the client and the server.</t>
<table align="center" pn="table-1">
<thead>
<tr>
<th align="center" colspan="1" rowspan="1">TURN client to TURN server</th>
<th align="center" colspan="1" rowspan="1">TURN server to peer</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center" colspan="1" rowspan="1">UDP</td>
<td align="center" colspan="1" rowspan="1">UDP</td>
</tr>
<tr>
<td align="center" colspan="1" rowspan="1">TCP</td>
<td align="center" colspan="1" rowspan="1">UDP</td>
</tr>
<tr>
<td align="center" colspan="1" rowspan="1">TLS-over-TCP</td>
<td align="center" colspan="1" rowspan="1">UDP</td>
</tr>
<tr>
<td align="center" colspan="1" rowspan="1">DTLS-over-UDP</td>
<td align="center" colspan="1" rowspan="1">UDP</td>
</tr>
</tbody>
</table>
<t pn="section-3.1-3">If TCP or TLS-over-TCP is used between the client and the server,
then the server will convert between these transports and UDP
transport when relaying data to/from the peer.</t>
<t pn="section-3.1-4">Since this version of TURN only supports UDP between the server and
the peer, it is expected that most clients will prefer to use UDP
between the client and the server as well. That being the case, some
readers may wonder: Why also support TCP and TLS-over-TCP?</t>
<t pn="section-3.1-5">TURN supports TCP transport between the client and the server
because some firewalls are configured to block UDP entirely. These
firewalls block UDP but not TCP, in part because TCP has properties
that make the intention of the nodes being protected by the firewall
more obvious to the firewall. For example, TCP has a three-way
handshake that makes it clearer that the protected node really wishes
to have that particular connection established, while for UDP, the best
the firewall can do is guess which flows are desired by using
filtering rules. Also, TCP has explicit connection teardown; while for
UDP, the firewall has to use timers to guess when the flow is
finished.</t>
<t pn="section-3.1-6">TURN supports TLS-over-TCP transport and DTLS-over-UDP transport
between the client and the server because (D)TLS provides additional
security properties not provided by TURN's default digest
authentication, properties that some clients may wish to take
advantage of. In particular, (D)TLS provides a way for the client to
ascertain that it is talking to the correct server and provides for
confidentiality of TURN control messages.
If (D)TLS transport is used between the TURN client and the TURN server, refer
to <xref target="RFC8489" sectionFormat="of" section="6.2.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8489#section-6.2.3" derivedContent="RFC8489"/> for more
information about cipher suites, server certificate validation, and
authentication of TURN servers.
The guidance given in <xref target="RFC7525" format="default" sectionFormat="of" derivedContent="RFC7525"/>
<bcp14>MUST</bcp14> be followed to avoid attacks on (D)TLS. TURN does not
require (D)TLS because the overhead of using (D)TLS is higher than that of
digest authentication; for example, using (D)TLS likely means that most
application data will be doubly encrypted (once by (D)TLS and once to ensure
it is still encrypted in the UDP datagram).</t>
<t pn="section-3.1-7">There is an extension to TURN for TCP transport between the server
and the peers <xref target="RFC6062" format="default" sectionFormat="of" derivedContent="RFC6062"/>. For this
reason, allocations that use UDP between the server and the peers are
known as "UDP allocations", while allocations that use TCP between the
server and the peers are known as "TCP allocations". This specification
describes only UDP allocations.</t>
<t pn="section-3.1-8">In some applications for TURN, the client may send and receive
packets other than TURN packets on the host transport address it uses
to communicate with the server. This can happen, for example, when
using TURN with ICE. In these cases, the client can distinguish TURN
packets from other packets by examining the source address of the
arriving packet; those arriving from the TURN server will be TURN
packets. The algorithm of demultiplexing packets received from
multiple protocols on the host transport address is discussed in <xref target="RFC7983" format="default" sectionFormat="of" derivedContent="RFC7983"/>.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-3.2">
<name slugifiedName="name-allocations">Allocations</name>
<t pn="section-3.2-1">To create an allocation on the server, the client uses an Allocate
transaction. The client sends an Allocate request to the server, and
the server replies with an Allocate success response containing the
allocated relayed transport address. The client can include attributes
in the Allocate request that describe the type of allocation it
desires (e.g., the lifetime of the allocation). Since relaying data
has security implications, the server requires that the client
authenticate itself, typically using STUN's long-term credential
mechanism or the STUN Extension for Third-Party Authorization <xref target="RFC7635" format="default" sectionFormat="of" derivedContent="RFC7635"/>, to show that it is authorized to use the
server.</t>
<t pn="section-3.2-2">Once a relayed transport address is allocated, a client must keep
the allocation alive. To do this, the client periodically sends a
Refresh request to the server. TURN deliberately uses a different
method (Refresh rather than Allocate) for refreshes to ensure that the
client is informed if the allocation vanishes for some reason.</t>
<t pn="section-3.2-3">The frequency of the Refresh transaction is determined by the
lifetime of the allocation. The default lifetime of an allocation is
10 minutes; this value was chosen to be long enough so that
refreshing is not typically a burden on the client while expiring
allocations where the client has unexpectedly quit in a timely manner.
However, the client can request a longer lifetime in the Allocate
request and may modify its request in a Refresh request, and the
server always indicates the actual lifetime in the response. The
client must issue a new Refresh transaction within "lifetime" seconds
of the previous Allocate or Refresh transaction. Once a client no
longer wishes to use an allocation, it should delete the allocation
using a Refresh request with a requested lifetime of zero.</t>
<t pn="section-3.2-4">Both the server and client keep track of a value known as the
"5-tuple". At the client, the 5-tuple consists of the client's host
transport address, the server transport address, and the transport
protocol used by the client to communicate with the server. At the
server, the 5-tuple value is the same except that the client's host
transport address is replaced by the client's server-reflexive
address since that is the client's address as seen by the server.</t>
<t pn="section-3.2-5">Both the client and the server remember the 5-tuple used in the
Allocate request. Subsequent messages between the client and the
server use the same 5-tuple. In this way, the client and server know
which allocation is being referred to. If the client wishes to
allocate a second relayed transport address, it must create a second
allocation using a different 5-tuple (e.g., by using a different
client host address or port).</t>
<aside pn="section-3.2-6">
<t pn="section-3.2-6.1">NOTE: While the terminology used in this document refers to
5-tuples, the TURN server can store whatever identifier it likes
that yields identical results. Specifically, an implementation may
use a file descriptor in place of a 5-tuple to represent a TCP
connection.</t>
</aside>
<figure anchor="fig-allocate" align="left" suppress-title="false" pn="figure-2">
<artwork name="" type="" align="left" alt="" pn="section-3.2-7.1">
TURN TURN Peer Peer
client server A B
|-- Allocate request --------------->| | |
| (invalid or missing credentials) | | |
| | | |
|<--------------- Allocate failure --| | |
| (401 Unauthenticated) | | |
| | | |
|-- Allocate request --------------->| | |
| (valid credentials) | | |
| | | |
|<---------- Allocate success resp --| | |
| (192.0.2.15:50000) | | |
// // // //
| | | |
|-- Refresh request ---------------->| | |
| | | |
|<----------- Refresh success resp --| | |
| | | |
</artwork>
</figure>
<t pn="section-3.2-8">In <xref target="fig-allocate" format="default" sectionFormat="of" derivedContent="Figure 2"/>, the client sends an
Allocate request to the server with invalid or missing credentials.
Since the server requires that all requests be authenticated using
STUN's long-term credential mechanism, the server rejects the request
with a 401 (Unauthorized) error code. The client then tries again,
this time including credentials. This time, the server accepts the
Allocate request and returns an Allocate success response containing
(amongst other things) the relayed transport address assigned to the
allocation. Sometime later, the client decides to refresh the
allocation; thus, it sends a Refresh request to the server. The refresh
is accepted and the server replies with a Refresh success
response.</t>
</section>
<section anchor="sec-permission-overview" numbered="true" toc="include" removeInRFC="false" pn="section-3.3">
<name slugifiedName="name-permissions">Permissions</name>
<t pn="section-3.3-1">To ease concerns amongst enterprise IT administrators that TURN
could be used to bypass corporate firewall security, TURN includes the
notion of permissions. TURN permissions mimic the address-restricted
filtering mechanism of NATs that comply with <xref target="RFC4787" format="default" sectionFormat="of" derivedContent="RFC4787"/>.</t>
<t pn="section-3.3-2">An allocation can have zero or more permissions. Each permission
consists of an IP address and a lifetime. When the server receives a
UDP datagram on the allocation's relayed transport address, it first
checks the list of permissions. If the source IP address of the
datagram matches a permission, the application data is relayed to the
client; otherwise, the UDP datagram is silently discarded.</t>
<t pn="section-3.3-3">A permission expires after 5 minutes if it is not refreshed, and
there is no way to explicitly delete a permission. This behavior was
selected to match the behavior of a NAT that complies with <xref target="RFC4787" format="default" sectionFormat="of" derivedContent="RFC4787"/>.</t>
<t pn="section-3.3-4">The client can install or refresh a permission using either a
CreatePermission request or a ChannelBind request. Using the
CreatePermission request, multiple permissions can be installed or
refreshed with a single request; this is important for applications
that use ICE. For security reasons, permissions can only be installed
or refreshed by transactions that can be authenticated; thus, Send
indications and ChannelData messages (which are used to send data to
peers) do not install or refresh any permissions.</t>
<t pn="section-3.3-5">Note that permissions are within the context of an allocation, so
adding or expiring a permission in one allocation does not affect
other allocations.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-3.4">
<name slugifiedName="name-send-mechanism">Send Mechanism</name>
<t pn="section-3.4-1">There are two mechanisms for the client and peers to exchange
application data using the TURN server. The first mechanism uses the
Send and Data methods, the second mechanism uses channels. Common to
both mechanisms is the ability of the client to communicate with
multiple peers using a single allocated relayed transport address;
thus, both mechanisms include a means for the client to indicate to
the server which peer should receive the data and for the server to
indicate to the client which peer sent the data.</t>
<t pn="section-3.4-2">The Send mechanism uses Send and Data indications. Send indications
are used to send application data from the client to the server, while
Data indications are used to send application data from the server to
the client.</t>
<t pn="section-3.4-3">When using the Send mechanism, the client sends a Send indication
to the TURN server containing (a) an XOR-PEER-ADDRESS attribute
specifying the (server-reflexive) transport address of the peer and
(b) a DATA attribute holding the application data. When the TURN
server receives the Send indication, it extracts the application data
from the DATA attribute and sends it in a UDP datagram to the peer,
using the allocated relay address as the source address. Note that
there is no need to specify the relayed transport address since it is
implied by the 5-tuple used for the Send indication.</t>
<t pn="section-3.4-4">In the reverse direction, UDP datagrams arriving at the relayed
transport address on the TURN server are converted into Data
indications and sent to the client, with the server-reflexive
transport address of the peer included in an XOR-PEER-ADDRESS
attribute and the data itself in a DATA attribute. Since the relayed
transport address uniquely identified the allocation, the server knows
which client should receive the data.</t>
<t pn="section-3.4-5">Some ICMP (Internet Control Message Protocol) packets arriving at
the relayed transport address on the TURN server may be converted into
Data indications and sent to the client, with the transport address of
the peer included in an XOR-PEER-ADDRESS attribute and the ICMP type
and code in an ICMP attribute. ICMP attribute forwarding always uses
Data indications containing the XOR-PEER-ADDRESS and ICMP attributes,
even when using the channel mechanism to forward UDP data.</t>
<t pn="section-3.4-6">Send and Data indications cannot be authenticated since the
long-term credential mechanism of STUN does not support authenticating
indications. This is not as big an issue as it might first appear
since the client-to-server leg is only half of the total path to the
peer. Applications that want end-to-end security should encrypt the
data sent between the client and a peer.</t>
<t pn="section-3.4-7">Because Send indications are not authenticated, it is possible for
an attacker to send bogus Send indications to the server, which will
then relay these to a peer. To partly mitigate this attack, TURN
requires that the client install a permission towards a peer before
sending data to it using a Send indication. The technique to fully
mitigate the attack is discussed in <xref target="fate-data" format="default" sectionFormat="of" derivedContent="Section 21.1.4"/>.</t>
<figure anchor="fig-send-data" align="left" suppress-title="false" pn="figure-3">
<artwork name="" type="" align="left" alt="" pn="section-3.4-8.1">
TURN TURN Peer Peer
client server A B
| | | |
|-- CreatePermission req (Peer A) ->| | |
|<- CreatePermission success resp --| | |
| | | |
|--- Send ind (Peer A)------------->| | |
| |=== data ===>| |
| | | |
| |<== data ====| |
|<------------- Data ind (Peer A) --| | |
| | | |
| | | |
|--- Send ind (Peer B)------------->| | |
| | dropped | |
| | | |
| |<== data ==================|
| dropped | | |
| | | |
</artwork>
</figure>
<t pn="section-3.4-9">In <xref target="fig-send-data" format="default" sectionFormat="of" derivedContent="Figure 3"/>, the client has already
created an allocation and now wishes to send data to its peers. The
client first creates a permission by sending the server a
CreatePermission request specifying Peer A's (server-reflexive) IP
address in the XOR-PEER-ADDRESS attribute; if this was not done, the
server would not relay data between the client and the server. The
client then sends data to Peer A using a Send indication; at the
server, the application data is extracted and forwarded in a UDP
datagram to Peer A, using the relayed transport address as the source
transport address. When a UDP datagram from Peer A is received at the
relayed transport address, the contents are placed into a Data
indication and forwarded to the client. Later, the client attempts to
exchange data with Peer B; however, no permission has been installed
for Peer B, so the Send indication from the client and the UDP
datagram from the peer are both dropped by the server.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-3.5">
<name slugifiedName="name-channels">Channels</name>
<t pn="section-3.5-1">For some applications (e.g., Voice over IP (VoIP)), the 36 bytes of
overhead that a Send indication or Data indication adds to the
application data can substantially increase the bandwidth required
between the client and the server. To remedy this, TURN offers a
second way for the client and server to associate data with a specific
peer.</t>
<t pn="section-3.5-2">This second way uses an alternate packet format known as the
"ChannelData message". The ChannelData message does not use the STUN
header used by other TURN messages, but instead has a 4-byte header
that includes a number known as a "channel number". Each channel number
in use is bound to a specific peer; thus, it serves as a shorthand for
the peer's host transport address.</t>
<t pn="section-3.5-3">To bind a channel to a peer, the client sends a ChannelBind request
to the server and includes an unbound channel number and the
transport address of the peer. Once the channel is bound, the client
can use a ChannelData message to send the server data destined for the
peer. Similarly, the server can relay data from that peer towards the
client using a ChannelData message.</t>
<t pn="section-3.5-4">Channel bindings last for 10 minutes unless refreshed; this
lifetime was chosen to be longer than the permission lifetime. Channel
bindings are refreshed by sending another ChannelBind request
rebinding the channel to the peer. Like permissions (but unlike
allocations), there is no way to explicitly delete a channel binding;
the client must simply wait for it to time out.</t>
<figure anchor="fig-channels" align="left" suppress-title="false" pn="figure-4">
<artwork name="" type="" align="left" alt="" pn="section-3.5-5.1">
TURN TURN Peer Peer
client server A B
| | | |
|-- ChannelBind req --------------->| | |
| (Peer A to 0x4001) | | |
| | | |
|<---------- ChannelBind succ resp -| | |
| | | |
|-- (0x4001) data ----------------->| | |
| |=== data ===>| |
| | | |
| |<== data ====| |
|<------------------ (0x4001) data -| | |
| | | |
|--- Send ind (Peer A)------------->| | |
| |=== data ===>| |
| | | |
| |<== data ====| |
|<------------------ (0x4001) data -| | |
| | | |
</artwork>
</figure>
<t pn="section-3.5-6"><xref target="fig-channels" format="default" sectionFormat="of" derivedContent="Figure 4"/> shows the channel mechanism in
use. The client has already created an allocation and now wishes to
bind a channel to Peer A. To do this, the client sends a ChannelBind
request to the server, specifying the transport address of Peer A and
a channel number (0x4001). After that, the client can send application
data encapsulated inside ChannelData messages to Peer A: this is shown
as "(0x4001) data" where 0x4001 is the channel number. When the
ChannelData message arrives at the server, the server transfers the
data to a UDP datagram and sends it to Peer A (which is the peer bound
to channel number 0x4001).</t>
<t pn="section-3.5-7">In the reverse direction, when Peer A sends a UDP datagram to the
relayed transport address, this UDP datagram arrives at the server on
the relayed transport address assigned to the allocation. Since the
UDP datagram was received from Peer A, which has a channel number
assigned to it, the server encapsulates the data into a ChannelData
message when sending the data to the client.</t>
<t pn="section-3.5-8">Once a channel has been bound, the client is free to intermix
ChannelData messages and Send indications. In the figure, the client
later decides to use a Send indication rather than a ChannelData
message to send additional data to Peer A. The client might decide to
do this, for example, so it can use the DONT-FRAGMENT attribute (see
the next section). However, once a channel is bound, the server will
always use a ChannelData message, as shown in the call flow.</t>
<t pn="section-3.5-9">Note that ChannelData messages can only be used for peers to which
the client has bound a channel. In the example above, Peer A has been
bound to a channel, but Peer B has not, so application data to and
from Peer B would use the Send mechanism.</t>
</section>
<section anchor="unpriv" numbered="true" toc="include" removeInRFC="false" pn="section-3.6">
<name slugifiedName="name-unprivileged-turn-servers">Unprivileged TURN Servers</name>
<t pn="section-3.6-1">This version of TURN is designed so that the server can be
implemented as an application that runs in user space under commonly
available operating systems without requiring special privileges. This
design decision was made to make it easy to deploy a TURN server: for
example, to allow a TURN server to be integrated into a peer-to-peer
application so that one peer can offer NAT traversal services to
another peer and to use (D)TLS to secure the TURN connection.</t>
<t pn="section-3.6-2">This design decision has the following implications for data
relayed by a TURN server:</t>
<ul spacing="normal" bare="false" empty="false" pn="section-3.6-3">
<li pn="section-3.6-3.1">The value of the Diffserv field may not be preserved across the
server;</li>
<li pn="section-3.6-3.2">The Time to Live (TTL) field may be reset, rather than
decremented, across the server;</li>
<li pn="section-3.6-3.3">The Explicit Congestion Notification (ECN) field may be reset
by the server;</li>
<li pn="section-3.6-3.4">There is no end-to-end fragmentation since the packet is
reassembled at the server.</li>
</ul>
<t pn="section-3.6-4">Future work may specify alternate TURN semantics that address
these limitations.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-3.7">
<name slugifiedName="name-avoiding-ip-fragmentation">Avoiding IP Fragmentation</name>
<t pn="section-3.7-1">For reasons described in <xref target="FRAG-HARMFUL" format="default" sectionFormat="of" derivedContent="FRAG-HARMFUL"/>, applications, especially those sending large
volumes of data, should avoid having their packets fragmented. <xref target="I-D.ietf-intarea-frag-fragile" format="default" sectionFormat="of" derivedContent="FRAG-FRAGILE"/> discusses issues associated
with IP fragmentation and proposes alternatives to IP
fragmentation.
Applications using TCP can, more or less, ignore this
issue because fragmentation avoidance is now a standard part of TCP,
but applications using UDP (and, thus, any application using this
version of TURN) need to avoid IP fragmentation by sending
sufficiently small messages or by using UDP fragmentation <xref target="I-D.ietf-tsvwg-udp-options" format="default" sectionFormat="of" derivedContent="UDP-OPT"/>. Note that the UDP
fragmentation option needs to be supported by both endpoints, and at
the time of writing of this document, UDP fragmentation support is
under discussion and is not deployed.</t>
<t pn="section-3.7-2">The application running on the client and the peer can take one of
two approaches to avoid IP fragmentation until UDP fragmentation
support is available. The first uses messages that are limited to a
predetermined fixed maximum, and the second relies on network feedback
to adapt that maximum.</t>
<t pn="section-3.7-3">The first approach is to avoid sending large amounts of application
data in the TURN messages/UDP datagrams exchanged between the client
and the peer. This is the approach taken by most VoIP
applications. In this approach, the application <bcp14>MUST</bcp14>
assume a Path MTU (PMTU) of 1280 bytes because IPv6 requires that every
link in the Internet has an MTU of 1280 octets or greater as
specified in <xref target="RFC8200" format="default" sectionFormat="of" derivedContent="RFC8200"/>. If IPv4
support on legacy or otherwise unusual networks is a consideration,
the application <bcp14>MAY</bcp14> assume an effective MTU of 576
bytes for IPv4 datagrams, as every IPv4 host must be capable of
receiving a packet with a length equal to 576 bytes as discussed in
<xref target="RFC0791" format="default" sectionFormat="of" derivedContent="RFC0791"/> and <xref target="RFC1122" format="default" sectionFormat="of" derivedContent="RFC1122"/>.</t>
<t pn="section-3.7-4">The exact amount of application data that can be included while
avoiding fragmentation depends on the details of the TURN session
between the client and the server: whether UDP, TCP, or (D)TLS
transport is used; whether ChannelData messages or Send/Data
indications are used; and whether any additional attributes (such as
the DONT-FRAGMENT attribute) are included. Another factor, which is
hard to determine, is whether the MTU is reduced somewhere along the
path for other reasons, such as the use of IP-in-IP tunneling.</t>
<t pn="section-3.7-5">As a guideline, sending a maximum of 500 bytes of application data
in a single TURN message (by the client on the client-to-server leg)
or a UDP datagram (by the peer on the peer-to-server leg) will
generally avoid IP fragmentation. To further reduce the chance of
fragmentation, it is recommended that the client use ChannelData
messages when transferring significant volumes of data since the
overhead of the ChannelData message is less than Send and Data
indications.</t>
<t pn="section-3.7-6">The second approach the client and peer can take to avoid
fragmentation is to use a path MTU discovery algorithm to determine
the maximum amount of application data that can be sent without
fragmentation. The classic path MTU discovery algorithm defined in
<xref target="RFC1191" format="default" sectionFormat="of" derivedContent="RFC1191"/> may not be able to discover the MTU of
the transmission path between the client and the peer since:</t>
<ul empty="false" spacing="normal" bare="false" pn="section-3.7-7">
<li pn="section-3.7-7.1">A probe packet with a Don't Fragment (DF) bit in the IPv4 header set to test a
path for a larger MTU can be dropped by routers, or</li>
<li pn="section-3.7-7.2">ICMP error messages can be dropped by middleboxes.</li>
</ul>
<t pn="section-3.7-8">As a result, the client and server need to use a path MTU discovery
algorithm that does not require ICMP messages. The Packetized Path MTU
Discovery algorithm defined in <xref target="RFC4821" format="default" sectionFormat="of" derivedContent="RFC4821"/> is one
such algorithm, and a set of algorithms is defined in <xref target="I-D.ietf-tsvwg-datagram-plpmtud" format="default" sectionFormat="of" derivedContent="MTU-DATAGRAM"/>. </t>
<t pn="section-3.7-9"><xref target="I-D.ietf-tram-stun-pmtud" format="default" sectionFormat="of" derivedContent="MTU-STUN"/> is an
implementation of <xref target="RFC4821" format="default" sectionFormat="of" derivedContent="RFC4821"/> that uses STUN to
discover the path MTU; so it might be a suitable approach to be used
in conjunction with a TURN server that supports the DONT-FRAGMENT
attribute. When the client includes the DONT-FRAGMENT attribute in a
Send indication, this tells the server to set the DF bit in the
resulting UDP datagram that it sends to the peer. Since some servers
may be unable to set the DF bit, the client should also include this
attribute in the Allocate request; any server that does not support
the DONT-FRAGMENT attribute will indicate this by rejecting the
Allocate request. If the TURN server carrying out packet translation
from IPv4-to-IPv6 is unable to access the state of the Don't Fragment (DF)
bit in the IPv4 header, it <bcp14>MUST</bcp14> reject the Allocate request with
the DONT-FRAGMENT attribute.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-3.8">
<name slugifiedName="name-rtp-support">RTP Support</name>
<t pn="section-3.8-1">One of the envisioned uses of TURN is as a relay for clients and
peers wishing to exchange real-time data (e.g., voice or video) using
RTP. To facilitate the use of TURN for this purpose, TURN includes
some special support for older versions of RTP.</t>
<t pn="section-3.8-2">Old versions of RTP <xref target="RFC3550" format="default" sectionFormat="of" derivedContent="RFC3550"/> required that
the RTP stream be on an even port number and the associated RTP
Control Protocol (RTCP) stream, if present, be on the next highest
port. To allow clients to work with peers that still require this,
TURN allows the client to request that the server allocate a relayed
transport address with an even port number and optionally request
the server reserve the next-highest port number for a subsequent
allocation.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-3.9">
<name slugifiedName="name-happy-eyeballs-for-turn">Happy Eyeballs for TURN</name>
<t pn="section-3.9-1">If an IPv4 path to reach a TURN server is found, but the TURN
server's IPv6 path is not working, a dual-stack TURN client can
experience a significant connection delay compared to an IPv4-only
TURN client. To overcome these connection setup problems, the TURN
client needs to query both A and AAAA records for the TURN server
specified using a domain name and try connecting to the TURN server
using both IPv6 and IPv4 addresses in a fashion similar to the Happy
Eyeballs mechanism defined in <xref target="RFC8305" format="default" sectionFormat="of" derivedContent="RFC8305"/>. The TURN
client performs the following steps based on the transport protocol
being used to connect to the TURN server.</t>
<ul spacing="normal" bare="false" empty="false" pn="section-3.9-2">
<li pn="section-3.9-2.1">For TCP or TLS-over-TCP, the results of the Happy Eyeballs
procedure <xref target="RFC8305" format="default" sectionFormat="of" derivedContent="RFC8305"/> are used by the TURN
client for sending its TURN messages to the server.</li>
<li pn="section-3.9-2.2">For clear text UDP, send TURN Allocate requests to both IP
address families as discussed in <xref target="RFC8305" format="default" sectionFormat="of" derivedContent="RFC8305"/>
without authentication information.
If the TURN server requires
authentication, it will send back a 401 unauthenticated response;
the TURN client will use the first UDP connection on which a 401
error response is received. If a 401 error response is received
from both IP address families, then the TURN client can silently
abandon the UDP connection on the IP address family with lower
precedence. If the TURN server does not require authentication (as
described in <xref target="RFC8155" sectionFormat="of" section="9" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8155#section-9" derivedContent="RFC8155"/>), it is
possible for both Allocate requests to succeed. In this case, the
TURN client sends a Refresh with a LIFETIME value of zero on the
allocation using the IP address family with lower precedence to
delete the allocation.</li>
<li pn="section-3.9-2.3">For DTLS over UDP, initiate a DTLS handshake to both IP address
families as discussed in <xref target="RFC8305" format="default" sectionFormat="of" derivedContent="RFC8305"/>,
and use the first DTLS session that is established. If the DTLS
session is established on both IP address families, then the client
sends a DTLS close_notify alert to terminate the DTLS session using
the IP address family with lower precedence. If the TURN over DTLS
server has been configured to require a cookie exchange (<xref target="RFC6347" sectionFormat="of" section="4.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc6347#section-4.2" derivedContent="RFC6347"/>) and
a HelloVerifyRequest is received from the TURN servers on both IP
address families, then the client can silently abandon the
connection on the IP address family with lower precedence.</li>
</ul>
</section>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-4">
<name slugifiedName="name-discovery-of-turn-server">Discovery of TURN Server</name>
<t pn="section-4-1">Methods of TURN server discovery, including using anycast, are
described in <xref target="RFC8155" format="default" sectionFormat="of" derivedContent="RFC8155"/>. If a host with
multiple interfaces discovers a TURN server in each interface, the
mechanism described in <xref target="RFC7982" format="default" sectionFormat="of" derivedContent="RFC7982"/> can be
used by the TURN client to influence the TURN server selection. The
syntax of the "turn" and "turns" URIs are defined in <xref target="RFC7065" sectionFormat="of" section="3.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7065#section-3.1" derivedContent="RFC7065"/>. DTLS as a transport
protocol for TURN is defined in <xref target="RFC7350" format="default" sectionFormat="of" derivedContent="RFC7350"/>.</t>
<section numbered="true" toc="include" removeInRFC="false" pn="section-4.1">
<name slugifiedName="name-turn-uri-scheme-semantics">TURN URI Scheme Semantics</name>
<t pn="section-4.1-1">The "turn" and "turns" URI schemes are used to designate a TURN
server (also known as a "relay") on Internet hosts accessible using the
TURN protocol. The TURN protocol supports sending messages over UDP,
TCP, TLS-over-TCP, or DTLS-over-UDP. The "turns" URI scheme <bcp14>MUST</bcp14> be
used when TURN is run over TLS-over-TCP or in DTLS-over-UDP, and the
"turn" scheme <bcp14>MUST</bcp14> be used otherwise. The required <host> part
of the "turn" URI denotes the TURN server host. The <port> part,
if present, denotes the port on which the TURN server is awaiting
connection requests. If it is absent, the default port is 3478 for
both UDP and TCP. The default port for TURN over TLS and TURN over
DTLS is 5349.</t>
</section>
</section>
<section anchor="sec-general-behavior" numbered="true" toc="include" removeInRFC="false" pn="section-5">
<name slugifiedName="name-general-behavior">General Behavior</name>
<t pn="section-5-1">This section contains general TURN processing rules that apply to all
TURN messages.</t>
<t pn="section-5-2">TURN is an extension to STUN. All TURN messages, with the exception
of the ChannelData message, are STUN-formatted messages. All the base
processing rules described in <xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/> apply to STUN-formatted messages.
This means that all the message-forming and message-processing
descriptions in this document are implicitly prefixed with the rules of
<xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/>.</t>
<t pn="section-5-3"><xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/> specifies an
authentication mechanism called the "long-term credential mechanism". TURN
servers and clients <bcp14>MUST</bcp14> implement this mechanism, and the
authentication options are discussed in <xref target="sec-rcv-allocate" format="default" sectionFormat="of" derivedContent="Section 7.2"/>.</t>
<t pn="section-5-4">Note that the long-term credential mechanism applies only to requests
and cannot be used to authenticate indications; thus, indications in
TURN are never authenticated. If the server requires requests to be
authenticated, then the server's administrator <bcp14>MUST</bcp14> choose a realm value
that will uniquely identify the username and password combination that
the client must use, even if the client uses multiple servers under
different administrations. The server's administrator <bcp14>MAY</bcp14> choose to
allocate a unique username to each client, or it <bcp14>MAY</bcp14> choose to allocate the
same username to more than one client (for example, to all clients from
the same department or company). For each Allocate request, the server
<bcp14>SHOULD</bcp14> generate a new random nonce when the allocation is first
attempted following the randomness recommendations in <xref target="RFC4086" format="default" sectionFormat="of" derivedContent="RFC4086"/> and <bcp14>SHOULD</bcp14> expire the nonce at least once every
hour during the lifetime of the allocation. The server uses the
mechanism described in <xref target="RFC8489" sectionFormat="of" section="9.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8489#section-9.2" derivedContent="RFC8489"/> to indicate that it supports
<xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/>.</t>
<t pn="section-5-5">All requests after the initial Allocate must use the same username as
that used to create the allocation to prevent attackers from hijacking
the client's allocation.</t>
<t pn="section-5-6">Specifically, if:
</t>
<ul bare="false" empty="false" spacing="normal" pn="section-5-7">
<li pn="section-5-7.1">the server requires the use of the long-term credential mechanism, and;
</li>
<li pn="section-5-7.2">a non-Allocate request passes authentication under this mechanism, and;
</li>
<li pn="section-5-7.3">the 5-tuple identifies an existing allocation, but;
</li>
<li pn="section-5-7.4">the request does not use the same username as used to create the allocation,
</li>
</ul>
<t pn="section-5-8"> then the request <bcp14>MUST</bcp14> be rejected with a 441 (Wrong
Credentials) error.</t>
<t pn="section-5-9">When a TURN message arrives at the server from the client, the server
uses the 5-tuple in the message to identify the associated allocation.
For all TURN messages (including ChannelData) EXCEPT an Allocate
request, if the 5-tuple does not identify an existing allocation, then
the message <bcp14>MUST</bcp14> either be rejected with a 437 Allocation Mismatch error
(if it is a request) or be silently ignored (if it is an indication or a
ChannelData message). A client receiving a 437 error response to a
request other than Allocate <bcp14>MUST</bcp14> assume the allocation no longer
exists.</t>
<t pn="section-5-10"><xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/> defines a number of
attributes, including the SOFTWARE and FINGERPRINT attributes. The
client <bcp14>SHOULD</bcp14> include the SOFTWARE attribute in all Allocate and Refresh
requests and <bcp14>MAY</bcp14> include it in any other requests or indications. The
server <bcp14>SHOULD</bcp14> include the SOFTWARE attribute in all Allocate and Refresh
responses (either success or failure) and <bcp14>MAY</bcp14> include it in other
responses or indications. The client and the server <bcp14>MAY</bcp14> include the
FINGERPRINT attribute in any STUN-formatted messages defined in this
document.</t>
<t pn="section-5-11">TURN does not use the backwards-compatibility mechanism described in
<xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/>.</t>
<t pn="section-5-12">TURN, as defined in this specification, supports both IPv4 and IPv6.
IPv6 support in TURN includes IPv4-to-IPv6, IPv6-to-IPv6, and
IPv6-to-IPv4 relaying. When only a single address type is desired, the
REQUESTED-ADDRESS-FAMILY attribute is used to explicitly request the
address type the TURN server will allocate (e.g., an IPv4-only node may
request the TURN server to allocate an IPv6 address). If both IPv4 and
IPv6 are desired, the single ADDITIONAL-ADDRESS-FAMILY attribute
indicates a request to the server to allocate one IPv4 and one IPv6
relay address in a single Allocate request. This saves local ports on
the client and reduces the number of messages sent between the client
and the TURN server.</t>
<t pn="section-5-13">By default, TURN runs on the same ports as STUN: 3478 for TURN over
UDP and TCP, and 5349 for TURN over (D)TLS. However, TURN has its own
set of Service Record (SRV) names: "turn" for UDP and TCP, and "turns"
for (D)TLS. Either the DNS resolution procedures or the ALTERNATE-SERVER
procedures, both described in <xref target="sec-create-allocation" format="default" sectionFormat="of" derivedContent="Section 7"/>, can be used to run TURN on a
different port.</t>
<t pn="section-5-14">To ensure interoperability, a TURN server <bcp14>MUST</bcp14> support the use of UDP
transport between the client and the server, and it <bcp14>SHOULD</bcp14> support the use
of TCP, TLS-over-TCP, and DTLS-over-UDP transports.</t>
<t pn="section-5-15">When UDP or DTLS-over-UDP transport is used between the client and
the server, the client will retransmit a request if it does not receive
a response within a certain timeout period. Because of this, the server
may receive two (or more) requests with the same 5-tuple and same
transaction id. STUN requires that the server recognize this case and
treat the request as idempotent (see <xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/>). Some implementations may choose
to meet this requirement by remembering all received requests and the
corresponding responses for 40 seconds (<xref target="RFC8489" sectionFormat="of" section="6.3.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8489#section-6.3.1" derivedContent="RFC8489"/>). Other implementations may
choose to reprocess the request and arrange that such reprocessing
returns essentially the same response. To aid implementors who choose
the latter approach (the so-called "stateless stack approach"), this
specification includes some implementation notes on how this might be
done. Implementations are free to choose either approach or some
other approach that gives the same results.</t>
<t pn="section-5-16">To mitigate either intentional or unintentional denial-of-service
attacks against the server by clients with valid usernames and
passwords, it is <bcp14>RECOMMENDED</bcp14> that the server impose limits on both the
number of allocations active at one time for a given username and on the
amount of bandwidth those allocations can use. The server should reject
new allocations that would exceed the limit on the allowed number of
allocations active at one time with a 486 (Allocation Quota Exceeded)
(see <xref target="sec-rcv-allocate" format="default" sectionFormat="of" derivedContent="Section 7.2"/>), and since UDP does not
include a congestion control mechanism, it should discard application
data traffic that exceeds the bandwidth quota.</t>
</section>
<section anchor="sec-allocations" numbered="true" toc="include" removeInRFC="false" pn="section-6">
<name slugifiedName="name-allocations-2">Allocations</name>
<t pn="section-6-1">All TURN operations revolve around allocations, and all TURN messages
are associated with either a single or dual allocation. An allocation
conceptually consists of the following state data:</t>
<ul spacing="normal" bare="false" empty="false" pn="section-6-2">
<li pn="section-6-2.1">the relayed transport address or addresses;</li>
<li pn="section-6-2.2">the 5-tuple: (client's IP address, client's port, server IP
address, server port, and transport protocol);</li>
<li pn="section-6-2.3">the authentication information;</li>
<li pn="section-6-2.4">the time-to-expiry for each relayed transport address;</li>
<li pn="section-6-2.5">a list of permissions for each relayed transport address;</li>
<li pn="section-6-2.6">a list of channel-to-peer bindings for each relayed transport
address.</li>
</ul>
<t pn="section-6-3">The relayed transport address is the transport address
allocated by the server for communicating with peers, while the 5-tuple
describes the communication path between the client and the server. On
the client, the 5-tuple uses the client's host transport address; on the
server, the 5-tuple uses the client's server-reflexive transport
address. The relayed transport address <bcp14>MUST</bcp14> be unique across all
allocations so it can be used to uniquely identify the allocation, and
an allocation in this context can be either a single or dual
allocation.</t>
<t pn="section-6-4">The authentication information (e.g., username, password, realm, and
nonce) is used to both verify subsequent requests and to compute the
message integrity of responses. The username, realm, and nonce values
are initially those used in the authenticated Allocate request that
creates the allocation, though the server can change the nonce value
during the lifetime of the allocation using a 438 (Stale Nonce) reply.
For security reasons, the server <bcp14>MUST NOT</bcp14> store the
password explicitly and <bcp14>MUST</bcp14> store the key value, which
is a cryptographic hash over the username, realm, and password (see
<xref target="RFC8489" sectionFormat="of" section="16.1.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8489#section-16.1.3" derivedContent="RFC8489"/>).</t>
<t pn="section-6-5">Note that if the response contains a PASSWORD-ALGORITHMS attribute
and this attribute contains both MD5 and SHA-256 algorithms, and the
client also supports both the algorithms, the request <bcp14>MUST</bcp14> contain a
PASSWORD-ALGORITHM attribute with the SHA-256 algorithm.</t>
<t pn="section-6-6">The time-to-expiry is the time in seconds left until the allocation
expires. Each Allocate or Refresh transaction sets this timer, which
then ticks down towards zero. By default, each Allocate or Refresh
transaction resets this timer to the default lifetime value of 600
seconds (10 minutes), but the client can request a different value in
the Allocate and Refresh request. Allocations can only be refreshed
using the Refresh request; sending data to a peer does not refresh an
allocation. When an allocation expires, the state data associated with
the allocation can be freed.</t>
<t pn="section-6-7">The list of permissions is described in <xref target="sec-permissions" format="default" sectionFormat="of" derivedContent="Section 9"/> and the list of channels is described
in <xref target="sec-channels" format="default" sectionFormat="of" derivedContent="Section 12"/>.</t>
</section>
<section anchor="sec-create-allocation" numbered="true" toc="include" removeInRFC="false" pn="section-7">
<name slugifiedName="name-creating-an-allocation">Creating an Allocation</name>
<t pn="section-7-1">An allocation on the server is created using an Allocate
transaction.</t>
<section anchor="sec-send-allocate" numbered="true" toc="include" removeInRFC="false" pn="section-7.1">
<name slugifiedName="name-sending-an-allocate-request">Sending an Allocate Request</name>
<t pn="section-7.1-1">The client forms an Allocate request as follows.</t>
<t pn="section-7.1-2">The client first picks a host transport address. It is <bcp14>RECOMMENDED</bcp14>
that the client pick a currently unused transport address, typically
by allowing the underlying OS to pick a currently unused port.</t>
<t pn="section-7.1-3">The client then picks a transport protocol that the client supports
to use between the client and the server based on the transport
protocols supported by the server. Since this specification only
allows UDP between the server and the peers, it is <bcp14>RECOMMENDED</bcp14> that
the client pick UDP unless it has a reason to use a different
transport. One reason to pick a different transport would be that the
client believes, either through configuration or discovery or by
experiment, that it is unable to contact any TURN server using UDP.
See <xref target="sec-transports" format="default" sectionFormat="of" derivedContent="Section 3.1"/> for more discussion.</t>
<t pn="section-7.1-4">The client also picks a server transport address, which <bcp14>SHOULD</bcp14> be
done as follows. The client uses one or more procedures described in
<xref target="RFC8155" format="default" sectionFormat="of" derivedContent="RFC8155"/> to discover a TURN server and uses the
TURN server resolution mechanism defined in <xref target="RFC5928" format="default" sectionFormat="of" derivedContent="RFC5928"/> and <xref target="RFC7350" format="default" sectionFormat="of" derivedContent="RFC7350"/> to get a
list of server transport addresses that can be tried to create a TURN
allocation.</t>
<t pn="section-7.1-5">The client <bcp14>MUST</bcp14> include a REQUESTED-TRANSPORT attribute in the
request.
This attribute specifies the transport protocol between the
server and the peers (note that this is *not* the transport protocol
that appears in the 5-tuple). In this specification, the
REQUESTED-TRANSPORT type is always UDP. This attribute is included to
allow future extensions to specify other protocols.</t>
<t pn="section-7.1-6">If the client wishes to obtain a relayed transport address of a
specific address type, then it includes a REQUESTED-ADDRESS-FAMILY
attribute in the request. This attribute indicates the specific
address type the client wishes the TURN server to allocate. Clients
<bcp14>MUST NOT</bcp14> include more than one REQUESTED-ADDRESS-FAMILY attribute in
an Allocate request. Clients <bcp14>MUST NOT</bcp14> include a
REQUESTED-ADDRESS-FAMILY attribute in an Allocate request that
contains a RESERVATION-TOKEN attribute, for the reason that the server
uses the previously reserved transport address corresponding to the
included token and the client cannot obtain a relayed transport
address of a specific address type.</t>
<t pn="section-7.1-7">If the client wishes to obtain one IPv6 and one IPv4 relayed
transport address, then it includes an ADDITIONAL-ADDRESS-FAMILY
attribute in the request. This attribute specifies that the server
must allocate both address types. The attribute value in the
ADDITIONAL-ADDRESS-FAMILY <bcp14>MUST</bcp14> be set to 0x02 (IPv6 address family).
Clients <bcp14>MUST NOT</bcp14> include REQUESTED-ADDRESS-FAMILY and
ADDITIONAL-ADDRESS-FAMILY attributes in the same request. Clients <bcp14>MUST NOT</bcp14> include the ADDITIONAL-ADDRESS-FAMILY attribute in an Allocate request
that contains a RESERVATION-TOKEN attribute.
Clients <bcp14>MUST NOT</bcp14> include
the ADDITIONAL-ADDRESS-FAMILY attribute in an Allocate request that
contains an EVEN-PORT attribute with the R (Reserved) bit set to 1.
The reason behind the restriction is that if the EVEN-PORT attribute with the R bit set to 1 is allowed
with the ADDITIONAL-ADDRESS-FAMILY attribute, two tokens will have to
be returned in the success response and changes will be required to the way
the RESERVATION-TOKEN attribute is handled.</t>
<t pn="section-7.1-8">If the client wishes the server to initialize the time-to-expiry
field of the allocation to some value other than the default lifetime,
then it <bcp14>MAY</bcp14> include a LIFETIME attribute specifying its desired value.
This is just a hint, and the server may elect to use a different
value. Note that the server will ignore requests to initialize the
field to less than the default value.</t>
<t pn="section-7.1-9">If the client wishes to later use the DONT-FRAGMENT attribute in
one or more Send indications on this allocation, then the client
<bcp14>SHOULD</bcp14> include the DONT-FRAGMENT attribute in the Allocate request.
This allows the client to test whether this attribute is supported by
the server.</t>
<t pn="section-7.1-10">If the client requires the port number of the relayed transport
address to be even, the client includes the EVEN-PORT attribute. If this
attribute is not included, then the port can be even or odd. By
setting the R bit in the EVEN-PORT attribute to 1, the client can
request that the server reserve the next highest port number (on the
same IP address) for a subsequent allocation. If the R bit is 0, no
such request is made.</t>
<t pn="section-7.1-11">The client <bcp14>MAY</bcp14> also include a RESERVATION-TOKEN attribute in the
request to ask the server to use a previously reserved port for the
allocation. If the RESERVATION-TOKEN attribute is included, then the
client <bcp14>MUST</bcp14> omit the EVEN-PORT attribute.</t>
<t pn="section-7.1-12">Once constructed, the client sends the Allocate request on the
5-tuple.</t>
</section>
<section anchor="sec-rcv-allocate" numbered="true" toc="include" removeInRFC="false" pn="section-7.2">
<name slugifiedName="name-receiving-an-allocate-reque">Receiving an Allocate Request</name>
<t pn="section-7.2-1">When the server receives an Allocate request, it performs the
following checks:</t>
<ol spacing="normal" type="1" start="1" pn="section-7.2-2">
<li pn="section-7.2-2.1" derivedCounter="1.">The TURN server provided by the local or access network
<bcp14>MAY</bcp14> allow an unauthenticated request in order to
accept Allocation requests from new and/or guest users in the
network who do not necessarily possess long-term credentials for
STUN authentication. The security implications of STUN and making
STUN authentication optional are discussed in <xref target="RFC8155" format="default" sectionFormat="of" derivedContent="RFC8155"/>. Otherwise, the server <bcp14>MUST</bcp14>
require that the request be authenticated. If the request is
authenticated, the authentication <bcp14>MUST</bcp14> be done either
using the long-term credential mechanism of <xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/> or using the STUN Extension for Third-Party
Authorization <xref target="RFC7635" format="default" sectionFormat="of" derivedContent="RFC7635"/> unless the
client and server agree to use another mechanism through some
procedure outside the scope of this document.</li>
<li pn="section-7.2-2.2" derivedCounter="2.">The server checks if the 5-tuple is currently in use by an
existing allocation. If yes, the server rejects the request with a
437 (Allocation Mismatch) error.</li>
<li pn="section-7.2-2.3" derivedCounter="3.">The server checks if the request contains a REQUESTED-TRANSPORT
attribute. If the REQUESTED-TRANSPORT attribute is not included or
is malformed, the server rejects the request with a 400 (Bad
Request) error. Otherwise, if the attribute is included but
specifies a protocol that is not supported by the server, the
server rejects the request with a 442 (Unsupported Transport
Protocol) error.</li>
<li pn="section-7.2-2.4" derivedCounter="4.">The request may contain a DONT-FRAGMENT attribute. If it does,
but the server does not support sending UDP datagrams with the DF
bit set to 1 (see Sections <xref target="sec-ip-header-fields" format="counter" sectionFormat="of" derivedContent="14"/> and
<xref target="sec-ip-header-fields-tcp-udp" format="counter" sectionFormat="of" derivedContent="15"/>), then the
server treats the DONT-FRAGMENT attribute in the Allocate request
as an unknown comprehension-required attribute.</li>
<li pn="section-7.2-2.5" derivedCounter="5.">The server checks if the request contains a RESERVATION-TOKEN
attribute. If yes, and the request also contains an EVEN-PORT or
REQUESTED-ADDRESS-FAMILY or ADDITIONAL-ADDRESS-FAMILY attribute,
the server rejects the request with a 400 (Bad Request) error.
Otherwise, it checks to see if the token is valid (i.e., the token
is in range and has not expired, and the corresponding relayed
transport address is still available). If the token is not valid
for some reason, the server rejects the request with a 508
(Insufficient Capacity) error.</li>
<li pn="section-7.2-2.6" derivedCounter="6.">The server checks if the request contains both
REQUESTED-ADDRESS-FAMILY and ADDITIONAL-ADDRESS-FAMILY attributes.
If yes, then the server rejects the request with a 400 (Bad
Request) error.</li>
<li pn="section-7.2-2.7" derivedCounter="7.">If the server does not support the address family requested by
the client in REQUESTED-ADDRESS-FAMILY, or if the allocation of the
requested address family is disabled by local policy, it <bcp14>MUST</bcp14>
generate an Allocate error response, and it <bcp14>MUST</bcp14> include an
ERROR-CODE attribute with the 440 (Address Family not Supported)
response code. If the REQUESTED-ADDRESS-FAMILY attribute is absent
and the server does not support the IPv4 address family, the server
<bcp14>MUST</bcp14> include an ERROR-CODE attribute with the 440 (Address Family
not Supported) response code. If the REQUESTED-ADDRESS-FAMILY
attribute is absent and the server supports the IPv4 address family,
the server <bcp14>MUST</bcp14> allocate an IPv4 relayed transport address for the
TURN client.</li>
<li pn="section-7.2-2.8" derivedCounter="8.">The server checks if the request contains an EVEN-PORT
attribute with the R bit set to 1. If yes, and the request also
contains an ADDITIONAL-ADDRESS-FAMILY attribute, the server
rejects the request with a 400 (Bad Request) error. Otherwise, the
server checks if it can satisfy the request (i.e., can allocate a
relayed transport address as described below). If the server
cannot satisfy the request, then the server rejects the request
with a 508 (Insufficient Capacity) error.</li>
<li pn="section-7.2-2.9" derivedCounter="9.">The server checks if the request contains an
ADDITIONAL-ADDRESS-FAMILY attribute. If yes, and the attribute
value is 0x01 (IPv4 address family), then the server rejects the
request with a 400 (Bad Request) error. Otherwise, the server
checks if it can allocate relayed transport addresses of both
address types. If the server cannot satisfy the request, then the
server rejects the request with a 508 (Insufficient Capacity)
error. If the server can partially meet the request, i.e., if it
can only allocate one relayed transport address of a specific
address type, then it includes ADDRESS-ERROR-CODE attribute in the
success response to inform the client the reason for partial
failure of the request. The error code value signaled in the
ADDRESS-ERROR-CODE attribute could be 440 (Address Family not
Supported) or 508 (Insufficient Capacity). If the server can fully
meet the request, then the server allocates one IPv4 and one IPv6
relay address and returns an Allocate success response containing
the relayed transport addresses assigned to the dual allocation in
two XOR-RELAYED-ADDRESS attributes.</li>
<li pn="section-7.2-2.10" derivedCounter="10.">At any point, the server <bcp14>MAY</bcp14> choose to reject the
request with a 486 (Allocation Quota Reached) error if it feels the
client is trying to exceed some locally defined allocation
quota. The server is free to define this allocation quota any way it
wishes, but it <bcp14>SHOULD</bcp14> define it based on the username
used to authenticate the request and not on the client's transport
address.</li>
<li pn="section-7.2-2.11" derivedCounter="11.">Also, at any point, the server <bcp14>MAY</bcp14> choose to reject the request
with a 300 (Try Alternate) error if it wishes to redirect the
client to a different server. The use of this error code and
attribute follows the specification in <xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/>.</li>
</ol>
<t pn="section-7.2-3">If all the checks pass, the server creates the allocation. The
5-tuple is set to the 5-tuple from the Allocate request, while the
list of permissions and the list of channels are initially empty.</t>
<t pn="section-7.2-4">The server chooses a relayed transport address for the allocation
as follows:</t>
<ul spacing="normal" bare="false" empty="false" pn="section-7.2-5">
<li pn="section-7.2-5.1">If the request contains a RESERVATION-TOKEN attribute, the
server uses the previously reserved transport address
corresponding to the included token (if it is still available).
Note that the reservation is a server-wide reservation and is not
specific to a particular allocation since the Allocate request
containing the RESERVATION-TOKEN uses a different 5-tuple than the
Allocate request that made the reservation. The 5-tuple for the
Allocate request containing the RESERVATION-TOKEN attribute can be
any allowed 5-tuple; it can use a different client IP address and
port, a different transport protocol, and even a different server IP
address and port (provided, of course, that the server IP address
and port are ones on which the server is listening for TURN
requests).</li>
<li pn="section-7.2-5.2">If the request contains an EVEN-PORT attribute with the R bit
set to 0, then the server allocates a relayed transport address
with an even port number.</li>
<li pn="section-7.2-5.3">If the request contains an EVEN-PORT attribute with the R bit
set to 1, then the server looks for a pair of port numbers N and
N+1 on the same IP address, where N is even. Port N is used in the
current allocation, while the relayed transport address with port
N+1 is assigned a token and reserved for a future allocation. The
server <bcp14>MUST</bcp14> hold this reservation for at least 30 seconds and <bcp14>MAY</bcp14>
choose to hold longer (e.g., until the allocation with port N
expires). The server then includes the token in a
RESERVATION-TOKEN attribute in the success response.</li>
<li pn="section-7.2-5.4">Otherwise, the server allocates any available relayed transport
address.</li>
</ul>
<t pn="section-7.2-6">In all cases, the server <bcp14>SHOULD</bcp14> only allocate ports from the range
49152 - 65535 (the Dynamic and/or Private Port range <xref target="PORT-NUMBERS" format="default" sectionFormat="of" derivedContent="PORT-NUMBERS"/>), unless the TURN server application
knows, through some means not specified here, that other applications
running on the same host as the TURN server application will not be
impacted by allocating ports outside this range. This condition can
often be satisfied by running the TURN server application on a
dedicated machine and/or by arranging that any other applications on
the machine allocate ports before the TURN server application starts.
In any case, the TURN server <bcp14>SHOULD NOT</bcp14> allocate ports in the range 0
- 1023 (the Well-Known Port range) to discourage clients from using
TURN to run standard services.</t>
<aside pn="section-7.2-7">
<t pn="section-7.2-7.1">NOTE: The use of randomized port assignments to avoid certain
types of attacks is described in <xref target="RFC6056" format="default" sectionFormat="of" derivedContent="RFC6056"/>.
It is <bcp14>RECOMMENDED</bcp14> that a TURN server implement a randomized port
assignment algorithm from <xref target="RFC6056" format="default" sectionFormat="of" derivedContent="RFC6056"/>. This is
especially applicable to servers that choose to pre-allocate a
number of ports from the underlying OS and then later assign them
to allocations; for example, a server may choose this technique to
implement the EVEN-PORT attribute.</t>
</aside>
<t pn="section-7.2-8">The server determines the initial value of the time-to-expiry field
as follows. If the request contains a LIFETIME attribute, then the
server computes the minimum of the client's proposed lifetime and the
server's maximum allowed lifetime. If this computed value is greater
than the default lifetime, then the server uses the computed lifetime
as the initial value of the time-to-expiry field. Otherwise, the
server uses the default lifetime. It is <bcp14>RECOMMENDED</bcp14> that the server
use a maximum allowed lifetime value of no more than 3600 seconds (1
hour). Servers that implement allocation quotas or charge users for
allocations in some way may wish to use a smaller maximum allowed
lifetime (perhaps as small as the default lifetime) to more quickly
remove orphaned allocations (that is, allocations where the
corresponding client has crashed or terminated, or the client
connection has been lost for some reason). Also, note that the time-
to-expiry is recomputed with each successful Refresh request, and thus,
the value computed here applies only until the first refresh.</t>
<t pn="section-7.2-9">Once the allocation is created, the server replies with a success
response. The success response contains:</t>
<ul spacing="normal" bare="false" empty="false" pn="section-7.2-10">
<li pn="section-7.2-10.1">An XOR-RELAYED-ADDRESS attribute containing the relayed
transport address or two XOR-RELAYED-ADDRESS attributes containing
the relayed transport addresses.</li>
<li pn="section-7.2-10.2">A LIFETIME attribute containing the current value of the
time-to-expiry timer.</li>
<li pn="section-7.2-10.3">A RESERVATION-TOKEN attribute (if a second relayed transport
address was reserved).</li>
<li pn="section-7.2-10.4">An XOR-MAPPED-ADDRESS attribute containing the client's IP
address and port (from the 5-tuple).</li>
</ul>
<aside pn="section-7.2-11">
<t pn="section-7.2-11.1">NOTE: The XOR-MAPPED-ADDRESS attribute is included in the
response as a convenience to the client. TURN itself does not make
use of this value, but clients running ICE can often need this
value and can thus avoid having to do an extra Binding transaction
with some STUN server to learn it.</t>
</aside>
<t pn="section-7.2-12">The response (either success or error) is sent back to the client
on the 5-tuple.</t>
<aside pn="section-7.2-13">
<t pn="section-7.2-13.1">NOTE: When the Allocate request is sent over UDP, <xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/> requires that the server
handle the possible retransmissions of the request so that
retransmissions do not cause multiple allocations to be created.
Implementations may achieve this using the so-called "stateless
stack approach" as follows. To detect retransmissions when the
original request was successful in creating an allocation, the
server can store the transaction id that created the request with
the allocation data and compare it with incoming Allocate requests
on the same 5-tuple. Once such a request is detected, the server
can stop parsing the request and immediately generate a success
response. When building this response, the value of the LIFETIME
attribute can be taken from the time-to-expiry field in the
allocate state data, even though this value may differ slightly
from the LIFETIME value originally returned. In addition, the
server may need to store an indication of any reservation token
returned in the original response so that this may be returned in
any retransmitted responses.</t>
<t pn="section-7.2-13.2">For the case where the original request was unsuccessful in
creating an allocation, the server may choose to do nothing
special. Note, however, that there is a rare case where the server
rejects the original request but accepts the retransmitted request
(because conditions have changed in the brief intervening time
period). If the client receives the first failure response, it
will ignore the second (success) response and believe that an
allocation was not created.
An allocation created in this manner
will eventually time out since the client will not refresh it.
Furthermore, if the client later retries with the same 5-tuple but
a different transaction id, it will receive a 437 (Allocation
Mismatch) error response, which will cause it to retry with a different 5-tuple.
The server may use a smaller maximum lifetime value to minimize
the lifetime of allocations "orphaned" in this manner.</t>
</aside>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-7.3">
<name slugifiedName="name-receiving-an-allocate-succe">Receiving an Allocate Success Response</name>
<t pn="section-7.3-1">If the client receives an Allocate success response, then it <bcp14>MUST</bcp14>
check that the mapped address and the relayed transport address or
addresses are part of an address family or families that the client
understands and is prepared to handle. If these addresses are not part
of an address family or families that the client is prepared to
handle, then the client <bcp14>MUST</bcp14> delete the allocation (<xref target="sec-refreshing-allocation" format="default" sectionFormat="of" derivedContent="Section 8"/>) and <bcp14>MUST NOT</bcp14> attempt to
create another allocation on that server until it believes the
mismatch has been fixed.</t>
<t pn="section-7.3-2">Otherwise, the client creates its own copy of the allocation data
structure to track what is happening on the server. In particular, the
client needs to remember the actual lifetime received back from the
server, rather than the value sent to the server in the request. The
client must also remember the 5-tuple used for the request and the
username and password it used to authenticate the request to ensure
that it reuses them for subsequent messages. The client also needs to
track the channels and permissions it establishes on the server.</t>
<t pn="section-7.3-3">If the client receives an Allocate success response but with an
ADDRESS-ERROR-CODE attribute in the response and the error code value
signaled in the ADDRESS-ERROR-CODE attribute is 440 (Address Family
not Supported), the client <bcp14>MUST NOT</bcp14> retry its request
for the rejected address type. If the client receives an
ADDRESS-ERROR-CODE attribute in the response and the error code value
signaled in the ADDRESS-ERROR-CODE attribute is 508 (Insufficient
Capacity), the client <bcp14>SHOULD</bcp14> wait at least 1 minute
before trying to request any more allocations on this server for the
rejected address type.</t>
<t pn="section-7.3-4">The client will probably wish to send the relayed transport address
to peers (using some method not specified here) so the peers can
communicate with it. The client may also wish to use the
server-reflexive address it receives in the XOR-MAPPED-ADDRESS
attribute in its ICE processing.</t>
</section>
<section anchor="sec-allocate-error-response" numbered="true" toc="include" removeInRFC="false" pn="section-7.4">
<name slugifiedName="name-receiving-an-allocate-error">Receiving an Allocate Error Response</name>
<t pn="section-7.4-1">If the client receives an Allocate error response, then the
processing depends on the actual error code returned:</t>
<dl newline="true" spacing="normal" pn="section-7.4-2">
<dt pn="section-7.4-2.1">408 (Request timed out):</dt>
<dd pn="section-7.4-2.2">There is either a problem with the
server or a problem reaching the server with the chosen
transport. The client considers the current transaction as having
failed but <bcp14>MAY</bcp14> choose to retry the Allocate request
using a different transport (e.g., TCP instead of UDP).</dd>
<dt pn="section-7.4-2.3">300 (Try Alternate):</dt>
<dd pn="section-7.4-2.4">The server would like the client to use
the server specified in the ALTERNATE-SERVER attribute instead.
The client considers the current transaction as having failed, but it
<bcp14>SHOULD</bcp14> try the Allocate request with the alternate server before
trying any other servers (e.g., other servers discovered using the
DNS resolution procedures). When trying the Allocate request with
the alternate server, the client follows the ALTERNATE-SERVER
procedures specified in <xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/>.</dd>
<dt pn="section-7.4-2.5">400 (Bad Request):</dt>
<dd pn="section-7.4-2.6">The server believes the client's request is
malformed for some reason. The client considers the current
transaction as having failed. The client <bcp14>MAY</bcp14> notify the user or
operator and <bcp14>SHOULD NOT</bcp14> retry the request with this server until
it believes the problem has been fixed.</dd>
<dt pn="section-7.4-2.7">401 (Unauthorized):</dt>
<dd pn="section-7.4-2.8"> If the client has followed the procedures
of the long-term credential mechanism and still gets this error,
then the server is not accepting the client's credentials. In this
case, the client considers the current transaction as having
failed and <bcp14>SHOULD</bcp14> notify the user or operator. The client <bcp14>SHOULD NOT</bcp14> send any further requests to this server until it believes the
problem has been fixed.</dd>
<dt pn="section-7.4-2.9">403 (Forbidden):</dt>
<dd pn="section-7.4-2.10">The request is valid, but the server is
refusing to perform it, likely due to administrative restrictions.
The client considers the current transaction as having failed. The
client <bcp14>MAY</bcp14> notify the user or operator and <bcp14>SHOULD NOT</bcp14> retry the
same request with this server until it believes the problem has
been fixed.</dd>
<dt pn="section-7.4-2.11">420 (Unknown Attribute):</dt>
<dd pn="section-7.4-2.12">If the client included a DONT-FRAGMENT
attribute in the request and the server rejected the request with
a 420 error code and listed the DONT-FRAGMENT attribute in the
UNKNOWN-ATTRIBUTES attribute in the error response, then the
client now knows that the server does not support the
DONT-FRAGMENT attribute. The client considers the current
transaction as having failed but <bcp14>MAY</bcp14> choose to retry the Allocate
request without the DONT-FRAGMENT attribute.</dd>
<dt pn="section-7.4-2.13">437 (Allocation Mismatch):</dt>
<dd pn="section-7.4-2.14">This indicates that the client has
picked a 5-tuple that the server sees as already in use. One way
this could happen is if an intervening NAT assigned a mapped
transport address that was used by another client that recently
crashed. The client considers the current transaction as having
failed. The client <bcp14>SHOULD</bcp14> pick another client transport address
and retry the Allocate request (using a different transaction id).
The client <bcp14>SHOULD</bcp14> try three different client transport addresses
before giving up on this server. Once the client gives up on the
server, it <bcp14>SHOULD NOT</bcp14> try to create another allocation on the
server for 2 minutes.</dd>
<dt pn="section-7.4-2.15">438 (Stale Nonce):</dt>
<dd pn="section-7.4-2.16">See the procedures for the long-term
credential mechanism <xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/>.</dd>
<dt pn="section-7.4-2.17">440 (Address Family not Supported):</dt>
<dd pn="section-7.4-2.18">The server does not support
the address family requested by the client. If the client receives
an Allocate error response with the 440 (Address Family not
Supported) error code, the client <bcp14>MUST NOT</bcp14> retry the request.</dd>
<dt pn="section-7.4-2.19">441 (Wrong Credentials):</dt>
<dd pn="section-7.4-2.20">The client should not receive this
error in response to an Allocate request. The client <bcp14>MAY</bcp14> notify the
user or operator and <bcp14>SHOULD NOT</bcp14> retry the same request with this
server until it believes the problem has been fixed.</dd>
<dt pn="section-7.4-2.21">442 (Unsupported Transport Address):</dt>
<dd pn="section-7.4-2.22">The client should not
receive this error in response to a request for a UDP allocation.
The client <bcp14>MAY</bcp14> notify the user or operator and <bcp14>SHOULD NOT</bcp14>
reattempt the request with this server until it believes the
problem has been fixed.</dd>
<dt pn="section-7.4-2.23">486 (Allocation Quota Reached):</dt>
<dd pn="section-7.4-2.24">The server is currently unable
to create any more allocations with this username. The client
considers the current transaction as having failed. The client
<bcp14>SHOULD</bcp14> wait at least 1 minute before trying to create any more
allocations on the server.</dd>
<dt pn="section-7.4-2.25">508 (Insufficient Capacity):</dt>
<dd pn="section-7.4-2.26">
The server has no more relayed transport addresses available or has
none with the requested properties, or the one that was reserved
is no longer available. The client considers the current
operation as having failed. If the client is using either the
EVEN-PORT or the RESERVATION-TOKEN attribute, then the client
<bcp14>MAY</bcp14> choose to remove or modify this attribute and
try again immediately. Otherwise, the client <bcp14>SHOULD</bcp14>
wait at least 1 minute before trying to create any more
allocations on this server.</dd>
</dl>
<t pn="section-7.4-3">Note that the error code values 486 and 508 indicate to a
eavesdropper that several other users are using the server at this
time, similar to that of the HTTP error response code 503, but
it does
not reveal any information about the users using the TURN server.</t>
<t pn="section-7.4-4">An unknown error response <bcp14>MUST</bcp14> be handled as described in <xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/>.</t>
</section>
</section>
<section anchor="sec-refreshing-allocation" numbered="true" toc="include" removeInRFC="false" pn="section-8">
<name slugifiedName="name-refreshing-an-allocation">Refreshing an Allocation</name>
<t pn="section-8-1">A Refresh transaction can be used to either (a) refresh an existing
allocation and update its time-to-expiry or (b) delete an existing
allocation.</t>
<t pn="section-8-2">If a client wishes to continue using an allocation, then the client
<bcp14>MUST</bcp14> refresh it before it expires. It is suggested that the client
refresh the allocation roughly 1 minute before it expires. If a client
no longer wishes to use an allocation, then it <bcp14>SHOULD</bcp14> explicitly delete
the allocation. A client <bcp14>MAY</bcp14> refresh an allocation at any time for other
reasons.</t>
<section numbered="true" toc="include" removeInRFC="false" pn="section-8.1">
<name slugifiedName="name-sending-a-refresh-request">Sending a Refresh Request</name>
<t pn="section-8.1-1">If the client wishes to immediately delete an existing allocation,
it includes a LIFETIME attribute with a value of zero. All other forms of
the request refresh the allocation.</t>
<t pn="section-8.1-2">When refreshing a dual allocation, the client includes
a REQUESTED-ADDRESS-FAMILY attribute indicating the address family type
that should be refreshed. If no REQUESTED-ADDRESS-FAMILY attribute is included,
then the request should be treated as applying to all current
allocations. The client <bcp14>MUST</bcp14> only include a family type it previously
allocated and has not yet deleted. This process can also be used to
delete an allocation of a specific address type by setting the
lifetime of that Refresh request to zero. Deleting a single allocation
destroys any permissions or channels associated with that particular
allocation; it <bcp14>MUST NOT</bcp14> affect any permissions or channels associated
with allocations for the other address family.</t>
<t pn="section-8.1-3">The Refresh transaction updates the time-to-expiry timer of an
allocation. If the client wishes the server to set the time-to-expiry
timer to something other than the default lifetime, it includes a
LIFETIME attribute with the requested value. The server then computes
a new time-to-expiry value in the same way as it does for an Allocate
transaction, with the exception that a requested lifetime of zero causes
the server to immediately delete the allocation.</t>
</section>
<section anchor="sec-rcv-refresh" numbered="true" toc="include" removeInRFC="false" pn="section-8.2">
<name slugifiedName="name-receiving-a-refresh-request">Receiving a Refresh Request</name>
<t pn="section-8.2-1">When the server receives a Refresh request, it processes the
request as per <xref target="sec-general-behavior" format="default" sectionFormat="of" derivedContent="Section 5"/> plus the
specific rules mentioned here.</t>
<t pn="section-8.2-2">If the server receives a Refresh Request with a
REQUESTED-ADDRESS-FAMILY attribute and the attribute value does not
match the address family of the allocation, the server <bcp14>MUST</bcp14> reply with
a 443 (Peer Address Family Mismatch) Refresh error response.</t>
<t pn="section-8.2-3">The server computes a value called the "desired lifetime" as
follows: if the request contains a LIFETIME attribute and the
attribute value is zero, then the "desired lifetime" is zero. Otherwise, if
the request contains a LIFETIME attribute, then the server computes
the minimum of the client's requested lifetime and the server's
maximum allowed lifetime. If this computed value is greater than the
default lifetime, then the "desired lifetime" is the computed value.
Otherwise, the "desired lifetime" is the default lifetime.</t>
<t pn="section-8.2-4">Subsequent processing depends on the "desired lifetime" value:</t>
<ul spacing="normal" bare="false" empty="false" pn="section-8.2-5">
<li pn="section-8.2-5.1">If the "desired lifetime" is zero, then the request succeeds and
the allocation is deleted.</li>
<li pn="section-8.2-5.2">If the "desired lifetime" is non-zero, then the request
succeeds and the allocation's time-to-expiry is set to the
"desired lifetime".</li>
</ul>
<t pn="section-8.2-6">If the request succeeds, then the server sends a success
response containing:</t>
<ul spacing="normal" bare="false" empty="false" pn="section-8.2-7">
<li pn="section-8.2-7.1">A LIFETIME attribute containing the current value of the
time-to-expiry timer.</li>
</ul>
<aside pn="section-8.2-8">
<t pn="section-8.2-8.1">NOTE: A server need not do anything special to implement
idempotency of Refresh requests over UDP using the "stateless
stack approach". Retransmitted Refresh requests with a non-zero
"desired lifetime" will simply refresh the allocation. A
retransmitted Refresh request with a zero "desired lifetime" will
cause a 437 (Allocation Mismatch) response if the allocation has
already been deleted, but the client will treat this as equivalent
to a success response (see below).</t>
</aside>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-8.3">
<name slugifiedName="name-receiving-a-refresh-respons">Receiving a Refresh Response</name>
<t pn="section-8.3-1">If the client receives a success response to its Refresh request
with a non-zero lifetime, it updates its copy of the allocation data
structure with the time-to-expiry value contained in the response. If
the client receives a 437 (Allocation Mismatch) error response to its
request to refresh the allocation, it should consider the allocation
no longer exists. If the client receives a 438 (Stale Nonce) error to
its request to refresh the allocation, it should reattempt the request
with the new nonce value.</t>
<t pn="section-8.3-2">If the client receives a 437 (Allocation Mismatch) error response
to a request to delete the allocation, then the allocation no longer
exists and it should consider its request as having effectively
succeeded.</t>
</section>
</section>
<section anchor="sec-permissions" numbered="true" toc="include" removeInRFC="false" pn="section-9">
<name slugifiedName="name-permissions-2">Permissions</name>
<t pn="section-9-1">For each allocation, the server keeps a list of zero or more
permissions. Each permission consists of an IP address and an associated
time-to-expiry. While a permission exists, all peers using the IP
address in the permission are allowed to send data to the client. The
time-to-expiry is the number of seconds until the permission expires.
Within the context of an allocation, a permission is uniquely identified
by its associated IP address.</t>
<t pn="section-9-2">By sending either CreatePermission requests or ChannelBind requests,
the client can cause the server to install or refresh a permission for a
given IP address. This causes one of two things to happen:</t>
<ul spacing="normal" bare="false" empty="false" pn="section-9-3">
<li pn="section-9-3.1">If no permission for that IP address exists, then a permission is
created with the given IP address and a time-to-expiry equal to
Permission Lifetime.</li>
<li pn="section-9-3.2">If a permission for that IP address already exists, then the
time-to-expiry for that permission is reset to Permission
Lifetime.</li>
</ul>
<t pn="section-9-4">The Permission Lifetime <bcp14>MUST</bcp14> be 300 seconds (= 5 minutes).</t>
<t pn="section-9-5">Each permission's time-to-expiry decreases down once per second
until it reaches zero, at which point, the permission expires and is
deleted.</t>
<t pn="section-9-6">CreatePermission and ChannelBind requests may be freely intermixed on
a permission. A given permission may be initially installed and/or
refreshed with a CreatePermission request and then later refreshed with
a ChannelBind request, or vice versa.</t>
<t pn="section-9-7">When a UDP datagram arrives at the relayed transport address for the
allocation, the server extracts the source IP address from the IP
header. The server then compares this address with the IP address
associated with each permission in the list of permissions for the
allocation. Note that only addresses are compared and port numbers are
not considered. If no match is found, relaying is not permitted and the
server silently discards the UDP datagram. If an exact match is found,
the permission check is considered to have succeeded and the server
continues to process the UDP datagram as specified elsewhere (<xref target="sec-sending-data-indication" format="default" sectionFormat="of" derivedContent="Section 11.3"/>).</t>
<t pn="section-9-8">The permissions for one allocation are totally unrelated to the
permissions for a different allocation. If an allocation expires, all
its permissions expire with it.</t>
<aside pn="section-9-9">
<t pn="section-9-9.1">NOTE: Though TURN permissions expire after 5 minutes, many NATs
deployed at the time of publication expire their UDP bindings
considerably faster. Thus, an application using TURN will probably
wish to send some sort of keep-alive traffic at a much faster rate.
Applications using ICE should follow the keep-alive guidelines of
ICE <xref target="RFC8445" format="default" sectionFormat="of" derivedContent="RFC8445"/>, and applications not using ICE
are advised to do something similar.</t>
</aside>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-10">
<name slugifiedName="name-createpermission">CreatePermission</name>
<t pn="section-10-1">TURN supports two ways for the client to install or refresh
permissions on the server. This section describes one way: the
CreatePermission request.</t>
<t pn="section-10-2">A CreatePermission request may be used in conjunction with either the
Send mechanism in <xref target="sec-sendanddata" format="default" sectionFormat="of" derivedContent="Section 11"/> or the Channel
mechanism in <xref target="sec-channels" format="default" sectionFormat="of" derivedContent="Section 12"/>.</t>
<section numbered="true" toc="include" removeInRFC="false" pn="section-10.1">
<name slugifiedName="name-forming-a-createpermission-">Forming a CreatePermission Request</name>
<t pn="section-10.1-1">The client who wishes to install or refresh one or more permissions
can send a CreatePermission request to the server.</t>
<t pn="section-10.1-2">When forming a CreatePermission request, the client <bcp14>MUST</bcp14> include at
least one XOR-PEER-ADDRESS attribute and <bcp14>MAY</bcp14> include more than one
such attribute. The IP address portion of each XOR-PEER-ADDRESS
attribute contains the IP address for which a permission should be
installed or refreshed. The port portion of each XOR-PEER-ADDRESS
attribute will be ignored and can be any arbitrary value. The various
XOR-PEER-ADDRESS attributes <bcp14>MAY</bcp14> appear in any order. The client <bcp14>MUST</bcp14>
only include XOR-PEER-ADDRESS attributes with addresses of the same
address family as that of the relayed transport address for the
allocation. For dual allocations obtained using the
ADDITIONAL-ADDRESS-FAMILY attribute, the client <bcp14>MAY</bcp14> include
XOR-PEER-ADDRESS attributes with addresses of IPv4 and IPv6 address
families.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-10.2">
<name slugifiedName="name-receiving-a-createpermissio">Receiving a CreatePermission Request</name>
<t pn="section-10.2-1">When the server receives the CreatePermission request, it processes
as per <xref target="sec-general-behavior" format="default" sectionFormat="of" derivedContent="Section 5"/> plus the specific
rules mentioned here.</t>
<t pn="section-10.2-2">The message is checked for validity. The CreatePermission request
<bcp14>MUST</bcp14> contain at least one XOR-PEER-ADDRESS attribute and <bcp14>MAY</bcp14> contain
multiple such attributes. If no such attribute exists, or if any of
these attributes are invalid, then a 400 (Bad Request) error is
returned. If the request is valid, but the server is unable to satisfy
the request due to some capacity limit or similar, then a 508
(Insufficient Capacity) error is returned.</t>
<t pn="section-10.2-3">If an XOR-PEER-ADDRESS attribute contains an address of an address
family that is not the same as that of a relayed transport address for
the allocation, the server <bcp14>MUST</bcp14> generate an error response with the
443 (Peer Address Family Mismatch) response code.</t>
<t pn="section-10.2-4">The server <bcp14>MAY</bcp14> impose restrictions on the IP address allowed in the
XOR-PEER-ADDRESS attribute; if a value is not allowed, the server
rejects the request with a 403 (Forbidden) error.</t>
<t pn="section-10.2-5">If the message is valid and the server is capable of carrying out
the request, then the server installs or refreshes a permission for
the IP address contained in each XOR-PEER-ADDRESS attribute as
described in <xref target="sec-permissions" format="default" sectionFormat="of" derivedContent="Section 9"/>. The port portion
of each attribute is ignored and may be any arbitrary value.</t>
<t pn="section-10.2-6">The server then responds with a CreatePermission success response.
There are no mandatory attributes in the success response.</t>
<aside pn="section-10.2-7">
<t pn="section-10.2-7.1">NOTE: A server need not do anything special to implement
idempotency of CreatePermission requests over UDP using the
"stateless stack approach". Retransmitted CreatePermission
requests will simply refresh the permissions.</t>
</aside>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-10.3">
<name slugifiedName="name-receiving-a-createpermission">Receiving a CreatePermission Response</name>
<t pn="section-10.3-1">If the client receives a valid CreatePermission success response,
then the client updates its data structures to indicate that the
permissions have been installed or refreshed.</t>
</section>
</section>
<section anchor="sec-sendanddata" numbered="true" toc="include" removeInRFC="false" pn="section-11">
<name slugifiedName="name-send-and-data-methods">Send and Data Methods</name>
<t pn="section-11-1">TURN supports two mechanisms for sending and receiving data from
peers. This section describes the use of the Send and Data mechanisms,
while <xref target="sec-channels" format="default" sectionFormat="of" derivedContent="Section 12"/> describes the use of the
Channel mechanism.</t>
<section anchor="sec-forming-indication" numbered="true" toc="include" removeInRFC="false" pn="section-11.1">
<name slugifiedName="name-forming-a-send-indication">Forming a Send Indication</name>
<t pn="section-11.1-1">The client can use a Send indication to pass data to the server for
relaying to a peer. A client may use a Send indication even if a
channel is bound to that peer. However, the client <bcp14>MUST</bcp14> ensure that
there is a permission installed for the IP address of the peer to
which the Send indication is being sent; this prevents a third party
from using a TURN server to send data to arbitrary destinations.</t>
<t pn="section-11.1-2">When forming a Send indication, the client <bcp14>MUST</bcp14> include an
XOR-PEER-ADDRESS attribute and a DATA attribute. The XOR-PEER-ADDRESS
attribute contains the transport address of the peer to which the data
is to be sent, and the DATA attribute contains the actual application
data to be sent to the peer.</t>
<t pn="section-11.1-3">The client <bcp14>MAY</bcp14> include a DONT-FRAGMENT attribute in the Send
indication if it wishes the server to set the DF bit on the UDP
datagram sent to the peer.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-11.2">
<name slugifiedName="name-receiving-a-send-indication">Receiving a Send Indication</name>
<t pn="section-11.2-1">When the server receives a Send indication, it processes as per
<xref target="sec-general-behavior" format="default" sectionFormat="of" derivedContent="Section 5"/> plus the specific rules
mentioned here.</t>
<t pn="section-11.2-2">The message is first checked for validity. The Send indication <bcp14>MUST</bcp14>
contain both an XOR-PEER-ADDRESS attribute and a DATA attribute. If
one of these attributes is missing or invalid, then the message is
discarded. Note that the DATA attribute is allowed to contain zero
bytes of data.</t>
<t pn="section-11.2-3">The Send indication may also contain the DONT-FRAGMENT attribute.
If the server is unable to set the DF bit on outgoing UDP datagrams
when this attribute is present, then the server acts as if the
DONT-FRAGMENT attribute is an unknown comprehension-required attribute
(and thus the Send indication is discarded).</t>
<t pn="section-11.2-4">The server also checks that there is a permission installed for the
IP address contained in the XOR-PEER-ADDRESS attribute. If no such
permission exists, the message is discarded. Note that a Send
indication never causes the server to refresh the permission.</t>
<t pn="section-11.2-5">The server <bcp14>MAY</bcp14> impose restrictions on the IP address and port
values allowed in the XOR-PEER-ADDRESS attribute; if a value is not
allowed, the server silently discards the Send indication.</t>
<t pn="section-11.2-6">If everything is OK, then the server forms a UDP datagram as
follows:</t>
<ul spacing="normal" bare="false" empty="false" pn="section-11.2-7">
<li pn="section-11.2-7.1">the source transport address is the relayed transport address
of the allocation, where the allocation is determined by the
5-tuple on which the Send indication arrived;</li>
<li pn="section-11.2-7.2">the destination transport address is taken from the
XOR-PEER-ADDRESS attribute;</li>
<li pn="section-11.2-7.3">the data following the UDP header is the contents of the value
field of the DATA attribute.</li>
</ul>
<t pn="section-11.2-8">The handling of the DONT-FRAGMENT attribute (if present), is
described in Sections <xref target="sec-ip-header-fields" format="counter" sectionFormat="of" derivedContent="14"/> and <xref target="sec-ip-header-fields-tcp-udp" format="counter" sectionFormat="of" derivedContent="15"/>.</t>
<t pn="section-11.2-9">The resulting UDP datagram is then sent to the peer.</t>
</section>
<section anchor="sec-sending-data-indication" numbered="true" toc="include" removeInRFC="false" pn="section-11.3">
<name slugifiedName="name-receiving-a-udp-datagram">Receiving a UDP Datagram</name>
<t pn="section-11.3-1">When the server receives a UDP datagram at a currently allocated
relayed transport address, the server looks up the allocation
associated with the relayed transport address. The server then checks
to see whether the set of permissions for the allocation allow the
relaying of the UDP datagram as described in <xref target="sec-permissions" format="default" sectionFormat="of" derivedContent="Section 9"/>.</t>
<t pn="section-11.3-2">If relaying is permitted, then the server checks if there is a
channel bound to the peer that sent the UDP datagram (see <xref target="sec-channels" format="default" sectionFormat="of" derivedContent="Section 12"/>). If a channel is bound, then processing
proceeds as described in <xref target="sec-channel-relaying" format="default" sectionFormat="of" derivedContent="Section 12.7"/>.</t>
<t pn="section-11.3-3">If relaying is permitted but no channel is bound to the peer, then
the server forms and sends a Data indication. The Data indication <bcp14>MUST</bcp14>
contain both an XOR-PEER-ADDRESS and a DATA attribute. The DATA
attribute is set to the value of the "data octets" field
from the datagram, and the XOR-PEER-ADDRESS attribute is set to the
source transport address of the received UDP datagram. The Data
indication is then sent on the 5-tuple associated with the
allocation.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-11.4">
<name slugifiedName="name-receiving-a-data-indication">Receiving a Data Indication</name>
<t pn="section-11.4-1">When the client receives a Data indication, it checks that the Data
indication contains an XOR-PEER-ADDRESS attribute and discards the
indication if it does not. The client <bcp14>SHOULD</bcp14> also check that the
XOR-PEER-ADDRESS attribute value contains an IP address with which the
client believes there is an active permission and discard the Data
indication otherwise.</t>
<aside pn="section-11.4-2">
<t pn="section-11.4-2.1">NOTE: The latter check protects the client against an attacker
who somehow manages to trick the server into installing
permissions not desired by the client.</t>
</aside>
<t pn="section-11.4-3">If the XOR-PEER-ADDRESS is present and valid, the client checks
that the Data indication contains either a DATA attribute or an ICMP
attribute and discards the indication if it does not. Note that a DATA
attribute is allowed to contain zero bytes of data. Processing of Data
indications with an ICMP attribute is described in <xref target="receive-senderror" format="default" sectionFormat="of" derivedContent="Section 11.6"/>.</t>
<t pn="section-11.4-4">If the Data indication passes the above checks, the client delivers
the data octets inside the DATA attribute to the application, along
with an indication that they were received from the peer whose
transport address is given by the XOR-PEER-ADDRESS attribute.</t>
</section>
<section anchor="sec-sending-senderror-indication" numbered="true" toc="include" removeInRFC="false" pn="section-11.5">
<name slugifiedName="name-receiving-an-icmp-packet">Receiving an ICMP Packet</name>
<t pn="section-11.5-1">When the server receives an ICMP packet, the server verifies that
the type is either 3 or 11 for an ICMPv4 <xref target="RFC0792" format="default" sectionFormat="of" derivedContent="RFC0792"/> packet or either 1, 2, or 3 for an ICMPv6
<xref target="RFC4443" format="default" sectionFormat="of" derivedContent="RFC4443"/> packet. It also verifies that the IP
packet in the ICMP packet payload contains a UDP header. If either of
these conditions fail, then the ICMP packet is silently dropped. If a
UDP header is present, the server extracts the source and destination
IP address and UDP port information.</t>
<t pn="section-11.5-2">The server looks up the allocation whose relayed transport address
corresponds to the encapsulated packet's source IP address and UDP
port. If no such allocation exists, the packet is silently dropped.
The server then checks to see whether the set of permissions for the
allocation allows the relaying of the ICMP packet. For ICMP packets,
the source IP address <bcp14>MUST NOT</bcp14> be checked against the permissions list
as it would be for UDP packets. Instead, the server extracts the
destination IP address from the encapsulated IP header. The server
then compares this address with the IP address associated with each
permission in the list of permissions for the allocation. If no match
is found, relaying is not permitted and the server silently discards
the ICMP packet. Note that only addresses are compared and port
numbers are not considered.</t>
<t pn="section-11.5-3">If relaying is permitted, then the server forms and sends a Data
indication. The Data indication <bcp14>MUST</bcp14> contain both an XOR-PEER-ADDRESS
and an ICMP attribute. The ICMP attribute is set to the value of the
type and code fields from the ICMP packet. The IP address portion of
XOR-PEER-ADDRESS attribute is set to the destination IP address in the
encapsulated IP header. At the time of writing of this specification,
Socket APIs on some operating systems do not deliver the destination
port in the encapsulated UDP header to applications without superuser
privileges. If destination port in the encapsulated UDP header is
available to the server, then the port portion of the XOR-PEER-ADDRESS
attribute is set to the destination port; otherwise, the port portion is
set to zero. The Data indication is then sent on the 5-tuple associated
with the allocation.</t>
<aside pn="section-11.5-4">
<t pn="section-11.5-4.1">Implementation Note: New ICMP types or codes can be defined in
future specifications. If the server receives an ICMP error packet,
and the new type or code field can help the client to make use of the
ICMP error notification and generate feedback to the application
layer, the server sends the Data indication with an ICMP attribute
conveying the new ICMP type or code.</t>
</aside>
</section>
<section anchor="receive-senderror" numbered="true" toc="include" removeInRFC="false" pn="section-11.6">
<name slugifiedName="name-receiving-a-data-indication-">Receiving a Data Indication with an ICMP Attribute</name>
<t pn="section-11.6-1">When the client receives a Data indication with an ICMP attribute,
it checks that the Data indication contains an XOR-PEER-ADDRESS
attribute and discards the indication if it does not. The client
<bcp14>SHOULD</bcp14> also check that the XOR-PEER-ADDRESS attribute value contains
an IP address with an active permission and discard the Data
indication otherwise.</t>
<t pn="section-11.6-2">If the Data indication passes the above checks, the client signals
the application of the error condition along with an indication that
it was received from the peer whose transport address is given by the
XOR-PEER-ADDRESS attribute. The application can make sense of the
meaning of the type and code values in the ICMP attribute by using the
family field in the XOR-PEER-ADDRESS attribute.</t>
</section>
</section>
<section anchor="sec-channels" numbered="true" toc="include" removeInRFC="false" pn="section-12">
<name slugifiedName="name-channels-2">Channels</name>
<t pn="section-12-1">Channels provide a way for the client and server to send application
data using ChannelData messages, which have less overhead than Send and
Data indications.</t>
<t pn="section-12-2">The ChannelData message (see <xref target="sec-channeldata-msg" format="default" sectionFormat="of" derivedContent="Section 12.4"/>) starts with a two-byte field that
carries the channel number. The values of this field are allocated as
follows:</t>
<table anchor="channels" align="center" pn="table-2">
<tbody>
<tr>
<td align="left" colspan="1" rowspan="1">0x0000 through 0x3FFF:</td>
<td align="left" colspan="1" rowspan="1">These values can never be used for channel numbers.</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x4000 through 0x4FFF:</td>
<td align="left" colspan="1" rowspan="1">These values are the allowed channel numbers (4096 possible values).</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x5000 through 0xFFFF:</td>
<td align="left" colspan="1" rowspan="1">Reserved (For DTLS-SRTP multiplexing collision avoidance, see <xref target="RFC7983" format="default" sectionFormat="of" derivedContent="RFC7983"/>).</td>
</tr>
</tbody>
</table>
<t pn="section-12-4">Note that the channel number range is not backwards compatible with
<xref target="RFC5766" format="default" sectionFormat="of" derivedContent="RFC5766"/>, which could prevent a client
compliant with RFC 5766 from establishing channel bindings with a
TURN server that complies with this specification.</t>
<t pn="section-12-5">According to <xref target="RFC7983" format="default" sectionFormat="of" derivedContent="RFC7983"/>, ChannelData messages can
be distinguished from other multiplexed protocols by examining the first
byte of the message:</t>
<table anchor="fig-demultiplexing" align="center" pn="table-3">
<tbody>
<tr>
<td align="left" colspan="1" rowspan="1">[0..3]</td>
<td align="center" colspan="1" rowspan="1">STUN</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">[16..19]</td>
<td align="center" colspan="1" rowspan="1">ZRTP</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">[20..63]</td>
<td align="center" colspan="1" rowspan="1">DTLS</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">[64..79]</td>
<td align="center" colspan="1" rowspan="1">TURN Channel</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">[128..191]</td>
<td align="center" colspan="1" rowspan="1">RTP/RTCP</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">Others</td>
<td align="center" colspan="1" rowspan="1">Reserved; <bcp14>MUST</bcp14> be dropped and an alert
<bcp14>MAY</bcp14> be logged</td>
</tr>
</tbody>
</table>
<t pn="section-12-7">Reserved values may be used in the future by other protocols. When
the client uses channel binding, it <bcp14>MUST</bcp14> comply with the demultiplexing
scheme discussed above.</t>
<t pn="section-12-8">Channel bindings are always initiated by the client. The client can
bind a channel to a peer at any time during the lifetime of the
allocation. The client may bind a channel to a peer before exchanging
data with it or after exchanging data with it (using Send and Data
indications) for some time, or may choose never to bind a channel to it.
The client can also bind channels to some peers while not binding
channels to other peers.</t>
<t pn="section-12-9">Channel bindings are specific to an allocation so that the use of a
channel number or peer transport address in a channel binding in one
allocation has no impact on their use in a different allocation. If an
allocation expires, all its channel bindings expire with it.</t>
<t pn="section-12-10">A channel binding consists of:</t>
<ul spacing="normal" bare="false" empty="false" pn="section-12-11">
<li pn="section-12-11.1">a channel number;</li>
<li pn="section-12-11.2">a transport address (of the peer); and</li>
<li pn="section-12-11.3">A time-to-expiry timer.</li>
</ul>
<t pn="section-12-12">Within the context of an allocation, a channel binding is
uniquely identified either by the channel number or by the peer's
transport address. Thus, the same channel cannot be bound to two
different transport addresses, nor can the same transport address be
bound to two different channels.</t>
<t pn="section-12-13">A channel binding lasts for 10 minutes unless refreshed. Refreshing
the binding (by the server receiving a ChannelBind request rebinding the
channel to the same peer) resets the time-to-expiry timer back to 10
minutes.</t>
<t pn="section-12-14">When the channel binding expires, the channel becomes unbound. Once
unbound, the channel number can be bound to a different transport
address, and the transport address can be bound to a different channel
number. To prevent race conditions, the client <bcp14>MUST</bcp14> wait 5 minutes after
the channel binding expires before attempting to bind the channel number
to a different transport address or the transport address to a different
channel number.</t>
<t pn="section-12-15">When binding a channel to a peer, the client <bcp14>SHOULD</bcp14> be prepared to
receive ChannelData messages on the channel from the server as soon as
it has sent the ChannelBind request. Over UDP, it is possible for the
client to receive ChannelData messages from the server before it
receives a ChannelBind success response.</t>
<t pn="section-12-16">In the other direction, the client <bcp14>MAY</bcp14> elect to send ChannelData
messages before receiving the ChannelBind success response. Doing so,
however, runs the risk of having the ChannelData messages dropped by the
server if the ChannelBind request does not succeed for some reason
(e.g., packet lost if the request is sent over UDP or the server being
unable to fulfill the request). A client that wishes to be safe should
either queue the data or use Send indications until the channel binding
is confirmed.</t>
<section numbered="true" toc="include" removeInRFC="false" pn="section-12.1">
<name slugifiedName="name-sending-a-channelbind-reque">Sending a ChannelBind Request</name>
<t pn="section-12.1-1">A channel binding is created or refreshed using a ChannelBind
transaction. A ChannelBind transaction also creates or refreshes a
permission towards the peer (see <xref target="sec-permissions" format="default" sectionFormat="of" derivedContent="Section 9"/>).</t>
<t pn="section-12.1-2">To initiate the ChannelBind transaction, the client forms a
ChannelBind request. The channel to be bound is specified in a
CHANNEL-NUMBER attribute, and the peer's transport address is
specified in an XOR-PEER-ADDRESS attribute. <xref target="sec-receiving-ChannelBind" format="default" sectionFormat="of" derivedContent="Section 12.2"/> describes the restrictions
on these attributes. The client <bcp14>MUST</bcp14> only include an XOR-PEER-ADDRESS
attribute with an address of the same address family as that of a
relayed transport address for the allocation.</t>
<t pn="section-12.1-3">Rebinding a channel to the same transport address that it is
already bound to provides a way to refresh a channel binding and the
corresponding permission without sending data to the peer. Note,
however, that permissions need to be refreshed more frequently than
channels.</t>
</section>
<section anchor="sec-receiving-ChannelBind" numbered="true" toc="include" removeInRFC="false" pn="section-12.2">
<name slugifiedName="name-receiving-a-channelbind-req">Receiving a ChannelBind Request</name>
<t pn="section-12.2-1">When the server receives a ChannelBind request, it processes as per
<xref target="sec-general-behavior" format="default" sectionFormat="of" derivedContent="Section 5"/> plus the specific rules
mentioned here.</t>
<t pn="section-12.2-2">The server checks the following:</t>
<ul spacing="normal" bare="false" empty="false" pn="section-12.2-3">
<li pn="section-12.2-3.1">The request contains both a CHANNEL-NUMBER and an
XOR-PEER-ADDRESS attribute;</li>
<li pn="section-12.2-3.2">The channel number is in the range 0x4000 through 0x4FFF
(inclusive);</li>
<li pn="section-12.2-3.3">The channel number is not currently bound to a different
transport address (same transport address is OK);</li>
<li pn="section-12.2-3.4">The transport address is not currently bound to a different
channel number.</li>
</ul>
<t pn="section-12.2-4">If any of these tests fail, the server replies with a 400 (Bad
Request) error. If the XOR-PEER-ADDRESS attribute contains an address
of an address family that is not the same as that of a relayed
transport address for the allocation, the server <bcp14>MUST</bcp14> generate an
error response with the 443 (Peer Address Family Mismatch) response
code.</t>
<t pn="section-12.2-5">The server <bcp14>MAY</bcp14> impose restrictions on the IP address and port
values allowed in the XOR-PEER-ADDRESS attribute; if a value is not
allowed, the server rejects the request with a 403 (Forbidden)
error.</t>
<t pn="section-12.2-6">If the request is valid, but the server is unable to fulfill the
request due to some capacity limit or similar, the server replies with
a 508 (Insufficient Capacity) error.</t>
<t pn="section-12.2-7">Otherwise, the server replies with a ChannelBind success response.
There are no required attributes in a successful ChannelBind
response.</t>
<t pn="section-12.2-8">If the server can satisfy the request, then the server creates or
refreshes the channel binding using the channel number in the
CHANNEL-NUMBER attribute and the transport address in the
XOR-PEER-ADDRESS attribute. The server also installs or refreshes a
permission for the IP address in the XOR-PEER-ADDRESS attribute as
described in <xref target="sec-permissions" format="default" sectionFormat="of" derivedContent="Section 9"/>.</t>
<aside pn="section-12.2-9">
<t pn="section-12.2-9.1">NOTE: A server need not do anything special to implement
idempotency of ChannelBind requests over UDP using the "stateless
stack approach". Retransmitted ChannelBind requests will simply
refresh the channel binding and the corresponding permission.
Furthermore, the client must wait 5 minutes before binding a
previously bound channel number or peer address to a different
channel, eliminating the possibility that the transaction would
initially fail but succeed on a retransmission.</t>
</aside>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-12.3">
<name slugifiedName="name-receiving-a-channelbind-res">Receiving a ChannelBind Response</name>
<t pn="section-12.3-1">When the client receives a ChannelBind success response, it updates
its data structures to record that the channel binding is now active.
It also updates its data structures to record that the corresponding
permission has been installed or refreshed.</t>
<t pn="section-12.3-2">If the client receives a ChannelBind failure response that
indicates that the channel information is out of sync between the
client and the server (e.g., an unexpected 400 "Bad Request"
response), then it is <bcp14>RECOMMENDED</bcp14> that the client immediately delete
the allocation and start afresh with a new allocation.</t>
</section>
<section anchor="sec-channeldata-msg" numbered="true" toc="include" removeInRFC="false" pn="section-12.4">
<name slugifiedName="name-the-channeldata-message">The ChannelData Message</name>
<t pn="section-12.4-1">The ChannelData message is used to carry application data between
the client and the server. It has the following format:</t>
<figure align="left" suppress-title="false" pn="figure-5">
<artwork name="" type="" align="left" alt="" pn="section-12.4-2.1">
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Channel Number | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ Application Data /
/ /
| |
| +-------------------------------+
| |
+-------------------------------+</artwork>
</figure>
<t pn="section-12.4-3">The Channel Number field specifies the number of the channel on
which the data is traveling, and thus, the address of the peer that is
sending or is to receive the data.</t>
<t pn="section-12.4-4">The Length field specifies the length in bytes of the application
data field (i.e., it does not include the size of the ChannelData
header). Note that 0 is a valid length.</t>
<t pn="section-12.4-5">The Application Data field carries the data the client is trying to
send to the peer, or that the peer is sending to the client.</t>
</section>
<section anchor="sec-sending-channeldata-msg" numbered="true" toc="include" removeInRFC="false" pn="section-12.5">
<name slugifiedName="name-sending-a-channeldata-messa">Sending a ChannelData Message</name>
<t pn="section-12.5-1">Once a client has bound a channel to a peer, then when the client
has data to send to that peer, it may use either a ChannelData message
or a Send indication; that is, the client is not obligated to use the
channel when it exists and may freely intermix the two message types
when sending data to the peer. The server, on the other hand, <bcp14>MUST</bcp14> use
the ChannelData message if a channel has been bound to the peer. The
server uses a Data indication to signal the XOR-PEER-ADDRESS and ICMP
attributes to the client even if a channel has been bound to the
peer.</t>
<t pn="section-12.5-2">The fields of the ChannelData message are filled in as described in
<xref target="sec-channeldata-msg" format="default" sectionFormat="of" derivedContent="Section 12.4"/>.</t>
<t pn="section-12.5-3">Over TCP and TLS-over-TCP, the ChannelData message <bcp14>MUST</bcp14> be padded
to a multiple of four bytes in order to ensure the alignment of
subsequent messages. The padding is not reflected in the length field
of the ChannelData message, so the actual size of a ChannelData
message (including padding) is (4 + Length) rounded up to the nearest
multiple of 4 (see <xref target="RFC8489" section="14" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8489#section-14" derivedContent="RFC8489"/>). Over UDP, the padding is not
required but <bcp14>MAY</bcp14> be included.</t>
<t pn="section-12.5-4">The ChannelData message is then sent on the 5-tuple associated with
the allocation.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-12.6">
<name slugifiedName="name-receiving-a-channeldata-mes">Receiving a ChannelData Message</name>
<t pn="section-12.6-1">The receiver of the ChannelData message uses the first byte to
distinguish it from other multiplexed protocols as described in <xref target="fig-demultiplexing" format="default" sectionFormat="of" derivedContent="Table 3"/>. If the message uses a
value in the reserved range (0x5000 through 0xFFFF), then the message
is silently discarded.</t>
<t pn="section-12.6-2">If the ChannelData message is received in a UDP datagram, and if
the UDP datagram is too short to contain the claimed length of the
ChannelData message (i.e., the UDP header length field value is less
than the ChannelData header length field value + 4 + 8), then the
message is silently discarded.</t>
<t pn="section-12.6-3">If the ChannelData message is received over TCP or over
TLS-over-TCP, then the actual length of the ChannelData message is as
described in <xref target="sec-sending-channeldata-msg" format="default" sectionFormat="of" derivedContent="Section 12.5"/>.</t>
<t pn="section-12.6-4">If the ChannelData message is received on a channel that is not
bound to any peer, then the message is silently discarded.</t>
<t pn="section-12.6-5">On the client, it is <bcp14>RECOMMENDED</bcp14> that the client discard the
ChannelData message if the client believes there is no active
permission towards the peer. On the server, the receipt of a
ChannelData message <bcp14>MUST NOT</bcp14> refresh either the channel binding or the
permission towards the peer.</t>
<t pn="section-12.6-6">On the server, if no errors are detected, the server relays the
application data to the peer by forming a UDP datagram as
follows:</t>
<ul spacing="normal" bare="false" empty="false" pn="section-12.6-7">
<li pn="section-12.6-7.1">the source transport address is the relayed transport address
of the allocation, where the allocation is determined by the
5-tuple on which the ChannelData message arrived;</li>
<li pn="section-12.6-7.2">the destination transport address is the transport address to
which the channel is bound;</li>
<li pn="section-12.6-7.3">the data following the UDP header is the contents of the data
field of the ChannelData message.</li>
</ul>
<t pn="section-12.6-8">The resulting UDP datagram is then sent to the peer. Note
that if the Length field in the ChannelData message is 0, then there
will be no data in the UDP datagram, but the UDP datagram is still
formed and sent (<xref target="RFC6263" sectionFormat="of" section="4.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc6263#section-4.1" derivedContent="RFC6263"/>).</t>
</section>
<section anchor="sec-channel-relaying" numbered="true" toc="include" removeInRFC="false" pn="section-12.7">
<name slugifiedName="name-relaying-data-from-the-peer">Relaying Data from the Peer</name>
<t pn="section-12.7-1">When the server receives a UDP datagram on the relayed transport
address associated with an allocation, the server processes it as
described in <xref target="sec-sending-data-indication" format="default" sectionFormat="of" derivedContent="Section 11.3"/>. If
that section indicates that a ChannelData message should be sent
(because there is a channel bound to the peer that sent to the UDP
datagram), then the server forms and sends a ChannelData message as
described in <xref target="sec-sending-channeldata-msg" format="default" sectionFormat="of" derivedContent="Section 12.5"/>.</t>
<t pn="section-12.7-2">When the server receives an ICMP packet, the server processes it as
described in <xref target="sec-sending-senderror-indication" format="default" sectionFormat="of" derivedContent="Section 11.5"/>.</t>
</section>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-13">
<name slugifiedName="name-packet-translations">Packet Translations</name>
<t pn="section-13-1">This section addresses IPv4-to-IPv6, IPv6-to-IPv4, and IPv6-to-IPv6
translations. Requirements for translation of the IP addresses and port
numbers of the packets are described above. The following sections
specify how to translate other header fields.</t>
<t pn="section-13-2">As discussed in <xref target="unpriv" format="default" sectionFormat="of" derivedContent="Section 3.6"/>, translations in TURN
are designed so that a TURN server can be implemented as an application
that runs in user space under commonly available operating systems and
that does not require special privileges. The translations specified in
the following sections follow this principle.</t>
<t pn="section-13-3">The descriptions below have two parts: a preferred behavior and an
alternate behavior. The server <bcp14>SHOULD</bcp14> implement the preferred behavior,
but if that is not possible for a particular field, the server <bcp14>MUST</bcp14>
implement the alternate behavior and <bcp14>MUST NOT</bcp14> do anything else for the
reasons detailed in <xref target="RFC7915" format="default" sectionFormat="of" derivedContent="RFC7915"/>. The TURN server
solely relies on the DF bit in the IPv4 header and the Fragment header
in the IPv6 header to handle fragmentation using the approach described in
<xref target="RFC7915" format="default" sectionFormat="of" derivedContent="RFC7915"/> and does not rely on the DONT-FRAGMENT
attribute; ignoring the DONT-FRAGMENT attribute is only applicable for UDP-to-UDP
relay and not for TCP-to-UDP relay.</t>
<section numbered="true" toc="include" removeInRFC="false" pn="section-13.1">
<name slugifiedName="name-ipv4-to-ipv6-translations">IPv4-to-IPv6 Translations</name>
<t pn="section-13.1-1">Time to Live (TTL) field</t>
<ul empty="true" spacing="normal" bare="false" pn="section-13.1-2">
<li pn="section-13.1-2.1">Preferred Behavior: As specified in <xref target="RFC7915" sectionFormat="of" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7915#section-4" derivedContent="RFC7915"/>.</li>
<li pn="section-13.1-2.2">Alternate Behavior: Set the outgoing value to the default for
outgoing packets.</li>
</ul>
<t pn="section-13.1-3">Traffic Class</t>
<ul empty="true" spacing="normal" bare="false" pn="section-13.1-4">
<li pn="section-13.1-4.1">Preferred behavior: As specified in <xref target="RFC7915" sectionFormat="of" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7915#section-4" derivedContent="RFC7915"/>.</li>
<li pn="section-13.1-4.2">Alternate behavior: The TURN server sets the Traffic Class to
the default value for outgoing packets.</li>
</ul>
<t pn="section-13.1-5">Flow Label</t>
<ul empty="true" spacing="normal" bare="false" pn="section-13.1-6">
<li pn="section-13.1-6.1">Preferred behavior: The TURN server can use the 5-tuple of
relayed transport address, peer transport address, and UDP protocol
number to identify each flow and to generate and set the flow
label value in the IPv6 packet as discussed in <xref target="RFC6437" sectionFormat="of" section="3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc6437#section-3" derivedContent="RFC6437"/>. If the TURN server is incapable of
generating the flow label value from the IPv6 packet's 5-tuple, it
sets the Flow label to zero.</li>
<li pn="section-13.1-6.2">Alternate behavior: The alternate behavior is the same as the
preferred behavior for a TURN server that does not support flow
labels.</li>
</ul>
<t pn="section-13.1-7">Hop Limit</t>
<ul empty="true" spacing="normal" bare="false" pn="section-13.1-8">
<li pn="section-13.1-8.1">Preferred behavior: As specified in <xref target="RFC7915" sectionFormat="of" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7915#section-4" derivedContent="RFC7915"/>.</li>
<li pn="section-13.1-8.2">Alternate behavior: The TURN server sets the Hop Limit to the
default value for outgoing packets.</li>
</ul>
<t pn="section-13.1-9">Fragmentation</t>
<ul empty="true" spacing="normal" bare="false" pn="section-13.1-10">
<li pn="section-13.1-10.1">Preferred behavior: As specified in <xref target="RFC7915" sectionFormat="of" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7915#section-4" derivedContent="RFC7915"/>.</li>
<li pn="section-13.1-10.2">Alternate behavior: The TURN server assembles incoming
fragments. The TURN server follows its default behavior to send
outgoing packets.</li>
<li pn="section-13.1-10.3">For both preferred and alternate behavior, the DONT-FRAGMENT
attribute <bcp14>MUST</bcp14> be ignored by the server.</li>
</ul>
<t pn="section-13.1-11">Extension Headers</t>
<ul empty="true" spacing="normal" bare="false" pn="section-13.1-12">
<li pn="section-13.1-12.1">Preferred behavior: The outgoing packet uses the system
defaults for IPv6 extension headers, with the exception of the
Fragment header as described above.</li>
<li pn="section-13.1-12.2">Alternate behavior: Same as preferred.</li>
</ul>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-13.2">
<name slugifiedName="name-ipv6-to-ipv6-translations">IPv6-to-IPv6 Translations</name>
<t pn="section-13.2-1">Flow Label</t>
<t pn="section-13.2-2">NOTE: The TURN server should consider that it is handling two different
IPv6 flows. Therefore, the Flow label <xref target="RFC6437" format="default" sectionFormat="of" derivedContent="RFC6437"/>
<bcp14>SHOULD NOT</bcp14> be copied as part of the translation.
</t>
<ul empty="true" spacing="normal" bare="false" pn="section-13.2-3">
<li pn="section-13.2-3.1">Preferred behavior: The TURN server can use the 5-tuple of relayed
transport address, peer transport address, and UDP protocol number to
identify each flow and to generate and set the flow label value in the IPv6
packet as discussed in <xref target="RFC6437" sectionFormat="of" section="3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc6437#section-3" derivedContent="RFC6437"/>. If the TURN server is incapable of generating the flow
label value from the IPv6 packet's 5-tuple, it sets the Flow label to
zero.</li>
<li pn="section-13.2-3.2">Alternate behavior: The alternate behavior is the same as the
preferred behavior for a TURN server that does not support flow
labels.</li>
</ul>
<t pn="section-13.2-4">Hop Limit</t>
<ul empty="true" spacing="normal" bare="false" pn="section-13.2-5">
<li pn="section-13.2-5.1">Preferred behavior: The TURN server acts as a regular router
with respect to decrementing the Hop Limit and generating an
ICMPv6 error if it reaches zero.</li>
<li pn="section-13.2-5.2">Alternate behavior: The TURN server sets the Hop Limit to the
default value for outgoing packets.</li>
</ul>
<t pn="section-13.2-6">Fragmentation</t>
<ul empty="true" spacing="normal" bare="false" pn="section-13.2-7">
<li pn="section-13.2-7.1">Preferred behavior: If the incoming packet did not include a
Fragment header and the outgoing packet size does not exceed the
outgoing link's MTU, the TURN server sends the outgoing packet
without a Fragment header.</li>
<li pn="section-13.2-7.2">If the incoming packet did not include a Fragment header and
the outgoing packet size exceeds the outgoing link's MTU, the TURN
server drops the outgoing packet and sends an ICMP message of type
2 code 0 ("Packet too big") to the sender of the incoming packet.
If the ICMPv6 packet ("Packet too big") is being sent to the peer,
the TURN server <bcp14>SHOULD</bcp14> reduce the MTU reported in the ICMP message
by 48 bytes to allow room for the overhead of a Data
indication.</li>
<li pn="section-13.2-7.3">If the incoming packet included a Fragment header and the
outgoing packet size (with a Fragment header included) does not
exceed the outgoing link's MTU, the TURN server sends the outgoing
packet with a Fragment header. The TURN server sets the fields of
the Fragment header as appropriate for a packet originating from
the server.</li>
<li pn="section-13.2-7.4">If the incoming packet included a Fragment header and the
outgoing packet size exceeds the outgoing link's MTU, the TURN
server <bcp14>MUST</bcp14> fragment the outgoing packet into fragments of no more
than 1280 bytes. The TURN server sets the fields of the Fragment
header as appropriate for a packet originating from the
server.</li>
<li pn="section-13.2-7.5">Alternate behavior: The TURN server assembles incoming
fragments. The TURN server follows its default behavior to send
outgoing packets.</li>
<li pn="section-13.2-7.6">For both preferred and alternate behavior, the DONT-FRAGMENT
attribute <bcp14>MUST</bcp14> be ignored by the server.</li>
</ul>
<t pn="section-13.2-8">Extension Headers</t>
<ul empty="true" spacing="normal" bare="false" pn="section-13.2-9">
<li pn="section-13.2-9.1">Preferred behavior: The outgoing packet uses the system
defaults for IPv6 extension headers, with the exception of the
Fragment header as described above.</li>
<li pn="section-13.2-9.2">Alternate behavior: Same as preferred.</li>
</ul>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-13.3">
<name slugifiedName="name-ipv6-to-ipv4-translations">IPv6-to-IPv4 Translations</name>
<t pn="section-13.3-1">Type of Service and Precedence</t>
<ul empty="true" spacing="normal" bare="false" pn="section-13.3-2">
<li pn="section-13.3-2.1">Preferred behavior: As specified in <xref target="RFC7915" sectionFormat="of" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7915#section-5" derivedContent="RFC7915"/>.</li>
<li pn="section-13.3-2.2">Alternate behavior: The TURN server sets the Type of Service
and Precedence to the default value for outgoing packets.</li>
</ul>
<t pn="section-13.3-3">Time to Live</t>
<ul empty="true" spacing="normal" bare="false" pn="section-13.3-4">
<li pn="section-13.3-4.1">Preferred behavior: As specified in <xref target="RFC7915" sectionFormat="of" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7915#section-5" derivedContent="RFC7915"/>.</li>
<li pn="section-13.3-4.2">Alternate behavior: The TURN server sets the Time to Live to
the default value for outgoing packets.</li>
</ul>
<t pn="section-13.3-5">Fragmentation</t>
<ul empty="true" spacing="normal" bare="false" pn="section-13.3-6">
<li pn="section-13.3-6.1">Preferred behavior: As specified in <xref target="RFC7915" sectionFormat="of" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7915#section-5" derivedContent="RFC7915"/>. Additionally, when the outgoing packet's
size exceeds the outgoing link's MTU, the TURN server needs to
generate an ICMP error (ICMPv6 "Packet too big") reporting the MTU
size. If the ICMPv4 packet (Destination Unreachable (Type 3) with
Code 4) is being sent to the peer, the TURN server <bcp14>SHOULD</bcp14> reduce
the MTU reported in the ICMP message by 48 bytes to allow room for
the overhead of a Data indication.</li>
<li pn="section-13.3-6.2">Alternate behavior: The TURN server assembles incoming
fragments. The TURN server follows its default behavior to send
outgoing packets.</li>
<li pn="section-13.3-6.3">For both preferred and alternate behavior, the DONT-FRAGMENT
attribute <bcp14>MUST</bcp14> be ignored by the server.</li>
</ul>
</section>
</section>
<section anchor="sec-ip-header-fields" numbered="true" toc="include" removeInRFC="false" pn="section-14">
<name slugifiedName="name-udp-to-udp-relay">UDP-to-UDP Relay</name>
<t pn="section-14-1">This section describes how the server sets various fields in the IP
header for UDP-to-UDP relay from the client to the peer or vice versa.
The descriptions in this section apply (a) when the server sends a UDP
datagram to the peer or (b) when the server sends a Data indication or
ChannelData message to the client over UDP transport. The descriptions
in this section do not apply to TURN messages sent over TCP or TLS
transport from the server to the client.</t>
<t pn="section-14-2">The descriptions below have two parts: a preferred behavior and an
alternate behavior. The server <bcp14>SHOULD</bcp14> implement the preferred behavior,
but if that is not possible for a particular field, then it <bcp14>SHOULD</bcp14>
implement the alternative behavior.</t>
<t pn="section-14-3">Differentiated Services Code Point (DSCP) field <xref target="RFC2474" format="default" sectionFormat="of" derivedContent="RFC2474"/></t>
<ul empty="true" spacing="normal" bare="false" pn="section-14-4">
<li pn="section-14-4.1">Preferred Behavior: Set the outgoing value to the incoming value
unless the server includes a differentiated services classifier and
marker <xref target="RFC2474" format="default" sectionFormat="of" derivedContent="RFC2474"/>.</li>
<li pn="section-14-4.2">Alternate Behavior: Set the outgoing value to a fixed value,
which by default is Best Effort unless configured otherwise.</li>
<li pn="section-14-4.3">In both cases, if the server is immediately adjacent to a
differentiated services classifier and marker, then DSCP <bcp14>MAY</bcp14> be set
to any arbitrary value in the direction towards the classifier.</li>
</ul>
<t pn="section-14-5">Explicit Congestion Notification (ECN) field <xref target="RFC3168" format="default" sectionFormat="of" derivedContent="RFC3168"/></t>
<ul empty="true" spacing="normal" bare="false" pn="section-14-6">
<li pn="section-14-6.1">Preferred Behavior: Set the outgoing value to the incoming value.
The server may perform Active Queue Management, in which case it
<bcp14>SHOULD</bcp14> behave as an ECN-aware router <xref target="RFC3168" format="default" sectionFormat="of" derivedContent="RFC3168"/>
and can mark traffic with Congestion Experienced (CE) instead of
dropping the packet. The use of ECT(1) is subject to experimental
usage <xref target="RFC8311" format="default" sectionFormat="of" derivedContent="RFC8311"/>.</li>
<li pn="section-14-6.2">Alternate Behavior: Set the outgoing value to Not-ECT
(=0b00).</li>
</ul>
<t pn="section-14-7">IPv4 Fragmentation fields (applicable only for IPv4-to-IPv4
relay)</t>
<ul empty="true" spacing="normal" bare="false" pn="section-14-8">
<li pn="section-14-8.1">Preferred Behavior: When the server sends a packet to a peer in
response to a Send indication containing the DONT-FRAGMENT
attribute, then set the outgoing UDP packet to not fragment. In all
other cases, when sending an outgoing packet containing application
data (e.g., Data indication, a ChannelData message, or the DONT-FRAGMENT
attribute not included in the Send indication), copy the DF bit from
the DF bit of the incoming packet that contained the application
data.</li>
<li pn="section-14-8.2">Set the other fragmentation fields (Identification, More
Fragments, Fragment Offset) as appropriate for a packet originating
from the server.</li>
<li pn="section-14-8.3">Alternate Behavior: As described in the Preferred Behavior,
except always assume the incoming DF bit is 0.</li>
<li pn="section-14-8.4">In both the Preferred and Alternate Behaviors, the resulting
packet may be too large for the outgoing link. If this is the case,
then the normal fragmentation rules apply <xref target="RFC1122" format="default" sectionFormat="of" derivedContent="RFC1122"/>.</li>
</ul>
<t pn="section-14-9">IPv4 Options</t>
<ul empty="true" spacing="normal" bare="false" pn="section-14-10">
<li pn="section-14-10.1">Preferred Behavior: The outgoing packet uses the system defaults
for IPv4 options.</li>
<li pn="section-14-10.2">Alternate Behavior: Same as preferred.</li>
</ul>
</section>
<section anchor="sec-ip-header-fields-tcp-udp" numbered="true" toc="include" removeInRFC="false" pn="section-15">
<name slugifiedName="name-tcp-to-udp-relay">TCP-to-UDP Relay</name>
<t pn="section-15-1">This section describes how the server sets various fields in the IP
header for TCP-to-UDP relay from the client to the peer. The
descriptions in this section apply when the server sends a UDP datagram
to the peer. Note that the server does not perform per-packet
translation for TCP-to-UDP relaying.</t>
<t pn="section-15-2">Multipath TCP <xref target="I-D.ietf-mptcp-rfc6824bis" format="default" sectionFormat="of" derivedContent="TCP-EXT"/> is not supported by this version of TURN because TCP
multipath is not used by either SIP or WebRTC protocols <xref target="RFC7478" format="default" sectionFormat="of" derivedContent="RFC7478"/> for media and non-media data. TCP
connection between the TURN client and server can use the TCP
Authentication Option (TCP-AO) <xref target="RFC5925" format="default" sectionFormat="of" derivedContent="RFC5925"/>, but UDP does not provide a similar type of
authentication, though it might be added in the future <xref target="I-D.ietf-tsvwg-udp-options" format="default" sectionFormat="of" derivedContent="UDP-OPT"/>. Even if both
TCP-AO and UDP authentication would be used between TURN client and
server, it would not change the end-to-end security properties of the
application payload being relayed. Therefore, applications using TURN
will need to secure their application data end to end appropriately,
e.g., Secure Real-time Transport Protocol (SRTP) for RTP
applications. Note that the TCP-AO option obsoletes the TCP MD5
option.</t>
<t pn="section-15-3">Unlike UDP, TCP without the TCP Fast Open extension <xref target="RFC7413" format="default" sectionFormat="of" derivedContent="RFC7413"/> does not support 0-RTT session
resumption. The TCP user timeout <xref target="RFC5482" format="default" sectionFormat="of" derivedContent="RFC5482"/> equivalent for application data relayed by the TURN
is the use of RTP control protocol (RTCP). As a reminder, RTCP is a
fundamental and integral part of RTP.</t>
<t pn="section-15-4">The descriptions below have two parts: a preferred behavior and an
alternate behavior. The server <bcp14>SHOULD</bcp14> implement the preferred behavior,
but if that is not possible for a particular field, then it <bcp14>SHOULD</bcp14>
implement the alternative behavior.</t>
<t pn="section-15-5">For the UDP datagram sent to the peer based on a Send Indication or
ChannelData message arriving at the TURN server over a TCP Transport,
the server sets various fields in the IP header as follows:</t>
<t pn="section-15-6">Differentiated Services Code Point (DSCP) field <xref target="RFC2474" format="default" sectionFormat="of" derivedContent="RFC2474"/></t>
<ul empty="true" spacing="normal" bare="false" pn="section-15-7">
<li pn="section-15-7.1">Preferred Behavior: The TCP connection can only use a single DSCP,
so inter-flow differentiation is not possible; see
<xref target="RFC7657" sectionFormat="of" section="5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7657#section-5.1" derivedContent="RFC7657"/>. The server sets the
outgoing value to the DSCP used by the TCP connection,
unless the server includes a differentiated services classifier and
marker <xref target="RFC2474" format="default" sectionFormat="of" derivedContent="RFC2474"/>.</li>
<li pn="section-15-7.2">Alternate Behavior: Set the outgoing value to a fixed value,
which by default is Best Effort unless configured otherwise.</li>
<li pn="section-15-7.3">In both cases, if the server is immediately adjacent to a
differentiated services classifier and marker, then DSCP <bcp14>MAY</bcp14> be set
to any arbitrary value in the direction towards the classifier.</li>
</ul>
<t pn="section-15-8">Explicit Congestion Notification (ECN) field <xref target="RFC3168" format="default" sectionFormat="of" derivedContent="RFC3168"/></t>
<ul empty="true" spacing="normal" bare="false" pn="section-15-9">
<li pn="section-15-9.1">Preferred Behavior: No mechanism is defined to indicate what ECN
value should be used for the outgoing UDP datagrams of an
allocation; therefore, set the outgoing value to Not-ECT (=0b00).</li>
<li pn="section-15-9.2">Alternate Behavior: Same as preferred.</li>
</ul>
<t pn="section-15-10">IPv4 Fragmentation fields (applicable only for IPv4-to-IPv4
relay)</t>
<ul empty="true" spacing="normal" bare="false" pn="section-15-11">
<li pn="section-15-11.1">Preferred Behavior: When the server sends a packet to a peer in
response to a Send indication containing the DONT-FRAGMENT
attribute, set the outgoing UDP packet to not fragment. In all
other cases, when sending an outgoing UDP packet containing
application data (e.g., Data indication, ChannelData message, or
DONT-FRAGMENT attribute not included in the Send indication), set
the DF bit in the outgoing IP header to 0.</li>
<li pn="section-15-11.2">Alternate Behavior: Same as preferred.</li>
</ul>
<t pn="section-15-12">IPv6 Fragmentation fields</t>
<ul empty="true" spacing="normal" bare="false" pn="section-15-13">
<li pn="section-15-13.1">Preferred Behavior: If the TCP traffic arrives over IPv6, the
server relies on the presence of the DONT-FRAGMENT attribute in the send
indication to set the outgoing UDP packet to not fragment.</li>
<li pn="section-15-13.2">Alternate Behavior: Same as preferred.</li>
</ul>
<t pn="section-15-14">IPv4 Options</t>
<ul empty="true" spacing="normal" bare="false" pn="section-15-15">
<li pn="section-15-15.1">Preferred Behavior: The outgoing packet uses the system defaults
for IPv4 options.</li>
<li pn="section-15-15.2">Alternate Behavior: Same as preferred.</li>
</ul>
</section>
<section anchor="UDP-to-TCP" numbered="true" toc="include" removeInRFC="false" pn="section-16">
<name slugifiedName="name-udp-to-tcp-relay">UDP-to-TCP Relay</name>
<t pn="section-16-1">This section describes how the server sets various fields in the IP
header for UDP-to-TCP relay from the peer to the client. The
descriptions in this section apply when the server sends a Data
indication or ChannelData message to the client over TCP or TLS
transport. Note that the server does not perform per-packet translation
for UDP-to-TCP relaying.</t>
<t pn="section-16-2">The descriptions below have two parts: a preferred behavior and an
alternate behavior. The server <bcp14>SHOULD</bcp14> implement the preferred behavior,
but if that is not possible for a particular field, then it <bcp14>SHOULD</bcp14>
implement the alternative behavior.</t>
<t pn="section-16-3">The TURN server sets IP header fields in the TCP packets on a
per-connection basis for the TCP connection as follows:</t>
<t pn="section-16-4">Differentiated Services Code Point (DSCP) field <xref target="RFC2474" format="default" sectionFormat="of" derivedContent="RFC2474"/></t>
<ul empty="true" spacing="normal" bare="false" pn="section-16-5">
<li pn="section-16-5.1">Preferred Behavior: Ignore the incoming DSCP value. When TCP is
used between the client and the server, a single DSCP should be used
for all traffic on that TCP connection. Note, TURN/ICE occurs before
application data is exchanged.</li>
<li pn="section-16-5.2">Alternate Behavior: Same as preferred.</li>
</ul>
<t pn="section-16-6">Explicit Congestion Notification (ECN) field <xref target="RFC3168" format="default" sectionFormat="of" derivedContent="RFC3168"/></t>
<ul empty="true" spacing="normal" bare="false" pn="section-16-7">
<li pn="section-16-7.1">Preferred Behavior: Ignore; ECN signals are dropped in the TURN
server for the incoming UDP datagrams from the peer.</li>
<li pn="section-16-7.2">Alternate Behavior: Same as preferred.</li>
</ul>
<t pn="section-16-8">Fragmentation </t>
<ul empty="true" spacing="normal" bare="false" pn="section-16-9">
<li pn="section-16-9.1">Preferred Behavior: Any fragmented packets are reassembled in the
server and then forwarded to the client over the TCP connection.
ICMP messages resulting from the UDP datagrams sent to the peer are
processed by the server as described in <xref target="sec-sending-senderror-indication" format="default" sectionFormat="of" derivedContent="Section 11.5"/> and forwarded to
the client using TURN's mechanism for relevant ICMP types and
codes.</li>
<li pn="section-16-9.2">Alternate Behavior: Same as preferred.</li>
</ul>
<t pn="section-16-10">Extension Headers</t>
<ul empty="true" spacing="normal" bare="false" pn="section-16-11">
<li pn="section-16-11.1">Preferred behavior: The outgoing packet uses the system defaults
for IPv6 extension headers.</li>
<li pn="section-16-11.2">Alternate behavior: Same as preferred.</li>
</ul>
<t pn="section-16-12">IPv4 Options</t>
<ul empty="true" spacing="normal" bare="false" pn="section-16-13">
<li pn="section-16-13.1">Preferred Behavior: The outgoing packet uses the system defaults
for IPv4 options.</li>
<li pn="section-16-13.2">Alternate Behavior: Same as preferred.</li>
</ul>
</section>
<section anchor="sec-stun-methods" numbered="true" toc="include" removeInRFC="false" pn="section-17">
<name slugifiedName="name-stun-methods">STUN Methods</name>
<t pn="section-17-1">This section lists the code points for the STUN methods defined in
this specification. See elsewhere in this document for the semantics of
these methods.</t>
<table anchor="stun-methods" align="center" pn="table-4">
<tbody>
<tr>
<td align="left" colspan="1" rowspan="1">0x003</td>
<td align="left" colspan="1" rowspan="1">Allocate</td>
<td align="left" colspan="1" rowspan="1">(only request/response semantics defined)</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x004</td>
<td align="left" colspan="1" rowspan="1">Refresh</td>
<td align="left" colspan="1" rowspan="1">(only request/response semantics defined)</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x006</td>
<td align="left" colspan="1" rowspan="1">Send</td>
<td align="left" colspan="1" rowspan="1">(only indication semantics defined)</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x007</td>
<td align="left" colspan="1" rowspan="1">Data</td>
<td align="left" colspan="1" rowspan="1">(only indication semantics defined)</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x008</td>
<td align="left" colspan="1" rowspan="1">CreatePermission</td>
<td align="left" colspan="1" rowspan="1">(only request/response semantics defined)</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x009</td>
<td align="left" colspan="1" rowspan="1">ChannelBind</td>
<td align="left" colspan="1" rowspan="1">(only request/response semantics defined)</td>
</tr>
</tbody>
</table>
</section>
<section anchor="sec-stun-attributes" numbered="true" toc="include" removeInRFC="false" pn="section-18">
<name slugifiedName="name-stun-attributes">STUN Attributes</name>
<t pn="section-18-1">This STUN extension defines the following
attributes:</t>
<table anchor="stun-attributes" align="center" pn="table-5">
<tbody>
<tr>
<td align="left" colspan="1" rowspan="1">0x000C</td>
<td align="left" colspan="1" rowspan="1">CHANNEL-NUMBER</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x000D</td>
<td align="left" colspan="1" rowspan="1">LIFETIME</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x0010</td>
<td align="left" colspan="1" rowspan="1">Reserved (was BANDWIDTH)</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x0012</td>
<td align="left" colspan="1" rowspan="1">XOR-PEER-ADDRESS</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x0013</td>
<td align="left" colspan="1" rowspan="1">DATA</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x0016</td>
<td align="left" colspan="1" rowspan="1">XOR-RELAYED-ADDRESS</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x0017</td>
<td align="left" colspan="1" rowspan="1">REQUESTED-ADDRESS-FAMILY</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x0018</td>
<td align="left" colspan="1" rowspan="1">EVEN-PORT</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x0019</td>
<td align="left" colspan="1" rowspan="1">REQUESTED-TRANSPORT</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x001A</td>
<td align="left" colspan="1" rowspan="1">DONT-FRAGMENT</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x0021</td>
<td align="left" colspan="1" rowspan="1">Reserved (was TIMER-VAL)</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x0022</td>
<td align="left" colspan="1" rowspan="1">RESERVATION-TOKEN</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x8000</td>
<td align="left" colspan="1" rowspan="1">ADDITIONAL-ADDRESS-FAMILY</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x8001</td>
<td align="left" colspan="1" rowspan="1">ADDRESS-ERROR-CODE</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x8004</td>
<td align="left" colspan="1" rowspan="1">ICMP</td>
</tr>
</tbody>
</table>
<t pn="section-18-3">Some of these attributes have lengths that are not multiples of 4. By
the rules of STUN, any attribute whose length is not a multiple of 4
bytes <bcp14>MUST</bcp14> be immediately followed by 1 to 3 padding bytes to ensure the
next attribute (if any) would start on a 4-byte boundary (see <xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/>).</t>
<section anchor="channelnums" numbered="true" toc="include" removeInRFC="false" pn="section-18.1">
<name slugifiedName="name-channel-number">CHANNEL-NUMBER</name>
<t pn="section-18.1-1">The CHANNEL-NUMBER attribute contains the number of the channel.
The value portion of this attribute is 4 bytes long and consists of a
16-bit unsigned integer followed by a two-octet RFFU (Reserved For
Future Use) field, which <bcp14>MUST</bcp14> be set to 0 on transmission and <bcp14>MUST</bcp14> be
ignored on reception.</t>
<figure align="left" suppress-title="false" pn="figure-6">
<artwork name="" type="" align="left" alt="" pn="section-18.1-2.1">
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Channel Number | RFFU = 0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
</figure>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-18.2">
<name slugifiedName="name-lifetime">LIFETIME</name>
<t pn="section-18.2-1">The LIFETIME attribute represents the duration for which the server
will maintain an allocation in the absence of a refresh. The TURN
client can include the LIFETIME attribute with the desired lifetime in
Allocate and Refresh requests. The value portion of this attribute is
4 bytes long and consists of a 32-bit unsigned integral value
representing the number of seconds remaining until expiration.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-18.3">
<name slugifiedName="name-xor-peer-address">XOR-PEER-ADDRESS</name>
<t pn="section-18.3-1">The XOR-PEER-ADDRESS attribute specifies the address and port of the peer as
seen from the TURN server. (For example, the peer's server-reflexive
transport address if the peer is behind a NAT.) It is encoded in the
same way as the XOR-MAPPED-ADDRESS attribute <xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/>.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-18.4">
<name slugifiedName="name-data">DATA</name>
<t pn="section-18.4-1">The DATA attribute is present in all Send indications. If the ICMP
attribute is not present in a Data indication, it contains a DATA
attribute. The value portion of this attribute is variable length and
consists of the application data (that is, the data that would
immediately follow the UDP header if the data was sent directly
between the client and the peer). The application data is equivalent
to the "UDP user data" and does not include the "surplus area" defined
in <xref target="I-D.ietf-tsvwg-udp-options" sectionFormat="of" section="4" format="default" derivedLink="https://tools.ietf.org/html/draft-ietf-tsvwg-udp-options-08#section-4" derivedContent="UDP-OPT"/>. If
the length of this attribute is not a multiple of 4, then padding must
be added after this attribute.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-18.5">
<name slugifiedName="name-xor-relayed-address">XOR-RELAYED-ADDRESS</name>
<t pn="section-18.5-1">The XOR-RELAYED-ADDRESS attribute is present in Allocate responses. It
specifies the address and port that the server allocated to the
client. It is encoded in the same way as the XOR-MAPPED-ADDRESS
attribute <xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/>.</t>
</section>
<section anchor="sec-requested-address-family" numbered="true" toc="include" removeInRFC="false" pn="section-18.6">
<name slugifiedName="name-requested-address-family">REQUESTED-ADDRESS-FAMILY</name>
<t pn="section-18.6-1">This attribute is used in Allocate and Refresh requests to specify
the address type requested by the client. The value of this attribute
is 4 bytes with the following format:</t>
<figure align="left" suppress-title="false" pn="figure-7">
<artwork name="" type="" align="left" alt="" pn="section-18.6-2.1">
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Family | Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
</figure>
<dl newline="false" spacing="normal" pn="section-18.6-3">
<dt pn="section-18.6-3.1">Family:</dt>
<dd pn="section-18.6-3.2">There are two values defined for this field and specified in
<xref target="RFC8489" section="14.1" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8489#section-14.1" derivedContent="RFC8489"/>: 0x01 for
IPv4 addresses and 0x02 for IPv6 addresses.</dd>
<dt pn="section-18.6-3.3">Reserved:</dt>
<dd pn="section-18.6-3.4">At this point, the 24 bits in the Reserved
field <bcp14>MUST</bcp14> be set to zero by the client and <bcp14>MUST</bcp14> be ignored by the
server.</dd>
</dl>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-18.7">
<name slugifiedName="name-even-port">EVEN-PORT</name>
<t pn="section-18.7-1">This attribute allows the client to request that the port in the
relayed transport address be even and (optionally) that the server
reserve the next-higher port number. The value portion of this
attribute is 1 byte long. Its format is:</t>
<figure align="left" suppress-title="false" pn="figure-8">
<artwork name="" type="" align="left" alt="" pn="section-18.7-2.1">
0
0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
|R| RFFU |
+-+-+-+-+-+-+-+-+</artwork>
</figure>
<t pn="section-18.7-3">The value contains a single 1-bit flag:</t>
<dl newline="false" spacing="normal" pn="section-18.7-4">
<dt pn="section-18.7-4.1">R:</dt>
<dd pn="section-18.7-4.2">If 1, the server is requested to reserve the
next-higher port number (on the same IP address) for a subsequent
allocation. If 0, no such reservation is requested.</dd>
<dt pn="section-18.7-4.3">RFFU:</dt>
<dd pn="section-18.7-4.4">Reserved For Future Use.</dd>
</dl>
<t pn="section-18.7-5">The RFFU field must be set to zero on transmission and
ignored on reception.</t>
<t pn="section-18.7-6">Since the length of this attribute is not a multiple of 4, padding
must immediately follow this attribute.</t>
</section>
<section anchor="sec-requested-transport" numbered="true" toc="include" removeInRFC="false" pn="section-18.8">
<name slugifiedName="name-requested-transport">REQUESTED-TRANSPORT</name>
<t pn="section-18.8-1">This attribute is used by the client to request a specific
transport protocol for the allocated transport address. The value of
this attribute is 4 bytes with the following format:</t>
<figure align="left" suppress-title="false" pn="figure-9">
<artwork name="" type="" align="left" alt="" pn="section-18.8-2.1">
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 | RFFU |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
</figure>
<t pn="section-18.8-3">The Protocol field specifies the desired protocol. The code points
used in this field are taken from those allowed in the Protocol field
in the IPv4 header and the NextHeader field in the IPv6 header <xref target="PROTOCOL-NUMBERS" format="default" sectionFormat="of" derivedContent="PROTOCOL-NUMBERS"/>. This specification only
allows the use of code point 17 (User Datagram Protocol).</t>
<t pn="section-18.8-4">The RFFU field <bcp14>MUST</bcp14> be set to zero on transmission and <bcp14>MUST</bcp14> be
ignored on reception. It is reserved for future uses.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-18.9">
<name slugifiedName="name-dont-fragment">DONT-FRAGMENT</name>
<t pn="section-18.9-1">This attribute is used by the client to request that the server set
the DF (Don't Fragment) bit in the IP header when relaying the
application data onward to the peer and for determining the server
capability in Allocate requests. This attribute has no value part, and
thus, the attribute length field is 0.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-18.10">
<name slugifiedName="name-reservation-token">RESERVATION-TOKEN</name>
<t pn="section-18.10-1">The RESERVATION-TOKEN attribute contains a token that uniquely
identifies a relayed transport address being held in reserve by the
server. The server includes this attribute in a success response to
tell the client about the token, and the client includes this
attribute in a subsequent Allocate request to request the server use
that relayed transport address for the allocation.</t>
<t pn="section-18.10-2">The attribute value is 8 bytes and contains the token value.</t>
</section>
<section anchor="sec-additional-address-family" numbered="true" toc="include" removeInRFC="false" pn="section-18.11">
<name slugifiedName="name-additional-address-family">ADDITIONAL-ADDRESS-FAMILY</name>
<t pn="section-18.11-1">This attribute is used by clients to request the allocation of an
IPv4 and IPv6 address type from a server. It is encoded in the same
way as the REQUESTED-ADDRESS-FAMILY attribute; see <xref target="sec-requested-address-family" format="default" sectionFormat="of" derivedContent="Section 18.6"/>. The
ADDITIONAL-ADDRESS-FAMILY attribute <bcp14>MAY</bcp14> be present in
the Allocate request. The attribute value of 0x02 (IPv6 address) is
the only valid value in Allocate request.</t>
</section>
<section anchor="sec-address-error-code" numbered="true" toc="include" removeInRFC="false" pn="section-18.12">
<name slugifiedName="name-address-error-code">ADDRESS-ERROR-CODE</name>
<t pn="section-18.12-1">This attribute is used by servers to signal the reason for not
allocating the requested address family. The value portion of this
attribute is variable length with the following format:</t>
<figure align="left" suppress-title="false" pn="figure-10">
<artwork name="" type="" align="left" alt="" pn="section-18.12-2.1">
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Family | Reserved |Class| Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reason Phrase (variable) ..
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
</figure>
<dl newline="false" spacing="normal" pn="section-18.12-3">
<dt pn="section-18.12-3.1">Family:</dt>
<dd pn="section-18.12-3.2">There are two values defined for this field and specified in
<xref target="RFC8489" sectionFormat="of" section="14.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8489#section-14.1" derivedContent="RFC8489"/>: 0x01 for
IPv4 addresses and 0x02 for IPv6 addresses.</dd>
<dt pn="section-18.12-3.3">Reserved:</dt>
<dd pn="section-18.12-3.4">At this point, the 13 bits in the Reserved
field <bcp14>MUST</bcp14> be set to zero by the server and <bcp14>MUST</bcp14> be ignored by the
client.</dd>
<dt pn="section-18.12-3.5">Class:</dt>
<dd pn="section-18.12-3.6">The Class represents the hundreds digit of
the error code and is defined in <xref target="RFC8489" sectionFormat="of" section="14.8" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8489#section-14.8" derivedContent="RFC8489"/>.</dd>
<dt pn="section-18.12-3.7">Number:</dt>
<dd pn="section-18.12-3.8">This 8-bit field contains the reason the server
cannot allocate one of the requested address types. The error code
values could be either 440 (Address Family not Supported) or 508
(Insufficient Capacity). The number representation is defined in
<xref target="RFC8489" sectionFormat="of" section="14.8" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8489#section-14.8" derivedContent="RFC8489"/>.</dd>
<dt pn="section-18.12-3.9">Reason Phrase:</dt>
<dd pn="section-18.12-3.10">The recommended reason phrases for
error codes 440 and 508 are explained in <xref target="sec-stun-errors" format="default" sectionFormat="of" derivedContent="Section 19"/>. The reason phrase <bcp14>MUST</bcp14> be a
UTF-8 <xref target="RFC3629" format="default" sectionFormat="of" derivedContent="RFC3629"/> encoded sequence of less than
128 characters (which can be as long as 509 bytes when encoding
them or 763 bytes when decoding them).</dd>
</dl>
</section>
<section anchor="icmp" numbered="true" toc="include" removeInRFC="false" pn="section-18.13">
<name slugifiedName="name-icmp">ICMP</name>
<t pn="section-18.13-1">This attribute is used by servers to signal the reason a UDP
packet was dropped. The following is the format of the ICMP
attribute.</t>
<figure align="left" suppress-title="false" pn="figure-11">
<artwork name="" type="" align="left" alt="" pn="section-18.13-2.1">
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved | ICMP Type | ICMP Code |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Error Data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
</figure>
<dl newline="false" spacing="normal" pn="section-18.13-3">
<dt pn="section-18.13-3.1">Reserved:</dt>
<dd pn="section-18.13-3.2">This field <bcp14>MUST</bcp14> be set to 0 when sent and
<bcp14>MUST</bcp14> be ignored when received.</dd>
<dt pn="section-18.13-3.3">ICMP Type:</dt>
<dd pn="section-18.13-3.4">The field contains the value of the ICMP
type. Its interpretation depends on whether the ICMP was received
over IPv4 or IPv6.</dd>
<dt pn="section-18.13-3.5">ICMP Code:</dt>
<dd pn="section-18.13-3.6">The field contains the value of the ICMP
code. Its interpretation depends on whether the ICMP was received
over IPv4 or IPv6.</dd>
<dt pn="section-18.13-3.7">Error Data:</dt>
<dd pn="section-18.13-3.8">This field size is 4 bytes long. If the ICMPv6 type is 2
("Packet too big" message) or ICMPv4 type is 3 (Destination
Unreachable) and Code is 4 (fragmentation needed and DF set), the
Error Data field will be set to the Maximum Transmission Unit of the
next-hop link (<xref target="RFC4443" sectionFormat="of" section="3.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4443#section-3.2" derivedContent="RFC4443"/> and <xref target="RFC1191" sectionFormat="of" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc1191#section-4" derivedContent="RFC1191"/>). For other ICMPv6 types and ICMPv4 types and
codes, the Error Data field <bcp14>MUST</bcp14> be set to zero.</dd>
</dl>
</section>
</section>
<section anchor="sec-stun-errors" numbered="true" toc="include" removeInRFC="false" pn="section-19">
<name slugifiedName="name-stun-error-response-codes">STUN Error Response Codes</name>
<t pn="section-19-1">This document defines the following error response codes:</t>
<dl newline="true" spacing="normal" pn="section-19-2">
<dt pn="section-19-2.1">403 (Forbidden):</dt>
<dd pn="section-19-2.2">The request was valid but cannot be
performed due to administrative or similar restrictions.</dd>
<dt pn="section-19-2.3">437 (Allocation Mismatch):</dt>
<dd pn="section-19-2.4">A request was received by
the server that requires an allocation to be in place, but no
allocation exists, or a request was received that requires no
allocation, but an allocation exists.</dd>
<dt pn="section-19-2.5">440 (Address Family not Supported):</dt>
<dd pn="section-19-2.6">The server does
not support the address family requested by the client.</dd>
<dt pn="section-19-2.7">441 (Wrong Credentials):</dt>
<dd pn="section-19-2.8">(Wrong Credentials): The credentials in the
(non-Allocate) request do not match those used to create the
allocation.</dd>
<dt pn="section-19-2.9">442 (Unsupported Transport Protocol):</dt>
<dd pn="section-19-2.10">The Allocate
request asked the server to use a transport protocol between the
server and the peer that the server does not support. NOTE: This
does NOT refer to the transport protocol used in the 5-tuple.</dd>
<dt pn="section-19-2.11">443 (Peer Address Family Mismatch):</dt>
<dd pn="section-19-2.12">A peer address is
part of a different address family than that of the relayed
transport address of the allocation.</dd>
<dt pn="section-19-2.13">486 (Allocation Quota Reached):</dt>
<dd pn="section-19-2.14">No more allocations
using this username can be created at the present time.</dd>
<dt pn="section-19-2.15">508 (Insufficient Capacity):</dt>
<dd pn="section-19-2.16">The server is unable to
carry out the request due to some capacity limit being reached. In
an Allocate response, this could be due to the server having no more
relayed transport addresses available at that time, having none with
the requested properties, or the one that corresponds to the
specified reservation token is not available.</dd>
</dl>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-20">
<name slugifiedName="name-detailed-example">Detailed Example</name>
<t pn="section-20-1">This section gives an example of the use of TURN, showing in detail
the contents of the messages exchanged. The example uses the network
diagram shown in the Overview (<xref target="fig-turn-model" format="default" sectionFormat="of" derivedContent="Figure 1"/>).</t>
<t pn="section-20-2">For each message, the attributes included in the message and their
values are shown. For convenience, values are shown in a human-readable
format rather than showing the actual octets; for example,
"XOR-RELAYED-ADDRESS=192.0.2.15:9000" shows that the XOR-RELAYED-ADDRESS
attribute is included with an address of 192.0.2.15 and a port of 9000;
here, the address and port are shown before the xor-ing is done. For
attributes with string-like values (e.g., SOFTWARE="Example client,
version 1.03" and NONCE="obMatJos2gAAAadl7W7PeDU4hKE72jda"), the value
of the attribute is shown in quotes for readability, but these quotes do
not appear in the actual value.</t>
<figure align="left" suppress-title="false" pn="figure-12">
<artwork name="" type="" align="left" alt="" pn="section-20-3.1">
TURN TURN Peer Peer
client server A B
| | | |
|--- Allocate request -------------->| | |
| Transaction-Id=0xA56250D3F17ABE679422DE85 | |
| SOFTWARE="Example client, version 1.03" | |
| LIFETIME=3600 (1 hour) | | |
| REQUESTED-TRANSPORT=17 (UDP) | | |
| DONT-FRAGMENT | | |
| | | |
|<-- Allocate error response --------| | |
| Transaction-Id=0xA56250D3F17ABE679422DE85 | |
| SOFTWARE="Example server, version 1.17" | |
| ERROR-CODE=401 (Unauthorized) | | |
| REALM="example.com" | | |
| NONCE="obMatJos2gAAAadl7W7PeDU4hKE72jda" | |
| PASSWORD-ALGORITHMS=MD5 and SHA256 | |
| | | |
|--- Allocate request -------------->| | |
| Transaction-Id=0xC271E932AD7446A32C234492 | |
| SOFTWARE="Example client 1.03" | | |
| LIFETIME=3600 (1 hour) | | |
| REQUESTED-TRANSPORT=17 (UDP) | | |
| DONT-FRAGMENT | | |
| USERNAME="George" | | |
| REALM="example.com" | | |
| NONCE="obMatJos2gAAAadl7W7PeDU4hKE72jda" | |
| PASSWORD-ALGORITHMS=MD5 and SHA256 | |
| PASSWORD-ALGORITHM=SHA256 | | |
| MESSAGE-INTEGRITY=... | | |
| MESSAGE-INTEGRITY-SHA256=... | | |
| | | |
|<-- Allocate success response ------| | |
| Transaction-Id=0xC271E932AD7446A32C234492 | |
| SOFTWARE="Example server, version 1.17" | |
| LIFETIME=1200 (20 minutes) | | |
| XOR-RELAYED-ADDRESS=192.0.2.15:50000 | |
| XOR-MAPPED-ADDRESS=192.0.2.1:7000 | |
| MESSAGE-INTEGRITY-SHA256=... | | |
</artwork>
</figure>
<t pn="section-20-4">The client begins by selecting a host transport address to use for
the TURN session; in this example, the client has selected
198.51.100.2:49721 as shown in <xref target="fig-turn-model" format="default" sectionFormat="of" derivedContent="Figure 1"/>.
The client then sends an Allocate request to the server at the server
transport address. The client randomly selects a 96-bit transaction id
of 0xA56250D3F17ABE679422DE85 for this transaction; this is encoded in
the transaction id field in the fixed header. The client includes a
SOFTWARE attribute that gives information about the client's software;
here, the value is "Example client, version 1.03" to indicate that this
is version 1.03 of something called the "Example client". The client
includes the LIFETIME attribute because it wishes the allocation to have
a longer lifetime than the default of 10 minutes; the value of this
attribute is 3600 seconds, which corresponds to 1 hour. The client must
always include a REQUESTED-TRANSPORT attribute in an Allocate request,
and the only value allowed by this specification is 17, which indicates
UDP transport between the server and the peers. The client also includes
the DONT-FRAGMENT attribute because it wishes to use the DONT-FRAGMENT
attribute later in Send indications; this attribute consists of only an
attribute header; there is no value part. We assume the client has not
recently interacted with the server; thus, the client does not include
the USERNAME, USERHASH, REALM, NONCE, PASSWORD-ALGORITHMS,
PASSWORD-ALGORITHM, MESSAGE-INTEGRITY, or MESSAGE-INTEGRITY-SHA256
attribute. Finally, note that the order of attributes in a message is
arbitrary (except for the MESSAGE-INTEGRITY, MESSAGE-INTEGRITY-SHA256
and FINGERPRINT attributes), and the client could have used a different
order.</t>
<t pn="section-20-5">Servers require any request to be authenticated. Thus, when the
server receives the initial Allocate request, it rejects the request
because the request does not contain the authentication attributes.
Following the procedures of the long-term credential mechanism of STUN
<xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/>, the server includes an
ERROR-CODE attribute with a value of 401 (Unauthorized), a REALM
attribute that specifies the authentication realm used by the server (in
this case, the server's domain "example.com"), and a nonce value in a
NONCE attribute. The NONCE attribute starts with the "nonce cookie" with
the STUN Security Feature "Password algorithm" bit set to 1. The server
includes a PASSWORD-ALGORITHMS attribute that specifies the list of
algorithms that the server can use to derive the long-term password. If
the server sets the STUN Security Feature "Username anonymity" bit to 1,
then the client uses the USERHASH attribute instead of the USERNAME
attribute in the Allocate request to anonymize the username. The server
also includes a SOFTWARE attribute that gives information about the
server's software.</t>
<t pn="section-20-6">The client, upon receipt of the 401 error, reattempts the Allocate
request, this time including the authentication attributes. The client
selects a new transaction id and then populates the new Allocate
request with the same attributes as before. The client includes a
USERNAME attribute and uses the realm value received from the server to
help it determine which value to use; here, the client is configured to
use the username "George" for the realm "example.com". The client
includes the PASSWORD-ALGORITHM attribute indicating the algorithm that
the server must use to derive the long-term password. The client also
includes the REALM, PASSWORD-ALGORITHMS, and NONCE attributes, which are
just copied from the 401 error response. Finally, the client includes
MESSAGE-INTEGRITY-SHA256 attribute as the last attributes in the
message whose value is Hashed Message Authentication Code - Secure Hash
Algorithm 2 (HMAC-SHA2) hash over the contents of the message (shown as
just "..." above); this HMAC-SHA2 computation includes a password value.
Thus, an attacker cannot compute the message integrity value without
somehow knowing the secret password.</t>
<t pn="section-20-7">The server, upon receipt of the authenticated Allocate request,
checks that everything is OK, then creates an allocation. The server
replies with an Allocate success response. The server includes a
LIFETIME attribute giving the lifetime of the allocation; here, the
server has reduced the client's requested 1-hour lifetime to just 20
minutes because this particular server doesn't allow lifetimes longer
than 20 minutes. The server includes an XOR-RELAYED-ADDRESS attribute
whose value is the relayed transport address of the allocation. The
server includes an XOR-MAPPED-ADDRESS attribute whose value is the
server-reflexive address of the client; this value is not used otherwise
in TURN but is returned as a convenience to the client. The server
includes a MESSAGE-INTEGRITY-SHA256 attribute to authenticate the
response and to ensure its integrity; note that the response does not
contain the USERNAME, REALM, and NONCE attributes. The server also
includes a SOFTWARE attribute.</t>
<figure align="left" suppress-title="false" pn="figure-13">
<artwork name="" type="" align="left" alt="" pn="section-20-8.1">
TURN TURN Peer Peer
client server A B
|--- CreatePermission request ------>| | |
| Transaction-Id=0xE5913A8F460956CA277D3319 | |
| XOR-PEER-ADDRESS=192.0.2.150:0 | | |
| USERNAME="George" | | |
| REALM="example.com" | | |
| NONCE="obMatJos2gAAAadl7W7PeDU4hKE72jda" | |
| PASSWORD-ALGORITHMS=MD5 and SHA256 | |
| PASSWORD-ALGORITHM=SHA256 | | |
| MESSAGE-INTEGRITY-SHA256=... | | |
| | | |
|<-- CreatePermission success resp.--| | |
| Transaction-Id=0xE5913A8F460956CA277D3319 | |
| MESSAGE-INTEGRITY-SHA256=... | | |
</artwork>
</figure>
<t pn="section-20-9">The client then creates a permission towards Peer A in preparation
for sending it some application data. This is done through a
CreatePermission request. The XOR-PEER-ADDRESS attribute contains the IP
address for which a permission is established (the IP address of peer
A); note that the port number in the attribute is ignored when used in a
CreatePermission request, and here it has been set to 0; also, note how
the client uses Peer A's server-reflexive IP address and not its
(private) host address. The client uses the same username, realm, and
nonce values as in the previous request on the allocation. Though it is
allowed to do so, the client has chosen not to include a SOFTWARE
attribute in this request.</t>
<t pn="section-20-10">The server receives the CreatePermission request, creates the
corresponding permission, and then replies with a CreatePermission
success response. Like the client, the server chooses not to include the
SOFTWARE attribute in its reply. Again, note how success responses
contain a MESSAGE-INTEGRITY-SHA256 attribute (assuming the server uses
the long-term credential mechanism) but no USERNAME, REALM, and NONCE
attributes.</t>
<figure align="left" suppress-title="false" pn="figure-14">
<artwork name="" type="" align="left" alt="" pn="section-20-11.1">
TURN TURN Peer Peer
client server A B
|--- Send indication --------------->| | |
| Transaction-Id=0x1278E9ACA2711637EF7D3328 | |
| XOR-PEER-ADDRESS=192.0.2.150:32102 | |
| DONT-FRAGMENT | | |
| DATA=... | | |
| |- UDP dgm ->| |
| | data=... | |
| | | |
| |<- UDP dgm -| |
| | data=... | |
|<-- Data indication ----------------| | |
| Transaction-Id=0x8231AE8F9242DA9FF287FEFF | |
| XOR-PEER-ADDRESS=192.0.2.150:32102 | |
| DATA=... | | |
</artwork>
</figure>
<t pn="section-20-12">The client now sends application data to Peer A using a Send
indication. Peer A's server-reflexive transport address is specified in
the XOR-PEER-ADDRESS attribute, and the application data (shown here as
just "...") is specified in the DATA attribute. The client is doing a
form of path MTU discovery at the application layer and, thus, specifies
(by including the DONT-FRAGMENT attribute) that the server should set
the DF bit in the UDP datagram to send to the peer. Indications cannot
be authenticated using the long-term credential mechanism of STUN, so no
MESSAGE-INTEGRITY or MESSAGE-INTEGRITY-SHA256 attribute is included in
the message. An application wishing to ensure that its data is not
altered or forged must integrity-protect its data at the application
level.</t>
<t pn="section-20-13">Upon receipt of the Send indication, the server extracts the
application data and sends it in a UDP datagram to Peer A, with the
relayed transport address as the source transport address of the
datagram and with the DF bit set as requested. Note that had the
client not previously established a permission for Peer A's
server-reflexive IP address, the server would have silently
discarded the Send indication instead.</t>
<t pn="section-20-14">Peer A then replies with its own UDP datagram containing application
data. The datagram is sent to the relayed transport address on the
server. When this arrives, the server creates a Data indication
containing the source of the UDP datagram in the XOR-PEER-ADDRESS
attribute, and the data from the UDP datagram in the DATA attribute. The
resulting Data indication is then sent to the client.</t>
<figure align="left" suppress-title="false" pn="figure-15">
<artwork name="" type="" align="left" alt="" pn="section-20-15.1">
TURN TURN Peer Peer
client server A B
|--- ChannelBind request ----------->| | |
| Transaction-Id=0x6490D3BC175AFF3D84513212 | |
| CHANNEL-NUMBER=0x4000 | | |
| XOR-PEER-ADDRESS=192.0.2.210:49191 | |
| USERNAME="George" | | |
| REALM="example.com" | | |
| NONCE="obMatJos2gAAAadl7W7PeDU4hKE72jda" | |
| PASSWORD-ALGORITHMS=MD5 and SHA256 | |
| PASSWORD-ALGORITHM=SHA256 | | |
| MESSAGE-INTEGRITY-SHA256=... | | |
| | | |
|<-- ChannelBind success response ---| | |
| Transaction-Id=0x6490D3BC175AFF3D84513212 | |
| MESSAGE-INTEGRITY-SHA256=... | | |
</artwork>
</figure>
<t pn="section-20-16">The client now binds a channel to Peer B, specifying a free channel
number (0x4000) in the CHANNEL-NUMBER attribute, and Peer B's transport
address in the XOR-PEER-ADDRESS attribute. As before, the client reuses
the username, realm, and nonce from its last request in the message.</t>
<t pn="section-20-17">Upon receipt of the request, the server binds the channel number to
the peer, installs a permission for Peer B's IP address, and then
replies with a ChannelBind success response.</t>
<figure align="left" suppress-title="false" pn="figure-16">
<artwork name="" type="" align="left" alt="" pn="section-20-18.1">
TURN TURN Peer Peer
client server A B
|--- ChannelData ------------------>| | |
| Channel-number=0x4000 |--- UDP datagram --------->|
| Data=... | Data=... |
| | | |
| |<-- UDP datagram ----------|
| | Data=... | |
|<-- ChannelData -------------------| | |
| Channel-number=0x4000 | | |
| Data=... | | |
</artwork>
</figure>
<t pn="section-20-19">The client now sends a ChannelData message to the server with data
destined for Peer B. The ChannelData message is not a STUN message;
thus, it has no transaction id. Instead, it has only three fields: a channel
number, data, and data length; here, the channel number field is 0x4000
(the channel the client just bound to Peer B). When the server receives
the ChannelData message, it checks that the channel is currently bound
(which it is) and then sends the data onward to Peer B in a UDP
datagram, using the relayed transport address as the source transport
address, and 192.0.2.210:49191 (the value of the XOR-PEER-ADDRESS
attribute in the ChannelBind request) as the destination transport
address.</t>
<t pn="section-20-20">Later, Peer B sends a UDP datagram back to the relayed transport
address. This causes the server to send a ChannelData message to the
client containing the data from the UDP datagram. The server knows to
which client to send the ChannelData message because of the relayed
transport address at which the UDP datagram arrived, and it knows to use
channel 0x4000 because this is the channel bound to 192.0.2.210:49191.
Note that if there had not been any channel number bound to that
address, the server would have used a Data indication instead.</t>
<figure align="left" suppress-title="false" pn="figure-17">
<artwork name="" type="" align="left" alt="" pn="section-20-21.1">
TURN TURN Peer Peer
client server A B
|--- ChannelBind request ----------->| | |
| Transaction-Id=0xE5913A8F46091637EF7D3328 | |
| CHANNEL-NUMBER=0x4000 | | |
| XOR-PEER-ADDRESS=192.0.2.210:49191 | |
| USERNAME="George" | | |
| REALM="example.com" | | |
| NONCE="obMatJos2gAAAadl7W7PeDU4hKE72jda" | |
| PASSWORD-ALGORITHMS=MD5 and SHA256 | |
| PASSWORD-ALGORITHM=SHA256 | | |
| MESSAGE-INTEGRITY-SHA256=... | | |
| | | |
|<-- ChannelBind success response ---| | |
| Transaction-Id=0xE5913A8F46091637EF7D3328 | |
| MESSAGE-INTEGRITY-SHA256=... | | |
</artwork>
</figure>
<t pn="section-20-22">The channel binding lasts for 10 minutes unless refreshed. The TURN
client refreshes the binding by sending a ChannelBind request rebinding
the channel to the same peer (Peer B's IP address). The server processes
the ChannelBind request, rebinds the channel to the same peer, and resets
the time-to-expiry timer back to 10 minutes.</t>
<figure align="left" suppress-title="false" pn="figure-18">
<artwork name="" type="" align="left" alt="" pn="section-20-23.1">
TURN TURN Peer Peer
client server A B
|--- Refresh request --------------->| | |
| Transaction-Id=0x0864B3C27ADE9354B4312414 | |
| SOFTWARE="Example client 1.03" | | |
| USERNAME="George" | | |
| REALM="example.com" | | |
| NONCE="oobMatJos2gAAAadl7W7PeDU4hKE72jda" | |
| PASSWORD-ALGORITHMS=MD5 and SHA256 | |
| PASSWORD-ALGORITHM=SHA256 | | |
| MESSAGE-INTEGRITY-SHA256=... | | |
| | | |
|<-- Refresh error response ---------| | |
| Transaction-Id=0x0864B3C27ADE9354B4312414 | |
| SOFTWARE="Example server, version 1.17" | |
| ERROR-CODE=438 (Stale Nonce) | | |
| REALM="example.com" | | |
| NONCE="obMatJos2gAAAadl7W7PeDU4hKE72jda" | |
| PASSWORD-ALGORITHMS=MD5 and SHA256 | |
| | | |
|--- Refresh request --------------->| | |
| Transaction-Id=0x427BD3E625A85FC731DC4191 | |
| SOFTWARE="Example client 1.03" | | |
| USERNAME="George" | | |
| REALM="example.com" | | |
| NONCE="obMatJos2gAAAadl7W7PeDU4hKE72jda" | |
| PASSWORD-ALGORITHMS=MD5 and SHA256 | |
| PASSWORD-ALGORITHM=SHA256 | | |
| MESSAGE-INTEGRITY-SHA256=... | | |
| | | |
|<-- Refresh success response -------| | |
| Transaction-Id=0x427BD3E625A85FC731DC4191 | |
| SOFTWARE="Example server, version 1.17" | |
| LIFETIME=600 (10 minutes) | | |
| MESSAGE-INTEGRITY=... | | |
</artwork>
</figure>
<t pn="section-20-24">Sometime before the 20-minute lifetime is up, the client refreshes
the allocation. This is done using a Refresh request. As before, the
client includes the latest username, realm, and nonce values in the
request. The client also includes the SOFTWARE attribute, following the
recommended practice of always including this attribute in Allocate and
Refresh messages. When the server receives the Refresh request, it
notices that the nonce value has expired and so replies with a 438 (Stale
Nonce) error given a new nonce value. The client then reattempts the
request, this time with the new nonce value. This second attempt is
accepted, and the server replies with a success response. Note that the
client did not include a LIFETIME attribute in the request, so the
server refreshes the allocation for the default lifetime of 10 minutes
(as can be seen by the LIFETIME attribute in the success response).</t>
</section>
<section anchor="sec-security" numbered="true" toc="include" removeInRFC="false" pn="section-21">
<name slugifiedName="name-security-considerations">Security Considerations</name>
<t pn="section-21-1">This section considers attacks that are possible in a TURN
deployment and discusses how they are mitigated by mechanisms in the
protocol or recommended practices in the implementation.</t>
<t pn="section-21-2">Most of the attacks on TURN are mitigated by the server requiring
requests be authenticated. Thus, this specification requires the use of
authentication. The mandatory-to-implement mechanism is the long- term
credential mechanism of STUN. Other authentication mechanisms of equal
or stronger security properties may be used. However, it is important to
ensure that they can be invoked in an interoperable way.</t>
<section numbered="true" toc="include" removeInRFC="false" pn="section-21.1">
<name slugifiedName="name-outsider-attacks">Outsider Attacks</name>
<t pn="section-21.1-1">Outsider attacks are ones where the attacker has no credentials in
the system and is attempting to disrupt the service seen by the
client or the server.</t>
<section numbered="true" toc="include" removeInRFC="false" pn="section-21.1.1">
<name slugifiedName="name-obtaining-unauthorized-allo">Obtaining Unauthorized Allocations</name>
<t pn="section-21.1.1-1">An attacker might wish to obtain allocations on a TURN server for
any number of nefarious purposes. A TURN server provides a mechanism
for sending and receiving packets while cloaking the actual IP
address of the client. This makes TURN servers an attractive target
for attackers who wish to use it to mask their true identity.</t>
<t pn="section-21.1.1-2">An attacker might also wish to simply utilize the services of a
TURN server without paying for them. Since TURN services require
resources from the provider, it is anticipated that their usage will
come with a cost.</t>
<t pn="section-21.1.1-3">These attacks are prevented using the long-term credential
mechanism, which allows the TURN server to determine the identity of
the requestor and whether the requestor is allowed to obtain the
allocation.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-21.1.2">
<name slugifiedName="name-offline-dictionary-attacks">Offline Dictionary Attacks</name>
<t pn="section-21.1.2-1">The long-term credential mechanism used by TURN is subject to
offline dictionary attacks. An attacker that is capable of
eavesdropping on a message exchange between a client and server can
determine the password by trying a number of candidate passwords and
seeing if one of them is correct. This attack works when the
passwords are low entropy such as a word from the dictionary. This
attack can be mitigated by using strong passwords with large
entropy. In situations where even stronger mitigation is required,
(D)TLS transport between the client and the server can be used.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-21.1.3">
<name slugifiedName="name-faked-refreshes-and-permiss">Faked Refreshes and Permissions</name>
<t pn="section-21.1.3-1">An attacker might wish to attack an active allocation by sending
it a Refresh request with an immediate expiration in order to
delete it and disrupt service to the client. This is prevented by
authentication of refreshes. Similarly, an attacker wishing to send
CreatePermission requests to create permissions to undesirable
destinations is prevented from doing so through authentication. The
motivations for such an attack are described in <xref target="sec-firewall" format="default" sectionFormat="of" derivedContent="Section 21.2"/>.</t>
</section>
<section anchor="fate-data" numbered="true" toc="include" removeInRFC="false" pn="section-21.1.4">
<name slugifiedName="name-fake-data">Fake Data</name>
<t pn="section-21.1.4-1">An attacker might wish to send data to the client or the peer as
if they came from the peer or client, respectively. To do that, the
attacker can send the client a faked Data indication or ChannelData
message, or send the TURN server a faked Send indication or
ChannelData message.</t>
<t pn="section-21.1.4-2">Since indications and ChannelData messages are not authenticated,
this attack is not prevented by TURN. However, this attack is
generally present in IP-based communications and is not
substantially worsened by TURN. Consider a normal, non-TURN IP
session between hosts A and B. An attacker can send packets to B as
if they came from A by sending packets towards B with a spoofed IP
address of A. This attack requires the attacker to know the IP
addresses of A and B. With TURN, an attacker wishing to send packets
towards a client using a Data indication needs to know its IP
address (and port), the IP address and port of the TURN server, and
the IP address and port of the peer (for inclusion in the
XOR-PEER-ADDRESS attribute). To send a fake ChannelData message to a
client, an attacker needs to know the IP address and port of the
client, the IP address and port of the TURN server, and the channel
number. This particular combination is mildly more guessable than in
the non-TURN case.</t>
<t pn="section-21.1.4-3">These attacks are more properly mitigated by application-layer
authentication techniques. In the case of real-time traffic, usage
of SRTP <xref target="RFC3711" format="default" sectionFormat="of" derivedContent="RFC3711"/> prevents these attacks.</t>
<t pn="section-21.1.4-4">In some situations, the TURN server may be situated in the
network such that it is able to send to hosts to which the client
cannot directly send. This can happen, for example, if the server is
located behind a firewall that allows packets from outside the
firewall to be delivered to the server, but not to other hosts
behind the firewall. In these situations, an attacker could send the
server a Send indication with an XOR-PEER-ADDRESS attribute
containing the transport address of one of the other hosts behind
the firewall. If the server was to allow relaying of traffic to
arbitrary peers, then this would provide a way for the attacker to
attack arbitrary hosts behind the firewall.</t>
<t pn="section-21.1.4-5">To mitigate this attack, TURN requires that the client establish
a permission to a host before sending it data. Thus, an attacker can
only attack hosts with which the client is already communicating
unless the attacker is able to create authenticated requests.
Furthermore, the server administrator may configure the server to
restrict the range of IP addresses and ports to which it will relay
data. To provide even greater security, the server administrator can
require that the client use (D)TLS for all communication between the
client and the server.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-21.1.5">
<name slugifiedName="name-impersonating-a-server">Impersonating a Server</name>
<t pn="section-21.1.5-1">When a client learns a relayed address from a TURN server, it
uses that relayed address in application protocols to receive
traffic. Therefore, an attacker wishing to intercept or redirect
that traffic might try to impersonate a TURN server and provide the
client with a faked relayed address.</t>
<t pn="section-21.1.5-2">This attack is prevented through the long-term credential
mechanism, which provides message integrity for responses in
addition to verifying that they came from the server. Furthermore,
an attacker cannot replay old server responses as the transaction id
in the STUN header prevents this. Replay attacks are further
thwarted through frequent changes to the nonce value.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-21.1.6">
<name slugifiedName="name-eavesdropping-traffic">Eavesdropping Traffic</name>
<t pn="section-21.1.6-1">If the TURN client and server use the STUN Extension for
Third-Party Authorization <xref target="RFC7635" format="default" sectionFormat="of" derivedContent="RFC7635"/> (for
example, it is used in WebRTC), the username does not reveal the real
user's identity; the USERNAME attribute carries an ephemeral and
unique key identifier. If the TURN client and server use the STUN
long-term credential mechanism and the username reveals the real
user's identity, the client <bcp14>MUST</bcp14> either use the USERHASH attribute
instead of the USERNAME attribute to anonymize the username or use
(D)TLS transport between the client and the server.</t>
<t pn="section-21.1.6-2">If the TURN client and server use the STUN long-term credential
mechanism, and realm information is privacy sensitive, TURN can be
run over (D)TLS. As a reminder, STUN Extension for Third-Party
Authorization does not use realm.</t>
<t pn="section-21.1.6-3">The SOFTWARE attribute can reveal the specific software version
of the TURN client and server to the eavesdropper, and it might possibly
allow attacks against vulnerable software that is known to contain
security vulnerabilities. If the software version is known to
contain security vulnerabilities, TURN <bcp14>SHOULD</bcp14> be run over (D)TLS to
prevent leaking the SOFTWARE attribute in clear text. If zero-day
vulnerabilities are detected in the software version, the endpoint
policy can be modified to mandate the use of (D)TLS until the patch
is in place to fix the flaw.</t>
<t pn="section-21.1.6-4">TURN concerns itself primarily with authentication and message
integrity. Confidentiality is only a secondary concern as TURN
control messages do not include information that is particularly
sensitive with the exception of USERNAME, REALM, and SOFTWARE. The
primary protocol content of the messages is the IP address of the
peer. If it is important to prevent an eavesdropper on a TURN
connection from learning this, TURN can be run over (D)TLS.</t>
<t pn="section-21.1.6-5">Confidentiality for the application data relayed by TURN is best
provided by the application protocol itself since running TURN over
(D)TLS does not protect application data between the server and the
peer. If confidentiality of application data is important, then the
application should encrypt or otherwise protect its data. For
example, for real-time media, confidentiality can be provided by
using SRTP.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-21.1.7">
<name slugifiedName="name-turn-loop-attack">TURN Loop Attack</name>
<t pn="section-21.1.7-1">An attacker might attempt to cause data packets to loop
indefinitely between two TURN servers. The attack goes as follows:
first, the attacker sends an Allocate request to server A using the
source address of server B. Server A will send its response to
server B, and for the attack to succeed, the attacker must have the
ability to either view or guess the contents of this response so
that the attacker can learn the allocated relayed transport address.
The attacker then sends an Allocate request to server B using the
source address of server A. Again, the attacker must be able to view
or guess the contents of the response so it can learn the
allocated relayed transport address. Using the same spoofed source
address technique, the attacker then binds a channel number on
server A to the relayed transport address on server B and similarly
binds the same channel number on server B to the relayed transport
address on server A. Finally, the attacker sends a ChannelData
message to server A.</t>
<t pn="section-21.1.7-2">The result is a data packet that loops from the relayed transport
address on server A to the relayed transport address on server B,
then from server B's transport address to server A's transport
address, and then around the loop again.</t>
<t pn="section-21.1.7-3">This attack is mitigated as follows: by requiring all requests to
be authenticated and/or by randomizing the port number allocated for
the relayed transport address, the server forces the attacker to
either intercept or view responses sent to a third party (in this
case, the other server) so that the attacker can authenticate the
requests and learn the relayed transport address. Without one of
these two measures, an attacker can guess the contents of the
responses without needing to see them, which makes the attack much
easier to perform. Furthermore, by requiring authenticated requests,
the server forces the attacker to have credentials acceptable to the
server, which turns this from an outsider attack into an insider
attack and allows the attack to be traced back to the client
initiating it.</t>
<t pn="section-21.1.7-4">The attack can be further mitigated by imposing a per-username
limit on the bandwidth used to relay data by allocations owned by
that username to limit the impact of this attack on other
allocations. More mitigation can be achieved by decrementing the TTL
when relaying data packets (if the underlying OS allows this).</t>
</section>
</section>
<section anchor="sec-firewall" numbered="true" toc="include" removeInRFC="false" pn="section-21.2">
<name slugifiedName="name-firewall-considerations">Firewall Considerations</name>
<t pn="section-21.2-1">A key security consideration of TURN is that TURN should not weaken
the protections afforded by firewalls deployed between a client and a
TURN server. It is anticipated that TURN servers will often be present
on the public Internet, and clients may often be inside enterprise
networks with corporate firewalls. If TURN servers provide a
"backdoor" for reaching into the enterprise, TURN will be blocked by
these firewalls.</t>
<t pn="section-21.2-2">TURN servers therefore emulate the behavior of NAT devices that
implement address-dependent filtering <xref target="RFC4787" format="default" sectionFormat="of" derivedContent="RFC4787"/>,
a property common in many firewalls as well. When a NAT or firewall
implements this behavior, packets from an outside IP address are only
allowed to be sent to an internal IP address and port if the internal
IP address and port had recently sent a packet to that outside IP
address. TURN servers introduce the concept of permissions, which
provide exactly this same behavior on the TURN server. An attacker
cannot send a packet to a TURN server and expect it to be relayed
towards the client, unless the client has tried to contact the
attacker first.</t>
<t pn="section-21.2-3">It is important to note that some firewalls have policies that are
even more restrictive than address-dependent filtering. Firewalls can
also be configured with address- and port-dependent filtering, or they
can be configured to disallow inbound traffic entirely. In these
cases, if a client is allowed to connect the TURN server,
communications to the client will be less restrictive than what the
firewall would normally allow.</t>
<section numbered="true" toc="include" removeInRFC="false" pn="section-21.2.1">
<name slugifiedName="name-faked-permissions">Faked Permissions</name>
<t pn="section-21.2.1-1">In firewalls and NAT devices, permissions are granted implicitly
through the traversal of a packet from the inside of the network
towards the outside peer. Thus, a permission cannot, by definition,
be created by any entity except one inside the firewall or NAT. With
TURN, this restriction no longer holds. Since the TURN server sits
outside the firewall, an attacker outside the firewall can now send
a message to the TURN server and try to create a permission for
itself.</t>
<t pn="section-21.2.1-2">This attack is prevented because all messages that create
permissions (i.e., ChannelBind and CreatePermission) are
authenticated.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-21.2.2">
<name slugifiedName="name-blacklisted-ip-addresses">Blacklisted IP Addresses</name>
<t pn="section-21.2.2-1">Many firewalls can be configured with blacklists that prevent a
client behind the firewall from sending packets to, or receiving
packets from, ranges of blacklisted IP addresses. This is
accomplished by inspecting the source and destination addresses of
packets entering and exiting the firewall, respectively.</t>
<t pn="section-21.2.2-2">This feature is also present in TURN since TURN servers are
allowed to arbitrarily restrict the range of addresses of peers that
they will relay to.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-21.2.3">
<name slugifiedName="name-running-servers-on-well-kno">Running Servers on Well-Known Ports</name>
<t pn="section-21.2.3-1">A malicious client behind a firewall might try to connect to a
TURN server and obtain an allocation that it then uses to run a
server. For example, a client might try to run a DNS server or FTP
server.</t>
<t pn="section-21.2.3-2">This is not possible in TURN. A TURN server will never accept
traffic from a peer for which the client has not installed a
permission. Thus, peers cannot just connect to the allocated port in
order to obtain the service.</t>
</section>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-21.3">
<name slugifiedName="name-insider-attacks">Insider Attacks</name>
<t pn="section-21.3-1">In insider attacks, a client has legitimate credentials but defies
the trust relationship that goes with those credentials. These attacks
cannot be prevented by cryptographic means but need to be considered
in the design of the protocol.</t>
<section numbered="true" toc="include" removeInRFC="false" pn="section-21.3.1">
<name slugifiedName="name-dos-against-turn-server">DoS against TURN Server</name>
<t pn="section-21.3.1-1">A client wishing to disrupt service to other clients might obtain
an allocation and then flood it with traffic in an attempt to swamp
the server and prevent it from servicing other legitimate clients.
This is mitigated by the recommendation that the server limit the
amount of bandwidth it will relay for a given username. This won't
prevent a client from sending a large amount of traffic, but it
allows the server to immediately discard traffic in excess.</t>
<t pn="section-21.3.1-2">Since each allocation uses a port number on the IP address of the
TURN server, the number of allocations on a server is finite. An
attacker might attempt to consume all of them by requesting a large
number of allocations. This is prevented by the recommendation that
the server impose a limit on the number of allocations active at a
time for a given username.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-21.3.2">
<name slugifiedName="name-anonymous-relaying-of-malic">Anonymous Relaying of Malicious Traffic</name>
<t pn="section-21.3.2-1">TURN servers provide a degree of anonymization. A client can send
data to peers without revealing its own IP address. TURN servers may
therefore become attractive vehicles for attackers to launch attacks
against targets without fear of detection. Indeed, it is possible
for a client to chain together multiple TURN servers such that any
number of relays can be used before a target receives a packet.</t>
<t pn="section-21.3.2-2">Administrators who are worried about this attack can maintain
logs that capture the actual source IP and port of the client and
perhaps even every permission that client installs. This will allow
for forensic tracing to determine the original source should it be
discovered that an attack is being relayed through a TURN
server.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-21.3.3">
<name slugifiedName="name-manipulating-other-allocati">Manipulating Other Allocations</name>
<t pn="section-21.3.3-1">An attacker might attempt to disrupt service to other users of
the TURN server by sending Refresh requests or CreatePermission
requests that (through source address spoofing) appear to be coming
from another user of the TURN server. TURN prevents this by
requiring that the credentials used in CreatePermission, Refresh,
and ChannelBind messages match those used to create the initial
allocation. Thus, the fake requests from the attacker will be
rejected.</t>
</section>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-21.4">
<name slugifiedName="name-tunnel-amplification-attack">Tunnel Amplification Attack</name>
<t pn="section-21.4-1">An attacker might attempt to cause data packets to loop numerous
times between a TURN server and a tunnel between IPv4 and IPv6. The
attack goes as follows:</t>
<t pn="section-21.4-2">Suppose an attacker knows that a tunnel endpoint will forward
encapsulated packets from a given IPv6 address (this doesn't
necessarily need to be the tunnel endpoint's address). Suppose he then
spoofs two packets from this address: </t>
<ol spacing="normal" type="1" start="1" pn="section-21.4-3">
<li pn="section-21.4-3.1" derivedCounter="1.">An Allocate request asking for a v4 address, and</li>
<li pn="section-21.4-3.2" derivedCounter="2.">A ChannelBind request establishing a channel to the IPv4
address of the tunnel endpoint.</li>
</ol>
<t pn="section-21.4-4">Then, he has set up an amplification attack: </t>
<ul spacing="normal" bare="false" empty="false" pn="section-21.4-5">
<li pn="section-21.4-5.1">The TURN server will re-encapsulate IPv6 UDP data in v4 and
send it to the tunnel endpoint.</li>
<li pn="section-21.4-5.2">The tunnel endpoint will de-encapsulate packets from the v4
interface and send them to v6.</li>
</ul>
<t pn="section-21.4-6">So, if the attacker sends a packet of the following form:</t>
<figure align="left" suppress-title="false" pn="figure-19">
<artwork name="" type="" align="left" alt="" pn="section-21.4-7.1">
IPv6: src=2001:DB8:1::1 dst=2001:DB8::2
UDP: <ports>
TURN: <channel id>
IPv6: src=2001:DB8:1::1 dst=2001:DB8::2
UDP: <ports>
TURN: <channel id>
IPv6: src=2001:DB8:1::1 dst=2001:DB8::2
UDP: <ports>
TURN: <channel id>
... </artwork>
</figure>
<t pn="section-21.4-8">then the TURN server and the tunnel endpoint will send it
back and forth until the last TURN header is consumed, at which point
the TURN server will send an empty packet that the tunnel endpoint
will drop.</t>
<t pn="section-21.4-9">The amplification potential here is limited by the MTU, so it's not
huge: IPv6+UDP+TURN takes 334 bytes, so a four-to-one amplification
out of a 1500-byte packet is possible. But, the attacker could still
increase traffic volume by sending multiple packets or by establishing
multiple channels spoofed from different addresses behind the same
tunnel endpoint.</t>
<t pn="section-21.4-10">The attack is mitigated as follows. It is <bcp14>RECOMMENDED</bcp14> that TURN
servers not accept allocation or channel-binding requests from
addresses known to be tunneled, and that they not forward data to such
addresses. In particular, a TURN server <bcp14>MUST NOT</bcp14> accept Teredo or 6to4
addresses in these requests.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-21.5">
<name slugifiedName="name-other-considerations">Other Considerations</name>
<t pn="section-21.5-1">Any relay addresses learned through an Allocate request will not
operate properly with IPsec Authentication Header (AH) <xref target="RFC4302" format="default" sectionFormat="of" derivedContent="RFC4302"/> in transport or tunnel
mode. However, tunnel-mode IPsec Encapsulating Security Payload (ESP)
<xref target="RFC4303" format="default" sectionFormat="of" derivedContent="RFC4303"/> should still operate.</t>
</section>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-22">
<name slugifiedName="name-iana-considerations">IANA Considerations</name>
<t pn="section-22-1">The code points for the STUN methods defined in this specification are
listed in <xref target="sec-stun-methods" format="default" sectionFormat="of" derivedContent="Section 17"/>. IANA has
updated the references from <xref target="RFC5766" format="default" sectionFormat="of" derivedContent="RFC5766"/> to
this document (for the STUN methods listed in <xref target="sec-stun-methods" format="default" sectionFormat="of" derivedContent="Section 17"/>).</t>
<t pn="section-22-2">The code points for the STUN attributes defined in this specification
are listed in <xref target="sec-stun-attributes" format="default" sectionFormat="of" derivedContent="Section 18"/>. IANA has
updated the references from <xref target="RFC5766" format="default" sectionFormat="of" derivedContent="RFC5766"/> to
this document (for the STUN attributes CHANNEL-NUMBER, LIFETIME, Reserved
(was BANDWIDTH), XOR-PEER-ADDRESS, DATA, XOR-RELAYED-ADDRESS,
REQUESTED-ADDRESS-FAMILY, EVEN-PORT, REQUESTED-TRANSPORT, DONT-FRAGMENT,
Reserved (was TIMER-VAL), and RESERVATION-TOKEN listed in <xref target="sec-stun-attributes" format="default" sectionFormat="of" derivedContent="Section 18"/>).</t>
<t pn="section-22-3">The code points for the STUN error codes defined in this specification
are listed in <xref target="sec-stun-errors" format="default" sectionFormat="of" derivedContent="Section 19"/>. IANA has
updated the references from <xref target="RFC5766" format="default" sectionFormat="of" derivedContent="RFC5766"/>
and <xref target="RFC6156" format="default" sectionFormat="of" derivedContent="RFC6156"/> to this document (for the STUN error codes listed in
<xref target="sec-stun-errors" format="default" sectionFormat="of" derivedContent="Section 19"/>).</t>
<t pn="section-22-4">IANA has updated the references to <xref target="RFC5766" format="default" sectionFormat="of" derivedContent="RFC5766"/> to this document for the SRV service name of "turn" for TURN over UDP
or TCP and the service name of "turns" for TURN over (D)TLS.</t>
<t pn="section-22-5">IANA has created a registry for TURN channel numbers (the "Traversal
Using Relays around NAT (TURN) Channel Numbers" registry), initially
populated as follows:</t>
<table anchor="turn-channel-numbers" align="center" pn="table-6">
<tbody>
<tr>
<td align="left" colspan="1" rowspan="1">0x0000 through 0x3FFF:</td>
<td align="left" colspan="1" rowspan="1">Reserved and not available for use since they conflict with the STUN
header.</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x4000 through 0x4FFF:</td>
<td align="left" colspan="1" rowspan="1">A TURN implementation is free to use channel numbers in this range.</td>
</tr>
<tr>
<td align="left" colspan="1" rowspan="1">0x5000 through 0xFFFF:</td>
<td align="left" colspan="1" rowspan="1">Reserved (For DTLS-SRTP multiplexing collision avoidance, see <xref target="RFC7983" format="default" sectionFormat="of" derivedContent="RFC7983"/>)</td>
</tr>
</tbody>
</table>
<t pn="section-22-7">Any change to this registry must be made through an IETF
Standards Action.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-23">
<name slugifiedName="name-iab-considerations">IAB Considerations</name>
<t pn="section-23-1">The IAB has studied the problem of Unilateral Self-Address Fixing
(UNSAF), which is the general process by which a client attempts to
determine its address in another realm on the other side of a NAT
through a collaborative protocol reflection mechanism <xref target="RFC3424" format="default" sectionFormat="of" derivedContent="RFC3424"/>. The TURN extension is an example of
a protocol that performs this type of function. The IAB has mandated
that any protocols developed for this purpose document a specific set of
considerations. These considerations and the responses for TURN are
documented in this section.</t>
<t pn="section-23-2">Consideration 1: Precise definition of a specific, limited-scope
problem that is to be solved with the UNSAF proposal. A short-term fix
should not be generalized to solve other problems. Such generalizations
lead to the prolonged dependence on and usage of the supposed short-term
fix, meaning that it is no longer accurate to call it
"short-term".</t>
<t pn="section-23-3">Response: TURN is a protocol for communication between a relay (=
TURN server) and its client. The protocol allows a client that is behind
a NAT to obtain and use a public IP address on the relay. As a
convenience to the client, TURN also allows the client to determine its
server-reflexive transport address.</t>
<t pn="section-23-4">Consideration 2: Description of an exit strategy/transition plan. The
better short-term fixes are the ones that will naturally see less and
less use as the appropriate technology is deployed.</t>
<t pn="section-23-5">Response: TURN will no longer be needed once there are no longer any
NATs. Unfortunately, as of the date of publication of this document, it
no longer seems very likely that NATs will go away any time soon.
However, the need for TURN will also decrease as the number of NATs with
the mapping property of Endpoint-Independent Mapping <xref target="RFC4787" format="default" sectionFormat="of" derivedContent="RFC4787"/> increases.</t>
<t pn="section-23-6">Consideration 3: Discussion of specific issues that may render
systems more "brittle". For example, approaches that involve using data
at multiple network layers create more dependencies, increase debugging
challenges, and make it harder to transition.</t>
<t pn="section-23-7">Response: TURN is "brittle" in that it requires the NAT bindings
between the client and the server to be maintained unchanged for the
lifetime of the allocation. This is typically done using keep-alives. If
this is not done, then the client will lose its allocation and can no
longer exchange data with its peers.</t>
<t pn="section-23-8">Consideration 4: Identify requirements for longer-term, sound
technical solutions; contribute to the process of finding the right
longer-term solution.</t>
<t pn="section-23-9">Response: The need for TURN will be reduced once NATs implement the
recommendations for NAT UDP behavior documented in <xref target="RFC4787" format="default" sectionFormat="of" derivedContent="RFC4787"/>. Applications are also strongly
urged to use ICE <xref target="RFC8445" format="default" sectionFormat="of" derivedContent="RFC8445"/> to
communicate with peers; though ICE uses TURN, it does so only as a last
resort, and it uses it in a controlled manner.</t>
<t pn="section-23-10">Consideration 5: Discussion of the impact of the noted practical
issues with existing deployed NATs and experience reports.</t>
<t pn="section-23-11">Response: Some NATs deployed today exhibit a mapping behavior other
than Endpoint-Independent mapping. These NATs are difficult to work
with, as they make it difficult or impossible for protocols like ICE to
use server-reflexive transport addresses on those NATs. A client behind
such a NAT is often forced to use a relay protocol like TURN because
"UDP hole punching" techniques <xref target="RFC5128" format="default" sectionFormat="of" derivedContent="RFC5128"/> do not
work.</t>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-24">
<name slugifiedName="name-changes-since-rfc-5766">Changes since RFC 5766</name>
<t pn="section-24-1">This section lists the major changes in the TURN protocol from the
original <xref target="RFC5766" format="default" sectionFormat="of" derivedContent="RFC5766"/> specification.</t>
<ul spacing="normal" bare="false" empty="false" pn="section-24-2">
<li pn="section-24-2.1">IPv6 support.</li>
<li pn="section-24-2.2">REQUESTED-ADDRESS-FAMILY attribute.</li>
<li pn="section-24-2.3">Description of the tunnel amplification attack.</li>
<li pn="section-24-2.4">DTLS support.</li>
<li pn="section-24-2.5">Add support for receiving ICMP packets.</li>
<li pn="section-24-2.6">Updates PMTUD.</li>
<li pn="section-24-2.7">Discovery of TURN server.</li>
<li pn="section-24-2.8">TURN URI Scheme Semantics.</li>
<li pn="section-24-2.9">Happy Eyeballs for TURN.</li>
<li pn="section-24-2.10">Align with the changes in STUN <xref target="RFC8489" format="default" sectionFormat="of" derivedContent="RFC8489"/>.</li>
</ul>
</section>
<section numbered="true" toc="include" removeInRFC="false" pn="section-25">
<name slugifiedName="name-updates-to-rfc-6156">Updates to RFC 6156</name>
<t pn="section-25-1">This section lists the major updates to <xref target="RFC6156" format="default" sectionFormat="of" derivedContent="RFC6156"/> in this specification.</t>
<ul spacing="normal" bare="false" empty="false" pn="section-25-2">
<li pn="section-25-2.1">ADDITIONAL-ADDRESS-FAMILY and ADDRESS-ERROR-CODE attributes.</li>
<li pn="section-25-2.2">440 (Address Family not Supported) and 443 (Peer Address Family
Mismatch) responses.</li>
<li pn="section-25-2.3">More details on packet translation.</li>
<li pn="section-25-2.4">TCP-to-UDP and UDP-to-TCP relaying.</li>
</ul>
</section>
</middle>
<back>
<displayreference target="I-D.ietf-tram-stun-pmtud" to="MTU-STUN"/>
<displayreference target="I-D.ietf-mmusic-ice-sip-sdp" to="SDP-ICE"/>
<displayreference target="I-D.ietf-tsvwg-udp-options" to="UDP-OPT"/>
<displayreference target="I-D.ietf-intarea-frag-fragile" to="FRAG-FRAGILE"/>
<displayreference target="I-D.ietf-rtcweb-security" to="SEC-WEBRTC"/>
<displayreference target="I-D.ietf-tsvwg-datagram-plpmtud" to="MTU-DATAGRAM"/>
<displayreference target="I-D.ietf-mptcp-rfc6824bis" to="TCP-EXT"/>
<references pn="section-26">
<name slugifiedName="name-references">References</name>
<references pn="section-26.1">
<name slugifiedName="name-normative-references">Normative References</name>
<reference anchor="PROTOCOL-NUMBERS" target="https://www.iana.org/assignments/protocol-numbers" quoteTitle="true" derivedAnchor="PROTOCOL-NUMBERS">
<front>
<title>Protocol Numbers</title>
<author>
<organization showOnFrontPage="true">IANA</organization>
</author>
<date/>
</front>
</reference>
<reference anchor="RFC0792" target="https://www.rfc-editor.org/info/rfc792" quoteTitle="true" derivedAnchor="RFC0792">
<front>
<title>Internet Control Message Protocol</title>
<author initials="J." surname="Postel" fullname="J. Postel">
<organization showOnFrontPage="true"/>
</author>
<date year="1981" month="September"/>
</front>
<seriesInfo name="STD" value="5"/>
<seriesInfo name="RFC" value="792"/>
<seriesInfo name="DOI" value="10.17487/RFC0792"/>
</reference>
<reference anchor="RFC1122" target="https://www.rfc-editor.org/info/rfc1122" quoteTitle="true" derivedAnchor="RFC1122">
<front>
<title>Requirements for Internet Hosts - Communication Layers</title>
<author initials="R." surname="Braden" fullname="R. Braden" role="editor">
<organization showOnFrontPage="true"/>
</author>
<date year="1989" month="October"/>
<abstract>
<t>This RFC is an official specification for the Internet community. It incorporates by reference, amends, corrects, and supplements the primary protocol standards documents relating to hosts. [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="STD" value="3"/>
<seriesInfo name="RFC" value="1122"/>
<seriesInfo name="DOI" value="10.17487/RFC1122"/>
</reference>
<reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials="S." surname="Bradner" fullname="S. Bradner">
<organization showOnFrontPage="true"/>
</author>
<date year="1997" month="March"/>
<abstract>
<t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
</abstract>
</front>
<seriesInfo name="BCP" value="14"/>
<seriesInfo name="RFC" value="2119"/>
<seriesInfo name="DOI" value="10.17487/RFC2119"/>
</reference>
<reference anchor="RFC2474" target="https://www.rfc-editor.org/info/rfc2474" quoteTitle="true" derivedAnchor="RFC2474">
<front>
<title>Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers</title>
<author initials="K." surname="Nichols" fullname="K. Nichols">
<organization showOnFrontPage="true"/>
</author>
<author initials="S." surname="Blake" fullname="S. Blake">
<organization showOnFrontPage="true"/>
</author>
<author initials="F." surname="Baker" fullname="F. Baker">
<organization showOnFrontPage="true"/>
</author>
<author initials="D." surname="Black" fullname="D. Black">
<organization showOnFrontPage="true"/>
</author>
<date year="1998" month="December"/>
<abstract>
<t>This document defines the IP header field, called the DS (for differentiated services) field. [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="RFC" value="2474"/>
<seriesInfo name="DOI" value="10.17487/RFC2474"/>
</reference>
<reference anchor="RFC3168" target="https://www.rfc-editor.org/info/rfc3168" quoteTitle="true" derivedAnchor="RFC3168">
<front>
<title>The Addition of Explicit Congestion Notification (ECN) to IP</title>
<author initials="K." surname="Ramakrishnan" fullname="K. Ramakrishnan">
<organization showOnFrontPage="true"/>
</author>
<author initials="S." surname="Floyd" fullname="S. Floyd">
<organization showOnFrontPage="true"/>
</author>
<author initials="D." surname="Black" fullname="D. Black">
<organization showOnFrontPage="true"/>
</author>
<date year="2001" month="September"/>
<abstract>
<t>This memo specifies the incorporation of ECN (Explicit Congestion Notification) to TCP and IP, including ECN's use of two bits in the IP header. [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="RFC" value="3168"/>
<seriesInfo name="DOI" value="10.17487/RFC3168"/>
</reference>
<reference anchor="RFC3629" target="https://www.rfc-editor.org/info/rfc3629" quoteTitle="true" derivedAnchor="RFC3629">
<front>
<title>UTF-8, a transformation format of ISO 10646</title>
<author initials="F." surname="Yergeau" fullname="F. Yergeau">
<organization showOnFrontPage="true"/>
</author>
<date year="2003" month="November"/>
<abstract>
<t>ISO/IEC 10646-1 defines a large character set called the Universal Character Set (UCS) which encompasses most of the world's writing systems. The originally proposed encodings of the UCS, however, were not compatible with many current applications and protocols, and this has led to the development of UTF-8, the object of this memo. UTF-8 has the characteristic of preserving the full US-ASCII range, providing compatibility with file systems, parsers and other software that rely on US-ASCII values but are transparent to other values. This memo obsoletes and replaces RFC 2279.</t>
</abstract>
</front>
<seriesInfo name="STD" value="63"/>
<seriesInfo name="RFC" value="3629"/>
<seriesInfo name="DOI" value="10.17487/RFC3629"/>
</reference>
<reference anchor="RFC4443" target="https://www.rfc-editor.org/info/rfc4443" quoteTitle="true" derivedAnchor="RFC4443">
<front>
<title>Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification</title>
<author initials="A." surname="Conta" fullname="A. Conta">
<organization showOnFrontPage="true"/>
</author>
<author initials="S." surname="Deering" fullname="S. Deering">
<organization showOnFrontPage="true"/>
</author>
<author initials="M." surname="Gupta" fullname="M. Gupta" role="editor">
<organization showOnFrontPage="true"/>
</author>
<date year="2006" month="March"/>
<abstract>
<t>This document describes the format of a set of control messages used in ICMPv6 (Internet Control Message Protocol). ICMPv6 is the Internet Control Message Protocol for Internet Protocol version 6 (IPv6). [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="STD" value="89"/>
<seriesInfo name="RFC" value="4443"/>
<seriesInfo name="DOI" value="10.17487/RFC4443"/>
</reference>
<reference anchor="RFC6347" target="https://www.rfc-editor.org/info/rfc6347" quoteTitle="true" derivedAnchor="RFC6347">
<front>
<title>Datagram Transport Layer Security Version 1.2</title>
<author initials="E." surname="Rescorla" fullname="E. Rescorla">
<organization showOnFrontPage="true"/>
</author>
<author initials="N." surname="Modadugu" fullname="N. Modadugu">
<organization showOnFrontPage="true"/>
</author>
<date year="2012" month="January"/>
<abstract>
<t>This document specifies version 1.2 of the Datagram Transport Layer Security (DTLS) protocol. The DTLS protocol provides communications privacy for datagram protocols. The protocol allows client/server applications to communicate in a way that is designed to prevent eavesdropping, tampering, or message forgery. The DTLS protocol is based on the Transport Layer Security (TLS) protocol and provides equivalent security guarantees. Datagram semantics of the underlying transport are preserved by the DTLS protocol. This document updates DTLS 1.0 to work with TLS version 1.2. [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="RFC" value="6347"/>
<seriesInfo name="DOI" value="10.17487/RFC6347"/>
</reference>
<reference anchor="RFC6437" target="https://www.rfc-editor.org/info/rfc6437" quoteTitle="true" derivedAnchor="RFC6437">
<front>
<title>IPv6 Flow Label Specification</title>
<author initials="S." surname="Amante" fullname="S. Amante">
<organization showOnFrontPage="true"/>
</author>
<author initials="B." surname="Carpenter" fullname="B. Carpenter">
<organization showOnFrontPage="true"/>
</author>
<author initials="S." surname="Jiang" fullname="S. Jiang">
<organization showOnFrontPage="true"/>
</author>
<author initials="J." surname="Rajahalme" fullname="J. Rajahalme">
<organization showOnFrontPage="true"/>
</author>
<date year="2011" month="November"/>
<abstract>
<t>This document specifies the IPv6 Flow Label field and the minimum requirements for IPv6 nodes labeling flows, IPv6 nodes forwarding labeled packets, and flow state establishment methods. Even when mentioned as examples of possible uses of the flow labeling, more detailed requirements for specific use cases are out of the scope for this document.</t>
<t>The usage of the Flow Label field enables efficient IPv6 flow classification based only on IPv6 main header fields in fixed positions. [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="RFC" value="6437"/>
<seriesInfo name="DOI" value="10.17487/RFC6437"/>
</reference>
<reference anchor="RFC7065" target="https://www.rfc-editor.org/info/rfc7065" quoteTitle="true" derivedAnchor="RFC7065">
<front>
<title>Traversal Using Relays around NAT (TURN) Uniform Resource Identifiers</title>
<author initials="M." surname="Petit-Huguenin" fullname="M. Petit-Huguenin">
<organization showOnFrontPage="true"/>
</author>
<author initials="S." surname="Nandakumar" fullname="S. Nandakumar">
<organization showOnFrontPage="true"/>
</author>
<author initials="G." surname="Salgueiro" fullname="G. Salgueiro">
<organization showOnFrontPage="true"/>
</author>
<author initials="P." surname="Jones" fullname="P. Jones">
<organization showOnFrontPage="true"/>
</author>
<date year="2013" month="November"/>
<abstract>
<t>This document specifies the syntax of Uniform Resource Identifier (URI) schemes for the Traversal Using Relays around NAT (TURN) protocol. It defines two URI schemes to provision the TURN Resolution Mechanism (RFC 5928).</t>
</abstract>
</front>
<seriesInfo name="RFC" value="7065"/>
<seriesInfo name="DOI" value="10.17487/RFC7065"/>
</reference>
<reference anchor="RFC7350" target="https://www.rfc-editor.org/info/rfc7350" quoteTitle="true" derivedAnchor="RFC7350">
<front>
<title>Datagram Transport Layer Security (DTLS) as Transport for Session Traversal Utilities for NAT (STUN)</title>
<author initials="M." surname="Petit-Huguenin" fullname="M. Petit-Huguenin">
<organization showOnFrontPage="true"/>
</author>
<author initials="G." surname="Salgueiro" fullname="G. Salgueiro">
<organization showOnFrontPage="true"/>
</author>
<date year="2014" month="August"/>
<abstract>
<t>This document specifies the usage of Datagram Transport Layer Security (DTLS) as a transport protocol for Session Traversal Utilities for NAT (STUN). It provides guidance on when and how to use DTLS with the currently standardized STUN usages. It also specifies modifications to the STUN and Traversal Using Relay NAT (TURN) URIs and to the TURN resolution mechanism to facilitate the resolution of STUN and TURN URIs into the IP address and port of STUN and TURN servers supporting DTLS as a transport protocol. This document updates RFCs 5389 and 5928.</t>
</abstract>
</front>
<seriesInfo name="RFC" value="7350"/>
<seriesInfo name="DOI" value="10.17487/RFC7350"/>
</reference>
<reference anchor="RFC7525" target="https://www.rfc-editor.org/info/rfc7525" quoteTitle="true" derivedAnchor="RFC7525">
<front>
<title>Recommendations for Secure Use of Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)</title>
<author initials="Y." surname="Sheffer" fullname="Y. Sheffer">
<organization showOnFrontPage="true"/>
</author>
<author initials="R." surname="Holz" fullname="R. Holz">
<organization showOnFrontPage="true"/>
</author>
<author initials="P." surname="Saint-Andre" fullname="P. Saint-Andre">
<organization showOnFrontPage="true"/>
</author>
<date year="2015" month="May"/>
<abstract>
<t>Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS) are widely used to protect data exchanged over application protocols such as HTTP, SMTP, IMAP, POP, SIP, and XMPP. Over the last few years, several serious attacks on TLS have emerged, including attacks on its most commonly used cipher suites and their modes of operation. This document provides recommendations for improving the security of deployed services that use TLS and DTLS. The recommendations are applicable to the majority of use cases.</t>
</abstract>
</front>
<seriesInfo name="BCP" value="195"/>
<seriesInfo name="RFC" value="7525"/>
<seriesInfo name="DOI" value="10.17487/RFC7525"/>
</reference>
<reference anchor="RFC7915" target="https://www.rfc-editor.org/info/rfc7915" quoteTitle="true" derivedAnchor="RFC7915">
<front>
<title>IP/ICMP Translation Algorithm</title>
<author initials="C." surname="Bao" fullname="C. Bao">
<organization showOnFrontPage="true"/>
</author>
<author initials="X." surname="Li" fullname="X. Li">
<organization showOnFrontPage="true"/>
</author>
<author initials="F." surname="Baker" fullname="F. Baker">
<organization showOnFrontPage="true"/>
</author>
<author initials="T." surname="Anderson" fullname="T. Anderson">
<organization showOnFrontPage="true"/>
</author>
<author initials="F." surname="Gont" fullname="F. Gont">
<organization showOnFrontPage="true"/>
</author>
<date year="2016" month="June"/>
<abstract>
<t>This document describes the Stateless IP/ICMP Translation Algorithm (SIIT), which translates between IPv4 and IPv6 packet headers (including ICMP headers). This document obsoletes RFC 6145.</t>
</abstract>
</front>
<seriesInfo name="RFC" value="7915"/>
<seriesInfo name="DOI" value="10.17487/RFC7915"/>
</reference>
<reference anchor="RFC7982" target="https://www.rfc-editor.org/info/rfc7982" quoteTitle="true" derivedAnchor="RFC7982">
<front>
<title>Measurement of Round-Trip Time and Fractional Loss Using Session Traversal Utilities for NAT (STUN)</title>
<author initials="P." surname="Martinsen" fullname="P. Martinsen">
<organization showOnFrontPage="true"/>
</author>
<author initials="T." surname="Reddy" fullname="T. Reddy">
<organization showOnFrontPage="true"/>
</author>
<author initials="D." surname="Wing" fullname="D. Wing">
<organization showOnFrontPage="true"/>
</author>
<author initials="V." surname="Singh" fullname="V. Singh">
<organization showOnFrontPage="true"/>
</author>
<date year="2016" month="September"/>
<abstract>
<t>A host with multiple interfaces needs to choose the best interface for communication. Oftentimes, this decision is based on a static configuration and does not consider the path characteristics, which may affect the user experience.</t>
<t>This document describes a mechanism for an endpoint to measure the path characteristics fractional loss and RTT using Session Traversal Utilities for NAT (STUN) messages.</t>
</abstract>
</front>
<seriesInfo name="RFC" value="7982"/>
<seriesInfo name="DOI" value="10.17487/RFC7982"/>
</reference>
<reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
<front>
<title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
<author initials="B." surname="Leiba" fullname="B. Leiba">
<organization showOnFrontPage="true"/>
</author>
<date year="2017" month="May"/>
<abstract>
<t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
</abstract>
</front>
<seriesInfo name="BCP" value="14"/>
<seriesInfo name="RFC" value="8174"/>
<seriesInfo name="DOI" value="10.17487/RFC8174"/>
</reference>
<reference anchor="RFC8200" target="https://www.rfc-editor.org/info/rfc8200" quoteTitle="true" derivedAnchor="RFC8200">
<front>
<title>Internet Protocol, Version 6 (IPv6) Specification</title>
<author initials="S." surname="Deering" fullname="S. Deering">
<organization showOnFrontPage="true"/>
</author>
<author initials="R." surname="Hinden" fullname="R. Hinden">
<organization showOnFrontPage="true"/>
</author>
<date year="2017" month="July"/>
<abstract>
<t>This document specifies version 6 of the Internet Protocol (IPv6). It obsoletes RFC 2460.</t>
</abstract>
</front>
<seriesInfo name="STD" value="86"/>
<seriesInfo name="RFC" value="8200"/>
<seriesInfo name="DOI" value="10.17487/RFC8200"/>
</reference>
<reference anchor="RFC8305" target="https://www.rfc-editor.org/info/rfc8305" quoteTitle="true" derivedAnchor="RFC8305">
<front>
<title>Happy Eyeballs Version 2: Better Connectivity Using Concurrency</title>
<author initials="D." surname="Schinazi" fullname="D. Schinazi">
<organization showOnFrontPage="true"/>
</author>
<author initials="T." surname="Pauly" fullname="T. Pauly">
<organization showOnFrontPage="true"/>
</author>
<date year="2017" month="December"/>
<abstract>
<t>Many communication protocols operating over the modern Internet use hostnames. These often resolve to multiple IP addresses, each of which may have different performance and connectivity characteristics. Since specific addresses or address families (IPv4 or IPv6) may be blocked, broken, or sub-optimal on a network, clients that attempt multiple connections in parallel have a chance of establishing a connection more quickly. This document specifies requirements for algorithms that reduce this user-visible delay and provides an example algorithm, referred to as "Happy Eyeballs". This document obsoletes the original algorithm description in RFC 6555.</t>
</abstract>
</front>
<seriesInfo name="RFC" value="8305"/>
<seriesInfo name="DOI" value="10.17487/RFC8305"/>
</reference>
<reference anchor="RFC8446" target="https://www.rfc-editor.org/info/rfc8446" quoteTitle="true" derivedAnchor="RFC8446">
<front>
<title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
<author initials="E." surname="Rescorla" fullname="E. Rescorla">
<organization showOnFrontPage="true"/>
</author>
<date year="2018" month="August"/>
<abstract>
<t>This document specifies version 1.3 of the Transport Layer Security (TLS) protocol. TLS allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery.</t>
<t>This document updates RFCs 5705 and 6066, and obsoletes RFCs 5077, 5246, and 6961. This document also specifies new requirements for TLS 1.2 implementations.</t>
</abstract>
</front>
<seriesInfo name="RFC" value="8446"/>
<seriesInfo name="DOI" value="10.17487/RFC8446"/>
</reference>
<reference anchor="RFC8489" target="https://www.rfc-editor.org/info/rfc8489" quoteTitle="true" derivedAnchor="RFC8489">
<front>
<title>Session Traversal Utilities for NAT (STUN)</title>
<seriesInfo name="RFC" value="8489"/>
<seriesInfo name="DOI" value="10.17487/RFC8489"/>
<author initials="M" surname="Petit-Huguenin" fullname="Marc Petit-Huguenin">
<organization showOnFrontPage="true"/>
</author>
<author initials="G" surname="Salgueiro" fullname="Gonzalo Salgueiro">
<organization showOnFrontPage="true"/>
</author>
<author initials="J" surname="Rosenberg" fullname="Jonathan Rosenberg">
<organization showOnFrontPage="true"/>
</author>
<author initials="D" surname="Wing" fullname="Dan Wing">
<organization showOnFrontPage="true"/>
</author>
<author initials="R" surname="Mahy" fullname="Rohan Mahy">
<organization showOnFrontPage="true"/>
</author>
<author initials="P" surname="Matthews" fullname="Philip Matthews">
<organization showOnFrontPage="true"/>
</author>
<date month="February" year="2020"/>
</front>
</reference>
</references>
<references pn="section-26.2">
<name slugifiedName="name-informative-references">Informative References</name>
<reference anchor="I-D.ietf-intarea-frag-fragile" quoteTitle="true" target="https://tools.ietf.org/html/draft-ietf-intarea-frag-fragile-17" derivedAnchor="FRAG-FRAGILE">
<front>
<title>IP Fragmentation Considered Fragile</title>
<author initials="R" surname="Bonica" fullname="Ron Bonica">
<organization showOnFrontPage="true"/>
</author>
<author initials="F" surname="Baker" fullname="Fred Baker">
<organization showOnFrontPage="true"/>
</author>
<author initials="G" surname="Huston" fullname="Geoff Huston">
<organization showOnFrontPage="true"/>
</author>
<author initials="R" surname="Hinden" fullname="Robert Hinden">
<organization showOnFrontPage="true"/>
</author>
<author initials="O" surname="Troan" fullname="Ole Troan">
<organization showOnFrontPage="true"/>
</author>
<author initials="F" surname="Gont" fullname="Fernando Gont">
<organization showOnFrontPage="true"/>
</author>
<date month="September" day="30" year="2019"/>
<abstract>
<t>This document describes IP fragmentation and explains how it introduces fragility to Internet communication. This document also proposes alternatives to IP fragmentation and provides recommendations for developers and network operators.</t>
</abstract>
</front>
<seriesInfo name="Internet-Draft" value="draft-ietf-intarea-frag-fragile-17"/>
<format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-intarea-frag-fragile-17.txt"/>
<refcontent>Work in Progress</refcontent>
</reference>
<reference anchor="FRAG-HARMFUL" target="https://www.hpl.hp.com/techreports/Compaq-DEC/WRL-87-3.pdf" quoteTitle="true" derivedAnchor="FRAG-HARMFUL">
<front>
<title>Fragmentation Considered Harmful</title>
<author fullname="Kent" initials="C." surname="Kent">
<organization showOnFrontPage="true"/>
</author>
<author fullname="Mogul" initials="J." surname="Mogul">
<organization showOnFrontPage="true"/>
</author>
<date month="December" year="1987"/>
</front>
</reference>
<reference anchor="I-D.ietf-tsvwg-datagram-plpmtud" quoteTitle="true" target="https://tools.ietf.org/html/draft-ietf-tsvwg-datagram-plpmtud-14" derivedAnchor="MTU-DATAGRAM">
<front>
<title>Packetization Layer Path MTU Discovery for Datagram Transports</title>
<author initials="G" surname="Fairhurst" fullname="Gorry Fairhurst">
<organization showOnFrontPage="true"/>
</author>
<author initials="T" surname="Jones" fullname="Tom Jones">
<organization showOnFrontPage="true"/>
</author>
<author initials="M" surname="Tuexen" fullname="Michael Tuexen">
<organization showOnFrontPage="true"/>
</author>
<author initials="I" surname="Ruengeler" fullname="Irene Ruengeler">
<organization showOnFrontPage="true"/>
</author>
<author initials="T" surname="Voelker" fullname="Timo Voelker">
<organization showOnFrontPage="true"/>
</author>
<date month="February" day="12" year="2020"/>
<abstract>
<t>This document describes a robust method for Path MTU Discovery (PMTUD) for datagram Packetization Layers (PLs). It describes an extension to RFC 1191 and RFC 8201, which specifies ICMP-based Path MTU Discovery for IPv4 and IPv6. The method allows a PL, or a datagram application that uses a PL, to discover whether a network path can support the current size of datagram. This can be used to detect and reduce the message size when a sender encounters a packet black hole (where packets are discarded). The method can probe a network path with progressively larger packets to discover whether the maximum packet size can be increased. This allows a sender to determine an appropriate packet size, providing functionality for datagram transports that is equivalent to the Packetization Layer PMTUD specification for TCP, specified in RFC 4821. The document updates RFC 4821 to specify the method for datagram PLs, and updates RFC 8085 as the method to use in place of RFC 4821 with UDP datagrams. Section 7.3 of RFC4960 recommends an endpoint apply the techniques in RFC4821 on a per-destination-address basis. RFC4960 is updated to recommend that SCTP uses the method specified in this document instead of the method in RFC4821. The document also provides implementation notes for incorporating Datagram PMTUD into IETF datagram transports or applications that use datagram transports. When published, this specification updates RFC 4821 and RFC 8085.</t>
</abstract>
</front>
<seriesInfo name="Internet-Draft" value="draft-ietf-tsvwg-datagram-plpmtud-14"/>
<format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-tsvwg-datagram-plpmtud-14.txt"/>
<refcontent>Work in Progress</refcontent>
</reference>
<reference anchor="I-D.ietf-tram-stun-pmtud" quoteTitle="true" target="https://tools.ietf.org/html/draft-ietf-tram-stun-pmtud-15" derivedAnchor="MTU-STUN">
<front>
<title>Packetization Layer Path MTU Discovery (PLMTUD) For UDP Transports Using Session Traversal Utilities for NAT (STUN)</title>
<author initials="M" surname="Petit-Huguenin" fullname="Marc Petit-Huguenin">
<organization showOnFrontPage="true"/>
</author>
<author initials="G" surname="Salgueiro" fullname="Gonzalo Salgueiro">
<organization showOnFrontPage="true"/>
</author>
<author initials="F" surname="Garrido" fullname="Felipe Garrido">
<organization showOnFrontPage="true"/>
</author>
<date month="December" day="17" year="2019"/>
<abstract>
<t>The datagram exchanged between two Internet endpoints have to go through a series of physical and virtual links that may have different limits on the upper size of the datagram they can transmit without fragmentation. Because fragmentation is considered harmful, most transports and protocols are designed with a mechanism that permits dynamic measurement of the maximum size of a datagram. This mechanism is called Packetization Layer Path MTU Discovery (PLPMTUD). But the UDP transport and some of the protocols that use UDP were designed without that feature. The Session Traversal Utilities for NAT (STUN) Usage described in this document permits retrofitting an existing UDP-based protocol with such a feature. Similarly, a new UDP-based protocol could simply reuse the mechanism described in this document.</t>
</abstract>
</front>
<seriesInfo name="Internet-Draft" value="draft-ietf-tram-stun-pmtud-15"/>
<format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-tram-stun-pmtud-15.txt"/>
<refcontent>Work in Progress</refcontent>
</reference>
<reference anchor="PORT-NUMBERS" target="https://www.iana.org/assignments/port-numbers" quoteTitle="true" derivedAnchor="PORT-NUMBERS">
<front>
<title>Service Name and Transport Protocol Port Number Registry</title>
<author>
<organization showOnFrontPage="true">IANA</organization>
</author>
<date/>
</front>
</reference>
<reference anchor="RFC0791" target="https://www.rfc-editor.org/info/rfc791" quoteTitle="true" derivedAnchor="RFC0791">
<front>
<title>Internet Protocol</title>
<author initials="J." surname="Postel" fullname="J. Postel">
<organization showOnFrontPage="true"/>
</author>
<date year="1981" month="September"/>
</front>
<seriesInfo name="STD" value="5"/>
<seriesInfo name="RFC" value="791"/>
<seriesInfo name="DOI" value="10.17487/RFC0791"/>
</reference>
<reference anchor="RFC1191" target="https://www.rfc-editor.org/info/rfc1191" quoteTitle="true" derivedAnchor="RFC1191">
<front>
<title>Path MTU discovery</title>
<author initials="J.C." surname="Mogul" fullname="J.C. Mogul">
<organization showOnFrontPage="true"/>
</author>
<author initials="S.E." surname="Deering" fullname="S.E. Deering">
<organization showOnFrontPage="true"/>
</author>
<date year="1990" month="November"/>
<abstract>
<t>This memo describes a technique for dynamically discovering the maximum transmission unit (MTU) of an arbitrary internet path. It specifies a small change to the way routers generate one type of ICMP message. For a path that passes through a router that has not been so changed, this technique might not discover the correct Path MTU, but it will always choose a Path MTU as accurate as, and in many cases more accurate than, the Path MTU that would be chosen by current practice. [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="RFC" value="1191"/>
<seriesInfo name="DOI" value="10.17487/RFC1191"/>
</reference>
<reference anchor="RFC1918" target="https://www.rfc-editor.org/info/rfc1918" quoteTitle="true" derivedAnchor="RFC1918">
<front>
<title>Address Allocation for Private Internets</title>
<author initials="Y." surname="Rekhter" fullname="Y. Rekhter">
<organization showOnFrontPage="true"/>
</author>
<author initials="B." surname="Moskowitz" fullname="B. Moskowitz">
<organization showOnFrontPage="true"/>
</author>
<author initials="D." surname="Karrenberg" fullname="D. Karrenberg">
<organization showOnFrontPage="true"/>
</author>
<author initials="G. J." surname="de Groot" fullname="G. J. de Groot">
<organization showOnFrontPage="true"/>
</author>
<author initials="E." surname="Lear" fullname="E. Lear">
<organization showOnFrontPage="true"/>
</author>
<date year="1996" month="February"/>
<abstract>
<t>This document describes address allocation for private internets. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
</abstract>
</front>
<seriesInfo name="BCP" value="5"/>
<seriesInfo name="RFC" value="1918"/>
<seriesInfo name="DOI" value="10.17487/RFC1918"/>
</reference>
<reference anchor="RFC1928" target="https://www.rfc-editor.org/info/rfc1928" quoteTitle="true" derivedAnchor="RFC1928">
<front>
<title>SOCKS Protocol Version 5</title>
<author initials="M." surname="Leech" fullname="M. Leech">
<organization showOnFrontPage="true"/>
</author>
<author initials="M." surname="Ganis" fullname="M. Ganis">
<organization showOnFrontPage="true"/>
</author>
<author initials="Y." surname="Lee" fullname="Y. Lee">
<organization showOnFrontPage="true"/>
</author>
<author initials="R." surname="Kuris" fullname="R. Kuris">
<organization showOnFrontPage="true"/>
</author>
<author initials="D." surname="Koblas" fullname="D. Koblas">
<organization showOnFrontPage="true"/>
</author>
<author initials="L." surname="Jones" fullname="L. Jones">
<organization showOnFrontPage="true"/>
</author>
<date year="1996" month="March"/>
<abstract>
<t>This memo describes a protocol that is an evolution of the previous version of the protocol, version 4 [1]. This new protocol stems from active discussions and prototype implementations. [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="RFC" value="1928"/>
<seriesInfo name="DOI" value="10.17487/RFC1928"/>
</reference>
<reference anchor="RFC3261" target="https://www.rfc-editor.org/info/rfc3261" quoteTitle="true" derivedAnchor="RFC3261">
<front>
<title>SIP: Session Initiation Protocol</title>
<author initials="J." surname="Rosenberg" fullname="J. Rosenberg">
<organization showOnFrontPage="true"/>
</author>
<author initials="H." surname="Schulzrinne" fullname="H. Schulzrinne">
<organization showOnFrontPage="true"/>
</author>
<author initials="G." surname="Camarillo" fullname="G. Camarillo">
<organization showOnFrontPage="true"/>
</author>
<author initials="A." surname="Johnston" fullname="A. Johnston">
<organization showOnFrontPage="true"/>
</author>
<author initials="J." surname="Peterson" fullname="J. Peterson">
<organization showOnFrontPage="true"/>
</author>
<author initials="R." surname="Sparks" fullname="R. Sparks">
<organization showOnFrontPage="true"/>
</author>
<author initials="M." surname="Handley" fullname="M. Handley">
<organization showOnFrontPage="true"/>
</author>
<author initials="E." surname="Schooler" fullname="E. Schooler">
<organization showOnFrontPage="true"/>
</author>
<date year="2002" month="June"/>
<abstract>
<t>This document describes Session Initiation Protocol (SIP), an application-layer control (signaling) protocol for creating, modifying, and terminating sessions with one or more participants. These sessions include Internet telephone calls, multimedia distribution, and multimedia conferences. [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="RFC" value="3261"/>
<seriesInfo name="DOI" value="10.17487/RFC3261"/>
</reference>
<reference anchor="RFC3424" target="https://www.rfc-editor.org/info/rfc3424" quoteTitle="true" derivedAnchor="RFC3424">
<front>
<title>IAB Considerations for UNilateral Self-Address Fixing (UNSAF) Across Network Address Translation</title>
<author initials="L." surname="Daigle" fullname="L. Daigle" role="editor">
<organization showOnFrontPage="true"/>
</author>
<author>
<organization showOnFrontPage="true">IAB</organization>
</author>
<date year="2002" month="November"/>
<abstract>
<t>As a result of the nature of Network Address Translation (NAT) Middleboxes, communicating endpoints that are separated by one or more NATs do not know how to refer to themselves using addresses that are valid in the addressing realms of their (current and future) peers. Various proposals have been made for "UNilateral Self-Address Fixing (UNSAF)" processes. These are processes whereby some originating endpoint attempts to determine or fix the address (and port) by which it is known to another endpoint - e.g., to be able to use address data in the protocol exchange, or to advertise a public address from which it will receive connections. This document outlines the reasons for which these proposals can be considered at best as short term fixes to specific problems and the specific issues to be carefully evaluated before creating an UNSAF proposal. This memo provides information for the Internet community.</t>
</abstract>
</front>
<seriesInfo name="RFC" value="3424"/>
<seriesInfo name="DOI" value="10.17487/RFC3424"/>
</reference>
<reference anchor="RFC3550" target="https://www.rfc-editor.org/info/rfc3550" quoteTitle="true" derivedAnchor="RFC3550">
<front>
<title>RTP: A Transport Protocol for Real-Time Applications</title>
<author initials="H." surname="Schulzrinne" fullname="H. Schulzrinne">
<organization showOnFrontPage="true"/>
</author>
<author initials="S." surname="Casner" fullname="S. Casner">
<organization showOnFrontPage="true"/>
</author>
<author initials="R." surname="Frederick" fullname="R. Frederick">
<organization showOnFrontPage="true"/>
</author>
<author initials="V." surname="Jacobson" fullname="V. Jacobson">
<organization showOnFrontPage="true"/>
</author>
<date year="2003" month="July"/>
<abstract>
<t>This memorandum describes RTP, the real-time transport protocol. RTP provides end-to-end network transport functions suitable for applications transmitting real-time data, such as audio, video or simulation data, over multicast or unicast network services. RTP does not address resource reservation and does not guarantee quality-of- service for real-time services. The data transport is augmented by a control protocol (RTCP) to allow monitoring of the data delivery in a manner scalable to large multicast networks, and to provide minimal control and identification functionality. RTP and RTCP are designed to be independent of the underlying transport and network layers. The protocol supports the use of RTP-level translators and mixers. Most of the text in this memorandum is identical to RFC 1889 which it obsoletes. There are no changes in the packet formats on the wire, only changes to the rules and algorithms governing how the protocol is used. The biggest change is an enhancement to the scalable timer algorithm for calculating when to send RTCP packets in order to minimize transmission in excess of the intended rate when many participants join a session simultaneously. [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="STD" value="64"/>
<seriesInfo name="RFC" value="3550"/>
<seriesInfo name="DOI" value="10.17487/RFC3550"/>
</reference>
<reference anchor="RFC3711" target="https://www.rfc-editor.org/info/rfc3711" quoteTitle="true" derivedAnchor="RFC3711">
<front>
<title>The Secure Real-time Transport Protocol (SRTP)</title>
<author initials="M." surname="Baugher" fullname="M. Baugher">
<organization showOnFrontPage="true"/>
</author>
<author initials="D." surname="McGrew" fullname="D. McGrew">
<organization showOnFrontPage="true"/>
</author>
<author initials="M." surname="Naslund" fullname="M. Naslund">
<organization showOnFrontPage="true"/>
</author>
<author initials="E." surname="Carrara" fullname="E. Carrara">
<organization showOnFrontPage="true"/>
</author>
<author initials="K." surname="Norrman" fullname="K. Norrman">
<organization showOnFrontPage="true"/>
</author>
<date year="2004" month="March"/>
<abstract>
<t>This document describes the Secure Real-time Transport Protocol (SRTP), a profile of the Real-time Transport Protocol (RTP), which can provide confidentiality, message authentication, and replay protection to the RTP traffic and to the control traffic for RTP, the Real-time Transport Control Protocol (RTCP). [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="RFC" value="3711"/>
<seriesInfo name="DOI" value="10.17487/RFC3711"/>
</reference>
<reference anchor="RFC4086" target="https://www.rfc-editor.org/info/rfc4086" quoteTitle="true" derivedAnchor="RFC4086">
<front>
<title>Randomness Requirements for Security</title>
<author initials="D." surname="Eastlake 3rd" fullname="D. Eastlake 3rd">
<organization showOnFrontPage="true"/>
</author>
<author initials="J." surname="Schiller" fullname="J. Schiller">
<organization showOnFrontPage="true"/>
</author>
<author initials="S." surname="Crocker" fullname="S. Crocker">
<organization showOnFrontPage="true"/>
</author>
<date year="2005" month="June"/>
<abstract>
<t>Security systems are built on strong cryptographic algorithms that foil pattern analysis attempts. However, the security of these systems is dependent on generating secret quantities for passwords, cryptographic keys, and similar quantities. The use of pseudo-random processes to generate secret quantities can result in pseudo-security. A sophisticated attacker may find it easier to reproduce the environment that produced the secret quantities and to search the resulting small set of possibilities than to locate the quantities in the whole of the potential number space.</t>
<t>Choosing random quantities to foil a resourceful and motivated adversary is surprisingly difficult. This document points out many pitfalls in using poor entropy sources or traditional pseudo-random number generation techniques for generating such quantities. It recommends the use of truly random hardware techniques and shows that the existing hardware on many systems can be used for this purpose. It provides suggestions to ameliorate the problem when a hardware solution is not available, and it gives examples of how large such quantities need to be for some applications. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
</abstract>
</front>
<seriesInfo name="BCP" value="106"/>
<seriesInfo name="RFC" value="4086"/>
<seriesInfo name="DOI" value="10.17487/RFC4086"/>
</reference>
<reference anchor="RFC4302" target="https://www.rfc-editor.org/info/rfc4302" quoteTitle="true" derivedAnchor="RFC4302">
<front>
<title>IP Authentication Header</title>
<author initials="S." surname="Kent" fullname="S. Kent">
<organization showOnFrontPage="true"/>
</author>
<date year="2005" month="December"/>
<abstract>
<t>This document describes an updated version of the IP Authentication Header (AH), which is designed to provide authentication services in IPv4 and IPv6. This document obsoletes RFC 2402 (November 1998). [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="RFC" value="4302"/>
<seriesInfo name="DOI" value="10.17487/RFC4302"/>
</reference>
<reference anchor="RFC4303" target="https://www.rfc-editor.org/info/rfc4303" quoteTitle="true" derivedAnchor="RFC4303">
<front>
<title>IP Encapsulating Security Payload (ESP)</title>
<author initials="S." surname="Kent" fullname="S. Kent">
<organization showOnFrontPage="true"/>
</author>
<date year="2005" month="December"/>
<abstract>
<t>This document describes an updated version of the Encapsulating Security Payload (ESP) protocol, which is designed to provide a mix of security services in IPv4 and IPv6. ESP is used to provide confidentiality, data origin authentication, connectionless integrity, an anti-replay service (a form of partial sequence integrity), and limited traffic flow confidentiality. This document obsoletes RFC 2406 (November 1998). [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="RFC" value="4303"/>
<seriesInfo name="DOI" value="10.17487/RFC4303"/>
</reference>
<reference anchor="RFC4787" target="https://www.rfc-editor.org/info/rfc4787" quoteTitle="true" derivedAnchor="RFC4787">
<front>
<title>Network Address Translation (NAT) Behavioral Requirements for Unicast UDP</title>
<author initials="F." surname="Audet" fullname="F. Audet" role="editor">
<organization showOnFrontPage="true"/>
</author>
<author initials="C." surname="Jennings" fullname="C. Jennings">
<organization showOnFrontPage="true"/>
</author>
<date year="2007" month="January"/>
<abstract>
<t>This document defines basic terminology for describing different types of Network Address Translation (NAT) behavior when handling Unicast UDP and also defines a set of requirements that would allow many applications, such as multimedia communications or online gaming, to work consistently. Developing NATs that meet this set of requirements will greatly increase the likelihood that these applications will function properly. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
</abstract>
</front>
<seriesInfo name="BCP" value="127"/>
<seriesInfo name="RFC" value="4787"/>
<seriesInfo name="DOI" value="10.17487/RFC4787"/>
</reference>
<reference anchor="RFC4821" target="https://www.rfc-editor.org/info/rfc4821" quoteTitle="true" derivedAnchor="RFC4821">
<front>
<title>Packetization Layer Path MTU Discovery</title>
<author initials="M." surname="Mathis" fullname="M. Mathis">
<organization showOnFrontPage="true"/>
</author>
<author initials="J." surname="Heffner" fullname="J. Heffner">
<organization showOnFrontPage="true"/>
</author>
<date year="2007" month="March"/>
<abstract>
<t>This document describes a robust method for Path MTU Discovery (PMTUD) that relies on TCP or some other Packetization Layer to probe an Internet path with progressively larger packets. This method is described as an extension to RFC 1191 and RFC 1981, which specify ICMP-based Path MTU Discovery for IP versions 4 and 6, respectively. [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="RFC" value="4821"/>
<seriesInfo name="DOI" value="10.17487/RFC4821"/>
</reference>
<reference anchor="RFC5128" target="https://www.rfc-editor.org/info/rfc5128" quoteTitle="true" derivedAnchor="RFC5128">
<front>
<title>State of Peer-to-Peer (P2P) Communication across Network Address Translators (NATs)</title>
<author initials="P." surname="Srisuresh" fullname="P. Srisuresh">
<organization showOnFrontPage="true"/>
</author>
<author initials="B." surname="Ford" fullname="B. Ford">
<organization showOnFrontPage="true"/>
</author>
<author initials="D." surname="Kegel" fullname="D. Kegel">
<organization showOnFrontPage="true"/>
</author>
<date year="2008" month="March"/>
<abstract>
<t>This memo documents the various methods known to be in use by applications to establish direct communication in the presence of Network Address Translators (NATs) at the current time. Although this memo is intended to be mainly descriptive, the Security Considerations section makes some purely advisory recommendations about how to deal with security vulnerabilities the applications could inadvertently create when using the methods described. This memo covers NAT traversal approaches used by both TCP- and UDP-based applications. This memo is not an endorsement of the methods described, but merely an attempt to capture them in a document. This memo provides information for the Internet community.</t>
</abstract>
</front>
<seriesInfo name="RFC" value="5128"/>
<seriesInfo name="DOI" value="10.17487/RFC5128"/>
</reference>
<reference anchor="RFC5482" target="https://www.rfc-editor.org/info/rfc5482" quoteTitle="true" derivedAnchor="RFC5482">
<front>
<title>TCP User Timeout Option</title>
<author initials="L." surname="Eggert" fullname="L. Eggert">
<organization showOnFrontPage="true"/>
</author>
<author initials="F." surname="Gont" fullname="F. Gont">
<organization showOnFrontPage="true"/>
</author>
<date year="2009" month="March"/>
<abstract>
<t>The TCP user timeout controls how long transmitted data may remain unacknowledged before a connection is forcefully closed. It is a local, per-connection parameter. This document specifies a new TCP option -- the TCP User Timeout Option -- that allows one end of a TCP connection to advertise its current user timeout value. This information provides advice to the other end of the TCP connection to adapt its user timeout accordingly. Increasing the user timeouts on both ends of a TCP connection allows it to survive extended periods without end-to-end connectivity. Decreasing the user timeouts allows busy servers to explicitly notify their clients that they will maintain the connection state only for a short time without connectivity. [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="RFC" value="5482"/>
<seriesInfo name="DOI" value="10.17487/RFC5482"/>
</reference>
<reference anchor="RFC5766" target="https://www.rfc-editor.org/info/rfc5766" quoteTitle="true" derivedAnchor="RFC5766">
<front>
<title>Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN)</title>
<author initials="R." surname="Mahy" fullname="R. Mahy">
<organization showOnFrontPage="true"/>
</author>
<author initials="P." surname="Matthews" fullname="P. Matthews">
<organization showOnFrontPage="true"/>
</author>
<author initials="J." surname="Rosenberg" fullname="J. Rosenberg">
<organization showOnFrontPage="true"/>
</author>
<date year="2010" month="April"/>
<abstract>
<t>If a host is located behind a NAT, then in certain situations it can be impossible for that host to communicate directly with other hosts (peers). In these situations, it is necessary for the host to use the services of an intermediate node that acts as a communication relay. This specification defines a protocol, called TURN (Traversal Using Relays around NAT), that allows the host to control the operation of the relay and to exchange packets with its peers using the relay. TURN differs from some other relay control protocols in that it allows a client to communicate with multiple peers using a single relay address. [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="RFC" value="5766"/>
<seriesInfo name="DOI" value="10.17487/RFC5766"/>
</reference>
<reference anchor="RFC5925" target="https://www.rfc-editor.org/info/rfc5925" quoteTitle="true" derivedAnchor="RFC5925">
<front>
<title>The TCP Authentication Option</title>
<author initials="J." surname="Touch" fullname="J. Touch">
<organization showOnFrontPage="true"/>
</author>
<author initials="A." surname="Mankin" fullname="A. Mankin">
<organization showOnFrontPage="true"/>
</author>
<author initials="R." surname="Bonica" fullname="R. Bonica">
<organization showOnFrontPage="true"/>
</author>
<date year="2010" month="June"/>
<abstract>
<t>This document specifies the TCP Authentication Option (TCP-AO), which obsoletes the TCP MD5 Signature option of RFC 2385 (TCP MD5). TCP-AO specifies the use of stronger Message Authentication Codes (MACs), protects against replays even for long-lived TCP connections, and provides more details on the association of security with TCP connections than TCP MD5. TCP-AO is compatible with either a static Master Key Tuple (MKT) configuration or an external, out-of-band MKT management mechanism; in either case, TCP-AO also protects connections when using the same MKT across repeated instances of a connection, using traffic keys derived from the MKT, and coordinates MKT changes between endpoints. The result is intended to support current infrastructure uses of TCP MD5, such as to protect long-lived connections (as used, e.g., in BGP and LDP), and to support a larger set of MACs with minimal other system and operational changes. TCP-AO uses a different option identifier than TCP MD5, even though TCP-AO and TCP MD5 are never permitted to be used simultaneously. TCP-AO supports IPv6, and is fully compatible with the proposed requirements for the replacement of TCP MD5. [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="RFC" value="5925"/>
<seriesInfo name="DOI" value="10.17487/RFC5925"/>
</reference>
<reference anchor="RFC5928" target="https://www.rfc-editor.org/info/rfc5928" quoteTitle="true" derivedAnchor="RFC5928">
<front>
<title>Traversal Using Relays around NAT (TURN) Resolution Mechanism</title>
<author initials="M." surname="Petit-Huguenin" fullname="M. Petit-Huguenin">
<organization showOnFrontPage="true"/>
</author>
<date year="2010" month="August"/>
<abstract>
<t>This document defines a resolution mechanism to generate a list of server transport addresses that can be tried to create a Traversal Using Relays around NAT (TURN) allocation. [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="RFC" value="5928"/>
<seriesInfo name="DOI" value="10.17487/RFC5928"/>
</reference>
<reference anchor="RFC6056" target="https://www.rfc-editor.org/info/rfc6056" quoteTitle="true" derivedAnchor="RFC6056">
<front>
<title>Recommendations for Transport-Protocol Port Randomization</title>
<author initials="M." surname="Larsen" fullname="M. Larsen">
<organization showOnFrontPage="true"/>
</author>
<author initials="F." surname="Gont" fullname="F. Gont">
<organization showOnFrontPage="true"/>
</author>
<date year="2011" month="January"/>
<abstract>
<t>During the last few years, awareness has been raised about a number of "blind" attacks that can be performed against the Transmission Control Protocol (TCP) and similar protocols. The consequences of these attacks range from throughput reduction to broken connections or data corruption. These attacks rely on the attacker's ability to guess or know the five-tuple (Protocol, Source Address, Destination Address, Source Port, Destination Port) that identifies the transport protocol instance to be attacked. This document describes a number of simple and efficient methods for the selection of the client port number, such that the possibility of an attacker guessing the exact value is reduced. While this is not a replacement for cryptographic methods for protecting the transport-protocol instance, the aforementioned port selection algorithms provide improved security with very little effort and without any key management overhead. The algorithms described in this document are local policies that may be incrementally deployed and that do not violate the specifications of any of the transport protocols that may benefit from them, such as TCP, UDP, UDP-lite, Stream Control Transmission Protocol (SCTP), Datagram Congestion Control Protocol (DCCP), and RTP (provided that the RTP application explicitly signals the RTP and RTCP port numbers). This memo documents an Internet Best Current Practice.</t>
</abstract>
</front>
<seriesInfo name="BCP" value="156"/>
<seriesInfo name="RFC" value="6056"/>
<seriesInfo name="DOI" value="10.17487/RFC6056"/>
</reference>
<reference anchor="RFC6062" target="https://www.rfc-editor.org/info/rfc6062" quoteTitle="true" derivedAnchor="RFC6062">
<front>
<title>Traversal Using Relays around NAT (TURN) Extensions for TCP Allocations</title>
<author initials="S." surname="Perreault" fullname="S. Perreault" role="editor">
<organization showOnFrontPage="true"/>
</author>
<author initials="J." surname="Rosenberg" fullname="J. Rosenberg">
<organization showOnFrontPage="true"/>
</author>
<date year="2010" month="November"/>
<abstract>
<t>This specification defines an extension of Traversal Using Relays around NAT (TURN), a relay protocol for Network Address Translator (NAT) traversal. This extension allows a TURN client to request TCP allocations, and defines new requests and indications for the TURN server to open and accept TCP connections with the client\'s peers. TURN and this extension both purposefully restrict the ways in which the relayed address can be used. In particular, it prevents users from running general-purpose servers from ports obtained from the TURN server. [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="RFC" value="6062"/>
<seriesInfo name="DOI" value="10.17487/RFC6062"/>
</reference>
<reference anchor="RFC6156" target="https://www.rfc-editor.org/info/rfc6156" quoteTitle="true" derivedAnchor="RFC6156">
<front>
<title>Traversal Using Relays around NAT (TURN) Extension for IPv6</title>
<author initials="G." surname="Camarillo" fullname="G. Camarillo">
<organization showOnFrontPage="true"/>
</author>
<author initials="O." surname="Novo" fullname="O. Novo">
<organization showOnFrontPage="true"/>
</author>
<author initials="S." surname="Perreault" fullname="S. Perreault" role="editor">
<organization showOnFrontPage="true"/>
</author>
<date year="2011" month="April"/>
<abstract>
<t>This document adds IPv6 support to Traversal Using Relays around NAT (TURN). IPv6 support in TURN includes IPv4-to-IPv6, IPv6-to-IPv6, and IPv6-to-IPv4 relaying. This document defines the REQUESTED- ADDRESS-FAMILY attribute for TURN. The REQUESTED-ADDRESS-FAMILY attribute allows a client to explicitly request the address type the TURN server will allocate (e.g., an IPv4-only node may request the TURN server to allocate an IPv6 address). [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="RFC" value="6156"/>
<seriesInfo name="DOI" value="10.17487/RFC6156"/>
</reference>
<reference anchor="RFC6263" target="https://www.rfc-editor.org/info/rfc6263" quoteTitle="true" derivedAnchor="RFC6263">
<front>
<title>Application Mechanism for Keeping Alive the NAT Mappings Associated with RTP / RTP Control Protocol (RTCP) Flows</title>
<author initials="X." surname="Marjou" fullname="X. Marjou">
<organization showOnFrontPage="true"/>
</author>
<author initials="A." surname="Sollaud" fullname="A. Sollaud">
<organization showOnFrontPage="true"/>
</author>
<date year="2011" month="June"/>
<abstract>
<t>This document lists the different mechanisms that enable applications using the Real-time Transport Protocol (RTP) and the RTP Control Protocol (RTCP) to keep their RTP Network Address Translator (NAT) mappings alive. It also makes a recommendation for a preferred mechanism. This document is not applicable to Interactive Connectivity Establishment (ICE) agents. [STANDARDS-TRACK]</t>
</abstract>
</front>
<seriesInfo name="RFC" value="6263"/>
<seriesInfo name="DOI" value="10.17487/RFC6263"/>
</reference>
<reference anchor="RFC7413" target="https://www.rfc-editor.org/info/rfc7413" quoteTitle="true" derivedAnchor="RFC7413">
<front>
<title>TCP Fast Open</title>
<author initials="Y." surname="Cheng" fullname="Y. Cheng">
<organization showOnFrontPage="true"/>
</author>
<author initials="J." surname="Chu" fullname="J. Chu">
<organization showOnFrontPage="true"/>
</author>
<author initials="S." surname="Radhakrishnan" fullname="S. Radhakrishnan">
<organization showOnFrontPage="true"/>
</author>
<author initials="A." surname="Jain" fullname="A. Jain">
<organization showOnFrontPage="true"/>
</author>
<date year="2014" month="December"/>
<abstract>
<t>This document describes an experimental TCP mechanism called TCP Fast Open (TFO). TFO allows data to be carried in the SYN and SYN-ACK packets and consumed by the receiving end during the initial connection handshake, and saves up to one full round-trip time (RTT) compared to the standard TCP, which requires a three-way handshake (3WHS) to complete before data can be exchanged. However, TFO deviates from the standard TCP semantics, since the data in the SYN could be replayed to an application in some rare circumstances. Applications should not use TFO unless they can tolerate this issue, as detailed in the Applicability section.</t>
</abstract>
</front>
<seriesInfo name="RFC" value="7413"/>
<seriesInfo name="DOI" value="10.17487/RFC7413"/>
</reference>
<reference anchor="RFC7478" target="https://www.rfc-editor.org/info/rfc7478" quoteTitle="true" derivedAnchor="RFC7478">
<front>
<title>Web Real-Time Communication Use Cases and Requirements</title>
<author initials="C." surname="Holmberg" fullname="C. Holmberg">
<organization showOnFrontPage="true"/>
</author>
<author initials="S." surname="Hakansson" fullname="S. Hakansson">
<organization showOnFrontPage="true"/>
</author>
<author initials="G." surname="Eriksson" fullname="G. Eriksson">
<organization showOnFrontPage="true"/>
</author>
<date year="2015" month="March"/>
<abstract>
<t>This document describes web-based real-time communication use cases. Requirements on the browser functionality are derived from the use cases.</t>
<t>This document was developed in an initial phase of the work with rather minor updates at later stages. It has not really served as a tool in deciding features or scope for the WG's efforts so far. It is being published to record the early conclusions of the WG. It will not be used as a set of rigid guidelines that specifications and implementations will be held to in the future.</t>
</abstract>
</front>
<seriesInfo name="RFC" value="7478"/>
<seriesInfo name="DOI" value="10.17487/RFC7478"/>
</reference>
<reference anchor="RFC7635" target="https://www.rfc-editor.org/info/rfc7635" quoteTitle="true" derivedAnchor="RFC7635">
<front>
<title>Session Traversal Utilities for NAT (STUN) Extension for Third-Party Authorization</title>
<author initials="T." surname="Reddy" fullname="T. Reddy">
<organization showOnFrontPage="true"/>
</author>
<author initials="P." surname="Patil" fullname="P. Patil">
<organization showOnFrontPage="true"/>
</author>
<author initials="R." surname="Ravindranath" fullname="R. Ravindranath">
<organization showOnFrontPage="true"/>
</author>
<author initials="J." surname="Uberti" fullname="J. Uberti">
<organization showOnFrontPage="true"/>
</author>
<date year="2015" month="August"/>
<abstract>
<t>This document proposes the use of OAuth 2.0 to obtain and validate ephemeral tokens that can be used for Session Traversal Utilities for NAT (STUN) authentication. The usage of ephemeral tokens ensures that access to a STUN server can be controlled even if the tokens are compromised.</t>
</abstract>
</front>
<seriesInfo name="RFC" value="7635"/>
<seriesInfo name="DOI" value="10.17487/RFC7635"/>
</reference>
<reference anchor="RFC7657" target="https://www.rfc-editor.org/info/rfc7657" quoteTitle="true" derivedAnchor="RFC7657">
<front>
<title>Differentiated Services (Diffserv) and Real-Time Communication</title>
<author initials="D." surname="Black" fullname="D. Black" role="editor">
<organization showOnFrontPage="true"/>
</author>
<author initials="P." surname="Jones" fullname="P. Jones">
<organization showOnFrontPage="true"/>
</author>
<date year="2015" month="November"/>
<abstract>
<t>This memo describes the interaction between Differentiated Services (Diffserv) network quality-of-service (QoS) functionality and real- time network communication, including communication based on the Real-time Transport Protocol (RTP). Diffserv is based on network nodes applying different forwarding treatments to packets whose IP headers are marked with different Diffserv Codepoints (DSCPs). WebRTC applications, as well as some conferencing applications, have begun using the Session Description Protocol (SDP) bundle negotiation mechanism to send multiple traffic streams with different QoS requirements using the same network 5-tuple. The results of using multiple DSCPs to obtain different QoS treatments within a single network 5-tuple have transport protocol interactions, particularly with congestion control functionality (e.g., reordering). In addition, DSCP markings may be changed or removed between the traffic source and destination. This memo covers the implications of these Diffserv aspects for real-time network communication, including WebRTC.</t>
</abstract>
</front>
<seriesInfo name="RFC" value="7657"/>
<seriesInfo name="DOI" value="10.17487/RFC7657"/>
</reference>
<reference anchor="RFC7983" target="https://www.rfc-editor.org/info/rfc7983" quoteTitle="true" derivedAnchor="RFC7983">
<front>
<title>Multiplexing Scheme Updates for Secure Real-time Transport Protocol (SRTP) Extension for Datagram Transport Layer Security (DTLS)</title>
<author initials="M." surname="Petit-Huguenin" fullname="M. Petit-Huguenin">
<organization showOnFrontPage="true"/>
</author>
<author initials="G." surname="Salgueiro" fullname="G. Salgueiro">
<organization showOnFrontPage="true"/>
</author>
<date year="2016" month="September"/>
<abstract>
<t>This document defines how Datagram Transport Layer Security (DTLS), Real-time Transport Protocol (RTP), RTP Control Protocol (RTCP), Session Traversal Utilities for NAT (STUN), Traversal Using Relays around NAT (TURN), and ZRTP packets are multiplexed on a single receiving socket. It overrides the guidance from RFC 5764 ("SRTP Extension for DTLS"), which suffered from four issues described and fixed in this document.</t>
<t>This document updates RFC 5764.</t>
</abstract>
</front>
<seriesInfo name="RFC" value="7983"/>
<seriesInfo name="DOI" value="10.17487/RFC7983"/>
</reference>
<reference anchor="RFC8155" target="https://www.rfc-editor.org/info/rfc8155" quoteTitle="true" derivedAnchor="RFC8155">
<front>
<title>Traversal Using Relays around NAT (TURN) Server Auto Discovery</title>
<author initials="P." surname="Patil" fullname="P. Patil">
<organization showOnFrontPage="true"/>
</author>
<author initials="T." surname="Reddy" fullname="T. Reddy">
<organization showOnFrontPage="true"/>
</author>
<author initials="D." surname="Wing" fullname="D. Wing">
<organization showOnFrontPage="true"/>
</author>
<date year="2017" month="April"/>
<abstract>
<t>Current Traversal Using Relays around NAT (TURN) server discovery mechanisms are relatively static and limited to explicit configuration. These are usually under the administrative control of the application or TURN service provider, and not the enterprise, ISP, or the network in which the client is located. Enterprises and ISPs wishing to provide their own TURN servers need auto-discovery mechanisms that a TURN client could use with minimal or no configuration. This document describes three such mechanisms for TURN server discovery.</t>
<t>This document updates RFC 5766 to relax the requirement for mutual authentication in certain cases.</t>
</abstract>
</front>
<seriesInfo name="RFC" value="8155"/>
<seriesInfo name="DOI" value="10.17487/RFC8155"/>
</reference>
<reference anchor="RFC8311" target="https://www.rfc-editor.org/info/rfc8311" quoteTitle="true" derivedAnchor="RFC8311">
<front>
<title>Relaxing Restrictions on Explicit Congestion Notification (ECN) Experimentation</title>
<author initials="D." surname="Black" fullname="D. Black">
<organization showOnFrontPage="true"/>
</author>
<date year="2018" month="January"/>
<abstract>
<t>This memo updates RFC 3168, which specifies Explicit Congestion Notification (ECN) as an alternative to packet drops for indicating network congestion to endpoints. It relaxes restrictions in RFC 3168 that hinder experimentation towards benefits beyond just removal of loss. This memo summarizes the anticipated areas of experimentation and updates RFC 3168 to enable experimentation in these areas. An Experimental RFC in the IETF document stream is required to take advantage of any of these enabling updates. In addition, this memo makes related updates to the ECN specifications for RTP in RFC 6679 and for the Datagram Congestion Control Protocol (DCCP) in RFCs 4341, 4342, and 5622. This memo also records the conclusion of the ECN nonce experiment in RFC 3540 and provides the rationale for reclassification of RFC 3540 from Experimental to Historic; this reclassification enables new experimental use of the ECT(1) codepoint.</t>
</abstract>
</front>
<seriesInfo name="RFC" value="8311"/>
<seriesInfo name="DOI" value="10.17487/RFC8311"/>
</reference>
<reference anchor="RFC8445" target="https://www.rfc-editor.org/info/rfc8445" quoteTitle="true" derivedAnchor="RFC8445">
<front>
<title>Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal</title>
<author initials="A." surname="Keranen" fullname="A. Keranen">
<organization showOnFrontPage="true"/>
</author>
<author initials="C." surname="Holmberg" fullname="C. Holmberg">
<organization showOnFrontPage="true"/>
</author>
<author initials="J." surname="Rosenberg" fullname="J. Rosenberg">
<organization showOnFrontPage="true"/>
</author>
<date year="2018" month="July"/>
<abstract>
<t>This document describes a protocol for Network Address Translator (NAT) traversal for UDP-based communication. This protocol is called Interactive Connectivity Establishment (ICE). ICE makes use of the Session Traversal Utilities for NAT (STUN) protocol and its extension, Traversal Using Relay NAT (TURN).</t>
<t>This document obsoletes RFC 5245.</t>
</abstract>
</front>
<seriesInfo name="RFC" value="8445"/>
<seriesInfo name="DOI" value="10.17487/RFC8445"/>
</reference>
<reference anchor="I-D.ietf-mmusic-ice-sip-sdp" quoteTitle="true" target="https://tools.ietf.org/html/draft-ietf-mmusic-ice-sip-sdp-39" derivedAnchor="SDP-ICE">
<front>
<title>Session Description Protocol (SDP) Offer/Answer procedures for Interactive Connectivity Establishment (ICE)</title>
<author initials="M" surname="Petit-Huguenin" fullname="Marc Petit-Huguenin">
<organization showOnFrontPage="true"/>
</author>
<author initials="S" surname="Nandakumar" fullname="Suhas Nandakumar">
<organization showOnFrontPage="true"/>
</author>
<author initials="C" surname="Holmberg" fullname="Christer Holmberg">
<organization showOnFrontPage="true"/>
</author>
<author initials="A" surname="Keranen" fullname="Ari Keranen">
<organization showOnFrontPage="true"/>
</author>
<author initials="R" surname="Shpount" fullname="Roman Shpount">
<organization showOnFrontPage="true"/>
</author>
<date month="August" day="13" year="2019"/>
<abstract>
<t>This document describes Session Description Protocol (SDP) Offer/ Answer procedures for carrying out Interactive Connectivity Establishment (ICE) between the agents. This document obsoletes RFC 5245.</t>
</abstract>
</front>
<seriesInfo name="Internet-Draft" value="draft-ietf-mmusic-ice-sip-sdp-39"/>
<format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-mmusic-ice-sip-sdp-39.txt"/>
<refcontent>Work in Progress</refcontent>
</reference>
<reference anchor="I-D.ietf-rtcweb-security" quoteTitle="true" target="https://tools.ietf.org/html/draft-ietf-rtcweb-security-12" derivedAnchor="SEC-WEBRTC">
<front>
<title>Security Considerations for WebRTC</title>
<author initials="E" surname="Rescorla" fullname="Eric Rescorla">
<organization showOnFrontPage="true"/>
</author>
<date month="July" day="5" year="2019"/>
<abstract>
<t>WebRTC is a protocol suite for use with real-time applications that can be deployed in browsers - "real time communication on the Web". This document defines the WebRTC threat model and analyzes the security threats of WebRTC in that model.</t>
</abstract>
</front>
<seriesInfo name="Internet-Draft" value="draft-ietf-rtcweb-security-12"/>
<format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-rtcweb-security-12.txt"/>
<refcontent>Work in Progress</refcontent>
</reference>
<reference anchor="I-D.ietf-mptcp-rfc6824bis" quoteTitle="true" target="https://tools.ietf.org/html/draft-ietf-mptcp-rfc6824bis-18" derivedAnchor="TCP-EXT">
<front>
<title>TCP Extensions for Multipath Operation with Multiple Addresses</title>
<author initials="A" surname="Ford" fullname="Alan Ford">
<organization showOnFrontPage="true"/>
</author>
<author initials="C" surname="Raiciu" fullname="Costin Raiciu">
<organization showOnFrontPage="true"/>
</author>
<author initials="M" surname="Handley" fullname="Mark Handley">
<organization showOnFrontPage="true"/>
</author>
<author initials="O" surname="Bonaventure" fullname="Olivier Bonaventure">
<organization showOnFrontPage="true"/>
</author>
<author initials="C" surname="Paasch" fullname="Christoph Paasch">
<organization showOnFrontPage="true"/>
</author>
<date month="June" day="8" year="2019"/>
<abstract>
<t>TCP/IP communication is currently restricted to a single path per connection, yet multiple paths often exist between peers. The simultaneous use of these multiple paths for a TCP/IP session would improve resource usage within the network and, thus, improve user experience through higher throughput and improved resilience to network failure. Multipath TCP provides the ability to simultaneously use multiple paths between peers. This document presents a set of extensions to traditional TCP to support multipath operation. The protocol offers the same type of service to applications as TCP (i.e., reliable bytestream), and it provides the components necessary to establish and use multiple TCP flows across potentially disjoint paths. This document specifies v1 of Multipath TCP, obsoleting v0 as specified in RFC6824, through clarifications and modifications primarily driven by deployment experience.</t>
</abstract>
</front>
<seriesInfo name="Internet-Draft" value="draft-ietf-mptcp-rfc6824bis-18"/>
<format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-mptcp-rfc6824bis-18.txt"/>
<refcontent>Work in Progress</refcontent>
</reference>
<reference anchor="I-D.ietf-tsvwg-udp-options" quoteTitle="true" target="https://tools.ietf.org/html/draft-ietf-tsvwg-udp-options-08" derivedAnchor="UDP-OPT">
<front>
<title>Transport Options for UDP</title>
<author initials="J" surname="Touch" fullname="Joseph Touch">
<organization showOnFrontPage="true"/>
</author>
<date month="September" day="12" year="2019"/>
<abstract>
<t>Transport protocols are extended through the use of transport header options. This document extends UDP by indicating the location, syntax, and semantics for UDP transport layer options.</t>
</abstract>
</front>
<seriesInfo name="Internet-Draft" value="draft-ietf-tsvwg-udp-options-08"/>
<format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-tsvwg-udp-options-08.txt"/>
<refcontent>Work in Progress</refcontent>
</reference>
</references>
</references>
<section numbered="false" toc="include" removeInRFC="false" pn="section-appendix.a">
<name slugifiedName="name-acknowledgements">Acknowledgements</name>
<t pn="section-appendix.a-1">Most of the text in this note comes from the original TURN
specification, <xref target="RFC5766" format="default" sectionFormat="of" derivedContent="RFC5766"/>. The authors would like to
thank <contact fullname="Rohan Mahy"/>, coauthor of the original TURN specification, and everyone
who had contributed to that document. The authors would also like to
acknowledge that this document inherits material from <xref target="RFC6156" format="default" sectionFormat="of" derivedContent="RFC6156"/>.</t>
<t pn="section-appendix.a-2">Thanks to <contact fullname="Justin Uberti"/>, <contact fullname="Pal Martinsen"/>, <contact fullname="Oleg Moskalenko"/>, <contact fullname="Aijun Wang"/>, and <contact fullname="Simon Perreault"/> for
their help on the ADDITIONAL-ADDRESS-FAMILY mechanism. The authors would
like to thank <contact fullname="Gonzalo Salgueiro"/>, <contact fullname="Simon Perreault"/>, <contact fullname="Jonathan Lennox"/>,
<contact fullname="Brandon Williams"/>, <contact fullname="Karl Stahl"/>, <contact fullname="Noriyuki Torii"/>, <contact fullname="Nils Ohlmeier"/>, <contact fullname="Dan Wing"/>, <contact fullname="Vijay Gurbani"/>, <contact fullname="Joseph Touch"/>, <contact fullname="Justin Uberti"/>, <contact fullname="Christopher Wood"/>,
<contact fullname="Roman Danyliw"/>, <contact fullname="Eric Vyncke"/>,
<contact fullname="Adam Roach"/>, <contact fullname="Suresh Krishnan"/>,
<contact fullname="Mirja Kuehlewind"/>, <contact fullname="Benjamin Kaduk"/>, and <contact fullname="Oleg Moskalenko"/> for comments and
review. The authors would like to thank <contact fullname="Marc Petit-Huguenin"/> for his
contributions to the text.</t>
<t pn="section-appendix.a-3">Special thanks to <contact fullname="Magnus Westerlund"/> for the detailed AD review.</t>
</section>
<section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.b">
<name slugifiedName="name-authors-addresses">Authors' Addresses</name>
<author fullname="Tirumaleswar Reddy" initials="T." role="editor" surname="Reddy">
<organization abbrev="McAfee" showOnFrontPage="true">McAfee, Inc.</organization>
<address>
<postal>
<street>Embassy Golf Link Business Park</street>
<city>Bangalore</city>
<region>Karnataka</region>
<code>560071</code>
<country>India</country>
</postal>
<email>kondtir@gmail.com</email>
</address>
</author>
<author fullname="Alan Johnston" initials="A." role="editor" surname="Johnston">
<organization showOnFrontPage="true">Villanova University</organization>
<address>
<postal>
<street/>
<city>Villanova</city>
<region>PA</region>
<code/>
<country>United States of America</country>
</postal>
<email>alan.b.johnston@gmail.com</email>
</address>
</author>
<author fullname="Philip Matthews" initials="P." surname="Matthews">
<organization showOnFrontPage="true">Alcatel-Lucent</organization>
<address>
<postal>
<street>600 March Road</street>
<city>Ottawa</city>
<region>Ontario</region>
<code/>
<country>Canada</country>
</postal>
<email>philip_matthews@magma.ca</email>
</address>
</author>
<author fullname="Jonathan Rosenberg" initials="J." surname="Rosenberg">
<organization showOnFrontPage="true">jdrosen.net</organization>
<address>
<postal>
<street/>
<city>Edison</city>
<region>NJ</region>
<country>United States of America</country>
</postal>
<email>jdrosen@jdrosen.net</email>
<uri>http://www.jdrosen.net</uri>
</address>
</author>
</section>
</back>
</rfc>
|