aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-mpls.yang
blob: e6bdf966a4b1c516ba670c985812de7aee9f776e (plain)
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
module openconfig-mpls {

  yang-version "1";

  // namespace
  namespace "http://openconfig.net/yang/mpls";

  prefix "oc-mpls";


  // import some basic types
  import openconfig-mpls-types { prefix oc-mplst; }
  import openconfig-mpls-rsvp { prefix oc-rsvp; }
  import openconfig-mpls-ldp { prefix oc-ldp; }
  import openconfig-types { prefix oc-types; }
  import openconfig-interfaces { prefix oc-if; }
  import openconfig-extensions { prefix oc-ext; }
  import openconfig-segment-routing { prefix oc-sr; }

  // include submodules
  include openconfig-mpls-te;
  include openconfig-mpls-igp;
  include openconfig-mpls-static;


  // meta
  organization "OpenConfig working group";

  contact
    "OpenConfig working group
    netopenconfig@googlegroups.com";

  description
    "This module provides data definitions for configuration of
    Multiprotocol Label Switching (MPLS) and associated protocols for
    signaling and traffic engineering.

    RFC 3031: Multiprotocol Label Switching Architecture

    The MPLS / TE data model consists of several modules and
    submodules as shown below.  The top-level MPLS module describes
    the overall framework.  Three types of LSPs are supported:

    i) traffic-engineered (or constrained-path)

    ii) IGP-congruent (LSPs that follow the IGP path)

    iii) static LSPs which are not signaled

    The structure of each of these LSP configurations is defined in
    corresponding submodules.  Companion modules define the relevant
    configuration and operational data specific to key signaling
    protocols used in operational practice.


                              +-------+
            +---------------->| MPLS  |<--------------+
            |                 +-------+               |
            |                     ^                   |
            |                     |                   |
       +----+-----+      +--------+-------+     +-----+-----+
       | TE LSPs  |      | IGP-based LSPs |     |static LSPs|
       |          |      |                |     |           |
       +----------+      +----------------+     +-----------+
           ^  ^                    ^  ^
           |  +----------------+   |  +--------+
           |                   |   |           |
           |   +------+      +-+---+-+      +--+--+
           +---+ RSVP |      |SEGMENT|      | LDP |
               +------+      |ROUTING|      +-----+
                             +-------+
    ";


  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";
  }


  // grouping statements

  grouping mpls-admin-group-config {
    description
      "configuration data for MPLS link admin groups";

      leaf admin-group-name {
        type string;
        description
          "name for mpls admin-group";
      }

      leaf bit-position {
        type uint32;
        description
          "bit-position value for mpls admin-group. The value
           for the admin group is an integer that represents one
           of the bit positions in the admin-group bitmask. Values
           between 0 and 31 are interpreted as the original limit
           of 32 admin groups. Values >=32 are interpreted as
           extended admin group values as per RFC7308.";
      }

  }

  grouping mpls-admin-groups-top {

    description
      "top-level mpls admin-groups config
      and state containers";

    container mpls-admin-groups {
      description
        "Top-level container for admin-groups configuration
        and state";

      list admin-group {
        key "admin-group-name";
        description
          "configuration of value to name mapping
          for mpls affinities/admin-groups";

        leaf admin-group-name {
          type leafref {
            path "../config/admin-group-name";
          }
          description
            "name for mpls admin-group";
        }
        container config {
          description
            "Configurable items for admin-groups";
          uses mpls-admin-group-config;
        }

        container state {
          config false;
          description
            "Operational state for admin-groups";
          uses mpls-admin-group-config;
        }
      }
    }
  }

  grouping mpls-te-igp-flooding-bandwidth-config {
    description
      "Configurable items for igp flooding bandwidth
      threshold configuration.";
    leaf threshold-type {
      type enumeration {
        enum DELTA {
          description
            "DELTA indicates that the local
            system should flood IGP updates when a
            change in reserved bandwidth >= the specified
            delta occurs on the interface.";
        }
        enum THRESHOLD_CROSSED {
          description
            "THRESHOLD-CROSSED indicates that
            the local system should trigger an update (and
            hence flood) the reserved bandwidth when the
            reserved bandwidth changes such that it crosses,
            or becomes equal to one of the threshold values.";
        }
      }
      description
        "The type of threshold that should be used to specify the
        values at which bandwidth is flooded. DELTA indicates that
        the local system should flood IGP updates when a change in
        reserved bandwidth >= the specified delta occurs on the
        interface. Where THRESHOLD_CROSSED is specified, the local
        system should trigger an update (and hence flood) the
        reserved bandwidth when the reserved bandwidth changes such
        that it crosses, or becomes equal to one of the threshold
        values";
    }

    leaf delta-percentage {
      when "../threshold-type = 'DELTA'" {
        description
          "The percentage delta can only be specified when the
          threshold type is specified to be a percentage delta of
          the reserved bandwidth";
      }
      type oc-types:percentage;
      description
        "The percentage of the maximum-reservable-bandwidth
        considered as the delta that results in an IGP update
        being flooded";
    }

    leaf threshold-specification {
      when "../threshold-type = 'THRESHOLD_CROSSED'" {
        description
          "The selection of whether mirrored or separate threshold
          values are to be used requires user specified thresholds to
          be set";
      }
      type enumeration {
        enum MIRRORED_UP_DOWN {
          description
            "MIRRORED_UP_DOWN indicates that a single set of
            threshold values should be used for both increasing
            and decreasing bandwidth when determining whether
            to trigger updated bandwidth values to be flooded
            in the IGP TE extensions.";
        }
        enum SEPARATE_UP_DOWN {
          description
            "SEPARATE_UP_DOWN indicates that a separate
            threshold values should be used for the increasing
            and decreasing bandwidth when determining whether
            to trigger updated bandwidth values to be flooded
            in the IGP TE extensions.";
        }
      }
      description
        "This value specifies whether a single set of threshold
        values should be used for both increasing and decreasing
        bandwidth when determining whether to trigger updated
        bandwidth values to be flooded in the IGP TE extensions.
        MIRRORED-UP-DOWN indicates that a single value (or set of
        values) should be used for both increasing and decreasing
        values, where SEPARATE-UP-DOWN specifies that the increasing
        and decreasing values will be separately specified";
    }

    leaf-list up-thresholds {
      when "../threshold-type = 'THRESHOLD_CROSSED'" +
        "and ../threshold-specification = 'SEPARATE_UP_DOWN'" {
          description
            "A list of up-thresholds can only be specified when the
            bandwidth update is triggered based on crossing a
            threshold and separate up and down thresholds are
            required";
        }
      type oc-types:percentage;
      description
        "The thresholds (expressed as a percentage of the maximum
        reservable bandwidth) at which bandwidth updates are to be
        triggered when the bandwidth is increasing.";
    }

    leaf-list down-thresholds {
      when "../threshold-type = 'THRESHOLD_CROSSED'" +
        "and ../threshold-specification = 'SEPARATE_UP_DOWN'" {
          description
            "A list of down-thresholds can only be specified when the
            bandwidth update is triggered based on crossing a
            threshold and separate up and down thresholds are
            required";
        }
      type oc-types:percentage;
      description
        "The thresholds (expressed as a percentage of the maximum
        reservable bandwidth) at which bandwidth updates are to be
        triggered when the bandwidth is decreasing.";
    }

    leaf-list up-down-thresholds {
      when "../threshold-type = 'THRESHOLD_CROSSED'" +
        "and ../threshold-specification = 'MIRRORED_UP_DOWN'" {
          description
            "A list of thresholds corresponding to both increasing
            and decreasing bandwidths can be specified only when an
            update is triggered based on crossing a threshold, and
            the same up and down thresholds are required.";
        }
      type oc-types:percentage;
      description
        "The thresholds (expressed as a percentage of the maximum
        reservable bandwidth of the interface) at which bandwidth
        updates are flooded - used both when the bandwidth is
        increasing and decreasing";
    }
  }


  grouping  mpls-te-igp-flooding-bandwidth {
    description
      "Top level group for traffic engineering
      database flooding options";
    container igp-flooding-bandwidth {
      description
        "Interface bandwidth change percentages
        that trigger update events into the IGP traffic
        engineering database (TED)";
      container config {
        description
          "Configuration parameters for TED
          update threshold ";
        uses  mpls-te-igp-flooding-bandwidth-config;
      }
      container state {
        config false;
        description
          "State parameters for TED update threshold ";
        uses  mpls-te-igp-flooding-bandwidth-config;
      }
    }
  }


  grouping te-lsp-delay-config {
    description
      "Group for the timers goerning the delay
      in installation and cleanup of TE LSPs";

    leaf install-delay {
      type uint16 {
        range 0..3600;
      }
      units seconds;
      description
        "delay the use of newly installed te lsp for a
        specified amount of time.";
    }

    leaf cleanup-delay {
      type uint16;
      units seconds;
      description
        "delay the removal of old te lsp for a specified
        amount of time";
    }
  }

  grouping te-interface-attributes-top {
    description
      "Top level grouping for attributes
      for TE interfaces.";

    list interface {
      key "interface-id";
      description
        "List of TE interfaces";

      leaf interface-id {
        type leafref {
          path "../config/interface-id";
        }
        description
          "Reference to the interface id list key";
      }

      container config {
        description
          "Configuration parameters related to TE interfaces:";
        uses te-interface-attributes-config;
      }

      container state {
        config false;
        description
          "State parameters related to TE interfaces";
        uses te-interface-attributes-config;
      }

      uses oc-if:interface-ref;

      uses  mpls-te-igp-flooding-bandwidth;
    }
  }

  grouping te-interface-attributes-config {
    description
      "global level definitions for interfaces
      on which TE is run";

    leaf interface-id {
      type oc-if:interface-id;
      description
        "Id of the interface";
    }

    leaf te-metric {
      type uint32;
      description
        "TE specific metric for the link";
    }

    leaf-list srlg-membership {
      type leafref {
          path "../../../../te-global-attributes/srlgs/srlg/name";
      }
      description
        "list of references to named shared risk link groups that the
        interface belongs to.";
    }

    leaf-list admin-group {
      type string;
      description
        "list of admin groups (by name) on the interface";
    }
  }

  grouping mpls-te-lsp-timers {
    description
      "Grouping for traffic engineering timers";
    container te-lsp-timers {
      description
        "Definition for delays associated with setup
        and cleanup of TE LSPs";

      container config {
        description
          "Configuration parameters related
          to timers for TE LSPs";

        uses te-lsp-delay-config;
        uses te-tunnel-reoptimize-config;
      }

      container state {
        config false;
        description
          "State related to timers for TE LSPs";

        uses te-lsp-delay-config;
        uses te-tunnel-reoptimize-config;
      }
    }
  }

  grouping mpls-global-config {
    description
      "Definition of global MPLS configuration parameters";

    leaf null-label {
      type identityref {
        base oc-mplst:NULL_LABEL_TYPE;
      }
      default oc-mplst:IMPLICIT;
      description
        "The null-label type used, implicit or explicit";
    }

    leaf ttl-propagation {
      type boolean;
      default true;
      description
        "Enables TTL propagation across the MPLS domain.
        When ttl-propagation is set to true, the IP TTL
        is copied into the MPLS header TTL when pushing
        a label to an IP packet. If false, the IP TTL is
        not copied into the MPLS header TTL and, therefore,
        the IP TTL is not updated in the MPLS domain.";
    }

  }

 grouping mpls-global-top {
    description
      "Top level grouping for global MPLS configuration ";

      container config {
        description
          "Top level global MPLS configuration";
        uses mpls-global-config;
      }

      container state {
        config false;
        description
          "Top level global MPLS state";
        uses mpls-global-config;
      }
 }

 grouping mpls-interfaces-top {
    description
      "Top level grouping for attributes
      for MPLS-enabled interfaces.";
    container interface-attributes {
      description
        "Parameters related to MPLS interfaces";
      list interface {
        key "interface-id";
        description
          "List of TE interfaces";

        leaf interface-id {
          type leafref {
            path "../config/interface-id";
          }
          description
            "Reference to the interface id list key";
        }

        container config {
          description
            "Configuration parameters related to MPLS interfaces:";
          uses mpls-interface-attributes-config;
        }

        container state {
          config false;
          description
            "State parameters related to TE interfaces";
          uses mpls-interface-attributes-config;
        }

        uses oc-if:interface-ref;
      }
    }
  }

  grouping mpls-interface-attributes-config {
    description
      "global level definitions for interfaces
      on which MPLS is run";

    leaf interface-id {
      type oc-if:interface-id;
      description
        "Indentifier for the MPLS interface";
    }

    leaf mpls-enabled {
      type boolean;
      default false;
      description
        "Enable MPLS forwarding on this interface";
    }
  }

  grouping mpls-label-block-config {
    description
      "Configuration parameters relating to an MPLS label block.";

    leaf local-id {
      type string;
      description
        "A local identifier for the global label block allocation.";
    }

    leaf lower-bound {
      type oc-mplst:mpls-label;
      description
        "Lower bound of the global label block. The block is defined to include
        this label.";
    }

    leaf upper-bound {
      type oc-mplst:mpls-label;
      description
        "Upper bound for the global label block. The block is defined to include
        this label.";
    }
  }

  grouping mpls-label-blocks-top {
    description
      "Top-level configuration and operational state parameters corresponding
      to reserved label blocks.";

    container reserved-label-blocks {
      description
        "A range of labels starting with the start-label and up-to and including
        the end label that should be allocated as reserved. These labels should
        not be utilised by any dynamic label allocation on the local system unless
        the allocating protocol is explicitly configured to specify that
        allocation of labels should be out of the label block specified.";

      list reserved-label-block {
        key "local-id";

        description
          "A range of labels starting with the start-label up to and including
          the end label that should be allocated for use by a specific protocol.";

        leaf local-id {
          type leafref {
            path "../config/local-id";
          }
          description
            "A reference to a unique local identifier for this label block.";
        }

        container config {
          description
            "Configuration parameters relating to the label block.";

          uses mpls-label-block-config;
        }

        container state {
          config false;
          description
            "State parameters relating to the label block.";

          uses mpls-label-block-config;
        }
      }
    }
  }

  grouping mpls-top {
    description
      "Top level grouping for MPLS configuration and state";

    container mpls {
      description
        "Anchor point for mpls configuration and operational
        data";

      container global {
        // entropy label support, label ranges will be added here.
       description
        "general mpls configuration applicable to any
        type of LSP and signaling protocol - label ranges,
        entropy label supportmay be added here";
       uses mpls-global-top;
       uses mpls-interfaces-top;
       uses mpls-label-blocks-top;
      }

      container te-global-attributes {
        description
          "traffic-engineering global attributes";
        uses mpls-te-srlg-top;
        uses mpls-admin-groups-top;
        uses mpls-te-lsp-timers;
      }

      container te-interface-attributes {
        description
          "traffic engineering attributes specific
          for interfaces";
        uses te-interface-attributes-top;
      }

      container signaling-protocols {
        description
          "top-level signaling protocol configuration";

        uses oc-rsvp:rsvp-global;
        uses oc-ldp:ldp-global;
        uses oc-sr:sr-mpls-top;
      }

      container lsps {
        description
          "LSP definitions and configuration";

        container constrained-path {
          description
            "traffic-engineered LSPs supporting different
            path computation and signaling methods";
          uses explicit-paths-top;
          uses te-tunnels-top;
        }

        container unconstrained-path {
          description
            "LSPs that use the IGP-determined path, i.e., non
            traffic-engineered, or non constrained-path";

          uses igp-lsp-common;
          uses igp-lsp-setup;
        }

        container static-lsps {
          description
            "statically configured LSPs, without dynamic
            signaling";

          uses static-lsp-top;
        }
      }
    }
  }

  // augment statements

  // rpc statements

  // notification statements
}