blob: 05f46c00d12b97f5830cd7f7bbd4c086542a530f [file] [log] [blame]
Thomas Vachuska8ca75a22017-08-24 16:12:59 -07001submodule openconfig-ospfv2-global {
2
3 belongs-to openconfig-ospfv2 {
4 prefix "oc-ospfv2";
5 }
6
7 import ietf-yang-types { prefix "yang"; }
8 import openconfig-extensions { prefix "oc-ext"; }
9 import openconfig-routing-policy { prefix "oc-rpol"; }
10 import openconfig-ospf-types { prefix "oc-ospft"; }
11
12 // Include common submodule
13 include openconfig-ospfv2-common;
14
15 // meta
16 organization "OpenConfig working group";
17
18 contact
19 "OpenConfig working group
20 www.openconfig.net";
21
22 description
23 "This submodule provides OSPFv2 configuration and operational
24 state parameters that are global to a particular OSPF instance";
25
26 oc-ext:openconfig-version "0.1.0";
27
28 revision "2017-02-28"{
29 description
30 "Initial public release of OSPFv2";
31 reference "0.1.0";
32 }
33
34 revision "2016-06-24" {
35 description
36 "Initial revision";
37 reference "0.0.1";
38 }
39
40 grouping ospfv2-global-config {
41 description
42 "Global configuration for OSPFv2";
43
44 leaf router-id {
45 type yang:dotted-quad;
46 description
47 "A 32-bit number represented as a dotted quad assigned to
48 each router running the OSPFv2 protocol. This number should
49 be unique within the autonomous system";
50 reference "rfc2828";
51 }
52
53 leaf summary-route-cost-mode {
54 type enumeration {
55 enum RFC1583_COMPATIBLE {
56 description
57 "Specify that summary routes should assume the cost of
58 the lowest-cost more-specific route as per the behaviour
59 specified in RFC1583";
60 }
61 enum RFC2328_COMPATIBLE {
62 description
63 "Specify that summary routes should assume the cost of the
64 highest-cost more-specific route as per the revised
65 behaviour specified in RFC2328";
66 }
67 }
68 default "RFC2328_COMPATIBLE";
69 description
70 "Specify how costs for the summary routes should be specified
71 as per the behaviour in the original OSPF specification
72 RFC1583, or alternatively whether the revised behaviour
73 described in RFC2328 should be utilised";
74 }
75
76 leaf igp-shortcuts {
77 type boolean;
78 description
79 "When this leaf is set to true, OSPFv2 will route traffic to
80 a remote system via any LSP to the system that is marked as
81 shortcut eligible.";
82 }
83
84 leaf log-adjacency-changes {
85 type boolean;
86 description
87 "When this leaf is set to true, a log message will be
88 generated when the state of an OSPFv2 neighbour changes.";
89 }
90
91 leaf hide-transit-only-networks {
92 type boolean;
93 description
94 "When this leaf is set to true, do not advertise prefixes
95 into OSPFv2 that correspond to transit interfaces, as per
96 the behaviour discussed in RFC6860.";
97 reference
98 "RFC6860 - Hiding Transit-Only Networks in OSPF";
99 }
100 }
101
102 grouping ospfv2-global-spf-timers-config {
103 description
104 "Configuration parameters relating to global SPF timer
105 parameters for OSPFv2";
106
107 leaf initial-delay {
108 // rjs TODO: IS-IS model has this as decimal64 - should it be
109 // that or uint32 msec?
110 type uint32;
111 units msec;
112 description
113 "The value of this leaf specifies the time between a change
114 in topology being detected and the first run of the SPF
115 algorithm.";
116 }
117
118 leaf maximum-delay {
119 // rjs TODO: same question as above
120 type uint32;
121 units msec;
122 description
123 "The value of this leaf specifies the maximum delay between
124 a topology change being detected and the SPF algorithm
125 running. This value is used for implementations that support
126 increasing the wait time between SPF runs.";
127 }
128
129 // rjs TODO: some questions here around what we should specify:
130 // JUNOS has rapid-runs and holddown
131 // Cisco has maximum time between runs, and then a doubling of
132 // the wait interval up to that maximum.
133 // ALU has first-wait, second-wait, max-wait
134 }
135
136 grouping ospfv2-global-lsa-generation-timers-config {
137 description
138 "Configuration parameters relating to global LSA generation
139 parameters for OSPFv2";
140
141 leaf initial-delay {
142 type uint32;
143 units msec;
144 description
145 "The value of this leaf specifies the time between the first
146 time an LSA is generated and advertised and the subsequent
147 generation of that LSA.";
148 }
149
150 leaf maximum-delay {
151 type uint32;
152 units msec;
153 description
154 "The value of this leaf specifies the maximum time between the
155 generation of an LSA and the subsequent re-generation of that
156 LSA. This value is used in implementations that support
157 increasing delay between generation of an LSA";
158 }
159 }
160
161 grouping ospfv2-global-spf-timers-state {
162 description
163 "Operational state parameters relating to OSPFv2 global
164 timers";
165
166 uses ospfv2-common-timers;
167 }
168
169 grouping ospfv2-global-lsa-generation-timers-state {
170 description
171 "Operational state parameters relating to OSPFv2 global
172 timers";
173
174 uses ospfv2-common-timers;
175 }
176
177 grouping ospfv2-global-graceful-restart-config {
178 description
179 "Configuration parameters relating to graceful restart for
180 OSPFv2";
181
182 leaf enabled {
183 type boolean;
184 description
185 "When the value of this leaf is set to true, graceful restart
186 is enabled on the local system. In this case, the system will
187 use Grace-LSAs to signal that it is restarting to its
188 neighbors.";
189 }
190
191 leaf helper-only {
192 type boolean;
193 description
194 "Operate graceful-restart only in helper mode. When this leaf
195 is set to true, the local system does not use Grace-LSAs to
196 indicate that it is restarting, but will accept Grace-LSAs
197 from remote systems, and suppress withdrawl of adjacencies
198 of the system for the grace period specified";
199 }
200 }
201
202 grouping ospfv2-global-mpls-config {
203 description
204 "Configuration parameters for OSPFv2 options which
205 relate to MPLS";
206
207 leaf traffic-engineering-extensions {
208 type boolean;
209 description
210 "When this leaf is set to true, use traffic engineering
211 extensions for OSPF to advertise TE parameters via type 10
212 Opaque LSAs";
213 }
214 }
215
216 grouping ospfv2-global-inter-areapp-config {
217 description
218 "Configuration parameters for OSPFv2 policies which propagate
219 prefixes between areas";
220
221 leaf src-area {
222 type leafref {
223 // we are at ospf/global/inter-area-propagation-policies/...
224 // inter-area-propagation-policy/config/src-area
225 path "../../../../../areas/area/identifier";
226 }
227 description
228 "The area from which prefixes are to be exported.";
229 }
230
231 leaf dst-area {
232 type leafref {
233 // we are at ospf/global/inter-area-propagation-policies/...
234 // inter-area-propagation-policy/config/src-area
235 path "../../../../../areas/area/identifier";
236 }
237 description
238 "The destination area to which prefixes are to be imported";
239 }
240
241 uses oc-rpol:apply-policy-import-config;
242 }
243
244 grouping ospfv2-global-max-metric-config {
245 description
246 "Configuration paramters relating to setting the OSPFv2
247 maximum metric.";
248
249 leaf set {
250 type boolean;
251 description
252 "When this leaf is set to true, all non-stub interfaces of
253 the local system are advertised with the maximum metric,
254 such that the router does not act as a transit system,
255 (similarly to the IS-IS overload functionality).";
256 reference
257 "RFC3137 - OSPF Stub Router Advertisement";
258 }
259
260 leaf timeout {
261 type uint64;
262 units "seconds";
263 description
264 "The delay, in seconds, after which the advertisement of
265 entities with the maximum metric should be cleared, and
266 the system reverts to the default, or configured, metrics.";
267 }
268
269 leaf-list include {
270 type identityref {
271 base "oc-ospft:MAX_METRIC_INCLUDE";
272 }
273 description
274 "By default, the maximum metric is advertised for all
275 non-stub interfaces of a device. When identities are
276 specified within this leaf-list, additional entities
277 are also advertised with the maximum metric according
278 to the values within the list.";
279 }
280
281 leaf-list trigger {
282 type identityref {
283 base "oc-ospft:MAX_METRIC_TRIGGER";
284 }
285 description
286 "By default, the maximum metric is only advertised
287 when the max-metric/set leaf is specified as true.
288 In the case that identities are specified within this
289 list, they provide additional triggers (e.g., system
290 boot) that may cause the max-metric to be set. In this
291 case, the system should still honour the timeout specified
292 by the max-metric/timeout leaf, and clear the max-metric
293 advertisements after the expiration of this timer.";
294 }
295 }
296
297 grouping ospfv2-global-structural {
298 description
299 "Top level structural grouping for OSPFv2 global parameters";
300
301 container global {
302 description
303 "Configuration and operational state parameters for settings
304 that are global to the OSPFv2 instance";
305
306 container config {
307 description
308 "Global configuration parameters for OSPFv2";
309 uses ospfv2-global-config;
310 }
311
312 container state {
313 config false;
314 description
315 "Operational state parameters for OSPFv2";
316 uses ospfv2-global-config;
317 }
318
319 container timers {
320 description
321 "Configuration and operational state parameters for OSPFv2
322 timers";
323
324 container spf {
325 description
326 "Configuration and operational state parameters relating
327 to timers governing the operation of SPF runs";
328
329 container config {
330 description
331 "Configuration parameters relating to global OSPFv2
332 SPF timers";
333 uses ospfv2-global-spf-timers-config;
334 }
335
336 container state {
337 config false;
338 description
339 "Operational state parameters relating to the global
340 OSPFv2 SPF timers";
341 uses ospfv2-global-spf-timers-config;
342 uses ospfv2-global-spf-timers-state;
343 }
344 }
345
346 container max-metric {
347 description
348 "Configuration and operational state parameters relating
349 to setting the OSPFv2 maximum metric.";
350
351 container config {
352 description
353 "Configuration parameters relating to setting the OSPFv2
354 maximum metric for a set of advertised entities.";
355 uses ospfv2-global-max-metric-config;
356 }
357
358 container state {
359 config false;
360 description
361 "Operational state parameters relating to setting the
362 OSPFv2 maximum metric for a set of advertised entities.";
363 uses ospfv2-global-max-metric-config;
364 }
365 }
366
367 container lsa-generation {
368 description
369 "Configuration and operational state parameters relating
370 to timers governing the generation of LSAs by the local
371 system";
372
373 container config {
374 description
375 "Configuration parameters relating to the generation of
376 LSAs by the local system";
377 uses ospfv2-global-lsa-generation-timers-config;
378 }
379
380 container state {
381 config false;
382 description
383 "Operational state parameters relating to the generation
384 of LSAs by the local system";
385 uses ospfv2-global-lsa-generation-timers-config;
386 uses ospfv2-global-lsa-generation-timers-state;
387 }
388 }
389 }
390
391 container graceful-restart {
392 description
393 "Configuration and operational state parameters for OSPFv2
394 graceful restart";
395
396 container config {
397 description
398 "Configuration parameters relating to OSPFv2 graceful
399 restart";
400 uses ospfv2-global-graceful-restart-config;
401 }
402
403 container state {
404 config false;
405 description
406 "Operational state parameters relating to OSPFv2 graceful
407 restart";
408 uses ospfv2-global-graceful-restart-config;
409 }
410 }
411
412 container mpls {
413 description
414 "OSPFv2 parameters relating to MPLS";
415
416 container config {
417 description
418 "Configuration parameters relating to MPLS for OSPFv2";
419 uses ospfv2-global-mpls-config;
420 }
421
422 container state {
423 config false;
424 description
425 "Operational state parameters relating to MPLS for
426 OSPFv2";
427 uses ospfv2-global-mpls-config;
428 }
429
430 container igp-ldp-sync {
431 description
432 "OSPFv2 parameters relating to LDP/IGP synchronization";
433
434 container config {
435 description
436 "Configuration parameters relating to LDP/IG
437 synchronization.";
438 uses ospfv2-common-mpls-igp-ldp-sync-config;
439 }
440
441 container state {
442 config false;
443 description
444 "Operational state variables relating to LDP/IGP
445 synchronization";
446 uses ospfv2-common-mpls-igp-ldp-sync-config;
447 }
448 }
449 }
450
451 container inter-area-propagation-policies {
452 description
453 "Policies defining how inter-area propagation should be performed
454 by the OSPF instance";
455
456 list inter-area-propagation-policy {
457 key "src-area dst-area";
458 description
459 "A list of connections between pairs of areas - routes are
460 propagated from the source (src) area to the destination (dst)
461 area according to the policy specified";
462
463 leaf src-area {
464 type leafref {
465 path "../config/src-area";
466 }
467 description
468 "Reference to the source area";
469 }
470
471 leaf dst-area {
472 type leafref {
473 path "../config/dst-area";
474 }
475 description
476 "Reference to the destination area";
477 }
478
479 container config {
480 description
481 "Configuration parameters relating to the inter-area
482 propagation policy";
483 uses ospfv2-global-inter-areapp-config;
484 }
485
486 container state {
487 config false;
488 description
489 "Operational state parameters relating to the inter-area
490 propagation policy";
491 uses ospfv2-global-inter-areapp-config;
492 }
493 }
494 }
495 }
496 }
497}