netconfcentral logo

ietf-bgp-srte

HTML

ietf-bgp-srte@2018-06-26



  module ietf-bgp-srte {

    yang-version 1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-bgp-srte";

    prefix ietf-bgp-srte;

    import ietf-routing-types {
      prefix rt-types;
    }
    import ietf-routing {
      prefix rt;
    }
    import ietf-inet-types {
      prefix inet;
    }
    import ietf-bgp {
      prefix bgp;
    }
    import ietf-bgp-types {
      prefix bgp-types;
    }
    import ietf-srv6-types {
      prefix srv6-types;
    }

    organization
      "IETF Inter-Domain Routing Working Group";

    contact
      "Inter-Domain working group - idr@ietf.org";

    description
      "This YANG module defines a data model to configure and
     manage segment routing extensions in BGP.

     Terms and Acronyms

     AF : Address Family

     BGP (bgp) : Border Gateway Protocol

     SR : Segment Routing

     SID : Segment Identifier

     SRv6 : Segment Routing with IPv6 Data plane

     VPN : Virtual Private Network

     VRF : Virtual Routing and Forwarding

    ";

    revision "2018-06-26" {
      description "Initial revision";
      reference
        "";

    }


    identity IPV4_SRPOLICY {
      base bgp-types:afi-safi-type;
      description
        "IPv4 SR Policy (AFI,SAFI = 1,73)";
      reference
        "TBD";

    }

    identity IPV6_SRPOLICY {
      base bgp-types:afi-safi-type;
      description
        "IPv6 SR Policy (AFI,SAFI = 2,73)";
      reference
        "TBD";

    }

    typedef sid-type {
      type union {
        type rt-types:mpls-label;
        type srv6-types:srv6-sid;
      }
      description
        "Type definition for Segment Identifier. This is
                 a union type which can be either a SR MPLS SID in the
                 form of a label,  or a SRv6 SID in the form of
                 an IPv6 address.";
      reference
        "TBD";

    }

    grouping sr-policy-color-endpoint {
      description
        "Common grouping for SR Policy Color and
                 Endpoint";
      leaf color {
        type uint32;
        description "Color of the policy";
      }

      leaf end-point {
        type inet:ip-address;
        description "Endpoint of the policy";
      }
    }  // grouping sr-policy-color-endpoint

    grouping sr-odn-auth-colors {
      description
        "Authorized colors for On Demand (dynamic) SR Policies
       towards BGP nexthops";
      container authorized-colors {
        config false;
        description
          "Authorized colors for On Demand (dynamic) SR policies
         towards BGP nexthops";
        list colors {
          key "color";
          description
            "List of SR Policy Colors";
          leaf color {
            type uint32;
            description "Color value";
          }
        }  // list colors
      }  // container authorized-colors
    }  // grouping sr-odn-auth-colors

    grouping sr-policy-cmn-state {
      description
        "Common state parameters applicable to
                 SR Policies";
      leaf policy-state {
        type enumeration {
          enum "UP" {
            value 0;
            description "SR Policy state UP";
          }
          enum "DOWN" {
            value 1;
            description
              "SR Policy state DOWN";
          }
        }
        description
          "SR Policy forwarding state";
      }

      leaf binding-sid {
        type sid-type;
        description
          "Binding SID of the SR Policy";
      }

      leaf steering-disabled {
        type empty;
        description
          "This attribute is set if steering
                   is disabled on this SR policy";
      }

      leaf ref-count {
        type uint32;
        description
          "Count of routes steering over this policy";
      }
    }  // grouping sr-policy-cmn-state

    grouping sr-policy-state {
      description "SR Policy State";
      container policy-state {
        config false;
        description "SR Policy State";
        list sr-policy {
          key "color end-point";
          description "List of SR Policies";
          uses sr-policy-color-endpoint;

          uses sr-policy-cmn-state;
        }  // list sr-policy
      }  // container policy-state
    }  // grouping sr-policy-state

    grouping sr-exp-policy-cp-state {
      description
        "State of BGP signaled SR Policy (explicit)
                 candidate paths";
      container explicit-policies {
        config false;
        description
          "BGP signaled explicit SR Policies";
        list sr-policy {
          key "distinguisher color end-point";
          description
            "List of BGP signaled explicit SR Policies";
          leaf distinguisher {
            type uint32;
            description
              "Distinguisher of the SR Policy
                       candidate path";
          }

          uses sr-policy-color-endpoint;

          leaf preference {
            type uint32;
            description
              "Preference of the SR Policy candidate path";
          }

          container explicit-binding-sid {
            description
              "Explicitly supplied Binding SID
                       for this policy";
            leaf binding-sid {
              type sid-type;
              description
                "Binding SID value";
            }

            leaf strict {
              type boolean;
              description
                "Boolean indicating that the node
                         must use only the supplied Binding SID
                         for this SR Policy.
                         reference: TBD";
            }

            leaf drop-on-invalid {
              type boolean;
              description
                "Boolean to indicate drop upon invalid
                         policy, behavior. This overwrites the
                         default behavior of fallback to IGP path
                         , when SR Policy is (or becomes) invalid.
                         reference: TBD";
            }
          }  // container explicit-binding-sid

          leaf usable {
            type boolean;
            description
              "Boolean to indicate that the SR Policy is
                       usable on this node.
                       reference: TBD";
          }

          leaf registered {
            type boolean;
            description
              "Boolean to indicate that the SR policy
                       is registered with policy manager to
                       install the corresponding forwarding entry";
          }
        }  // list sr-policy
      }  // container explicit-policies
    }  // grouping sr-exp-policy-cp-state

    grouping sr-odn-policies {
      description
        "SR On Demand (dynamic) SR Policies";
      container installed-policies {
        config false;
        description
          "BGP triggered On Demand (dynamic) SR Policies
                   corresponding to the BGP nexthops";
        list sr-policy {
          key "color end-point";
          description "SR Policy list";
          uses sr-policy-color-endpoint;
        }  // list sr-policy
      }  // container installed-policies
    }  // grouping sr-odn-policies

    grouping sr-policy-steering-state {
      description
        "Per route Automatic Steering parameters";
      container automatic-steering {
        description
          "Per route Automatic Steering parameters";
        leaf color {
          type leafref {
            path "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/bgp:bgp/bgp:global/ietf-bgp-srte:segment-routing/ietf-bgp-srte:policy-state/ietf-bgp-srte:sr-policy/ietf-bgp-srte:color";
          }
          description
            "Color of the SR Policy being used for
                     Automatic Steering";
        }

        leaf end-point {
          type leafref {
            path "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/bgp:bgp/bgp:global/ietf-bgp-srte:segment-routing/ietf-bgp-srte:policy-state/ietf-bgp-srte:sr-policy/ietf-bgp-srte:end-point";
          }
          description
            "End-point of the SR Policy being used
                     for Automatic Steering";
        }

        leaf co-flag {
          type enumeration {
            enum "00" {
              value 0;
              description
                "Color-Only flag 00";
            }
            enum "01" {
              value 1;
              description
                "Color-Only flag 01";
            }
            enum "10" {
              value 2;
              description
                "Color-Only flag 10";
            }
          }
          default "00";
          description
            "Color-Only (CO) flags applicable for
                     Automatic Steering of this route";
        }

        leaf binding-sid {
          type leafref {
            path "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/bgp:bgp/bgp:global/ietf-bgp-srte:segment-routing/ietf-bgp-srte:policy-state/ietf-bgp-srte:sr-policy/ietf-bgp-srte:binding-sid";
          }
          description
            "Binding SID of the SR Policy";
        }
      }  // container automatic-steering
    }  // grouping sr-policy-steering-state

    grouping route-key-leafs {
      description
        "Grouping for key leafs identifying a route";
      leaf prefix {
        type union {
          type inet:ip-prefix;
          type string;
        }
        description
          "BGP Prefix. This is a temp definition to
                  cover ip-prefix and other NLRI formats.
                  Import the type once defined in base
                  BGP RIB model";
      }

      leaf neighbor {
        type inet:ip-address;
        description "BGP Neighbor";
      }

      leaf add-path-id {
        type uint32;
        description "Add-path ID";
      }
    }  // grouping route-key-leafs

    grouping common-bgp-route-grouping {
      description "BGP route list";
      container routes {
        config false;
        description "BGP Route in local RIB";
        list route {
          key "prefix neighbor add-path-id";
          description "BGP route list";
          uses route-key-leafs;
        }  // list route
      }  // container routes
    }  // grouping common-bgp-route-grouping

    grouping common-bgp-vpn-route-grouping {
      description "BGP route list";
      container routes {
        config false;
        description
          "BGP VPN Route in local RIB";
        list route {
          key "rd prefix neighbor add-path-id";
          description "Route List";
          leaf rd {
            type rt-types:route-distinguisher;
            description
              "Route Distinguisher";
          }

          uses route-key-leafs;
        }  // list route
      }  // container routes
    }  // grouping common-bgp-vpn-route-grouping

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/bgp:bgp/bgp:global/bgp:afi-safis/bgp:afi-safi/bgp:ipv4-unicast {
      description "Augment BGP SAFI route";
      uses common-bgp-route-grouping;
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/bgp:bgp/bgp:global/bgp:afi-safis/bgp:afi-safi/bgp:ipv6-unicast {
      description "Augment BGP SAFI route";
      uses common-bgp-route-grouping;
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/bgp:bgp/bgp:global/bgp:afi-safis/bgp:afi-safi/bgp:ipv4-labeled-unicast {
      description "Augment BGP SAFI route";
      uses common-bgp-route-grouping;
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/bgp:bgp/bgp:global/bgp:afi-safis/bgp:afi-safi/bgp:ipv6-labeled-unicast {
      description "Augment BGP SAFI route";
      uses common-bgp-route-grouping;
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/bgp:bgp/bgp:global/bgp:afi-safis/bgp:afi-safi/bgp:l3vpn-ipv4-unicast {
      description "Augment BGP SAFI route";
      uses common-bgp-vpn-route-grouping;
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/bgp:bgp/bgp:global/bgp:afi-safis/bgp:afi-safi/bgp:l3vpn-ipv6-unicast {
      description "Augment BGP SAFI route";
      uses common-bgp-vpn-route-grouping;
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/bgp:bgp/bgp:global {
      description
        "Segment Routing parameters in BGP global model";
      container segment-routing {
        description
          "Segment Routing parameters";
        container on-demand-policies {
          description
            "Segment Routing On Demand Nexthop
           (ODN) SR Policies";
          uses sr-odn-auth-colors;

          uses sr-odn-policies;
        }  // container on-demand-policies

        uses sr-policy-state;
      }  // container segment-routing
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/bgp:bgp/bgp:global/bgp:afi-safis/bgp:afi-safi/bgp:ipv4-unicast/ietf-bgp-srte:routes/ietf-bgp-srte:route {
      description
        "Augment BGP SAFI route with steering info";
      uses sr-policy-steering-state;
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/bgp:bgp/bgp:global/bgp:afi-safis/bgp:afi-safi/bgp:ipv6-unicast/ietf-bgp-srte:routes/ietf-bgp-srte:route {
      description
        "Augment BGP SAFI route with steering info";
      uses sr-policy-steering-state;
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/bgp:bgp/bgp:global/bgp:afi-safis/bgp:afi-safi/bgp:ipv4-labeled-unicast/ietf-bgp-srte:routes/ietf-bgp-srte:route {
      description
        "Augment BGP SAFI route with steering info";
      uses sr-policy-steering-state;
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/bgp:bgp/bgp:global/bgp:afi-safis/bgp:afi-safi/bgp:ipv6-labeled-unicast/ietf-bgp-srte:routes/ietf-bgp-srte:route {
      description
        "Augment BGP SAFI route with steering info";
      uses sr-policy-steering-state;
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/bgp:bgp/bgp:global/bgp:afi-safis/bgp:afi-safi/bgp:l3vpn-ipv4-unicast/ietf-bgp-srte:routes/ietf-bgp-srte:route {
      description
        "Augment BGP SAFI route with steering info";
      uses sr-policy-steering-state;
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/bgp:bgp/bgp:global/bgp:afi-safis/bgp:afi-safi/bgp:l3vpn-ipv6-unicast/ietf-bgp-srte:routes/ietf-bgp-srte:route {
      description
        "Augment BGP SAFI route with steering info";
      uses sr-policy-steering-state;
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/bgp:bgp/bgp:global/bgp:afi-safis/bgp:afi-safi {
      description
        "Augment IPv4 SR Policy SAFI list entry";
      container ipv4-srpolicy {
        when
          "../afi-safi-name = 'bgp-types:IPV4_SRPOLICY'" {
          description
            "Include this container for IPv4 SR Policy specific
          configuration";
        }
        description
          "IPv4 SR Policy specific parameters";
        uses sr-exp-policy-cp-state;
      }  // container ipv4-srpolicy
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/bgp:bgp/bgp:global/bgp:afi-safis/bgp:afi-safi {
      description
        "Augment IPv6 SR Policy SAFI list entry";
      container ipv6-srpolicy {
        when
          "../afi-safi-name = 'bgp-types:IPV6_SRPOLICY'" {
          description
            "Include this container for IPv6 SR Policy specific
           configuration";
        }
        description
          "IPv6 SR Policy specific parameters";
        uses sr-exp-policy-cp-state;
      }  // container ipv6-srpolicy
    }
  }  // module ietf-bgp-srte

Summary

  
  
Organization IETF Inter-Domain Routing Working Group
  
Module ietf-bgp-srte
Version 2018-06-26
File ietf-bgp-srte@2018-06-26.yang
  
Prefix ietf-bgp-srte
Namespace urn:ietf:params:xml:ns:yang:ietf-bgp-srte
  
Cooked /cookedmodules/ietf-bgp-srte/2018-06-26
YANG /src/ietf-bgp-srte@2018-06-26.yang
XSD /xsd/ietf-bgp-srte@2018-06-26.xsd
  
Abstract This YANG module defines a data model to configure and manage segment routing extensions in BGP. Terms and Acronyms AF : Addre...
  
Contact
Inter-Domain working group - idr@ietf.org

Description

 
This YANG module defines a data model to configure and
manage segment routing extensions in BGP.

Terms and Acronyms

AF : Address Family

BGP (bgp) : Border Gateway Protocol

SR : Segment Routing

SID : Segment Identifier

SRv6 : Segment Routing with IPv6 Data plane

VPN : Virtual Private Network

VRF : Virtual Routing and Forwarding

Typedefs

Typedef Base type Abstract
sid-type union Type definition for Segment Identifier. This is a union type which can be either a SR MPLS SID in the form of a label, or a SRv6 SID in the form of an IPv6 address.

Groupings

Grouping Objects Abstract
common-bgp-route-grouping routes BGP route list
common-bgp-vpn-route-grouping routes BGP route list
route-key-leafs prefix neighbor add-path-id Grouping for key leafs identifying a route
sr-exp-policy-cp-state explicit-policies State of BGP signaled SR Policy (explicit) candidate paths
sr-odn-auth-colors authorized-colors Authorized colors for On Demand (dynamic) SR Policies towards BGP nexthops
sr-odn-policies installed-policies SR On Demand (dynamic) SR Policies
sr-policy-cmn-state policy-state binding-sid steering-disabled ref-count Common state parameters applicable to SR Policies
sr-policy-color-endpoint color end-point Common grouping for SR Policy Color and Endpoint
sr-policy-state policy-state SR Policy State
sr-policy-steering-state automatic-steering Per route Automatic Steering parameters