summaryrefslogtreecommitdiff
path: root/doc/rfc/rfc7407.txt
blob: 051a0dc03be2a0c94a24aafb4765ff8931a1a50c (plain) (blame)
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
Internet Engineering Task Force (IETF)                      M. Bjorklund
Request for Comments: 7407                                Tail-f Systems
Category: Standards Track                               J. Schoenwaelder
ISSN: 2070-1721                                        Jacobs University
                                                           December 2014


                A YANG Data Model for SNMP Configuration

Abstract

   This document defines a collection of YANG definitions for
   configuring SNMP engines.

Status of This Memo

   This is an Internet Standards Track document.

   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 5741.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   http://www.rfc-editor.org/info/rfc7407.

Copyright Notice

   Copyright (c) 2014 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) 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.









Bjorklund & Schoenwaelder    Standards Track                    [Page 1]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


Table of Contents

   1. Introduction ....................................................3
   2. Data Model ......................................................3
      2.1. Tree Diagrams ..............................................4
      2.2. General Considerations .....................................4
      2.3. Common Definitions .........................................4
      2.4. Engine Configuration .......................................5
      2.5. Target Configuration .......................................6
      2.6. Notification Configuration .................................7
      2.7. Proxy Configuration ........................................8
      2.8. Community Configuration ....................................8
      2.9. View-Based Access Control Model Configuration ..............9
      2.10. User-Based Security Model Configuration ..................10
      2.11. Transport Security Model Configuration ...................11
      2.12. Transport Layer Security Transport Model Configuration ...12
      2.13. Secure Shell Transport Model Configuration ...............13
   3. Implementation Guidelines ......................................14
      3.1. Supporting read-only SNMP Access ..........................15
      3.2. Supporting read-write SNMP Access .........................15
   4. Definitions ....................................................16
      4.1. Module 'ietf-x509-cert-to-name' ...........................16
      4.2. Module 'ietf-snmp' ........................................22
      4.3. Submodule 'ietf-snmp-common' ..............................24
      4.4. Submodule 'ietf-snmp-engine' ..............................28
      4.5. Submodule 'ietf-snmp-target' ..............................32
      4.6. Submodule 'ietf-snmp-notification' ........................36
      4.7. Submodule 'ietf-snmp-proxy' ...............................41
      4.8. Submodule 'ietf-snmp-community' ...........................44
      4.9. Submodule 'ietf-snmp-vacm' ................................49
      4.10. Submodule 'ietf-snmp-usm' ................................55
      4.11. Submodule 'ietf-snmp-tsm' ................................60
      4.12. Submodule 'ietf-snmp-tls' ................................63
      4.13. Submodule 'ietf-snmp-ssh' ................................68
   5. IANA Considerations ............................................71
   6. Security Considerations ........................................72
   7. References .....................................................75
      7.1. Normative References ......................................75
      7.2. Informative References ....................................75
   Appendix A.  Example Configurations ...............................78
     A.1.  Engine Configuration Example ..............................78
     A.2.  Community Configuration Example ...........................78
     A.3.  User-Based Security Model Configuration Example ...........79
     A.4.  Target and Notification Configuration Example .............81
     A.5.  Proxy Configuration Example ...............................82






Bjorklund & Schoenwaelder    Standards Track                    [Page 2]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


     A.6.  View-Based Access Control Model Configuration Example .....85
     A.7.  Transport Layer Security Transport Model Configuration
           Example ...................................................87
   Acknowledgments ...................................................88
   Authors' Addresses ................................................88

1.  Introduction

   This document defines a YANG [RFC6020] data model for the
   configuration of SNMP engines.  The configuration model is consistent
   with the MIB modules defined in [RFC3411], [RFC3412], [RFC3413],
   [RFC3414], [RFC3415], [RFC3417], [RFC3418], [RFC3419], [RFC3584],
   [RFC3826], [RFC5591], [RFC5592], and [RFC6353] but takes advantage of
   YANG's ability to define hierarchical configuration data models.

   The configuration data model in particular has been designed for SNMP
   deployments where SNMP runs in read-only mode and the Network
   Configuration Protocol (NETCONF) is used to configure the SNMP agent.
   Nevertheless, the data model allows implementations that support
   write access both via SNMP and NETCONF in order to interwork with
   SNMP management applications manipulating SNMP agent configuration
   using SNMP.  Further details can be found in Section 3.

   The YANG data model focuses on configuration.  Operational state
   objects are not explicitly modeled.  The operational state of an SNMP
   agent can be accessed either directly via SNMP or, alternatively, via
   NETCONF using the read-only translation of the relevant SNMP MIB
   modules into YANG modules [RFC6643].

   This document also defines a YANG data model for mapping an X.509
   certificate to a name.

   The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in BCP
   14 [RFC2119].

2.  Data Model

   In order to preserve the modularity of SNMP, the YANG configuration
   data model is organized in a set of YANG submodules, all sharing the
   same module namespace.  This allows adding configuration support for
   additional SNMP features while keeping the number of namespaces that
   have to be dealt with down to a minimum.







Bjorklund & Schoenwaelder    Standards Track                    [Page 3]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


2.1.  Tree Diagrams

   A simplified graphical representation of the data model is used in
   this document.  The meaning of the symbols in these diagrams is as
   follows:

   o  Brackets "[" and "]" enclose list keys.

   o  Abbreviations before data node names: "rw" means configuration
      (read-write), and "ro" means state data (read-only).

   o  Symbols after data node names: "?" means an optional node, "!"
      means a presence container, and "*" denotes a list and leaf-list.

   o  Parentheses enclose choice and case nodes, and case nodes are also
      marked with a colon (":").

   o  Ellipsis ("...") stands for contents of subtrees that are not
      shown.

2.2.  General Considerations

   Most YANG nodes are mapped 1-1 to the corresponding MIB object.  The
   "reference" statement is used to indicate which corresponding MIB
   object the YANG node is mapped to.  When there is not a simple 1-1
   mapping, the "description" statement explains the mapping.

   The persistency models in SNMP and NETCONF are quite different.  In
   NETCONF, the persistency is defined by the datastore, whereas in
   SNMP, it is defined either explicitly in the data model or on a row-
   by-row basis using the Textual Convention "StorageType".  Thus, in
   the YANG model defined here, the "StorageType" columns are not
   present.  For implementation guidelines, see Section 3.

   In SNMP, row creation and deletion are controlled using the Textual
   Convention "RowStatus".  In NETCONF, creation and deletion are
   handled by the protocol, not in the data model.  Thus, in the YANG
   model defined here, the "RowStatus" columns are not present.

2.3.  Common Definitions

   The submodule "ietf-snmp-common" defines a set of common typedefs and
   the top-level container "snmp".  All configuration parameters defined
   in the other submodules are organized under this top-level container.







Bjorklund & Schoenwaelder    Standards Track                    [Page 4]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


2.4.  Engine Configuration

   The submodule "ietf-snmp-engine", which defines configuration
   parameters that are specific to SNMP engines, has the following
   structure:

      +--rw snmp
         +--rw engine
            +--rw enabled?               boolean
            +--rw listen* [name]
            |  +--rw name    snmp:identifier
            |  +--rw (transport)
            |     +--:(udp)
            |        +--rw udp
            |           +--rw ip      inet:ip-address
            |           +--rw port?   inet:port-number
            +--rw version
            |  +--rw v1?    empty
            |  +--rw v2c?   empty
            |  +--rw v3?    empty
            +--rw engine-id?             snmp:engine-id
            +--rw enable-authen-traps?   boolean

   The leaf "/snmp/engine/enabled" can be used to enable/disable an SNMP
   engine.

   The list "/snmp/engine/listen" provides configuration of the
   transport endpoints the engine is listening to.  In this submodule,
   SNMP over UDP is defined.  The Secure Shell (SSH) Protocol, Transport
   Layer Security (TLS), and Datagram Transport Layer Security (DTLS)
   are also supported, defined in "ietf-snmp-ssh" (Section 2.13) and
   "ietf-snmp-tls" (Section 2.12), respectively.  The "transport" choice
   is expected to be augmented for other transports.

   The "/snmp/engine/version" container can be used to enable/disable
   the different message processing models [RFC3411].















Bjorklund & Schoenwaelder    Standards Track                    [Page 5]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


2.5.  Target Configuration

   The submodule "ietf-snmp-target", which defines configuration
   parameters that correspond to the objects in SNMP-TARGET-MIB, has the
   following structure:

      +--rw snmp
         +--rw target* [name]
         |  +--rw name       snmp:identifier
         |  +--rw (transport)
         |  |  +--:(udp)
         |  |     +--rw udp
         |  |        +--rw ip               inet:ip-address
         |  |        +--rw port?            inet:port-number
         |  |        +--rw prefix-length?   uint8
         |  +--rw tag*       snmp:identifier
         |  +--rw timeout?   uint32
         |  +--rw retries?   uint8
         |  +--rw target-params  snmp:identifier
         +--rw target-params* [name]
            +--rw name    snmp:identifier
            +--rw (params)?

   An entry in the list "/snmp/target" corresponds to an
   "snmpTargetAddrEntry".

   The "snmpTargetAddrTDomain" and "snmpTargetAddrTAddress" objects are
   mapped to transport-specific YANG nodes.  Each transport is
   configured as a separate case in the "transport" choice.  In this
   submodule, SNMP over UDP is defined.  TLS and DTLS are also
   supported, defined in "ietf-snmp-tls" (Section 2.12).  The
   "transport" choice is expected to be augmented for other transports.

   An entry in the list "/snmp/target-params" corresponds to an
   "snmpTargetParamsEntry".  This list contains a choice "params", which
   is augmented by submodules specific to the security model, currently,
   "ietf-snmp-community" (Section 2.8), "ietf-snmp-usm" (Section 2.10),
   and "ietf-snmp-tls" (Section 2.12).













Bjorklund & Schoenwaelder    Standards Track                    [Page 6]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


2.6.  Notification Configuration

   The submodule "ietf-snmp-notification", which defines configuration
   parameters that correspond to the objects in SNMP-NOTIFICATION-MIB,
   has the following structure:

      +--rw snmp
         +--rw notify* [name]
         |  +--rw name    snmp:identifier
         |  +--rw tag     snmp:identifier
         |  +--rw type?   enumeration
         +--rw notify-filter-profile* [name]
            +--rw name       snmp:identifier
            +--rw include*   snmp:wildcard-object-identifier
            +--rw exclude*   snmp:wildcard-object-identifier

   This submodule also augments the "target-params" list defined in the
   "ietf-snmp-target" submodule (Section 2.5) with one leaf:

      +--rw snmp
         +--rw target-params* [name]
            ...
            +--rw notify-filter-profile?   leafref

   An entry in the list "/snmp/notify" corresponds to an
   "snmpNotifyEntry".

   An entry in the list "/snmp/notify-filter-profile" corresponds to an
   "snmpNotifyFilterProfileEntry".  In the MIB, there is a sparse
   relationship between "snmpTargetParamsTable" and
   "snmpNotifyFilterProfileTable".  In the YANG model, this sparse
   relationship is represented with a leafref leaf
   "notify-filter-profile" in the "/snmp/target-params" list, which
   refers to an entry in the "/snmp/notify-filter-profile" list.

   The "snmpNotifyFilterTable" is represented as a list "filter" within
   the "/snmp/notify-filter-profile" list.

   This submodule defines the feature "notification-filter".  A server
   implements this feature if it supports SNMP notification filtering
   [RFC3413].










Bjorklund & Schoenwaelder    Standards Track                    [Page 7]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


2.7.  Proxy Configuration

   The submodule "ietf-snmp-proxy", which defines configuration
   parameters that correspond to the objects in SNMP-PROXY-MIB, has the
   following structure:

      +--rw snmp
         +--rw proxy* [name]
            +--rw name                    snmp:identifier
            +--rw type                    enumeration
            +--rw context-engine-id       snmp:engine-id
            +--rw context-name?           snmp:context-name
            +--rw target-params-in?       snmp:identifier
            +--rw single-target-out?      snmp:identifier
            +--rw multiple-target-out?    snmp:identifier

   An entry in the list "/snmp/proxy" corresponds to an
   "snmpProxyEntry".

   This submodule defines the feature "proxy".  A server implements this
   feature if it can act as an SNMP proxy [RFC3413].

2.8.  Community Configuration

   The submodule "ietf-snmp-community", which defines configuration
   parameters that correspond to the objects in SNMP-COMMUNITY-MIB, has
   the following structure:

      +--rw snmp
         +--rw community* [index]
            +--rw index            snmp:identifier
            +--rw (name)?
            |  +--:(text-name)
            |  |  +--rw text-name?       string
            |  +--:(binary-name)
            |     +--rw binary-name?     binary
            +--rw security-name    snmp:security-name
            +--rw engine-id?       snmp:engine-id
            +--rw context?         snmp:context-name
            +--rw target-tag?      snmp:identifier

   This submodule also augments the "/snmp/target-params/params" choice
   with nodes for the Community-based Security Model used by SNMPv1 and
   SNMPv2c:







Bjorklund & Schoenwaelder    Standards Track                    [Page 8]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


      +--rw snmp
         +--rw target-params* [name]
         |  ...
         |  +--rw (params)?
         |     +--:(v1)
         |     |  +--rw v1
         |     |     +--rw security-name    snmp:security-name
         |     +--:(v2c)
         |        +--rw v2c
         |           +--rw security-name    snmp:security-name
         +--rw target* [name]
            +--rw mms?       union

   An entry in the list "/snmp/community" corresponds to an
   "snmpCommunityEntry".

   When a case "v1" or "v2c" is chosen, it implies an
   snmpTargetParamsMPModel 0 (SNMPv1) or 1 (SNMPv2), and an
   snmpTargetParamsSecurityModel 1 (SNMPv1) or 2 (SNMPv2), respectively.
   Both cases imply an snmpTargetParamsSecurityLevel of noAuthNoPriv.

2.9.  View-Based Access Control Model Configuration

   The submodule "ietf-snmp-vacm", which defines configuration
   parameters that correspond to the objects in SNMP-VIEW-BASED-ACM-MIB,
   has the following structure:

      +--rw snmp
         +--rw vacm
            +--rw group* [name]
            |  +--rw name      group-name
            |  +--rw member* [security-name]
            |  |  +--rw security-name     snmp:security-name
            |  |  +--rw security-model*   snmp:security-model
            |  +--rw access* [context security-model security-level]
            |     +--rw context           snmp:context-name
            |     +--rw context-match?    enumeration
            |     +--rw security-model    snmp:security-model-or-any
            |     +--rw security-level    snmp:security-level
            |     +--rw read-view?        view-name
            |     +--rw write-view?       view-name
            |     +--rw notify-view?      view-name
            +--rw view* [name]
               +--rw name       view-name
               +--rw include*   snmp:wildcard-object-identifier
               +--rw exclude*   snmp:wildcard-object-identifier





Bjorklund & Schoenwaelder    Standards Track                    [Page 9]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


   The "vacmSecurityToGroupTable" and "vacmAccessTable" are mapped to a
   structure of nested lists in the YANG model.  Groups are defined in
   the list "/snmp/vacm/group", and for each group, there is a sublist
   "member" that maps to "vacmSecurityToGroupTable" and a sublist
   "access" that maps to "vacmAccessTable".

   MIB views are defined in the list "/snmp/vacm/view", and for each MIB
   view, there is a leaf-list of included subtree families and a leaf-
   list of excluded subtree families.  This is more compact and thus a
   more readable representation of the "vacmViewTreeFamilyTable".

2.10.  User-Based Security Model Configuration

   The submodule "ietf-snmp-usm", which defines configuration parameters
   that correspond to the objects in SNMP-USER-BASED-SM-MIB, has the
   following structure:

      +--rw snmp
         +--rw usm
            +--rw local
            |  +--rw user* [name]
            |     +-- {common user params}
            +--rw remote* [engine-id]
               +--rw engine-id    snmp:engine-id
               +--rw user* [name]
                  +-- {common user params}

   The "{common user params}" are:

      +--rw name    snmp:identifier
      +--rw auth!
      |  +--rw (protocol)
      |     +--:(md5)
      |     |  +--rw md5
      |     |     +-- rw key    yang:hex-string
      |     +--:(sha)
      |        +--rw sha
      |           +-- rw key    yang:hex-string
      +--rw priv!
         +--rw (protocol)
            +--:(des)
            |  +--rw des
            |     +-- rw key    yang:hex-string
            +--:(aes)
               +--rw aes
                  +-- rw key    yang:hex-string





Bjorklund & Schoenwaelder    Standards Track                   [Page 10]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


   This submodule also augments the "/snmp/target-params/params" choice
   with nodes for the SNMP User-based Security Model.

      +--rw snmp
         +--rw target-params* [name]
            ...
            +--rw (params)?
               +--:(usm)
                  +--rw usm
                     +--rw user-name         snmp:security-name
                     +--rw security-level    security-level

   In the MIB, there is a single table with local and remote users,
   indexed by the engine ID and user name.  In the YANG model, there is
   one list of local users and a nested list of remote users.

   In the MIB, there are several objects related to changing the
   authentication and privacy keys.  These objects are not present in
   the YANG model.  However, the localized key can be changed.  This
   implies that if the engine ID is changed, all users keys need to be
   changed as well.

2.11.  Transport Security Model Configuration

   The submodule "ietf-snmp-tsm", which defines configuration parameters
   that correspond to the objects in SNMP-TSM-MIB, has the following
   structure:

      +--rw snmp
         +--rw tsm
            +--rw use-prefix?   boolean

   This submodule also augments the "/snmp/target-params/params" choice
   with nodes for the SNMP Transport Security Model.

      +--rw snmp
         +--rw target-params* [name]
            ...
            +--rw (params)?
               +--:(tsm)
                  +--rw tsm
                     +--rw security-name     snmp:security-name
                     +--rw security-level    security-level

   This submodule defines the feature "tsm".  A server implements this
   feature if it supports the Transport Security Model (TSM) [RFC5591].





Bjorklund & Schoenwaelder    Standards Track                   [Page 11]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


2.12.  Transport Layer Security Transport Model Configuration

   The submodule "ietf-snmp-tls", which defines configuration parameters
   that correspond to the objects in SNMP-TLS-TM-MIB, has the following
   structure:

      +--rw snmp
         ...
         +--rw target* [name]
         |  ...
         |  +--rw (transport)
         |     ...
         |     +--:(tls)
         |     |  +--rw tls
         |     |     +-- {common (d)tls transport params}
         |     +--:(dtls)
         |        +--rw dtls
         |           +-- {common (d)tls transport params}
         +--rw tlstm
            +--rw cert-to-name* [id]
               +--rw id             uint32
               +--rw fingerprint    x509c2n:tls-fingerprint
               +--rw map-type       identityref
               +--rw name           string

   The "{common (d)tls transport params}" are:

      +--rw ip?                   inet:host
      +--rw port?                 inet:port-number
      +--rw client-fingerprint?   x509c2n:tls-fingerprint
      +--rw server-fingerprint?   x509c2n:tls-fingerprint
      +--rw server-identity?      snmp:admin-string



















Bjorklund & Schoenwaelder    Standards Track                   [Page 12]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


   This submodule also augments the "/snmp/engine/listen/transport"
   choice with objects for the D(TLS) transport endpoints:

      +--rw snmp
         +--rw engine
            ...
            +--rw listen* [name]
               ...
               +--rw (transport)
                  ...
                  +--:(tls)
                  |  +--rw tls
                  |     +--rw ip      inet:ip-address
                  |     +--rw port?   inet:port-number
                  +--:(dtls)
                     +--rw dtls
                        +--rw ip      inet:ip-address
                        +--rw port?   inet:port-number

   This submodule defines the feature "tlstm".  A server implements this
   feature if it supports the Transport Layer Security (TLS) Transport
   Model (TLSTM) [RFC6353].

2.13.  Secure Shell Transport Model Configuration

   The submodule "ietf-snmp-ssh", which defines configuration parameters
   that correspond to the objects in SNMP-SSH-TM-MIB, has the following
   structure:

      +--rw snmp
         ...
         +--rw target* [name]
           ...
           +--rw (transport)
              ...
              +--:(ssh)
                 +--rw ssh
                    +--rw ip          inet:host
                    +--rw port?       inet:port-number
                    +--rw username?   string











Bjorklund & Schoenwaelder    Standards Track                   [Page 13]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


   It also augments the "/snmp/engine/listen/transport" choice with
   objects for the SSH transport endpoints:

      +--rw snmp
         +--rw engine
            ...
            +--rw listen* [name]
               ...
               +--rw (transport)
                  ...
                  +--:(ssh)
                     +--rw ssh
                        +--rw ip          inet:host
                        +--rw port?       inet:port-number
                        +--rw username?   string

   This submodule defines the feature "sshtm".  A server implements this
   feature if it supports the Secure Shell Transport Model (SSHTM)
   [RFC5592].

3.  Implementation Guidelines

   This section describes some challenges for implementations that
   support both the YANG models defined in this document and either
   read-write or read-only SNMP access to the same data, using the
   standard MIB modules.

   As described in Section 2.2, the persistency models in NETCONF and
   SNMP are quite different.  This poses a challenge for an
   implementation to support both NETCONF and SNMP access to the same
   data, in particular if the data is writable over both protocols.
   Specifically, the configuration data may exist in some combination of
   the three NETCONF configuration datastores, and this data must be
   mapped to rows in the SNMP tables, in some SNMP contexts, with proper
   values for the StorageType columns.

   This problem is not new; it has been handled in many implementations
   that support configuration of the SNMP engine over a command line
   interface (CLI), which normally have a persistency model similar to
   NETCONF.

   Since there is not one solution that works for all cases, this
   document does not provide a recommended solution.  Instead, some of
   the challenges involved are described below.







Bjorklund & Schoenwaelder    Standards Track                   [Page 14]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


3.1.  Supporting read-only SNMP Access

   If a device implements only :writable-running, it is trivial to map
   the contents of "running" to data in the SNMP tables, where all
   instances of the StorageType columns have the value "nonVolatile".

   If a device implements :candidate but not :startup, the
   implementation may choose to not expose the contents of the
   "candidate" datastore over SNMP and map the contents of "running" as
   described above.  As an option, the contents of "candidate" might be
   accessible in a separate SNMP context.

   If a device implements :startup, the handling of StorageType becomes
   more difficult.  Since the contents of "running" and "startup" might
   differ, data in "running" cannot automatically be mapped to instances
   with StorageType "nonVolatile".  If a particular entry exists in
   "running" but not in "startup", its StorageType should be "volatile".
   If a particular entry exists in "startup" but not "running", it
   should not be mapped to an SNMP instance, at least not in the default
   SNMP context.

3.2.  Supporting read-write SNMP Access

   If the implementation supports read-write access to data over SNMP,
   and specifically creation of table rows, special attention has to be
   given to the handling of the RowStatus and StorageType columns.  The
   problem is to determine which table rows to store in the
   configuration datastores and which configuration datastore is
   appropriate for each row.

   The SNMP tables contain a mix of configured data and operational
   state, and only rows with an "active" RowStatus column should be
   stored in a configuration datastore.

   If a device implements only :writable-running, "active" rows with a
   "nonVolatile" StorageType column can be stored in "running".  Rows
   with a "volatile" StorageType column are operational state.

   If a device implements :candidate but not :writable-running, all
   configuration changes typically go through the "candidate", even if
   they are done over SNMP.  An implementation might have to perform
   some automatic commit of the "candidate" when data is written over
   SNMP, since there is no explicit "commit" operation in SNMP.

   If a device implements :startup, "nonVolatile" rows cannot just be
   written to "running"; they must also be copied into "startup".
   "volatile" rows may be treated as operational state and not copied to
   any datastore, or they may be copied into "running".



Bjorklund & Schoenwaelder    Standards Track                   [Page 15]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


   Cooperating SNMP management applications may use spin lock objects
   (snmpTargetSpinLock [RFC3413], usmUserSpinLock [RFC3414],
   vacmViewSpinLock [RFC3415]) to coordinate concurrent write requests.
   Implementations supporting modifications of MIB objects protected by
   a spin lock via NETCONF should ensure that the spin lock objects are
   properly incremented whenever objects are changed via NETCONF.  This
   allows cooperating SNMP management applications to discover that
   concurrent modifications are taking place.

4.  Definitions

4.1.  Module 'ietf-x509-cert-to-name'

   This YANG module imports typedefs from [RFC6991].

   <CODE BEGINS> file "ietf-x509-cert-to-name.yang"

   module ietf-x509-cert-to-name {

     namespace "urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name";
     prefix x509c2n;

     import ietf-yang-types {
       prefix yang;
     }

     organization
       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/netmod/>
        WG List:  <mailto:netmod@ietf.org>

        WG Chair: Thomas Nadeau
                  <mailto:tnadeau@lucidvision.com>

        WG Chair: Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>

        Editor:   Martin Bjorklund
                  <mailto:mbj@tail-f.com>

        Editor:   Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>";

     description
       "This module contains a collection of YANG definitions for
        extracting a name from an X.509 certificate.



Bjorklund & Schoenwaelder    Standards Track                   [Page 16]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


        The algorithm used to extract a name from an X.509 certificate
        was first defined in RFC 6353.

        Copyright (c) 2014 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC 7407; see
        the RFC itself for full legal notices.";

     reference
       "RFC 6353: Transport Layer Security (TLS) Transport Model for
          the Simple Network Management Protocol (SNMP)";

     revision 2014-12-10 {
       description
         "Initial revision.";
       reference
         "RFC 7407: A YANG Data Model for SNMP Configuration";

     }

     typedef tls-fingerprint {
       type yang:hex-string {
         pattern '([0-9a-fA-F]){2}(:([0-9a-fA-F]){2}){0,254}';
       }
       description
        "A fingerprint value that can be used to uniquely reference
         other data of potentially arbitrary length.

         A tls-fingerprint value is composed of a 1-octet hashing
         algorithm identifier followed by the fingerprint value.  The
         first octet value identifying the hashing algorithm is taken
         from the IANA 'TLS HashAlgorithm Registry' (RFC 5246).  The
         remaining octets are filled using the results of the hashing
         algorithm.";
       reference
        "RFC 6353: Transport Layer Security (TLS) Transport Model
           for the Simple Network Management Protocol (SNMP).
           SNMP-TLS-TM-MIB.SnmpTLSFingerprint";
     }




Bjorklund & Schoenwaelder    Standards Track                   [Page 17]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


     /* Identities */

     identity cert-to-name {
       description
         "Base identity for algorithms to derive a name from a
          certificate.";
     }

     identity specified {
       base cert-to-name;
       description
         "Directly specifies the name to be used for the certificate.
          The value of the leaf 'name' in the cert-to-name list is
          used.";
       reference
         "RFC 6353: Transport Layer Security (TLS) Transport Model
            for the Simple Network Management Protocol (SNMP).
            SNMP-TLS-TM-MIB.snmpTlstmCertSpecified";
     }

     identity san-rfc822-name {
       base cert-to-name;
       description
         "Maps a subjectAltName's rfc822Name to a name.  The local part
          of the rfc822Name is passed unaltered, but the host-part of
          the name must be passed in lowercase.  For example, the
          rfc822Name field FooBar@Example.COM is mapped to name
          FooBar@example.com.";
       reference
         "RFC 6353: Transport Layer Security (TLS) Transport Model
            for the Simple Network Management Protocol (SNMP).
            SNMP-TLS-TM-MIB.snmpTlstmCertSANRFC822Name";
     }

     identity san-dns-name {
       base cert-to-name;
       description
         "Maps a subjectAltName's dNSName to a name after first
          converting it to all lowercase (RFC 5280 does not specify
          converting to lowercase, so this involves an extra step).
          This mapping results in a 1:1 correspondence between
          subjectAltName dNSName values and the name values.";
       reference
         "RFC 6353: Transport Layer Security (TLS) Transport Model
            for the Simple Network Management Protocol (SNMP).
            SNMP-TLS-TM-MIB.snmpTlstmCertSANDNSName";
     }




Bjorklund & Schoenwaelder    Standards Track                   [Page 18]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


     identity san-ip-address {
       base cert-to-name;
       description
         "Maps a subjectAltName's iPAddress to a name by
          transforming the binary-encoded address as follows:

            1) for IPv4, the value is converted into a
               decimal-dotted quad address (e.g., '192.0.2.1').

            2) for IPv6 addresses, the value is converted into a
               32-character, all-lowercase hexadecimal string
               without any colon separators.

          This mapping results in a 1:1 correspondence between
          subjectAltName iPAddress values and the name values.";
       reference
         "RFC 6353: Transport Layer Security (TLS) Transport Model
            for the Simple Network Management Protocol (SNMP).
            SNMP-TLS-TM-MIB.snmpTlstmCertSANIpAddress";
     }

     identity san-any {
       base cert-to-name;
       description
         "Maps any of the following fields using the corresponding
          mapping algorithms:

            +------------+-----------------+
            | Type       | Algorithm       |
            |------------+-----------------|
            | rfc822Name | san-rfc822-name |
            | dNSName    | san-dns-name    |
            | iPAddress  | san-ip-address  |
            +------------+-----------------+

          The first matching subjectAltName value found in the
          certificate of the above types MUST be used when deriving
          the name.  The mapping algorithm specified in the
          'Algorithm' column MUST be used to derive the name.

          This mapping results in a 1:1 correspondence between
          subjectAltName values and name values.  The three sub-mapping
          algorithms produced by this combined algorithm cannot produce
          conflicting results between themselves.";
       reference
         "RFC 6353: Transport Layer Security (TLS) Transport Model
            for the Simple Network Management Protocol (SNMP).
            SNMP-TLS-TM-MIB.snmpTlstmCertSANAny";



Bjorklund & Schoenwaelder    Standards Track                   [Page 19]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


     }

     identity common-name {
       base cert-to-name;
       description
         "Maps a certificate's CommonName to a name after converting
          it to a UTF-8 encoding.  The usage of CommonNames is
          deprecated, and users are encouraged to use subjectAltName
          mapping methods instead.  This mapping results in a 1:1
          correspondence between certificate CommonName values and name
          values.";
       reference
         "RFC 6353: Transport Layer Security (TLS) Transport Model
            for the Simple Network Management Protocol (SNMP).
            SNMP-TLS-TM-MIB.snmpTlstmCertCommonName";
     }

     /*
      * Groupings
      */

     grouping cert-to-name {
       description
         "Defines nodes for mapping certificates to names.  Modules
          that use this grouping should describe how the resulting
          name is used.";

       list cert-to-name {
         key id;
         description
           "This list defines how certificates are mapped to names.
            The name is derived by considering each cert-to-name
            list entry in order.  The cert-to-name entry's fingerprint
            determines whether the list entry is a match:

            1) If the cert-to-name list entry's fingerprint value
               matches that of the presented certificate, then consider
               the list entry a successful match.

            2) If the cert-to-name list entry's fingerprint value
               matches that of a locally held copy of a trusted CA
               certificate, and that CA certificate was part of the CA
               certificate chain to the presented certificate, then
               consider the list entry a successful match.

           Once a matching cert-to-name list entry has been found, the
           map-type is used to determine how the name associated with
           the certificate should be determined.  See the map-type



Bjorklund & Schoenwaelder    Standards Track                   [Page 20]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


           leaf's description for details on determining the name value.
           If it is impossible to determine a name from the cert-to-name
           list entry's data combined with the data presented in the
           certificate, then additional cert-to-name list entries MUST
           be searched to look for another potential match.

           Security administrators are encouraged to make use of
           certificates with subjectAltName fields that can be mapped to
           names so that a single root CA certificate can allow all
           child certificates' subjectAltName fields to map directly to
           a name via a 1:1 transformation.";
         reference
          "RFC 6353: Transport Layer Security (TLS) Transport Model
             for the Simple Network Management Protocol (SNMP).
             SNMP-TLS-TM-MIB.snmpTlstmCertToTSNEntry";

         leaf id {
           type uint32;
           description
             "The id specifies the order in which the entries in the
              cert-to-name list are searched.  Entries with lower
              numbers are searched first.";
           reference
             "RFC 6353: Transport Layer Security (TLS) Transport Model
                for the Simple Network Management Protocol
                (SNMP).
                SNMP-TLS-TM-MIB.snmpTlstmCertToTSNID";
         }

         leaf fingerprint {
           type x509c2n:tls-fingerprint;
           mandatory true;
           description
             "Specifies a value with which the fingerprint of the
              full certificate presented by the peer is compared.  If
              the fingerprint of the full certificate presented by the
              peer does not match the fingerprint configured, then the
              entry is skipped, and the search for a match continues.";
           reference
             "RFC 6353: Transport Layer Security (TLS) Transport Model
                for the Simple Network Management Protocol
                (SNMP).
                SNMP-TLS-TM-MIB.snmpTlstmCertToTSNFingerprint";
         }

         leaf map-type {
           type identityref {
             base cert-to-name;



Bjorklund & Schoenwaelder    Standards Track                   [Page 21]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


           }
           mandatory true;
           description
             "Specifies the algorithm used to map the certificate
              presented by the peer to a name.

              Mappings that need additional configuration objects should
              use the 'when' statement to make them conditional based on
              the map-type.";
           reference
             "RFC 6353: Transport Layer Security (TLS) Transport Model
                for the Simple Network Management Protocol
                (SNMP).
                SNMP-TLS-TM-MIB.snmpTlstmCertToTSNMapType";
         }

         leaf name {
           when "../map-type = 'x509c2n:specified'";
           type string;
           mandatory true;
           description
             "Directly specifies the NETCONF username when the
              map-type is 'specified'.";
           reference
             "RFC 6353: Transport Layer Security (TLS) Transport Model
                for the Simple Network Management Protocol
                (SNMP).
                SNMP-TLS-TM-MIB.snmpTlstmCertToTSNData";
         }
       }
     }
   }

   <CODE ENDS>

4.2.  Module 'ietf-snmp'

   <CODE BEGINS> file "ietf-snmp.yang"

   module ietf-snmp {

     namespace "urn:ietf:params:xml:ns:yang:ietf-snmp";
     prefix snmp;

     include ietf-snmp-common {
       revision-date 2014-12-10;
     }
     include ietf-snmp-engine {



Bjorklund & Schoenwaelder    Standards Track                   [Page 22]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


       revision-date 2014-12-10;
     }
     include ietf-snmp-target {
       revision-date 2014-12-10;
     }
     include ietf-snmp-notification {
       revision-date 2014-12-10;
     }
     include ietf-snmp-proxy {
       revision-date 2014-12-10;
     }
     include ietf-snmp-community {
       revision-date 2014-12-10;
     }
     include ietf-snmp-usm {
       revision-date 2014-12-10;
     }
     include ietf-snmp-tsm {
       revision-date 2014-12-10;
     }
     include ietf-snmp-vacm {
       revision-date 2014-12-10;
     }
     include ietf-snmp-tls {
       revision-date 2014-12-10;
     }
     include ietf-snmp-ssh {
       revision-date 2014-12-10;
     }

     organization
       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/netmod/>
        WG List:  <mailto:netmod@ietf.org>

        WG Chair: Thomas Nadeau
                  <mailto:tnadeau@lucidvision.com>

        WG Chair: Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>

        Editor:   Martin Bjorklund
                  <mailto:mbj@tail-f.com>

        Editor:   Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>";



Bjorklund & Schoenwaelder    Standards Track                   [Page 23]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


     description
       "This module contains a collection of YANG definitions for
        configuring SNMP engines.

        Copyright (c) 2014 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC 7407; see
        the RFC itself for full legal notices.";

     revision 2014-12-10 {
       description
         "Initial revision.";
       reference
         "RFC 7407: A YANG Data Model for SNMP Configuration";
     }

   }

   <CODE ENDS>

4.3.  Submodule 'ietf-snmp-common'

   <CODE BEGINS> file "ietf-snmp-common.yang"

   submodule ietf-snmp-common {

     belongs-to ietf-snmp {
       prefix snmp;
     }

     import ietf-yang-types {
       prefix yang;
     }

     organization
       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/netmod/>
        WG List:  <mailto:netmod@ietf.org>



Bjorklund & Schoenwaelder    Standards Track                   [Page 24]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


        WG Chair: Thomas Nadeau
                  <mailto:tnadeau@lucidvision.com>

        WG Chair: Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>

        Editor:   Martin Bjorklund
                  <mailto:mbj@tail-f.com>

        Editor:   Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>";

     description
       "This submodule contains a collection of common YANG definitions
        for configuring SNMP engines.

        Copyright (c) 2014 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC 7407; see
        the RFC itself for full legal notices.";

     revision 2014-12-10 {
       description
         "Initial revision.";
       reference
         "RFC 7407: A YANG Data Model for SNMP Configuration";
     }

     /* Collection of SNMP-specific data types */

     typedef admin-string {
       type string {
         length "0..255";
       }
       description
         "Represents SnmpAdminString as defined in RFC 3411.

         Note that the size of an SnmpAdminString is measured in
         octets, not characters.";




Bjorklund & Schoenwaelder    Standards Track                   [Page 25]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


       reference
         "RFC 3411: An Architecture for Describing Simple Network
            Management Protocol (SNMP) Management Frameworks.
            SNMP-FRAMEWORK-MIB.SnmpAdminString";
     }

     typedef identifier {
       type admin-string {
         length "1..32";
       }
       description
         "Identifiers are used to name items in the SNMP configuration
         datastore.";
     }

     typedef context-name {
       type admin-string {
         length "0..32";
       }
       description
         "The context type represents an SNMP context name.";
       reference
         "RFC 3411: An Architecture for Describing Simple Network
            Management Protocol (SNMP) Management Frameworks";
     }

     typedef security-name {
       type admin-string {
         length "1..32";
       }
       description
         "The security-name type represents an SNMP security name.";
       reference
         "RFC 3411: An Architecture for Describing Simple Network
            Management Protocol (SNMP) Management Frameworks";
     }

     typedef security-model {
       type union {
         type enumeration {
           enum v1  { value 1; }
           enum v2c { value 2; }
           enum usm { value 3; }
           enum tsm { value 4; }
         }
         type int32 {
           range "1..2147483647";
         }



Bjorklund & Schoenwaelder    Standards Track                   [Page 26]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


       }
       reference
         "RFC 3411: An Architecture for Describing Simple Network
            Management Protocol (SNMP) Management Frameworks";
     }

     typedef security-model-or-any {
       type union {
         type enumeration {
           enum any { value 0; }
         }
         type security-model;
       }
       reference
         "RFC 3411: An Architecture for Describing Simple Network
            Management Protocol (SNMP) Management Frameworks";
     }

     typedef security-level {
       type enumeration {
         enum no-auth-no-priv { value 1; }
         enum auth-no-priv    { value 2; }
         enum auth-priv       { value 3; }
       }
       reference
         "RFC 3411: An Architecture for Describing Simple Network
            Management Protocol (SNMP) Management Frameworks";
     }

     typedef engine-id {
       type yang:hex-string {
         pattern '([0-9a-fA-F]){2}(:([0-9a-fA-F]){2}){4,31}';
       }
       description
         "The engine ID specified as a list of colon-specified
         hexadecimal octets, e.g., '80:00:02:b8:04:61:62:63'.";
       reference
         "RFC 3411: An Architecture for Describing Simple Network
            Management Protocol (SNMP) Management Frameworks";
     }

     typedef wildcard-object-identifier {
       type string;
       description
         "The wildcard-object-identifier type represents an SNMP object
         identifier where subidentifiers can be given either as a label,
         in numeric form, or a wildcard, represented by an asterisk
         ('*').";



Bjorklund & Schoenwaelder    Standards Track                   [Page 27]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


     }

     typedef tag-value {
       type string {
         length "0..255";
       }
       description
         "Represents SnmpTagValue as defined in RFC 3413.

         Note that the size of an SnmpTagValue is measured in
         octets, not characters.";
       reference
         "RFC 3413: Simple Network Management Protocol (SNMP)
            Applications.
            SNMP-TARGET-MIB.SnmpTagValue";
     }

     container snmp {
       description
         "Top-level container for SNMP-related configuration and
         status objects.";
     }

   }

   <CODE ENDS>

4.4.  Submodule 'ietf-snmp-engine'

   <CODE BEGINS> file "ietf-snmp-engine.yang"

   submodule ietf-snmp-engine {

     belongs-to ietf-snmp {
       prefix snmp;
     }

     import ietf-inet-types {
       prefix inet;
     }

     include ietf-snmp-common;

     organization
       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/netmod/>



Bjorklund & Schoenwaelder    Standards Track                   [Page 28]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


        WG List:  <mailto:netmod@ietf.org>

        WG Chair: Thomas Nadeau
                  <mailto:tnadeau@lucidvision.com>

        WG Chair: Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>

        Editor:   Martin Bjorklund
                  <mailto:mbj@tail-f.com>

        Editor:   Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>";

     description
       "This submodule contains a collection of YANG definitions
        for configuring SNMP engines.

        Copyright (c) 2014 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).
        This version of this YANG module is part of RFC 7407; see
        the RFC itself for full legal notices.";

     revision 2014-12-10 {
       description
         "Initial revision.";
       reference
         "RFC 7407: A YANG Data Model for SNMP Configuration";
     }

     augment /snmp:snmp {

       container engine {

         description
           "Configuration of the SNMP engine.";

         leaf enabled {
           type boolean;
           default "false";
           description



Bjorklund & Schoenwaelder    Standards Track                   [Page 29]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


             "Enables the SNMP engine.";
         }

         list listen {
           key "name";
           description
             "Configuration of the transport endpoints on which the
              engine listens.";

           leaf name {
             type snmp:identifier;
             description
               "An arbitrary name for the list entry.";
           }

           choice transport {
             mandatory true;
             description
               "The transport-protocol-specific parameters for this
                endpoint.  Submodules providing configuration for
                additional transports are expected to augment this
                choice.";
             case udp {
               container udp {
                 leaf ip {
                   type inet:ip-address;
                   mandatory true;
                   description
                     "The IPv4 or IPv6 address on which the engine
                      listens.";
                 }
                 leaf port {
                   type inet:port-number;
                   description
                     "The UDP port on which the engine listens.

                      If the port is not configured, an engine that
                      acts as a Command Responder uses port 161, and
                      an engine that acts as a Notification Receiver
                      uses port 162.";
                 }
               }
             }
           }
         }






Bjorklund & Schoenwaelder    Standards Track                   [Page 30]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


         container version {
           description
             "SNMP version used by the engine.";
           leaf v1 {
             type empty;
           }
           leaf v2c {
             type empty;
           }
           leaf v3 {
             type empty;
           }
         }

         leaf engine-id {
           type snmp:engine-id;
           description
             "The local SNMP engine's administratively assigned unique
              identifier.

              If this leaf is not set, the device automatically
              calculates an engine ID, as described in RFC 3411.  A
              server MAY initialize this leaf with the automatically
              created value.";
           reference
             "RFC 3411: An Architecture for Describing Simple Network
                Management Protocol (SNMP) Management
                Frameworks.
                SNMP-FRAMEWORK-MIB.snmpEngineID";
         }

         leaf enable-authen-traps {
           type boolean;
           description
             "Indicates whether the SNMP entity is permitted to
              generate authenticationFailure traps.";
           reference
             "RFC 3418: Management Information Base (MIB) for the
                Simple Network Management Protocol (SNMP)
                SNMPv2-MIB.snmpEnableAuthenTraps";
         }
       }
     }
   }

   <CODE ENDS>





Bjorklund & Schoenwaelder    Standards Track                   [Page 31]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


4.5.  Submodule 'ietf-snmp-target'

   <CODE BEGINS> file "ietf-snmp-target.yang"

   submodule ietf-snmp-target {

     belongs-to ietf-snmp {
       prefix snmp;
     }

     import ietf-inet-types {
       prefix inet;
     }

     include ietf-snmp-common;

     organization
       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/netmod/>
        WG List:  <mailto:netmod@ietf.org>

        WG Chair: Thomas Nadeau
                  <mailto:tnadeau@lucidvision.com>

        WG Chair: Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>

        Editor:   Martin Bjorklund
                  <mailto:mbj@tail-f.com>

        Editor:   Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>";

     description
       "This submodule contains a collection of YANG definitions
        for configuring SNMP targets.

        Copyright (c) 2014 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).



Bjorklund & Schoenwaelder    Standards Track                   [Page 32]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


        This version of this YANG module is part of RFC 7407; see
        the RFC itself for full legal notices.";

     reference
       "RFC 3413: Simple Network Management Protocol (SNMP)
          Applications";

     revision 2014-12-10 {
       description
         "Initial revision.";
       reference
         "RFC 7407: A YANG Data Model for SNMP Configuration";
     }

     augment /snmp:snmp {

       list target {
         key name;
         description
           "List of targets.";
         reference
           "RFC 3413: Simple Network Management Protocol (SNMP)
              Applications.
              SNMP-TARGET-MIB.snmpTargetAddrTable";

         leaf name {
           type snmp:identifier;
           description
             "Identifies the target.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP)
                Applications.
                SNMP-TARGET-MIB.snmpTargetAddrName";
         }
         choice transport {
           mandatory true;
           description
             "Transport address of the target.

              The snmpTargetAddrTDomain and snmpTargetAddrTAddress
              objects are mapped to transport-specific YANG nodes.  Each
              transport is configured as a separate case in this
              choice.  Submodules providing configuration for additional
              transports are expected to augment this choice.";







Bjorklund & Schoenwaelder    Standards Track                   [Page 33]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


           reference
             "RFC 3413: Simple Network Management Protocol (SNMP)
                Applications.
                SNMP-TARGET-MIB.snmpTargetAddrTDomain
                SNMP-TARGET-MIB.snmpTargetAddrTAddress";
           case udp {
             reference
              "RFC 3417: Transport Mappings for the Simple Network
                 Management Protocol (SNMP).
                 SNMPv2-TM.snmpUDPDomain
               RFC 3419: Textual Conventions for Transport Addresses.
                 TRANSPORT-ADDRESS-MIB.transportDomainUdpIpv4
                 TRANSPORT-ADDRESS-MIB.transportDomainUdpIpv4z
                 TRANSPORT-ADDRESS-MIB.transportDomainUdpIpv6
                 TRANSPORT-ADDRESS-MIB.transportDomainUdpIpv6z";
             container udp {
               leaf ip {
                 type inet:ip-address;
                 mandatory true;
                 reference
                   "RFC 3413: Simple Network Management Protocol (SNMP).
                      SNMP-TARGET-MIB.snmpTargetAddrTAddress";
               }
               leaf port {
                 type inet:port-number;
                 default 162;
                 description
                   "UDP port number.";
                 reference
                   "RFC 3413: Simple Network Management Protocol (SNMP).
                      SNMP-TARGET-MIB.snmpTargetAddrTAddress";
               }
               leaf prefix-length {
                 type uint8;
                 description
                   "The value of this leaf must match the value of
                    ../snmp:ip.  If ../snmp:ip contains an IPv4 address,
                    this leaf must be less than or equal to 32.  If it
                    contains an IPv6 address, it must be less than or
                    equal to 128.

                    Note that the prefix-length is currently only used
                    by the Community-based Security Model to filter
                    incoming messages.  Furthermore, the prefix-length
                    filtering does not cover all possible filters
                    supported by the corresponding MIB object.";





Bjorklund & Schoenwaelder    Standards Track                   [Page 34]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


                 reference
                   "RFC 3584: Coexistence between Version 1, Version 2,
                      and Version 3 of the Internet-standard
                      Network Management Framework.
                      SNMP-COMMUNITY-MIB.snmpTargetAddrTMask";
               }
             }
           }
         }
         leaf-list tag {
           type snmp:tag-value;
           description
             "List of tag values used to select target addresses.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-TARGET-MIB.snmpTargetAddrTagList";
         }
         leaf timeout {
           type uint32;
           units "0.01 seconds";
           default 1500;
           description
             "Needed only if this target can receive
              InformRequest-PDUs.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-TARGET-MIB.snmpTargetAddrTimeout";
         }
         leaf retries {
           type uint8;
           default 3;
           description
             "Needed only if this target can receive
              InformRequest-PDUs.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-TARGET-MIB.snmpTargetAddrRetryCount";
         }
         leaf target-params {
           type snmp:identifier;
           mandatory true;
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-TARGET-MIB.snmpTargetAddrParams";



Bjorklund & Schoenwaelder    Standards Track                   [Page 35]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


         }
       }

       list target-params {
         key name;
         description
           "List of target parameters.";
         reference
           "RFC 3413: Simple Network Management Protocol (SNMP).
              Applications.
              SNMP-TARGET-MIB.snmpTargetParamsTable";

         leaf name {
           type snmp:identifier;
         }
         choice params {
           description
             "This choice is augmented with case nodes containing
              configuration parameters specific to the security model.";
         }
       }
     }
   }

   <CODE ENDS>

4.6.  Submodule 'ietf-snmp-notification'

   <CODE BEGINS> file "ietf-snmp-notification.yang"

   submodule ietf-snmp-notification {

     belongs-to ietf-snmp {
       prefix snmp;
     }

     include ietf-snmp-common;
     include ietf-snmp-target;

     organization
       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/netmod/>
        WG List:  <mailto:netmod@ietf.org>

        WG Chair: Thomas Nadeau
                  <mailto:tnadeau@lucidvision.com>



Bjorklund & Schoenwaelder    Standards Track                   [Page 36]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


        WG Chair: Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>

        Editor:   Martin Bjorklund
                  <mailto:mbj@tail-f.com>

        Editor:   Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>";

     description
       "This submodule contains a collection of YANG definitions
        for configuring SNMP notifications.

        Copyright (c) 2014 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC 7407; see
        the RFC itself for full legal notices.";

     reference
       "RFC 3413: Simple Network Management Protocol (SNMP)
          Applications";

     revision 2014-12-10 {
       description
         "Initial revision.";
       reference
         "RFC 7407: A YANG Data Model for SNMP Configuration";
     }

     feature notification-filter {
       description
         "A server implements this feature if it supports SNMP
         notification filtering.";
       reference
         "RFC 3413: Simple Network Management Protocol (SNMP)
            Applications";
     }

     augment /snmp:snmp {




Bjorklund & Schoenwaelder    Standards Track                   [Page 37]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


       list notify {
         key name;
         description
           "Targets that will receive notifications.

            Entries in this list are mapped 1-1 to entries in
            snmpNotifyTable, except that if an entry in snmpNotifyTable
            has an snmpNotifyTag for which no snmpTargetAddrEntry
            exists, then the snmpNotifyTable entry is not mapped to an
            entry in this list.";
         reference
           "RFC 3413: Simple Network Management Protocol (SNMP).
              Applications.
              SNMP-NOTIFICATION-MIB.snmpNotifyTable";

         leaf name {
           type snmp:identifier;
           description
             "An arbitrary name for the list entry.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-NOTIFICATION-MIB.snmpNotifyName";
         }
         leaf tag {
           type snmp:tag-value;
           mandatory true;
           description
             "Target tag, selects a set of notification targets.

              Implementations MAY restrict the values of this leaf
              to be one of the available values of /snmp/target/tag in
              a valid configuration.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-NOTIFICATION-MIB.snmpNotifyTag";
         }
         leaf type {
           type enumeration {
             enum trap { value 1; }
             enum inform { value 2; }
           }
           default trap;
           description
             "Defines the notification type to be generated.";





Bjorklund & Schoenwaelder    Standards Track                   [Page 38]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-NOTIFICATION-MIB.snmpNotifyType";
         }
       }

       list notify-filter-profile {
         if-feature snmp:notification-filter;
         key name;

         description
           "Notification filter profiles.

            The leaf /snmp/target/notify-filter-profile is used
            to associate a filter profile with a target.

            If an entry in this list is referred to by one or more
            /snmp/target/notify-filter-profile items, each such
            notify-filter-profile is represented by one
            snmpNotifyFilterProfileEntry.

            If an entry in this list is not referred to by any
            /snmp/target/notify-filter-profile, the entry is not mapped
            to snmpNotifyFilterProfileTable.";
         reference
           "RFC 3413: Simple Network Management Protocol (SNMP).
              Applications.
              SNMP-NOTIFICATION-MIB.snmpNotifyFilterProfileTable
              SNMP-NOTIFICATION-MIB.snmpNotifyFilterTable";

         leaf name {
           type snmp:identifier;
           description
             "Name of the filter profile.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-NOTIFICATION-MIB.snmpNotifyFilterProfileName";
         }

         leaf-list include {
           type snmp:wildcard-object-identifier;
           description
             "A family of subtrees included in this filter.";






Bjorklund & Schoenwaelder    Standards Track                   [Page 39]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-NOTIFICATION-MIB.snmpNotifyFilterSubtree
                SNMP-NOTIFICATION-MIB.snmpNotifyFilterMask
                SNMP-NOTIFICATION-MIB.snmpNotifyFilterType";
         }

         leaf-list exclude {
           type snmp:wildcard-object-identifier;
           description
             "A family of subtrees excluded from this filter.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-NOTIFICATION-MIB.snmpNotifyFilterSubtree
                SNMP-NOTIFICATION-MIB.snmpNotifyFilterMask
                SNMP-NOTIFICATION-MIB.snmpNotifyFilterType";
         }
       }

     }

     augment /snmp:snmp/snmp:target-params {
       reference
         "RFC 3413: Simple Network Management Protocol (SNMP).
            Applications.
            SNMP-NOTIFICATION-MIB.snmpNotifyFilterProfileTable";
       leaf notify-filter-profile {
         if-feature snmp:notification-filter;
         type leafref {
           path "/snmp/notify-filter-profile/name";
         }
         description
           "This leafref leaf is used to represent the sparse
            relationship between the /snmp/target-params list and the
            /snmp/notify-filter-profile list.";
         reference
           "RFC 3413: Simple Network Management Protocol (SNMP).
              Applications.
              SNMP-NOTIFICATION-MIB.snmpNotifyFilterProfileName";
       }
     }

   }

   <CODE ENDS>




Bjorklund & Schoenwaelder    Standards Track                   [Page 40]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


4.7.  Submodule 'ietf-snmp-proxy'

   <CODE BEGINS> file "ietf-snmp-proxy.yang"

   submodule ietf-snmp-proxy {

     belongs-to ietf-snmp {
       prefix snmp;
     }

     include ietf-snmp-common;
     include ietf-snmp-target;

     organization
       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/netmod/>
        WG List:  <mailto:netmod@ietf.org>

        WG Chair: Thomas Nadeau
                  <mailto:tnadeau@lucidvision.com>

        WG Chair: Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>

        Editor:   Martin Bjorklund
                  <mailto:mbj@tail-f.com>

        Editor:   Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>";

     description
       "This submodule contains a collection of YANG definitions
        for configuring SNMP proxies.

        Copyright (c) 2014 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC 7407; see
        the RFC itself for full legal notices.";



Bjorklund & Schoenwaelder    Standards Track                   [Page 41]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


     reference
       "RFC 3413: Simple Network Management Protocol (SNMP)
          Applications";

     revision 2014-12-10 {
       description
         "Initial revision.";
       reference
         "RFC 7407: A YANG Data Model for SNMP Configuration";
     }

     feature proxy {
       description
         "A server implements this feature if it can act as an
         SNMP proxy.";
       reference
         "RFC 3413: Simple Network Management Protocol (SNMP)
            Applications";
     }

     augment /snmp:snmp {
       if-feature snmp:proxy;

       list proxy {
         key name;

         description
           "List of proxy parameters.";
         reference
           "RFC 3413: Simple Network Management Protocol (SNMP).
              Applications.
              SNMP-PROXY-MIB.snmpProxyTable";

         leaf name {
           type snmp:identifier;
           description
             "Identifies the proxy parameter entry.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-PROXY-MIB.snmpProxyName";
         }
         leaf type {
           type enumeration {
             enum read { value 1; }
             enum write { value 2; }
             enum trap { value 3; }
             enum inform { value 4; }



Bjorklund & Schoenwaelder    Standards Track                   [Page 42]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


           }
           mandatory true;
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-PROXY-MIB.snmpProxyType";
         }
         leaf context-engine-id {
           type snmp:engine-id;
           mandatory true;
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-PROXY-MIB.snmpProxyContextEngineID";
         }
         leaf context-name {
           type snmp:context-name;
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-PROXY-MIB.snmpProxyContextName";
         }
         leaf target-params-in {
           type snmp:identifier;
           description
             "The name of a target parameters list entry.

              Implementations MAY restrict the values of this
              leaf to be one of the available values of
              /snmp/target-params/name in a valid configuration.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-PROXY-MIB.snmpProxyTargetParamsIn";
         }
         leaf single-target-out {
           when "../type = 'read' or ../type = 'write'";
           type snmp:identifier;
           description
             "Implementations MAY restrict the values of this leaf
              to be one of the available values of /snmp/target/name in
              a valid configuration.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-PROXY-MIB.snmpProxySingleTargetOut";
         }




Bjorklund & Schoenwaelder    Standards Track                   [Page 43]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


         leaf multiple-target-out {
           when "../type = 'trap' or ../type = 'inform'";
           type snmp:tag-value;
           description
             "Implementations MAY restrict the values of this leaf
              to be one of the available values of /snmp/target/tag in
              a valid configuration.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-PROXY-MIB.snmpProxyMultipleTargetOut";
         }
       }
     }
   }

   <CODE ENDS>

4.8.  Submodule 'ietf-snmp-community'

   <CODE BEGINS> file "ietf-snmp-community.yang"

   submodule ietf-snmp-community {

     belongs-to ietf-snmp {
       prefix snmp;
     }

     import ietf-netconf-acm {
       prefix nacm;
     }

     include ietf-snmp-common;
     include ietf-snmp-target;
     include ietf-snmp-proxy;

     organization
       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/netmod/>
        WG List:  <mailto:netmod@ietf.org>

        WG Chair: Thomas Nadeau
                  <mailto:tnadeau@lucidvision.com>

        WG Chair: Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>



Bjorklund & Schoenwaelder    Standards Track                   [Page 44]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


        Editor:   Martin Bjorklund
                  <mailto:mbj@tail-f.com>

        Editor:   Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>";

     description
       "This submodule contains a collection of YANG definitions
        for configuring community-based SNMP.

        Copyright (c) 2014 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC 7407; see
        the RFC itself for full legal notices.";

     reference
       "RFC 3584: Coexistence between Version 1, Version 2, and
          Version 3 of the Internet-standard Network
          Management Framework";

     revision 2014-12-10 {
       description
         "Initial revision.";
       reference
         "RFC 7407: A YANG Data Model for SNMP Configuration";
     }

     augment /snmp:snmp {

       list community {
         key index;

         description
           "List of communities.";
         reference
           "RFC 3584: Coexistence between Version 1, Version 2,
              and Version 3 of the Internet-standard
              Network Management Framework.
              SNMP-COMMUNITY-MIB.snmpCommunityTable";




Bjorklund & Schoenwaelder    Standards Track                   [Page 45]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


         leaf index {
           type snmp:identifier;
           description
             "Index into the community list.";
           reference
             "RFC 3584: Coexistence between Version 1, Version 2,
                and Version 3 of the Internet-standard
                Network Management Framework.
                SNMP-COMMUNITY-MIB.snmpCommunityIndex";
         }
         choice name {
           nacm:default-deny-all;
           description
             "The community name, specified as either a string or
              a binary value.  The binary name is used when the
              community name contains characters that are not legal
              in a string.

              If not set, the value of 'security-name' is operationally
              used as the snmpCommunityName.";
           reference
             "RFC 3584: Coexistence between Version 1, Version 2,
                and Version 3 of the Internet-standard
                Network Management Framework.
                SNMP-COMMUNITY-MIB.snmpCommunityName";
           leaf text-name {
             type string;
             description
               "A community name that can be represented as a
                YANG string.";
           }
           leaf binary-name {
             type binary;
             description
               "A community name represented as a binary value.";
           }
         }
         leaf security-name {
           type snmp:security-name;
           mandatory true;
           nacm:default-deny-all;
           description
             "The snmpCommunitySecurityName of this entry.";
           reference
             "RFC 3584: Coexistence between Version 1, Version 2,
                and Version 3 of the Internet-standard
                Network Management Framework.
                SNMP-COMMUNITY-MIB.snmpCommunitySecurityName";



Bjorklund & Schoenwaelder    Standards Track                   [Page 46]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


         }
         leaf engine-id {
           if-feature snmp:proxy;
           type snmp:engine-id;
           description
             "If not set, the value of the local SNMP engine is
              operationally used by the device.";
           reference
             "RFC 3584: Coexistence between Version 1, Version 2,
                and Version 3 of the Internet-standard
                Network Management Framework.
                SNMP-COMMUNITY-MIB.snmpCommunityContextEngineID";
         }
         leaf context {
           type snmp:context-name;
           default "";
           description
             "The context in which management information is accessed
              when using the community string specified by this entry.";
           reference
             "RFC 3584: Coexistence between Version 1, Version 2,
                and Version 3 of the Internet-standard
                Network Management Framework.
                SNMP-COMMUNITY-MIB.snmpCommunityContextName";
         }
         leaf target-tag {
           type snmp:tag-value;
           description
             "Used to limit access for this community to the specified
              targets.

              Implementations MAY restrict the values of this leaf
              to be one of the available values of /snmp/target/tag in
              a valid configuration.";
           reference
             "RFC 3584: Coexistence between Version 1, Version 2,
                and Version 3 of the Internet-standard
                Network Management Framework.
                SNMP-COMMUNITY-MIB.snmpCommunityTransportTag";
         }
       }
     }

     grouping v1-target-params {
       container v1 {
         description
           "SNMPv1 parameters type.
            Represents snmpTargetParamsMPModel '0',



Bjorklund & Schoenwaelder    Standards Track                   [Page 47]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


            snmpTargetParamsSecurityModel '1', and
            snmpTargetParamsSecurityLevel 'noAuthNoPriv'.";
         leaf security-name {
           type snmp:security-name;
           mandatory true;
           description
             "Implementations MAY restrict the values of this leaf
              to be one of the available values of
              /snmp/community/security-name in a valid configuration.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-TARGET-MIB.snmpTargetParamsSecurityName";
         }
       }
     }

     grouping v2c-target-params {
       container v2c {
         description
           "SNMPv2 community parameters type.
            Represents snmpTargetParamsMPModel '1',
            snmpTargetParamsSecurityModel '2', and
            snmpTargetParamsSecurityLevel 'noAuthNoPriv'.";
         leaf security-name {
           type snmp:security-name;
           mandatory true;
           description
             "Implementations MAY restrict the values of this leaf
              to be one of the available values of
              /snmp/community/security-name in a valid configuration.";
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-TARGET-MIB.snmpTargetParamsSecurityName";
         }
       }
     }

     augment /snmp:snmp/snmp:target-params/snmp:params {
       case v1 {
         uses v1-target-params;
       }
       case v2c {
         uses v2c-target-params;
       }
     }




Bjorklund & Schoenwaelder    Standards Track                   [Page 48]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


     augment /snmp:snmp/snmp:target {
       when "snmp:v1 or snmp:v2c";
       leaf mms {
         type union {
           type enumeration {
             enum "unknown" { value 0; }
           }
           type int32 {
             range "484..max";
           }
         }
         default "484";
         description
           "The maximum message size.";
         reference
           "RFC 3584: Coexistence between Version 1, Version 2,
              and Version 3 of the Internet-standard
              Network Management Framework.
              SNMP-COMMUNITY-MIB.snmpTargetAddrMMS";
       }
     }

   }

   <CODE ENDS>

4.9.  Submodule 'ietf-snmp-vacm'

   <CODE BEGINS> file "ietf-snmp-vacm.yang"

   submodule ietf-snmp-vacm {

     belongs-to ietf-snmp {
       prefix snmp;
     }

     include ietf-snmp-common;

     organization
       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/netmod/>
        WG List:  <mailto:netmod@ietf.org>

        WG Chair: Thomas Nadeau
                  <mailto:tnadeau@lucidvision.com>




Bjorklund & Schoenwaelder    Standards Track                   [Page 49]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


        WG Chair: Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>

        Editor:   Martin Bjorklund
                  <mailto:mbj@tail-f.com>

        Editor:   Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>";

     description
       "This submodule contains a collection of YANG definitions
        for configuring the View-based Access Control Model (VACM)
        of SNMP.

        Copyright (c) 2014 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC 7407; see
        the RFC itself for full legal notices.";

     reference
       "RFC 3415: View-based Access Control Model (VACM) for the
          Simple Network Management Protocol (SNMP)";

     revision 2014-12-10 {
       description
         "Initial revision.";
       reference
         "RFC 7407: A YANG Data Model for SNMP Configuration";
     }

     typedef view-name {
       type snmp:identifier;
       description
         "The view-name type represents an SNMP VACM view name.";
     }

     typedef group-name {
       type snmp:identifier;
       description
         "The group-name type represents an SNMP VACM group name.";



Bjorklund & Schoenwaelder    Standards Track                   [Page 50]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


     }

     augment /snmp:snmp {

       container vacm {
         description
           "Configuration of the View-based Access Control Model.";

         list group {
           key name;
           description
             "VACM groups.

              This data model has a different structure than the MIB.
              Groups are explicitly defined in this list, and group
              members are defined in the 'member' list (mapped to
              vacmSecurityToGroupTable), and access for the group is
              defined in the 'access' list (mapped to
              vacmAccessTable).";
           reference
             "RFC 3415: View-based Access Control Model (VACM) for the
                Simple Network Management Protocol (SNMP).
                SNMP-VIEW-BASED-ACM-MIB.vacmSecurityToGroupTable
                SNMP-VIEW-BASED-ACM-MIB.vacmAccessTable";

           leaf name {
             type group-name;
             description
               "The name of this VACM group.";
             reference
               "RFC 3415: View-based Access Control Model (VACM) for the
                  Simple Network Management Protocol (SNMP).
                  SNMP-VIEW-BASED-ACM-MIB.vacmGroupName";
           }

           list member {
             key "security-name";
             description
               "A member of this VACM group.

                A specific combination of security-name and
                security-model MUST NOT be present in more than
                one group.";
             reference
               "RFC 3415: View-based Access Control Model (VACM) for the
                  Simple Network Management Protocol (SNMP).
                  SNMP-VIEW-BASED-ACM-MIB.vacmSecurityToGroupTable";




Bjorklund & Schoenwaelder    Standards Track                   [Page 51]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


             leaf security-name {
               type snmp:security-name;
               description
                 "The securityName of a group member.";
               reference
                 "RFC 3415: View-based Access Control Model (VACM) for
                    the Simple Network Management Protocol (SNMP).
                    SNMP-VIEW-BASED-ACM-MIB.vacmSecurityName";
             }

             leaf-list security-model {
               type snmp:security-model;
               min-elements 1;
               description
                 "The security models under which this security-name
                  is a member of this group.";
               reference
                 "RFC 3415: View-based Access Control Model (VACM) for
                    the Simple Network Management Protocol (SNMP).
                    SNMP-VIEW-BASED-ACM-MIB.vacmSecurityModel";
             }
           }

           list access {
             key "context security-model security-level";
             description
               "Definition of access right for groups.";
             reference
               "RFC 3415: View-based Access Control Model (VACM) for
                  the Simple Network Management Protocol (SNMP).
                  SNMP-VIEW-BASED-ACM-MIB.vacmAccessTable";

             leaf context {
               type snmp:context-name;
               description
                 "The context (prefix) under which the access rights
                  apply.";
               reference
                 "RFC 3415: View-based Access Control Model (VACM) for
                    the Simple Network Management Protocol (SNMP).
                    SNMP-VIEW-BASED-ACM-MIB.vacmAccessContextPrefix";
             }

             leaf context-match {
               type enumeration {
                 enum exact { value 1; }
                 enum prefix { value 2; }
               }



Bjorklund & Schoenwaelder    Standards Track                   [Page 52]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


               default exact;
               reference
                 "RFC 3415: View-based Access Control Model (VACM) for
                    the Simple Network Management Protocol (SNMP).
                    SNMP-VIEW-BASED-ACM-MIB.vacmAccessContextMatch";
             }

             leaf security-model {
               type snmp:security-model-or-any;
               description
                 "The security model under which the access rights
                 apply.";
               reference
                 "RFC 3415: View-based Access Control Model (VACM) for
                    the Simple Network Management Protocol (SNMP).
                    SNMP-VIEW-BASED-ACM-MIB.vacmAccessSecurityModel";
             }

             leaf security-level {
               type snmp:security-level;
               description
                 "The minimum security level under which the access
                  rights apply.";
               reference
                 "RFC 3415: View-based Access Control Model (VACM) for
                    the Simple Network Management Protocol (SNMP).
                    SNMP-VIEW-BASED-ACM-MIB.vacmAccessSecurityLevel";
             }

             leaf read-view {
               type view-name;
               description
                 "The name of the MIB view of the SNMP context
                  authorizing read access.  If this leaf does not
                  exist in a configuration, it maps to a zero-length
                  vacmAccessReadViewName.

                  Implementations MAY restrict the values of this
                  leaf to be one of the available values of
                  /snmp/vacm/view/name in a valid configuration.";
               reference
                 "RFC 3415: View-based Access Control Model (VACM) for
                    the Simple Network Management Protocol (SNMP).
                    SNMP-VIEW-BASED-ACM-MIB.vacmAccessReadViewName";
             }

             leaf write-view {
               type view-name;



Bjorklund & Schoenwaelder    Standards Track                   [Page 53]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


               description
                 "The name of the MIB view of the SNMP context
                  authorizing write access.  If this leaf does not
                  exist in a configuration, it maps to a zero-length
                  vacmAccessWriteViewName.

                  Implementations MAY restrict the values of this
                  leaf to be one of the available values of
                  /snmp/vacm/view/name in a valid configuration.";
               reference
                 "RFC 3415: View-based Access Control Model (VACM) for
                    the Simple Network Management Protocol (SNMP).
                    SNMP-VIEW-BASED-ACM-MIB.vacmAccessWriteViewName";
             }

             leaf notify-view {
               type view-name;
               description
                 "The name of the MIB view of the SNMP context
                  authorizing notify access.  If this leaf does not
                  exist in a configuration, it maps to a zero-length
                  vacmAccessNotifyViewName.

                  Implementations MAY restrict the values of this
                  leaf to be one of the available values of
                  /snmp/vacm/view/name in a valid configuration.";
               reference
                 "RFC 3415: View-based Access Control Model (VACM) for
                      the Simple Network Management Protocol (SNMP).
                      SNMP-VIEW-BASED-ACM-MIB.vacmAccessNotifyViewName";
             }
           }
         }

         list view {
           key name;
           description
             "Definition of MIB views.";
           reference
             "RFC 3415: View-based Access Control Model (VACM) for
                the Simple Network Management Protocol (SNMP).
                SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilyTable";

           leaf name {
             type view-name;
             description
               "The name of this VACM MIB view.";




Bjorklund & Schoenwaelder    Standards Track                   [Page 54]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


             reference
               "RFC 3415: View-based Access Control Model (VACM) for
                  the Simple Network Management Protocol (SNMP).
                  SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilyName";
           }

           leaf-list include {
             type snmp:wildcard-object-identifier;
             description
               "A family of subtrees included in this MIB view.";
             reference
                 "RFC 3415: View-based Access Control Model (VACM) for
                    the Simple Network Management Protocol (SNMP).
                    SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilySubtree
                    SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilyMask
                    SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilyType";
           }

           leaf-list exclude {
             type snmp:wildcard-object-identifier;
             description
               "A family of subtrees excluded from this MIB view.";
             reference
               "RFC 3415: View-based Access Control Model (VACM) for
                  the Simple Network Management Protocol (SNMP).
                  SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilySubtree
                  SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilyMask
                  SNMP-VIEW-BASED-ACM-MIB.vacmViewTreeFamilyType";
           }
         }
       }
     }
   }

   <CODE ENDS>

4.10.  Submodule 'ietf-snmp-usm'

   This YANG submodule imports YANG extensions from [RFC6536].

   <CODE BEGINS> file "ietf-snmp-usm.yang"

   submodule ietf-snmp-usm {

     belongs-to ietf-snmp {
       prefix snmp;
     }




Bjorklund & Schoenwaelder    Standards Track                   [Page 55]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


     import ietf-yang-types {
       prefix yang;
     }
     import ietf-netconf-acm {
       prefix nacm;
     }

     include ietf-snmp-common;
     include ietf-snmp-target;
     include ietf-snmp-proxy;

     organization
       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/netmod/>
        WG List:  <mailto:netmod@ietf.org>

        WG Chair: Thomas Nadeau
                  <mailto:tnadeau@lucidvision.com>

        WG Chair: Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>

        Editor:   Martin Bjorklund
                  <mailto:mbj@tail-f.com>

        Editor:   Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>";

     description
       "This submodule contains a collection of YANG definitions for
        configuring the User-based Security Model (USM) of SNMP.

        Copyright (c) 2014 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC 7407; see
        the RFC itself for full legal notices.";





Bjorklund & Schoenwaelder    Standards Track                   [Page 56]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


     reference
       "RFC 3414: User-based Security Model (USM) for version 3 of the
          Simple Network Management Protocol (SNMPv3)";

     revision 2014-12-10 {
       description
         "Initial revision.";
       reference
         "RFC 7407: A YANG Data Model for SNMP Configuration";
     }

     grouping key {
       leaf key {
         type yang:hex-string;
         mandatory true;
         nacm:default-deny-all;
         description
           "Localized key specified as a list of colon-specified
            hexadecimal octets.";
       }
     }

     grouping user-list {
       list user {
         key "name";

         reference
           "RFC 3414: User-based Security Model (USM) for version 3
              of the Simple Network Management Protocol (SNMPv3).
              SNMP-USER-BASED-SM-MIB.usmUserTable";

         leaf name {
           type snmp:identifier;
           reference
             "RFC 3414: User-based Security Model (USM) for version 3
                of the Simple Network Management Protocol (SNMPv3).
                SNMP-USER-BASED-SM-MIB.usmUserName";
         }
         container auth {
           presence "enables authentication";
           description
             "Enables authentication of the user.";
           choice protocol {
             mandatory true;
             reference
               "RFC 3414: User-based Security Model (USM) for version 3
                  of the Simple Network Management Protocol (SNMPv3).
                  SNMP-USER-BASED-SM-MIB.usmUserAuthProtocol";



Bjorklund & Schoenwaelder    Standards Track                   [Page 57]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


             container md5 {
               uses key;
               reference
                 "RFC 3414: User-based Security Model (USM) for
                    version 3 of the Simple Network Management Protocol
                    (SNMPv3).
                    SNMP-USER-BASED-SM-MIB.usmHMACMD5AuthProtocol";
             }
             container sha {
               uses key;
               reference
                 "RFC 3414: User-based Security Model (USM) for
                    version 3 of the Simple Network Management Protocol
                    (SNMPv3).
                    SNMP-USER-BASED-SM-MIB.usmHMACSHAAuthProtocol";
             }
           }
         }
         container priv {
           must "../auth" {
             error-message
               "when privacy (confidentiality) is used, "
             + "authentication must also be used";
           }
           presence "enables encryption";
           description
             "Enables encryption of SNMP messages.";

           choice protocol {
             mandatory true;
             reference
               "RFC 3414: User-based Security Model (USM) for version 3
                  of the Simple Network Management Protocol (SNMPv3).
                  SNMP-USER-BASED-SM-MIB.usmUserPrivProtocol";
             container des {
               uses key;
               reference
                 "RFC 3414: User-based Security Model (USM) for
                    version 3 of the Simple Network Management Protocol
                    (SNMPv3).
                    SNMP-USER-BASED-SM-MIB.usmDESPrivProtocol";
             }
             container aes {
               uses key;







Bjorklund & Schoenwaelder    Standards Track                   [Page 58]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


               reference
                 "RFC 3826: The Advanced Encryption Standard (AES)
                    Cipher Algorithm in the SNMP User-based Security
                    Model.
                    SNMP-USM-AES-MIB.usmAesCfb128Protocol";
             }
           }
         }
       }
     }

     augment /snmp:snmp {

       container usm {
         description
           "Configuration of the User-based Security Model.";
         container local {
           uses user-list;
         }

         list remote {
           key "engine-id";

           leaf engine-id {
             type snmp:engine-id;
             reference
               "RFC 3414: User-based Security Model (USM) for version 3
                  of the Simple Network Management Protocol (SNMPv3).
                  SNMP-USER-BASED-SM-MIB.usmUserEngineID";
           }

           uses user-list;
         }
       }
     }

     grouping usm-target-params {
       container usm {
         description
           "User-based SNMPv3 parameters type.

            Represents snmpTargetParamsMPModel '3' and
            snmpTargetParamsSecurityModel '3'.";
         leaf user-name {
           type snmp:security-name;
           mandatory true;





Bjorklund & Schoenwaelder    Standards Track                   [Page 59]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-TARGET-MIB.snmpTargetParamsSecurityName";
         }
         leaf security-level {
           type snmp:security-level;
           mandatory true;
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-TARGET-MIB.snmpTargetParamsSecurityLevel";
         }
       }
     }

     augment /snmp:snmp/snmp:target-params/snmp:params {
       case usm {
         uses usm-target-params;
       }
     }

   }

   <CODE ENDS>

4.11.  Submodule 'ietf-snmp-tsm'

   <CODE BEGINS> file "ietf-snmp-tsm.yang"

   submodule ietf-snmp-tsm {

     belongs-to ietf-snmp {
       prefix snmp;
     }

     include ietf-snmp-common;
     include ietf-snmp-target;
     include ietf-snmp-proxy;

     organization
       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/netmod/>
        WG List:  <mailto:netmod@ietf.org>





Bjorklund & Schoenwaelder    Standards Track                   [Page 60]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


        WG Chair: Thomas Nadeau
                  <mailto:tnadeau@lucidvision.com>

        WG Chair: Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>

        Editor:   Martin Bjorklund
                  <mailto:mbj@tail-f.com>

        Editor:   Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>";

     description
       "This submodule contains a collection of YANG definitions for
        configuring the Transport Security Model (TSM) of SNMP.

        Copyright (c) 2014 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC 7407; see
        the RFC itself for full legal notices.";

     reference
       "RFC 5591: Transport Security Model for the
          Simple Network Management Protocol (SNMP)";

     revision 2014-12-10 {
       description
         "Initial revision.";
       reference
         "RFC 7407: A YANG Data Model for SNMP Configuration";
     }

     feature tsm {
       description
         "A server implements this feature if it supports the
         Transport Security Model for SNMP.";
       reference
         "RFC 5591: Transport Security Model for the
            Simple Network Management Protocol (SNMP)";
     }



Bjorklund & Schoenwaelder    Standards Track                   [Page 61]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


     augment /snmp:snmp {
       if-feature tsm;
       container tsm {
         description
           "Configuration of the Transport Security Model.";

         leaf use-prefix {
           type boolean;
           default false;
           reference
             "RFC 5591: Transport Security Model for the Simple
                Network Management Protocol (SNMP).
                SNMP-TSM-MIB.snmpTsmConfigurationUsePrefix";
         }
       }
     }

     grouping tsm-target-params {
       container tsm {
         description
           "Transport-based security SNMPv3 parameters type.

            Represents snmpTargetParamsMPModel '3' and
            snmpTargetParamsSecurityModel '4'.";
         leaf security-name {
           type snmp:security-name;
           mandatory true;
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-TARGET-MIB.snmpTargetParamsSecurityName";
         }
         leaf security-level {
           type snmp:security-level;
           mandatory true;
           reference
             "RFC 3413: Simple Network Management Protocol (SNMP).
                Applications.
                SNMP-TARGET-MIB.snmpTargetParamsSecurityLevel";
         }
       }
     }

     augment /snmp:snmp/snmp:target-params/snmp:params {
       if-feature tsm;
       case tsm {
         uses tsm-target-params;
       }



Bjorklund & Schoenwaelder    Standards Track                   [Page 62]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


     }

   }

   <CODE ENDS>

4.12.  Submodule 'ietf-snmp-tls'

   <CODE BEGINS> file "ietf-snmp-tls.yang"

   submodule ietf-snmp-tls {

     belongs-to ietf-snmp {
       prefix snmp;
     }

     import ietf-inet-types {
       prefix inet;
     }
     import ietf-x509-cert-to-name {
       prefix x509c2n;
     }

     include ietf-snmp-common;
     include ietf-snmp-engine;
     include ietf-snmp-target;

     organization
       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/netmod/>
        WG List:  <mailto:netmod@ietf.org>

        WG Chair: Thomas Nadeau
                  <mailto:tnadeau@lucidvision.com>

        WG Chair: Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>

        Editor:   Martin Bjorklund
                  <mailto:mbj@tail-f.com>

        Editor:   Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>";






Bjorklund & Schoenwaelder    Standards Track                   [Page 63]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


     description
       "This submodule contains a collection of YANG definitions for
        configuring the Transport Layer Security Transport Model (TLSTM)
        of SNMP.

        Copyright (c) 2014 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC 7407; see
        the RFC itself for full legal notices.";

     reference
       "RFC 6353: Transport Layer Security (TLS) Transport Model for
          the Simple Network Management Protocol (SNMP)";

     revision 2014-12-10 {
       description
         "Initial revision.";
       reference
         "RFC 7407: A YANG Data Model for SNMP Configuration";
     }

     feature tlstm {
       description
         "A server implements this feature if it supports the
         Transport Layer Security Transport Model for SNMP.";
       reference
         "RFC 6353: Transport Layer Security (TLS) Transport Model for
            the Simple Network Management Protocol (SNMP)";
     }

     augment /snmp:snmp/snmp:engine/snmp:listen/snmp:transport {
       if-feature tlstm;
       case tls {
         container tls {
           description
             "A list of IPv4 and IPv6 addresses and ports to which the
              engine listens for SNMP messages over TLS.";






Bjorklund & Schoenwaelder    Standards Track                   [Page 64]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


           leaf ip {
             type inet:ip-address;
             mandatory true;
             description
               "The IPv4 or IPv6 address on which the engine listens
                for SNMP messages over TLS.";
           }
           leaf port {
             type inet:port-number;
             description
               "The TCP port on which the engine listens for SNMP
                messages over TLS.

                If the port is not configured, an engine that
                acts as a Command Responder uses port 10161, and
                an engine that acts as a Notification Receiver
                uses port 10162.";
           }
         }
       }
       case dtls {
         container dtls {
           description
             "A list of IPv4 and IPv6 addresses and ports to which the
              engine listens for SNMP messages over DTLS.";

           leaf ip {
             type inet:ip-address;
             mandatory true;
             description
               "The IPv4 or IPv6 address on which the engine listens
                for SNMP messages over DTLS.";
           }
           leaf port {
             type inet:port-number;
             description
               "The UDP port on which the engine listens for SNMP
                messages over DTLS.

                If the port is not configured, an engine that
                acts as a Command Responder uses port 10161, and
                an engine that acts as a Notification Receiver
                uses port 10162.";
           }
         }
       }
     }




Bjorklund & Schoenwaelder    Standards Track                   [Page 65]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


     augment /snmp:snmp {
       if-feature tlstm;
       container tlstm {
         uses x509c2n:cert-to-name {
           description
             "Defines how certificates are mapped to names.  The
              resulting name is used as a security name.";
           refine cert-to-name/map-type {
             description
               "Mappings that use the snmpTlstmCertToTSNData column
                need to augment the cert-to-name list with
                additional configuration objects corresponding
                to the snmpTlstmCertToTSNData value.  Such objects
                should use the 'when' statement to make them
                conditional based on the map-type.";
           }
         }
       }
     }

     grouping tls-transport {
       leaf ip {
         type inet:host;
         mandatory true;
         reference
           "RFC 3413: Simple Network Management Protocol (SNMP).
              Applications.
              SNMP-TARGET-MIB.snmpTargetAddrTAddress
            RFC 6353: Transport Layer Security (TLS) Transport Model
              for the Simple Network Management Protocol (SNMP).
              SNMP-TLS-TM-MIB.SnmpTLSAddress";
       }
       leaf port {
         type inet:port-number;
         default 10161;
         reference
           "RFC 3413: Simple Network Management Protocol (SNMP).
              Applications.
              SNMP-TARGET-MIB.snmpTargetAddrTAddress
            RFC 6353: Transport Layer Security (TLS) Transport Model
              for the Simple Network Management Protocol (SNMP).
              SNMP-TLS-TM-MIB.SnmpTLSAddress";
       }
       leaf client-fingerprint {
         type x509c2n:tls-fingerprint;
         reference
           "RFC 6353: Transport Layer Security (TLS) Transport Model
              for the Simple Network Management Protocol (SNMP).



Bjorklund & Schoenwaelder    Standards Track                   [Page 66]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


              SNMP-TLS-TM-MIB.snmpTlstmParamsClientFingerprint";
       }
       leaf server-fingerprint {
         type x509c2n:tls-fingerprint;
         reference
           "RFC 6353: Transport Layer Security (TLS) Transport Model
              for the Simple Network Management Protocol (SNMP).
              SNMP-TLS-TM-MIB.snmpTlstmAddrServerFingerprint";
       }
       leaf server-identity {
         type snmp:admin-string;
         reference
           "RFC 6353: Transport Layer Security (TLS) Transport Model
              for the Simple Network Management Protocol (SNMP).
              SNMP-TLS-TM-MIB.snmpTlstmAddrServerIdentity";
       }
     }

     augment /snmp:snmp/snmp:target/snmp:transport {
       if-feature tlstm;
       case tls {
         reference
           "RFC 6353: Transport Layer Security (TLS) Transport Model
              for the Simple Network Management Protocol (SNMP).
              SNMP-TLS-TM-MIB.snmpTLSTCPDomain";
         container tls {
           uses tls-transport;
         }
       }
     }

     augment /snmp:snmp/snmp:target/snmp:transport {
       if-feature tlstm;
       case dtls {
         reference
           "RFC 6353: Transport Layer Security (TLS) Transport Model
              for the Simple Network Management Protocol (SNMP).
              SNMP-TLS-TM-MIB.snmpDTLSUDPDomain";
         container dtls {
           uses tls-transport;
         }
       }
     }
   }

   <CODE ENDS>





Bjorklund & Schoenwaelder    Standards Track                   [Page 67]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


4.13.  Submodule 'ietf-snmp-ssh'

   <CODE BEGINS> file "ietf-snmp-ssh.yang"

   submodule ietf-snmp-ssh {

     belongs-to ietf-snmp {
       prefix snmp;
     }

     import ietf-inet-types {
       prefix inet;
     }

     include ietf-snmp-common;
     include ietf-snmp-engine;
     include ietf-snmp-target;

     organization
       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

     contact
       "WG Web:   <http://tools.ietf.org/wg/netmod/>
        WG List:  <mailto:netmod@ietf.org>

        WG Chair: Thomas Nadeau
                  <mailto:tnadeau@lucidvision.com>

        WG Chair: Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>

        Editor:   Martin Bjorklund
                  <mailto:mbj@tail-f.com>

        Editor:   Juergen Schoenwaelder
                  <mailto:j.schoenwaelder@jacobs-university.de>";

     description
       "This submodule contains a collection of YANG definitions for
        configuring the Secure Shell Transport Model (SSHTM)
        of SNMP.

        Copyright (c) 2014 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Simplified BSD License



Bjorklund & Schoenwaelder    Standards Track                   [Page 68]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC 7407; see
        the RFC itself for full legal notices.";

     reference
       "RFC 5592: Secure Shell Transport Model for the
          Simple Network Management Protocol (SNMP)";

     revision 2014-12-10 {
       description
         "Initial revision.";
       reference
         "RFC 7407: A YANG Data Model for SNMP Configuration";
     }

     feature sshtm {
       description
         "A server implements this feature if it supports the
         Secure Shell Transport Model for SNMP.";
       reference
         "RFC 5592: Secure Shell Transport Model for the
            Simple Network Management Protocol (SNMP)";
     }

     augment /snmp:snmp/snmp:engine/snmp:listen/snmp:transport {
       if-feature sshtm;
       case ssh {
         container ssh {
           description
             "The IPv4 or IPv6 address and port to which the
              engine listens for SNMP messages over SSH.";

           leaf ip {
             type inet:ip-address;
             mandatory true;
             description
               "The IPv4 or IPv6 address on which the engine listens
                for SNMP messages over SSH.";
           }
           leaf port {
             type inet:port-number;
             description
               "The TCP port on which the engine listens for SNMP
                messages over SSH.




Bjorklund & Schoenwaelder    Standards Track                   [Page 69]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


                If the port is not configured, an engine that
                acts as a Command Responder uses port 5161, and
                an engine that acts as a Notification Receiver
                uses port 5162.";
           }
         }
       }
     }

     augment /snmp:snmp/snmp:target/snmp:transport {
       if-feature sshtm;
       case ssh {
         reference
           "RFC 5592: Secure Shell Transport Model for the
              Simple Network Management Protocol (SNMP).
              SNMP-SSH-TM-MIB.snmpSSHDomain";
         container ssh {
           leaf ip {
             type inet:host;
             mandatory true;
             reference
               "RFC 3413: Simple Network Management Protocol (SNMP).
                  Applications.
                  SNMP-TARGET-MIB.snmpTargetAddrTAddress
                RFC 5592: Secure Shell Transport Model for the
                  Simple Network Management Protocol (SNMP).
                  SNMP-SSH-TM-MIB.SnmpSSHAddress";
           }
           leaf port {
             type inet:port-number;
             default 5161;
             reference
               "RFC 3413: Simple Network Management Protocol (SNMP).
                  Applications.
                  SNMP-TARGET-MIB.snmpTargetAddrTAddress
                RFC 5592: Secure Shell Transport Model for the
                  Simple Network Management Protocol (SNMP).
                  SNMP-SSH-TM-MIB.SnmpSSHAddress";
           }
           leaf username {
             type string;
             reference
               "RFC 3413: Simple Network Management Protocol (SNMP).
                  Applications.
                  SNMP-TARGET-MIB.snmpTargetAddrTAddress
                RFC 5592: Secure Shell Transport Model for the
                  Simple Network Management Protocol (SNMP).
                  SNMP-SSH-TM-MIB.SnmpSSHAddress";



Bjorklund & Schoenwaelder    Standards Track                   [Page 70]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


           }
         }
       }
     }
   }


   <CODE ENDS>

5.  IANA Considerations

   This document registers two URIs in the "IETF XML Registry"
   [RFC3688].  Following the format in RFC 3688, the following
   registrations have been made.

        URI: urn:ietf:params:xml:ns:yang:ietf-snmp
        Registrant Contact: The NETMOD WG of the IETF.
        XML: N/A, the requested URI is an XML namespace.

        URI: urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name
        Registrant Contact: The NETMOD WG of the IETF.
        XML: N/A, the requested URI is an XML namespace.

   This document registers the following YANG modules in the "YANG
   Module Names" registry [RFC6020].

        name:         ietf-snmp
        namespace:    urn:ietf:params:xml:ns:yang:ietf-snmp
        prefix:       snmp
        reference:    RFC 7407

        name:         ietf-x509-cert-to-name
        namespace:    urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name
        prefix:       x509c2n
        reference:    RFC 7407
   The document registers the following YANG submodules in the "YANG
   Module Names" registry [RFC6020].

        name:         ietf-snmp-common
        parent:       ietf-snmp
        reference:    RFC 7407

        name:         ietf-snmp-engine
        parent:       ietf-snmp
        reference:    RFC 7407






Bjorklund & Schoenwaelder    Standards Track                   [Page 71]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


        name:         ietf-snmp-community
        parent:       ietf-snmp
        reference:    RFC 7407

        name:         ietf-snmp-notification
        parent:       ietf-snmp
        reference:    RFC 7407

        name:         ietf-snmp-target
        parent:       ietf-snmp
        reference:    RFC 7407

        name:         ietf-snmp-vacm
        parent:       ietf-snmp
        reference:    RFC 7407

        name:         ietf-snmp-usm
        parent:       ietf-snmp
        reference:    RFC 7407

        name:         ietf-snmp-tsm
        parent:       ietf-snmp
        reference:    RFC 7407

        name:         ietf-snmp-tls
        parent:       ietf-snmp
        reference:    RFC 7407

        name:         ietf-snmp-ssh
        parent:       ietf-snmp
        reference:    RFC 7407

6.  Security Considerations

   The YANG module and submodules defined in this memo are designed to
   be accessed via the NETCONF protocol [RFC6241].  The lowest NETCONF
   layer is the secure transport layer and the mandatory to implement
   secure transport is SSH [RFC6242].  The NETCONF access control model
   [RFC6536] provides the means to restrict access for particular
   NETCONF users to a pre-configured subset of all available NETCONF
   protocol operations and content.

   There are a number of data nodes defined in the YANG module and
   submodules which are writable/creatable/deletable (i.e., config true,
   which is the default).  These data nodes may be considered sensitive
   or vulnerable in some network environments.  Write operations (e.g.,





Bjorklund & Schoenwaelder    Standards Track                   [Page 72]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


   edit-config) to these data nodes without proper protection can have a
   negative effect on network operations.  These are the subtrees and
   data nodes and their sensitivity/vulnerability:

   o  The "/snmp/engine" subtree contains the configuration of general
      parameters of an SNMP engine such as the endpoints to listen on,
      the transports and SNMP versions enabled, or the engine's
      identity.  Write access to this subtree should only be granted to
      entities configuring general SNMP engine parameters.

   o  The "/snmp/target" subtree contains the configuration of SNMP
      targets and, in particular, which transports to use and their
      security parameters.  Write access to this subtree should only be
      granted to the security administrator and entities configuring
      SNMP notification forwarding behavior.

   o  The "/snmp/notify" and "/snmp/notify-filter-profile" subtrees
      contain the configuration for the SNMP notification forwarding and
      filtering mechanism.  Write access to these subtrees should only
      be granted to entities configuring SNMP notification forwarding
      behavior.

   o  The "/snmp/proxy" subtree contains the configuration for SNMP
      proxies.  Write access to this subtree should only be granted to
      entities configuring SNMP proxies.

   o  The "/snmp/community" subtree contains the configuration of the
      Community-based Security Model.  Write access to this subtree
      should only be granted to the security administrator.

   o  The "/snmp/usm" subtree contains the configuration of the User-
      based Security Model.  Write access to this subtree should only be
      granted to the security administrator.

   o  The "/snmp/tsm" subtree contains the configuration of the
      Transport Layer Security (TLS) Transport Model for SNMP.  Write
      access to this subtree should only be granted to the security
      administrator.

   o  The "/snmp/tlstm" subtree contains the configuration of the SNMP
      transport over (D)TLS and, in particular, the configuration of how
      certificates are mapped to SNMP security names.  Write access to
      this subtree should only be granted to the security administrator.

   o  The "/snmp/vacm" subtree contains the configuration of the View-
      based Access Control Model used by SNMP to authorize access to
      management information via SNMP.  Write access to this subtree
      should only be granted to the security administrator.



Bjorklund & Schoenwaelder    Standards Track                   [Page 73]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


   Some of the readable data nodes in the YANG module and submodules may
   be considered sensitive or vulnerable in some network environments.
   It is thus important to control read access (e.g., via get, get-
   config, or notification) to these data nodes.  These are the subtrees
   and data nodes and their sensitivity/vulnerability:

   o  The "/snmp/engine" subtree exposes general information about an
      SNMP engine such as which version(s) of SNMP are enabled or which
      transports are enabled.

   o  The "/snmp/target" subtree exposes information about which
      transports are used to reach certain SNMP targets and which
      transport-specific parameters are used.

   o  The "/snmp/notify" and "/snmp/notify-filter-profile" subtrees
      expose information about how notifications are filtered and
      forwarded to notification targets.

   o  The "/snmp/proxy" subtree exposes information about proxy
      relationships.

   o  The "/snmp/community", "/snmp/usm", "/snmp/tsm", "/snmp/tlstm",
      and "/snmp/vacm" subtrees are specifically sensitive since they
      expose information about the authentication and authorization
      policy used by an SNMP engine.

   Changes to the SNMP access control rules should be done in an atomic
   way (through a single edit-config or a single commit), or care must
   be taken that they are done in a sequence that does not temporarily
   open access to resources.  Implementations supporting SNMP write
   access must ensure that any SNMP access control rule changes over
   NETCONF are also atomic to the SNMP instrumentation.  In particular,
   changes involving an internal delete/create cycle (e.g., to move a
   user to a different group) must be done with sufficient protections
   such that even a power fail immediately after the delete does not
   leave the administrator locked out.

   Security administrators need to ensure that NETCONF access control
   rules and SNMP access control rules implement a consistent security
   policy.  Specifically, the SNMP access control rules should prevent
   accidental leakage of sensitive security parameters such as community
   strings.  See the Security Considerations section of [RFC3584] for
   further details.








Bjorklund & Schoenwaelder    Standards Track                   [Page 74]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


7.  References

7.1.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997,
              <http://www.rfc-editor.org/info/rfc2119>.

   [RFC6020]  Bjorklund, M., "YANG - A Data Modeling Language for the
              Network Configuration Protocol (NETCONF)", RFC 6020,
              October 2010, <http://www.rfc-editor.org/info/rfc6020>.

   [RFC6241]  Enns, R., Bjorklund, M., Schoenwaelder, J., and A.
              Bierman, "Network Configuration Protocol (NETCONF)", RFC
              6241, June 2011, <http://www.rfc-editor.org/info/rfc6241>.

   [RFC6242]  Wasserman, M., "Using the NETCONF Protocol over Secure
              Shell (SSH)", RFC 6242, June 2011,
              <http://www.rfc-editor.org/info/rfc6242>.

   [RFC6536]  Bierman, A. and M. Bjorklund, "Network Configuration
              Protocol (NETCONF) Access Control Model", RFC 6536, March
              2012, <http://www.rfc-editor.org/info/rfc6536>.

   [RFC6991]  Schoenwaelder, J., "Common YANG Data Types", RFC 6991,
              July 2013, <http://www.rfc-editor.org/info/rfc6991>.

7.2.  Informative References

   [RFC3411]  Harrington, D., Presuhn, R., and B. Wijnen, "An
              Architecture for Describing Simple Network Management
              Protocol (SNMP) Management Frameworks", STD 62, RFC 3411,
              December 2002, <http://www.rfc-editor.org/info/rfc3411>.

   [RFC3412]  Case, J., Harrington, D., Presuhn, R., and B. Wijnen,
              "Message Processing and Dispatching for the Simple Network
              Management Protocol (SNMP)", STD 62, RFC 3412, December
              2002, <http://www.rfc-editor.org/info/rfc3412>.

   [RFC3413]  Levi, D., Meyer, P., and B. Stewart, "Simple Network
              Management Protocol (SNMP) Applications", STD 62, RFC
              3413, December 2002,
              <http://www.rfc-editor.org/info/rfc3413>.

   [RFC3414]  Blumenthal, U. and B. Wijnen, "User-based Security Model
              (USM) for version 3 of the Simple Network Management
              Protocol (SNMPv3)", STD 62, RFC 3414, December 2002,
              <http://www.rfc-editor.org/info/rfc3414>.



Bjorklund & Schoenwaelder    Standards Track                   [Page 75]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


   [RFC3415]  Wijnen, B., Presuhn, R., and K. McCloghrie, "View-based
              Access Control Model (VACM) for the Simple Network
              Management Protocol (SNMP)", STD 62, RFC 3415, December
              2002, <http://www.rfc-editor.org/info/rfc3415>.

   [RFC3417]  Presuhn, R., "Transport Mappings for the Simple Network
              Management Protocol (SNMP)", STD 62, RFC 3417, December
              2002, <http://www.rfc-editor.org/info/rfc3417>.

   [RFC3418]  Presuhn, R., "Management Information Base (MIB) for the
              Simple Network Management Protocol (SNMP)", STD 62, RFC
              3418, December 2002,
              <http://www.rfc-editor.org/info/rfc3418>.

   [RFC3419]  Daniele, M. and J. Schoenwaelder, "Textual Conventions for
              Transport Addresses", RFC 3419, December 2002,
              <http://www.rfc-editor.org/info/rfc3419>.

   [RFC3584]  Frye, R., Levi, D., Routhier, S., and B. Wijnen,
              "Coexistence between Version 1, Version 2, and Version 3
              of the Internet-standard Network Management Framework",
              BCP 74, RFC 3584, August 2003,
              <http://www.rfc-editor.org/info/rfc3584>.

   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
              January 2004, <http://www.rfc-editor.org/info/rfc3688>.

   [RFC3826]  Blumenthal, U., Maino, F., and K. McCloghrie, "The
              Advanced Encryption Standard (AES) Cipher Algorithm in the
              SNMP User-based Security Model", RFC 3826, June 2004,
              <http://www.rfc-editor.org/info/rfc3826>.

   [RFC5591]  Harrington, D. and W. Hardaker, "Transport Security Model
              for the Simple Network Management Protocol (SNMP)", STD
              78, RFC 5591, June 2009,
              <http://www.rfc-editor.org/info/rfc5591>.

   [RFC5592]  Harrington, D., Salowey, J., and W. Hardaker, "Secure
              Shell Transport Model for the Simple Network Management
              Protocol (SNMP)", RFC 5592, June 2009,
              <http://www.rfc-editor.org/info/rfc5592>.

   [RFC6353]  Hardaker, W., "Transport Layer Security (TLS) Transport
              Model for the Simple Network Management Protocol (SNMP)",
              STD 78, RFC 6353, July 2011,
              <http://www.rfc-editor.org/info/rfc6353>.





Bjorklund & Schoenwaelder    Standards Track                   [Page 76]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


   [RFC6643]  Schoenwaelder, J., "Translation of Structure of Management
              Information Version 2 (SMIv2) MIB Modules to YANG
              Modules", RFC 6643, July 2012,
              <http://www.rfc-editor.org/info/rfc6643>.















































Bjorklund & Schoenwaelder    Standards Track                   [Page 77]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


Appendix A.  Example Configurations

A.1.  Engine Configuration Example

   Below is an XML instance document showing a configuration of an SNMP
   engine listening on UDP port 161 on IPv4 and IPv6 endpoints and
   accepting SNMPv2c and SNMPv3 messages.

   <snmp xmlns="urn:ietf:params:xml:ns:yang:ietf-snmp">
     <engine>
       <enabled>true</enabled>
       <listen>
         <name>all-ipv4-udp</name>
         <udp>
           <ip>0.0.0.0</ip>
           <port>161</port>
         </udp>
       </listen>
       <listen>
         <name>all-ipv6-udp</name>
         <udp>
           <ip>::</ip>
           <port>161</port>
         </udp>
       </listen>
       <version>
         <v2c/>
         <v3/>
       </version>
       <engine-id>80:00:02:b8:04:61:62:63</engine-id>
     </engine>
   </snmp>

A.2.  Community Configuration Example

   Below is an XML instance document showing a configuration that maps
   the community name "public" to the security-name "community-public"
   on the local engine with the default context name.  The target tag
   "community-public-access" filters the access to this community name.

   <snmp xmlns="urn:ietf:params:xml:ns:yang:ietf-snmp">
     <community>
       <index>1</index>
       <text-name>public</text-name>
       <security-name>community-public</security-name>
       <target-tag>community-public-access</target-tag>
     </community>
     <target>



Bjorklund & Schoenwaelder    Standards Track                   [Page 78]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


       <name>management-station</name>
       <udp>
         <ip>2001:db8::abcd</ip>
         <port>161</port>
       </udp>
       <tag>blue</tag>
       <tag>community-public-access</tag>
       <target-params>v2c-public</target-params>
     </target>
     <target-params>
       <name>v2c-public</name>
       <v2c>
         <security-name>community-public</security-name>
       </v2c>
     </target-params>
   </snmp>

A.3.  User-Based Security Model Configuration Example

   Below is an XML instance document showing the configuration of a
   local user "joey" who has no authentication or privacy keys.  For the
   remote SNMP engine identified by the snmpEngineID
   '800002b804616263'H, two users are configured.  The user "matt" has a
   localized SHA authentication key, and the user "russ" has a localized
   SHA authentication key and an AES encryption key.

   <snmp xmlns="urn:ietf:params:xml:ns:yang:ietf-snmp">
     <usm>
       <local>
         <user>
           <name>joey</name>
         </user>
       </local>
       <remote>
         <engine-id>00:00:00:00:00:00:00:00:00:00:00:02</engine-id>
         <user>
           <name>matt</name>
           <auth>
             <sha>
               <!--
                   The 'key' value is split into two lines to conform to
                   the RFC formatting rules.
               -->
               <key>66:95:fe:bc:92:88:e3:62:82:23:
                    5f:c7:15:1f:12:84:97:b3:8f:3f</key>
             </sha>
           </auth>
         </user>



Bjorklund & Schoenwaelder    Standards Track                   [Page 79]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


         <user>
           <name>russ</name>
           <auth>
             <sha>
               <!--
                   The 'key' value is split into two lines to conform to
                   the RFC formatting rules.
               -->
               <key>66:95:fe:bc:92:88:e3:62:82:23:
                    5f:c7:15:1f:12:84:97:b3:8f:3f</key>
             </sha>
           </auth>
           <priv>
             <aes>
               <!--
                   The 'key' value is split into two lines to conform to
                   the RFC formatting rules.
               -->
               <key>66:95:fe:bc:92:88:e3:62:82:23:
                    5f:c7:15:1f:12:84</key>
             </aes>
           </priv>
         </user>
       </remote>
     </usm>
     <target>
       <name>bluebox</name>
       <udp>
         <ip>2001:db8::abcd</ip>
         <port>161</port>
       </udp>
       <tag>blue</tag>
       <target-params>matt-auth</target-params>
     </target>
     <target-params>
       <name>matt-auth</name>
       <usm>
         <user-name>matt</user-name>
         <security-level>auth-no-priv</security-level>
       </usm>
     </target-params>
   </snmp>









Bjorklund & Schoenwaelder    Standards Track                   [Page 80]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


A.4.  Target and Notification Configuration Example

   Below is an XML instance document showing the configuration of a
   notification generator application (see Appendix A of [RFC3413]).
   Note that the USM-specific objects are defined in the "ietf-snmp-usm"
   submodule.

   <snmp xmlns="urn:ietf:params:xml:ns:yang:ietf-snmp">
     <target>
       <name>addr1</name>
       <udp>
         <ip>192.0.2.3</ip>
         <port>162</port>
       </udp>
       <tag>group1</tag>
       <target-params>joe-auth</target-params>
     </target>
     <target>
       <name>addr2</name>
       <udp>
         <ip>192.0.2.6</ip>
         <port>162</port>
       </udp>
       <tag>group1</tag>
       <target-params>joe-auth</target-params>
     </target>
     <target>
       <name>addr3</name>
       <udp>
         <ip>192.0.2.9</ip>
         <port>162</port>
       </udp>
       <tag>group2</tag>
       <target-params>bob-priv</target-params>
     </target>
     <target-params>
       <name>joe-auth</name>
       <usm>
         <user-name>joe</user-name>
         <security-level>auth-no-priv</security-level>
       </usm>
     </target-params>
     <target-params>
       <name>bob-priv</name>
       <usm>
         <user-name>bob</user-name>
         <security-level>auth-priv</security-level>
       </usm>



Bjorklund & Schoenwaelder    Standards Track                   [Page 81]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


     </target-params>
     <notify>
       <name>group1</name>
       <tag>group1</tag>
       <type>trap</type>
     </notify>
     <notify>
       <name>group2</name>
       <tag>group2</tag>
       <type>trap</type>
     </notify>
   </snmp>

A.5.  Proxy Configuration Example

   Below is an XML instance document showing the configuration of a
   proxy forwarder application.  It proxies SNMPv2c messages from
   command generators to a file server running an SNMPv1 agent that
   recognizes two community strings, "private" and "public", with
   different associated read views.  The file server is represented as
   two "target" instances, one for each community string.

   If the proxy receives an SNMPv2c message with the community string
   "public" from a device in the "Office Network" or "Home Office
   Network", it gets tagged as "trusted", and the proxy uses the
   "private" community string when sending the message to the file
   server.  Other SNMPv2c messages with the community string "public"
   get tagged as "non-trusted", and the proxy uses the "public"
   community string for these messages.  There is also a special
   "backdoor" community string that can be used from any location to get
   "trusted" access.

   The "Office Network" and "Home Office Network" are represented as two
   "target" instances.  These "target" instances have target-params
   "none", which refers to a non-existing target-params entry.

   <snmp xmlns="urn:ietf:params:xml:ns:yang:ietf-snmp">
     <target>
       <name>File Server (private)</name>
       <udp>
         <ip>192.0.2.1</ip>
       </udp>
       <target-params>v1-private</target-params>
     </target>
     <target>
       <name>File Server (public)</name>
       <udp>
         <ip>192.0.2.1</ip>



Bjorklund & Schoenwaelder    Standards Track                   [Page 82]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


       </udp>
       <target-params>v1-public</target-params>
     </target>
     <target>
       <name>Office Network</name>
       <udp>
         <ip>192.0.2.0</ip>
         <prefix-length>24</prefix-length>
       </udp>
       <tag>office</tag>
       <target-params>none</target-params>
     </target>
     <target>
       <name>Home Office Network</name>
       <udp>
         <ip>203.0.113.0</ip>
         <prefix-length>24</prefix-length>
       </udp>
       <tag>home-office</tag>
       <target-params>none</target-params>
     </target>
     <target-params>
       <name>v1-private</name>
       <v1>
         <security-name>private</security-name>
       </v1>
     </target-params>
     <target-params>
       <name>v1-public</name>
       <v1>
         <security-name>public</security-name>
       </v1>
     </target-params>
     <target-params>
       <name>v2c-public</name>
       <v2c>
         <security-name>public</security-name>
       </v2c>
     </target-params>

     <!--
         Communities c1, c2, c3, and c4 are used for incoming messages
         that should be forwarded.

         Communities c3 and c5 are used for outgoing messages to the
         file server.
     -->
     <community>



Bjorklund & Schoenwaelder    Standards Track                   [Page 83]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


       <index>c1</index>
       <security-name>public</security-name>
       <engine-id>80:00:61:81:c8</engine-id>
       <context>trusted</context>
       <target-tag>office</target-tag>
     </community>
     <community>
       <index>c2</index>
       <security-name>public</security-name>
       <engine-id>80:00:61:81:c8</engine-id>
       <context>trusted</context>
       <target-tag>home-office</target-tag>
     </community>
     <community>
       <index>c3</index>
       <security-name>public</security-name>
       <engine-id>80:00:61:81:c8</engine-id>
       <context>not-trusted</context>
     </community>
     <community>
       <index>c4</index>
       <text-name>backdoor</text-name>
       <security-name>public</security-name>
       <engine-id>80:00:61:81:c8</engine-id>
       <context>trusted</context>
     </community>
     <community>
       <index>c5</index>
       <security-name>private</security-name>
       <engine-id>80:00:61:81:c8</engine-id>
       <context>trusted</context>
     </community>

     <proxy>
       <name>p1</name>
       <type>read</type>
       <context-engine-id>80:00:61:81:c8</context-engine-id>
       <context-name>trusted</context-name>
       <target-params-in>v2c-public</target-params-in>
       <single-target-out>File Server (private)</single-target-out>
     </proxy>
     <proxy>
       <name>p2</name>
       <type>read</type>
       <context-engine-id>80:00:61:81:c8</context-engine-id>
       <context-name>not-trusted</context-name>
       <target-params-in>v2c-public</target-params-in>
       <single-target-out>File Server (public)</single-target-out>



Bjorklund & Schoenwaelder    Standards Track                   [Page 84]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


     </proxy>
   </snmp>

   If an SNMPv2c Get request with community string "public" is received
   from an IP address tagged as "office" or "home-office", or if the
   request is received from anywhere else with community string
   "backdoor", the implied context is "trusted" so proxy entry "p1"
   matches.  The request is forwarded to the file server as SNMPv1 with
   community "private" using community table entry "c5" for outbound
   params lookup.

   If an SNMPv2c Get request with community string "public" is received
   from any other IP address, the implied context is "not-trusted" so
   proxy entry "p2" matches, and the request is forwarded to the file
   server as SNMPv1 with community "public".

A.6.  View-Based Access Control Model Configuration Example

   Below is an XML instance document showing the minimum-secure VACM
   configuration (see Appendix A of [RFC3415]).

   <snmp xmlns="urn:ietf:params:xml:ns:yang:ietf-snmp">
     <vacm>
       <group>
         <name>initial</name>
         <member>
           <security-name>initial</security-name>
           <security-model>usm</security-model>
         </member>
         <access>
           <context></context>
           <security-model>usm</security-model>
           <security-level>no-auth-no-priv</security-level>
           <read-view>restricted</read-view>
           <notify-view>restricted</notify-view>
         </access>
         <access>
           <context></context>
           <security-model>usm</security-model>
           <security-level>auth-no-priv</security-level>
           <read-view>internet</read-view>
           <write-view>internet</write-view>
           <notify-view>internet</notify-view>
         </access>
       </group>
       <view>
         <name>initial</name>
         <include>1.3.6.1</include>



Bjorklund & Schoenwaelder    Standards Track                   [Page 85]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


       </view>
       <view>
         <name>restricted</name>
         <include>1.3.6.1</include>
       </view>
     </vacm>
   </snmp>

   The following XML instance document shows the semi-secure VACM
   configuration (only the view configuration is different).

   <snmp xmlns="urn:ietf:params:xml:ns:yang:ietf-snmp">
     <vacm>
       <group>
         <name>initial</name>
         <member>
           <security-name>initial</security-name>
           <security-model>usm</security-model>
         </member>
         <access>
           <context></context>
           <security-model>usm</security-model>
           <security-level>no-auth-no-priv</security-level>
           <read-view>restricted</read-view>
           <notify-view>restricted</notify-view>
         </access>
         <access>
           <context></context>
           <security-model>usm</security-model>
           <security-level>auth-no-priv</security-level>
           <read-view>internet</read-view>
           <write-view>internet</write-view>
           <notify-view>internet</notify-view>
         </access>
       </group>
       <view>
         <name>initial</name>
         <include>1.3.6.1</include>
       </view>
       <view>
         <name>restricted</name>
         <include>1.3.6.1.2.1.1</include>
         <include>1.3.6.1.2.1.11</include>
         <include>1.3.6.1.6.3.10.2.1</include>
         <include>1.3.6.1.6.3.11.2.1</include>
         <include>1.3.6.1.6.3.15.1.1</include>
       </view>
     </vacm>



Bjorklund & Schoenwaelder    Standards Track                   [Page 86]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


   </snmp>

A.7.  Transport Layer Security Transport Model Configuration Example

   Below is an XML instance document showing the configuration of the
   mapping of certificate to security name (see Appendices A.2 and A.3
   of [RFC6353]).

   <snmp xmlns="urn:ietf:params:xml:ns:yang:ietf-snmp"
         xmlns:x509c2n=
           "urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name">
     <tlstm>
       <cert-to-name>
         <id>1</id>
         <fingerprint>11:0A:05:11:00</fingerprint>
         <map-type>x509c2n:san-any</map-type>
       </cert-to-name>
       <cert-to-name>
         <id>2</id>
         <fingerprint>11:0A:05:11:00</fingerprint>
         <map-type>x509c2n:specified</map-type>
         <name>
           Joe Cool
         </name>
       </cert-to-name>
     </tlstm>
   </snmp>
























Bjorklund & Schoenwaelder    Standards Track                   [Page 87]
^L
RFC 7407         YANG Data Model for SNMP Configuration    December 2014


Acknowledgments

   The authors want to thank Wes Hardaker and David Spakes for their
   detailed reviews.  Additional valuable comments were provided by
   David Harrington, Borislav Lukovic, and Randy Presuhn.

   Juergen Schoenwaelder was partly funded by Flamingo, a Network of
   Excellence project (ICT-318488) supported by the European Commission
   under its Seventh Framework Programme.

Authors' Addresses

   Martin Bjorklund
   Tail-f Systems

   EMail: mbj@tail-f.com


   Juergen Schoenwaelder
   Jacobs University

   EMail: j.schoenwaelder@jacobs-university.de





























Bjorklund & Schoenwaelder    Standards Track                   [Page 88]
^L