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
|
Internet Engineering Task Force (IETF) A. Clemm
Request for Comments: 8346 Huawei
Category: Standards Track J. Medved
ISSN: 2070-1721 Cisco
R. Varga
Pantheon Technologies SRO
X. Liu
Jabil
H. Ananthakrishnan
Packet Design
N. Bahadur
Bracket Computing
March 2018
A YANG Data Model for Layer 3 Topologies
Abstract
This document defines a YANG data model for Layer 3 network
topologies.
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/rfc8346.
Clemm, et al. Standards Track [Page 1]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
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.
Table of Contents
1. Introduction ....................................................3
2. Key Words .......................................................3
3. Definitions and Acronyms ........................................4
4. Model Structure .................................................5
5. Layer 3 Unicast Topology Model Overview .........................6
6. Layer 3 Unicast Topology YANG Module ............................7
7. Interactions with Other YANG Modules ...........................15
8. IANA Considerations ............................................15
9. Security Considerations ........................................16
10. References ....................................................17
10.1. Normative References .....................................17
10.2. Informative References ...................................19
Appendix A. Companion YANG Data Model for Implementations Not
Compliant with NMDA ..................................20
Appendix B. Extending the Model ..................................24
B.1. Example OSPF Topology .....................................24
B.1.1. Model Overview ........................................24
B.1.2. OSPF Topology YANG Module .............................26
Appendix C. An Example ...........................................29
Acknowledgments ...................................................34
Contributors ......................................................34
Authors' Addresses ................................................35
Clemm, et al. Standards Track [Page 2]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
1. Introduction
This document introduces a YANG [RFC7950] [RFC6991] data model for
Layer 3 (L3) network topologies, specifically Layer 3 Unicast. The
model allows an application to have a holistic view of the topology
of a Layer 3 network, all contained in a single conceptual YANG
datastore. The data model builds on top of, and augments, the data
model for network topologies defined in [RFC8345].
This document also shows how the model can be further refined to
cover different Layer 3 Unicast topology types. For this purpose, an
example model is introduced that covers OSPF [RFC2328]. This example
is intended purely for illustrative purpose; we expect that a
complete OSPF model will be more comprehensive and refined than the
example shown in this document.
There are multiple applications for a topology data model. A number
of use cases have been defined in Section 6 of [USECASE-REQS]. For
example, nodes within the network can use the data model to capture
their understanding of the overall network topology and expose it to
a network controller. A network controller can then use the
instantiated topology data to compare and reconcile its own view of
the network topology with that of the network elements that it
controls. Alternatively, nodes within the network could propagate
this understanding to compare and reconcile this understanding either
amongst themselves or with help of a controller. Beyond the network
element itself, a network controller might even use the data model to
represent its view of the topology that it controls and expose it to
applications north of itself.
The data model for Layer 3 Unicast topologies defined in this
document is specified in the YANG module "ietf-l3-unicast-topology".
This YANG module augments the general network topology model defined
in [RFC8345] with information specific to Layer 3 Unicast. In this
way, the general topology model is extended to be able to meet the
needs of Layer 3 Unicast topologies.
Information that is kept in the Traffic Engineering Database (TED)
will be specified in a separate model [YANG-TE] and is outside the
scope of this specification.
2. Key Words
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.
Clemm, et al. Standards Track [Page 3]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
3. Definitions and Acronyms
This document defines a YANG data model and thus uses many terms
defined in YANG [RFC7950] and NETCONF [RFC6241]. Some terms, such as
"datastore" and "data tree", are repeated here for clarity and
context.
Datastore: A conceptual place to store and access information. A
datastore might be implemented, for example, using files, a
database, flash memory locations, or combinations thereof. A
datastore maps to an instantiated YANG data tree (definition
adopted from [RFC8342]).
Data subtree: An instantiated data node and the data nodes that are
hierarchically contained within it.
IS-IS: Intermediate System to Intermediate System protocol
LSP: Label Switched Path
NETCONF: Network Configuration Protocol
NMDA: Network Management Datastore Architecture
OSPF: Open Shortest Path First (a link-state routing protocol)
URI: Uniform Resource Identifier
TED: Traffic Engineering Database
YANG: YANG is a data modeling language used to model configuration
data, state data, Remote Procedure Calls, and notifications for
network management protocols [RFC7950].
Clemm, et al. Standards Track [Page 4]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
4. Model Structure
The Layer 3 Unicast topology model is defined by YANG module
"l3-unicast-topology". The relationship of this module with other
YANG modules is roughly depicted in the figure below.
+-----------------------------+
| +-----------------------+ |
| | ietf-network | |
| +----------^------------+ |
| | |
| +-----------------------+ |
| | ietf-network-topology | |
| +----------+------------+ |
+-------------^---------------+
|
|
+------------^-------------+
| ietf-l3-unicast-topology |
+------------^-------------+
|
|
+-----------^-----------+
| example-ospf-topology |
+-----------------------+
Figure 1: Overall Model Structure
YANG modules "ietf-network" and "ietf-network-topology" collectively
define the basic network topology model [RFC8345]. YANG module
"ietf-l3-unicast-topology" augments those models with additional
definitions needed to represent Layer 3 Unicast topologies. This
module in turn can be augmented by YANG modules with additional
definitions for specific types of Layer 3 Unicast topologies, such as
OSPF and IS-IS topologies.
The YANG modules "ietf-network" and "ietf-network-topology" are
designed to be used in conjunction with implementations that support
the Network Management Datastore Architecture (NMDA) defined in
[RFC8342]. Accordingly, the same is true for the YANG modules that
augment it. In order to allow implementations to use the model even
in cases when NMDA is not supported, companion YANG modules (that
SHOULD NOT be supported by implementations that support NMDA) are
defined in Appendix A.
Clemm, et al. Standards Track [Page 5]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
5. Layer 3 Unicast Topology Model Overview
The Layer 3 Unicast topology model is defined by YANG module
"ietf-l3-unicast-topology". Its structure is depicted in the
following diagram. The notation syntax follows [RFC8340]. For
purposes of brevity, notifications are not depicted.
module: ietf-l3-unicast-topology
augment /nw:networks/nw:network/nw:network-types:
+--rw l3-unicast-topology!
augment /nw:networks/nw:network:
+--rw l3-topology-attributes
+--rw name? string
+--rw flag* l3-flag-type
augment /nw:networks/nw:network/nw:node:
+--rw l3-node-attributes
+--rw name? inet:domain-name
+--rw flag* node-flag-type
+--rw router-id* rt-types:router-id
+--rw prefix* [prefix]
+--rw prefix inet:ip-prefix
+--rw metric? uint32
+--rw flag* prefix-flag-type
augment /nw:networks/nw:network/nt:link:
+--rw l3-link-attributes
+--rw name? string
+--rw flag* link-flag-type
+--rw metric1? uint64
+--rw metric2? uint64
augment /nw:networks/nw:network/nw:node/nt:termination-point:
+--rw l3-termination-point-attributes
+--rw (termination-point-type)?
+--:(ip)
| +--rw ip-address* inet:ip-address
+--:(unnumbered)
| +--rw unnumbered-id? uint32
+--:(interface-name)
+--rw interface-name? string
The module augments the original "ietf-network" and "ietf-network-
topology" modules as follows:
o A new network topology type is introduced, l3-unicast-topology.
The corresponding container augments the network-types of the
"ietf-network" module.
Clemm, et al. Standards Track [Page 6]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
o Additional topology attributes are introduced, defined in a
grouping that augments the "network" list of the network module.
The attributes include a name for the topology and a set of flags
(represented by a leaf-list). Each type of flag is represented by
a separate identity. This allows additional flags to be
introduced in augmenting modules using additional identities
without needing to revise this module.
o Additional data objects for nodes are introduced by augmenting the
"node" list of the network module. New objects include a set of
flags and a list of prefixes. Each prefix includes an IP prefix,
a metric, and a prefix-specific set of flags.
o Links (in the "ietf-network-topology" module) are augmented with a
set of parameters that allow a link to be associated with a link
name, another set of flags, and a link metric.
o Termination points (in the "ietf-network-topology" module) are
augmented with a choice of IP address, identifier, or name.
In addition, the module defines a set of notifications to alert
clients of any events concerning links, nodes, prefixes, and
termination points. Each notification includes an indication of the
type of event, the topology from which it originated, and the
affected node, link, prefix, or termination point. Also, as a
convenience to applications, additional data of the affected node,
link, prefix, or termination point is included. While this makes
notifications larger in volume than they need to be, it avoids the
need for subsequent retrieval of context information that might have
changed in the meantime.
6. Layer 3 Unicast Topology YANG Module
This YANG module makes reference to the following documents:
[RFC2863] and [RFC8343].
<CODE BEGINS> file "ietf-l3-unicast-topology@2018-02-26.yang"
module ietf-l3-unicast-topology {
yang-version 1.1;
namespace
"urn:ietf:params:xml:ns:yang:ietf-l3-unicast-topology";
prefix "l3t";
import ietf-network {
prefix "nw";
}
import ietf-network-topology {
prefix "nt";
}
Clemm, et al. Standards Track [Page 7]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
import ietf-inet-types {
prefix "inet";
}
import ietf-routing-types {
prefix "rt-types";
}
organization
"IETF I2RS (Interface to the Routing System) Working Group";
contact
"WG Web: <https://datatracker.ietf.org/wg/i2rs/>
WG List: <mailto:i2rs@ietf.org>
Editor: Alexander Clemm
<mailto:ludwig@clemm.org>
Editor: Jan Medved
<mailto:jmedved@cisco.com>
Editor: Robert Varga
<mailto:robert.varga@pantheon.tech>
Editor: Xufeng Liu
<mailto:xufeng.liu.ietf@gmail.com>
Editor: Nitin Bahadur
<mailto:nitin_bahadur@yahoo.com>
Editor: Hariharan Ananthakrishnan
<mailto:hari@packetdesign.com>";
description
"This module defines a model for Layer 3 Unicast
topologies.
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 8346; see the RFC itself for full legal notices.";
revision "2018-02-26" {
description
"Initial revision.";
reference
"RFC 8346: A YANG Data Model for Layer 3 Topologies";
}
identity flag-identity {
description "Base type for flags";
Clemm, et al. Standards Track [Page 8]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
}
typedef l3-event-type {
type enumeration {
enum "add" {
description
"A Layer 3 node, link, prefix, or termination point has
been added";
}
enum "remove" {
description
"A Layer 3 node, link, prefix, or termination point has
been removed";
}
enum "update" {
description
"A Layer 3 node, link, prefix, or termination point has
been updated";
}
}
description "Layer 3 event type for notifications";
}
typedef prefix-flag-type {
type identityref {
base "flag-identity";
}
description "Prefix flag attributes";
}
typedef node-flag-type {
type identityref {
base "flag-identity";
}
description "Node flag attributes";
}
typedef link-flag-type {
type identityref {
base "flag-identity";
}
description "Link flag attributes";
}
typedef l3-flag-type {
type identityref {
base "flag-identity";
}
Clemm, et al. Standards Track [Page 9]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
description "L3 flag attributes";
}
grouping l3-prefix-attributes {
description
"L3 prefix attributes";
leaf prefix {
type inet:ip-prefix;
description
"IP prefix value";
}
leaf metric {
type uint32;
description
"Prefix metric";
}
leaf-list flag {
type prefix-flag-type;
description
"Prefix flags";
}
}
grouping l3-unicast-topology-type {
description "Identifies the topology type to be L3 Unicast.";
container l3-unicast-topology {
presence "indicates L3 Unicast topology";
description
"The presence of the container node indicates L3 Unicast
topology";
}
}
grouping l3-topology-attributes {
description "Topology scope attributes";
container l3-topology-attributes {
description "Contains topology attributes";
leaf name {
type string;
description
"Name of the topology";
}
leaf-list flag {
type l3-flag-type;
description
"Topology flags";
}
}
}
grouping l3-node-attributes {
Clemm, et al. Standards Track [Page 10]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
description "L3 node scope attributes";
container l3-node-attributes {
description
"Contains node attributes";
leaf name {
type inet:domain-name;
description
"Node name";
}
leaf-list flag {
type node-flag-type;
description
"Node flags";
}
leaf-list router-id {
type rt-types:router-id;
description
"Router-id for the node";
}
list prefix {
key "prefix";
description
"A list of prefixes along with their attributes";
uses l3-prefix-attributes;
}
}
}
grouping l3-link-attributes {
description
"L3 link scope attributes";
container l3-link-attributes {
description
"Contains link attributes";
leaf name {
type string;
description
"Link Name";
}
leaf-list flag {
type link-flag-type;
description
"Link flags";
}
leaf metric1 {
type uint64;
description
"Link Metric 1";
}
Clemm, et al. Standards Track [Page 11]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
leaf metric2 {
type uint64;
description
"Link Metric 2";
}
}
}
grouping l3-termination-point-attributes {
description "L3 termination point scope attributes";
container l3-termination-point-attributes {
description
"Contains termination point attributes";
choice termination-point-type {
description
"Indicates the termination point type";
case ip {
leaf-list ip-address {
type inet:ip-address;
description
"IPv4 or IPv6 address.";
}
}
case unnumbered {
leaf unnumbered-id {
type uint32;
description
"Unnumbered interface identifier.
The identifier will correspond to the ifIndex value
of the interface, i.e., the ifIndex value of the
ifEntry that represents the interface in
implementations where the Interfaces Group MIB
(RFC 2863) is supported.";
reference
"RFC 2863: The Interfaces Group MIB";
}
}
case interface-name {
leaf interface-name {
type string;
description
"Name of the interface. The name can (but does not
have to) correspond to an interface reference of a
containing node's interface, i.e., the path name of a
corresponding interface data node on the containing
node reminiscent of data type interface-ref defined
in RFC 8343. It should be noted that data type
interface-ref of RFC 8343 cannot be used directly,
Clemm, et al. Standards Track [Page 12]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
as this data type is used to reference an interface
in a datastore of a single node in the network, not
to uniquely reference interfaces across a network.";
reference
"RFC 8343: A YANG Data Model for Interface Management";
}
}
}
}
}
augment "/nw:networks/nw:network/nw:network-types" {
description
"Introduces new network type for L3 Unicast topology";
uses l3-unicast-topology-type;
}
augment "/nw:networks/nw:network" {
when "nw:network-types/l3t:l3-unicast-topology" {
description
"Augmentation parameters apply only for networks with
L3 Unicast topology";
}
description
"L3 Unicast for the network as a whole";
uses l3-topology-attributes;
}
augment "/nw:networks/nw:network/nw:node" {
when "../nw:network-types/l3t:l3-unicast-topology" {
description
"Augmentation parameters apply only for networks with
L3 Unicast topology";
}
description
"L3 Unicast node-level attributes ";
uses l3-node-attributes;
}
augment "/nw:networks/nw:network/nt:link" {
when "../nw:network-types/l3t:l3-unicast-topology" {
description
"Augmentation parameters apply only for networks with
L3 Unicast topology";
}
description
"Augments topology link attributes";
uses l3-link-attributes;
}
augment "/nw:networks/nw:network/nw:node/"
+"nt:termination-point" {
when "../../nw:network-types/l3t:l3-unicast-topology" {
Clemm, et al. Standards Track [Page 13]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
description
"Augmentation parameters apply only for networks with
L3 Unicast topology";
}
description "Augments topology termination point configuration";
uses l3-termination-point-attributes;
}
notification l3-node-event {
description
"Notification event for L3 node";
leaf l3-event-type {
type l3-event-type;
description
"Event type";
}
uses nw:node-ref;
uses l3-unicast-topology-type;
uses l3-node-attributes;
}
notification l3-link-event {
description
"Notification event for L3 link";
leaf l3-event-type {
type l3-event-type;
description
"Event type";
}
uses nt:link-ref;
uses l3-unicast-topology-type;
uses l3-link-attributes;
}
notification l3-prefix-event {
description
"Notification event for L3 prefix";
leaf l3-event-type {
type l3-event-type;
description
"Event type";
}
uses nw:node-ref;
uses l3-unicast-topology-type;
container prefix {
description
"Contains L3 prefix attributes";
uses l3-prefix-attributes;
}
}
notification termination-point-event {
Clemm, et al. Standards Track [Page 14]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
description
"Notification event for L3 termination point";
leaf l3-event-type {
type l3-event-type;
description
"Event type";
}
uses nt:tp-ref;
uses l3-unicast-topology-type;
uses l3-termination-point-attributes;
}
}
<CODE ENDS>
7. Interactions with Other YANG Modules
As described in Section 4, the model defined in this document builds
on top of, and augments, the YANG modules defined in [RFC8345].
Specifically, the "ietf-l3-unicast-topology" module augments the
"ietf-network" and "ietf-network-topology" modules. In addition, the
model makes use of data types defined in [RFC6991].
The model defined in this document is a protocol-independent YANG
data model with Layer 3 topology information. It is separate from
and not linked with data models that are used to configure routing
protocols or routing information, e.g., "ietf-routing" [RFC8022] and
"ietf-rib-extension" [YANG-RIB]. That said, the model does import a
type definition from model "ietf-routing-types" [RFC8294].
The model complies with the requirements for the ephemeral state
found in [RFC8242]. For ephemeral topology data that is server
provided, the process tasked with maintaining topology information
will load information from the routing process (such as OSPF) into
the data model without relying on a configuration datastore.
8. IANA Considerations
This document registers the following namespace URIs in the "IETF XML
Registry" [RFC3688]:
URI: urn:ietf:params:xml:ns:yang:ietf-l3-unicast-topology
Registrant Contact: The IESG.
XML: N/A; the requested URI is an XML namespace.
URI: urn:ietf:params:xml:ns:yang:ietf-l3-unicast-topology-state
Registrant Contact: The IESG.
XML: N/A; the requested URI is an XML namespace.
Clemm, et al. Standards Track [Page 15]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
This document registers the following YANG modules in the "YANG
Module Names" registry [RFC6020]:
Name: ietf-l3-unicast-topology
Namespace: urn:ietf:params:xml:ns:yang:ietf-l3-unicast-topology
Prefix: l3t
Reference: RFC 8346
Name: ietf-l3-unicast-topology-state
Namespace: urn:ietf:params:xml:ns:yang:ietf-l3-unicast-topology-state
Prefix: l3t-s
Reference: RFC 8346
9. Security Considerations
The YANG modules specified in this document define 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.
In general, Layer 3 Unicast topologies are system-controlled and
provide ephemeral topology information. In an NMDA-compliant server,
they are only part of <operational>, which provides read-only access
to clients, so they are less vulnerable. That said, the YANG modules
do in principle allow information to be configurable.
There are a number of data nodes defined in these YANG modules 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 in the "ietf-l3-unicast-topology"
module:
o l3-topology-attributes: A malicious client could attempt to
sabotage the configuration of any of the contained attributes,
i.e., the name or the flag data nodes.
Clemm, et al. Standards Track [Page 16]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
o l3-node-attributes: A malicious client could attempt to sabotage
the configuration of important node attributes, such as the
router-id or node prefix.
o l3-link-attributes: A malicious client could attempt to sabotage
the configuration of important link attributes, such as name,
flag, and metrics of the link.
o l3-termination-point-attributes: A malicious client could attempt
to sabotage the configuration information of a termination point,
such as the termination point's IP address and interface name.
10. References
10.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>.
[RFC2328] Moy, J., "OSPF Version 2", STD 54, RFC 2328,
DOI 10.17487/RFC2328, April 1998,
<https://www.rfc-editor.org/info/rfc2328>.
[RFC2863] McCloghrie, K. and F. Kastenholz, "The Interfaces Group
MIB", RFC 2863, DOI 10.17487/RFC2863, June 2000,
<https://www.rfc-editor.org/info/rfc2863>.
[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>.
[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>.
Clemm, et al. Standards Track [Page 17]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
[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>.
[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>.
[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>.
[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>.
[RFC8294] Liu, X., Qu, Y., Lindem, A., Hopps, C., and L. Berger,
"Common YANG Data Types for the Routing Area", RFC 8294,
DOI 10.17487/RFC8294, December 2017,
<https://www.rfc-editor.org/info/rfc8294>.
[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>.
[RFC8345] Clemm, A., Medved, J., Varga, R., Bahadur, N.,
Ananthakrishnan, H., and X. Liu, "A YANG Data Model for
Network Topologies", RFC 8345, DOI 10.17487/RFC8345, March
2018, <https://www.rfc-editor.org/info/rfc8345>.
Clemm, et al. Standards Track [Page 18]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
10.2. Informative References
[RFC8022] Lhotka, L. and A. Lindem, "A YANG Data Model for Routing
Management", RFC 8022, DOI 10.17487/RFC8022, November
2016, <https://www.rfc-editor.org/info/rfc8022>.
[RFC8242] Haas, J. and S. Hares, "Interface to the Routing System
(I2RS) Ephemeral State Requirements", RFC 8242,
DOI 10.17487/RFC8242, September 2017,
<https://www.rfc-editor.org/info/rfc8242>.
[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>.
[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>.
[USECASE-REQS]
Hares, S. and M. Chen, "Summary of I2RS Use Case
Requirements", Work in Progress, draft-ietf-i2rs-usecase-
reqs-summary-03, November 2016.
[YANG-RIB] Lindem, A. and Y. Qu, "RIB YANG Data Model", Work in
Progress, draft-acee-rtgwg-yang-rib-extend-06, January
2018.
[YANG-TE] Liu, X., Bryskin, I., Beeram, V., Saad, T., Shah, H., and
O. Gonzalez de Dios, "YANG Data Model for Traffic
Engineering (TE) Topologies", Work in Progress,
draft-ietf-teas-yang-te-topo-15, February 2018.
Clemm, et al. Standards Track [Page 19]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
Appendix A. Companion YANG Data Model for Implementations Not Compliant
with NMDA
The YANG module "ietf-l3-unicast-topology" defined in this document
augments two modules defined in [RFC8345]: "ietf-network" and
"ietf-network-topology". These two modules were designed to be used
in conjunction with implementations that support the Network
Management Datastore Architecture (NMDA) defined in [RFC8342]. In
order to allow implementations to use the model in cases when NMDA is
not supported, [RFC8345] defines two companion modules,
"ietf-network- state" and "ietf-network-topology-state", that
represent state models of networks and network topologies,
respectively.
In order to be able to use the model for Layer 3 topologies defined
in this document in conjunction with implementations not compliant
with NMDA, a corresponding companion module needs to be introduced as
well. This companion module, "ietf-l3-unicast-topology-state",
mirrors "ietf-l3-unicast-topology". However, the module augments
"ietf-network-state" and "ietf-network-topology-state" (instead of
"ietf-network" and "ietf-network-topology"), and all of its data
nodes are non-configurable.
Similar considerations apply to any module that augments "ietf-l3-
unicast-topology", such as the example module defined in Appendix B
(i.e., example-ospf-topology). For implementations that are not
compliant with NMDA, companion modules that represent state
information and that are non-configurable will need to be introduced.
These modules augment "ietf-l3-unicast-topology-state" instead of
"ietf-l3-unicast-topology". Companion modules for the example module
defined in Appendix B are not provided (since it is just an example).
Like "ietf-network-state" and "ietf-network-topology-state",
"ietf-l3-unicast-topology" SHOULD NOT be supported by implementations
that support NMDA. The module is therefore defined in an appendix.
The definition of the module follows below. As the structure of the
module mirrors that of its underlying module, the YANG tree is not
depicted separately.
<CODE BEGINS> file "ietf-l3-unicast-topology-state@2018-02-26.yang"
module ietf-l3-unicast-topology-state {
yang-version 1.1;
namespace
"urn:ietf:params:xml:ns:yang:ietf-l3-unicast-topology-state";
prefix "l3t-s";
import ietf-network-state {
prefix "nw-s";
Clemm, et al. Standards Track [Page 20]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
}
import ietf-network-topology-state {
prefix "nt-s";
}
import ietf-l3-unicast-topology {
prefix "l3t";
}
organization
"IETF I2RS (Interface to the Routing System) Working Group";
contact
"WG Web: <https://datatracker.ietf.org/wg/i2rs/>
WG List: <mailto:i2rs@ietf.org>
Editor: Alexander Clemm
<mailto:ludwig@clemm.org>
Editor: Jan Medved
<mailto:jmedved@cisco.com>
Editor: Robert Varga
<mailto:robert.varga@pantheon.tech>
Editor: Xufeng Liu
<mailto:xufeng.liu.ietf@gmail.com>
Editor: Nitin Bahadur
<mailto:nitin_bahadur@yahoo.com>
Editor: Hariharan Ananthakrishnan
<mailto:hari@packetdesign.com>";
description
"This module defines a model for Layer 3 Unicast topology
state, representing topology that either is learned or
results from applying topology that has been configured per
the 'ietf-l3-unicast-topology' model, mirroring the
corresponding data nodes in this model.
This model mirrors 'ietf-l3-unicast-topology' but contains only
read-only state data. The model is not needed when the
underlying implementation infrastructure supports the Network
Management Datastore Architecture (NMDA).
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 8346;
see the RFC itself for full legal notices.";
Clemm, et al. Standards Track [Page 21]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
revision "2018-02-26" {
description
"Initial revision.";
reference
"RFC 8346: A YANG Data Model for Layer 3 Topologies";
}
augment "/nw-s:networks/nw-s:network/nw-s:network-types" {
description
"Introduce new network type for L3 Unicast topology";
uses l3t:l3-unicast-topology-type;
}
augment "/nw-s:networks/nw-s:network" {
when "nw-s:network-types/l3t-s:l3-unicast-topology" {
description
"Augmentation parameters apply only for networks with
L3 Unicast topology";
}
description
"L3 Unicast for the network as a whole";
uses l3t:l3-topology-attributes;
}
augment "/nw-s:networks/nw-s:network/nw-s:node" {
when "../nw-s:network-types/l3t-s:l3-unicast-topology" {
description
"Augmentation parameters apply only for networks with
L3 Unicast topology";
}
description
"L3 Unicast node-level attributes ";
uses l3t:l3-node-attributes;
}
augment "/nw-s:networks/nw-s:network/nt-s:link" {
when "../nw-s:network-types/l3t-s:l3-unicast-topology" {
description
"Augmentation parameters apply only for networks with
L3 Unicast topology";
}
description
"Augments topology link attributes";
uses l3t:l3-link-attributes;
}
augment "/nw-s:networks/nw-s:network/nw-s:node/"
+"nt-s:termination-point" {
when "../../nw-s:network-types/l3t-s:l3-unicast-topology" {
description
"Augmentation parameters apply only for networks with
L3 Unicast topology";
}
Clemm, et al. Standards Track [Page 22]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
description "Augments topology termination point configuration";
uses l3t:l3-termination-point-attributes;
}
notification l3-node-event {
description
"Notification event for L3 node";
leaf l3-event-type {
type l3t:l3-event-type;
description
"Event type";
}
uses nw-s:node-ref;
uses l3t:l3-unicast-topology-type;
uses l3t:l3-node-attributes;
}
notification l3-link-event {
description
"Notification event for L3 link";
leaf l3-event-type {
type l3t:l3-event-type;
description
"Event type";
}
uses nt-s:link-ref;
uses l3t:l3-unicast-topology-type;
uses l3t:l3-link-attributes;
}
notification l3-prefix-event {
description
"Notification event for L3 prefix";
leaf l3-event-type {
type l3t:l3-event-type;
description
"Event type";
}
uses nw-s:node-ref;
uses l3t:l3-unicast-topology-type;
container prefix {
description
"Contains L3 prefix attributes";
uses l3t:l3-prefix-attributes;
}
}
notification termination-point-event {
description
"Notification event for L3 termination point";
leaf l3-event-type {
type l3t:l3-event-type;
Clemm, et al. Standards Track [Page 23]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
description
"Event type";
}
uses nt-s:tp-ref;
uses l3t:l3-unicast-topology-type;
uses l3t:l3-termination-point-attributes;
}
}
<CODE ENDS>
Appendix B. Extending the Model
The model can be extended for specific Layer 3 Unicast types.
Examples include OSPF and IS-IS topologies. This appendix introduces
a YANG module that defines a simple topology model for OSPF. This
module is intended to serve as an example that illustrates how the
general topology model can be refined across multiple levels. It
does not constitute a full-fledged OSPF topology model, which may be
more comprehensive and refined than the model that is described here.
B.1. Example OSPF Topology
B.1.1. Model Overview
The following model shows how the Layer 3 Unicast topology model can
be extended, in this case, to cover OSPF topologies. For this
purpose, a set of augmentations are introduced in a separate YANG
module, "example-ospf-topology", whose structure is depicted in the
following diagram. As before, the notation syntax follows [RFC8340].
Note that one of the lines has been wrapped to adhere to the
72-character line limitation of RFCs.
Clemm, et al. Standards Track [Page 24]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
module: example-ospf-topology
augment /nw:networks/nw:network/nw:network-types/
l3t:l3-unicast-topology:
+--rw ospf!
augment /nw:networks/nw:network/l3t:l3-topology-attributes:
+--rw ospf-topology-attributes
+--rw area-id? area-id-type
augment /nw:networks/nw:network/nw:node/l3t:l3-node-attributes:
+--rw ospf-node-attributes
+--rw (router-type)?
| +--:(abr)
| | +--rw abr? empty
| +--:(asbr)
| | +--rw asbr? empty
| +--:(internal)
| | +--rw internal? empty
| +--:(pseudonode)
| +--rw pseudonode? empty
+--rw dr-interface-id? uint32
augment /nw:networks/nw:network/nt:link/l3t:l3-link-attributes:
+--rw ospf-link-attributes
augment /l3t:l3-node-event:
+---- ospf!
+---- ospf-node-attributes
+---- (router-type)?
| +--:(abr)
| | +---- abr? empty
| +--:(asbr)
| | +---- asbr? empty
| +--:(internal)
| | +---- internal? empty
| +--:(pseudonode)
| +---- pseudonode? empty
+---- dr-interface-id? uint32
augment /l3t:l3-link-event:
+---- ospf!
+---- ospf-link-attributes
The module augments "ietf-l3-unicast-topology" as follows:
o A new topology type for an OSPF topology is introduced.
o Additional topology attributes are defined in a new grouping that
augments l3-topology-attributes of the "ietf-l3-unicast-topology"
module. The attributes include an OSPF area-id identifying the
OSPF area.
Clemm, et al. Standards Track [Page 25]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
o Additional data objects for nodes are introduced by augmenting the
l3-node-attributes of the "ietf-l3-unicast-topology" module. New
objects include router-type and dr-interface-id for pseudonodes.
o Links are augmented with OSPF link attributes.
In addition, the module extends notifications for events concerning
Layer 3 nodes and links with OSPF attributes.
It should be noted that the model defined here represents topology
and is intended as an example. It does not define how to configure
OSPF routers or interfaces.
B.1.2. OSPF Topology YANG Module
The OSPF Topology YANG module is specified below. As mentioned, the
module is intended as an example for how the Layer 3 Unicast topology
model can be extended to cover OSPF topologies, but it is not
normative. Accordingly, the module is not delimited with
<CODE BEGINS> and <CODE ENDS> tags.
file "example-ospf-topology@2017-12-16.yang"
module example-ospf-topology {
yang-version 1.1;
namespace "urn:example:example-ospf-topology";
prefix "ex-ospft";
import ietf-yang-types {
prefix "yang";
}
import ietf-network {
prefix "nw";
}
import ietf-network-topology {
prefix "nt";
}
import ietf-l3-unicast-topology {
prefix "l3t";
}
description
"This module is intended as an example for how the
Layer 3 Unicast topology model can be extended to cover
OSPF topologies.";
typedef area-id-type {
type yang:dotted-quad;
description
"Area ID type.";
}
grouping ospf-topology-type {
Clemm, et al. Standards Track [Page 26]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
description
"Identifies the OSPF topology type.";
container ospf {
presence "indicates OSPF Topology";
description
"Its presence identifies the OSPF topology type.";
}
}
augment "/nw:networks/nw:network/nw:network-types/"
+ "l3t:l3-unicast-topology" {
description
"Defines the OSPF topology type.";
uses ospf-topology-type;
}
augment "/nw:networks/nw:network/l3t:l3-topology-attributes" {
when "../nw:network-types/l3t:l3-unicast-topology/" +
"ex-ospft:ospf" {
description
"Augments only for OSPF topology";
}
description
"Augments topology configuration";
container ospf-topology-attributes {
description
"Contains topology attributes";
leaf area-id {
type area-id-type;
description
"OSPF area ID";
}
}
}
augment "/nw:networks/nw:network/nw:node/l3t:l3-node-attributes" {
when "../../nw:network-types/l3t:l3-unicast-topology/" +
"ex-ospft:ospf" {
description
"Augments only for OSPF topology";
}
description
"Augments node configuration";
uses ospf-node-attributes;
}
augment "/nw:networks/nw:network/nt:link/l3t:l3-link-attributes" {
when "../../nw:network-types/l3t:l3-unicast-topology/" +
"ex-ospft:ospf" {
description
"Augments only for OSPF topology";
}
Clemm, et al. Standards Track [Page 27]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
description
"Augments link configuration";
uses ospf-link-attributes;
}
grouping ospf-node-attributes {
description
"OSPF node scope attributes";
container ospf-node-attributes {
description
"Contains node attributes";
choice router-type {
description
"Indicates router type";
case abr {
leaf abr {
type empty;
description
"The node is ABR";
}
}
case asbr {
leaf asbr {
type empty;
description
"The node is ASBR";
}
}
case internal {
leaf internal {
type empty;
description
"The node is internal";
}
}
case pseudonode {
leaf pseudonode {
type empty;
description
"The node is pseudonode";
}
}
}
leaf dr-interface-id {
when "../pseudonode" {
description
"Valid only for pseudonode";
}
type uint32;
Clemm, et al. Standards Track [Page 28]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
default "0";
description
"For pseudonodes, DR interface-id";
}
}
}
grouping ospf-link-attributes {
description
"OSPF link scope attributes";
container ospf-link-attributes {
description
"Contains OSPF link attributes";
}
} // ospf-link-attributes
augment "/l3t:l3-node-event" {
description
"OSPF node event";
uses ospf-topology-type;
uses ospf-node-attributes;
}
augment "/l3t:l3-link-event" {
description
"OSPF link event";
uses ospf-topology-type;
uses ospf-link-attributes;
}
}
Appendix C. An Example
This section contains an example of an instance data tree in JSON
encoding [RFC7951]. The example instantiates "ietf-l3-unicast-
topology" for the topology that is depicted in the following diagram.
There are three nodes: D1, D2, and D3. D1 has three termination
points: 1-0-1, 1-2-1, and 1-3-1. D2 has three termination points as
well: 2-1-1, 2-0-1, and 2-3-1. D3 has two termination points: 3-1-1
and 3-2-1. In addition, there are six links, two between each pair
of nodes, with one going in each direction.
Clemm, et al. Standards Track [Page 29]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
+------------+ +------------+
| D1 | | D2 |
/-\ /-\ /-\ /-\
| | 1-0-1 | |---------------->| | 2-1-1 | |
| | 1-2-1 | |<----------------| | 2-0-1 | |
\-/ 1-3-1 \-/ \-/ 2-3-1 \-/
| /----\ | | /----\ |
+---| |---+ +---| |---+
\----/ \----/
A | A |
| | | |
| | | |
| | +------------+ | |
| | | D3 | | |
| | /-\ /-\ | |
| +----->| | 3-1-1 | |-------+ |
+---------| | 3-2-1 | |<---------+
\-/ \-/
| |
+------------+
Figure 2: A Network Topology Example
The corresponding instance data tree is depicted below. Note that
some lines have been wrapped to adhere to the 72-character line
limitation of RFCs.
{
"ietf-network:networks": {
"network": [
{
"network-types": {
"ietf-l3-unicast-topology:l3-unicast-topology": {}
},
"network-id": "l3-topo-example",
"node": [
{
"node-id": "D1",
"termination-point": [
{
"tp-id": "1-0-1",
"ietf-l3-unicast-topology:
l3-termination-point-attributes": {
"unnumbered-id:": 101
}
},
{
"tp-id": "1-2-1",
Clemm, et al. Standards Track [Page 30]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
"ietf-l3-unicast-topology:
l3-termination-point-attributes": {
"unnumbered-id:": 121
}
},
{
"tp-id": "1-3-1",
"ietf-l3-unicast-topology:
l3-termination-point-attributes": {
"unnumbered-id:": 131
}
}
],
"ietf-l3-unicast-topology:l3-node-attributes": {
"router-id": ["203.0.113.1"]
}
},
{
"node-id": "D2",
"termination-point": [
{
"tp-id": "2-0-1",
"ietf-l3-unicast-topology:
l3-termination-point-attributes": {
"unnumbered-id:": 201
}
},
{
"tp-id": "2-1-1",
"ietf-l3-unicast-topology:
l3-termination-point-attributes": {
"unnumbered-id:": 211
}
},
{
"tp-id": "2-3-1",
"ietf-l3-unicast-topology:
l3-termination-point-attributes": {
"unnumbered-id:": 231
}
}
],
"ietf-l3-unicast-topology:l3-node-attributes": {
"router-id": ["203.0.113.2"]
}
},
{
"node-id": "D3",
Clemm, et al. Standards Track [Page 31]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
"termination-point": [
{
"tp-id": "3-1-1",
"ietf-l3-unicast-topology:
l3-termination-point-attributes": {
"unnumbered-id:": 311
}
},
{
"tp-id": "3-2-1",
"ietf-l3-unicast-topology:
l3-termination-point-attributes": {
"unnumbered-id:": 321
}
}
],
"ietf-l3-unicast-topology:l3-node-attributes": {
"router-id": ["203.0.113.3"]
}
}
],
"ietf-network-topology:link": [
{
"link-id": "D1,1-2-1,D2,2-1-1",
"source": {
"source-node": "D1",
"source-tp": "1-2-1"
}
"destination": {
"dest-node": "D2",
"dest-tp": "2-1-1"
},
"ietf-l3-unicast-topology:l3-link-attributes": {
"metric1": "100"
}
},
{
"link-id": "D2,2-1-1,D1,1-2-1",
"source": {
"source-node": "D2",
"source-tp": "2-1-1"
}
"destination": {
"dest-node": "D1",
"dest-tp": "1-2-1"
},
"ietf-l3-unicast-topology:l3-link-attributes": {
"metric1": "100"
Clemm, et al. Standards Track [Page 32]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
}
},
{
"link-id": "D1,1-3-1,D3,3-1-1",
"source": {
"source-node": "D1",
"source-tp": "1-3-1"
}
"destination": {
"dest-node": "D3",
"dest-tp": "3-1-1"
},
"ietf-l3-unicast-topology:l3-link-attributes": {
"metric1": "100"
}
},
{
"link-id": "D3,3-1-1,D1,1-3-1",
"source": {
"source-node": "D3",
"source-tp": "3-1-1"
}
"destination": {
"dest-node": "D1",
"dest-tp": "1-3-1"
},
"ietf-l3-unicast-topology:l3-link-attributes": {
"metric1": "100"
}
},
{
"link-id": "D2,2-3-1,D3,3-2-1",
"source": {
"source-node": "D2",
"source-tp": "2-3-1"
}
"destination": {
"dest-node": "D3",
"dest-tp": "3-2-1"
},
"ietf-l3-unicast-topology:l3-link-attributes": {
"metric1": "100"
}
},
{
"link-id": "D3,3-2-1,D2,2-3-1",
"source": {
"source-node": "D3",
Clemm, et al. Standards Track [Page 33]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
"source-tp": "3-2-1"
}
"destination": {
"dest-node": "D2",
"dest-tp": "2-3-1"
},
"ietf-l3-unicast-topology:l3-link-attributes": {
"metric1": "100"
}
}
]
}
]
}
}
Figure 3: Instance Data Tree
Acknowledgments
We wish to acknowledge the helpful contributions, comments, and
suggestions that were received from Alia Atlas, Andy Bierman, Benoit
Claise, Joel Halpern, Susan Hares, Ladislav Lhotka, Carl Moberg,
Carlos Pignataro, Juergen Schoenwaelder, Michal Vasco, and Kent
Watsen.
Contributors
The model presented in this document was contributed to by more
people than can be listed on the author list. Additional
contributors include:
o Vishnu Pavan Beeram, Juniper
o Igor Bryskin, Huawei
o Ken Gray, Cisco
o Aihua Guo, Huawei
o Tom Nadeau, Brocade
o Tony Tkacik
o Aleksandr Zhdankin, Cisco
Clemm, et al. Standards Track [Page 34]
^L
RFC 8346 YANG Data Model for L3 Topologies March 2018
Authors' Addresses
Alexander Clemm
Huawei USA - Futurewei Technologies Inc.
Santa Clara, CA
United States of America
Email: ludwig@clemm.org, alexander.clemm@huawei.com
Jan Medved
Cisco
Email: jmedved@cisco.com
Robert Varga
Pantheon Technologies SRO
Email: robert.varga@pantheon.tech
Xufeng Liu
Jabil
Email: xufeng.liu.ietf@gmail.com
Hariharan Ananthakrishnan
Packet Design
Email: hari@packetdesign.com
Nitin Bahadur
Bracket Computing
Email: nitin_bahadur@yahoo.com
Clemm, et al. Standards Track [Page 35]
^L
|