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 "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
51 base bgp-t:address-family;
54 identity linkstate-subsequent-address-family {
55 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
57 base bgp-t:subsequent-address-family;
61 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
76 reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-4.1";
80 reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-4.1";
87 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
108 reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-2.1";
112 reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-00#section-4";
115 enum segment-routing {
116 reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-2.1";
117 value 8; // segment-routing protocol-id TBD by IANA
122 typedef ospf-route-type {
123 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.3.1";
146 typedef route-distinguisher {
154 typedef domain-identifier {
155 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
159 typedef area-identifier {
160 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
164 typedef ipv4-interface-identifier {
165 reference "http://tools.ietf.org/html/rfc5305#section-3.2";
166 type inet:ipv4-address;
169 typedef ipv6-interface-identifier {
170 reference "http://tools.ietf.org/html/rfc6119#section-4.2";
171 type inet:ipv6-address;
174 typedef ospf-interface-identifier {
175 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
179 typedef topology-identifier {
180 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.5";
187 grouping isis-router-identifier {
188 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
190 type netc:iso-system-identifier;
195 grouping isis-lan-identifier {
196 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
197 container is-is-router-identifier {
198 uses isis-router-identifier;
208 grouping ospf-router-identifier {
209 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
210 leaf ospf-router-id {
216 grouping ospf-v2-lan-identifier {
217 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
218 uses ospf-router-identifier;
220 type ipv4-interface-identifier;
225 grouping ospf-v3-lan-identifier {
226 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
227 uses ospf-router-identifier;
229 type ospf-interface-identifier;
234 grouping node-identifier {
239 type area-identifier;
242 type domain-identifier;
244 choice c-router-identifier {
245 case isis-node-case {
246 container isis-node {
247 uses isis-router-identifier;
250 case isis-pseudonode-case {
251 container isis-pseudonode {
252 uses isis-lan-identifier;
255 case ospf-node-case {
256 container ospf-node {
257 uses ospf-router-identifier;
260 case ospf-pseudonode-case {
261 container ospf-pseudonode {
262 uses ospf-v3-lan-identifier;
268 grouping link-lr-identifiers {
269 reference "http://tools.ietf.org/html/rfc5307";
270 leaf link-local-identifier {
273 leaf link-remote-identifier {
278 grouping prefix-identifiers {
279 leaf multi-topology-id {
280 type topology-identifier;
282 leaf ospf-route-type {
283 when "../../protocol-id = 'ospf'";
284 type ospf-route-type;
286 leaf ip-reachability-information {
291 grouping link-identifier {
292 uses link-lr-identifiers;
293 leaf ipv4-interface-address {
294 type ipv4-interface-identifier;
296 leaf ipv6-interface-address {
297 type ipv6-interface-identifier;
299 leaf ipv4-neighbor-address {
300 type ipv4-interface-identifier;
302 leaf ipv6-neighbor-address {
303 type ipv6-interface-identifier;
305 leaf multi-topology-id {
306 type topology-identifier;
312 type route-distinguisher;
324 container node-descriptors {
325 uses node-identifier;
329 container local-node-descriptors {
330 uses node-identifier;
331 uses bgp-epe:epe-node-descriptors;
333 container remote-node-descriptors {
334 uses node-identifier;
335 uses bgp-epe:epe-node-descriptors;
337 container link-descriptors {
338 uses link-identifier;
342 container advertising-node-descriptors {
343 uses node-identifier;
345 container prefix-descriptors {
346 uses prefix-identifiers;
350 choice address-family {
352 leaf ipv4-tunnel-sender-address {
353 type inet:ipv4-address;
356 leaf ipv4-tunnel-endpoint-address {
357 type inet:ipv4-address;
362 leaf ipv6-tunnel-sender-address {
363 type inet:ipv6-address;
366 leaf ipv6-tunnel-endpoint-address {
367 type inet:ipv6-address;
382 grouping linkstate-destination {
383 list c-linkstate-destination {
388 augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" {
389 case destination-linkstate-case {
390 container destination-linkstate {
391 uses linkstate-destination;
396 augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" {
397 case destination-linkstate-case {
398 container destination-linkstate {
399 uses linkstate-destination;
404 typedef node-flag-bits {
405 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.1";
428 typedef isis-area-identifier {
429 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.2";
435 typedef ipv4-router-identifier {
436 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.4";
437 type inet:ipv4-address;
440 typedef ipv6-router-identifier {
441 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.4";
442 type inet:ipv6-address;
445 grouping node-state {
446 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1";
447 leaf-list topology-identifier {
448 type topology-identifier;
453 leaf-list isis-area-id {
454 type isis-area-identifier;
456 leaf dynamic-hostname {
459 leaf ipv4-router-id {
460 type ipv4-router-identifier;
462 leaf ipv6-router-id {
463 type ipv6-router-identifier;
465 container sr-capabilities {
466 uses bgp-sr:sr-capabilities-tlv;
468 container sr-algorithm {
469 uses bgp-sr:sr-algorithms-tlv;
473 typedef link-protection-type {
474 reference "http://tools.ietf.org/html/rfc5307#section-1.2";
485 enum dedicated-1to1 {
488 enum dedicated-1plus1 {
498 typedef mpls-protocol-mask {
499 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.2.2";
510 typedef administrative-group {
514 grouping unreserved-bandwidth {
525 grouping link-state {
526 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.2";
527 leaf local-ipv4-router-id {
528 type ipv4-router-identifier;
530 leaf local-ipv6-router-id {
531 type ipv6-router-identifier;
533 leaf remote-ipv4-router-id {
534 type ipv4-router-identifier;
536 leaf remote-ipv6-router-id {
537 type ipv6-router-identifier;
540 type mpls-protocol-mask;
548 leaf-list shared-risk-link-groups {
554 leaf max-link-bandwidth {
557 leaf max-reservable-bandwidth {
560 list unreserved-bandwidth {
562 uses unreserved-bandwidth;
564 leaf link-protection {
565 type link-protection-type;
568 type administrative-group;
570 container sr-adj-id {
571 uses bgp-sr:adj-sid-tlv;
573 container sr-lan-adj-id {
574 uses bgp-sr:lan-adj-sid-tlv;
576 container peer-node-sid {
577 description "The SID representing the peer of the BGP session.";
578 reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-01#section-4.3";
579 uses bgp-sr:adj-sid-tlv;
581 container peer-adj-sid {
582 description "The SID representing the peer of the BGP session.";
583 reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-01#section-4.3";
584 uses bgp-sr:adj-sid-tlv;
586 container peer-set-sid {
587 description "The SID representing the group the peer is part of.";
588 reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-01#section-4.3";
589 uses bgp-sr:adj-sid-tlv;
594 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.2";
600 typedef extended-route-tag {
601 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.3";
608 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.1";
618 grouping prefix-state {
622 leaf-list route-tags {
625 leaf-list extended-tags {
626 type extended-route-tag;
629 type netc:igp-metric;
631 leaf ospf-forwarding-address {
632 type inet:ip-address;
634 container sr-prefix {
635 uses bgp-sr:prefix-sid-tlv;
638 uses bgp-sr:range-tlv;
640 container sr-binding-sid-label {
641 uses bgp-sr:binding-sid-tlv;
645 grouping linkstate-path-attribute {
646 choice link-state-attribute {
647 case node-attributes-case {
648 container node-attributes {
652 case link-attributes-case {
653 container link-attributes {
657 case prefix-attributes-case {
658 container prefix-attributes {
662 case te-lsp-attributes-case {
663 description "LSP Object";
664 reference "http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03#section-2.2";
665 container te-lsp-attributes {
666 uses rsvp:tspec-object;
667 uses rsvp:flow-spec-object;
668 uses rsvp:session-attribute-object;
669 uses rsvp:explicit-route-object;
670 uses rsvp:secondary-explicit-route-object;
671 uses rsvp:record-route-object;
672 uses rsvp:secondary-record-route-object;
673 uses rsvp:fast-reroute-object;
674 uses rsvp:detour-object;
675 uses rsvp:exclude-route-object;
676 uses rsvp:lsp-attributes-object;
677 uses rsvp:lsp-required-attributes-object;
678 uses rsvp:protection-object;
679 uses rsvp:association-object;
680 uses rsvp:primary-path-route-object;
681 uses rsvp:admin-status-object;
682 uses rsvp:bandwidth-object;
683 uses rsvp:metric-object;
689 grouping linkstate-routes {
690 container linkstate-routes {
691 list linkstate-route {
693 "Link-state information entry. Due to
694 the complexity of link-state information
695 and YANG limitations this is the top-level
696 object from contract perspective. It is
697 keyed by route-key, whose format is
698 internal to the implementation exposing
699 this information. As an explicit example
700 it can rely on information stored in the
701 entry's subtree, so the subtree MUST NOT
702 be modified by outside entities.
703 Augmentations can attach data, but must
704 be explicitly aware that such data, unlike
705 the data modeled directly here, does not
706 have any effects on keys, especially they
707 must not impact equality tests.";
711 "The sole function of this leaf
712 to act as the key in the list.
713 Its format does not form the
714 API contract of this model.";
723 uses linkstate-path-attribute;
730 augment "/bgp-msg:update/bgp-msg:attributes" {
731 uses linkstate-path-attribute;
734 augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" {
735 case linkstate-routes-case {
736 uses linkstate-routes;
740 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" {
741 case linkstate-routes-case {
742 uses linkstate-routes;
746 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" {
747 case linkstate-routes-case {
748 uses linkstate-routes;
752 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" {
753 case linkstate-routes-case {
754 uses linkstate-routes;
758 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" {
759 case linkstate-routes-case {
760 uses linkstate-routes;
764 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" {
765 case linkstate-routes-case {
766 uses linkstate-routes;
770 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" {
771 case linkstate-routes-case {
772 uses linkstate-routes;