3 namespace "urn:opendaylight:params:xml:ns:yang:bgp-linkstate";
6 import ietf-inet-types { prefix inet; revision-date 2013-07-15; }
7 import bgp-message { prefix bgp-msg; revision-date 2018-03-29; }
8 import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; }
9 import bgp-rib { prefix bgp-rib; revision-date 2018-03-29; }
10 import bgp-types { prefix bgp-t; revision-date 2018-03-29; }
11 import network-concepts { prefix netc; revision-date 2013-11-25; }
12 import rsvp { prefix rsvp; revision-date 2015-08-20; }
13 import bgp-segment-routing { prefix bgp-sr; revision-date 2015-10-14; }
14 import bgp-epe { prefix bgp-epe; revision-date 2015-06-22; }
15 import bmp-monitor { prefix bmp-mon; revision-date 2018-03-29; }
16 import yang-ext { prefix ext; revision-date 2013-07-09; }
18 organization "Cisco Systems, Inc.";
19 contact "Dana Kutenicsova <dkutenic@cisco.com>";
22 "This module contains the base data model of a BGP message.
23 It rolls up the definitions contained in RFC4271
24 and draft-ietf-idr-ls-distribution-03.
26 Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
28 This program and the accompanying materials are made available
29 under the terms of the Eclipse Public License v1.0 which
30 accompanies this distribution, and is available at
31 http://www.eclipse.org/legal/epl-v10.html";
33 revision "2018-03-29" {
34 description "Add support for add-path for all afi/safi.";
37 revision "2017-12-07" {
38 description "Add support for add-path in base BGP NLRI.";
41 revision "2015-02-10" {
43 "Updated to include segment routing.";
46 revision "2013-11-25" {
48 "Updated to cover network-concepts.";
51 revision "2013-09-18" {
54 reference "draft-ietf-idr-ls-distribution-03";
57 identity linkstate-address-family {
58 reference "https://tools.ietf.org/html/rfc7752#section-3.2";
60 base bgp-t:address-family;
63 identity linkstate-subsequent-address-family {
64 reference "https://tools.ietf.org/html/rfc7752#section-3.2";
66 base bgp-t:subsequent-address-family;
70 reference "https://tools.ietf.org/html/rfc7752#section-3.2";
86 reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-4.1";
91 reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-4.1";
98 reference "https://tools.ietf.org/html/rfc7752#section-3.2";
119 reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05#section-4";
124 reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-2.1";
125 value 8; // rsvp-te protocol-id TBD by IANA
127 enum segment-routing {
129 reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-2.1";
130 value 9; // segment-routing protocol-id TBD by IANA
135 typedef ospf-route-type {
136 reference "https://tools.ietf.org/html/rfc7752#section-3.2.3.1";
163 typedef domain-identifier {
164 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
168 typedef area-identifier {
169 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
173 typedef ipv4-interface-identifier {
174 reference "http://tools.ietf.org/html/rfc5305#section-3.2";
175 type inet:ipv4-address;
178 typedef ipv6-interface-identifier {
179 reference "http://tools.ietf.org/html/rfc6119#section-4.2";
180 type inet:ipv6-address;
183 typedef ospf-interface-identifier {
184 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
188 typedef topology-identifier {
189 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.5";
196 grouping isis-router-identifier {
197 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
199 type netc:iso-system-identifier;
204 grouping isis-lan-identifier {
205 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
206 container is-is-router-identifier {
207 uses isis-router-identifier;
217 grouping ospf-router-identifier {
218 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
219 leaf ospf-router-id {
225 grouping ospf-v2-lan-identifier {
226 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
227 uses ospf-router-identifier;
229 type ipv4-interface-identifier;
234 grouping ospf-v3-lan-identifier {
235 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
236 uses ospf-router-identifier;
238 type ospf-interface-identifier;
243 grouping node-identifier {
248 type area-identifier;
251 type domain-identifier;
253 choice c-router-identifier {
254 case isis-node-case {
255 container isis-node {
256 uses isis-router-identifier;
259 case isis-pseudonode-case {
260 container isis-pseudonode {
261 uses isis-lan-identifier;
264 case ospf-node-case {
265 container ospf-node {
266 uses ospf-router-identifier;
269 case ospf-pseudonode-case {
270 container ospf-pseudonode {
271 uses ospf-v3-lan-identifier;
277 grouping link-lr-identifiers {
278 reference "http://tools.ietf.org/html/rfc5307";
279 leaf link-local-identifier {
282 leaf link-remote-identifier {
287 grouping prefix-identifiers {
288 leaf multi-topology-id {
289 type topology-identifier;
291 leaf ospf-route-type {
292 when "../../protocol-id[ .='ospf' or .='ospf-v3' ]";
293 type ospf-route-type;
295 leaf ip-reachability-information {
300 grouping link-identifier {
301 uses link-lr-identifiers;
302 leaf ipv4-interface-address {
303 type ipv4-interface-identifier;
305 leaf ipv6-interface-address {
306 type ipv6-interface-identifier;
308 leaf ipv4-neighbor-address {
309 type ipv4-interface-identifier;
311 leaf ipv6-neighbor-address {
312 type ipv6-interface-identifier;
314 leaf multi-topology-id {
315 type topology-identifier;
320 uses bgp-t:route-distinguisher-grouping {
321 refine route-distinguisher {
335 container node-descriptors {
336 uses node-identifier;
340 container local-node-descriptors {
341 uses node-identifier;
342 uses bgp-epe:epe-node-descriptors;
344 container remote-node-descriptors {
345 uses node-identifier;
346 uses bgp-epe:epe-node-descriptors;
348 container link-descriptors {
349 uses link-identifier;
353 container advertising-node-descriptors {
354 uses node-identifier;
356 container prefix-descriptors {
357 uses prefix-identifiers;
361 choice address-family {
363 leaf ipv4-tunnel-sender-address {
364 type inet:ipv4-address;
367 leaf ipv4-tunnel-endpoint-address {
368 type inet:ipv4-address;
373 leaf ipv6-tunnel-sender-address {
374 type inet:ipv6-address;
377 leaf ipv6-tunnel-endpoint-address {
378 type inet:ipv6-address;
393 grouping linkstate-destination {
394 list c-linkstate-destination {
396 uses bgp-msg:path-id-grouping;
400 augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" {
401 case destination-linkstate-case {
402 container destination-linkstate {
403 uses linkstate-destination;
408 augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" {
409 case destination-linkstate-case {
410 container destination-linkstate {
411 uses linkstate-destination;
416 typedef node-flag-bits {
417 reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.1";
440 typedef isis-area-identifier {
441 reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.2";
447 typedef ipv4-router-identifier {
448 reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.4";
449 type inet:ipv4-address;
452 typedef ipv6-router-identifier {
453 reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.4";
454 type inet:ipv6-address;
457 grouping node-state {
458 reference "https://tools.ietf.org/html/rfc7752#section-3.3.1";
459 leaf-list topology-identifier {
460 type topology-identifier;
465 leaf-list isis-area-id {
466 type isis-area-identifier;
468 leaf dynamic-hostname {
471 leaf ipv4-router-id {
472 type ipv4-router-identifier;
474 leaf ipv6-router-id {
475 type ipv6-router-identifier;
477 container sr-capabilities {
478 uses bgp-sr:sr-capabilities-tlv;
480 container sr-algorithm {
481 uses bgp-sr:sr-algorithms-tlv;
485 typedef link-protection-type {
486 reference "http://tools.ietf.org/html/rfc5307#section-1.2";
497 enum dedicated-1to1 {
500 enum dedicated-1plus1 {
510 typedef mpls-protocol-mask {
511 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.2.2";
522 typedef administrative-group {
526 grouping unreserved-bandwidth {
537 grouping linkstate-attribute {
538 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.2";
539 leaf local-ipv4-router-id {
540 type ipv4-router-identifier;
542 leaf local-ipv6-router-id {
543 type ipv6-router-identifier;
545 leaf remote-ipv4-router-id {
546 type ipv4-router-identifier;
548 leaf remote-ipv6-router-id {
549 type ipv6-router-identifier;
552 type mpls-protocol-mask;
560 leaf-list shared-risk-link-groups {
566 leaf max-link-bandwidth {
569 leaf max-reservable-bandwidth {
572 list unreserved-bandwidth {
574 uses unreserved-bandwidth;
576 leaf link-protection {
577 type link-protection-type;
580 type administrative-group;
583 uses bgp-sr:adj-sid-tlv;
585 list sr-lan-adj-ids {
586 uses bgp-sr:lan-adj-sid-tlv;
588 container peer-node-sid {
589 description "The SID representing the peer of the BGP session.";
590 reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05#section-4.3";
591 uses bgp-sr:epe-adj-sid-tlv;
593 container peer-adj-sid {
594 description "The SID representing the peer of the BGP session.";
595 reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05#section-4.3";
596 uses bgp-sr:epe-adj-sid-tlv;
599 description "The SID representing the group the peer is part of.";
600 reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05#section-4.3";
601 uses bgp-sr:epe-adj-sid-tlv;
606 reference "https://tools.ietf.org/html/rfc7752#section-3.3.3.2";
607 description "Carries original IGP TAGs of the prefix.";
613 typedef extended-route-tag {
614 reference "https://tools.ietf.org/html/rfc7752#section-3.3.3.3";
615 description "Carries IS-IS Extended Route Tags of the prefix.";
622 reference "https://tools.ietf.org/html/rfc7752#section-3.3.3.1";
634 leaf ospf-no-unicast {
637 leaf ospf-local-address {
640 leaf ospf-propagate-nssa {
645 grouping prefix-state {
649 leaf-list route-tags {
652 leaf-list extended-tags {
653 type extended-route-tag;
656 type netc:igp-metric;
658 leaf ospf-forwarding-address {
659 type inet:ip-address;
661 container sr-prefix {
662 uses bgp-sr:prefix-sid-tlv;
664 container ipv6-sr-prefix {
665 uses bgp-sr:ipv6-prefix-sid-tlv;
668 uses bgp-sr:range-tlv;
670 list sr-binding-sid-labels {
671 uses bgp-sr:binding-sid-tlv;
675 grouping linkstate-path-attribute {
676 choice link-state-attribute {
677 case node-attributes-case {
678 container node-attributes {
682 case link-attributes-case {
683 container link-attributes {
684 uses linkstate-attribute;
687 case prefix-attributes-case {
688 container prefix-attributes {
692 case te-lsp-attributes-case {
694 description "LSP Object";
695 reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-2.2";
696 container te-lsp-attributes {
697 uses rsvp:tspec-object;
698 uses rsvp:flow-spec-object;
699 uses rsvp:session-attribute-object;
700 uses rsvp:explicit-route-object;
701 uses rsvp:secondary-explicit-route-object;
702 uses rsvp:record-route-object;
703 uses rsvp:secondary-record-route-object;
704 uses rsvp:fast-reroute-object;
705 uses rsvp:detour-object;
706 uses rsvp:exclude-route-object;
707 uses rsvp:lsp-attributes-object;
708 uses rsvp:lsp-required-attributes-object;
709 uses rsvp:protection-object;
710 uses rsvp:association-object;
711 uses rsvp:primary-path-route-object;
712 uses rsvp:admin-status-object;
713 uses rsvp:bandwidth-object;
714 uses rsvp:metric-object;
720 grouping linkstate-routes {
721 container linkstate-routes {
722 list linkstate-route {
724 "Link-state information entry. Due to
725 the complexity of link-state information
726 and YANG limitations this is the top-level
727 object from contract perspective. It is
728 keyed by route-key, whose format is
729 internal to the implementation exposing
730 this information. As an explicit example
731 it can rely on information stored in the
732 entry's subtree, so the subtree MUST NOT
733 be modified by outside entities.
734 Augmentations can attach data, but must
735 be explicitly aware that such data, unlike
736 the data modeled directly here, does not
737 have any effects on keys, especially they
738 must not impact equality tests.";
740 key "route-key path-id";
745 uses linkstate-path-attribute;
752 augment "/bgp-msg:update/bgp-msg:attributes" {
753 uses linkstate-path-attribute;
756 augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" {
757 case linkstate-routes-case {
758 uses linkstate-routes;
762 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" {
763 case linkstate-routes-case {
764 uses linkstate-routes;
768 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" {
769 case linkstate-routes-case {
770 uses linkstate-routes;
774 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" {
775 case linkstate-routes-case {
776 uses linkstate-routes;
780 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" {
781 case linkstate-routes-case {
782 uses linkstate-routes;
786 augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:pre-policy-rib/bmp-mon:tables/bmp-mon:routes" {
787 case linkstate-routes-case {
788 uses linkstate-routes;
792 augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:post-policy-rib/bmp-mon:tables/bmp-mon:routes" {
793 case linkstate-routes-case {
794 uses linkstate-routes;