aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-ospfv2-area-interface.yang
blob: f2454c0032ba92ba3eee4cb26a193e58413976b1 (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
submodule openconfig-ospfv2-area-interface {

  belongs-to openconfig-ospfv2 {
    prefix "oc-ospfv2";
  }

  import ietf-yang-types { prefix "yang"; }
  import openconfig-extensions { prefix "oc-ext"; }
  import openconfig-types { prefix "oc-types"; }
  import openconfig-interfaces { prefix "oc-if"; }
  import openconfig-ospf-types { prefix "oc-ospf-types"; }

  // include common submodule
  include openconfig-ospfv2-common;

  // meta
  organization "OpenConfig working group";

  contact
    "OpenConfig working group
    www.openconfig.net";

  description
    "This submodule provides OSPFv2 configuration and operational
    state parameters that are specific to the area context";

  oc-ext:openconfig-version "0.1.2";

  revision "2018-06-05" {
    description
      "Bug fixes in when statements in lsdb";
    reference "0.1.2";
  }

  revision "2017-08-24" {
    description
      "Minor formatting fixes.";
    reference "0.1.1";
  }

  revision "2017-02-28"{
    description
      "Initial public release of OSPFv2";
    reference "0.1.0";
  }

  revision "2016-06-24" {
    description
      "Initial revision";
    reference "0.0.1";
  }

  grouping ospfv2-area-interface-config {
    description
      "Configuration parameters for an OSPF interface";

    leaf id {
      type string;
      description
        "An operator-specified string utilised to uniquely
        reference this interface";
    }

    leaf network-type {
      type identityref {
        base "oc-ospf-types:OSPF_NETWORK_TYPE";
      }
      description
        "The type of network that OSPFv2 should use for the specified
        interface.";
    }

    leaf priority {
      type uint8;
      description
        "The local system's priority to become the designated
        router";
    }

    leaf multi-area-adjacency-primary {
      type boolean;
      default true;
      description
        "When the specified interface is included in more than one
        area's configuration, this leaf marks whether the area should
        be considered the primary (when the value is true). In the
        case that this value is false, the area is considered a
        secondary area.";
    }

    leaf authentication-type {
      type string;
      // rjs TODO: discuss with bogdanov@ what the approach for auth
      // links should be.
      description
        "The type of authentication that should be used on this
        interface";
    }

    leaf metric {
      type oc-ospf-types:ospf-metric;
      description
        "The metric for the interface";
    }

    leaf passive {
      type boolean;
      description
        "When this leaf is set to true, the interface should be
        advertised within the OSPF area but OSPF adjacencies should
        not be established over the interface";
    }

    leaf hide-network {
      type boolean;
      description
        "When this leaf is set to true, the network connected to
        the interface should be hidden from OSPFv2 advertisements
        per the procedure described in RFC6860.";
      reference
        "RFC6860 - Hiding Transit-Only Networks in OSFF";
    }
  }

  grouping ospfv2-area-interface-timers-config {
    description
      "Configuration parameters relating to per-interface OSPFv2
      timers";

    leaf dead-interval {
      type uint32;
      units seconds;
      description
        "The number of seconds that the local system should let
        elapse before declaring a silent router down";
      reference "RFC2328";
    }

    leaf hello-interval {
      type uint32;
      units seconds;
      description
        "The number of seconds the local system waits between the
        transmission of subsequent Hello packets";
    }

    leaf retransmission-interval {
      type uint32;
      units seconds;
      description
        "The number of seconds that the local system waits before
        retransmitting an unacknowledged LSA.";
    }
  }

  grouping ospfv2-area-interface-mpls-config {
    description
      "Configuration parameters relating to MPLS extensions for OSPF";

    leaf traffic-engineering-metric {
      type uint32;
      description
        "A link metric that should only be considered for traffic
        engineering purposes.";
      reference "RFC3630, #2.5.5";
    }
  }

  grouping ospfv2-area-interface-neighbor-config {
    description
      "Configuration parameters relating to an individual neighbor
      system on an interface within an OSPF area";

    leaf router-id {
      type yang:dotted-quad;
      description
        "The router ID of the remote system.";
    }

    leaf metric {
      type oc-ospf-types:ospf-metric;
      description
        "The metric that should be considered to the remote neighbor
        over this interface. This configuration is only applicable
        for multiple-access networks";
    }
  }

  grouping ospfv2-area-interface-neighbor-state {
    description
      "Operational state parameters relating an individual neighbor
      system on an interface within an OSPF area";

    leaf priority {
      type uint8;
      description
        "The remote system's priority to become the designated
        router";
    }

    leaf dead-time {
      // rjs TODO: discussion with aashaikh@ + hines@ around how this
      // value should be represented, usually is a timer that
      // continually counts down but this sounds challenging for
      // telemetry.
      type oc-types:timeticks64;
      description
        "The time at which this neighbor's adjacency will be
        considered dead. This value is expressed as a number of
        seconds since the Unix Epoch";
    }

    leaf designated-router {
      type yang:dotted-quad;
      description
        "The designated router for the adjacency. This device
        advertises the Network LSA for broadcast and NBMA networks.";
    }

    leaf backup-designated-router {
      type yang:dotted-quad;
      description
        "The backup designated router for the adjacency.";
    }

    leaf optional-capabilities {
      // rjs TODO: should this be anything more than the hex-string
      // this is currently what is shown in IOS/JUNOS
      type yang:hex-string;
      description
        "The optional capabilities field received in the Hello
        message from the neighbor";
    }

    leaf last-established-time {
      type oc-types:timeticks64;
      units seconds;
      // rjs TODO: check implementations - is FULL considered 'up'
      // since the adjacency is probably up since ExStart
      description
        "The time at which the adjacency was last established with
        the neighbor. That is to say the time at which the
        adjacency last transitioned into the FULL state.

        This value is expressed as the number of seconds, relative to
        the Unix Epoch (Jan 1, 1970 00:00:00 UTC).";
    }

    leaf adjacency-state {
      type identityref {
        base "oc-ospf-types:OSPF_NEIGHBOR_STATE";
      }
      description
        "The state of the adjacency with the neighbor.";
    }

    leaf state-changes {
      type uint32;
      description
        "The number of transitions out of the FULL state that this
        neighbor has been through";
    }

    leaf retranmission-queue-length {
      type uint32;
      description
        "The number of LSAs that are currently in the queue to be
        retransmitted to the neighbor";
    }
  }

  grouping ospfv2-area-interface-lsa-filter-config {
    description
      "Configuration options relating to filtering LSAs
      on an interface.";

    leaf all {
      type boolean;
      description
        "When this leaf is set to true, all LSAs should be
        filtered to the neighbours with whom adjacencies are
        formed on the interface.";
    }

    // NB: this container can be augmented to add additional
    // filtering options which exist in some implementations.
  }

  grouping ospfv2-area-interface-mpls-igp-ldp-sync-state {
    description
      "Operational state parameters relating to MPLS LDP/IGP
      synchronization on a per-neighbor basis";

    leaf synchronized {
      type boolean;
      description
        "When the value of this leaf is set to true, the
        LDP neighbors reachable via this interface are considered
        to be synchronized, and hence the link is considered
        usable by the IGP.";
    }
  }

  grouping ospfv2-area-interfaces-structure {
    description
      "Structural grouping for configuration and operational state
      parameters that relate to an interface";

    container interfaces {
      description
        "Enclosing container for a list of interfaces enabled within
        this area";

      list interface {
        key "id";

        description
          "List of interfaces which are enabled within this area";

        leaf id {
          type leafref {
            path "../config/id";
          }
          description
            "A pointer to the identifier for the interface.";
        }

        container config {
          description
            "Configuration parameters for the interface on which
            OSPFv2 is enabled";

          uses ospfv2-area-interface-config;
        }

        container state {
          config false;
          description
            "Operational state parameters for the interface on which
            OSPFv2 is enabled";
          uses ospfv2-area-interface-config;
        }

        uses oc-if:interface-ref;

        container timers {
          description
            "Timers relating to OSPFv2 on the interface";

          container config {
            description
              "Configuration parameters for OSPFv2 timers on the
              interface";
            uses ospfv2-area-interface-timers-config;
          }

          container state {
            config false;
            description
              "Operational state parameters for OSPFv2 timers on
              the interface";

            uses ospfv2-area-interface-timers-config;
          }
        }

        container mpls {
          description
            "Configuration and operational state parameters for
            OSPFv2 extensions related to MPLS on the interface.";

          container config {
            description
              "Configuration parameters for OSPFv2 extensions relating
              to MPLS for the interface";
            uses ospfv2-area-interface-mpls-config;
          }

          container state {
            config false;
            description
              "Operational state for OSPFv2 extensions relating to
              MPLS for the interface";
            uses ospfv2-area-interface-mpls-config;
          }

          container igp-ldp-sync {
            description
              "OSPFv2 parameters relating to LDP/IGP synchronization";

            container config {
              description
                "Configuration parameters relating to LDP/IG
                synchronization.";
              uses ospfv2-common-mpls-igp-ldp-sync-config;
            }

            container state {
              config false;
              description
                "Operational state variables relating to LDP/IGP
                synchronization";
              uses ospfv2-common-mpls-igp-ldp-sync-config;
              uses ospfv2-area-interface-mpls-igp-ldp-sync-state;
            }
          }
        }

        container lsa-filter {
          description
            "OSPFv2 parameters relating to filtering of LSAs to
            neighbors the specified interface.";

          container config {
            description
              "Configuration parameters relating to filtering LSAs
              on the specified interface.";
            uses ospfv2-area-interface-lsa-filter-config;
          }

          container state {
            config false;
            description
              "Operational state parameters relating to filtering
              LSAs on the specified interface";
            uses ospfv2-area-interface-lsa-filter-config;
          }
        }

        container neighbors {
          description
            "Enclosing container for the list of neighbors that
            an adjacency has been established with on the interface";

          list neighbor {
            key "router-id";

            description
              "A neighbor with which an OSPFv2 adjacency has been
              established within this area";

            leaf router-id {
              type leafref {
                path "../config/router-id";
              }
              description
                "Reference to the router ID of the adjacent system";
            }

            container config {
              description
                "Configuration parameters relating to the adjacent
                system";
              uses ospfv2-area-interface-neighbor-config;
            }

            container state {
              config false;
              description
                "Operational state parameters relating to the adjacent
                system";
              uses ospfv2-area-interface-neighbor-config;
              uses ospfv2-area-interface-neighbor-state;
            }
          }
        }

      }
    }
  }

}