netconfcentral logo

ietf-routing-types

HTML

ietf-routing-types@2017-10-13



  module ietf-routing-types {

    yang-version 1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-routing-types";

    prefix rt-types;

    import ietf-yang-types {
      prefix yang;
    }
    import ietf-inet-types {
      prefix inet;
    }

    organization
      "IETF RTGWG - Routing Area Working Group";

    contact
      "WG Web:   <http://tools.ietf.org/wg/rtgwg/>
     WG List:  <mailto:rtgwg@ietf.org>

     Editor:   Xufeng Liu
               <mailto:Xufeng_Liu@jabail.com>
               Yingzhen Qu
               <mailto:yingzhen.qu@huawei.com>
               Acee Lindem
               <mailto:acee@cisco.com>
               Christian Hopps
               <mailto:chopps@chopps.org>
               Lou Berger
               <mailto:lberger@labn.com>";

    description
      "This module contains a collection of YANG data types
     considered generally useful for routing protocols.

     Copyright (c) 2017 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
     (http://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX; see
     the RFC itself for full legal notices.";

    reference
      "RFC XXXX";


    revision "2017-10-13" {
      description "Initial revision.";
      reference
        "RFC TBD: Routing YANG Data Types";

    }


    identity mpls-label-special-purpose-value {
      base 
      description
        "Base identity for deriving identities describing
       special-purpose Multiprotocol Label Switching (MPLS) label
       values.";
      reference
        "RFC7274: Allocating and Retiring Special-Purpose MPLS
        Labels.";

    }

    identity ipv4-explicit-null-label {
      base mpls-label-special-purpose-value;
      description
        "This identity represents the IPv4 Explicit NULL Label.";
      reference
        "RFC3032: MPLS Label Stack Encoding. Section 2.1.";

    }

    identity router-alert-label {
      base mpls-label-special-purpose-value;
      description
        "This identity represents the Router Alert Label.";
      reference
        "RFC3032: MPLS Label Stack Encoding. Section 2.1.";

    }

    identity ipv6-explicit-null-label {
      base mpls-label-special-purpose-value;
      description
        "This identity represents the IPv6 Explicit NULL Label.";
      reference
        "RFC3032: MPLS Label Stack Encoding. Section 2.1.";

    }

    identity implicit-null-label {
      base mpls-label-special-purpose-value;
      description
        "This identity represents the Implicit NULL Label.";
      reference
        "RFC3032: MPLS Label Stack Encoding. Section 2.1.";

    }

    identity entropy-label-indicator {
      base mpls-label-special-purpose-value;
      description
        "This identity represents the Entropy Label Indicator.";
      reference
        "RFC6790: The Use of Entropy Labels in MPLS Forwarding.
        Sections 3 and 10.1.";

    }

    identity gal-label {
      base mpls-label-special-purpose-value;
      description
        "This identity represents the Generic Associated Channel
       Label (GAL).";
      reference
        "RFC5586: MPLS Generic Associated Channel.
        Sections 4 and 10.";

    }

    identity oam-alert-label {
      base mpls-label-special-purpose-value;
      description
        "This identity represents the OAM Alert Label.";
      reference
        "RFC3429: Assignment of the 'OAM Alert Label' for
        Multiprotocol Label Switching Architecture (MPLS)
        Operation and Maintenance (OAM) Functions.
        Sections 3 and 6.";

    }

    identity extension-label {
      base mpls-label-special-purpose-value;
      description
        "This identity represents the Extension Label.";
      reference
        "RFC7274: Allocating and Retiring Special-Purpose MPLS
        Labels.  Sections 3.1 and 5.";

    }

    typedef router-id {
      type yang:dotted-quad;
      description
        "A 32-bit number in the dotted quad format assigned to each
       router. This number uniquely identifies the router within
       an Autonomous System.";
    }

    typedef route-target {
      type string {
        pattern
          '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
            + '6[0-4][0-9]{3}|'
            + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|'
            + '42949672[0-8][0-9]|'
            + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|'
            + '42949[0-5][0-9]{4}|'
            + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|'
            + '42[0-8][0-9]{7}|4[01][0-9]{8}|'
            + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|'
            + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|'
            + '25[0-5])\.){3}([0-9]|[1-9][0-9]|'
            + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|'
            + '655[0-2][0-9]|'
            + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|'
            + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
            + '(2:(429496729[0-5]|42949672[0-8][0-9]|'
            + '4294967[01][0-9]{2}|'
            + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|'
            + '4294[0-8][0-9]{5}|'
            + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|'
            + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):'
            + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
            + '6[0-4][0-9]{3}|'
            + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
            + '(6(:[a-fA-F0-9]{2}){6})|'
            + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):'
            + '[0-9a-fA-F]{1,12})';
      }
      description
        "A route target is an 8-octet BGP extended community
       initially identifying a set of sites in a BGP
       VPN (RFC 4364). However, it has since taken on a more
       general role in BGP route filtering.
       A route target consists of two or three fields:
       a 2-octet type field, an administrator field,
       and, optionally, an assigned number field.

       According to the data formats for type 0, 1, 2, and 6
       defined in RFC4360, RFC5668, and RFC7432, the encoding
       pattern is defined as:

       0:2-octet-asn:4-octet-number
       1:4-octet-ipv4addr:2-octet-number
       2:4-octet-asn:2-octet-number.
       6:6-octet-mac-address.

       Additionally, a generic pattern is defined for future
       route target types:

       2-octet-other-hex-number:6-octet-hex-number

       Some valid examples are: 0:100:100, 1:1.1.1.1:100,
       2:1234567890:203 and 6:26:00:08:92:78:00";
      reference
        "RFC4360: BGP Extended Communities Attribute.
         RFC4364: BGP/MPLS IP Virtual Private Networks (VPNs)
         RFC5668: 4-Octet AS Specific BGP Extended Community.
         RFC7432: BGP MPLS-Based Ethernet VPN";

    }

    typedef ipv6-route-target {
      type string {
        pattern
          '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}'
            + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|'
            + '(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}'
            + '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))'
            + ':'
            + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
            + '6[0-4][0-9]{3}|'
            + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)';
        pattern
          '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|'
            + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))'
            + ':'
            + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
            + '6[0-4][0-9]{3}|'
            + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)';
      }
      description
        "An IPv6 route target is a 20-octet BGP IPv6 address
       specific extended community serving the same function
       as a standard 8-octet route target only allowing for
       an IPv6 address as the global administrator. The format
       is <ipv6-address:2-octet-number>.

       Some valid examples are: 2001:DB8::1:6544 and
       2001:DB8::5eb1:791:6b37:17958";
      reference
        "RFC5701: IPv6 Address Specific BGP Extended Community
        	 Attribute";

    }

    typedef route-target-type {
      type enumeration {
        enum "import" {
          value 0;
          description
            "The route target applies to route import.";
        }
        enum "export" {
          value 1;
          description
            "The route target applies to route export.";
        }
        enum "both" {
          value 2;
          description
            "The route target applies to both route import and
           route export.";
        }
      }
      description
        "Indicates the role a route target takes
       in route filtering.";
      reference
        "RFC4364: BGP/MPLS IP Virtual Private Networks
        (VPNs).";

    }

    typedef route-distinguisher {
      type string {
        pattern
          '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
            + '6[0-4][0-9]{3}|'
            + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|'
            + '42949672[0-8][0-9]|'
            + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|'
            + '42949[0-5][0-9]{4}|'
            + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|'
            + '42[0-8][0-9]{7}|4[01][0-9]{8}|'
            + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|'
            + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|'
            + '25[0-5])\.){3}([0-9]|[1-9][0-9]|'
            + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|'
            + '655[0-2][0-9]|'
            + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|'
            + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
            + '(2:(429496729[0-5]|42949672[0-8][0-9]|'
            + '4294967[01][0-9]{2}|'
            + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|'
            + '4294[0-8][0-9]{5}|'
            + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|'
            + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):'
            + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
            + '6[0-4][0-9]{3}|'
            + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
            + '(6(:[a-fA-F0-9]{2}){6})|'
            + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):'
            + '[0-9a-fA-F]{1,12})';
      }
      description
        "A route distinguisher is an 8-octet value used to
       distinguish routes from different BGP VPNs (RFC 4364).
       As per RFC 4360, a route distinguisher will have the same
       format as a route target and will consist of two or three
       fields including a 2-octet type field, an administrator
       field, and, optionally, an assigned number field.

       According to the data formats for type 0, 1, 2, and 6
       defined in RFC4360, RFC5668, and RFC7432, the encoding
       pattern is defined as:

       0:2-octet-asn:4-octet-number
       1:4-octet-ipv4addr:2-octet-number
       2:4-octet-asn:2-octet-number.
       6:6-octet-mac-address.

       Additionally, a generic pattern is defined for future
       route discriminator types:

       2-octet-other-hex-number:6-octet-hex-number

       Some valid examples are: 0:100:100, 1:1.1.1.1:100,
       2:1234567890:203 and 6:26:00:08:92:78:00";
      reference
        "RFC4360: BGP Extended Communities Attribute.
         RFC4364: BGP/MPLS IP Virtual Private Networks (VPNs)
         RFC5668: 4-Octet AS Specific BGP Extended Community.
         RFC7432: BGP MPLS-Based Ethernet VPN";

    }

    typedef route-origin {
      type string {
        pattern
          '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
            + '6[0-4][0-9]{3}|'
            + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|'
            + '42949672[0-8][0-9]|'
            + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|'
            + '42949[0-5][0-9]{4}|'
            + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|'
            + '42[0-8][0-9]{7}|4[01][0-9]{8}|'
            + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|'
            + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|'
            + '25[0-5])\.){3}([0-9]|[1-9][0-9]|'
            + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|'
            + '655[0-2][0-9]|'
            + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|'
            + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
            + '(2:(429496729[0-5]|42949672[0-8][0-9]|'
            + '4294967[01][0-9]{2}|'
            + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|'
            + '4294[0-8][0-9]{5}|'
            + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|'
            + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):'
            + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
            + '6[0-4][0-9]{3}|'
            + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
            + '(6(:[a-fA-F0-9]{2}){6})|'
            + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):'
            + '[0-9a-fA-F]{1,12})';
      }
      description
        "A route origin is an 8-octet BGP extended community
       identifying the set of sites where the BGP route
       originated (RFC 4364). A route target consists of two
       or three fields: a 2-octet type field, an administrator
       field, and, optionally, an assigned number field.

       According to the data formats for type 0, 1, 2, and 6
       defined in RFC4360, RFC5668, and RFC7432, the encoding
       pattern is defined as:

       0:2-octet-asn:4-octet-number
       1:4-octet-ipv4addr:2-octet-number
       2:4-octet-asn:2-octet-number.
       6:6-octet-mac-address.

       Additionally, a generic pattern is defined for future
       route origin types:

       2-octet-other-hex-number:6-octet-hex-number

       Some valid examples are: 0:100:100, 1:1.1.1.1:100,
       2:1234567890:203 and 6:26:00:08:92:78:00";
      reference
        "RFC4360: BGP Extended Communities Attribute.
         RFC4364: BGP/MPLS IP Virtual Private Networks (VPNs)
         RFC5668: 4-Octet AS Specific BGP Extended Community.
         RFC7432: BGP MPLS-Based Ethernet VPN";

    }

    typedef ipv6-route-origin {
      type string {
        pattern
          '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}'
            + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|'
            + '(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.){3}'
            + '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))'
            + ':'
            + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
            + '6[0-4][0-9]{3}|'
            + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)';
        pattern
          '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|'
            + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))'
            + ':'
            + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
            + '6[0-4][0-9]{3}|'
            + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)';
      }
      description
        "An IPv6 route origin is a 20-octet BGP IPv6 address
       specific extended community serving the same function
       as a standard 8-octet route only allowing for
       an IPv6 address as the global administrator. The format
       is <ipv6-address:2-octet-number>.

       Some valid examples are: 2001:DB8::1:6544 and
       2001:DB8::5eb1:791:6b37:17958";
      reference
        "RFC5701: IPv6 Address Specific BGP Extended Community
        	 Attribute";

    }

    typedef ipv4-multicast-group-address {
      type inet:ipv4-address {
        pattern '(2((2[4-9])|(3[0-9]))\.).*';
      }
      description
        "This type represents an IPv4 multicast group address,
       which is in the range from 224.0.0.0 to 239.255.255.255.";
      reference
        "RFC1112: Host Extensions for IP Multicasting.";

    }

    typedef ipv6-multicast-group-address {
      type inet:ipv6-address {
        pattern
          '(([fF]{2}[0-9a-fA-F]{2}):).*';
      }
      description
        "This type represents an IPv6 multicast group address,
       which is in the range of FF00::/8.";
      reference
        "RFC4291: IP Version 6 Addressing Architecture. Sec 2.7.
         RFC7346: IPv6 Multicast Address Scopes.";

    }

    typedef ip-multicast-group-address {
      type union {
        type ipv4-multicast-group-address;
        type ipv6-multicast-group-address;
      }
      description
        "This type represents a version-neutral IP multicast group
       address. The format of the textual representation implies
       the IP version.";
    }

    typedef ipv4-multicast-source-address {
      type union {
        type enumeration {
          enum "*" {
            value 0;
            description
              "Any source address.";
          }
        }
        type inet:ipv4-address;
      }
      description
        "Multicast source IPv4 address type.";
    }

    typedef ipv6-multicast-source-address {
      type union {
        type enumeration {
          enum "*" {
            value 0;
            description
              "Any source address.";
          }
        }
        type inet:ipv6-address;
      }
      description
        "Multicast source IPv6 address type.";
    }

    typedef bandwidth-ieee-float32 {
      type string {
        pattern
          '0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|'
            + '1(\.([0-9a-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\+)?(12[0-7]|'
            + '1[01][0-9]|0?[0-9]?[0-9])?)';
      }
      description
        "Bandwidth in IEEE 754 floating point 32-bit binary format:
       (-1)**(S) * 2**(Exponent-127) * (1 + Fraction),
       where Exponent uses 8 bits, and Fraction uses 23 bits.
       The units are octets per second.
       The encoding format is the external hexadecimal-significant
       character sequences specified in IEEE 754 and C99. The
       format is restricted to be normalized, non-negative, and
       non-fraction: 0x1.hhhhhhp{+}d, 0X1.HHHHHHP{+}D, or 0x0p0,
       where 'h' and 'H' are hexadecimal digits and'd' and 'D' are
       integers in the range of [0..127].
       When six hexadecimal digits are used for 'hhhhhh' or
       'HHHHHH', the least significant digit must be an even
       number. 'x' and 'X' indicate hexadecimal; 'p' and 'P'
       indicate power of two. Some examples are: 0x0p0, 0x1p10, and
       0x1.abcde2p+20";
      reference
        "IEEE Std 754-2008: IEEE Standard for Floating-Point
        Arithmetic.";

    }

    typedef link-access-type {
      type enumeration {
        enum "broadcast" {
          value 0;
          description
            "Specify broadcast multi-access network.";
        }
        enum "non-broadcast-multiaccess" {
          value 1;
          description
            "Specify Non-Broadcast Multi-Access (NBMA) network.";
        }
        enum "point-to-multipoint" {
          value 2;
          description
            "Specify point-to-multipoint network.";
        }
        enum "point-to-point" {
          value 3;
          description
            "Specify point-to-point network.";
        }
      }
      description "Link access type.";
    }

    typedef timer-multiplier {
      type uint8;
      description
        "The number of timer value intervals that should be
       interpreted as a failure.";
    }

    typedef timer-value-seconds16 {
      type union {
        type uint16 {
          range "1..65535";
        }
        type enumeration {
          enum "infinity" {
            value 0;
            description
              "The timer is set to infinity.";
          }
          enum "not-set" {
            value 1;
            description
              "The timer is not set.";
          }
        }
      }
      units "seconds";
      description
        "Timer value type, in seconds (16-bit range).";
    }

    typedef timer-value-seconds32 {
      type union {
        type uint32 {
          range "1..4294967295";
        }
        type enumeration {
          enum "infinity" {
            value 0;
            description
              "The timer is set to infinity.";
          }
          enum "not-set" {
            value 1;
            description
              "The timer is not set.";
          }
        }
      }
      units "seconds";
      description
        "Timer value type, in seconds (32-bit range).";
    }

    typedef timer-value-milliseconds {
      type union {
        type uint32 {
          range "1..4294967295";
        }
        type enumeration {
          enum "infinity" {
            value 0;
            description
              "The timer is set to infinity.";
          }
          enum "not-set" {
            value 1;
            description
              "The timer is not set.";
          }
        }
      }
      units "milliseconds";
      description
        "Timer value type, in milliseconds.";
    }

    typedef percentage {
      type uint8 {
        range "0..100";
      }
      description
        "Integer indicating a percentage value";
    }

    typedef timeticks64 {
      type uint64;
      description
        "This type is based on the timeticks type defined in
       RFC 6991, but with 64-bit width.  It represents the time,
       modulo 2^64, in hundredths of a second between two epochs.";
      reference
        "RFC 6991 - Common YANG Data Types";

    }

    typedef uint24 {
      type uint32 {
        range "0 .. 16777215";
      }
      description "24-bit unsigned integer";
    }

    typedef generalized-label {
      type binary;
      description
        "Generalized label. Nodes sending and receiving the
       Generalized Label are aware of the link-specific
       label context and type.";
      reference
        "RFC3471: Section 3.2";

    }

    typedef mpls-label-special-purpose {
      type identityref {
        base mpls-label-special-purpose-value;
      }
      description
        "This type represents the special-purpose Multiprotocol Label
       Switching (MPLS) label values.";
      reference
        "RFC3032: MPLS Label Stack Encoding.
         RFC7274: Allocating and Retiring Special-Purpose MPLS
        Labels.";

    }

    typedef mpls-label-general-use {
      type uint32 {
        range "16..1048575";
      }
      description
        "The 20-bit label values in an MPLS label stack entry,
       specified in RFC3032. This label value does not include
       the encodings of Traffic Class and TTL (time to live).
       The label range specified by this type is for general use,
       with special-purpose MPLS label values excluded.";
      reference
        "RFC3032: MPLS Label Stack Encoding.";

    }

    typedef mpls-label {
      type union {
        type mpls-label-special-purpose;
        type mpls-label-general-use;
      }
      description
        "The 20-bit label values in an MPLS label stack entry,
       specified in RFC3032. This label value does not include
       the encodings of Traffic Class and TTL (time to live).";
      reference
        "RFC3032: MPLS Label Stack Encoding.";

    }

    grouping mpls-label-stack {
      description
        "This grouping specifies an MPLS label stack.  The label
       stack is encoded as a list of label stack entries.  The
       list key is an identifier which indicates relative
       ordering of each entry, with the lowest value identifier
       corresponding to the top of the label stack.";
      container mpls-label-stack {
        description
          "Container for a list of MPLS label stack entries.";
        list entry {
          key "id";
          description
            "List of MPLS label stack entries.";
          leaf id {
            type uint8;
            description
              "Identifies the entry in a sequence of MPLS label
             stack entries. An entry with a smaller identifier
             value precedes an entry with a larger identifier
             value in the label stack. The value of this ID has
             no semantic meaning other than relative ordering
             and referencing the entry.";
          }

          leaf label {
            type mpls-label;
            description "Label value.";
          }

          leaf ttl {
            type uint8;
            description
              "Time to Live (TTL).";
            reference
              "RFC3032: MPLS Label Stack Encoding.";

          }

          leaf traffic-class {
            type uint8 {
              range "0..7";
            }
            description
              "Traffic Class (TC).";
            reference
              "RFC5462: Multiprotocol Label Switching (MPLS) Label
              Stack Entry: 'EXP' Field Renamed to 'Traffic Class'
              Field.";

          }
        }  // list entry
      }  // container mpls-label-stack
    }  // grouping mpls-label-stack

    grouping vpn-route-targets {
      description
        "A grouping that specifies Route Target import-export rules
       used in the BGP enabled Virtual Private Networks (VPNs).";
      reference
        "RFC4364: BGP/MPLS IP Virtual Private Networks (VPNs).
         RFC4664: Framework for Layer 2 Virtual Private Networks
        (L2VPNs)";

      list vpn-target {
        key "route-target";
        description "List of Route Targets.";
        leaf route-target {
          type route-target;
          description "Route Target value";
        }

        leaf route-target-type {
          type route-target-type;
          mandatory true;
          description
            "Import/export type of the Route Target.";
        }
      }  // list vpn-target
    }  // grouping vpn-route-targets
  }  // module ietf-routing-types

Summary

  
ietf-routing-types  
  
Organization IETF Routing Area Working Group (rtgwg)
  
Module ietf-routing-types
Version 2017-02-19
File ietf-routing-types@2017-02-19.yang
  
Prefix rt-types
Namespace urn:ietf:params:xml:ns:yang:ietf-routing-types
  
Cooked /cookedmodules/ietf-routing-types/2017-02-19
YANG /src/ietf-routing-types@2017-02-19.yang
XSD /xsd/ietf-routing-types@2017-02-19.xsd
  
Abstract This module contains a collection of YANG data types considered generally useful for routing protocols.
  
Contact
Routing Area Working Group - <rtgwg@ietf.org>
  
ietf-routing-types  
  
Organization IETF Routing Area Working Group (rtgwg)
  
Module ietf-routing-types
Version 2017-02-27
File ietf-routing-types@2017-02-27.yang
  
Prefix rt-types
Namespace urn:ietf:params:xml:ns:yang:ietf-routing-types
  
Cooked /cookedmodules/ietf-routing-types/2017-02-27
YANG /src/ietf-routing-types@2017-02-27.yang
XSD /xsd/ietf-routing-types@2017-02-27.xsd
  
Abstract This module contains a collection of YANG data types considered generally useful for routing protocols.
  
Contact
Routing Area Working Group - <rtgwg@ietf.org>
  
ietf-routing-types  
  
Organization IETF RTGWG - Routing Area Working Group
  
Module ietf-routing-types
Version 2017-10-13
File ietf-routing-types@2017-10-13.yang
  
Prefix rt-types
Namespace urn:ietf:params:xml:ns:yang:ietf-routing-types
Reference
RFC XXXX
  
Cooked /cookedmodules/ietf-routing-types/2017-10-13
YANG /src/ietf-routing-types@2017-10-13.yang
XSD /xsd/ietf-routing-types@2017-10-13.xsd
  
Abstract This module contains a collection of YANG data types considered generally useful for routing protocols. Copyright (c) 2017 IETF...
  
Contact
WG Web:   <http://tools.ietf.org/wg/rtgwg/>
WG List:  <mailto:rtgwg@ietf.org>

Editor:   Xufeng Liu
	  <mailto:Xufeng_Liu@jabail.com>
	  Yingzhen Qu
	  <mailto:yingzhen.qu@huawei.com>
	  Acee Lindem
	  <mailto:acee@cisco.com>
	  Christian Hopps
	  <mailto:chopps@chopps.org>
	  Lou Berger
	  <mailto:lberger@labn.com>

Description

 
ietf-routing-types
This module contains a collection of YANG data types
considered generally useful for routing protocols.
 
ietf-routing-types
This module contains a collection of YANG data types
considered generally useful for routing protocols.
 
ietf-routing-types
This module contains a collection of YANG data types
considered generally useful for routing protocols.

Copyright (c) 2017 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
(http://trustee.ietf.org/license-info).

This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices.

Typedefs

Typedef Base type Abstract
bandwidth-ieee-float32 string Bandwidth in IEEE 754 floating point 32-bit binary format: (-1)**(S) * 2**(Exponent-127) * (1 + Fraction), where Exponent uses 8 bits, and Fraction uses 23 bits. The units are octets per second. The encoding format is the external hexadecimal-significand ...
bandwidth-ieee-float32 string Bandwidth in IEEE 754 floating point 32-bit binary format: (-1)**(S) * 2**(Exponent-127) * (1 + Fraction), where Exponent uses 8 bits, and Fraction uses 23 bits. The units are octets per second. The encoding format is the external hexadecimal-significant ...
generalized-label binary Generalized label. Nodes sending and receiving the Generalized Label know the kinds of link they are using. Hence, the Generalized Label does not identify its type. Instead, nodes are expected to know from the context and type of label to expect.
generalized-label binary Generalized label. Nodes sending and receiving the Generalized Label know the kinds of link they are using. Hence, the Generalized Label does not identify its type. Instead, nodes are expected to know from the context and type of label to expect.
generalized-label binary Generalized label. Nodes sending and receiving the Generalized Label are aware of the link-specific label context and type.
ieee-bandwidth string Bandwidth in IEEE 754 floating point 32-bit binary format: (-1)**(S) * 2**(Exponent-127) * (1 + Fraction), where Exponent uses 8 bits, and Fraction uses 23 bits. The units are octets per second. The encoding format is the external hexadecimal-significand ...
ip-multicast-group-address union This type represents an IP multicast group address and is IP version neutral. The format of the textual representation implies the IP version.
ip-multicast-group-address union This type represents an IP multicast group address and is IP version neutral. The format of the textual representation implies the IP version.
ip-multicast-group-address union This type represents a version-neutral IP multicast group address. The format of the textual representation implies the IP version.
ipv4-multicast-group-address string This type represents an IPv4 multicast group address, which is in the range from 224.0.0.0 to 239.255.255.255.
ipv4-multicast-group-address string This type represents an IPv4 multicast group address, which is in the range from 224.0.0.0 to 239.255.255.255.
ipv4-multicast-group-address string This type represents an IPv4 multicast group address, which is in the range from 224.0.0.0 to 239.255.255.255.
ipv4-multicast-source-address union Multicast source IPv4 address type.
ipv4-multicast-source-address union Multicast source IPv4 address type.
ipv4-multicast-source-address union Multicast source IPv4 address type.
ipv6-multicast-group-address string This type represents an IPv6 multicast group address, which is in the range of FF00::/8.
ipv6-multicast-group-address string This type represents an IPv6 multicast group address, which is in the range of FF00::/8.
ipv6-multicast-group-address string This type represents an IPv6 multicast group address, which is in the range of FF00::/8.
ipv6-multicast-source-address union Multicast source IPv6 address type.
ipv6-multicast-source-address union Multicast source IPv6 address type.
ipv6-multicast-source-address union Multicast source IPv6 address type.
ipv6-route-origin string An IPv6 route origin is a 20-octet BGP IPv6 address specific extended community serving the same function as a standard 8-octet route only allowing for an IPv6 address as the global administrator. The format is <ipv6-address:2-octet-number>. Some valid e...
ipv6-route-target string An IPv6 route target is a 20-octet BGP IPv6 address specific extended community serving the same function as a standard 8-octet route target only allowing for an IPv6 address as the global administrator. The format is <ipv6-address:2-octet-number>. Some ...
link-access-type enumeration Link access type.
link-access-type enumeration Link access type.
link-access-type enumeration Link access type.
mpls-label union The 20 bits label values in an MPLS label stack entry, specified in RFC3032. This label value does not include the encodings of Traffic Class and TTL (time to live).
mpls-label union The 20 bits label values in an MPLS label stack entry, specified in RFC3032. This label value does not include the encodings of Traffic Class and TTL (time to live).
mpls-label union The 20-bit label values in an MPLS label stack entry, specified in RFC3032. This label value does not include the encodings of Traffic Class and TTL (time to live).
mpls-label-general-use uint32 The 20 bits label values in an MPLS label stack entry, specified in RFC3032. This label value does not include the encodings of Traffic Class and TTL (time to live). The label range specified by this type is for general use, with special-purpose MPLS labe...
mpls-label-general-use uint32 The 20 bits label values in an MPLS label stack entry, specified in RFC3032. This label value does not include the encodings of Traffic Class and TTL (time to live). The label range specified by this type is for general use, with special-purpose MPLS labe...
mpls-label-general-use uint32 The 20-bit label values in an MPLS label stack entry, specified in RFC3032. This label value does not include the encodings of Traffic Class and TTL (time to live). The label range specified by this type is for general use, with special-purpose MPLS label...
mpls-label-special-purpose identityref This type represents the special-purpose Multiprotocol Label Switching (MPLS) label values.
mpls-label-special-purpose identityref This type represents the special-purpose Multiprotocol Label Switching (MPLS) label values.
mpls-label-special-purpose identityref This type represents the special-purpose Multiprotocol Label Switching (MPLS) label values.
percentage uint8 Integer indicating a percentage value
route-distinguisher string A route distinguisher is an 8-octet value used to distinguish routes from different BGP VPNs (RFC 4364). A route distinguisher consists of three fields: A 2-octet type field, an administrator field, and an assigned number field. According to the data form...
route-distinguisher string A route distinguisher is an 8-octet value used to distinguish routes from different BGP VPNs (RFC 4364). A route distinguisher consists of three fields: A 2-octet type field, an administrator field, and an assigned number field. According to the data form...
route-distinguisher string A route distinguisher is an 8-octet value used to distinguish routes from different BGP VPNs (RFC 4364). As per RFC 4360, a route distinguisher will have the same format as a route target and will consist of two or three fields including a 2-octet type fi...
route-origin string A route origin is an 8-octet BGP extended community identifying the set of sites where the BGP route originated (RFC 4364). A route target consists of two or three fields: a 2-octet type field, an administrator field, and, optionally, an assigned number f...
route-target string A route target is an 8-octet BGP extended community initially identifying a set of sites in a BGP VPN (RFC 4364). However, it has since taken on a more general role in BGP route filtering. A route target consists of three fields: a 2-octet type field, an ...
route-target string A route target is an 8-octet BGP extended community initially identifying a set of sites in a BGP VPN (RFC 4364). However, it has since taken on a more general role in BGP route filtering. A route target consists of three fields: a 2-octet type field, an ...
route-target string A route target is an 8-octet BGP extended community initially identifying a set of sites in a BGP VPN (RFC 4364). However, it has since taken on a more general role in BGP route filtering. A route target consists of two or three fields: a 2-octet type fie...
route-target-type enumeration Indicates the role a route target takes in route filtering.
route-target-type enumeration Indicates the role a route target takes in route filtering.
route-target-type enumeration Indicates the role a route target takes in route filtering.
router-id string A 32-bit number in the dotted quad format assigned to each router. This number uniquely identifies the router within an Autonomous System.
router-id string A 32-bit number in the dotted quad format assigned to each router. This number uniquely identifies the router within an Autonomous System.
router-id string A 32-bit number in the dotted quad format assigned to each router. This number uniquely identifies the router within an Autonomous System.
timer-multiplier uint8 The number of timer value intervals that should be interpreted as a failure.
timer-multiplier uint8 The number of timer value intervals that should be interpreted as a failure.
timer-multiplier uint8 The number of timer value intervals that should be interpreted as a failure.
timer-value-milliseconds union Timer value type, in milliseconds.
timer-value-milliseconds union Timer value type, in milliseconds.
timer-value-milliseconds union Timer value type, in milliseconds.
timer-value-seconds16 union Timer value type, in seconds (16 bit range).
timer-value-seconds16 union Timer value type, in seconds (16 bit range).
timer-value-seconds16 union Timer value type, in seconds (16-bit range).
timer-value-seconds32 union Timer value type, in seconds (32 bit range).
timer-value-seconds32 union Timer value type, in seconds (32 bit range).
timer-value-seconds32 union Timer value type, in seconds (32-bit range).
timeticks64 uint64 This type is based on the timeticks type defined in RFC 6991, but with 64-bit width. It represents the time, modulo 2^64, in hundredths of a second between two epochs.
uint24 uint32 24-bit unsigned integer

Groupings

Grouping Objects Abstract
mpls-label-stack mpls-label-stack A grouping that specifies an MPLS label stack.
mpls-label-stack mpls-label-stack A grouping that specifies an MPLS label stack.
mpls-label-stack mpls-label-stack This grouping specifies an MPLS label stack. The label stack is encoded as a list of label stack entries. The list key is an identifier which indicates relative ordering of each entry, with the lowest value identifier corresponding to the top of the lab...
vpn-route-targets vpn-target A grouping that specifies Route Target import-export rules used in the BGP enabled Virtual Private Networks (VPNs).
vpn-route-targets vpn-target A grouping that specifies Route Target import-export rules used in the BGP enabled Virtual Private Networks (VPNs).
vpn-route-targets vpn-target A grouping that specifies Route Target import-export rules used in the BGP enabled Virtual Private Networks (VPNs).