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 odl-uint24 { prefix uint24; }
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
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.
35 and Updated to include Performance Metric Extensions";
36 reference "draft-ietf-idr-te-pm-bgp-17";
39 revision "2017-12-07" {
40 description "Add support for add-path in base BGP NLRI.";
43 revision "2015-02-10" {
45 "Updated to include segment routing.";
48 revision "2013-11-25" {
50 "Updated to cover network-concepts.";
53 revision "2013-09-18" {
56 reference "draft-ietf-idr-ls-distribution-03";
59 identity linkstate-address-family {
60 reference "https://tools.ietf.org/html/rfc7752#section-3.2";
62 base bgp-t:address-family;
65 identity linkstate-subsequent-address-family {
66 reference "https://tools.ietf.org/html/rfc7752#section-3.2";
68 base bgp-t:subsequent-address-family;
72 reference "https://tools.ietf.org/html/rfc7752#section-3.2";
88 reference "http://tools.ietf.org/html/rfc7752#section-4.1";
93 reference "http://tools.ietf.org/html/rfc7752#section-4.1";
100 reference "https://tools.ietf.org/html/rfc7752#section-3.2";
121 reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05#section-4";
126 reference "http://tools.ietf.org/html/rfc7752#section-2.1";
127 value 8; // rsvp-te protocol-id TBD by IANA
129 enum segment-routing {
131 reference "http://tools.ietf.org/html/rfc7752#section-2.1";
132 value 9; // segment-routing protocol-id TBD by IANA
137 typedef ospf-route-type {
138 reference "https://tools.ietf.org/html/rfc7752#section-3.2.3.1";
165 typedef domain-identifier {
166 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
170 typedef area-identifier {
171 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
175 typedef ipv4-interface-identifier {
176 reference "http://tools.ietf.org/html/rfc5305#section-3.2";
177 type inet:ipv4-address;
180 typedef ipv6-interface-identifier {
181 reference "http://tools.ietf.org/html/rfc6119#section-4.2";
182 type inet:ipv6-address;
185 typedef ospf-interface-identifier {
186 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
190 typedef topology-identifier {
191 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.5";
198 grouping isis-router-identifier {
199 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
201 type netc:iso-system-identifier;
206 grouping isis-lan-identifier {
207 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
208 container is-is-router-identifier {
209 uses isis-router-identifier;
219 grouping ospf-router-identifier {
220 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
221 leaf ospf-router-id {
227 grouping ospf-v2-lan-identifier {
228 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
229 uses ospf-router-identifier;
231 type ipv4-interface-identifier;
236 grouping ospf-v3-lan-identifier {
237 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
238 uses ospf-router-identifier;
240 type ospf-interface-identifier;
245 grouping node-identifier {
250 type area-identifier;
253 type domain-identifier;
255 choice c-router-identifier {
256 case isis-node-case {
257 container isis-node {
258 uses isis-router-identifier;
261 case isis-pseudonode-case {
262 container isis-pseudonode {
263 uses isis-lan-identifier;
266 case ospf-node-case {
267 container ospf-node {
268 uses ospf-router-identifier;
271 case ospf-pseudonode-case {
272 container ospf-pseudonode {
273 uses ospf-v3-lan-identifier;
279 grouping link-lr-identifiers {
280 reference "http://tools.ietf.org/html/rfc5307";
281 leaf link-local-identifier {
284 leaf link-remote-identifier {
289 grouping prefix-identifiers {
290 leaf multi-topology-id {
291 type topology-identifier;
293 leaf ospf-route-type {
294 when "../../protocol-id[ .='ospf' or .='ospf-v3' ]";
295 type ospf-route-type;
297 leaf ip-reachability-information {
302 grouping link-identifier {
303 uses link-lr-identifiers;
304 leaf ipv4-interface-address {
305 type ipv4-interface-identifier;
307 leaf ipv6-interface-address {
308 type ipv6-interface-identifier;
310 leaf ipv4-neighbor-address {
311 type ipv4-interface-identifier;
313 leaf ipv6-neighbor-address {
314 type ipv6-interface-identifier;
316 leaf multi-topology-id {
317 type topology-identifier;
322 uses bgp-t:route-distinguisher-grouping {
323 refine route-distinguisher {
337 container node-descriptors {
338 uses node-identifier;
342 container local-node-descriptors {
343 uses node-identifier;
344 uses bgp-epe:epe-node-descriptors;
346 container remote-node-descriptors {
347 uses node-identifier;
348 uses bgp-epe:epe-node-descriptors;
350 container link-descriptors {
351 uses link-identifier;
355 container advertising-node-descriptors {
356 uses node-identifier;
358 container prefix-descriptors {
359 uses prefix-identifiers;
363 choice address-family {
365 leaf ipv4-tunnel-sender-address {
366 type inet:ipv4-address;
369 leaf ipv4-tunnel-endpoint-address {
370 type inet:ipv4-address;
375 leaf ipv6-tunnel-sender-address {
376 type inet:ipv6-address;
379 leaf ipv6-tunnel-endpoint-address {
380 type inet:ipv6-address;
395 grouping linkstate-destination {
396 list c-linkstate-destination {
398 uses bgp-msg:path-id-grouping;
402 augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" {
403 case destination-linkstate-case {
404 container destination-linkstate {
405 uses linkstate-destination;
410 augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" {
411 case destination-linkstate-case {
412 container destination-linkstate {
413 uses linkstate-destination;
418 typedef node-flag-bits {
419 reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.1";
442 typedef isis-area-identifier {
443 reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.2";
449 typedef ipv4-router-identifier {
450 reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.4";
451 type inet:ipv4-address;
454 typedef ipv6-router-identifier {
455 reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.4";
456 type inet:ipv6-address;
459 grouping node-state {
460 reference "https://tools.ietf.org/html/rfc7752#section-3.3.1";
461 leaf-list topology-identifier {
462 type topology-identifier;
467 leaf-list isis-area-id {
468 type isis-area-identifier;
470 leaf dynamic-hostname {
473 leaf ipv4-router-id {
474 type ipv4-router-identifier;
476 leaf ipv6-router-id {
477 type ipv6-router-identifier;
479 container sr-capabilities {
480 uses bgp-sr:sr-capabilities-tlv;
482 container sr-algorithm {
483 uses bgp-sr:sr-algorithms-tlv;
487 typedef link-protection-type {
488 reference "http://tools.ietf.org/html/rfc5307#section-1.2";
499 enum dedicated-1to1 {
502 enum dedicated-1plus1 {
512 typedef mpls-protocol-mask {
513 reference "http://tools.ietf.org/html/rfc7752#section-3.3.2.2";
524 typedef administrative-group {
528 grouping unreserved-bandwidth {
540 description "This 24-bit typedef describes delay over a configurable
541 interval in microseconds, encoded as an integer value. When set to
542 the maximum value 16,777,215 (16.777215 sec), then the delay is at
543 least that value, and it may be larger.";
544 reference "https://tools.ietf.org/html/rfc7471#section-4.1.5";
550 description "This 24-bit typedef describes packet loss as a percentage
551 of the total traffic sent over a configurable interval. The basic
552 unit is 0.000003%, where (2^24 - 2) is 50.331642%. This value is
553 the highest packet loss percentage that can be expressed.
554 Therefore, measured values that are larger than the field maximum
555 SHOULD be encoded as the maximum value.";
556 reference "https://tools.ietf.org/html/rfc7471#section-4.4.5";
561 grouping linkstate-attribute {
562 reference "http://tools.ietf.org/html/rfc7752#section-3.3.2";
563 leaf local-ipv4-router-id {
564 type ipv4-router-identifier;
566 leaf local-ipv6-router-id {
567 type ipv6-router-identifier;
569 leaf remote-ipv4-router-id {
570 type ipv4-router-identifier;
572 leaf remote-ipv6-router-id {
573 type ipv6-router-identifier;
576 type mpls-protocol-mask;
584 leaf-list shared-risk-link-groups {
590 leaf max-link-bandwidth {
593 leaf max-reservable-bandwidth {
596 list unreserved-bandwidth {
598 uses unreserved-bandwidth;
600 leaf link-protection {
601 type link-protection-type;
604 type administrative-group;
607 uses bgp-sr:adj-sid-tlv;
609 list sr-lan-adj-ids {
610 uses bgp-sr:lan-adj-sid-tlv;
612 container peer-node-sid {
613 description "The SID representing the peer of the BGP session.";
614 reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05#section-4.3";
615 uses bgp-sr:epe-adj-sid-tlv;
617 container peer-adj-sid {
618 description "The SID representing the peer of the BGP session.";
619 reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05#section-4.3";
620 uses bgp-sr:epe-adj-sid-tlv;
623 description "The SID representing the group the peer is part of.";
624 reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05#section-4.3";
625 uses bgp-sr:epe-adj-sid-tlv;
627 // Performance Metric https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-17#section-2
629 description "Unidirectional Link Delay";
630 reference "https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-17#section-2.1";
633 container link-min-max-delay {
634 description "Min/Max Unidirectional Link Delay";
635 reference "https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-17#section-2.2";
643 leaf delay-variation {
644 description "Unidirectional Delay Variation";
645 reference "https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-17#section-2.3";
649 description "Unidirectional Link Loss";
650 reference "https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-17#section-2.4";
653 leaf residual-bandwidth {
654 description "Unidirectional Residual Bandwidth";
655 reference "https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-17#section-2.5";
658 leaf available-bandwidth {
659 description "Unidirectional Available Bandwidth";
660 reference "https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-17#section-2.6";
663 leaf utilized-bandwidth {
664 description "Unidirectional Utilized Bandwidth";
665 reference "https://tools.ietf.org/html/draft-ietf-idr-te-pm-bgp-17#section-2.7";
671 reference "https://tools.ietf.org/html/rfc7752#section-3.3.3.2";
672 description "Carries original IGP TAGs of the prefix.";
678 typedef extended-route-tag {
679 reference "https://tools.ietf.org/html/rfc7752#section-3.3.3.3";
680 description "Carries IS-IS Extended Route Tags of the prefix.";
687 reference "https://tools.ietf.org/html/rfc7752#section-3.3.3.1";
699 leaf ospf-no-unicast {
702 leaf ospf-local-address {
705 leaf ospf-propagate-nssa {
710 grouping prefix-state {
714 leaf-list route-tags {
717 leaf-list extended-tags {
718 type extended-route-tag;
721 type netc:igp-metric;
723 leaf ospf-forwarding-address {
724 type inet:ip-address;
726 container sr-prefix {
727 uses bgp-sr:prefix-sid-tlv;
729 container ipv6-sr-prefix {
730 uses bgp-sr:ipv6-prefix-sid-tlv;
733 uses bgp-sr:range-tlv;
735 list sr-binding-sid-labels {
736 uses bgp-sr:binding-sid-tlv;
740 grouping linkstate-path-attribute {
741 choice link-state-attribute {
742 case node-attributes-case {
743 container node-attributes {
747 case link-attributes-case {
748 container link-attributes {
749 uses linkstate-attribute;
752 case prefix-attributes-case {
753 container prefix-attributes {
757 case te-lsp-attributes-case {
759 description "LSP Object";
760 reference "http://tools.ietf.org/html/rfc7752#section-2.2";
761 container te-lsp-attributes {
762 uses rsvp:tspec-object;
763 uses rsvp:flow-spec-object;
764 uses rsvp:session-attribute-object;
765 uses rsvp:explicit-route-object;
766 uses rsvp:secondary-explicit-route-object;
767 uses rsvp:record-route-object;
768 uses rsvp:secondary-record-route-object;
769 uses rsvp:fast-reroute-object;
770 uses rsvp:detour-object;
771 uses rsvp:exclude-route-object;
772 uses rsvp:lsp-attributes-object;
773 uses rsvp:lsp-required-attributes-object;
774 uses rsvp:protection-object;
775 uses rsvp:association-object;
776 uses rsvp:primary-path-route-object;
777 uses rsvp:admin-status-object;
778 uses rsvp:bandwidth-object;
779 uses rsvp:metric-object;
785 grouping linkstate-routes {
786 container linkstate-routes {
787 list linkstate-route {
789 "Link-state information entry. Due to
790 the complexity of link-state information
791 and YANG limitations this is the top-level
792 object from contract perspective. It is
793 keyed by route-key, whose format is
794 internal to the implementation exposing
795 this information. As an explicit example
796 it can rely on information stored in the
797 entry's subtree, so the subtree MUST NOT
798 be modified by outside entities.
799 Augmentations can attach data, but must
800 be explicitly aware that such data, unlike
801 the data modeled directly here, does not
802 have any effects on keys, especially they
803 must not impact equality tests.";
805 key "route-key path-id";
810 uses linkstate-path-attribute;
817 augment "/bgp-msg:update/bgp-msg:attributes" {
818 uses linkstate-path-attribute;
821 augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" {
822 case linkstate-routes-case {
823 uses linkstate-routes;
827 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" {
828 case linkstate-routes-case {
829 uses linkstate-routes;
833 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" {
834 case linkstate-routes-case {
835 uses linkstate-routes;
839 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" {
840 case linkstate-routes-case {
841 uses linkstate-routes;
845 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" {
846 case linkstate-routes-case {
847 uses linkstate-routes;
851 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" {
852 case linkstate-routes-case {
853 uses linkstate-routes;
857 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" {
858 case linkstate-routes-case {
859 uses linkstate-routes;