summaryrefslogtreecommitdiff
path: root/doc/rfc/rfc8347.txt
blob: 351dadd7401db40afc6f4c43b41dd719edb57ed2 (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
Internet Engineering Task Force (IETF)                       X. Liu, Ed.
Request for Comments: 8347                                   A. Kyparlis
Category: Standards Track                                          Jabil
ISSN: 2070-1721                                                R. Parikh
                                                                  VMware
                                                               A. Lindem
                                                           Cisco Systems
                                                                M. Zhang
                                                     Huawei Technologies
                                                              March 2018


  A YANG Data Model for the Virtual Router Redundancy Protocol (VRRP)

Abstract

   This document describes a data model for the Virtual Router
   Redundancy Protocol (VRRP).  Both versions 2 and 3 of VRRP are
   covered.

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

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

Copyright Notice

   Copyright (c) 2018 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
   (https://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.



Liu, et al.                  Standards Track                    [Page 1]
^L
RFC 8347                        YANG VRRP                     March 2018


Table of Contents

   1. Introduction ....................................................2
      1.1. Terminology ................................................2
      1.2. Tree Diagrams ..............................................3
      1.3. Prefixes in Data Node Names ................................3
   2. Design of the Data Model ........................................3
      2.1. Scope of the Model .........................................3
      2.2. Relationships with the Interface Model and IP Model ........4
      2.3. Protocol Configuration .....................................5
      2.4. Protocol States ............................................6
      2.5. Notifications ..............................................9
   3. Tree Structure .................................................10
   4. YANG Module ....................................................13
   5. IANA Considerations ............................................35
   6. Security Considerations ........................................36
   7. References .....................................................37
      7.1. Normative References ......................................37
      7.2. Informative References ....................................38
   Appendix A. Data Tree Example .....................................40
   Authors' Addresses ................................................45

1.  Introduction

   This document introduces a YANG data model [RFC6020] [RFC7950] for
   the Virtual Router Redundancy Protocol (VRRP) [RFC3768] [RFC5798].
   VRRP provides higher resiliency by specifying an election protocol
   that dynamically assigns responsibility for a virtual router to one
   of the VRRP routers on a LAN.

   The YANG module specified in this document supports both versions 2
   and 3 of VRRP.  VRRP version 2 (defined in [RFC3768]) supports IPv4.
   VRRP version 3 (defined in [RFC5798]) supports both IPv4 and IPv6.

1.1.  Terminology

   The key words "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] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.










Liu, et al.                  Standards Track                    [Page 2]
^L
RFC 8347                        YANG VRRP                     March 2018


   The following terms are defined in [RFC7950] and are not redefined
   here:

   o  augment

   o  data model

   o  data node

1.2.  Tree Diagrams

   A simplified graphical representation of the data model is used in
   this document.  The meaning of the symbols in these diagrams is
   defined in [RFC8340].

1.3.  Prefixes in Data Node Names

   In this document, names of data nodes, actions, and other data model
   objects are often used without a prefix, as long as it is clear from
   the context in which YANG module each name is defined.  Otherwise,
   names are prefixed using the standard prefix associated with the
   corresponding YANG module, as shown in Table 1.

                 +--------+-----------------+-----------+
                 | Prefix | YANG module     | Reference |
                 +--------+-----------------+-----------+
                 | yang   | ietf-yang-types | [RFC6991] |
                 | inet   | ietf-inet-types | [RFC6991] |
                 | if     | ietf-interfaces | [RFC8343] |
                 | ip     | ietf-ip         | [RFC8344] |
                 +--------+-----------------+-----------+

             Table 1: Prefixes and Corresponding YANG Modules

2.  Design of the Data Model

2.1.  Scope of the Model

   The model covers VRRP version 2 [RFC3768] and VRRP version 3
   [RFC5798].  The model is designed to be implemented on a device where
   VRRP version 2 or 3 is implemented.  With the help of a proper
   management protocol, the defined model can be used to:

   o  Configure VRRP version 2 or 3.

   o  Manage the protocol operational behavior.





Liu, et al.                  Standards Track                    [Page 3]
^L
RFC 8347                        YANG VRRP                     March 2018


   o  Retrieve the protocol operational status.

   o  Receive the protocol notifications.

2.2.  Relationships with the Interface Model and IP Model

   This model augments the interface data model "ietf-interfaces"
   [RFC8343] and the IP management model "ietf-ip" [RFC8344].  The
   augmentation relationships are shown as follows:

   module: ietf-interfaces
      +--rw interfaces
         +--rw interface* [name]
               ...
            +--rw ip:ipv4!
            |  +--rw ip:address* [ip]
                     ...
            |  +--rw vrrp:vrrp
            |     +--rw vrrp:vrrp-instance* [vrid]
            |        +--rw vrrp:vrid                            uint8
            |        +--rw vrrp:virtual-ipv4-addresses
                           ...
            +--rw ip:ipv6!
               +--rw ip:address* [ip]
                     ...
               +--rw vrrp:vrrp
                  +--rw vrrp:vrrp-instance* [vrid]
                     +--rw vrrp:vrid                            uint8
                     +--rw vrrp:virtual-ipv6-addresses
                           ...

   In the above figure, a tree node without a prefix is from the model
   "ietf-interfaces".  A tree node with prefix "ip:" is from the model
   "ietf-ip".  A tree node with prefix "vrrp:" is from the VRRP model
   specified in this document.

   The "vrrp" container contains a list of vrrp-instance nodes, which
   are instantiated under an interface for a specified address family
   (IPv4 or IPv6).

   Each vrrp-instance node represents a VRRP router state machine, as
   described in Section 6.4 of [RFC5798], providing the configuration
   and state information for the election process of a virtual router.
   The IP addresses on the augmented interface are the real addresses
   through which the VRRP router operates.  The IPv4 or IPv6 address or
   addresses associated with a virtual router (described in Section 1 of
   [RFC5798]) are modeled as a list of IPv4 or IPv6 addresses under the
   vrrp-instance.



Liu, et al.                  Standards Track                    [Page 4]
^L
RFC 8347                        YANG VRRP                     March 2018


2.3.  Protocol Configuration

   The model structure for the protocol configuration is as shown below:

     augment /if:interfaces/if:interface/ip:ipv4:
       +--rw vrrp
          +--rw vrrp-instance* [vrid]
             +--rw vrid                            uint8
             |     ...
             +--rw track
             |  +--rw interfaces
             |  |  +--rw interface* [interface]
             |  |     +--rw interface             if:interface-ref
             |  |           ...
             |  +--rw networks
             |     +--rw network* [prefix]
             |        +--rw prefix                inet:ipv4-prefix
             |              ...
             +--rw virtual-ipv4-addresses
                +--rw virtual-ipv4-address* [ipv4-address]
                   +--rw ipv4-address    inet:ipv4-address

     augment /if:interfaces/if:interface/ip:ipv6:
       +--rw vrrp
          +--rw vrrp-instance* [vrid]
             +--rw vrid                            uint8
             |     ...
             +--rw track
             |  +--rw interfaces
             |  |  +--rw interface* [interface]
             |  |     +--rw interface             if:interface-ref
             |  |           ...
             |  +--rw networks
             |     +--rw network* [prefix]
             |        +--rw prefix                inet:ipv6-prefix
             |              ...
             +--rw virtual-ipv6-addresses
                +--rw virtual-ipv6-address* [ipv6-address]
                   +--rw ipv6-address    inet:ipv6-address












Liu, et al.                  Standards Track                    [Page 5]
^L
RFC 8347                        YANG VRRP                     March 2018


   The model allows the following protocol entities to be configured:

   o  VRRP instance (version 2 or 3), representing a VRRP router.

   o  Virtual IPv4 or IPv6 address associated with a virtual router.

   o  Tracking interface, to detect interface connectivity failures.

   o  Tracking network, to detect network connectivity failures.

2.4.  Protocol States

   The model structure for the protocol states is as shown below:

   module: ietf-vrrp
       +--ro vrrp
          |     // global operational states
          +--ro virtual-routers?   uint32
          +--ro interfaces?        uint32
          +--ro statistics                 // global statistics
             +--ro discontinuity-datetime?   yang:date-and-time
             +--ro checksum-errors?          yang:counter64
             +--ro version-errors?           yang:counter64
             +--ro vrid-errors?              yang:counter64
             +--ro ip-ttl-errors?            yang:counter64

     augment /if:interfaces/if:interface/ip:ipv4:
       +--rw vrrp
          +--rw vrrp-instance* [vrid]
             +--rw vrid                            uint8
             |     ...
             +--rw track
             |  +--rw interfaces
             |  |  +--rw interface* [interface]
             |  |     +--rw interface             if:interface-ref
             |  |           ...
             |  +--rw networks
             |     +--rw network* [prefix]
             |        +--rw prefix                inet:ipv4-prefix
             |              ...











Liu, et al.                  Standards Track                    [Page 6]
^L
RFC 8347                        YANG VRRP                     March 2018


             +--rw virtual-ipv4-addresses
             |  +--rw virtual-ipv4-address* [ipv4-address]
             |     +--rw ipv4-address    inet:ipv4-address
             |
             |     // per-instance operational states
             +--ro state?                         identityref
             +--ro is-owner?                      boolean
             +--ro last-adv-source?               inet:ip-address
             +--ro up-datetime?                   yang:date-and-time
             +--ro master-down-interval?          uint32
             +--ro skew-time?                     uint32
             +--ro last-event?                    identityref
             +--ro new-master-reason?             new-master-reason-type
             +--ro statistics                // per-instance statistics
                +--ro discontinuity-datetime?    yang:date-and-time
                +--ro master-transitions?        yang:counter32
                +--ro advertisement-rcvd?        yang:counter64
                +--ro advertisement-sent?        yang:counter64
                +--ro interval-errors?           yang:counter64
                |       {validate-interval-errors}?
                +--ro priority-zero-pkts-rcvd?   yang:counter64
                +--ro priority-zero-pkts-sent?   yang:counter64
                +--ro invalid-type-pkts-rcvd?    yang:counter64
                +--ro address-list-errors?       yang:counter64
                |       {validate-address-list-errors}?
                +--ro packet-length-errors?      yang:counter64

     augment /if:interfaces/if:interface/ip:ipv6:
       +--rw vrrp
          +--rw vrrp-instance* [vrid]
             +--rw vrid                            uint8
             +     ...
             +--rw track
             |  +--rw interfaces
             |  |  +--rw interface* [interface]
             |  |     +--rw interface             if:interface-ref
             |  |           ...
             |  +--rw networks
             |     +--rw network* [prefix]
             |        +--rw prefix                inet:ipv6-prefix
             |              ...
             +--rw virtual-ipv6-addresses
             |  +--rw virtual-ipv6-address* [ipv6-address]
             |     +--rw ipv6-address    inet:ipv6-address
             |






Liu, et al.                  Standards Track                    [Page 7]
^L
RFC 8347                        YANG VRRP                     March 2018


             |     // per-instance operational states
             +--ro state?                         identityref
             +--ro is-owner?                      boolean
             +--ro last-adv-source?               inet:ip-address
             +--ro up-datetime?                   yang:date-and-time
             +--ro master-down-interval?          uint32
             +--ro skew-time?                     uint32
             +--ro last-event?                    identityref
             +--ro new-master-reason?             new-master-reason-type
             +--ro statistics                // per-instance statistics
                +--ro discontinuity-datetime?    yang:date-and-time
                +--ro master-transitions?        yang:counter32
                +--ro advertisement-rcvd?        yang:counter64
                +--ro advertisement-sent?        yang:counter64
                +--ro interval-errors?           yang:counter64
                |       {validate-interval-errors}?
                +--ro priority-zero-pkts-rcvd?   yang:counter64
                +--ro priority-zero-pkts-sent?   yang:counter64
                +--ro invalid-type-pkts-rcvd?    yang:counter64
                +--ro address-list-errors?       yang:counter64
                |       {validate-address-list-errors}?
                +--ro packet-length-errors?      yang:counter64

   This model conforms to the Network Management Datastore Architecture
   (NMDA) [RFC8342].  The operational state data is combined with the
   associated configuration data in the same hierarchy
   [YANG-Guidelines].  When protocol states are retrieved from the NMDA
   operational state datastore, the returned states cover all
   "config true" (rw) and "config false" (ro) nodes defined in the
   schema.

   The model allows the retrieval of protocol states at the following
   levels:

   o  VRRP instance (version 2 or 3), representing a VRRP router.

   o  Virtual IPv4 or IPv6 address associated with a virtual router.

   o  Tracking interface, to detect interface connectivity failures.

   o  Tracking network, to detect network connectivity failures.

   o  Global states and statistics summarizing all instances.








Liu, et al.                  Standards Track                    [Page 8]
^L
RFC 8347                        YANG VRRP                     March 2018


2.5.  Notifications

   This model defines the following VRRP-specific notifications:

   notifications:
      +---n vrrp-new-master-event
      |  +--ro master-ip-address    inet:ip-address
      |  +--ro new-master-reason    new-master-reason-type
      +---n vrrp-protocol-error-event
      |  +--ro protocol-error-reason    identityref
      +---n vrrp-virtual-router-error-event
         +--ro interface                      if:interface-ref
         +--ro (ip-version)
         |  +--:(ipv4)
         |  |  +--ro ipv4
         |  |     +--ro vrid    leafref
         |  +--:(ipv6)
         |     +--ro ipv6
         |        +--ro vrid    leafref
         +--ro virtual-router-error-reason    identityref

   Each notification type is used to indicate a type of VRRP state
   change or error occurrence:

   vrrp-new-master-event
      VRRP new master event, indicating that a new master has been
      elected.

   vrrp-protocol-error-event
      VRRP protocol error event for a message that fails to reach a VRRP
      instance to be processed.

   vrrp-virtual-router-error-event
      VRRP virtual router error event for a message processed on a VRRP
      instance.

   In addition to the notifications specified above, the mechanisms
   defined in [Subscribed-Notifications] and [YANG-Push] can be used for
   other general notifications.  These mechanisms currently allow the
   user to:

   o  Subscribe notifications on a per-client basis.

   o  Specify subtree filters or XML Path Language (XPath) filters so
      that only contents of interest will be sent.

   o  Specify either periodic or on-demand notifications.




Liu, et al.                  Standards Track                    [Page 9]
^L
RFC 8347                        YANG VRRP                     March 2018


3.  Tree Structure

   The VRRP YANG data model defined in this document has the following
   tree structure:

   module: ietf-vrrp
       +--ro vrrp
          +--ro virtual-routers?   uint32
          +--ro interfaces?        uint32
          +--ro statistics
             +--ro discontinuity-datetime?   yang:date-and-time
             +--ro checksum-errors?          yang:counter64
             +--ro version-errors?           yang:counter64
             +--ro vrid-errors?              yang:counter64
             +--ro ip-ttl-errors?            yang:counter64
     augment /if:interfaces/if:interface/ip:ipv4:
       +--rw vrrp
          +--rw vrrp-instance* [vrid]
             +--rw vrid                            uint8
             +--rw version                         identityref
             +--rw log-state-change?               boolean
             +--rw preempt
             |  +--rw enabled?     boolean
             |  +--rw hold-time?   uint16
             +--rw priority?                       uint8
             +--rw accept-mode?                    boolean
             +--rw (advertise-interval-choice)?
             |  +--:(v2)
             |  |  +--rw advertise-interval-sec?         uint8
             |  +--:(v3)
             |     +--rw advertise-interval-centi-sec?   uint16
             +--rw track
             |  +--rw interfaces
             |  |  +--rw interface* [interface]
             |  |     +--rw interface             if:interface-ref
             |  |     +--rw priority-decrement?   uint8
             |  +--rw networks
             |     +--rw network* [prefix]
             |        +--rw prefix                inet:ipv4-prefix
             |        +--rw priority-decrement?   uint8
             +--rw virtual-ipv4-addresses
             |  +--rw virtual-ipv4-address* [ipv4-address]
             |     +--rw ipv4-address    inet:ipv4-address
             +--ro state?                          identityref
             +--ro is-owner?                       boolean
             +--ro last-adv-source?                inet:ip-address
             +--ro up-datetime?                    yang:date-and-time
             +--ro master-down-interval?           uint32



Liu, et al.                  Standards Track                   [Page 10]
^L
RFC 8347                        YANG VRRP                     March 2018


             +--ro skew-time?                      uint32
             +--ro last-event?                     identityref
             +--ro new-master-reason?
    new-master-reason-type
             +--ro statistics
                +--ro discontinuity-datetime?    yang:date-and-time
                +--ro master-transitions?        yang:counter32
                +--ro advertisement-rcvd?        yang:counter64
                +--ro advertisement-sent?        yang:counter64
                +--ro interval-errors?           yang:counter64
                |       {validate-interval-errors}?
                +--ro priority-zero-pkts-rcvd?   yang:counter64
                +--ro priority-zero-pkts-sent?   yang:counter64
                +--ro invalid-type-pkts-rcvd?    yang:counter64
                +--ro address-list-errors?       yang:counter64
                |       {validate-address-list-errors}?
                +--ro packet-length-errors?      yang:counter64
     augment /if:interfaces/if:interface/ip:ipv6:
       +--rw vrrp
          +--rw vrrp-instance* [vrid]
             +--rw vrid                            uint8
             +--rw version                         identityref
             +--rw log-state-change?               boolean
             +--rw preempt
             |  +--rw enabled?     boolean
             |  +--rw hold-time?   uint16
             +--rw priority?                       uint8
             +--rw accept-mode?                    boolean
             +--rw advertise-interval-centi-sec?   uint16
             +--rw track
             |  +--rw interfaces
             |  |  +--rw interface* [interface]
             |  |     +--rw interface             if:interface-ref
             |  |     +--rw priority-decrement?   uint8
             |  +--rw networks
             |     +--rw network* [prefix]
             |        +--rw prefix                inet:ipv6-prefix
             |        +--rw priority-decrement?   uint8
             +--rw virtual-ipv6-addresses
             |  +--rw virtual-ipv6-address* [ipv6-address]
             |     +--rw ipv6-address    inet:ipv6-address
             +--ro state?                          identityref
             +--ro is-owner?                       boolean
             +--ro last-adv-source?                inet:ip-address
             +--ro up-datetime?                    yang:date-and-time
             +--ro master-down-interval?           uint32





Liu, et al.                  Standards Track                   [Page 11]
^L
RFC 8347                        YANG VRRP                     March 2018


             +--ro skew-time?                      uint32
             +--ro last-event?                     identityref
             +--ro new-master-reason?
    new-master-reason-type
             +--ro statistics
                +--ro discontinuity-datetime?    yang:date-and-time
                +--ro master-transitions?        yang:counter32
                +--ro advertisement-rcvd?        yang:counter64
                +--ro advertisement-sent?        yang:counter64
                +--ro interval-errors?           yang:counter64
                |       {validate-interval-errors}?
                +--ro priority-zero-pkts-rcvd?   yang:counter64
                +--ro priority-zero-pkts-sent?   yang:counter64
                +--ro invalid-type-pkts-rcvd?    yang:counter64
                +--ro address-list-errors?       yang:counter64
                |       {validate-address-list-errors}?
                +--ro packet-length-errors?      yang:counter64

     notifications:
       +---n vrrp-new-master-event
       |  +--ro master-ip-address    inet:ip-address
       |  +--ro new-master-reason    new-master-reason-type
       +---n vrrp-protocol-error-event
       |  +--ro protocol-error-reason    identityref
       +---n vrrp-virtual-router-error-event
          +--ro interface                      if:interface-ref
          +--ro (ip-version)
          |  +--:(ipv4)
          |  |  +--ro ipv4
          |  |     +--ro vrid    leafref
          |  +--:(ipv6)
          |     +--ro ipv6
          |        +--ro vrid    leafref
          +--ro virtual-router-error-reason    identityref

















Liu, et al.                  Standards Track                   [Page 12]
^L
RFC 8347                        YANG VRRP                     March 2018


4.  YANG Module

   This module references [RFC2787], [RFC3768], [RFC5798], and
   [RFC6527].

   <CODE BEGINS> file "ietf-vrrp@2018-03-13.yang"

   module ietf-vrrp {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-vrrp";
     prefix "vrrp";

     import ietf-inet-types {
       prefix "inet";
     }

     import ietf-yang-types {
       prefix "yang";
     }

     import ietf-interfaces {
       prefix "if";
     }

     import ietf-ip {
       prefix "ip";
     }

     organization
       "IETF Routing Area Working Group (RTGWG)";
     contact
       "WG Web:   <https://datatracker.ietf.org/wg/rtgwg/>
        WG List:  <mailto:rtgwg@ietf.org>

        Editor:   Xufeng Liu
                  <mailto:xufeng.liu.ietf@gmail.com>

        Editor:   Athanasios Kyparlis
                  <mailto:Athanasios_Kyparlis@jabil.com>
        Editor:   Ravi Parikh
                  <mailto:parikhr@vmware.com>

        Editor:   Acee Lindem
                  <mailto:acee@cisco.com>

        Editor:   Mingui Zhang
                  <mailto:zhangmingui@huawei.com>";




Liu, et al.                  Standards Track                   [Page 13]
^L
RFC 8347                        YANG VRRP                     March 2018


     description
       "This YANG module defines a model for managing Virtual Router
        Redundancy Protocol (VRRP) versions 2 and 3.

        Copyright (c) 2018 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
        (https://trustee.ietf.org/license-info).

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

     revision 2018-03-13 {
       description
         "Initial revision.";
       reference
         "RFC 8347: A YANG Data Model for the Virtual Router Redundancy
                    Protocol (VRRP)
          RFC 2787: Definitions of Managed Objects for the Virtual
                    Router Redundancy Protocol
          RFC 3768: Virtual Router Redundancy Protocol (VRRP)
          RFC 5798: Virtual Router Redundancy Protocol (VRRP)
                    Version 3 for IPv4 and IPv6
          RFC 6527: Definitions of Managed Objects for the Virtual
                    Router Redundancy Protocol Version 3 (VRRPv3)";
     }

     /*
      * Features
      */

     feature validate-interval-errors {
       description
         "This feature indicates that the system validates that the
          advertisement interval from advertisement packets received
          is the same as the interval configured for the local
          VRRP router.";
     }

     feature validate-address-list-errors {
       description
         "This feature indicates that the system validates that
          the address list from received packets matches the



Liu, et al.                  Standards Track                   [Page 14]
^L
RFC 8347                        YANG VRRP                     March 2018


          locally configured list for the VRRP router.";
     }

     /*
      * Typedefs
      */

     typedef new-master-reason-type {
       type enumeration {
         enum not-master {
           description
             "The virtual router has never transitioned to master
              state.";
         }
         enum priority {
           description
             "Priority was higher.";
         }
         enum preempted {
           description
             "The master was preempted.";
         }
         enum no-response {
           description
             "Previous master did not respond.";
         }
       }
       description
         "Indicates why the virtual router has transitioned to
          master state.";
     } // new-master-reason-type

     /*
      * Identities
      */

     /* vrrp-event-type identity and its derivatives. */
     identity vrrp-event-type {
       description
         "Indicates the type of a VRRP protocol event.";
     }
     identity vrrp-event-none {
       base vrrp-event-type;
       description
         "Indicates a non-meaningful event.";
     }
     identity vrrp-event-startup {
       base vrrp-event-type;



Liu, et al.                  Standards Track                   [Page 15]
^L
RFC 8347                        YANG VRRP                     March 2018


       description
         "Indicates that a VRRP router has initiated the protocol.";
     }
     identity vrrp-event-shutdown {
       base vrrp-event-type;
       description
         "Indicates that a VRRP router has closed down the protocol.";
     }
     identity vrrp-event-higher-priority-backup {
       base vrrp-event-type;
       description
         "Indicates that a backup router has a higher priority than
          the current master.";
     }
     identity vrrp-event-master-timeout {
       base vrrp-event-type;
       description
         "Indicates that the current master has not sent an
          advertisement within the limit of master-down-interval.";
     }
     identity vrrp-event-interface-up {
       base vrrp-event-type;
       description
         "Indicates that the VRRP-enabled interface has become
          'operational up'.";
     }
     identity vrrp-event-interface-down {
       base vrrp-event-type;
       description
         "Indicates that the VRRP-enabled interface has become
          'operational down'.";
     }
     identity vrrp-event-no-primary-ip-address {
       base vrrp-event-type;
       description
         "Indicates that the primary IP address on the VRRP-enabled
          interface has become unavailable.";
     }
     identity vrrp-event-primary-ip-address {
       base vrrp-event-type;
       description
         "Indicates that the primary IP address on the VRRP-enabled
          interface has become available.";
     }
     identity vrrp-event-no-virtual-ip-addresses {
       base vrrp-event-type;
       description
         "Indicates that there are no virtual IP addresses on the



Liu, et al.                  Standards Track                   [Page 16]
^L
RFC 8347                        YANG VRRP                     March 2018


          virtual router.";
     }
     identity vrrp-event-virtual-ip-addresses {
       base vrrp-event-type;
       description
         "Indicates that there are virtual IP addresses on the
          virtual router.";
     }
     identity vrrp-event-preempt-hold-timeout {
       base vrrp-event-type;
       description
         "Indicates that the configured preemption hold time has
          passed.";
     }
     identity vrrp-event-lower-priority-master {
       base vrrp-event-type;
       description
         "Indicates that there is a lower-priority VRRP master.";
     }
     identity vrrp-event-owner-preempt {
       base vrrp-event-type;
       description
         "Indicates that the owner has preempted another router to
          become the master.";
     }

     /* vrrp-error-global identity and its derivatives. */
     identity vrrp-error-global {
       description
         "Indicates the type of a VRRP error that occurred
          for a packet before it reaches a VRRP router.";
     }
     identity checksum-error {
       base vrrp-error-global;
       description
         "A packet has been received with an invalid VRRP checksum
          value.";
     }
     identity ip-ttl-error {
       base vrrp-error-global;
       description
         "A packet has been received with IP TTL (Time-To-Live)
          not equal to 255.";
     }
     identity version-error {
       base vrrp-error-global;
       description
         "A packet has been received with an unknown or unsupported



Liu, et al.                  Standards Track                   [Page 17]
^L
RFC 8347                        YANG VRRP                     March 2018


          version number.";
     }
     identity vrid-error {
       base vrrp-error-global;
       description
         "A packet has been received with a Virtual Router Identifier
          (VRID) that is not valid for any virtual router on this
          router.";
     }

     /* vrrp-error-virtual-router identity and its derivatives. */
     identity vrrp-error-virtual-router {
       description
         "Indicates the type of a VRRP error that occurred
          after a packet reaches a VRRP router.";
     }
     identity address-list-error {
       base vrrp-error-virtual-router;
       description
         "A packet has been received with an address list that
          does not match the locally configured address list for
          the virtual router.";
     }
     identity interval-error {
       base vrrp-error-virtual-router;
       description
         "A packet has been received with an advertisement interval
          different than the interval configured for the local
          virtual router.";
     }
     identity packet-length-error {
       base vrrp-error-virtual-router;
       description
         "A packet has been received with a packet length less
          than the length of the VRRP header.";
     }

     /* vrrp-state-type identity and its derivatives. */
     identity vrrp-state-type {
       description
         "Indicates the state of a virtual router.";
     }
     identity initialize {
       base vrrp-state-type;
       description
         "Indicates that the virtual router is waiting
          for a startup event.";
     }



Liu, et al.                  Standards Track                   [Page 18]
^L
RFC 8347                        YANG VRRP                     March 2018


     identity backup {
       base vrrp-state-type;
       description
         "Indicates that the virtual router is monitoring the
          availability of the master router.";
     }
     identity master {
       base vrrp-state-type;
       description
         "Indicates that the virtual router is forwarding
          packets for IP addresses that are associated with
          this virtual router.";
     }

     /* vrrp-version identity and its derivatives. */
     identity vrrp-version {
       description
         "The version of VRRP.";
     }
     identity vrrp-v2 {
       base vrrp-version;
       description
         "Indicates version 2 of VRRP.";
     }
     identity vrrp-v3 {
       base vrrp-version;
       description
         "Indicates version 3 of VRRP.";
     }

     /*
      * Groupings
      */

     grouping vrrp-common-attributes {
       description
         "Group of VRRP attributes common to versions 2 and 3.";

       leaf vrid {
         type uint8 {
           range "1..255";
         }
         description
           "Virtual Router ID (i.e., VRID).";
       }

       leaf version {
         type identityref {



Liu, et al.                  Standards Track                   [Page 19]
^L
RFC 8347                        YANG VRRP                     March 2018


           base vrrp:vrrp-version;
         }
         mandatory true;
         description
           "Version 2 or 3 of VRRP.";
       }

       leaf log-state-change {
         type boolean;
         default "false";
         description
           "Generates VRRP state change messages each time the
            VRRP instance changes state (from 'up' to 'down'
            or 'down' to 'up').";
       }

       container preempt {
         description
           "Enables a higher-priority VRRP backup router to preempt a
            lower-priority VRRP master.";
         leaf enabled {
           type boolean;
           default "true";
           description
             "'true' if preemption is enabled.";
         }
         leaf hold-time {
           type uint16;
           units seconds;
           default 0;
           description
             "Hold time, in seconds, for which a higher-priority VRRP
              backup router must wait before preempting a lower-priority
              VRRP master.";
         }
       }

       leaf priority {
         type uint8 {
           range "1..254";
         }
         default 100;
         description
           "Configures the VRRP election priority for the backup
            virtual router.";
       }

       leaf accept-mode {



Liu, et al.                  Standards Track                   [Page 20]
^L
RFC 8347                        YANG VRRP                     March 2018


         when "derived-from-or-self(current()/../version, 'vrrp-v3')" {
           description
             "Applicable only to version 3.";
         }
         type boolean;
         default "false";
         description
           "Controls whether a virtual router in master state will
            accept packets addressed to the address owner's IPvX address
            as its own if it is not the IPvX address owner.  The default
            is 'false'.  Deployments that rely on, for example, pinging
            the address owner's IPvX address may wish to configure
            accept-mode to 'true'.

            Note: IPv6 Neighbor Solicitations and Neighbor
            Advertisements MUST NOT be dropped when accept-mode
            is 'false'.";
       }
     } // vrrp-common-attributes

     grouping vrrp-ipv4-attributes {
       description
         "Group of VRRP attributes for IPv4.";

       uses vrrp-common-attributes;

       choice advertise-interval-choice {
         description
           "The options for the advertisement interval at which VRRPv2
            or VRRPv3 advertisements are sent from the specified
            interface.";

         case v2 {
           when "derived-from-or-self(version, 'vrrp-v2')" {
             description
               "Applicable only to version 2.";
           }
           leaf advertise-interval-sec {
             type uint8 {
               range "1..254";
             }
             units seconds;
             default 1;
             description
               "Configures the interval that VRRPv2 advertisements
                are sent from the specified interface.";
           }
         }



Liu, et al.                  Standards Track                   [Page 21]
^L
RFC 8347                        YANG VRRP                     March 2018


         case v3 {
           when "derived-from-or-self(version, 'vrrp-v3')" {
             description
               "Applicable only to version 3.";
           }
           leaf advertise-interval-centi-sec {
             type uint16 {
               range "1..4095";
             }
             units centiseconds;
             default 100;
             description
               "Configures the interval that VRRPv3 advertisements
                are sent from the specified interface.";
           }
         }
       } // advertise-interval-choice

       container track {
         description
           "Enables the specified VRRP instance to track interfaces
            or networks.";
         container interfaces {
           description
             "Enables the specified VRRPv2 or VRRPv3 instance to track
              interfaces.  Interface tracking prevents traffic loss by
              detecting the availability of interfaces.  The operational
              states of other interfaces are associated with the
              priority of a VRRP router.  When a tracked interface
              becomes unavailable (or 'operational down'), the priority
              of the VRRP router decrements.  When an unavailable
              interface becomes available again, the priority of the
              VRRP router is incremented by the same amount.";

           list interface {
             key "interface";
             description
               "Interface to track.";
             leaf interface {
               type if:interface-ref;
               must "/if:interfaces/if:interface[if:name=current()]/"
                  + "ip:ipv4" {
                 description
                   "Interface is IPv4.";
               }
               description
                 "Interface to track.";
             }



Liu, et al.                  Standards Track                   [Page 22]
^L
RFC 8347                        YANG VRRP                     March 2018


             leaf priority-decrement {
               type uint8 {
                 range "1..254";
               }
               default 10;
               description
                 "Specifies how much to decrement the priority of the
                  VRRP instance if the interface goes down.";
             }
           } // interface
         } // interfaces

         container networks {
           description
             "Enables the VRRPv2 or VRRPv3 router instance to track the
              specified networks through their IPv4 network prefixes.
              Network tracking prevents traffic loss by detecting
              network connectivity failure.  The states of
              connectivity to some networks are associated with the
              priority of a VRRP router.  When connectivity to a
              tracked network represented by its prefix is lost, the
              priority of the VRRP router decrements.  When an
              unavailable network is again reachable, the priority of
              the VRRP router is incremented by the same amount.";
           list network {
             key "prefix";
             description
               "Enables the specified VRRPv2 or VRRPv3 instance to
                track an IPv4 network by specifying the prefix of the
                IPv4 network.";

             leaf prefix {
               type inet:ipv4-prefix;
               description
                 "The IPv4 prefix of the network to track.";
             }

             leaf priority-decrement {
               type uint8 {
                 range "1..254";
               }
               default 10;
               description
                 "Specifies how much to decrement the priority of the
                  VRRP router if there is a failure in the IPv4
                  network.";
             }
           } // network



Liu, et al.                  Standards Track                   [Page 23]
^L
RFC 8347                        YANG VRRP                     March 2018


         } // networks
       } // track

       container virtual-ipv4-addresses {
         description
           "Configures the virtual IPv4 address for the
            VRRP interface.";

         list virtual-ipv4-address {
           key "ipv4-address";
           max-elements 16;
           description
             "Virtual IPv4 addresses for a single VRRP instance.  For a
              VRRP owner router, the virtual address must match one
              of the IPv4 addresses configured on the interface
              corresponding to the virtual router.";

           leaf ipv4-address {
             type inet:ipv4-address;
             description
               "An IPv4 address associated with a virtual router.";
             reference
               "RFC 5798: Virtual Router Redundancy Protocol (VRRP)
                          Version 3 for IPv4 and IPv6.  Section 1.2";
           }
         } // virtual-ipv4-address
       } // virtual-ipv4-addresses
     } // vrrp-ipv4-attributes

     grouping vrrp-ipv6-attributes {
       description
         "Group of VRRP attributes for IPv6.";

       uses vrrp-common-attributes;

       leaf advertise-interval-centi-sec {
         type uint16 {
           range "1..4095";
         }
         units centiseconds;
         default 100;
         description
           "Configures the interval that VRRPv3 advertisements
            are sent from the specified interface.";
       }

       container track {
         description



Liu, et al.                  Standards Track                   [Page 24]
^L
RFC 8347                        YANG VRRP                     March 2018


           "Enables the specified VRRP instance to track interfaces
            or networks.";
         container interfaces {
           description
             "Enables the specified VRRPv2 or VRRPv3 instance to track
              interfaces.  Interface tracking prevents traffic loss by
              detecting the availability of interfaces.  The operational
              states of other interfaces are associated with the
              priority of a VRRP router.  When a tracked interface
              becomes unavailable (or 'operational down'), the priority
              of the VRRP router decrements.  When an unavailable
              interface becomes available again, the priority of the
              VRRP router is incremented by the same amount.";
           list interface {
             key "interface";
             description
               "Interface to track.";

             leaf interface {
               type if:interface-ref;
               must "/if:interfaces/if:interface[if:name=current()]/"
                  + "ip:ipv6" {
                 description
                   "Interface is IPv6.";
               }
               description
                 "Interface to track.";
             }

             leaf priority-decrement {
               type uint8 {
                 range "1..254";
               }
               default 10;
               description
                 "Specifies how much to decrement the priority of the
                  VRRP instance if the interface goes down.";
             }
           } // interface
         } // interfaces

         container networks {
           description
             "Enables the VRRPv2 or VRRPv3 router instance to track the
              specified networks through their IPv6 network prefixes.
              Network tracking prevents traffic loss by detecting
              network connectivity failure.  The states of
              connectivity to some networks are associated with the



Liu, et al.                  Standards Track                   [Page 25]
^L
RFC 8347                        YANG VRRP                     March 2018


              priority of a VRRP router.  When connectivity to a
              tracked network represented by its prefix is lost, the
              priority of the VRRP router decrements.  When an
              unavailable network is again reachable, the priority of
              the VRRP router is incremented by the same amount.";
           list network {
             key "prefix";
             description
               "Enables the specified VRRPv2 or VRRPv3 instance to
                track an IPv6 network by specifying the prefix of the
                IPv6 network.";

             leaf prefix {
               type inet:ipv6-prefix;
               description
                 "The IPv6 prefix of the network to track.";
             }

             leaf priority-decrement {
               type uint8 {
                 range "1..254";
               }
               default 10;
               description
                 "Specifies how much to decrement the priority of the
                  VRRP router if there is a failure in the IPv6
                  network.";
             }
           } // network
         } // networks
       } // track

       container virtual-ipv6-addresses {
         description
           "Configures the virtual IPv6 address for the
            VRRP interface.";
         list virtual-ipv6-address {
           key "ipv6-address";
           max-elements 2;
           description
             "Two IPv6 addresses are allowed.  The first address must
              be a link-local address.  The second address can be a
              link-local or global address.";

           leaf ipv6-address {
             type inet:ipv6-address;
             description
               "An IPv6 address associated with a virtual router.";



Liu, et al.                  Standards Track                   [Page 26]
^L
RFC 8347                        YANG VRRP                     March 2018


             reference
               "RFC 5798: Virtual Router Redundancy Protocol (VRRP)
                          Version 3 for IPv4 and IPv6.  Section 1.3";
           }
         } // virtual-ipv6-address
       } // virtual-ipv6-addresses
     } // vrrp-ipv6-attributes

     grouping vrrp-state-attributes {
       description
         "Group of VRRP state attributes.";

       leaf state {
         type identityref {
           base vrrp:vrrp-state-type;
         }
         config false;
         description
           "Operational state.";
       }

       leaf is-owner {
         type boolean;
         config false;
         description
           "Set to 'true' if this virtual router is the owner.";
       }

       leaf last-adv-source {
         type inet:ip-address;
         config false;
         description
           "Last advertised IPv4/IPv6 source address.";
       }

       leaf up-datetime {
         type yang:date-and-time;
         config false;
         description
           "The date and time when this virtual router
            transitioned out of 'init' state.";
       }

       leaf master-down-interval {
         type uint32;
         units centiseconds;
         config false;
         description



Liu, et al.                  Standards Track                   [Page 27]
^L
RFC 8347                        YANG VRRP                     March 2018


           "Time interval for the backup virtual router to declare
            'master down'.";
       }

       leaf skew-time {
         type uint32;
         units microseconds;
         config false;
         description
           "Calculated based on the priority and advertisement
            interval configuration command parameters.  See RFC 3768.";
       }

       leaf last-event {
         type identityref {
           base vrrp:vrrp-event-type;
         }
         config false;
         description
           "Last reported event.";
       }

       leaf new-master-reason {
         type new-master-reason-type;
         config false;
         description
           "Indicates why the virtual router has transitioned to
            master state.";
       }

       container statistics {
         config false;
         description
           "VRRP statistics.";

         leaf discontinuity-datetime {
           type yang:date-and-time;
           description
             "The time on the most recent occasion at which any one or
              more of the VRRP statistics counters suffered a
              discontinuity.  If no such discontinuities have occurred
              since the last re-initialization of the local management
              subsystem, then this node contains the time that the
              local management subsystem re-initialized itself.";
         }

         leaf master-transitions {
           type yang:counter32;



Liu, et al.                  Standards Track                   [Page 28]
^L
RFC 8347                        YANG VRRP                     March 2018


           description
             "The total number of times that this virtual router's
              state has transitioned to 'master'.";
         }

         leaf advertisement-rcvd {
           type yang:counter64;
           description
             "The total number of VRRP advertisements received by
              this virtual router.";
         }

         leaf advertisement-sent {
           type yang:counter64;
           description
             "The total number of VRRP advertisements sent by
              this virtual router.";
         }

         leaf interval-errors {
           if-feature validate-interval-errors;
           type yang:counter64;
           description
             "The total number of VRRP advertisement packets received
              with an advertisement interval different than the
              interval configured for the local virtual router.";
         }

         leaf priority-zero-pkts-rcvd {
           type yang:counter64;
           description
             "The total number of VRRP packets received by the
              virtual router with a priority of 0.";
         }

         leaf priority-zero-pkts-sent {
           type yang:counter64;
           description
             "The total number of VRRP packets sent by the
              virtual router with a priority of 0.";
         }

         leaf invalid-type-pkts-rcvd {
           type yang:counter64;
           description
             "The number of VRRP packets received by the virtual
              router with an invalid value in the 'type' field.";
         }



Liu, et al.                  Standards Track                   [Page 29]
^L
RFC 8347                        YANG VRRP                     March 2018


         leaf address-list-errors {
           if-feature validate-address-list-errors;
           type yang:counter64;
           description
             "The total number of packets received with an
              address list that does not match the locally
              configured address list for the virtual router.";
         }

         leaf packet-length-errors {
           type yang:counter64;
           description
             "The total number of packets received with a packet
              length less than the length of the VRRP header.";
         }
       } // statistics
     } // vrrp-state-attributes

     grouping vrrp-global-state-attributes {
       description
         "Group of VRRP global state attributes.";

       leaf virtual-routers {
         type uint32;
         description
           "Number of configured virtual routers.";
       }

       leaf interfaces {
         type uint32;
         description
           "Number of interfaces with VRRP configured.";
       }

       container statistics {
         description
           "VRRP global statistics.";

         leaf discontinuity-datetime {
           type yang:date-and-time;
           description
             "The time on the most recent occasion at which any
              one or more of checksum-errors, version-errors,
              vrid-errors, or ip-ttl-errors suffered a
              discontinuity.

              If no such discontinuities have occurred since the last
              re-initialization of the local management subsystem,



Liu, et al.                  Standards Track                   [Page 30]
^L
RFC 8347                        YANG VRRP                     March 2018


              then this node contains the time that the local management
              subsystem re-initialized itself.";
         }

         leaf checksum-errors {
           type yang:counter64;
           description
             "The total number of VRRP packets received with an invalid
              VRRP checksum value.";
           reference
             "RFC 5798: Virtual Router Redundancy Protocol (VRRP)
                        Version 3 for IPv4 and IPv6.  Section 5.2.8";
         }

         leaf version-errors {
           type yang:counter64;
           description
             "The total number of VRRP packets received with an unknown
              or unsupported version number.";
           reference
             "RFC 5798: Virtual Router Redundancy Protocol (VRRP)
                        Version 3 for IPv4 and IPv6.  Section 5.2.1";
         }

         leaf vrid-errors {
           type yang:counter64;
           description
             "The total number of VRRP packets received with a VRID that
              is not valid for any virtual router on this router.";
           reference
             "RFC 5798: Virtual Router Redundancy Protocol (VRRP)
                        Version 3 for IPv4 and IPv6.  Section 5.2.3";
         }

         leaf ip-ttl-errors {
           type yang:counter64;
           description
             "The total number of VRRP packets received by the
              virtual router with IP TTL (IPv4) or Hop Limit (IPv6)
              not equal to 255.";
           reference
             "RFC 5798: Virtual Router Redundancy Protocol (VRRP)
                        Version 3 for IPv4 and IPv6.
                        Sections 5.1.1.3 and 5.1.2.3";
         }
       } // statistics
     } // vrrp-global-state-attributes




Liu, et al.                  Standards Track                   [Page 31]
^L
RFC 8347                        YANG VRRP                     March 2018


     /*
      * Configuration data and operational state data nodes
      */

     augment "/if:interfaces/if:interface/ip:ipv4" {
       description
         "Augments IPv4 interface.";

       container vrrp {
         description
           "Configures VRRP version 2 or 3 for IPv4.";

         list vrrp-instance {
           key "vrid";
           description
             "Defines a virtual router, identified by a VRID, within the
              IPv4 address space.";

           uses vrrp-ipv4-attributes;
           uses vrrp-state-attributes;
         }
       }
     } // augments ipv4

     augment "/if:interfaces/if:interface/ip:ipv6" {
       description
         "Augments IPv6 interface.";

       container vrrp {
         description
           "Configures VRRP version 3 for IPv6.";

         list vrrp-instance {
           must "derived-from-or-self(version, 'vrrp-v3')" {
             description
               "IPv6 is only supported by version 3.";
           }
           key "vrid";
           description
             "Defines a virtual router, identified by a VRID, within the
              IPv6 address space.";

           uses vrrp-ipv6-attributes;
           uses vrrp-state-attributes;
         }
       }
     } // augments ipv6




Liu, et al.                  Standards Track                   [Page 32]
^L
RFC 8347                        YANG VRRP                     March 2018


     container vrrp {
       config false;
       description
         "VRRP data at the global level.";

       uses vrrp-global-state-attributes;
     }

     /*
      * Notifications
      */

     notification vrrp-new-master-event {
       description
         "Notification event for the election of a new VRRP master.";
       leaf master-ip-address {
         type inet:ip-address;
         mandatory true;
         description
           "IPv4 or IPv6 address of the new master.";
       }
       leaf new-master-reason {
         type new-master-reason-type;
         mandatory true;
         description
           "Indicates why the virtual router has transitioned to
            master state.";
       }
     }

     notification vrrp-protocol-error-event {
       description
         "Notification event for a VRRP protocol error.";
       leaf protocol-error-reason {
         type identityref {
           base vrrp:vrrp-error-global;
         }
         mandatory true;
         description
           "Indicates the reason for the protocol error.";
       }
     }

     notification vrrp-virtual-router-error-event {
       description
         "Notification event for an error that happened on a
          virtual router.";
       leaf interface {



Liu, et al.                  Standards Track                   [Page 33]
^L
RFC 8347                        YANG VRRP                     March 2018


         type if:interface-ref;
         mandatory true;
         description
           "Indicates the interface on which the event has occurred.";
       }

       choice ip-version {
         mandatory true;
         description
           "The error may have happened on either an IPv4 virtual
            router or an IPv6 virtual router.  The information
            related to a specific IP version is provided by one of
            the following cases.";
         case ipv4 {
           description
             "IPv4.";
           container ipv4 {
             description
               "Error information for IPv4.";
             leaf vrid {
               type leafref {
                 path "/if:interfaces/if:interface"
                   + "[if:name = current()/../../vrrp:interface]/"
                   + "ip:ipv4/vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid";
               }
               mandatory true;
               description
                 "Indicates the virtual router on which the event has
                  occurred.";
             }
           }
         }
         case ipv6 {
           description
             "IPv6.";
           container ipv6 {
             description
               "Error information for IPv6.";
             leaf vrid {
               type leafref {
                 path "/if:interfaces/if:interface"
                   + "[if:name = current()/../../vrrp:interface]/"
                   + "ip:ipv6/vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid";
               }
               mandatory true;
               description
                 "Indicates the virtual router on which the event has
                  occurred.";



Liu, et al.                  Standards Track                   [Page 34]
^L
RFC 8347                        YANG VRRP                     March 2018


             }
           }
         }
       }

       leaf virtual-router-error-reason {
         type identityref {
           base vrrp:vrrp-error-virtual-router;
         }
         mandatory true;
         description
           "Indicates the reason for the virtual router error.";
       }
     }
   }

   <CODE ENDS>

5.  IANA Considerations

   This document registers the following namespace URI in the "IETF XML
   Registry" [RFC3688]:

   --------------------------------------------------------------------
   URI: urn:ietf:params:xml:ns:yang:ietf-vrrp
   Registrant Contact: The IESG.
   XML: N/A; the requested URI is an XML namespace.
   --------------------------------------------------------------------

   This document registers the following YANG module in the "YANG Module
   Names" registry [RFC7950]:

   --------------------------------------------------------------------
   name:         ietf-vrrp
   namespace:    urn:ietf:params:xml:ns:yang:ietf-vrrp
   prefix:       vrrp
   reference:    RFC 8347
   --------------------------------------------------------------------













Liu, et al.                  Standards Track                   [Page 35]
^L
RFC 8347                        YANG VRRP                     March 2018


6.  Security Considerations

   The YANG module specified in this document defines a schema for data
   that is designed to be accessed via network management protocols such
   as NETCONF [RFC6241] or RESTCONF [RFC8040].  The lowest NETCONF layer
   is the secure transport layer, and the mandatory-to-implement secure
   transport is Secure Shell (SSH) [RFC6242].  The lowest RESTCONF layer
   is HTTPS, and the mandatory-to-implement secure transport is TLS
   [RFC5246].

   The NETCONF access control model [RFC8341] provides the means to
   restrict access for particular NETCONF or RESTCONF users to a
   preconfigured subset of all available NETCONF or RESTCONF protocol
   operations and content.

   There are a number of data nodes defined in this YANG module that 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., 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:

   /if:interfaces/if:interface/ip:ipv4/vrrp:vrrp/vrrp:vrrp-instance

   /if:interfaces/if:interface/ip:ipv6/vrrp:vrrp/vrrp:vrrp-instance

   Unauthorized access to any data node of these subtrees can adversely
   affect the routing subsystem of both the local device and the
   network.  This may lead to network malfunctions, delivery of packets
   to inappropriate destinations, and other problems.

   Some of the readable data nodes in this YANG module 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:

   /ietf-vrrp:vrrp

   /if:interfaces/if:interface/ip:ipv4/vrrp:vrrp/vrrp:vrrp-instance

   /if:interfaces/if:interface/ip:ipv6/vrrp:vrrp/vrrp:vrrp-instance

   Unauthorized access to any data node of these subtrees can disclose
   the operational state information of VRRP on this device.





Liu, et al.                  Standards Track                   [Page 36]
^L
RFC 8347                        YANG VRRP                     March 2018


7.  References

7.1.  Normative References

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

   [RFC2787]  Jewell, B. and D. Chuang, "Definitions of Managed Objects
              for the Virtual Router Redundancy Protocol", RFC 2787,
              DOI 10.17487/RFC2787, March 2000,
              <https://www.rfc-editor.org/info/rfc2787>.

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

   [RFC5246]  Dierks, T. and E. Rescorla, "The Transport Layer Security
              (TLS) Protocol Version 1.2", RFC 5246,
              DOI 10.17487/RFC5246, August 2008,
              <https://www.rfc-editor.org/info/rfc5246>.

   [RFC5798]  Nadas, S., Ed., "Virtual Router Redundancy Protocol (VRRP)
              Version 3 for IPv4 and IPv6", RFC 5798,
              DOI 10.17487/RFC5798, March 2010,
              <https://www.rfc-editor.org/info/rfc5798>.

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

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

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

   [RFC6527]  Tata, K., "Definitions of Managed Objects for Virtual
              Router Redundancy Protocol Version 3 (VRRPv3)", RFC 6527,
              DOI 10.17487/RFC6527, March 2012,
              <https://www.rfc-editor.org/info/rfc6527>.





Liu, et al.                  Standards Track                   [Page 37]
^L
RFC 8347                        YANG VRRP                     March 2018


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

   [RFC7950]  Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
              RFC 7950, DOI 10.17487/RFC7950, August 2016,
              <https://www.rfc-editor.org/info/rfc7950>.

   [RFC8040]  Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
              Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
              <https://www.rfc-editor.org/info/rfc8040>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in
              RFC 2119 Key Words", BCP 14, RFC 8174,
              DOI 10.17487/RFC8174, May 2017,
              <https://www.rfc-editor.org/info/rfc8174>.

   [RFC8341]  Bierman, A. and M. Bjorklund, "Network Configuration
              Access Control Model", STD 91, RFC 8341,
              DOI 10.17487/RFC8341, March 2018,
              <https://www.rfc-editor.org/info/rfc8341>.

   [RFC8342]  Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
              and R. Wilton, "Network Management Datastore Architecture
              (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018,
              <https://www.rfc-editor.org/info/rfc8342>.

   [RFC8343]  Bjorklund, M., "A YANG Data Model for Interface
              Management", RFC 8343, DOI 10.17487/RFC8343, March 2018,
              <https://www.rfc-editor.org/info/rfc8343>.

   [RFC8344]  Bjorklund, M., "A YANG Data Model for IP Management",
              RFC 8344, DOI 10.17487/RFC8344, March 2018,
              <https://www.rfc-editor.org/info/rfc8344>.

7.2.  Informative References

   [RFC3768]  Hinden, R., Ed., "Virtual Router Redundancy Protocol
              (VRRP)", RFC 3768, DOI 10.17487/RFC3768, April 2004,
              <https://www.rfc-editor.org/info/rfc3768>.

   [RFC7224]  Bjorklund, M., "IANA Interface Type YANG Module",
              RFC 7224, DOI 10.17487/RFC7224, May 2014,
              <https://www.rfc-editor.org/info/rfc7224>.

   [RFC7951]  Lhotka, L., "JSON Encoding of Data Modeled with YANG",
              RFC 7951, DOI 10.17487/RFC7951, August 2016,
              <https://www.rfc-editor.org/info/rfc7951>.



Liu, et al.                  Standards Track                   [Page 38]
^L
RFC 8347                        YANG VRRP                     March 2018


   [RFC8340]  Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
              BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
              <https://www.rfc-editor.org/info/rfc8340>.

   [Subscribed-Notifications]
              Voit, E., Clemm, A., Gonzalez Prieto, A., Nilsen-Nygaard,
              E., and A. Tripathy, "Custom Subscription to Event
              Streams", Work in Progress, draft-ietf-netconf-subscribed-
              notifications-10, February 2018.

   [YANG-Push]
              Clemm, A., Voit, E., Gonzalez Prieto, A., Tripathy, A.,
              Nilsen-Nygaard, E., Bierman, A., and B. Lengyel, "YANG
              Datastore Subscription", Work in Progress,
              draft-ietf-netconf-yang-push-15, February 2018.

   [YANG-Guidelines]
              Bierman, A., "Guidelines for Authors and Reviewers of YANG
              Data Model Documents", Work in Progress,
              draft-ietf-netmod-rfc6087bis-20, March 2018.































Liu, et al.                  Standards Track                   [Page 39]
^L
RFC 8347                        YANG VRRP                     March 2018


Appendix A.  Data Tree Example

   This section contains an example of an instance data tree in JSON
   encoding [RFC7951], containing both configuration and state data.
   (This example includes "iana-if-type", which is defined in
   [RFC7224].)

                 Virtual router IP address: fe80::1
              +-----------------+        +-----------------+
              |                 |        |                 |
              |    Router 1     |        |    Router 2     |
              |                 |        |                 |
              +--------+--------+        +--------+--------+
                       |eth1                      |eth1
                       |fe80::11                  |fe80::12
                -------+--------------------------+-------
                       |                          |
                       |fe80::51                  |fe80::52
              +--------+--------+        +--------+--------+
              |     Host 1      |        |     Host 2      |
              | Default gateway:|        | Default gateway:|
              |     fe80::1     |        |     fe80::1     |
              +-----------------+        +-----------------+




























Liu, et al.                  Standards Track                   [Page 40]
^L
RFC 8347                        YANG VRRP                     March 2018


   The configuration instance data for Router 1 in the above figure
   could be as follows:

   {
     "ietf-interfaces:interfaces": {
       "interface": [
         {
           "name": "eth1",
           "description": "An interface with VRRP enabled.",
           "type": "iana-if-type:ethernetCsmacd",
           "ietf-ip:ipv6": {
             "address": [
               {
                 "ip": "2001:db8:0:1::1",
                 "prefix-length": 64
               },
               {
                 "ip": "fe80::11",
                 "prefix-length": 64
               }
             ],
             "forwarding": true,
             "ietf-vrrp:vrrp": {
               "vrrp-instance": [
                 {
                   "vrid": 1,
                   "version": "vrrp-v3",
                   "priority": 200,
                   "advertise-interval-centi-sec": 50,
                   "virtual-ipv6-addresses": {
                     "virtual-ipv6-address": [
                       "ipv6-address": "fe80::1"
                     ]
                   }
                 }
               ]
             }
           }
         }
       ]
     }
   }









Liu, et al.                  Standards Track                   [Page 41]
^L
RFC 8347                        YANG VRRP                     March 2018


   The corresponding operational state data for Router 1 could be as
   follows:

   {
     "ietf-interfaces:interfaces": {
       "interface": [
         {
           "name": "eth1",
           "description": "An interface with VRRP enabled.",
           "type": "iana-if-type:ethernetCsmacd",
           "phys-address": "00:00:5e:00:53:01",
           "oper-status": "up",
           "statistics": {
             "discontinuity-time": "2016-10-24T17:11:27+02:00"
           },
           "ietf-ip:ipv6": {
             "forwarding": true,
             "mtu": 1500,
             "address": [
               {
                 "ip": "2001:db8:0:1::1",
                 "prefix-length": 64,
                 "origin": "static",
                 "status": "preferred"
               },
               {
                 "ip": "fe80::11",
                 "prefix-length": 64,
                 "origin": "static",
                 "status": "preferred"
               }
             ]



















Liu, et al.                  Standards Track                   [Page 42]
^L
RFC 8347                        YANG VRRP                     March 2018


             "ietf-vrrp:vrrp": {
               "vrrp-instance": [
                 {
                   "vrid": 1,
                   "version": "vrrp-v3",
                   "log-state-change": false,
                   "preempt": {
                     "enabled": true,
                     "hold-time": 0
                   }
                   "priority": 200,
                   "accept-mode": false,
                   "advertise-interval-centi-sec": 50,
                   "virtual-ipv6-addresses": {
                     "virtual-ipv6-address": [
                       "ipv6-address": "fe80::1"
                     ]
                   },
                   "state": "master",
                   "is-owner": false,
                   "last-adv-source": "fe80::11",
                   "up-datetime": "2016-10-24T17:11:27+02:00",
                   "master-down-interval": 161,
                   "skew-time": 11,
                   "last-event": "vrrp-event-interface-up",
                   "new-master-reason": "priority",
                   "statistics": {
                     "discontinuity-datetime":
                       "2016-10-24T17:11:27+02:00",
                     "master-transitions": 2,
                     "advertisement-rcvd": 20,
                     "advertisement-sent": 12,
                     "interval-errors": 0,
                     "priority-zero-pkts-rcvd": 0,
                     "priority-zero-pkts-sent": 0,
                     "invalid-type-pkts-rcvd": 0,
                     "address-list-errors": 0,
                     "packet-length-errors": 1
                   }
                 }
               ]
             }
           }
         }
       ]
     }
   }




Liu, et al.                  Standards Track                   [Page 43]
^L
RFC 8347                        YANG VRRP                     March 2018


   {
     "ietf-vrrp:vrrp": {
       "virtual-routers": 3,
       "interfaces": 2,
       "statistics": {
         "discontinuity-datetime": "2016-10-24T17:11:27+02:00",
         "checksum-errors": 2,
         "version-errors": 0,
         "vrid-errors": 0,
         "ip-ttl-errors": 1
       }
     }
   }






































Liu, et al.                  Standards Track                   [Page 44]
^L
RFC 8347                        YANG VRRP                     March 2018


Authors' Addresses

   Xufeng Liu (editor)
   Jabil
   8281 Greensboro Drive, Suite 200
   McLean, VA  22102
   United States of America

   Email: xufeng.liu.ietf@gmail.com


   Athanasios Kyparlis
   Jabil
   8281 Greensboro Drive, Suite 200
   McLean, VA  22102
   United States of America

   Email: Athanasios_Kyparlis@jabil.com


   Ravi Parikh
   VMware
   3425 Hillview Avenue
   Palo Alto, CA  94304
   United States of America

   Email: parikhr@vmware.com


   Acee Lindem
   Cisco Systems
   301 Midenhall Way
   Cary, NC  27513
   United States of America

   Email: acee@cisco.com


   Mingui Zhang
   Huawei Technologies
   No. 156 Beiqing Rd. Haidian District
   Beijing  100095
   China

   Email: zhangmingui@huawei.com






Liu, et al.                  Standards Track                   [Page 45]
^L