3 namespace "urn:opendaylight:params:xml:ns:yang:bgp-linkstate";
6 import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
7 import bgp-message { prefix bgp-msg; revision-date 2013-09-19; }
8 import bgp-multiprotocol { prefix bgp-mp; revision-date 2013-09-19; }
9 import bgp-rib { prefix bgp-rib; revision-date 2013-09-25; }
10 import bgp-types { prefix bgp-t; revision-date 2013-09-19; }
11 import network-concepts { prefix netc; revision-date 2013-11-25; }
12 import rsvp { prefix rsvp; revision-date 2013-08-20; }
13 import bgp-segment-routing { prefix bgp-sr; revision-date 2015-02-06; }
15 organization "Cisco Systems, Inc.";
16 contact "Dana Kutenicsova <dkutenic@cisco.com>";
19 "This module contains the base data model of a BGP message.
20 It rolls up the definitions contained in RFC4271
21 and draft-ietf-idr-ls-distribution-03.
23 Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
25 This program and the accompanying materials are made available
26 under the terms of the Eclipse Public License v1.0 which
27 accompanies this distribution, and is available at
28 http://www.eclipse.org/legal/epl-v10.html";
30 revision "2015-02-10" {
32 "Updated to include segment routing.";
35 revision "2013-11-25" {
37 "Updated to cover network-concepts.";
40 revision "2013-09-18" {
43 reference "draft-ietf-idr-ls-distribution-03";
46 identity linkstate-address-family {
47 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
49 base bgp-t:address-family;
52 identity linkstate-subsequent-address-family {
53 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
55 base bgp-t:subsequent-address-family;
59 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
77 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
100 typedef ospf-route-type {
101 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.3.1";
124 typedef route-distinguisher {
132 typedef domain-identifier {
133 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
137 typedef area-identifier {
138 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
142 typedef ipv4-interface-identifier {
143 reference "http://tools.ietf.org/html/rfc5305#section-3.2";
144 type inet:ipv4-address;
147 typedef ipv6-interface-identifier {
148 reference "http://tools.ietf.org/html/rfc6119#section-4.2";
149 type inet:ipv6-address;
152 typedef ospf-interface-identifier {
153 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
157 typedef topology-identifier {
158 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.5";
165 grouping isis-router-identifier {
166 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
168 type netc:iso-system-identifier;
173 grouping isis-lan-identifier {
174 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
175 container is-is-router-identifier {
176 uses isis-router-identifier;
186 grouping ospf-router-identifier {
187 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
188 leaf ospf-router-id {
194 grouping ospf-v2-lan-identifier {
195 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
196 uses ospf-router-identifier;
198 type ipv4-interface-identifier;
203 grouping ospf-v3-lan-identifier {
204 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
205 uses ospf-router-identifier;
207 type ospf-interface-identifier;
212 grouping node-identifier {
217 type area-identifier;
220 type domain-identifier;
222 choice c-router-identifier {
223 case isis-node-case {
224 container isis-node {
225 uses isis-router-identifier;
229 case isis-pseudonode-case {
230 container isis-pseudonode {
231 uses isis-lan-identifier;
235 case ospf-node-case {
236 container ospf-node {
237 uses ospf-router-identifier;
241 case ospf-pseudonode-case {
242 container ospf-pseudonode {
243 uses ospf-v3-lan-identifier;
249 grouping link-lr-identifiers {
250 reference "http://tools.ietf.org/html/rfc5307";
251 leaf link-local-identifier {
254 leaf link-remote-identifier {
259 grouping prefix-identifiers {
260 leaf multi-topology-id {
261 type topology-identifier;
263 leaf ospf-route-type {
264 when "../../protocol-id = 'ospf'";
265 type ospf-route-type;
267 leaf ip-reachability-information {
272 grouping link-identifier {
273 uses link-lr-identifiers;
274 leaf ipv4-interface-address {
275 type ipv4-interface-identifier;
277 leaf ipv6-interface-address {
278 type ipv6-interface-identifier;
280 leaf ipv4-neighbor-address {
281 type ipv4-interface-identifier;
283 leaf ipv6-neighbor-address {
284 type ipv6-interface-identifier;
286 leaf multi-topology-id {
287 type topology-identifier;
291 grouping linkstate-destination {
292 list c-linkstate-destination {
297 type route-distinguisher;
305 container local-node-descriptors {
306 uses node-identifier;
308 container remote-node-descriptors {
309 when "../nlri-type = link";
310 uses node-identifier;
312 container link-descriptors {
313 when "../nlri-type = link";
314 uses link-identifier;
316 container prefix-descriptors {
317 when "../nlri-type = 'ipv4-prefix' or ../nlri-type = 'ipv6-prefix'";
318 uses prefix-identifiers;
323 augment "/bgp-msg:update/bgp-msg:path-attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" {
324 case destination-linkstate-case {
325 container destination-linkstate {
326 uses linkstate-destination;
331 augment "/bgp-msg:update/bgp-msg:path-attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" {
332 case destination-linkstate-case {
333 container destination-linkstate {
334 uses linkstate-destination;
339 typedef node-flag-bits {
340 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.1";
357 typedef isis-area-identifier {
358 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.2";
364 typedef ipv4-router-identifier {
365 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.4";
366 type inet:ipv4-address;
369 typedef ipv6-router-identifier {
370 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.4";
371 type inet:ipv6-address;
374 grouping node-state {
375 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1";
376 leaf-list topology-identifier {
377 type topology-identifier;
382 leaf-list isis-area-id {
383 type isis-area-identifier;
385 leaf dynamic-hostname {
388 leaf ipv4-router-id {
389 type ipv4-router-identifier;
391 leaf ipv6-router-id {
392 type ipv6-router-identifier;
394 uses bgp-sr:sid-label-binding;
395 uses bgp-sr:sr-capabilities;
396 uses bgp-sr:sr-algorithm;
399 typedef link-protection-type {
400 reference "http://tools.ietf.org/html/rfc5307#section-1.2";
411 enum dedicated-1to1 {
414 enum dedicated-1plus1 {
424 typedef mpls-protocol-mask {
425 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.2.2";
436 typedef administrative-group {
440 grouping unreserved-bandwidth {
451 grouping link-state {
452 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.2";
453 leaf local-ipv4-router-id {
454 type ipv4-router-identifier;
456 leaf local-ipv6-router-id {
457 type ipv6-router-identifier;
459 leaf remote-ipv4-router-id {
460 type ipv4-router-identifier;
462 leaf remote-ipv6-router-id {
463 type ipv6-router-identifier;
466 type mpls-protocol-mask;
474 leaf-list shared-risk-link-groups {
480 leaf max-link-bandwidth {
483 leaf max-reservable-bandwidth {
486 list unreserved-bandwidth {
488 uses unreserved-bandwidth;
490 leaf link-protection {
491 type link-protection-type;
494 type administrative-group;
496 uses bgp-sr:adjacency-segment-identifier;
497 uses bgp-sr:lan-adjacency-segment-identifier;
501 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.2";
507 typedef extended-route-tag {
508 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.3";
515 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.1";
525 grouping prefix-state {
529 leaf-list route-tags {
532 leaf-list extended-tags {
533 type extended-route-tag;
536 type netc:igp-metric;
538 leaf ospf-forwarding-address {
539 type inet:ip-address;
541 uses bgp-sr:prefix-sid;
544 grouping linkstate-routes {
545 container linkstate-routes {
546 list linkstate-route {
548 "Link-state information entry. Due to
549 the complexity of link-state information
550 and YANG limitations this is the top-level
551 object from contract perspective. It is
552 keyed by route-key, whose format is
553 internal to the implementation exposing
554 this information. As an explicit example
555 it can rely on information stored in the
556 entry's subtree, so the subtree MUST NOT
557 be modified by outside entities.
558 Augmentations can attach data, but must
559 be explicitly aware that such data, unlike
560 the data modeled directly here, does not
561 have any effects on keys, especially they
562 must not impact equality tests.";
566 "The sole function of this leaf
567 to act as the key in the list.
568 Its format does not form the
569 API contract of this model.";
575 type route-distinguisher;
586 container node-descriptors {
587 uses node-identifier;
591 container local-node-descriptors {
592 uses node-identifier;
594 container remote-node-descriptors {
595 uses node-identifier;
597 container link-descriptors {
598 uses link-identifier;
602 container advertising-node-descriptors {
603 uses node-identifier;
606 uses prefix-identifiers;
612 choice attribute-type {
614 container node-attributes {
619 container link-attributes {
624 container prefix-attributes {
635 augment "/bgp-msg:update/bgp-msg:path-attributes" {
636 container linkstate-path-attribute {
637 choice link-state-attribute {
638 case node-attributes-case {
639 container node-attributes {
640 when "../../nlri-type = node";
644 case link-attributes-case {
645 container link-attributes {
646 when "../../nlri-type = link";
650 case prefix-attributes-case {
651 container prefix-attributes {
652 when "../nlri-type = 'ipv4-prefix' or ../nlri-type = 'ipv6-prefix'";
660 augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" {
661 case linkstate-routes-case {
662 uses linkstate-routes;
666 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" {
667 case linkstate-routes-case {
668 uses linkstate-routes;