netconfcentral logo

ietf-ospf-sr

HTML

ietf-ospf-sr@2017-07-02



  module ietf-ospf-sr {

    yang-version 1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-ospf-sr";

    prefix ospf-sr;

    import ietf-inet-types {
      prefix inet;
    }
    import ietf-yang-types {
      prefix yang;
    }
    import ietf-routing {
      prefix rt;
    }
    import ietf-segment-routing-common {
      prefix sr-cmn;
    }
    import ietf-segment-routing {
      prefix sr;
    }
    import ietf-ospf {
      prefix ospf;
    }

    organization
      "IETF OSPF - OSPF Working Group";

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

      Editor:   Derek Yeung
                <mailto:derek@arrcus.com>
      Author:   Derek Yeung
                <mailto:derek@arrcus.com>
      Author:   Yingzhen Qu
                <mailto:yingzhen.qu@huawei.com>
      Author:   Acee Lindem
                <mailto:acee@cisco.com>
      Author:   Jeffrey Zhang
                <mailto:zzhang@juniper.net>
      Author:   Ing-Wher Chen
                <mailto:ing-wher_chen@jabil.com>
      Author:   Greg Hankins
                <mailto:greg.hankins@alcatel-lucent.com>";

    description
      "This YANG module defines the generic configuration
     and operational state for OSPF Segment Routing, which is
     common across all of the vendor implementations. It is
     intended that the module will be extended by vendors to
     define vendor-specific OSPF Segment Routing configuration
     and operational parameters and policies.

     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-07-02" {
      description
        "* Implement NMDA model.
       * Add local-block-tlvs and srms-preference-tlv.
       * Remove sid-binding-sub-tlvs.";
      reference
        "RFC XXXX: A YANG Data Model for OSPF Segment Routing.";

    }

    revision "2017-03-12" {
      description
        "* Add p-flag in adj-sid sub-tlv.";
      reference
        "RFC XXXX: A YANG Data Model for OSPF Segment Routing.";

    }

    revision "2016-10-31" {
      description
        "* Update authors information.
       * Add import of ietf-segment-routing-common module.";
      reference
        "RFC XXXX: A YANG Data Model for OSPF Segment Routing.";

    }

    revision "2016-07-07" {
      description
        "* Change routing-protocol to control-plane-protocol.";
      reference
        "RFC XXXX: A YANG Data Model for OSPF Segment Routing.";

    }

    revision "2016-03-20" {
      description
        "* Remove routing-instance.";
      reference
        "RFC XXXX: A YANG Data Model for OSPF Segment Routing.";

    }

    revision "2015-10-19" {
      description
        "* Add per-protocol SRGB support.
       * Editorial changes.";
      reference
        "RFC XXXX: A YANG Data Model for OSPF Segment Routing.";

    }

    revision "2015-09-02" {
      description
        "* Author list update.
       * Editorial changes.";
      reference
        "RFC XXXX: A YANG Data Model for OSPF Segment Routing.";

    }

    revision "2015-07-06" {
      description "Initial revision.";
      reference
        "RFC XXXX: A YANG Data Model for OSPF Segment Routing.";

    }


    feature ti-lfa {
      description
        "Topology-Independent Loop-Free Alternate (TI-LFA)
       computation using segment routing.";
    }

    grouping sid-sub-tlv {
      description
        "SID/Label sub-TLV grouping.";
      container sid-sub-tlv {
        description
          "Used to advertise the SID/Label associated with a
         prefix or adjacency.";
        leaf sid {
          type uint32;
          description
            "Segment Identifier (SID) - A 20 bit label or
           32 bit SID.";
        }
      }  // container sid-sub-tlv
    }  // grouping sid-sub-tlv

    grouping prefix-sid-sub-tlvs {
      description
        "Prefix Segment ID (SID) sub-TLVs.";
      container perfix-sid-sub-tlvs {
        description "Prefix SID sub-TLV.";
        list prefix-sid-sub-tlv {
          description "Prefix SID sub-TLV.";
          leaf flags {
            type bits {
              bit NP {
                position 1;
                description "No-PHP flag.";
              }
              bit M {
                position 2;
                description
                  "Mapping server flag.";
              }
              bit E {
                position 3;
                description
                  "Explicit-NULL flag.";
              }
              bit V {
                position 4;
                description
                  "Value/Index flag.";
              }
              bit L {
                position 5;
                description "Local flag.";
              }
            }
            description
              "Segment Identifier (SID) Flags.";
          }

          leaf mt-id {
            type uint8;
            description "Multi-topology ID.";
          }

          leaf algorithm {
            type uint8;
            description
              "The algorithm associated with the prefix-SID.";
          }

          leaf sid {
            type uint32;
            description "An index or label.";
          }
        }  // list prefix-sid-sub-tlv
      }  // container perfix-sid-sub-tlvs
    }  // grouping prefix-sid-sub-tlvs

    grouping extended-prefix-range-tlvs {
      description
        "Extended prefix range TLV grouping.";
      container extended-prefix-range-tlvs {
        description
          "The list of range of prefixes.";
        list extended-prefix-range-tlv {
          description
            "The range of prefixes.";
          leaf range-size {
            type uint16;
            description
              "The number of prefixes covered by the
                       advertisement.";
          }

          leaf flags {
            type bits {
              bit IA {
                position 0;
                description
                  "Inter-Area flag.";
              }
            }
            description "Flags.";
          }

          leaf prefix {
            type inet:ip-prefix;
            description "Address prefix.";
          }

          uses prefix-sid-sub-tlvs;

          uses ospf:unknown-tlvs;
        }  // list extended-prefix-range-tlv
      }  // container extended-prefix-range-tlvs
    }  // grouping extended-prefix-range-tlvs

    grouping sr-algorithm-tlv {
      description
        "SR algorithm TLV grouping.";
      container sr-algorithm-tlv {
        description "All SR algorithm TLVs.";
        leaf-list sr-algorithm {
          type uint8;
          description
            "The Segment Routing (SR) algorithms that the router is
           currently using.";
        }
      }  // container sr-algorithm-tlv
    }  // grouping sr-algorithm-tlv

    grouping sid-range-tlvs {
      description "SID Range TLV grouping.";
      container sid-range-tlvs {
        description
          "List of SID range TLVs.";
        list sid-range-tlv {
          description "SID range TLV.";
          leaf range-size {
            type ospf:uint24;
            description "The SID range.";
          }

          uses sid-sub-tlv;
        }  // list sid-range-tlv
      }  // container sid-range-tlvs
    }  // grouping sid-range-tlvs

    grouping local-block-tlvs {
      description
        "The SR local block TLV contains the
                 range of labels reserved for local SIDs.";
      container local-block-tlvs {
        description "List of SRLB TLVs.";
        list local-block-tlv {
          description "SRLB TLV.";
          leaf range-size {
            type ospf:uint24;
            description "The SID range.";
          }

          uses sid-sub-tlv;
        }  // list local-block-tlv
      }  // container local-block-tlvs
    }  // grouping local-block-tlvs

    grouping srms-preference-tlv {
      description
        "The SRMS preference TLV is used to advertise
                 a preference associated with the node that acts
                 as an SR Mapping Server.";
      container srms-preference-tlv {
        description "SRMS Preference TLV.";
        leaf preference {
          type uint8 {
            range "0 .. 255";
          }
          description
            "SRMS preference TLV, vlaue from 0 to 255.";
        }
      }  // container srms-preference-tlv
    }  // grouping srms-preference-tlv

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:instance {
      when
        "../../rt:type = 'ospf:ospfv2' or "
          + "../../rt:type = 'ospf:ospfv3'" {
        description
          "This augments the OSPF routing protocol when used.";
      }
      description
        "This augments the OSPF protocol configuration
       with segment routing.";
      uses sr:controlplane-cfg;

      container protocol-srgb {
        if-feature sr:protocol-srgb;
        description "Per-protocol SRGB.";
        uses sr-cmn:srgb-cfg;
      }  // container protocol-srgb
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:instance/ospf:areas/ospf:area/ospf:interfaces/ospf:interface {
      when
        "../../../../../../rt:type = 'ospf:ospfv2' or "
          + "../../../../../../rt:type = 'ospf:ospfv3'" {
        description
          "This augments the OSPF interface configuration
         when used.";
      }
      description
        "This augments the OSPF protocol interface
       configuration with segment routing.";
      uses sr:igp-interface-cfg;
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:instance/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:fast-reroute {
      when
        "../../../../../../../rt:type = 'ospf:ospfv2' or "
          + "../../../../../../../rt:type = 'ospf:ospfv3'" {
        description
          "This augments the OSPF routing protocol when used.";
      }
      description
        "This augments the OSPF protocol IP-FRR with TI-LFA.";
      container ti-lfa {
        if-feature ti-lfa;
        description
          "Topology Independent Loop Free Alternate
         (TI-LFA) support.";
        leaf enable {
          type boolean;
          description
            "Enables TI-LFA computation.";
        }
      }  // container ti-lfa
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:instance/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:database/ospf:link-scope-lsa-type/ospf:link-scope-lsas/ospf:link-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque/ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv {
      when
        "../../../../../../../../../../../../../../../"
          + "rt:type = 'ospf:ospfv2'" {
        description
          "This augmentation is only valid for OSPFv2.";
      }
      description
        "SR specific TLVs for OSPFv2 extended prefix TLV
       in type 9 opaque LSA.";
      uses prefix-sid-sub-tlvs;
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:instance/ospf:areas/ospf:area/ospf:database/ospf:area-scope-lsa-type/ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque/ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv {
      when
        "../../../../../../../../../../../../../"
          + "rt:type = 'ospf:ospfv2'" {
        description
          "This augmentation is only valid for OSPFv2.";
      }
      description
        "SR specific TLVs for OSPFv2 extended prefix TLV
       in type 10 opaque LSA.";
      uses prefix-sid-sub-tlvs;
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:instance/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque/ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv {
      when
        "../../../../../../../../../../../"
          + "rt:type = 'ospf:ospfv2'" {
        description
          "This augmentation is only valid for OSPFv2.";
      }
      description
        "SR specific TLVs for OSPFv2 extended prefix TLV
       in type 11 opaque LSA.";
      uses prefix-sid-sub-tlvs;
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:instance/ospf:areas/ospf:area/ospf:database/ospf:area-scope-lsa-type/ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque/ospf:extended-link-tlvs/ospf:extended-link-tlv {
      when
        "../../../../../../../../../../../../../"
          + "rt:type = 'ospf:ospfv2'" {
        description
          "This augmentation is only valid for OSPFv2.";
      }
      description
        "SR specific TLVs for OSPFv2 extended link TLV
       in type 10 opaque LSA.";
      container adj-sid-sub-tlvs {
        description
          "Adjacency SID optional sub-TLVs.";
        list adj-sid-sub-tlv {
          description
            "List of Adjacency SID sub-TLVs.";
          leaf flags {
            type bits {
              bit B {
                position 0;
                description "Backup flag.";
              }
              bit V {
                position 1;
                description
                  "Value/Index flag.";
              }
              bit L {
                position 2;
                description
                  "Local/Global flag.";
              }
              bit G {
                position 3;
                description "Group flag.";
              }
              bit P {
                position 4;
                description
                  "Persistent flag.";
              }
            }
            description "Flags.";
          }

          leaf mt-id {
            type uint8;
            description "Multi-topology ID.";
          }

          leaf weight {
            type uint8;
            description
              "Weight used for load-balancing.";
          }

          leaf sid {
            type uint32;
            description
              "Segment Identifier (SID) index/label.";
          }
        }  // list adj-sid-sub-tlv
      }  // container adj-sid-sub-tlvs

      container lan-adj-sid-sub-tlvs {
        description
          "LAN Adjacency SID optional sub-TLVs.";
        list lan-adj-sid-sub-tlv {
          description
            "List of LAN adjacency SID sub-TLVs.";
          leaf flags {
            type bits {
              bit B {
                position 0;
                description "Backup flag.";
              }
              bit V {
                position 1;
                description
                  "Value/Index flag.";
              }
              bit L {
                position 2;
                description
                  "Local/Global flag.";
              }
              bit G {
                position 3;
                description "Group flag.";
              }
              bit P {
                position 4;
                description
                  "Persistent flag.";
              }
            }
            description "Flags.";
          }

          leaf mt-id {
            type uint8;
            description "Multi-topology ID.";
          }

          leaf weight {
            type uint8;
            description
              "Weight used for load-balancing.";
          }

          leaf neighbor-router-id {
            type yang:dotted-quad;
            description
              "Neighbor router ID.";
          }

          leaf sid {
            type uint32;
            description
              "Segment Identifier (SID) index/label.";
          }
        }  // list lan-adj-sid-sub-tlv
      }  // container lan-adj-sid-sub-tlvs
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:instance/ospf:areas/ospf:area/ospf:interfaces/ospf:interface/ospf:database/ospf:link-scope-lsa-type/ospf:link-scope-lsas/ospf:link-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque {
      when
        "../../../../../../../../../../../../../"
          + "rt:type = 'ospf:ospfv2'" {
        description
          "This augmentation is only valid for OSPFv2.";
      }
      description
        "SR specific TLVs for OSPFv2 type 9 opaque LSA.";
      uses extended-prefix-range-tlvs;

      uses sr-algorithm-tlv;

      uses sid-range-tlvs;

      uses local-block-tlvs;

      uses srms-preference-tlv;
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:instance/ospf:areas/ospf:area/ospf:database/ospf:area-scope-lsa-type/ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque {
      when
        "../../../../../../../../../../../"
          + "rt:type = 'ospf:ospfv2'" {
        description
          "This augmentation is only valid for OSPFv2.";
      }
      description
        "SR specific TLVs for OSPFv2 type 10 opaque LSA.";
      uses extended-prefix-range-tlvs;

      uses sr-algorithm-tlv;

      uses sid-range-tlvs;

      uses local-block-tlvs;

      uses srms-preference-tlv;
    }

    augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:instance/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque {
      when
        "../../../../../../../../../"
          + "rt:type = 'ospf:ospfv2'" {
        description
          "This augmentation is only valid for OSPFv2.";
      }
      description
        "SR specific TLVs for OSPFv2 type 11 opaque LSA.";
      uses extended-prefix-range-tlvs;

      uses sr-algorithm-tlv;

      uses sid-range-tlvs;

      uses local-block-tlvs;

      uses srms-preference-tlv;
    }
  }  // module ietf-ospf-sr

Summary

  
  
Organization IETF OSPF - OSPF Working Group
  
Module ietf-ospf-sr
Version 2017-07-02
File ietf-ospf-sr@2017-07-02.yang
  
Prefix ospf-sr
Namespace urn:ietf:params:xml:ns:yang:ietf-ospf-sr
Reference
RFC XXXX
  
Cooked /cookedmodules/ietf-ospf-sr/2017-07-02
YANG /src/ietf-ospf-sr@2017-07-02.yang
XSD /xsd/ietf-ospf-sr@2017-07-02.xsd
  
Abstract This YANG module defines the generic configuration and operational state for OSPF Segment Routing, which is common across all of...
  
Contact
WG Web:   <http://tools.ietf.org/wg/ospf/>
WG List:  <mailto:ospf@ietf.org>

Editor:   Derek Yeung
	  <mailto:derek@arrcus.com>
Author:   Derek Yeung
	  <mailto:derek@arrcus.com>
Author:   Yingzhen Qu
	  <mailto:yingzhen.qu@huawei.com>
Author:   Acee Lindem
	  <mailto:acee@cisco.com>
Author:   Jeffrey Zhang
	  <mailto:zzhang@juniper.net>
Author:   Ing-Wher Chen
	  <mailto:ing-wher_chen@jabil.com>
Author:   Greg Hankins
	  <mailto:greg.hankins@alcatel-lucent.com>

Description

 
This YANG module defines the generic configuration
and operational state for OSPF Segment Routing, which is
common across all of the vendor implementations. It is
intended that the module will be extended by vendors to
define vendor-specific OSPF Segment Routing configuration
and operational parameters and policies.

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.

Groupings

Grouping Objects Abstract
extended-prefix-range-tlvs extended-prefix-range-tlvs Extended prefix range TLV grouping.
local-block-tlvs local-block-tlvs The SR local block TLV contains the range of labels reserved for local SIDs.
prefix-sid-sub-tlvs perfix-sid-sub-tlvs Prefix Segment ID (SID) sub-TLVs.
sid-range-tlvs sid-range-tlvs SID Range TLV grouping.
sid-sub-tlv sid-sub-tlv SID/Label sub-TLV grouping.
sr-algorithm-tlv sr-algorithm-tlv SR algorithm TLV grouping.
srms-preference-tlv srms-preference-tlv The SRMS preference TLV is used to advertise a preference associated with the node that acts as an SR Mapping Server.