blob: c214ce230c294fdd67e814f7c76159caeb6a616b [file] [log] [blame]
Thomas Vachuska8ca75a22017-08-24 16:12:59 -07001module openconfig-mpls {
2
3 yang-version "1";
4
5 // namespace
6 namespace "http://openconfig.net/yang/mpls";
7
8 prefix "oc-mpls";
9
10
11 // import some basic types
12 import openconfig-mpls-types { prefix oc-mplst; }
13 import openconfig-mpls-rsvp { prefix oc-rsvp; }
14 import openconfig-mpls-ldp { prefix oc-ldp; }
15 import openconfig-types { prefix oc-types; }
16 import openconfig-interfaces { prefix oc-if; }
17 import openconfig-extensions { prefix oc-ext; }
18 import openconfig-segment-routing { prefix oc-sr; }
19
20 // include submodules
21 include openconfig-mpls-te;
22 include openconfig-mpls-igp;
23 include openconfig-mpls-static;
24
25
26 // meta
27 organization "OpenConfig working group";
28
29 contact
30 "OpenConfig working group
31 netopenconfig@googlegroups.com";
32
33 description
34 "This module provides data definitions for configuration of
35 Multiprotocol Label Switching (MPLS) and associated protocols for
36 signaling and traffic engineering.
37
38 RFC 3031: Multiprotocol Label Switching Architecture
39
40 The MPLS / TE data model consists of several modules and
41 submodules as shown below. The top-level MPLS module describes
42 the overall framework. Three types of LSPs are supported:
43
44 i) traffic-engineered (or constrained-path)
45
46 ii) IGP-congruent (LSPs that follow the IGP path)
47
48 iii) static LSPs which are not signaled
49
50 The structure of each of these LSP configurations is defined in
51 corresponding submodules. Companion modules define the relevant
52 configuration and operational data specific to key signaling
53 protocols used in operational practice.
54
55
56 +-------+
57 +---------------->| MPLS |<--------------+
58 | +-------+ |
59 | ^ |
60 | | |
61 +----+-----+ +--------+-------+ +-----+-----+
62 | TE LSPs | | IGP-based LSPs | |static LSPs|
63 | | | | | |
64 +----------+ +----------------+ +-----------+
65 ^ ^ ^ ^
66 | +----------------+ | +--------+
67 | | | |
68 | +------+ +-+---+-+ +--+--+
69 +---+ RSVP | |SEGMENT| | LDP |
70 +------+ |ROUTING| +-----+
71 +-------+
72 ";
73
74 oc-ext:openconfig-version "2.4.0";
75
76 revision "2017-06-21" {
77 description
78 "Add TC bits typedef.";
79 reference "2.4.0";
80 }
81
82 revision "2017-03-22" {
83 description
84 "Add RSVP calculated-absolute-subscription-bw";
85 reference "2.3.0";
86 }
87
88 revision "2017-01-26" {
89 description
90 "Add RSVP Tspec, clarify units for RSVP, remove unused LDP";
91 reference "2.2.0";
92 }
93
94 revision "2016-12-15" {
95 description
96 "Add additional MPLS parameters";
97 reference "2.1.0";
98 }
99
100 revision "2016-09-01" {
101 description
102 "Revisions based on implementation feedback";
103 reference "2.0.0";
104 }
105
106 revision "2016-08-08" {
107 description
108 "Public release of MPLS models";
109 reference "1.0.1";
110 }
111
112
113 // grouping statements
114
115 grouping mpls-admin-group_config {
116 description
117 "configuration data for MPLS link admin groups";
118
119 leaf admin-group-name {
120 type string;
121 description
122 "name for mpls admin-group";
123 }
124
125 leaf bit-position {
126 type uint32;
127 description
128 "bit-position value for mpls admin-group. The value
129 for the admin group is an integer that represents one
130 of the bit positions in the admin-group bitmask. Values
131 between 0 and 31 are interpreted as the original limit
132 of 32 admin groups. Values >=32 are interpreted as
133 extended admin group values as per RFC7308.";
134 }
135
136 }
137
138 grouping mpls-admin-groups-top {
139
140 description
141 "top-level mpls admin-groups config
142 and state containers";
143
144 container mpls-admin-groups {
145 description
146 "Top-level container for admin-groups configuration
147 and state";
148
149 list admin-group {
150 key "admin-group-name";
151 description
152 "configuration of value to name mapping
153 for mpls affinities/admin-groups";
154
155 leaf admin-group-name {
156 type leafref {
157 path "../config/admin-group-name";
158 }
159 description
160 "name for mpls admin-group";
161 }
162 container config {
163 description
164 "Configurable items for admin-groups";
165 uses mpls-admin-group_config;
166 }
167
168 container state {
169 config false;
170 description
171 "Operational state for admin-groups";
172 uses mpls-admin-group_config;
173 }
174 }
175 }
176 }
177
178 grouping mpls-te-igp-flooding-bandwidth_config {
179 description
180 "Configurable items for igp flooding bandwidth
181 threshold configuration.";
182 leaf threshold-type {
183 type enumeration {
184 enum DELTA {
185 description
186 "DELTA indicates that the local
187 system should flood IGP updates when a
188 change in reserved bandwidth >= the specified
189 delta occurs on the interface.";
190 }
191 enum THRESHOLD_CROSSED {
192 description
193 "THRESHOLD-CROSSED indicates that
194 the local system should trigger an update (and
195 hence flood) the reserved bandwidth when the
196 reserved bandwidth changes such that it crosses,
197 or becomes equal to one of the threshold values.";
198 }
199 }
200 description
201 "The type of threshold that should be used to specify the
202 values at which bandwidth is flooded. DELTA indicates that
203 the local system should flood IGP updates when a change in
204 reserved bandwidth >= the specified delta occurs on the
205 interface. Where THRESHOLD_CROSSED is specified, the local
206 system should trigger an update (and hence flood) the
207 reserved bandwidth when the reserved bandwidth changes such
208 that it crosses, or becomes equal to one of the threshold
209 values";
210 }
211
212 leaf delta-percentage {
213 when "../threshold-type = 'DELTA'" {
214 description
215 "The percentage delta can only be specified when the
216 threshold type is specified to be a percentage delta of
217 the reserved bandwidth";
218 }
219 type oc-types:percentage;
220 description
221 "The percentage of the maximum-reservable-bandwidth
222 considered as the delta that results in an IGP update
223 being flooded";
224 }
225
226 leaf threshold-specification {
227 when "../threshold-type = 'THRESHOLD_CROSSED'" {
228 description
229 "The selection of whether mirrored or separate threshold
230 values are to be used requires user specified thresholds to
231 be set";
232 }
233 type enumeration {
234 enum MIRRORED_UP_DOWN {
235 description
236 "MIRRORED_UP_DOWN indicates that a single set of
237 threshold values should be used for both increasing
238 and decreasing bandwidth when determining whether
239 to trigger updated bandwidth values to be flooded
240 in the IGP TE extensions.";
241 }
242 enum SEPARATE_UP_DOWN {
243 description
244 "SEPARATE_UP_DOWN indicates that a separate
245 threshold values should be used for the increasing
246 and decreasing bandwidth when determining whether
247 to trigger updated bandwidth values to be flooded
248 in the IGP TE extensions.";
249 }
250 }
251 description
252 "This value specifies whether a single set of threshold
253 values should be used for both increasing and decreasing
254 bandwidth when determining whether to trigger updated
255 bandwidth values to be flooded in the IGP TE extensions.
256 MIRRORED-UP-DOWN indicates that a single value (or set of
257 values) should be used for both increasing and decreasing
258 values, where SEPARATE-UP-DOWN specifies that the increasing
259 and decreasing values will be separately specified";
260 }
261
262 leaf-list up-thresholds {
263 when "../threshold-type = 'THRESHOLD_CROSSED'" +
264 "and ../threshold-specification = 'SEPARATE_UP_DOWN'" {
265 description
266 "A list of up-thresholds can only be specified when the
267 bandwidth update is triggered based on crossing a
268 threshold and separate up and down thresholds are
269 required";
270 }
271 type oc-types:percentage;
272 description
273 "The thresholds (expressed as a percentage of the maximum
274 reservable bandwidth) at which bandwidth updates are to be
275 triggered when the bandwidth is increasing.";
276 }
277
278 leaf-list down-thresholds {
279 when "../threshold-type = 'THRESHOLD_CROSSED'" +
280 "and ../threshold-specification = 'SEPARATE_UP_DOWN'" {
281 description
282 "A list of down-thresholds can only be specified when the
283 bandwidth update is triggered based on crossing a
284 threshold and separate up and down thresholds are
285 required";
286 }
287 type oc-types:percentage;
288 description
289 "The thresholds (expressed as a percentage of the maximum
290 reservable bandwidth) at which bandwidth updates are to be
291 triggered when the bandwidth is decreasing.";
292 }
293
294 leaf-list up-down-thresholds {
295 when "../threshold-type = 'THRESHOLD_CROSSED'" +
296 "and ../threshold-specification = 'MIRRORED_UP_DOWN'" {
297 description
298 "A list of thresholds corresponding to both increasing
299 and decreasing bandwidths can be specified only when an
300 update is triggered based on crossing a threshold, and
301 the same up and down thresholds are required.";
302 }
303 type oc-types:percentage;
304 description
305 "The thresholds (expressed as a percentage of the maximum
306 reservable bandwidth of the interface) at which bandwidth
307 updates are flooded - used both when the bandwidth is
308 increasing and decreasing";
309 }
310 }
311
312
313 grouping mpls-te-igp-flooding-bandwidth {
314 description
315 "Top level group for traffic engineering
316 database flooding options";
317 container igp-flooding-bandwidth {
318 description
319 "Interface bandwidth change percentages
320 that trigger update events into the IGP traffic
321 engineering database (TED)";
322 container config {
323 description
324 "Configuration parameters for TED
325 update threshold ";
326 uses mpls-te-igp-flooding-bandwidth_config;
327 }
328 container state {
329 config false;
330 description
331 "State parameters for TED update threshold ";
332 uses mpls-te-igp-flooding-bandwidth_config;
333 }
334 }
335 }
336
337
338 grouping te-lsp-delay_config {
339 description
340 "Group for the timers goerning the delay
341 in installation and cleanup of TE LSPs";
342
343 leaf install-delay {
344 type uint16 {
345 range 0..3600;
346 }
347 units seconds;
348 description
349 "delay the use of newly installed te lsp for a
350 specified amount of time.";
351 }
352
353 leaf cleanup-delay {
354 type uint16;
355 units seconds;
356 description
357 "delay the removal of old te lsp for a specified
358 amount of time";
359 }
360 }
361
362 grouping te-interface-attributes-top {
363 description
364 "Top level grouping for attributes
365 for TE interfaces.";
366
367 list interface {
368 key "interface-id";
369 description
370 "List of TE interfaces";
371
372 leaf interface-id {
373 type leafref {
374 path "../config/interface-id";
375 }
376 description
377 "Reference to the interface id list key";
378 }
379
380 container config {
381 description
382 "Configuration parameters related to TE interfaces:";
383 uses te-interface-attributes_config;
384 }
385
386 container state {
387 config false;
388 description
389 "State parameters related to TE interfaces";
390 uses te-interface-attributes_config;
391 }
392
393 uses oc-if:interface-ref;
394
395 uses mpls-te-igp-flooding-bandwidth;
396 }
397 }
398
399 grouping te-interface-attributes_config {
400 description
401 "global level definitions for interfaces
402 on which TE is run";
403
404 leaf interface-id {
405 type oc-if:interface-id;
406 description
407 "Id of the interface";
408 }
409
410 leaf te-metric {
411 type uint32;
412 description
413 "TE specific metric for the link";
414 }
415
416 leaf-list srlg-membership {
417 type leafref {
418 path "../../../../te-global-attributes/srlgs/srlg/name";
419 }
420 description
421 "list of references to named shared risk link groups that the
422 interface belongs to.";
423 }
424
425 leaf-list admin-group {
426 type string;
427 description
428 "list of admin groups (by name) on the interface";
429 }
430 }
431
432 grouping mpls-te-lsp-timers {
433 description
434 "Grouping for traffic engineering timers";
435 container te-lsp-timers {
436 description
437 "Definition for delays associated with setup
438 and cleanup of TE LSPs";
439
440 container config {
441 description
442 "Configuration parameters related
443 to timers for TE LSPs";
444
445 uses te-lsp-delay_config;
446 uses te-tunnel-reoptimize_config;
447 }
448
449 container state {
450 config false;
451 description
452 "State related to timers for TE LSPs";
453
454 uses te-lsp-delay_config;
455 uses te-tunnel-reoptimize_config;
456 }
457 }
458 }
459
460 grouping mpls-global_config {
461 description
462 "Definition of global MPLS configuration parameters";
463
464 leaf null-label {
465 type identityref {
466 base oc-mplst:NULL_LABEL_TYPE;
467 }
468 default oc-mplst:IMPLICIT;
469 description
470 "The null-label type used, implicit or explicit";
471 }
472 }
473
474 grouping mpls-global-top {
475 description
476 "Top level grouping for global MPLS configuration ";
477
478 container config {
479 description
480 "Top level global MPLS configuration";
481 uses mpls-global_config;
482 }
483
484 container state {
485 config false;
486 description
487 "Top level global MPLS state";
488 uses mpls-global_config;
489 }
490 }
491
492 grouping mpls-interfaces-top {
493 description
494 "Top level grouping for attributes
495 for MPLS-enabled interfaces.";
496 container interface-attributes {
497 description
498 "Parameters related to MPLS interfaces";
499 list interface {
500 key "interface-id";
501 description
502 "List of TE interfaces";
503
504 leaf interface-id {
505 type leafref {
506 path "../config/interface-id";
507 }
508 description
509 "Reference to the interface id list key";
510 }
511
512 container config {
513 description
514 "Configuration parameters related to MPLS interfaces:";
515 uses mpls-interface-attributes-config;
516 }
517
518 container state {
519 config false;
520 description
521 "State parameters related to TE interfaces";
522 uses mpls-interface-attributes-config;
523 }
524
525 uses oc-if:interface-ref;
526 }
527 }
528 }
529
530 grouping mpls-interface-attributes-config {
531 description
532 "global level definitions for interfaces
533 on which MPLS is run";
534
535 leaf interface-id {
536 type oc-if:interface-id;
537 description
538 "Indentifier for the MPLS interface";
539 }
540
541 leaf mpls-enabled {
542 type boolean;
543 default false;
544 description
545 "Enable MPLS forwarding on this interface";
546 }
547 }
548
549 grouping mpls-label-block-config {
550 description
551 "Configuration parameters relating to an MPLS label block.";
552
553 leaf local-id {
554 type string;
555 description
556 "A local identifier for the global label block allocation.";
557 }
558
559 leaf lower-bound {
560 type oc-mplst:mpls-label;
561 description
562 "Lower bound of the global label block. The block is defined to include
563 this label.";
564 }
565
566 leaf upper-bound {
567 type oc-mplst:mpls-label;
568 description
569 "Upper bound for the global label block. The block is defined to include
570 this label.";
571 }
572 }
573
574 grouping mpls-label-blocks-top {
575 description
576 "Top-level configuration and operational state parameters corresponding
577 to reserved label blocks.";
578
579 container reserved-label-blocks {
580 description
581 "A range of labels starting with the start-label and up-to and including
582 the end label that should be allocated as reserved. These labels should
583 not be utilised by any dynamic label allocation on the local system unless
584 the allocating protocol is explicitly configured to specify that
585 allocation of labels should be out of the label block specified.";
586
587 list reserved-label-block {
588 key "local-id";
589
590 description
591 "A range of labels starting with the start-label up to and including
592 the end label that should be allocated for use by a specific protocol.";
593
594 leaf local-id {
595 type leafref {
596 path "../config/local-id";
597 }
598 description
599 "A reference to a unique local identifier for this label block.";
600 }
601
602 container config {
603 description
604 "Configuration parameters relating to the label block.";
605
606 uses mpls-label-block-config;
607 }
608
609 container state {
610 config false;
611 description
612 "State parameters relating to the label block.";
613
614 uses mpls-label-block-config;
615 }
616 }
617 }
618 }
619
620 grouping mpls-top {
621 description
622 "Top level grouping for MPLS configuration and state";
623
624 container mpls {
625 description
626 "Anchor point for mpls configuration and operational
627 data";
628
629 container global {
630 // entropy label support, label ranges will be added here.
631 description
632 "general mpls configuration applicable to any
633 type of LSP and signaling protocol - label ranges,
634 entropy label supportmay be added here";
635 uses mpls-global-top;
636 uses mpls-interfaces-top;
637 uses mpls-label-blocks-top;
638 }
639
640 container te-global-attributes {
641 description
642 "traffic-engineering global attributes";
643 uses mpls-te-srlg-top;
644 uses mpls-admin-groups-top;
645 uses mpls-te-lsp-timers;
646 }
647
648 container te-interface-attributes {
649 description
650 "traffic engineering attributes specific
651 for interfaces";
652 uses te-interface-attributes-top;
653 }
654
655 container signaling-protocols {
656 description
657 "top-level signaling protocol configuration";
658
659 uses oc-rsvp:rsvp-global;
660 uses oc-ldp:ldp-global;
661 uses oc-sr:sr-mpls-top;
662 }
663
664 container lsps {
665 description
666 "LSP definitions and configuration";
667
668 container constrained-path {
669 description
670 "traffic-engineered LSPs supporting different
671 path computation and signaling methods";
672 uses explicit-paths_top;
673 uses te-tunnels_top;
674 }
675
676 container unconstrained-path {
677 description
678 "LSPs that use the IGP-determined path, i.e., non
679 traffic-engineered, or non constrained-path";
680
681 uses igp-lsp-common;
682 uses igp-lsp-setup;
683 }
684
685 container static-lsps {
686 description
687 "statically configured LSPs, without dynamic
688 signaling";
689
690 uses static-lsp-top;
691 }
692 }
693 }
694 }
695
696 uses mpls-top;
697
698 // augment statements
699
700 // rpc statements
701
702 // notification statements
703}