This YANG module defines a collection of generic types and groupings for Segment Routing (SR), as described in RFC 8402. This Y...
Version: 2021-05-26
module ietf-segment-routing-common { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-segment-routing-common"; prefix sr-cmn; import ietf-inet-types { prefix inet; reference "RFC 6991: Common YANG Data Types"; } organization "IETF SPRING - SPRING Working Group"; contact "WG Web: <https://datatracker.ietf.org/wg/spring/> WG List: <mailto:spring@ietf.org> Author: Stephane Litkowski <mailto:slitkows.ietf@gmail.com> Author: Yingzhen Qu <mailto:yingzhen.qu@futurewei.com> Author: Acee Lindem <mailto:acee@cisco.com> Author: Pushpasis Sarkar <mailto:pushpasis.ietf@gmail.com> Author: Jeff Tantsura <jefftant.ietf@gmail.com> "; description "This YANG module defines a collection of generic types and groupings for Segment Routing (SR), as described in RFC 8402. This YANG module conforms to the Network Management Datastore Architecture (NMDA), as described in RFC 8242. The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document are to be interpreted as described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, they appear in all capitals, as shown here. Copyright (c) 2021 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info). This version of this YANG module is part of RFC 9020; see the RFC itself for full legal notices."; reference "RFC 9020: YANG Data Model for Segment Routing"; revision "2021-05-26" { description "Initial version"; reference "RFC 9020: YANG Data Model for Segment Routing"; } feature sid-last-hop-behavior { description "Configurable last-hop behavior."; reference "RFC 8660: Segment Routing with the MPLS Data Plane"; } identity prefix-sid-algorithm { description "Base identity for prefix-sid algorithm."; reference "RFC 8402: Segment Routing Architecture"; } identity prefix-sid-algorithm-shortest-path { base prefix-sid-algorithm; description "Shortest Path First (SPF) Prefix-SID algorithm. This is the default algorithm."; } identity prefix-sid-algorithm-strict-spf { base prefix-sid-algorithm; description "This algorithm mandates that the packet is forwarded according to the ECMP-aware SPF algorithm."; } grouping srlr { description "Grouping for SR Label Range configuration."; leaf lower-bound { type uint32; description "Lower value in the label range."; } leaf upper-bound { type uint32; must '../lower-bound < ../upper-bound' { error-message "The upper-bound must be greater than the lower-bound."; description "The value must be greater than lower-bound."; } description "Upper value in the label range."; } } // grouping srlr grouping srgb { description "Grouping for SR Global Label Range."; list srgb { key "lower-bound upper-bound"; ordered-by user; description "List of global blocks to be advertised."; uses srlr; } // list srgb } // grouping srgb grouping srlb { description "Grouping for SR Local Block Range."; list srlb { key "lower-bound upper-bound"; ordered-by user; description "List of SRLBs."; uses srlr; } // list srlb } // grouping srlb grouping sid-value-type { description "Defines how the SID value is expressed."; leaf value-type { type enumeration { enum "index" { value 0; description "The value will be interpreted as an index."; } enum "absolute" { value 1; description "The value will become interpreted as an absolute value."; } } default "index"; description "This leaf defines how the value must be interpreted."; } } // grouping sid-value-type grouping prefix-sid { description "This grouping defines configuration of a Prefix-SID."; leaf prefix { type inet:ip-prefix; description "Connected Prefix-SID."; } uses prefix-sid-attributes; } // grouping prefix-sid grouping ipv4-sid { description "Grouping for an IPv4 Prefix-SID."; leaf prefix { type inet:ipv4-prefix; description "Connected IPv4 Prefix-SID."; } uses prefix-sid-attributes; } // grouping ipv4-sid grouping ipv6-sid { description "Grouping for an IPv6 Prefix-SID."; leaf prefix { type inet:ipv6-prefix; description "Connected IPv6 Prefix-SID."; } uses prefix-sid-attributes; } // grouping ipv6-sid grouping last-hop-behavior { description "Defines last-hop behavior."; leaf last-hop-behavior { if-feature sid-last-hop-behavior; type enumeration { enum "explicit-null" { value 0; description "Use explicit-null for the SID."; } enum "no-php" { value 1; description "Do not use MPLS Penultimate Hop Popping (PHP) for the SID."; } enum "php" { value 2; description "Use MPLS PHP for the SID."; } } description "Configure last-hop behavior."; } } // grouping last-hop-behavior grouping prefix-sid-attributes { description "Grouping for Segment Routing (SR) prefix attributes."; uses sid-value-type; leaf start-sid { type uint32; mandatory true; description "Value associated with prefix. The value must be interpreted in the context of sid-value-type."; } leaf range { type uint32; description "Indicates how many SIDs can be allocated."; } leaf algorithm { type identityref { base prefix-sid-algorithm; } description "Prefix-SID algorithm."; } } // grouping prefix-sid-attributes } // module ietf-segment-routing-common
© 2023 YumaWorks, Inc. All rights reserved.