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
|
module openconfig-mpls-ldp {
yang-version "1";
// namespace
namespace "http://openconfig.net/yang/ldp";
prefix "oc-ldp";
// import some basic types
import openconfig-extensions { prefix oc-ext; }
import openconfig-inet-types { prefix oc-inet; }
import openconfig-interfaces { prefix oc-if; }
import openconfig-yang-types { prefix oc-yang; }
import openconfig-types { prefix oc-types; }
// meta
organization "OpenConfig working group";
contact
"OpenConfig working group
netopenconfig@googlegroups.com";
description
"Configuration of Label Distribution Protocol global and LSP-
specific parameters for IGP-congruent LSPs.
This model reuses data items defined in the IETF YANG model for
LDP described by draft-ietf-mpls-ldp-yang-04, YANG Data Model for
MPLS LDP, following an alternate structure.
Portions of this code were derived from draft-ietf-mpls-ldp-yang-04.
Please reproduce this note if possible.
IETF code is subject to the following copyright and license:
Copyright (c) IETF Trust and the persons identified as authors of
the code.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, is permitted pursuant to, and subject to the license
terms contained in, the Simplified BSD License set forth in
Section 4.c of the IETF Trust's Legal Provisions Relating
to IETF Documents (http://trustee.ietf.org/license-info).";
oc-ext:openconfig-version "3.0.0";
revision "2018-07-02" {
description
"Add new RSVP-TE statistics, remove associated-rsvp-session
leaf. Remove use of date-and-time.";
reference "3.0.0";
}
revision "2018-06-16" {
description
"Included attributes for base LDP configuration.";
reference "2.6.0";
}
revision "2018-06-13" {
description
"Add ttl-propagation to global MPLS config";
reference "2.5.0";
}
revision "2018-06-05" {
description
"Fixed bugs in when statements on RSVP-TE attributes";
reference "2.4.2";
}
revision "2017-08-24" {
description
"Minor formatting fixes.";
reference "2.4.1";
}
revision "2017-06-21" {
description
"Add TC bits typedef.";
reference "2.4.0";
}
revision "2017-03-22" {
description
"Add RSVP calculated-absolute-subscription-bw";
reference "2.3.0";
}
revision "2017-01-26" {
description
"Add RSVP Tspec, clarify units for RSVP, remove unused LDP";
reference "2.2.0";
}
revision "2016-12-15" {
description
"Add additional MPLS parameters";
reference "2.1.0";
}
revision "2016-09-01" {
description
"Revisions based on implementation feedback";
reference "2.0.0";
}
revision "2016-08-08" {
description
"Public release of MPLS models";
reference "1.0.1";
}
// typedef statements
typedef mpls-ldp-adjacency-type {
type enumeration {
enum LINK {
description
"Link LDP adjacency";
}
enum TARGETED {
description
"Targeted LDP adjacency";
}
}
description
"enumerated type for specifying LDP adjacencies";
}
typedef mpls-ldp-afi {
type enumeration {
enum IPV4 {
description
"IPv4 AFI for LDP adjancencies";
}
enum IPV6 {
description
"IPv6 AFI for LDP adjancencies";
}
}
description
"enumerated type for specifying LDP AFIs";
}
// grouping statements
grouping ldp-global {
description
"Global LDP signaling configuration";
container ldp {
description
"LDP global signaling configuration";
container global {
description
"Platform wide LDP configuration and state";
uses mpls-ldp-global;
uses mpls-ldp-graceful-restart;
uses mpls-ldp-authentication-top;
}
uses mpls-ldp-interface-attributes-top;
uses mpls-ldp-targeted-top;
uses mpls-ldp-neighbors-top;
}
}
grouping mpls-ldp-authentication-top {
description
"Grouping containing LDP authentication attributes";
container authentication {
description
"Global LDP authentication";
container config {
description
"Configuration of LDP authentication attributes";
uses mpls-ldp-authentication-config;
}
container state {
config false;
description
"LDP authentication state.";
uses mpls-ldp-authentication-config;
}
}
}
grouping mpls-ldp-neighbors-top {
description
"Global LDP neighbor attributes";
container neighbors {
description
"State and configuration LDP neighbors attributes";
list neighbor {
key "lsr-id label-space-id";
description
"List of LDP neighbors and their attributes.";
leaf lsr-id {
type leafref {
path "../config/lsr-id";
}
description
"Neighbor label switch router identifier.";
}
leaf label-space-id {
type leafref {
path "../config/label-space-id";
}
description
"Label space ID of the neighbor.";
}
container config {
description
"Neighbor configuration attributes.";
uses mpls-ldp-neighbor-config;
}
container state {
config false;
description
"Neighbor state attributes.";
uses mpls-ldp-neighbor-config;
}
container hello-adjacencies {
config false;
description "Top container for hello adjacencies
for a given LDP neighbor.";
list hello-adjacency {
key "remote-address local-address";
config false;
description
"List of hello adjacencies for a given LDP
neighbor.";
leaf remote-address {
config false;
description
"Within the LDP adjacency, this attribute
shows the neighbor address.";
type leafref {
path "../state/remote-address";
}
}
leaf local-address {
config false;
description
"Within the LDP adjacency, this attribute
shows the local address.";
type leafref {
path "../state/local-address";
}
}
container state {
description
"State information for a particular LDP
hello adjacency.";
uses mpls-ldp-adjacency-state;
}
uses oc-if:interface-ref-state;
container hello-holdtime {
description
"Specifies the time the sending LSR will
maintain its record of Hellos from the
receiving LSR";
container state {
description
"State attributes related to the
hello-holdtime.";
config false;
uses mpls-ldp-hello-holdtime-state;
}
}
}
}
uses mpls-ldp-authentication-top;
}
}
}
grouping mpls-ldp-neighbor-config {
description
"Global configuration for LDP neighbors.";
leaf lsr-id {
type oc-inet:ip-address;
description
"Neighbor label switch router identifier.";
}
leaf label-space-id {
type uint16;
description
"Label space ID of the neighbor.";
}
}
grouping mpls-ldp-adjacency-state {
description
"Set of LDP neighbor related state attributes.";
leaf remote-address {
description
"Within the LDP adjacency, this attribute
shows the neighbor address.";
type oc-inet:ip-address;
}
leaf local-address {
description
"Within the LDP adjacency, this attribute
shows the local address.";
type oc-inet:ip-address;
}
leaf adjacency-type {
description
"This attributes defines if the LDP
adjacency is from a direct link or from
targeted discovery.";
type oc-ldp:mpls-ldp-adjacency-type;
}
leaf last-clear {
type oc-types:timeticks64;
description
"Timestamp of the last time the interface counters
were cleared. The value is the timestamp in
nanoseconds relative to the Unix Epoch (Jan 1,
1970 00:00:00 UTC).";
}
leaf hello-received {
type oc-yang:counter64;
description
"Number of Hello messaged received by the device";
}
leaf hello-dropped {
type oc-yang:counter64;
description
"Number of Hello messaged dropped by the device";
}
}
grouping mpls-ldp-hello-holdtime-state {
description
"Grouping containing the state attributes
for hello holdtime.";
leaf adjacent {
description
"Hello holdtime attribute learned from the
LDP neighbor";
type uint16;
}
leaf negotiated {
description
"Hello holdtime attribute negotiated between
the LDP neighbor and the local router.";
type uint16;
}
leaf hello-expiration {
description
"Expiration time for the hello holdtime.";
type oc-types:timeticks64;
}
leaf next-hello {
description
"Time when the next LDP hello will be sent to
the adjacent neighbor.";
type oc-types:timeticks64;
}
}
grouping mpls-ldp-global {
description
"Global LDP attributes";
container config {
description
"Global LDP configuration attributes.";
uses mpls-ldp-global-config;
}
container state {
config false;
description
"Global LDP state information.";
uses mpls-ldp-global-config;
}
}
grouping mpls-ldp-global-config {
description
"Grouping containing platform wide LDP information";
leaf lsr-id {
type oc-inet:ip-address;
description
"Global label switch router identifier
configuration.";
reference "RFC5036 LDP Specification";
}
}
grouping mpls-ldp-interface-attributes-top {
description
"Top-level structure grouping for interface
attributes";
container interface-attributes {
description
"Container including attributes for LDP-enabled
interfaces";
container config {
description
"Configuration of per-interface LDP parameters";
uses mpls-ldp-hello-timers-top-config;
}
container state {
config false;
description
"Per-interface LDP protocol and state information";
uses mpls-ldp-hello-timers-top-config;
}
container interfaces {
description
"Container aggregating all interfaces and their
LDP-specific attributes.";
list interface {
key "interface-id";
description
"list of per-interface LDP configurations";
leaf interface-id {
type leafref {
path "../config/interface-id";
}
description
"reference to the interface-id data";
}
container config {
description
"Configuration of per-interface LDP parameters";
uses mpls-ldp-interfaces-config;
uses mpls-ldp-hello-timers-top-config;
}
container state {
config false;
description
"Per-interface LDP protocol and state information";
uses mpls-ldp-interfaces-config;
uses mpls-ldp-hello-timers-top-config;
container counters {
config false;
description
"Interface specific LDP statistics and counters";
}
}
uses oc-if:interface-ref;
uses mpls-ldp-address-families-ldp-top;
}
}
}
}
grouping mpls-ldp-address-families-ldp-top {
description
"Grouping containing the state and configuration
attributes for adress families.";
container address-families {
description
"Top container comprising the adress families
attributes";
list address-family {
key "afi-name";
description
"List for attributes related to address-families for LDP.";
leaf afi-name {
type leafref {
path "../config/afi-name";
}
description
"Adress-family name atttibute (IPv4, IPv6).";
}
container config {
description
"Configuration attributes related to address-families
for LDP.";
uses mpls-ldp-address-family-config;
uses admin-config;
}
container state {
description
"State attributes related to address-families for LDP.";
config false;
uses mpls-ldp-address-family-config;
uses admin-config;
}
}
}
}
grouping mpls-ldp-hello-timers-top-config {
description
"Grouping containing interface-related attributes
that can be configured for LDP.";
leaf hello-holdtime {
type uint16;
description
"Defines the time for which a neighbor adjacency will
be kept by the router while it waits for a new link
Hello message.";
reference "RFC5036 LDP Specification";
}
leaf hello-interval {
type uint16;
description
"Defines the interval for sending Hello messages on
each link LDP adjacency.";
}
}
grouping mpls-ldp-targeted-top {
description
"Grouping containing attributes for targeted LDP";
container targeted {
description
"Top container for targeted LDP state and configuration
attributes.";
container config {
description
"Configuration attributes related to targeted LDP.";
uses mpls-ldp-targeted-attributes-top-config;
}
container state {
config false;
description
"State attributes related to targeted LDP.";
uses mpls-ldp-targeted-attributes-top-config;
}
uses mpls-ldp-address-targeted-ldp-top;
}
}
grouping mpls-ldp-address-targeted-ldp-top {
description
"Grouping containing address attributes for targeted LDP.";
container address-families {
description
"Global container for IPv4 and IPv6 attributes for LDP.";
list address-family {
key "afi-name";
description
"List of address families for targeted LDP
configuration";
leaf afi-name {
type leafref {
path "../config/afi-name";
}
description
"Adress-family name atttibute (IPv4, IPv6).";
}
container config {
description
"Address-family configuration for targeted LDP";
uses mpls-ldp-address-family-config;
}
container state {
config false;
description
"Address-family state for targeted LDP";
uses mpls-ldp-address-family-config;
}
container targets {
description
"Container aggregating all targeted sessions and
their LDP-specific attributes.";
list target {
key "remote-address";
description
"List of LDP targets configuration";
leaf remote-address {
type leafref {
path "../config/remote-address";
}
description
"Neighbor address of the targeted LDP session";
}
container config {
description
"Configuration parameters of a targeted LDP
adjacency";
leaf remote-address {
type oc-inet:ip-address;
description
"Configuration of neighbor address of the
targeted LDP adjacency";
}
leaf local-address {
type oc-inet:ip-address;
description
"Local IP address of the LDP adjacency";
}
uses admin-config;
uses mpls-ldp-hello-timers-top-config;
}
container state {
config false;
description
"State attributes of a targeted LDP adjacency";
leaf remote-address {
config false;
type oc-inet:ip-address;
description
"Neighbor address of the targeted LDP adjacency";
}
leaf local-address {
config false;
type oc-inet:ip-address;
description
"Local IP address of the LDP adjacency";
}
uses admin-config;
uses mpls-ldp-hello-timers-top-config;
}
}
}
}
}
}
grouping mpls-ldp-address-family-config {
description
"Grouping containing adress-family name atttibute";
leaf afi-name {
description
"Adress-family name atttibute (IPv4, IPv6).";
type oc-ldp:mpls-ldp-afi;
}
}
grouping mpls-ldp-targeted-attributes-top-config {
description
"Grouping containing targeted LDP configuration
attributes.";
uses mpls-ldp-hello-timers-top-config;
leaf hello-accept {
type boolean;
description
"Enables or disables the acceptance of targeted LDP
hello messages.";
reference "RFC5036 LDP Specification";
}
}
grouping mpls-ldp-interfaces-config {
description
"LDP configuration information relevant to an interface";
leaf interface-id {
type oc-if:interface-id;
description
"Identifier for the interface";
}
}
grouping mpls-ldp-graceful-restart {
description
"Attributes relating to LDP Graceful-Restart";
container graceful-restart {
description
"Top container for LDP graceful-restart attributes";
container config {
description
"LDP graceful-restart configuration attributes.";
uses mpls-ldp-graceful-restart-config;
}
container state {
config false;
description
"LDP graceful-restart state attributes.";
uses mpls-ldp-graceful-restart-config;
}
}
}
grouping mpls-ldp-graceful-restart-config {
description
"Configuration parameters relating to LDP Graceful-Restart";
uses admin-config;
leaf reconnect-time {
type uint16;
description
"Interval for which the remote LDP peers
will wait for the local node to reconnect after a
failure";
reference "RFC3478 Graceful Restart Mechanism for Label
Distribution Protocol";
}
leaf recovery-time {
type uint16;
description
"Interval used to specify the time for the remote
peer to maintain the MPLS forwarding state after
the local node has succesfully reconnected";
reference "RFC3478 Graceful Restart Mechanism for Label
Distribution Protocol";
}
leaf forwarding-holdtime {
type uint16;
description
"Time that defines the interval for keeping the
node in recovery mode.";
reference "RFC3478 Graceful Restart Mechanism for Label
Distribution Protocol";
}
leaf helper-enable {
type boolean;
description
"Enables the graceful restart helper for LDP.";
}
}
grouping igp-tunnel-ldp {
description
"common defintiions for LDP-signaled LSP tunnel
types";
}
grouping igp-lsp-ldp-setup {
description
"grouping for LDP setup attributes";
container ldp {
description
"LDP signaling setup for IGP-congruent LSPs";
uses igp-tunnel-ldp;
}
}
grouping mpls-ldp-authentication-config {
description
"LDP authentication parameters container.";
leaf enable {
type boolean;
default false;
description
"Enables LDP authentication on the node.";
}
leaf authentication-key {
type oc-types:routing-password;
description
"authenticate LDP signaling
messages";
reference
"RFC1321 The MD5 Message-Digest Algorithm
RFC5036 LDP Specification";
}
}
grouping admin-config {
description
"Re-usable grouping to enable or disable a particular LDP feature.";
leaf enabled {
type boolean;
default false;
description
"When set to true, the functionality within which this leaf is
defined is enabled, when set to false it is explicitly disabled.";
}
}
// data definition statements
// augment statements
// rpc statements
// notification statements
}
|