Thomas Vachuska | 6655bee | 2017-08-24 16:12:59 -0700 | [diff] [blame] | 1 | submodule openconfig-ospfv2-area-interface { |
| 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-types { prefix "oc-types"; } |
| 10 | import openconfig-interfaces { prefix "oc-if"; } |
| 11 | import openconfig-ospf-types { prefix "oc-ospf-types"; } |
| 12 | |
| 13 | // include common submodule |
| 14 | include openconfig-ospfv2-common; |
| 15 | |
| 16 | // meta |
| 17 | organization "OpenConfig working group"; |
| 18 | |
| 19 | contact |
| 20 | "OpenConfig working group |
| 21 | www.openconfig.net"; |
| 22 | |
| 23 | description |
| 24 | "This submodule provides OSPFv2 configuration and operational |
| 25 | state parameters that are specific to the area context"; |
| 26 | |
| 27 | oc-ext:openconfig-version "0.1.0"; |
| 28 | |
| 29 | revision "2017-02-28"{ |
| 30 | description |
| 31 | "Initial public release of OSPFv2"; |
| 32 | reference "0.1.0"; |
| 33 | } |
| 34 | |
| 35 | revision "2016-06-24" { |
| 36 | description |
| 37 | "Initial revision"; |
| 38 | reference "0.0.1"; |
| 39 | } |
| 40 | |
| 41 | grouping ospfv2-area-interface-config { |
| 42 | description |
| 43 | "Configuration parameters for an OSPF interface"; |
| 44 | |
| 45 | leaf id { |
| 46 | type string; |
| 47 | description |
| 48 | "An operator-specified string utilised to uniquely |
| 49 | reference this interface"; |
| 50 | } |
| 51 | |
| 52 | leaf network-type { |
| 53 | type identityref { |
| 54 | base "oc-ospf-types:OSPF_NETWORK_TYPE"; |
| 55 | } |
| 56 | description |
| 57 | "The type of network that OSPFv2 should use for the specified |
| 58 | interface."; |
| 59 | } |
| 60 | |
| 61 | leaf priority { |
| 62 | type uint8; |
| 63 | description |
| 64 | "The local system's priority to become the designated |
| 65 | router"; |
| 66 | } |
| 67 | |
| 68 | leaf multi-area-adjacency-primary { |
| 69 | type boolean; |
| 70 | default true; |
| 71 | description |
| 72 | "When the specified interface is included in more than one |
| 73 | area's configuration, this leaf marks whether the area should |
| 74 | be considered the primary (when the value is true). In the |
| 75 | case that this value is false, the area is considered a |
| 76 | secondary area."; |
| 77 | } |
| 78 | |
| 79 | leaf authentication-type { |
| 80 | type string; |
| 81 | // rjs TODO: discuss with bogdanov@ what the approach for auth |
| 82 | // links should be. |
| 83 | description |
| 84 | "The type of authentication that should be used on this |
| 85 | interface"; |
| 86 | } |
| 87 | |
| 88 | leaf metric { |
| 89 | type oc-ospf-types:ospf-metric; |
| 90 | description |
| 91 | "The metric for the interface"; |
| 92 | } |
| 93 | |
| 94 | leaf passive { |
| 95 | type boolean; |
| 96 | description |
| 97 | "When this leaf is set to true, the interface should be |
| 98 | advertised within the OSPF area but OSPF adjacencies should |
| 99 | not be established over the interface"; |
| 100 | } |
| 101 | |
| 102 | leaf hide-network { |
| 103 | type boolean; |
| 104 | description |
| 105 | "When this leaf is set to true, the network connected to |
| 106 | the interface should be hidden from OSPFv2 advertisements |
| 107 | per the procedure described in RFC6860."; |
| 108 | reference |
| 109 | "RFC6860 - Hiding Transit-Only Networks in OSFF"; |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | grouping ospfv2-area-interface-timers-config { |
| 114 | description |
| 115 | "Configuration parameters relating to per-interface OSPFv2 |
| 116 | timers"; |
| 117 | |
| 118 | leaf dead-interval { |
| 119 | type uint32; |
| 120 | units seconds; |
| 121 | description |
| 122 | "The number of seconds that the local system should let |
| 123 | elapse before declaring a silent router down"; |
| 124 | reference "RFC2328"; |
| 125 | } |
| 126 | |
| 127 | leaf hello-interval { |
| 128 | type uint32; |
| 129 | units seconds; |
| 130 | description |
| 131 | "The number of seconds the local system waits between the |
| 132 | transmission of subsequent Hello packets"; |
| 133 | } |
| 134 | |
| 135 | leaf retransmission-interval { |
| 136 | type uint32; |
| 137 | units seconds; |
| 138 | description |
| 139 | "The number of seconds that the local system waits before |
| 140 | retransmitting an unacknowledged LSA."; |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | grouping ospfv2-area-interface-mpls-config { |
| 145 | description |
| 146 | "Configuration parameters relating to MPLS extensions for OSPF"; |
| 147 | |
| 148 | leaf traffic-engineering-metric { |
| 149 | type uint32; |
| 150 | description |
| 151 | "A link metric that should only be considered for traffic |
| 152 | engineering purposes."; |
| 153 | reference "RFC3630, ยง2.5.5"; |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | grouping ospfv2-area-interface-neighbor-config { |
| 158 | description |
| 159 | "Configuration parameters relating to an individual neighbor |
| 160 | system on an interface within an OSPF area"; |
| 161 | |
| 162 | leaf router-id { |
| 163 | type yang:dotted-quad; |
| 164 | description |
| 165 | "The router ID of the remote system."; |
| 166 | } |
| 167 | |
| 168 | leaf metric { |
| 169 | type oc-ospf-types:ospf-metric; |
| 170 | description |
| 171 | "The metric that should be considered to the remote neighbor |
| 172 | over this interface. This configuration is only applicable |
| 173 | for multiple-access networks"; |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | grouping ospfv2-area-interface-neighbor-state { |
| 178 | description |
| 179 | "Operational state parameters relating an individual neighbor |
| 180 | system on an interface within an OSPF area"; |
| 181 | |
| 182 | leaf priority { |
| 183 | type uint8; |
| 184 | description |
| 185 | "The remote system's priority to become the designated |
| 186 | router"; |
| 187 | } |
| 188 | |
| 189 | leaf dead-time { |
| 190 | // rjs TODO: discussion with aashaikh@ + hines@ around how this |
| 191 | // value should be represented, usually is a timer that |
| 192 | // continually counts down but this sounds challenging for |
| 193 | // telemetry. |
| 194 | type oc-types:timeticks64; |
| 195 | description |
| 196 | "The time at which this neighbor's adjacency will be |
| 197 | considered dead. This value is expressed as a number of |
| 198 | seconds since the Unix Epoch"; |
| 199 | } |
| 200 | |
| 201 | leaf designated-router { |
| 202 | type yang:dotted-quad; |
| 203 | description |
| 204 | "The designated router for the adjacency. This device |
| 205 | advertises the Network LSA for broadcast and NBMA networks."; |
| 206 | } |
| 207 | |
| 208 | leaf backup-designated-router { |
| 209 | type yang:dotted-quad; |
| 210 | description |
| 211 | "The backup designated router for the adjacency."; |
| 212 | } |
| 213 | |
| 214 | leaf optional-capabilities { |
| 215 | // rjs TODO: should this be anything more than the hex-string |
| 216 | // this is currently what is shown in IOS/JUNOS |
| 217 | type yang:hex-string; |
| 218 | description |
| 219 | "The optional capabilities field received in the Hello |
| 220 | message from the neighbor"; |
| 221 | } |
| 222 | |
| 223 | leaf last-established-time { |
| 224 | type oc-types:timeticks64; |
| 225 | units seconds; |
| 226 | // rjs TODO: check implementations - is FULL considered 'up' |
| 227 | // since the adjacency is probably up since ExStart |
| 228 | description |
| 229 | "The time at which the adjacency was last established with |
| 230 | the neighbor. That is to say the time at which the |
| 231 | adjacency last transitioned into the FULL state. |
| 232 | |
| 233 | This value is expressed as the number of seconds, relative to |
| 234 | the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; |
| 235 | } |
| 236 | |
| 237 | leaf adjacency-state { |
| 238 | type identityref { |
| 239 | base "oc-ospf-types:OSPF_NEIGHBOR_STATE"; |
| 240 | } |
| 241 | description |
| 242 | "The state of the adjacency with the neighbor."; |
| 243 | } |
| 244 | |
| 245 | leaf state-changes { |
| 246 | type uint32; |
| 247 | description |
| 248 | "The number of transitions out of the FULL state that this |
| 249 | neighbor has been through"; |
| 250 | } |
| 251 | |
| 252 | leaf retranmission-queue-length { |
| 253 | type uint32; |
| 254 | description |
| 255 | "The number of LSAs that are currently in the queue to be |
| 256 | retransmitted to the neighbor"; |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | grouping ospfv2-area-interface-lsa-filter-config { |
| 261 | description |
| 262 | "Configuration options relating to filtering LSAs |
| 263 | on an interface."; |
| 264 | |
| 265 | leaf all { |
| 266 | type boolean; |
| 267 | description |
| 268 | "When this leaf is set to true, all LSAs should be |
| 269 | filtered to the neighbours with whom adjacencies are |
| 270 | formed on the interface."; |
| 271 | } |
| 272 | |
| 273 | // NB: this container can be augmented to add additional |
| 274 | // filtering options which exist in some implementations. |
| 275 | } |
| 276 | |
| 277 | grouping ospfv2-area-interface-mpls-igp-ldp-sync-state { |
| 278 | description |
| 279 | "Operational state parameters relating to MPLS LDP/IGP |
| 280 | synchronization on a per-neighbor basis"; |
| 281 | |
| 282 | leaf synchronized { |
| 283 | type boolean; |
| 284 | description |
| 285 | "When the value of this leaf is set to true, the |
| 286 | LDP neighbors reachable via this interface are considered |
| 287 | to be synchronized, and hence the link is considered |
| 288 | usable by the IGP."; |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | grouping ospfv2-area-interfaces-structure { |
| 293 | description |
| 294 | "Structural grouping for configuration and operational state |
| 295 | parameters that relate to an interface"; |
| 296 | |
| 297 | container interfaces { |
| 298 | description |
| 299 | "Enclosing container for a list of interfaces enabled within |
| 300 | this area"; |
| 301 | |
| 302 | list interface { |
| 303 | key "id"; |
| 304 | |
| 305 | description |
| 306 | "List of interfaces which are enabled within this area"; |
| 307 | |
| 308 | leaf id { |
| 309 | type leafref { |
| 310 | path "../config/id"; |
| 311 | } |
| 312 | description |
| 313 | "A pointer to the identifier for the interface."; |
| 314 | } |
| 315 | |
| 316 | container config { |
| 317 | description |
| 318 | "Configuration parameters for the interface on which |
| 319 | OSPFv2 is enabled"; |
| 320 | |
| 321 | uses ospfv2-area-interface-config; |
| 322 | } |
| 323 | |
| 324 | container state { |
| 325 | config false; |
| 326 | description |
| 327 | "Operational state parameters for the interface on which |
| 328 | OSPFv2 is enabled"; |
| 329 | uses ospfv2-area-interface-config; |
| 330 | } |
| 331 | |
| 332 | uses oc-if:interface-ref; |
| 333 | |
| 334 | container timers { |
| 335 | description |
| 336 | "Timers relating to OSPFv2 on the interface"; |
| 337 | |
| 338 | container config { |
| 339 | description |
| 340 | "Configuration parameters for OSPFv2 timers on the |
| 341 | interface"; |
| 342 | uses ospfv2-area-interface-timers-config; |
| 343 | } |
| 344 | |
| 345 | container state { |
| 346 | config false; |
| 347 | description |
| 348 | "Operational state parameters for OSPFv2 timers on |
| 349 | the interface"; |
| 350 | |
| 351 | uses ospfv2-area-interface-timers-config; |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | container mpls { |
| 356 | description |
| 357 | "Configuration and operational state parameters for |
| 358 | OSPFv2 extensions related to MPLS on the interface."; |
| 359 | |
| 360 | container config { |
| 361 | description |
| 362 | "Configuration parameters for OSPFv2 extensions relating |
| 363 | to MPLS for the interface"; |
| 364 | uses ospfv2-area-interface-mpls-config; |
| 365 | } |
| 366 | |
| 367 | container state { |
| 368 | config false; |
| 369 | description |
| 370 | "Operational state for OSPFv2 extensions relating to |
| 371 | MPLS for the interface"; |
| 372 | uses ospfv2-area-interface-mpls-config; |
| 373 | } |
| 374 | |
| 375 | container igp-ldp-sync { |
| 376 | description |
| 377 | "OSPFv2 parameters relating to LDP/IGP synchronization"; |
| 378 | |
| 379 | container config { |
| 380 | description |
| 381 | "Configuration parameters relating to LDP/IG |
| 382 | synchronization."; |
| 383 | uses ospfv2-common-mpls-igp-ldp-sync-config; |
| 384 | } |
| 385 | |
| 386 | container state { |
| 387 | config false; |
| 388 | description |
| 389 | "Operational state variables relating to LDP/IGP |
| 390 | synchronization"; |
| 391 | uses ospfv2-common-mpls-igp-ldp-sync-config; |
| 392 | uses ospfv2-area-interface-mpls-igp-ldp-sync-state; |
| 393 | } |
| 394 | } |
| 395 | } |
| 396 | |
| 397 | container lsa-filter { |
| 398 | description |
| 399 | "OSPFv2 parameters relating to filtering of LSAs to |
| 400 | neighbors the specified interface."; |
| 401 | |
| 402 | container config { |
| 403 | description |
| 404 | "Configuration parameters relating to filtering LSAs |
| 405 | on the specified interface."; |
| 406 | uses ospfv2-area-interface-lsa-filter-config; |
| 407 | } |
| 408 | |
| 409 | container state { |
| 410 | config false; |
| 411 | description |
| 412 | "Operational state parameters relating to filtering |
| 413 | LSAs on the specified interface"; |
| 414 | uses ospfv2-area-interface-lsa-filter-config; |
| 415 | } |
| 416 | } |
| 417 | |
| 418 | container neighbors { |
| 419 | description |
| 420 | "Enclosing container for the list of neighbors that |
| 421 | an adjacency has been established with on the interface"; |
| 422 | |
| 423 | list neighbor { |
| 424 | key "router-id"; |
| 425 | |
| 426 | description |
| 427 | "A neighbor with which an OSPFv2 adjacency has been |
| 428 | established within this area"; |
| 429 | |
| 430 | leaf router-id { |
| 431 | type leafref { |
| 432 | path "../config/router-id"; |
| 433 | } |
| 434 | description |
| 435 | "Reference to the router ID of the adjacent system"; |
| 436 | } |
| 437 | |
| 438 | container config { |
| 439 | description |
| 440 | "Configuration parameters relating to the adjacent |
| 441 | system"; |
| 442 | uses ospfv2-area-interface-neighbor-config; |
| 443 | } |
| 444 | |
| 445 | container state { |
| 446 | config false; |
| 447 | description |
| 448 | "Operational state parameters relating to the adjacent |
| 449 | system"; |
| 450 | uses ospfv2-area-interface-neighbor-config; |
| 451 | uses ospfv2-area-interface-neighbor-state; |
| 452 | } |
| 453 | } |
| 454 | } |
| 455 | |
| 456 | } |
| 457 | } |
| 458 | } |
| 459 | |
| 460 | } |