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 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 2015-05-12; }
17 organization "Cisco Systems, Inc.";
18 contact "Dana Kutenicsova <dkutenic@cisco.com>";
21 "This module contains the base data model of a BGP message.
22 It rolls up the definitions contained in RFC4271
23 and draft-ietf-idr-ls-distribution-03.
25 Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
27 This program and the accompanying materials are made available
28 under the terms of the Eclipse Public License v1.0 which
29 accompanies this distribution, and is available at
30 http://www.eclipse.org/legal/epl-v10.html";
32 revision "2015-02-10" {
34 "Updated to include segment routing.";
37 revision "2013-11-25" {
39 "Updated to cover network-concepts.";
42 revision "2013-09-18" {
45 reference "draft-ietf-idr-ls-distribution-03";
48 identity linkstate-address-family {
49 reference "https://tools.ietf.org/html/rfc7752#section-3.2";
51 base bgp-t:address-family;
54 identity linkstate-subsequent-address-family {
55 reference "https://tools.ietf.org/html/rfc7752#section-3.2";
57 base bgp-t:subsequent-address-family;
61 reference "https://tools.ietf.org/html/rfc7752#section-3.2";
77 reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-4.1";
82 reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-4.1";
89 reference "https://tools.ietf.org/html/rfc7752#section-3.2";
110 reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05#section-4";
115 reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-2.1";
116 value 8; // rsvp-te protocol-id TBD by IANA
118 enum segment-routing {
120 reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-2.1";
121 value 9; // segment-routing protocol-id TBD by IANA
126 typedef ospf-route-type {
127 reference "https://tools.ietf.org/html/rfc7752#section-3.2.3.1";
150 typedef route-distinguisher {
158 typedef domain-identifier {
159 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
163 typedef area-identifier {
164 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
168 typedef ipv4-interface-identifier {
169 reference "http://tools.ietf.org/html/rfc5305#section-3.2";
170 type inet:ipv4-address;
173 typedef ipv6-interface-identifier {
174 reference "http://tools.ietf.org/html/rfc6119#section-4.2";
175 type inet:ipv6-address;
178 typedef ospf-interface-identifier {
179 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
183 typedef topology-identifier {
184 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.5";
191 grouping isis-router-identifier {
192 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
194 type netc:iso-system-identifier;
199 grouping isis-lan-identifier {
200 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
201 container is-is-router-identifier {
202 uses isis-router-identifier;
212 grouping ospf-router-identifier {
213 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
214 leaf ospf-router-id {
220 grouping ospf-v2-lan-identifier {
221 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
222 uses ospf-router-identifier;
224 type ipv4-interface-identifier;
229 grouping ospf-v3-lan-identifier {
230 reference "https://tools.ietf.org/html/rfc7752#section-3.2.1.4";
231 uses ospf-router-identifier;
233 type ospf-interface-identifier;
238 grouping node-identifier {
243 type area-identifier;
246 type domain-identifier;
248 choice c-router-identifier {
249 case isis-node-case {
250 container isis-node {
251 uses isis-router-identifier;
254 case isis-pseudonode-case {
255 container isis-pseudonode {
256 uses isis-lan-identifier;
259 case ospf-node-case {
260 container ospf-node {
261 uses ospf-router-identifier;
264 case ospf-pseudonode-case {
265 container ospf-pseudonode {
266 uses ospf-v3-lan-identifier;
272 grouping link-lr-identifiers {
273 reference "http://tools.ietf.org/html/rfc5307";
274 leaf link-local-identifier {
277 leaf link-remote-identifier {
282 grouping prefix-identifiers {
283 leaf multi-topology-id {
284 type topology-identifier;
286 leaf ospf-route-type {
287 when "../../protocol-id[ .='ospf' or .='ospf-v3' ]";
288 type ospf-route-type;
290 leaf ip-reachability-information {
295 grouping link-identifier {
296 uses link-lr-identifiers;
297 leaf ipv4-interface-address {
298 type ipv4-interface-identifier;
300 leaf ipv6-interface-address {
301 type ipv6-interface-identifier;
303 leaf ipv4-neighbor-address {
304 type ipv4-interface-identifier;
306 leaf ipv6-neighbor-address {
307 type ipv6-interface-identifier;
309 leaf multi-topology-id {
310 type topology-identifier;
316 type route-distinguisher;
328 container node-descriptors {
329 uses node-identifier;
333 container local-node-descriptors {
334 uses node-identifier;
335 uses bgp-epe:epe-node-descriptors;
337 container remote-node-descriptors {
338 uses node-identifier;
339 uses bgp-epe:epe-node-descriptors;
341 container link-descriptors {
342 uses link-identifier;
346 container advertising-node-descriptors {
347 uses node-identifier;
349 container prefix-descriptors {
350 uses prefix-identifiers;
354 choice address-family {
356 leaf ipv4-tunnel-sender-address {
357 type inet:ipv4-address;
360 leaf ipv4-tunnel-endpoint-address {
361 type inet:ipv4-address;
366 leaf ipv6-tunnel-sender-address {
367 type inet:ipv6-address;
370 leaf ipv6-tunnel-endpoint-address {
371 type inet:ipv6-address;
386 grouping linkstate-destination {
387 list c-linkstate-destination {
392 augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" {
393 case destination-linkstate-case {
394 container destination-linkstate {
395 uses linkstate-destination;
400 augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" {
401 case destination-linkstate-case {
402 container destination-linkstate {
403 uses linkstate-destination;
408 typedef node-flag-bits {
409 reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.1";
432 typedef isis-area-identifier {
433 reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.2";
439 typedef ipv4-router-identifier {
440 reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.4";
441 type inet:ipv4-address;
444 typedef ipv6-router-identifier {
445 reference "https://tools.ietf.org/html/rfc7752#section-3.3.1.4";
446 type inet:ipv6-address;
449 grouping node-state {
450 reference "https://tools.ietf.org/html/rfc7752#section-3.3.1";
451 leaf-list topology-identifier {
452 type topology-identifier;
457 leaf-list isis-area-id {
458 type isis-area-identifier;
460 leaf dynamic-hostname {
463 leaf ipv4-router-id {
464 type ipv4-router-identifier;
466 leaf ipv6-router-id {
467 type ipv6-router-identifier;
469 container sr-capabilities {
470 uses bgp-sr:sr-capabilities-tlv;
472 container sr-algorithm {
473 uses bgp-sr:sr-algorithms-tlv;
477 typedef link-protection-type {
478 reference "http://tools.ietf.org/html/rfc5307#section-1.2";
489 enum dedicated-1to1 {
492 enum dedicated-1plus1 {
502 typedef mpls-protocol-mask {
503 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.2.2";
514 typedef administrative-group {
518 grouping unreserved-bandwidth {
529 grouping link-state {
530 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.2";
531 leaf local-ipv4-router-id {
532 type ipv4-router-identifier;
534 leaf local-ipv6-router-id {
535 type ipv6-router-identifier;
537 leaf remote-ipv4-router-id {
538 type ipv4-router-identifier;
540 leaf remote-ipv6-router-id {
541 type ipv6-router-identifier;
544 type mpls-protocol-mask;
552 leaf-list shared-risk-link-groups {
558 leaf max-link-bandwidth {
561 leaf max-reservable-bandwidth {
564 list unreserved-bandwidth {
566 uses unreserved-bandwidth;
568 leaf link-protection {
569 type link-protection-type;
572 type administrative-group;
575 uses bgp-sr:adj-sid-tlv;
577 list sr-lan-adj-ids {
578 uses bgp-sr:lan-adj-sid-tlv;
580 container peer-node-sid {
581 description "The SID representing the peer of the BGP session.";
582 reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05#section-4.3";
583 uses bgp-sr:epe-adj-sid-tlv;
585 container peer-adj-sid {
586 description "The SID representing the peer of the BGP session.";
587 reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05#section-4.3";
588 uses bgp-sr:epe-adj-sid-tlv;
591 description "The SID representing the group the peer is part of.";
592 reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05#section-4.3";
593 uses bgp-sr:epe-adj-sid-tlv;
598 reference "https://tools.ietf.org/html/rfc7752#section-3.3.3.2";
599 description "Carries original IGP TAGs of the prefix.";
605 typedef extended-route-tag {
606 reference "https://tools.ietf.org/html/rfc7752#section-3.3.3.3";
607 description "Carries IS-IS Extended Route Tags of the prefix.";
614 reference "https://tools.ietf.org/html/rfc7752#section-3.3.3.1";
626 leaf ospf-no-unicast {
629 leaf ospf-local-address {
632 leaf ospf-propagate-nssa {
637 grouping prefix-state {
641 leaf-list route-tags {
644 leaf-list extended-tags {
645 type extended-route-tag;
648 type netc:igp-metric;
650 leaf ospf-forwarding-address {
651 type inet:ip-address;
653 container sr-prefix {
654 uses bgp-sr:prefix-sid-tlv;
656 container ipv6-sr-prefix {
657 uses bgp-sr:ipv6-prefix-sid-tlv;
660 uses bgp-sr:range-tlv;
662 list sr-binding-sid-labels {
663 uses bgp-sr:binding-sid-tlv;
667 grouping linkstate-path-attribute {
668 choice link-state-attribute {
669 case node-attributes-case {
670 container node-attributes {
674 case link-attributes-case {
675 container link-attributes {
679 case prefix-attributes-case {
680 container prefix-attributes {
684 case te-lsp-attributes-case {
686 description "LSP Object";
687 reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-2.2";
688 container te-lsp-attributes {
689 uses rsvp:tspec-object;
690 uses rsvp:flow-spec-object;
691 uses rsvp:session-attribute-object;
692 uses rsvp:explicit-route-object;
693 uses rsvp:secondary-explicit-route-object;
694 uses rsvp:record-route-object;
695 uses rsvp:secondary-record-route-object;
696 uses rsvp:fast-reroute-object;
697 uses rsvp:detour-object;
698 uses rsvp:exclude-route-object;
699 uses rsvp:lsp-attributes-object;
700 uses rsvp:lsp-required-attributes-object;
701 uses rsvp:protection-object;
702 uses rsvp:association-object;
703 uses rsvp:primary-path-route-object;
704 uses rsvp:admin-status-object;
705 uses rsvp:bandwidth-object;
706 uses rsvp:metric-object;
712 grouping linkstate-routes {
713 container linkstate-routes {
714 list linkstate-route {
716 "Link-state information entry. Due to
717 the complexity of link-state information
718 and YANG limitations this is the top-level
719 object from contract perspective. It is
720 keyed by route-key, whose format is
721 internal to the implementation exposing
722 this information. As an explicit example
723 it can rely on information stored in the
724 entry's subtree, so the subtree MUST NOT
725 be modified by outside entities.
726 Augmentations can attach data, but must
727 be explicitly aware that such data, unlike
728 the data modeled directly here, does not
729 have any effects on keys, especially they
730 must not impact equality tests.";
734 "The sole function of this leaf
735 to act as the key in the list.
736 Its format does not form the
737 API contract of this model.";
746 uses linkstate-path-attribute;
753 augment "/bgp-msg:update/bgp-msg:attributes" {
754 uses linkstate-path-attribute;
757 augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" {
758 case linkstate-routes-case {
759 uses linkstate-routes;
763 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" {
764 case linkstate-routes-case {
765 uses linkstate-routes;
769 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" {
770 case linkstate-routes-case {
771 uses linkstate-routes;
775 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" {
776 case linkstate-routes-case {
777 uses linkstate-routes;
781 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" {
782 case linkstate-routes-case {
783 uses linkstate-routes;
787 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" {
788 case linkstate-routes-case {
789 uses linkstate-routes;
793 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" {
794 case linkstate-routes-case {
795 uses linkstate-routes;