Skip to main content

OSPF YANG Model Augmentations for Additional Features - Release 1
draft-ietf-lsr-ospf-yang-augmentation-v1-17

Document Type Active Internet-Draft (lsr WG)
Authors Acee Lindem , Yingzhen Qu
Last updated 2025-07-06
Replaces draft-acee-lsr-ospf-yang-augmentation-v1
RFC stream Internet Engineering Task Force (IETF)
Intended RFC status Proposed Standard
Formats
Yang Validation 9 errors, 0 warnings
Additional resources Yang catalog entry for ietf-ospf-graceful-link-shutdown@2020-10-31.yang
Yang catalog entry for ietf-ospf-link-attr@2020-10-31.yang
Yang catalog entry for ietf-ospf-lls-local-id@2020-04-24.yang
Yang catalog entry for ietf-ospf-two-part-metric@2020-04-24.yang
Yang catalog entry for ietf-ospfv3-te@2020-04-24.yang
Yang impact analysis for draft-ietf-lsr-ospf-yang-augmentation-v1
Mailing list discussion
Stream WG state WG Document
Document shepherd Christian Hopps
IESG IESG state I-D Exists
Consensus boilerplate Yes
Telechat date (None)
Responsible AD (None)
Send notices to Christian Hopps <chopps@chopps.org>
draft-ietf-lsr-ospf-yang-augmentation-v1-17
Internet                                                       A. Lindem
Internet-Draft                                      LabN Consulting, LLC
Intended status: Standards Track                                   Y. Qu
Expires: 7 January 2026                           Futurewei Technologies
                                                             6 July 2025

   OSPF YANG Model Augmentations for Additional Features - Release 1
              draft-ietf-lsr-ospf-yang-augmentation-v1-17

Abstract

   This document defines YANG data modules that augment the IETF OSPF
   YANG model to support various OSPF extensions and features, including
   Traffic Engineering Extensions to OSPF Version 3 as defined in RFC
   5329, OSPF Two-Part Metric as defined in RFC 8042, OSPF Graceful Link
   Shutdown as defined in RFC 8379, OSPF Link-Local Signaling (LLS)
   Extensions for Local Interface ID Advertisement as defined in RFC
   8510, OSPF MSD as defined in RFC 8476, OSPF Application-Specific Link
   Attributes as defined in RFC 9492, and OSPF Flexible Algorithm as
   defined in RFC 9350.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on 7 January 2026.

Copyright Notice

   Copyright (c) 2025 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents (https://trustee.ietf.org/
   license-info) in effect on the date of publication of this document.
   Please review these documents carefully, as they describe your rights

Lindem & Qu              Expires 7 January 2026                 [Page 1]
Internet-Draft            OSPF YANG Augments V1                July 2025

   and restrictions with respect to this document.  Code Components
   extracted from this document must include Revised BSD License text as
   described in Section 4.e of the Trust Legal Provisions and are
   provided without warranty as described in the Revised BSD License.

Table of Contents

   1.  Overview  . . . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Requirements Language . . . . . . . . . . . . . . . . . .   3
   2.  YANG Module for Traffic Engineering Extensions to OSPF  . . .   3
   3.  YANG Module for OSPF Extensions in Support of Inter-Autonomous
           System (AS) MPLS and GMPLS Traffic Engineering  . . . . .  10
   4.  YANG Module for OSPF Two-Part Metric  . . . . . . . . . . . .  21
   5.  YANG Module for OSPF Graceful Link Shutdown . . . . . . . . .  26
   6.  YANG Module for OSPF LLS Extenstion for Local Interface ID
           Advertisement . . . . . . . . . . . . . . . . . . . . . .  31
   7.  YANG Module for OSPF Maximum SID Depth (MSD)  . . . . . . . .  33
   8.  YANG Module for Advertising Layer 2 Bundle Member Link
           Attributes in OSPF  . . . . . . . . . . . . . . . . . . .  39
   9.  YANG Module for OSPF Flexible Algorithms: Bandwidth, Delay,
           Metrics and Constraints . . . . . . . . . . . . . . . . .  48
   10. Security Considerations . . . . . . . . . . . . . . . . . . .  69
   11. IANA Considerations . . . . . . . . . . . . . . . . . . . . .  70
   12. Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  71
   13. Normative References  . . . . . . . . . . . . . . . . . . . .  72
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  74

1.  Overview

   YANG [RFC7950] is a data definition language used to define the
   contents of a conceptual data store that allows networked devices to
   be managed using NETCONF [RFC6241].  YANG is proving relevant beyond
   its initial confines, as bindings to other interfaces (e.g., ReST)
   and encodings other than XML (e.g., JSON) are being defined.
   Furthermore, YANG data models can be used as the basis for
   implementation of other interfaces, such as CLI and programmatic
   APIs.

   This document defines YANG data modules augmenting the IETF OSPF YANG
   model [RFC9129], which itself augments [RFC8349], to provide support
   for configuration and operational state for the following OSPF
   features:

   RFC5329:  Traffic Engineering Extensions to OSPF Version 3 [RFC5329].

   RFC5392:  OSPF Extensions in Support of Inter-Autonomous System (AS)
      MPLS and GMPLS Traffic Engineering [RFC5392].

Lindem & Qu              Expires 7 January 2026                 [Page 2]
Internet-Draft            OSPF YANG Augments V1                July 2025

   RFC8042:  OSPF Two-Part Metric [RFC8042].

   RFC8379:  OSPF Graceful Link Shutdown [RFC8379].

   RFC8476:  Signaling Maximum SID Depth (MSD) Using OSPF[RFC8476].

   RFC8510:  OSPF Link-Local Signaling (LLS) Extensions for Local
      Interface ID Advertisement [RFC8510].

   RFC9356:  Advertising Layer 2 Bundle Member Link Attributes in OSPF
      [RFC9356].

   I-D:ietf-lsr-flex-algo-bw-con:  IGP Flexible Algorithms: Bandwidth,
      Delay, Metrics and Constraints [I-D.ietf-lsr-flex-algo-bw-con].

   The augmentations defined in this document requires support for the
   OSPF base model[RFC9129] which defines basic OSPF configuration and
   state.  The OSPF YANG model augments the ietf-routing YANG model
   defined in [RFC8349].

1.1.  Requirements Language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in [RFC2119].

2.  YANG Module for Traffic Engineering Extensions to OSPF

   This document defines a YANG module for Traffic Engineering
   Extensions to OSPF as defined in [RFC3630] and [RFC5329].  It is an
   augmentation of the OSPF base model.

Lindem & Qu              Expires 7 January 2026                 [Page 3]
Internet-Draft            OSPF YANG Augments V1                July 2025

   module: ietf-ospfv3-te
   augment /rt:routing/rt:control-plane-protocols
           /rt:control-plane-protocol/ospf:ospf/ospf:mpls:
     +--rw traffic-eng
        +--rw enable?   boolean
   augment /rt:routing/rt:control-plane-protocols
           /rt:control-plane-protocol/ospf:ospf/ospf:areas
           /ospf:area/ospf:interfaces/ospf:interface:
     +--rw traffic-eng
          +--rw enable?   boolean
   augment /rt:routing/rt:control-plane-protocols
           /rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area
           /ospf:database/ospf:area-scope-lsa-type/ospf:area-scope-lsas
           /ospf:area-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3
           /ospf:body:
     +--ro ospfv3-intra-area-te
        +--ro router-address-tlv
        |  +--ro router-address?   inet:ipv6-address
        +--ro link-tlv
           +--ro link-type                   ospf:router-link-type
           +--ro local-if-ipv6-addrs
           |  +--ro local-if-ipv6-addr*   inet:ipv6-address
           +--ro remote-if-ipv6-addrs
           |  +--ro remote-if-ipv6-addr*   inet:ipv6-address
           +--ro te-metric?                  uint32
           +--ro max-bandwidth?
           |      rt-types:bandwidth-ieee-float32
           +--ro max-reservable-bandwidth?
           |      rt-types:bandwidth-ieee-float32
           +--ro unreserved-bandwidths
           |  +--ro unreserved-bandwidth*
           |     +--ro priority?               uint8
           |     +--ro unreserved-bandwidth?
           |            rt-types:bandwidth-ieee-float32
           +--ro admin-group?                uint32
           +--ro neighbor-id
           |  +--ro nbr-interface-id    uint32
           |  +--ro nbr-router-id       rt-types:router-id
           +--ro unknown-tlvs
              +--ro unknown-tlv*
                 +--ro type?     uint16
                 +--ro length?   uint16
                 +--ro value?    yang:hex-string

Lindem & Qu              Expires 7 January 2026                 [Page 4]
Internet-Draft            OSPF YANG Augments V1                July 2025

   <CODE BEGINS> file "ietf-ospf-te@2025-02-27.yang"
   module ietf-ospf-te {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-ospf-te";

     prefix ospf-te;

     import ietf-inet-types {
       prefix inet;
       reference
         "RFC 6991: Common YANG Data Types";
     }

     import ietf-routing-types {
       prefix rt-types;
       reference
         "RFC 8294: Common YANG Data Types for the Routing Area";
     }

     import ietf-routing {
       prefix rt;
       reference
         "RFC 8349: A YANG Data Model for Routing
                    Management (NMDA Version)";
     }

     import ietf-ospf {
       prefix ospf;
       reference
         "RFC 9129: YANG Data Model for the OSPF Protocol";
     }

     organization
       "IETF LSR - Link State Routing Working Group";

     contact
        "WG Web:   <https://datatracker.ietf.org/wg/lsr/>
         WG List:  <mailto:lsr@ietf.org>

         Author:   Yingzhen Qu
                   <mailto:yqu@futurewei.com>
         Author:   Acee Lindem
                   <mailto:acee.ietf@gmail.com>";

     description
       "This YANG module defines the configuration and operational
        state for Traffic Engineering (TE) Extensions to OSPF Version 2
        as defined in RFC 3630 and OSPFv3 extensions to support

Lindem & Qu              Expires 7 January 2026                 [Page 5]
Internet-Draft            OSPF YANG Augments V1                July 2025

        intra-area Traffic Engineering (TE) as defined in RFC 5329.

        Copyright (c) 2025 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 Revised 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 XXXX;
        see the RFC itself for full legal notices.";

     reference "RFC XXXX";

     revision 2025-02-27 {
       description
         "Initial version";
       reference
         "RFC XXXX: OSPF YANG Model Augmentations for Additional
                    Features - Version 1";
     }

     identity ospfv3-intra-area-te-lsa {
       base ospf:ospfv3-lsa-type;
       description
         "OSPFv3 Intrea-area TE LSA.";
     }

     grouping ospfv3-intra-area-te {
       description
         "Grouping for OSPFv3 intra-area-te-lsa.";
       container ospfv3-intra-area-te {
         container router-address-tlv {
           description
             "The router IPv6 address tlv advertises a
              reachable IPv6 address.";
           leaf router-address {
             type inet:ipv6-address;
             description
               "Router IPv6 address.";
           }
         }

         container link-tlv {
           description

Lindem & Qu              Expires 7 January 2026                 [Page 6]
Internet-Draft            OSPF YANG Augments V1                July 2025

             "Describes a single link, and it is constructed
              of a set of Sub-TLVs.";
           leaf link-type {
             type ospf:router-link-type;
             mandatory true;
             description
               "Link type.";
           }

           container local-if-ipv6-addrs {
             description
               "All local interface IPv6 addresses.";
             leaf-list local-if-ipv6-addr {
               type inet:ipv6-address;
               description
                 "List of local interface IPv6 addresses.";
             }
           }

           container remote-if-ipv6-addrs {
             description
               "All remote interface IPv6 addresses.";
             leaf-list remote-if-ipv6-addr {
               type inet:ipv6-address;
               description
                 "List of remote interface IPv6 addresses.";
             }
           }

           leaf te-metric {
             type uint32;
             description
               "TE metric.";
           }

           leaf max-bandwidth {
             type rt-types:bandwidth-ieee-float32;
             description
               "Maximum bandwidth.";
           }

           leaf max-reservable-bandwidth {
             type rt-types:bandwidth-ieee-float32;
             description
               "Maximum reservable bandwidth.";
           }

           container unreserved-bandwidths {

Lindem & Qu              Expires 7 January 2026                 [Page 7]
Internet-Draft            OSPF YANG Augments V1                July 2025

             description
               "All unreserved bandwidths.";
             list unreserved-bandwidth {
               leaf priority {
                 type uint8 {
                   range "0 .. 7";
                 }
                 description
                   "Priority from 0 to 7.";
               }
               leaf unreserved-bandwidth {
                 type rt-types:bandwidth-ieee-float32;
                 description
                   "Unreserved bandwidth.";
               }
               description
                 "List of unreserved bandwidths for different
                  priorities.";
             }
           }

           leaf admin-group {
             type uint32;
             description
               "Administrative group/Resource Class/Color.";
           }

           container neighbor-id {
             description
               "Neighbor link identification.";
             leaf nbr-interface-id {
               type uint32;
               mandatory true;
               description
                 "The neighbor's interface ID.";
             }
             leaf nbr-router-id {
               type rt-types:router-id;
               mandatory true;
               description
                 "The neighbor's router ID.";
             }
           }

           uses ospf:unknown-tlvs;
         }

         description

Lindem & Qu              Expires 7 January 2026                 [Page 8]
Internet-Draft            OSPF YANG Augments V1                July 2025

           "OSPFv3 Intra-Area-TE-LSA.";
         reference
           "RFC 5329: Traffic Engineering Extensions to OSPF Version 3";
       }
     }

     /* Configuration */
     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol"
           + "/ospf:ospf/ospf:mpls" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
             + "rt:control-plane-protocol/rt:type, 'ospf:ospf')" {
            description
              "This augments the OSPF routing protocol when used.";
          }
       description
         "This augments OSPF protocol configuration
          with MPLS TE configuration.";
       container traffic-eng {
         description
           "OSPF MPLS TE configuration.";
         leaf enable {
           type boolean;
           default "false";
           description
             "Enables traffic engineering advertisement in OSPF.";
         }
         reference
           "RFC 3630: Traffic Engineering (TE) Extensions to OSPF
                      Version 2
            RFC 5329: Traffic Engineering Extensions to OSPF Version 3";
       }
     }

     augment "/rt:routing/rt:control-plane-protocols/"
           + "rt:control-plane-protocol/ospf:ospf/"
           + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
             + "rt:control-plane-protocol/rt:type, 'ospf:ospf')" {
         description
           "This augments the OSPF routing protocol interface
            configuration.";
       }
       description
         "This augments OSPF interface with MPLS TE configuration.";
       container traffic-eng {
         description
           "OSPF interface MPLS TE configuration.";

Lindem & Qu              Expires 7 January 2026                 [Page 9]
Internet-Draft            OSPF YANG Augments V1                July 2025

         leaf enable {
           type boolean;
           default "false";
           description
             "Enables OSPF MPLS traffic engineering functionality on
              the interface.";
         }
       }
     }

     /* Database */
     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:areas/"
           + "ospf:area/ospf:database/"
           + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
           + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"
           + "ospf:ospfv3/ospf:body" {
       when "../../../../../../../../../"
          + "rt:type = 'ospf:ospfv3'" {
         description
           "This augmentation is only valid for OSPFv3.";
       }
       description
         "OSPFv3 Intra-Area-TE-LSA.";

       uses ospfv3-intra-area-te;
     }
   }
   <CODE ENDS>

3.  YANG Module for OSPF Extensions in Support of Inter-Autonomous
    System (AS) MPLS and GMPLS Traffic Engineering

   This document defines a YANG module for OSPF Extensions in Support of
   Inter-Autonomous System (AS) MPLS and GMPLS Traffic Engineering as
   defined in [RFC5392].

module: ietf-ospf-inter-as-te
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf
          /ospf:mpls/ospf-te:traffic-eng:
    +--rw inter-as-te!
       +--rw flood-as-wide?   boolean
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/ospf:areas
          /ospf:area/ospf:database/ospf:area-scope-lsa-type
          /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version

Lindem & Qu              Expires 7 January 2026                [Page 10]
Internet-Draft            OSPF YANG Augments V1                July 2025

          /ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque:
    +--ro inter-as-te-v2
       +--ro link-tlv
          +--ro link-type                   ospf:router-link-type
          +--ro local-if-ipv4-addrs
          |  +--ro local-if-ipv4-addr*   inet:ipv4-address
          +--ro remote-if-ipv4-addrs
          |  +--ro remote-if-ipv4-addr*   inet:ipv4-address
          +--ro te-metric?                  uint32
          +--ro max-bandwidth?              rt-types:bandwidth-ieee-float32
          +--ro max-reservable-bandwidth?   rt-types:bandwidth-ieee-float32
          +--ro unreserved-bandwidths
          |  +--ro unreserved-bandwidth* []
          |     +--ro priority?               uint8
          |     +--ro unreserved-bandwidth?   rt-types:bandwidth-ieee-float32
          +--ro admin-group?                uint32
          +--ro remote-as-number            uint32
          +--ro ipv4-remote-asbr-id?        inet:ipv4-address
          +--ro ipv6-remote-asbr-id?        inet:ipv6-address
          +--ro unknown-tlvs
             +--ro unknown-tlv* []
                +--ro type?     uint16
                +--ro length?   uint16
                +--ro value?    yang:hex-string
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/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:
    +--ro inter-as-te-v2
       +--ro link-tlv
          +--ro link-type                   ospf:router-link-type
          +--ro local-if-ipv4-addrs
          |  +--ro local-if-ipv4-addr*   inet:ipv4-address
          +--ro remote-if-ipv4-addrs
          |  +--ro remote-if-ipv4-addr*   inet:ipv4-address
          +--ro te-metric?                  uint32
          +--ro max-bandwidth?              rt-types:bandwidth-ieee-float32
          +--ro max-reservable-bandwidth?   rt-types:bandwidth-ieee-float32
          +--ro unreserved-bandwidths
          |  +--ro unreserved-bandwidth* []
          |     +--ro priority?               uint8
          |     +--ro unreserved-bandwidth?   rt-types:bandwidth-ieee-float32
          +--ro admin-group?                uint32
          +--ro remote-as-number            uint32
          +--ro ipv4-remote-asbr-id?        inet:ipv4-address
          +--ro ipv6-remote-asbr-id?        inet:ipv6-address
          +--ro unknown-tlvs

Lindem & Qu              Expires 7 January 2026                [Page 11]
Internet-Draft            OSPF YANG Augments V1                July 2025

             +--ro unknown-tlv* []
                +--ro type?     uint16
                +--ro length?   uint16
                +--ro value?    yang:hex-string
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/ospf:areas
          /ospf:area/ospf:database/ospf:area-scope-lsa-type
          /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version
          /ospf:ospfv3/ospf:ospfv3/ospf:body:
    +--ro inter-as-te-v3
       +--ro link-tlv
          +--ro link-type                   ospf:router-link-type
          +--ro local-if-ipv6-addrs
          |  +--ro local-if-ipv6-addr*   inet:ipv6-address
          +--ro remote-if-ipv6-addrs
          |  +--ro remote-if-ipv6-addr*   inet:ipv6-address
          +--ro te-metric?                  uint32
          +--ro max-bandwidth?             rt-types:bandwidth-ieee-float32
          +--ro max-reservable-bandwidth?  rt-types:bandwidth-ieee-float32
          +--ro unreserved-bandwidths
          |  +--ro unreserved-bandwidth* []
          |     +--ro priority?               uint8
          |     +--ro unreserved-bandwidth?   rt-types:bandwidth-ieee-float32
          +--ro admin-group?                uint32
          +--ro remote-as-number            uint32
          +--ro ipv4-remote-asbr-id?        inet:ipv4-address
          +--ro ipv6-remote-asbr-id?        inet:ipv6-address
          +--ro unknown-tlvs
             +--ro unknown-tlv* []
                +--ro type?     uint16
                +--ro length?   uint16
                +--ro value?    yang:hex-string
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/ospf:database
          /ospf:as-scope-lsa-type/ospf:as-scope-lsas
          /ospf:as-scope-lsa/ospf:version/ospf:ospfv3
          /ospf:ospfv3/ospf:body:
    +--ro inter-as-te-v3
       +--ro link-tlv
          +--ro link-type                   ospf:router-link-type
          +--ro local-if-ipv6-addrs
          |  +--ro local-if-ipv6-addr*   inet:ipv6-address
          +--ro remote-if-ipv6-addrs
          |  +--ro remote-if-ipv6-addr*   inet:ipv6-address
          +--ro te-metric?                  uint32
          +--ro max-bandwidth?              rt-types:bandwidth-ieee-float32
          +--ro max-reservable-bandwidth?   rt-types:bandwidth-ieee-float32
          +--ro unreserved-bandwidths

Lindem & Qu              Expires 7 January 2026                [Page 12]
Internet-Draft            OSPF YANG Augments V1                July 2025

          |  +--ro unreserved-bandwidth* []
          |     +--ro priority?               uint8
          |     +--ro unreserved-bandwidth?   rt-types:bandwidth-ieee-float32
          +--ro admin-group?                uint32
          +--ro remote-as-number            uint32
          +--ro ipv4-remote-asbr-id?        inet:ipv4-address
          +--ro ipv6-remote-asbr-id?        inet:ipv6-address
          +--ro unknown-tlvs
             +--ro unknown-tlv* []
                +--ro type?     uint16
                +--ro length?   uint16
                +--ro value?    yang:hex-string

  <CODE BEGINS> file "ietf-ospf-inter-as-te@2025-02-27.yang"
  module ietf-ospf-inter-as-te {
    yang-version 1.1;
    namespace "urn:ietf:params:xml:ns:yang:ietf-ospf-inter-as-te";

    prefix ospf-inter-as-te;

    import ietf-inet-types {
      prefix inet;
      reference
        "RFC 6991: Common YANG Data Types";
    }

    import ietf-routing-types {
      prefix rt-types;
      reference
        "RFC 8294: Common YANG Data Types for the Routing Area";
    }

    import ietf-routing {
      prefix rt;
      reference
        "RFC 8349: A YANG Data Model for Routing
                   Management (NMDA Version)";
    }

    import ietf-ospf {
      prefix ospf;
      reference
        "RFC 9129: YANG Data Model for the OSPF Protocol";
    }

    import ietf-ospf-te {
      prefix ospf-te;
      reference

Lindem & Qu              Expires 7 January 2026                [Page 13]
Internet-Draft            OSPF YANG Augments V1                July 2025

        "RFC 3630: Traffic Engineering (TE) Extensions to OSPF Version 2
         RFC 5329: Traffic Engineering Extensions to OSPF Version 3";
    }

    organization
      "IETF LSR - Link State Routing Working Group";

    contact
       "WG Web:   <https://datatracker.ietf.org/wg/lsr/>
        WG List:  <mailto:lsr@ietf.org>

        Author:   Yingzhen Qu
                  <mailto:yqu@futurewei.com>
        Author:   Acee Lindem
                  <mailto:acee.ietf@gmail.com>";

    description
      "This YANG module defines the configuration and operational
       state for OSPF Extensions in Support of Inter-Autonomous
       System (AS) MPLS and GMPLS Traffic Engineering as defined
       in RFC 5392.

       Copyright (c) 2025 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 Revised 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 XXXX;
       see the RFC itself for full legal notices.";

    reference "RFC XXXX";

    revision 2025-02-27 {
      description
        "Initial version";
      reference
        "RFC XXXX: OSPF YANG Model Augmentations for Additional
                   Features - Version 1";
    }

    identity ospfv3-intra-area-te-lsa {
      base ospf:ospfv3-lsa-type;
      description

Lindem & Qu              Expires 7 January 2026                [Page 14]
Internet-Draft            OSPF YANG Augments V1                July 2025

        "OSPFv3 Intrea-area TE LSA.";
    }

    grouping inter-as-te-v2-lsa {
      description
        "Grouping for OSPF Inter-AS-TE-2 LSA.";
      container inter-as-te-v2 {
        description
          "The Inter-AS-TE-v2 LSA.";

        container link-tlv {
          description
            "Describes a single link.  It is constructed
             from a set of sub-TLVs.";
          leaf link-type {
            type ospf:router-link-type;
            mandatory true;
            description
              "Link type.";
          }
          container local-if-ipv4-addrs {
            description
              "All local interface IPv4 addresses.";
            leaf-list local-if-ipv4-addr {
              type inet:ipv4-address;
              description
                "List of local interface IPv4 addresses.";
            }
          }
          container remote-if-ipv4-addrs {
            description
              "All remote interface IPv4 addresses.";
            leaf-list remote-if-ipv4-addr {
              type inet:ipv4-address;
              description
                "List of remote interface IPv4 addresses.";
            }
          }
          leaf te-metric {
            type uint32;
            description
              "TE metric.";
          }
          leaf max-bandwidth {
            type rt-types:bandwidth-ieee-float32;
            description
              "Maximum bandwidth.";
          }

Lindem & Qu              Expires 7 January 2026                [Page 15]
Internet-Draft            OSPF YANG Augments V1                July 2025

          leaf max-reservable-bandwidth {
            type rt-types:bandwidth-ieee-float32;
            description
              "Maximum reservable bandwidth.";
          }
          container unreserved-bandwidths {
            description
              "All unreserved bandwidths.";
            list unreserved-bandwidth {
              leaf priority {
                type uint8 {
                  range "0 .. 7";
                }
              description
                "Priority from 0 to 7.";
                 }
              leaf unreserved-bandwidth {
                type rt-types:bandwidth-ieee-float32;
                description
                  "Unreserved bandwidth.";
              }
              description
                "List of unreserved bandwidths for different
                 priorities.";
            }
          }
          leaf admin-group {
            type uint32;
            description
              "Administrative Group / Resource Class/Color.";
          }
          leaf remote-as-number {
            type uint32;
            mandatory true;
            description
              "Remote AS number.";
          }
          leaf ipv4-remote-asbr-id {
            type inet:ipv4-address;
            description
              "The neighboring ASBR IPv4 address.";
          }
          leaf ipv6-remote-asbr-id {
            type inet:ipv6-address;
            description
              "The neighboring ASBR IPv6 address.";
          }
          uses ospf:unknown-tlvs;

Lindem & Qu              Expires 7 January 2026                [Page 16]
Internet-Draft            OSPF YANG Augments V1                July 2025

        }
      }
    }
    grouping inter-as-te-v3 {
      description
        "Grouping for OSPFv3 inter-as-te-v3 lsa.";
      container inter-as-te-v3 {
        container link-tlv {
          description
            "Describes a single link, and it is constructed
             of a set of Sub-TLVs.";
          leaf link-type {
            type ospf:router-link-type;
            mandatory true;
            description
              "Link type.";
          }

          container local-if-ipv6-addrs {
            description
              "All local interface IPv6 addresses.";
            leaf-list local-if-ipv6-addr {
              type inet:ipv6-address;
              description
                "List of local interface IPv6 addresses.";
            }
          }

          container remote-if-ipv6-addrs {
            description
              "All remote interface IPv6 addresses.";
            leaf-list remote-if-ipv6-addr {
              type inet:ipv6-address;
              description
                "List of remote interface IPv6 addresses.";
            }
          }

          leaf te-metric {
            type uint32;
            description
              "TE metric.";
          }

          leaf max-bandwidth {
            type rt-types:bandwidth-ieee-float32;
            description
              "Maximum bandwidth.";

Lindem & Qu              Expires 7 January 2026                [Page 17]
Internet-Draft            OSPF YANG Augments V1                July 2025

          }

          leaf max-reservable-bandwidth {
            type rt-types:bandwidth-ieee-float32;
            description
              "Maximum reservable bandwidth.";
          }

          container unreserved-bandwidths {
            description
              "All unreserved bandwidths.";
            list unreserved-bandwidth {
              leaf priority {
                type uint8 {
                  range "0 .. 7";
                }
                description
                  "Priority from 0 to 7.";
              }
              leaf unreserved-bandwidth {
                type rt-types:bandwidth-ieee-float32;
                description
                  "Unreserved bandwidth.";
              }
              description
                "List of unreserved bandwidths for different
                 priorities.";
            }
          }

          leaf admin-group {
            type uint32;
            description
              "Administrative group/Resource Class/Color.";
          }

          leaf remote-as-number {
            type uint32;
            mandatory true;
            description
              "Remote AS number.";
          }
          leaf ipv4-remote-asbr-id {
            type inet:ipv4-address;
            description
              "The neighboring ASBR IPv4 address.";
          }
          leaf ipv6-remote-asbr-id {

Lindem & Qu              Expires 7 January 2026                [Page 18]
Internet-Draft            OSPF YANG Augments V1                July 2025

            type inet:ipv6-address;
            description
              "The neighboring ASBR IPv6 address.";
          }
          uses ospf:unknown-tlvs;
        }

        description
          "OSPFv3 Inter-AS-TE-v3 LSA.";
        reference
          "RFC 5392: TOSPF Extensions in Support of Inter-Autonomous
           System (AS) MPLS and GMPLS Traffic Engineering";
      }
    }

    /* Configuration */
    augment "/rt:routing/"
          + "rt:control-plane-protocols/rt:control-plane-protocol/"
          + "ospf:ospf/ospf:mpls/ospf-te:traffic-eng" {
      when "derived-from(/rt:routing/rt:control-plane-protocols/"
            + "rt:control-plane-protocol/rt:type, 'ospf:ospf')" {
        description
          "This augment OSPF routing protocol when used";
      }
      description
        "This augments OSPF protocol traffic engineering configuration
         with Inter-AS-TE configuration.";
      container inter-as-te {
        presence "Enable Inter-AS-TE";
        description
          "OSPFv3 MPLS TE configuration.";
        leaf flood-as-wide {
          type boolean;
          default "false";
          description
            "Enables as-scoped traffic engineering advertisement. By
             default, the inter-as TE link advertisement is limited to
             within the single area.";
        }
        reference
          "RFC 5392: OSPF Extensions in Support of Inter-Autonomous
                     System (AS) MPLS and GMPLS Traffic Engineering";
      }
    }

    /* Database */
    augment "/rt:routing/"
          + "rt:control-plane-protocols/rt:control-plane-protocol/"

Lindem & Qu              Expires 7 January 2026                [Page 19]
Internet-Draft            OSPF YANG Augments V1                July 2025

          + "ospf:ospf/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 "derived-from(/rt:routing/rt:control-plane-protocols/"
           + "rt:control-plane-protocol/rt:type, 'ospf:ospfv2')" {
        description
          "This augments OSPFv2 routing protocol when used";
           }
        description
          "OSPFv2 type 10 Opaque LSA.";
        uses inter-as-te-v2-lsa;
      }

    augment "/rt:routing/"
          + "rt:control-plane-protocols/rt:control-plane-protocol/"
          + "ospf:ospf/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 "derived-from(/rt:routing/rt:control-plane-protocols/"
           + "rt:control-plane-protocol/rt:type, 'ospf:ospfv2')" {
        description
          "This augments OSPFv2 routing protocol when used";
           }
        description
          "OSPFv2 type 11 Opaque LSA.";
        uses inter-as-te-v2-lsa;
      }

    augment "/rt:routing/"
          + "rt:control-plane-protocols/rt:control-plane-protocol/"
          + "ospf:ospf/ospf:areas/"
          + "ospf:area/ospf:database/"
          + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
          + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"
          + "ospf:ospfv3/ospf:body" {
      when "derived-from(/rt:routing/rt:control-plane-protocols/"
           + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
        description
          "This augmentation is only valid for OSPFv3.";
      }
      description
        "OSPFv3 Intra-Area-TE-LSA.";

      uses inter-as-te-v3;
    }

Lindem & Qu              Expires 7 January 2026                [Page 20]
Internet-Draft            OSPF YANG Augments V1                July 2025

    augment "/rt:routing/"
          + "rt:control-plane-protocols/rt:control-plane-protocol/"
          + "ospf:ospf/ospf:database/"
          + "ospf:as-scope-lsa-type/ospf:as-scope-lsas/"
          + "ospf:as-scope-lsa/ospf:version/ospf:ospfv3/"
          + "ospf:ospfv3/ospf:body" {
      when "derived-from(/rt:routing/rt:control-plane-protocols/"
           + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
        description
          "This augmentation is only valid for OSPFv3.";
      }
      description
        "OSPFv3 Intra-Area-TE-LSA.";

      uses inter-as-te-v3;
    }
  }

4.  YANG Module for OSPF Two-Part Metric

   This document defines a YANG module for OSPF Two-Part Metric feature
   as defined in [RFC8042].  It is an augmentation of the OSPF base
   model.

Lindem & Qu              Expires 7 January 2026                [Page 21]
Internet-Draft            OSPF YANG Augments V1                July 2025

   module: ietf-ospf-two-part-metric
   augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area
          /ospf:interfaces/ospf:interface:
    +--rw two-part-metric
       +--rw enable?           boolean
       +--rw int-input-cost?   ospf:ospf-link-metric
   augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/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-opaque
          /ospf:extended-link-tlv:
    +--ro network-to-router-metric-sub-tlvs
       +--ro net-to-rtr-sub-tlv*
          +--ro mt-id?       uint8
          +--ro mt-metric?   uint16
   augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/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:te-opaque/ospf:link-tlv:
    +--ro network-to-router-te-metric?   uint32
   augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area
          /ospf:database/ospf:area-scope-lsa-type/ospf:area-scope-lsas
          /ospf:area-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3
          /ospf:body/ospfv3-te:ospfv3-intra-area-te/ospfv3-te:link-tlv:
    +--ro network-to-router-te-metric?   uint32

   <CODE BEGINS> file "ietf-ospf-two-part-metric@2023-06-27.yang"
   module ietf-ospf-two-part-metric {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-ospf-two-part-metric";

     prefix ospf-two-metric;

     import ietf-routing {
       prefix "rt";
       reference "RFC 8349: A YANG Data Model for Routing
                  Management (NMDA Version)";
     }

     import ietf-ospf {
       prefix "ospf";
       reference "RFC 9129 - YANG Data Model for the OSPF
                  Protocol";
     }

Lindem & Qu              Expires 7 January 2026                [Page 22]
Internet-Draft            OSPF YANG Augments V1                July 2025

     import ietf-ospfv3-te {
       prefix "ospfv3-te";
     }

     organization
       "IETF LSR - Link State Routing Working Group";

     contact
        "WG Web:   <https://datatracker.ietf.org/wg/lsr/>
         WG List:  <mailto:lsr@ietf.org>

         Author:   Yingzhen Qu
                   <mailto:yqu@futurewei.com>
         Author:   Acee Lindem
                   <mailto:acee.ietf@gmail.com>";

     description
       "This YANG module defines the configuration and operational
       state for OSPF Two-Part Metric feature as defined in RFC 8042.

        Copyright (c) 2023 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 Revised 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 XXXX;
        see the RFC itself for full legal notices.";

     reference "RFC XXXX";

     revision 2023-06-27 {
       description
         "Initial version";
       reference
         "RFC XXXX: A YANG Data Model for OSPF Two-Part Metric.";
     }

     identity two-part-metric {
       base ospf:informational-capability;
       description
         "When set, the router is capable of supporting OSPF
          two-part metrics.";
       reference

Lindem & Qu              Expires 7 January 2026                [Page 23]
Internet-Draft            OSPF YANG Augments V1                July 2025

         "RFC 8042: OSPF Two-Part Metric";
     }

     /* RFC 8042 */
     augment "/rt:routing/rt:control-plane-protocols/"
           + "rt:control-plane-protocol/ospf:ospf/"
           + "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 two-part metric.";

       container two-part-metric {
         when "enum-value(../ospf:interface-type) = 2" {
           description
             "Two-part metric when link type is multi-access.";
         }
         leaf enable {
           type boolean;
           default false;
           description
             "Enable two-part metric.";
         }
         leaf int-input-cost {
           type ospf:ospf-link-metric;
           description
             "Link state metric from the two-part-metric network
              to this router.";
         }
         description
           "Interface two part metric configuration.";
       }
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/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-opaque/ospf:extended-link-tlv" {
       when "../../../../../../../../../../../../"

Lindem & Qu              Expires 7 January 2026                [Page 24]
Internet-Draft            OSPF YANG Augments V1                July 2025

          + "rt:type = 'ospf:ospfv2'" {
         description
           "This augmentation is only valid for OSPFv2.";
       }
       description
         "Network-to-Router metric sub tlv for OSPFv2 extended link TLV
          in type 10 opaque LSA.";

          container network-to-router-metric-sub-tlvs {
            description "Network-to-Router metric sub TLV.";
            list net-to-rtr-sub-tlv {
              leaf mt-id {
                type uint8;
                description "Multi-Topology Identifier (MT-ID).";
              }
              leaf mt-metric {
                type uint16;
                description "Network-to-router metric.";
              }
              description
                "Network-to-Router metric sub-TLV.";
            }
          }
       }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/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:te-opaque/"
           + "ospf:link-tlv" {
       when "../../../../../../../../../../../../"
          + "rt:type = 'ospf:ospfv2'" {
         description
           "This augmentation is only valid for OSPFv2.";
       }
       description
         "Traffic Engineering Network-to-Router Sub-TLV.";
         leaf network-to-router-te-metric {
           type uint32;
           description "Network to Router TE metric.";
           reference
             "RFC 8042 - OSPF Two-Part Metric";
         }
     }

Lindem & Qu              Expires 7 January 2026                [Page 25]
Internet-Draft            OSPF YANG Augments V1                July 2025

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:areas/"
           + "ospf:area/ospf:database/"
           + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
           + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"
           + "ospf:ospfv3/ospf:body/ospfv3-te:ospfv3-intra-area-te/"
           + "ospfv3-te:link-tlv" {
       when "../../../../../../../../../../../"
          + "rt:type = 'ospf:ospfv3'" {
         description
           "This augmentation is only valid for OSPFv3.";
       }
       description
         "Traffic Engineering Network-to-Router Sub-TLV.";
         leaf network-to-router-te-metric {
           type uint32;
           description "Network to Router TE metric.";
           reference
             "RFC 8042 - OSPF Two-Part Metric";
         }
     }
   }
   <CODE ENDS>

5.  YANG Module for OSPF Graceful Link Shutdown

   This document defines a YANG module for OSPF Graceful Link Shutdown
   feature as defined in [RFC8379].  It is an augmentation of the OSPF
   base model.

Lindem & Qu              Expires 7 January 2026                [Page 26]
Internet-Draft            OSPF YANG Augments V1                July 2025

   module: ietf-ospf-graceful-link-shutdown
   augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area
          /ospf:interfaces/ospf:interface:
    +--rw graceful-link-shutdown
       +--rw enable?   boolean
   augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/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-opaque
          /ospf:extended-link-tlv:
    +--ro graceful-link-shutdown-sub-tlv!
    +--ro remote-address-sub-tlv
    |  +--ro remote-address?   inet:ipv4-address
    +--ro local-remote-int-id-sub-tlv
       +--ro local-int-id?    uint32
       +--ro remote-int-id?   uint32
   augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area
          /ospf:database/ospf:area-scope-lsa-type/ospf:area-scope-lsas
          /ospf:area-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3
          /ospf:body/ospfv3-e-lsa:e-router/ospfv3-e-lsa:e-router-tlvs
          /ospfv3-e-lsa:link-tlv:
    +--ro graceful-link-shutdown-sub-tlv!

   <CODE BEGINS> file "ietf-ospf-graceful-link-shutdown@2024-07-01.yang"
   module ietf-ospf-graceful-link-shutdown {
     yang-version 1.1;
     namespace
       "urn:ietf:params:xml:ns:yang:ietf-ospf-graceful-link-shutdown";

     prefix ospf-grace-linkdown;

     import ietf-inet-types {
       prefix "inet";
       reference "RFC 6991: Common YANG Data Types";
     }

     import ietf-routing {
       prefix "rt";
       reference "RFC 8349: A YANG Data Model for Routing
                  Management (NMDA Version)";
     }

     import ietf-ospf {
       prefix "ospf";

Lindem & Qu              Expires 7 January 2026                [Page 27]
Internet-Draft            OSPF YANG Augments V1                July 2025

       reference "RFC 9129 - YANG Data Model for the OSPF
                  Protocol";
     }

     import ietf-ospfv3-extended-lsa {
       prefix "ospfv3-e-lsa";
       reference "RFC 9587: YANG Data Model for OSPFv3 Extended Link
                  State Advertisements (LSAs)";
     }

     organization
       "IETF LSR - Link State Routing Working Group";

     contact
        "WG Web:   <https://datatracker.ietf.org/wg/lsr/>
         WG List:  <mailto:lsr@ietf.org>

         Author:   Yingzhen Qu
                   <mailto:yingzhen.ietf@gmail.com>
         Author:   Acee Lindem
                   <mailto:acee.ietf@gmail.com>";

     description
       "This YANG module defines the configuration and operational
        state for OSPF Graceful Link Shutdown feature as defined
        in RFC 8379.

        This YANG model conforms to the Network Management
        Datastore Architecture (NDMA) as described in RFC 8342.

        Copyright (c) 2024 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 Revised 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 XXXX;
        see the RFC itself for full legal notices.";

     reference "RFC XXXX";

     revision 2024-07-01 {
       description
         "Initial version";

Lindem & Qu              Expires 7 January 2026                [Page 28]
Internet-Draft            OSPF YANG Augments V1                July 2025

       reference
         "RFC XXXX: OSPF YANG Model Augmentations for Additional
                    Features - Version 1.";
     }

     /* RFC 8379 */
     augment "/rt:routing/rt:control-plane-protocols/"
           + "rt:control-plane-protocol/ospf:ospf/"
           + "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.";

       container graceful-link-shutdown {
         leaf enable {
           type boolean;
           default false;
           description
             "Enable OSPF graceful link shutdown.";
         }
         description
           "OSPF Graceful Link Shutdown.";
       }
     }

     /* Database */
     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/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-opaque/ospf:extended-link-tlv" {
       when "../../../../../../../../../../../../"
          + "rt:type = 'ospf:ospfv2'" {
         description
           "This augmentation is only valid for OSPFv2.";
       }
       description

Lindem & Qu              Expires 7 January 2026                [Page 29]
Internet-Draft            OSPF YANG Augments V1                July 2025

         "OSPF graceful link shutdown for OSPFv2 extended link TLV
          in type 10 opaque LSA.";

       container graceful-link-shutdown-sub-tlv {
         presence "Enable graceful link shutdown";
         description
           "Graceful-Link-Shutdown sub-TLV identifies the link as being
            gracefully shutdown.";
       }

       container remote-address-sub-tlv {
         leaf remote-address {
            type inet:ipv4-address;
            description
              "Remote IPv4 address used to identify a particular link
               on the remote side.";
         }
         description
           "This sub-TLV specifies the IPv4 address of the remote
            endpoint on the link.";
       }

       container local-remote-int-id-sub-tlv {
         leaf local-int-id {
            type uint32;
            description "Local interface ID.";
         }
         leaf remote-int-id {
            type uint32;
            description "Remote interface ID.";
         }
         description
           "This sub-TLV specifies Local and Remote Interface IDs.";
       }
     }

     augment "/rt:routing/"
          + "rt:control-plane-protocols/rt:control-plane-protocol/"
          + "ospf:ospf/ospf:areas/ospf:area/ospf:database/"
          + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
          + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"
          + "ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-router"
          + "/ospfv3-e-lsa:e-router-tlvs/ospfv3-e-lsa:link-tlv" {
          when "'ospf:../../../../../../../../../"
            + "rt:type' = 'ospf:ospfv3'" {
            description
              "This augmentation is only valid for OSPFv3
               E-Router LSAs";

Lindem & Qu              Expires 7 January 2026                [Page 30]
Internet-Draft            OSPF YANG Augments V1                July 2025

          }
       container graceful-link-shutdown-sub-tlv {
         presence "Enable graceful link shutdown";
         description
           "Graceful-Link-Shutdown sub-TLV identifies the link as being
            gracefully shutdown.";
       }
       description
         "Augment OSPFv3 Area scope router-link TLV.";
     }
   }
   <CODE ENDS>

6.  YANG Module for OSPF LLS Extenstion for Local Interface ID
    Advertisement

   This document defines a YANG module for OSPF Link-Local Signaling
   (LLS) Extensions for Local Interface ID Advertisement feature as
   defined in [RFC8510].  It is an augmentation of the OSPF base model.

   module: ietf-ospf-lls-local-id
     augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf:
       +--rw lls-int-id
          +--rw enable?   boolean

   <CODE BEGINS> file "ietf-ospf-lls-local-id@2024-07-01.yang"
   module ietf-ospf-lls-local-id {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-ospf-lls-local-id";

     prefix ospf-lls-localid;

     import ietf-routing {
       prefix "rt";
       reference "RFC 8349: A YANG Data Model for Routing
                  Management (NMDA Version)";
     }

     import ietf-ospf {
       prefix "ospf";
       reference "RFC 9129: YANG Data Model for the OSPF
                  Protocol";
     }

     organization
       "IETF LSR - Link State Routing Working Group";

Lindem & Qu              Expires 7 January 2026                [Page 31]
Internet-Draft            OSPF YANG Augments V1                July 2025

     contact
        "WG Web:   <https://datatracker.ietf.org/wg/lsr/>
         WG List:  <mailto:lsr@ietf.org>

         Author:   Yingzhen Qu
                   <mailto:yingzhen.ietf@gmail.com>
         Author:   Acee Lindem
                   <mailto:acee.ietf@gmail.com>";

     description
       "This YANG module defines the configuration and operational
       state for OSPF Link-Local Signaling (LLS) Extensions for Local
       Interface ID Advertisement feature as defined in RFC 8510.

        Copyright (c) 2024 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 Revised 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 XXXX;
        see the RFC itself for full legal notices.";

     revision 2024-07-01 {
       description
         "Initial version";
       reference
         "RFC XXXX: OSPF YANG Model Augmentations for Additional
                    Features - Version 1.";
     }

     augment "/rt:routing/rt:control-plane-protocols"
           + "/rt:control-plane-protocol/ospf:ospf" {
       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
          to support LLS extesnions for interfacde ID as
          defined in RFC 8510.";
       container lls-int-id {
         leaf enable {

Lindem & Qu              Expires 7 January 2026                [Page 32]
Internet-Draft            OSPF YANG Augments V1                July 2025

           type boolean;
           default false;
           description
             "Enable LLS to advertise local interface ID.";
         }
         description
           "OSPF LLS Extensions for interface ID.";
       }
     }
   }
   <CODE ENDS>

7.  YANG Module for OSPF Maximum SID Depth (MSD)

   This document defines a model for Signaling Maximum SID Depth (MSD)
   Using OSPF [RFC8476].  It is an augmentation of the OSPF base model.

   module: ietf-ospf-msd
   augment /rt:routing/rt:control-plane-protocols
           /rt:control-plane-protocol/ospf:ospf/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:ri-opaque:
     +--ro node-msd-tlv
        +--ro node-msds* [msd-type]
           +--ro msd-type     identityref
           +--ro msd-value?   uint8
   augment /rt:routing/rt:control-plane-protocols
           /rt:control-plane-protocol/ospf:ospf/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:ri-opaque:
     +--ro node-msd-tlv
        +--ro node-msds* [msd-type]
           +--ro msd-type     identityref
           +--ro msd-value?   uint8
   augment /rt:routing/rt:control-plane-protocols
           /rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area
           /ospf:database/ospf:area-scope-lsa-type/ospf:area-scope-lsas
           /ospf:area-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3
           /ospf:body/ospf:router-information:
     +--ro node-msd-tlv
        +--ro node-msds* [msd-type]
           +--ro msd-type     identityref
           +--ro msd-value?   uint8
   augment /rt:routing/rt:control-plane-protocols
           /rt:control-plane-protocol/ospf:ospf/ospf:database
           /ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa

Lindem & Qu              Expires 7 January 2026                [Page 33]
Internet-Draft            OSPF YANG Augments V1                July 2025

           /ospf:version/ospf:ospfv3/ospf:ospfv3/ospf:body
           /ospf:router-information:
     +--ro node-msd-tlv
        +--ro node-msds* [msd-type]
           +--ro msd-type     identityref
           +--ro msd-value?   uint8
   augment /rt:routing/rt:control-plane-protocols
           /rt:control-plane-protocol/ospf:ospf/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-opaque
           /ospf:extended-link-tlv:
     +--ro link-msd-sub-tlv
        +--ro link-msds* [msd-type]
           +--ro msd-type     identityref
           +--ro msd-value?   uint8
   augment /rt:routing/rt:control-plane-protocols
           /rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area
           /ospf:database/ospf:area-scope-lsa-type/ospf:area-scope-lsas
           /ospf:area-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3
           /ospf:body/ospfv3-e-lsa:e-router/ospfv3-e-lsa:e-router-tlvs
           /ospfv3-e-lsa:link-tlv::
     +--ro link-msd-sub-tlv
        +--ro link-msds* [msd-type]
           +--ro msd-type     identityref
           +--ro msd-value?   uint8

   <CODE BEGINS> file "ietf-ospf-msd@2025-03-01.yang"
   module ietf-ospf-msd {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-ospf-msd";
     prefix ospf-msd;

     import ietf-routing {
       prefix rt;
       reference "RFC 8349: A YANG Data Model for Routing
                  Management (NMDA Version)";
     }

     import ietf-ospf {
       prefix ospf;
       reference "RFC 9129: YANG Data Model for the OSPF
                  Protocol";
     }

     import ietf-ospfv3-extended-lsa {
       prefix ospfv3-e-lsa;
       reference "RFC 9587: YANG Data Model for OSPFv3 Extended Link

Lindem & Qu              Expires 7 January 2026                [Page 34]
Internet-Draft            OSPF YANG Augments V1                July 2025

                  State Advertisements (LSAs)";
     }

     import iana-msd-types {
       prefix iana-msd-types;
     }

     organization
       "IETF LSR - LSR Working Group";
     contact
       "WG Web:   <https://datatracker.ietf.org/wg/lsr/>
        WG List:  <mailto:lsr@ietf.org>

        Author:    Yingzhen Qu
                  <mailto:yingzhen.ietf@gmail.com>
        Author:    Acee Lindem
                  <mailto:acee.ietf@gmail.com>
        Author:    Stephane Litkowski
                  <mailto:slitkows.ietf@gmail.com>
        Author:    Jeff Tantsura
                  <jefftant.ietf@gmail.com>

       ";
     description
       "The YANG module augments the base OSPF model to
        manage different types of MSDs.

        This YANG model conforms to the Network Management
        Datastore Architecture (NMDA) as described in RFC 8342.

        Copyright (c) 2025 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 Revised 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 XXXX;
        see the RFC itself for full legal notices.

        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.";

Lindem & Qu              Expires 7 January 2026                [Page 35]
Internet-Draft            OSPF YANG Augments V1                July 2025

     reference "RFC XXXX: YANG Data Model for OSPF MSD.";

     revision 2025-03-01 {
       description
         "Initial Version";
       reference
         "RFC XXXX: OSPF YANG Model Augmentations for Additional
                    Features - Version 1.";
     }

     grouping node-msd-tlv {
       description
         "Grouping for node MSD.";
       container node-msd-tlv {
         list node-msds {
           key "msd-type";
           leaf msd-type {
             type identityref {
             base iana-msd-types:msd-base-mpls;
             }
             description
               "MSD-Types";
           }
           leaf msd-value {
             type uint8;
             description
               "MSD value, in the range of 0-255.";
           }
           description
             "Node MSD is the smallest link MSD supported by
              the node.";
         }
         description
           "Node MSD is the number of SIDs supported by a node.";
         reference
           "RFC 8476: Signaling Maximum SID Depth (MSD) Using OSPF";
       }
     }

     grouping link-msd-sub-tlv {
       description
         "Link Maximum SID Depth (MSD) grouping for an interface.";
       container link-msd-sub-tlv {
         list link-msds {
           key "msd-type";
           leaf msd-type {
             type identityref {
               base iana-msd-types:msd-base-mpls;

Lindem & Qu              Expires 7 January 2026                [Page 36]
Internet-Draft            OSPF YANG Augments V1                July 2025

             }
             description
               "MSD-Types";
           }
           leaf msd-value {
             type uint8;
             description
               "MSD value, in the range of 0-255.";
           }
           description
             "List of link MSDs";
         }
         description
           "Link MSD sub-tlvs.";
       }
     }

     /* Node MSD TLV */
     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/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:ri-opaque" {
       when "../../../../../../../../../../../"
          + "rt:type = 'ospf:ospfv2'" {
         description
           "This augmentation is only valid for OSPFv2.";
       }
       description
         "Node MSD TLV is an optional TLV of OSPFv2 RI Opaque
          LSA (RFC7770) and has a type of 12.";

       uses node-msd-tlv;
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/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:ri-opaque" {
       when "../../../../../../../../../"
          + "rt:type = 'ospf:ospfv2'" {
         description

Lindem & Qu              Expires 7 January 2026                [Page 37]
Internet-Draft            OSPF YANG Augments V1                July 2025

           "This augmentation is only valid for OSPFv2.";
       }
       description
         "Node MSD TLV is an optional TLV of OSPFv2 RI Opaque
          LSA (RFC7770) and has a type of 12.";

       uses node-msd-tlv;
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:areas/"
           + "ospf:area/ospf:database/"
           + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
           + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"
           + "ospf:ospfv3/ospf:body/ospf:router-information" {
       when "../../../../../../../../../../"
          + "rt:type = 'ospf:ospfv3'" {
         description
           "This augmentation is only valid for OSPFv3.";
       }
       description
         "Node MSD TLV is an optional TLV of OSPFv3 RI Opaque
          LSA (RFC7770) and has a type of 12.";

       uses node-msd-tlv;
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:database/"
           + "ospf:as-scope-lsa-type/ospf:as-scope-lsas/"
           + "ospf:as-scope-lsa/ospf:version/ospf:ospfv3/"
           + "ospf:ospfv3/ospf:body/ospf:router-information" {
       when "../../../../../../../../"
          + "rt:type = 'ospf:ospfv3'" {
         description
           "This augmentation is only valid for OSPFv3.";
       }
       description
         "Node MSD TLV is an optional TLV of OSPFv3 RI Opaque
          LSA (RFC7770) and has a type of 12.";

       uses node-msd-tlv;
     }

     /* link MSD sub-tlv */
     augment "/rt:routing/"

Lindem & Qu              Expires 7 January 2026                [Page 38]
Internet-Draft            OSPF YANG Augments V1                July 2025

           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/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-opaque/ospf:extended-link-tlv" {
       when "../../../../../../../../../../../../"
          + "rt:type = 'ospf:ospfv2'" {
         description
           "This augmentation is only valid for OSPFv2.";
       }
       description
         "Link MSD sub-TLV is an optional sub-TLV of OSPFv2 extended
          link TLV as defined in RFC 7684 and has a type of 6.";

       uses link-msd-sub-tlv;
     }

     augment "/rt:routing/"
          + "rt:control-plane-protocols/rt:control-plane-protocol/"
          + "ospf:ospf/ospf:areas/ospf:area/ospf:database/"
          + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
          + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"
          + "ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-router/"
          + "ospfv3-e-lsa:e-router-tlvs/ospfv3-e-lsa:link-tlv" {
          when "'ospf:../../../../../../../../"
            + "rt:type' = 'ospf:ospfv3'" {
            description
              "This augmentation is only valid for OSPFv3
               E-Router LSAs";
          }
       description
         "Augment OSPFv3 Area scope router-link TLV.";

       uses link-msd-sub-tlv;
     }
   }
   <CODE ENDS>

8.  YANG Module for Advertising Layer 2 Bundle Member Link Attributes in
    OSPF

   This document defines a YANG Moduel for Advertising Layer 2 Bundle
   Member Link Attributes in OSPF as defined in [RFC9356].

Lindem & Qu              Expires 7 January 2026                [Page 39]
Internet-Draft            OSPF YANG Augments V1                July 2025

   module: ietf-ospf-l2-bundle
     augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:areas
             /ospf:area/ospf:interfaces/ospf:interface:
       +--rw l2-mbr-attrs
          +--rw l2-mbr-attr* [l2-bdl-mbr-dscpr]
             +--rw l2-bdl-mbr-dscpr    uint32
             +--rw adj-sid?            uint32
             +--rw lan-adj-sid?        uint32
     augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/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-opaque/ospf:extended-link-tlv:
       +--ro l2-bdl-mbr-attr
          +--ro l2-bdl-mbrs* []
             +--ro l2-bdl-mbr-dscpr?                  uint32
             +--ro adj-sid-sub-tlvs
             |  +--ro adj-sid-sub-tlv* []
             |     +--ro adj-sid-flags
             |     |  +--ro flags*   identityref
             |     +--ro mt-id?           uint8
             |     +--ro weight?          uint8
             |     +--ro sid?             uint32
             +--ro lan-adj-sid-sub-tlv
             |  +--ro lan-adj-sid-sub-tlv* []
             |     +--ro lan-adj-sid-flags
             |     |  +--ro flags*   identityref
             |     +--ro mt-id?                uint8
             |     +--ro weight?               uint8
             |     +--ro neighbor-router-id?   rt-types:router-id
             |     +--ro sid?                  uint32
             +--ro app-specific-link-attr-sub-tlvs
                +--ro asla-sub-tlvs* []
                   +--ro sabm-length?                    uint8
                   +--ro udabm-length?                   uint8
                   +--ro sabm
                   |  +--ro sabm-bits*   identityref
                   +--ro udabm
                   +--ro link-attributes-sub-sub-tlvs
                      +--ro unknown-tlvs
                         +--ro unknown-tlv* []
                            +--ro type?     uint16
                            +--ro length?   uint16
                            +--ro value?    yang:hex-string
     augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:areas

Lindem & Qu              Expires 7 January 2026                [Page 40]
Internet-Draft            OSPF YANG Augments V1                July 2025

             /ospf:area/ospf:database/ospf:area-scope-lsa-type
             /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version
             /ospf:ospfv3/ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-router
             /ospfv3-e-lsa:e-router-tlvs/ospfv3-e-lsa:link-tlv:
       +--ro l2-bdl-mbr-attr
          +--ro l2-bdl-mbrs* []
             +--ro l2-bdl-mbr-dscpr?                  uint32
             +--ro adj-sid-sub-tlvs
             |  +--ro adj-sid-sub-tlv* []
             |     +--ro adj-sid-flags
             |     |  +--ro flags*   identityref
             |     +--ro weight?          uint8
             |     +--ro sid?             uint32
             +--ro lan-adj-sid-sub-tlvs
             |  +--ro lan-adj-sid-sub-tlv* []
             |     +--ro lan-adj-sid-flags
             |     |  +--ro flags*   identityref
             |     +--ro weight?               uint8
             |     +--ro neighbor-router-id?   rt-types:router-id
             |     +--ro sid?                  uint32
             +--ro app-specific-link-attr-sub-tlvs
                +--ro asla-sub-tlvs* []
                   +--ro sabm-length?                    uint8
                   +--ro udabm-length?                   uint8
                   +--ro sabm
                   |  +--ro sabm-bits*   identityref
                   +--ro udabm
                   +--ro link-attributes-sub-sub-tlvs
                      +--ro unknown-tlvs
                         +--ro unknown-tlv* []
                            +--ro type?     uint16
                            +--ro length?   uint16
                            +--ro value?    yang:hex-string

   <CODE BEGINS> file "ietf-ospf-l2-bundle@2025-02-27.yang"
   module ietf-ospf-l2-bundle {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-ospf-l2-bundle";

     prefix ospf-l2-bundle;

     import ietf-routing-types {
       prefix rt-types;
       reference
         "RFC 8294: Common YANG Data Types for the Routing Area";
     }

Lindem & Qu              Expires 7 January 2026                [Page 41]
Internet-Draft            OSPF YANG Augments V1                July 2025

     import ietf-routing {
       prefix rt;
       reference
         "RFC 8349: A YANG Data Model for Routing
                    Management (NMDA Version)";
     }

     import ietf-ospf {
       prefix ospf;
       reference
         "RFC 9129: YANG Data Model for the OSPF Protocol";
     }

     import ietf-ospf-link-attr {
       prefix ospf-link-attr;
     }

     import ietf-ospfv3-extended-lsa {
       prefix ospfv3-e-lsa;
       reference
         "RFC 9587 - YANG Data Model for OSPFv3 Extended LSAs";
     }

     import ietf-ospf-sr-mpls {
       prefix ospf-sr-mpls;
     }

     organization
       "IETF LSR - Link State Routing Working Group";

     contact
        "WG Web:   <https://datatracker.ietf.org/wg/lsr/>
         WG List:  <mailto:lsr@ietf.org>

         Author:   Yingzhen Qu
                   <mailto:yqu@futurewei.com>
         Author:   Acee Lindem
                   <mailto:acee.ietf@gmail.com>";

     description
       "This YANG module defines the configuration and operational
        state for Advertising Layer 2 Bundle Member Link Attributes
        in OSPF as defined in RFC 9356.

        Copyright (c) 2025 IETF Trust and the persons identified as
        authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or

Lindem & Qu              Expires 7 January 2026                [Page 42]
Internet-Draft            OSPF YANG Augments V1                July 2025

        without modification, is permitted pursuant to, and subject to
        the license terms contained in, the Revised 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 XXXX;
        see the RFC itself for full legal notices.";

     reference "RFC XXXX";

     revision 2025-02-27 {
       description
         "Initial version";
       reference
         "RFC XXXX: OSPF YANG Model Augmentations for Additional
                    Features - Version 1";
     }

     /* Groupings */
     grouping ospfv2-member-link-attr-sub-tlvs {
       description
         "OSPFv2 L2 Bundle Member Attributes sub-TLV (RFC 9356).";

       container adj-sid-sub-tlvs {
         list adj-sid-sub-tlv {
           description
             "List of adj-sid sub-tlvs.";
           container adj-sid-flags {
             leaf-list flags {
               type identityref {
                 base ospf-sr-mpls:adj-sid-flag;
               }
             description
               "Adj-SID sub-TLV flags.";
             }
             description
               "Adj-sid sub-TLV flags.";
           }
           leaf mt-id {
             type uint8;
             description
               "Multi-topology ID. Topologies range from 0-127 and
                return of any other value would indicate an error.";
             reference
               "RFC 4915 - Multi-Topology (MT) Routing in OSPF";
           }
           leaf weight {

Lindem & Qu              Expires 7 January 2026                [Page 43]
Internet-Draft            OSPF YANG Augments V1                July 2025

             type uint8;
             description
               "Weight used for load-balancing.";
           }
           leaf sid {
             type uint32;
             description
               "Segment Identifier (SID) - A 20 bit label or
                an index into the SID/Label space.";
           }
         }
         description
           "Adjacency SID sub-tlvs.";
       }
       container lan-adj-sid-sub-tlv {
         description
           "LAN Adj-SID optional sub-TLVs.";
         list lan-adj-sid-sub-tlv {
           description
             "List of LAN Adj-SID sub-TLVs.";
           container lan-adj-sid-flags {
             leaf-list flags {
               type identityref {
                 base ospf-sr-mpls:adj-sid-flag;
               }
               description
                 "LAN Adj-SID sub-TLV flags.";
             }
             description
               "LAN Adj-SID sub-TLV flags.";
           }
           leaf mt-id {
             type uint8;
             description
               "Multi-topology ID. Topologies range from 0-127 and
                return of any other value would indicate an error.";
             reference
               "RFC 4915 - Multi-Topology (MT) Routing in OSPF";
           }
           leaf weight {
             type uint8;
             description
               "Weight used for load-balancing.";
           }
           leaf neighbor-router-id {
             type rt-types:router-id;
             description
               "Neighbor router ID.";

Lindem & Qu              Expires 7 January 2026                [Page 44]
Internet-Draft            OSPF YANG Augments V1                July 2025

           }
           leaf sid {
             type uint32;
             description
               "Segment Identifier (SID) - A 20 bit label or
                an index into the SID/Label space.

                If the  V-Flag is set to 0 and L-Flag is set to 0:
                The SID/Index/Label field is a 4-octet index defining
                the offset in the SID/Label space advertised by this
                router.

                If V-Flag is set to 1 and L-Flag is set to 1: The
                SID/Index/Label field is a 3-octet local label where
                the 20 rightmost bits are used for encoding the label
                value.";
           }
         }
       }

       uses ospf-link-attr:app-specific-link-attr-sub-tlvs;
     }

     grouping ospfv3-member-link-attr-sub-tlvs {
       description
         "OSPFv3 L2 Bundle Member Attributes sub-TLV (RFC 9356).";

       uses ospf-sr-mpls:ospfv3-adj-sid-sub-tlvs;
       uses ospf-sr-mpls:ospfv3-lan-adj-sid-sub-tlvs;
       uses ospf-link-attr:app-specific-link-attr-sub-tlvs;
     }

     /* Configuration */
     augment "/rt:routing/rt:control-plane-protocols/"
           + "rt:control-plane-protocol/ospf:ospf/"
           + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospf')" {
         description
           "This augments the OSPF routing protocol when used.";
       }
       description
         "This augments the OSPF interface configuration with L2
          Bundle Member Attributes.";

       container l2-mbr-attrs {
         description
           "L2 member attributes configuration.";

Lindem & Qu              Expires 7 January 2026                [Page 45]
Internet-Draft            OSPF YANG Augments V1                July 2025

         list l2-mbr-attr {
           key l2-bdl-mbr-dscpr;
           leaf l2-bdl-mbr-dscpr {
             type uint32;
             description
               "L2 bundle member descriptor: a 4-octet link-local
                identifier for the member link.";
           }
           leaf adj-sid {
             type uint32;
             description
               "Value of the Adj-SID.";
           }
           leaf lan-adj-sid {
             type uint32;
             description
               "Value of the LAN-Adj-SID.";
           }
           /* More configuration can be added here */
           description
             "List of L2 bundle members.";
         }
       }

     }

     /* Database */
     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/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-opaque/ospf:extended-link-tlv" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
            + "rt:control-plane-protocol/rt:type, 'ospf:ospfv2')" {
         description
           "This augmentation is only valid for OSPFv2.";
       }
       description
         "OSPFv2 L2 Bundle Member Attributes sub-TLV is
          a sub-TLV of OSPFv2 Extended Link TLV (RFC7684).";

       container l2-bdl-mbr-attr {
         list l2-bdl-mbrs {
           description
             "List of L2 bundle members.";

Lindem & Qu              Expires 7 January 2026                [Page 46]
Internet-Draft            OSPF YANG Augments V1                July 2025

           leaf l2-bdl-mbr-dscpr {
             type uint32;
             description
               "L2 bundle member descriptor: a 4-octet link-local
                identifier for the member link.";
           }
           uses ospfv2-member-link-attr-sub-tlvs;
         }
         description
           "OSPFv2 L2 Bundle Member Attributes sub-TLV.";
       }
     }

     augment "/rt:routing/"
          + "rt:control-plane-protocols/rt:control-plane-protocol/"
          + "ospf:ospf/ospf:areas/ospf:area/ospf:database/"
          + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
          + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"
          + "ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-router/"
          + "ospfv3-e-lsa:e-router-tlvs/ospfv3-e-lsa:link-tlv" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
            + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
            description
              "This augmentation is only valid for OSPFv3
               E-Router LSAs";
          }
       description
         "Augment OSPFv3 Area scope router-link TLV.";

       container l2-bdl-mbr-attr {
         list l2-bdl-mbrs {
           description
             "List of L2 bundle members.";
           leaf l2-bdl-mbr-dscpr {
             type uint32;
             description
               "L2 bundle member descriptor: a 4-octet link-local
                identifier for the member link.";
           }
           uses ospfv3-member-link-attr-sub-tlvs;
         }
         description
           "OSPFv3 L2 Bundle Member Attributes sub-TLV.";
       }
     }
   }

Lindem & Qu              Expires 7 January 2026                [Page 47]
Internet-Draft            OSPF YANG Augments V1                July 2025

9.  YANG Module for OSPF Flexible Algorithms: Bandwidth, Delay, Metrics
    and Constraints

   This document defines a YANG module for OSPF Flexible Algorithms:
   Bandwidth, Delay, Metrics and Constraints
   [I-D.ietf-lsr-flex-algo-bw-con].  It is an augmentation of the OSPF
   base model and the Flexible Algorithm YANG module .

module: ietf-ospf-flex-algo-bw-con
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/ospf:areas
          /ospf:area/ospf:interfaces/ospf:interface:
    +--rw generic-metrics
       +--rw generic-metric* [metric-type]
          +--rw metric-type     identityref
          +--rw metric-value?   uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf
          /ospf-flex-algo:ospf-flex-algo/ospf-flex-algo:flex-algo:
    +--rw bandwidth-constraints
    |  +--rw constraint* [constraint-type]
    |     +--rw constraint-type    identityref
    |     +--rw bandwidth-value?   te-types:te-bandwidth
    |     +--rw threshold?         uint8
    +--rw (metric-derivation-method)?
    |  +--:(reference-bandwidth)
    |  |  +--rw reference-bandwidth
    |  |     +--rw reference-bandwidth?     rt-types:bandwidth-ieee-float32
    |  |     +--rw granularity-bandwidth?   rt-types:bandwidth-ieee-float32
    |  +--:(bandwidth-thresholds)
    |     +--rw bandwidth-thresholds
    |        +--rw bandwidth-threshold* [bandwidth-threshold]
    |           +--rw bandwidth-threshold    rt-types:bandwidth-ieee-float32
    |           +--rw threshold-metric?      uint32
    +--rw exclude-min-bw?               rt-types:bandwidth-ieee-float32
    +--rw exclude-max-delay?            rt-types:uint24
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/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:te-opaque
          /ospf:link-tlv:
    +--ro generic-metric-sub-tlvs
       +--ro generic-metric-sub-tlv* []
          +--ro metric-type?   identityref
          +--ro value?         uint32
  augment /rt:routing/rt:control-plane-protocols

Lindem & Qu              Expires 7 January 2026                [Page 48]
Internet-Draft            OSPF YANG Augments V1                July 2025

          /rt:control-plane-protocol/ospf:ospf/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-inter-as-te:inter-as-te-v2/ospf-inter-as-te:link-tlv:
    +--ro generic-metric-sub-tlvs
       +--ro generic-metric-sub-tlv* []
          +--ro metric-type?   identityref
          +--ro value?         uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/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-inter-as-te:inter-as-te-v2/ospf-inter-as-te:link-tlv:
    +--ro generic-metric-sub-tlvs
       +--ro generic-metric-sub-tlv* []
          +--ro metric-type?   identityref
          +--ro value?         uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/ospf:areas
          /ospf:area/ospf:database/ospf:area-scope-lsa-type
          /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version
          /ospf:ospfv3/ospf:ospfv3/ospf:body
          /ospf-te:ospfv3-intra-area-te/ospf-te:link-tlv:
    +--ro generic-metric-sub-tlvs
       +--ro generic-metric-sub-tlv* []
          +--ro metric-type?   identityref
          +--ro value?         uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/ospf:areas
          /ospf:area/ospf:database/ospf:area-scope-lsa-type
          /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version
          /ospf:ospfv3/ospf:ospfv3/ospf:body
          /ospf-inter-as-te:inter-as-te-v3/ospf-inter-as-te:link-tlv:
    +--ro generic-metric-sub-tlvs
       +--ro generic-metric-sub-tlv* []
          +--ro metric-type?   identityref
          +--ro value?         uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/ospf:database
          /ospf:as-scope-lsa-type/ospf:as-scope-lsas
          /ospf:as-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3
          /ospf:body/ospf-inter-as-te:inter-as-te-v3
          /ospf-inter-as-te:link-tlv:
    +--ro generic-metric-sub-tlvs
       +--ro generic-metric-sub-tlv* []
          +--ro metric-type?   identityref
          +--ro value?         uint32

Lindem & Qu              Expires 7 January 2026                [Page 49]
Internet-Draft            OSPF YANG Augments V1                July 2025

  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/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-opaque/ospf:extended-link-tlv
          /ospf-link-attr:app-specific-link-attr-sub-tlvs:
    +--ro generic-metric-sub-tlvs
       +--ro generic-metric-sub-tlv* []
          +--ro metric-type?   identityref
          +--ro value?         uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/ospf:areas
          /ospf:area/ospf:database/ospf:area-scope-lsa-type
          /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version
          /ospf:ospfv3/ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-router
          /ospfv3-e-lsa:e-router-tlvs/ospfv3-e-lsa:link-tlv
          /ospf-link-attr:app-specific-link-attr-sub-tlvs:
    +--ro generic-metric-sub-tlvs
       +--ro generic-metric-sub-tlv* []
          +--ro metric-type?   identityref
          +--ro value?         uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/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-opaque/ospf:extended-link-tlv
          /ospf-l2-bundle:l2-bdl-mbr-attr/ospf-l2-bundle:l2-bdl-mbrs:
    +--ro generic-metric-sub-tlvs
       +--ro generic-metric-sub-tlv* []
          +--ro metric-type?   identityref
          +--ro value?         uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/ospf:areas
          /ospf:area/ospf:database/ospf:area-scope-lsa-type
          /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version
          /ospf:ospfv3/ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-router
          /ospfv3-e-lsa:e-router-tlvs/ospfv3-e-lsa:link-tlv
          /ospf-l2-bundle:l2-bdl-mbr-attr/ospf-l2-bundle:l2-bdl-mbrs:
    +--ro generic-metric-sub-tlvs
       +--ro generic-metric-sub-tlv* []
          +--ro metric-type?   identityref
          +--ro value?         uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/ospf:areas
          /ospf:area/ospf:interfaces/ospf:interface/ospf:database
          /ospf:link-scope-lsa-type/ospf:link-scope-lsas

Lindem & Qu              Expires 7 January 2026                [Page 50]
Internet-Draft            OSPF YANG Augments V1                July 2025

          /ospf:link-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2
          /ospf:body/ospf:opaque/ospf:ri-opaque
          /ospf-flex-algo:fad-tlvs/ospf-flex-algo:fad-tlv:
    +--ro faemb-sub-tlv
    |  +--ro min-bandwidth?   rt-types:bandwidth-ieee-float32
    +--ro faemd-sub-tlv
    |  +--ro max-link-delay?   rt-types:uint24
    +--ro fadrb-sub-tlv
    |  +--ro fadrb-flags*             identityref
    |  +--ro reference-bandwidth?     rt-types:bandwidth-ieee-float32
    |  +--ro granularity-bandwidth?   rt-types:bandwidth-ieee-float32
    +--ro fadbt-sub-tlv
       +--ro fadbt-flags*           identityref
       +--ro bandwidth-threshold* []
          +--ro bandwidth-threshold?   rt-types:bandwidth-ieee-float32
          +--ro threshold-metric?      uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/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:ri-opaque
          /ospf-flex-algo:fad-tlvs/ospf-flex-algo:fad-tlv:
    +--ro faemb-sub-tlv
    |  +--ro min-bandwidth?   rt-types:bandwidth-ieee-float32
    +--ro faemd-sub-tlv
    |  +--ro max-link-delay?   rt-types:uint24
    +--ro fadrb-sub-tlv
    |  +--ro fadrb-flags*             identityref
    |  +--ro reference-bandwidth?     rt-types:bandwidth-ieee-float32
    |  +--ro granularity-bandwidth?   rt-types:bandwidth-ieee-float32
    +--ro fadbt-sub-tlv
       +--ro fadbt-flags*           identityref
       +--ro bandwidth-threshold* []
          +--ro bandwidth-threshold?   rt-types:bandwidth-ieee-float32
          +--ro threshold-metric?      uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/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:ri-opaque/ospf-flex-algo:fad-tlvs
          /ospf-flex-algo:fad-tlv:
    +--ro faemb-sub-tlv
    |  +--ro min-bandwidth?   rt-types:bandwidth-ieee-float32
    +--ro faemd-sub-tlv
    |  +--ro max-link-delay?   rt-types:uint24
    +--ro fadrb-sub-tlv
    |  +--ro fadrb-flags*             identityref
    |  +--ro reference-bandwidth?     rt-types:bandwidth-ieee-float32

Lindem & Qu              Expires 7 January 2026                [Page 51]
Internet-Draft            OSPF YANG Augments V1                July 2025

    |  +--ro granularity-bandwidth?   rt-types:bandwidth-ieee-float32
    +--ro fadbt-sub-tlv
       +--ro fadbt-flags*           identityref
       +--ro bandwidth-threshold* []
          +--ro bandwidth-threshold?   rt-types:bandwidth-ieee-float32
          +--ro threshold-metric?      uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/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:ospfv3
          /ospf:ospfv3/ospf:body/ospf:router-information
          /ospf-flex-algo:fad-tlvs/ospf-flex-algo:fad-tlv:
    +--ro faemb-sub-tlv
    |  +--ro min-bandwidth?   rt-types:bandwidth-ieee-float32
    +--ro faemd-sub-tlv
    |  +--ro max-link-delay?   rt-types:uint24
    +--ro fadrb-sub-tlv
    |  +--ro fadrb-flags*             identityref
    |  +--ro reference-bandwidth?     rt-types:bandwidth-ieee-float32
    |  +--ro granularity-bandwidth?   rt-types:bandwidth-ieee-float32
    +--ro fadbt-sub-tlv
       +--ro fadbt-flags*           identityref
       +--ro bandwidth-threshold* []
          +--ro bandwidth-threshold?   rt-types:bandwidth-ieee-float32
          +--ro threshold-metric?      uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/ospf:areas
          /ospf:area/ospf:database/ospf:area-scope-lsa-type
          /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version
          /ospf:ospfv3/ospf:ospfv3/ospf:body/ospf:router-information
          /ospf-flex-algo:fad-tlvs/ospf-flex-algo:fad-tlv:
    +--ro faemb-sub-tlv
    |  +--ro min-bandwidth?   rt-types:bandwidth-ieee-float32
    +--ro faemd-sub-tlv
    |  +--ro max-link-delay?   rt-types:uint24
    +--ro fadrb-sub-tlv
    |  +--ro fadrb-flags*             identityref
    |  +--ro reference-bandwidth?     rt-types:bandwidth-ieee-float32
    |  +--ro granularity-bandwidth?   rt-types:bandwidth-ieee-float32
    +--ro fadbt-sub-tlv
       +--ro fadbt-flags*           identityref
       +--ro bandwidth-threshold* []
          +--ro bandwidth-threshold?   rt-types:bandwidth-ieee-float32
          +--ro threshold-metric?      uint32
  augment /rt:routing/rt:control-plane-protocols
          /rt:control-plane-protocol/ospf:ospf/ospf:database
          /ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa

Lindem & Qu              Expires 7 January 2026                [Page 52]
Internet-Draft            OSPF YANG Augments V1                July 2025

          /ospf:version/ospf:ospfv3/ospf:ospfv3/ospf:body
          /ospf:router-information/ospf-flex-algo:fad-tlvs
          /ospf-flex-algo:fad-tlv:
    +--ro faemb-sub-tlv
    |  +--ro min-bandwidth?   rt-types:bandwidth-ieee-float32
    +--ro faemd-sub-tlv
    |  +--ro max-link-delay?   rt-types:uint24
    +--ro fadrb-sub-tlv
    |  +--ro fadrb-flags*             identityref
    |  +--ro reference-bandwidth?     rt-types:bandwidth-ieee-float32
    |  +--ro granularity-bandwidth?   rt-types:bandwidth-ieee-float32
    +--ro fadbt-sub-tlv
       +--ro fadbt-flags*           identityref
       +--ro bandwidth-threshold* []
          +--ro bandwidth-threshold?   rt-types:bandwidth-ieee-float32
          +--ro threshold-metric?      uint32

 <CODE BEGINS> file "ietf-ospf-flex-algo-bw-con@2025-07-06.yang"
 module ietf-ospf-flex-algo-bw-con {
   yang-version 1.1;
   namespace "urn:ietf:params:xml:ns:yang:ietf-ospf-flex-algo-bw-con";
   prefix ospf-flex-algo-bw-con;

   import ietf-routing {
     prefix rt;
     reference "RFC 8349: A YANG Data Model for Routing
                Management (NMDA Version)";
   }

   import ietf-routing-types {
     prefix rt-types;
     reference
       "RFC 8294: Common YANG Data Types for the Routing Area";
   }

   import ietf-te-types {
     prefix te-types;
     reference
       "RFC8776: Common YANG Data Types for Traffic Engineering.";
   }

   import ietf-ospf {
     prefix ospf;
     reference
       "RFC 9129: YANG Data Model for the OSPF Protocol";
   }

   import ietf-ospfv3-extended-lsa {

Lindem & Qu              Expires 7 January 2026                [Page 53]
Internet-Draft            OSPF YANG Augments V1                July 2025

     prefix ospfv3-e-lsa;
     reference
       "RFC 9587: YANG Data Model for OSPFv3 Extended Link
                  State Advertisements (LSAs)";
   }

   import ietf-ospf-te {
     prefix ospf-te;
   }

   import ietf-ospf-flex-algo {
     prefix ospf-flex-algo;
     reference
       "RFC XXXX";
   }

   import ietf-ospf-link-attr {
     prefix ospf-link-attr;
   }

   import ietf-ospf-inter-as-te {
     prefix ospf-inter-as-te;
   }

   import ietf-ospf-l2-bundle {
     prefix ospf-l2-bundle;
   }

   import iana-igp-metric-types {
     prefix iana-metric-type;
   }

   organization
     "IETF LSR - Link State Routing Working Group";
   contact
     "WG Web:   <https://datatracker.ietf.org/wg/lsr/>
      WG List:  <mailto:lsr@ietf.org>

      Author:    Yingzhen Qu
                <mailto:yingzhen.ietf@gmail.com>
      Author:    Acee Lindem
                <mailto:acee.ietf@gmail.com>
     ";

   description
     "The YANG module defines the configuration and operational
      state for OSPF protocol as defined in

Lindem & Qu              Expires 7 January 2026                [Page 54]
Internet-Draft            OSPF YANG Augments V1                July 2025

      draft-ietf-lsr-flex-algo-bw-con, IGP Flexible Algorithms:
      Bandwidth, Delay, Metrics and Constraints

      This YANG model conforms to the Network Management
      Datastore Architecture (NMDA) as described in RFC 8342.

      Copyright (c) 2025 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 Revised 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 XXXX;
      see the RFC itself for full legal notices.

      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.";

   reference "RFC XXXX: YANG Data Model for OSPF Flexible Algorithm.";

   revision 2025-07-06 {
     description
       "Initial Version";
     reference
       "RFC XXXX: OSPF YANG Model Augmentations for Additional
                  Features - Version 1.";
   }

   /* Identities */

   identity bandwidth-constraint-type {
     description
       "Base identity for bandwidth constraint types.";
   }

   identity min-bw {
     base bandwidth-constraint-type;
     description
       "Minimum bandwidth constraint.";
   }

Lindem & Qu              Expires 7 January 2026                [Page 55]
Internet-Draft            OSPF YANG Augments V1                July 2025

   identity max-bw {
     base bandwidth-constraint-type;
     description
       "Maximum bandwidth constraint.";
   }

   identity fadrb-flags {
     description
       "Base identity for OSPF Flexible Algorithm Definition
        Reference Bandwidth sub-tlv flags.";
   }

   identity g-bit {
     base fadrb-flags;
     description
       "G bit, when set, interface group mode MUST be used to
        derive total link bandwidth.";
   }

   identity fadbt-flags {
     description
       "Base identity for OSPF Flexible Algorithm Definition
        Reference Bandwidth sub-tlv flags.";
   }

   identity gp-bit {
     base fadbt-flags;
     description
       "G bit, when set, interface group mode MUST be used to
        derive total link bandwidth.";
   }

   /* Groupings */
   grouping bandwidth-constraint {
     description
       "Grouping for bandwidth constraints in Flex-Algo.";
     container bandwidth-constraints {
       list constraint {
         key "constraint-type";
         description
           "List of bandwidth constraints for the Flex-Algo.";
         leaf constraint-type {
           type identityref {
             base bandwidth-constraint-type;
           }
           description
             "Type of bandwidth constraint (e.g., min-bw, max-bw).";
         }

Lindem & Qu              Expires 7 January 2026                [Page 56]
Internet-Draft            OSPF YANG Augments V1                July 2025

         leaf bandwidth-value {
           type te-types:te-bandwidth;
           description
             "Bandwidth value for the constraint.";
         }
         leaf threshold {
           type uint8 {
             range "1..100";
           }
           units "percent";
           description
             "Threshold percentage for triggering re-optimization.";
         }
       }
       description
         "Bandwidth constraints configuration for flex-algo.";
     }
   }

   grouping generic-metric-sub-tlv {
     container generic-metric-sub-tlvs {
       list generic-metric-sub-tlv {
         leaf metric-type {
           type identityref {
             base iana-metric-type:metric-type;
           }
             description
               "Type of metric to be used during the calculation.";
         }
         leaf value {
           type uint32;
           description
             "A 32-bit unsigned integer representing the metric value.";
         }
         description
           "The list of generic metric sub-tlvs.";
       }
       description
         "The generic metric sub-tlv.";
     }
     description
       "The grouping for generic metric sub-tlv.";
   }

   grouping faemb-sub-tlv {
     container faemb-sub-tlv {
       leaf min-bandwidth {
         type rt-types:bandwidth-ieee-float32;

Lindem & Qu              Expires 7 January 2026                [Page 57]
Internet-Draft            OSPF YANG Augments V1                July 2025

         description
           "A 32-bit field specifying the link bandwidth in IEEE
            floating point format (IEEE754). The units are
            bytes-per-second.";
       }
       description
         "Flex-algo Exclude Minimum Bandwidth sub-tlv (FAEMB).";
     }
     description
       "Grouping for FAEMB sub-tlv.";
   }

   grouping faemd-sub-tlv {
     container faemd-sub-tlv {
       leaf max-link-delay {
         type rt-types:uint24;
         description
           "A 24-bit field specifying the maximum link delay in
            microseconds.";
       }
       description
         "The Flex-algo Exclude Maximum Delay sub-tlv (FAEMD).";
     }
     description
       "Grouping for FAEMD sub-tlv.";
   }

   grouping fadrb-sub-tlv {
     container fadrb-sub-tlv {
       leaf-list fadrb-flags {
         type identityref {
           base fadrb-flags;
         }
         description
           "Flex-algo definition reference bandwidth sub-tlv
            flags list.";
       }
       leaf reference-bandwidth {
         type rt-types:bandwidth-ieee-float32;
         description
           "A 32-bit field specifying the link bandwidth in IEEE
            floating point format (IEEE754). The units are
            bytes-per-second.";
       }
       leaf granularity-bandwidth {
         type rt-types:bandwidth-ieee-float32;
         description
           "A 32-bit field specifying the link bandwidth in IEEE

Lindem & Qu              Expires 7 January 2026                [Page 58]
Internet-Draft            OSPF YANG Augments V1                July 2025

            floating point format (IEEE754). The units are
            bytes-per-second.";
       }
       description
         "The Flex-algo Reference Bandwidth sub-tlv (FAEMD).";
     }
     description
       "Grouping for FADRB sub-tlv.";
   }

   grouping fadbt-sub-tlv {
     container fadbt-sub-tlv {
       leaf-list fadbt-flags {
         type identityref {
           base fadbt-flags;
         }
         description
           "Flex-algo definition bandwidth thresholds sub-tlv
            flags list.";
       }
       list bandwidth-threshold {
         leaf bandwidth-threshold {
           type rt-types:bandwidth-ieee-float32;
           description
             "Maximum link bandwidth. A 32-bit field specifying the
              link bandwidth in IEEE floating point format (IEEE754).
              The units are bytes-per-second.";
         }

         leaf threshold-metric {
           type uint32;
           description
             "Metric value range 1 - 4,294,967,296 (0xFFFFFFFF).";
         }
         description
           "List of bandwidth thresholds and metrics.";
       }
       description
         "The Flex-algo Bandwidth Thresholds sub-tlv (FADBT).";
     }
     description
       "Grouping for FADBT sub-tlv.";
   }

   /* Configurations */
   augment "/rt:routing/rt:control-plane-protocols/"
         + "rt:control-plane-protocol/ospf:ospf/"
         + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" {

Lindem & Qu              Expires 7 January 2026                [Page 59]
Internet-Draft            OSPF YANG Augments V1                July 2025

     when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospf')" {
       description
         "This augments the OSPF interface configuration
          when used.";
     }
     description
       "This augments the OSPF protocol interface
        configuration with generic metric configuration.";

     container generic-metrics {
       list generic-metric {
         key "metric-type";
         leaf metric-type {
           type identityref {
             base iana-metric-type:metric-type;
           }
           description
             "Type of metric to be used during the calculation.";
         }
         leaf metric-value {
           type uint32;
           description
             "Metric value, range is from 0 to 0xFFFFFFFF.";
         }
         description
           "Interface generic metric configuration per metric-type.";
       }
       description
         "Interface generic metric configuration.";
     }
   }

   augment "/rt:routing/rt:control-plane-protocols/"
      + "rt:control-plane-protocol/ospf:ospf/"
      + "ospf-flex-algo:ospf-flex-algo/ospf-flex-algo:flex-algo" {
     when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospf')" {
       description
         "This augments the OSPF routing protocol when used.";
     }
     description
       "This augments OSPF protocol Flexible Algorithm with
        bandwidth constraints.";

     uses bandwidth-constraint;

     choice metric-derivation-method {

Lindem & Qu              Expires 7 January 2026                [Page 60]
Internet-Draft            OSPF YANG Augments V1                July 2025

       description
         "Choice of automatic metric derivation methods.";
       container reference-bandwidth {
         description
           "Metric is inversely proportional to the link
            bandwidth.";
         leaf reference-bandwidth {
           type rt-types:bandwidth-ieee-float32;
           description
             "A 32-bit field specifying the link bandwidth in IEEE
              floating point format (IEEE754). The units are
              bytes-per-second.";
         }
         leaf granularity-bandwidth {
           type rt-types:bandwidth-ieee-float32;
           description
             "A 32-bit field specifying the link bandwidth in IEEE
              floating point format (IEEE754). The units are
              bytes-per-second.";
         }
       }
       container bandwidth-thresholds {
         description
           "Pre-define non-proportional metric values from the varying
            ranges of link bandwidth.";
         list bandwidth-threshold {
           key bandwidth-threshold;
           leaf bandwidth-threshold {
             type rt-types:bandwidth-ieee-float32;
             description
               "Maximum link bandwidth. A 32-bit field specifying the
                link bandwidth in IEEE floating point format (IEEE754).
                The units are bytes-per-second.";
           }
           leaf threshold-metric {
             type uint32;
             description
               "Metric value range 1 - 4,294,967,296 (0xFFFFFFFF).";
           }
           description
             "List of bandwidth thresholds and metrics.";
         }
       }
     }

     leaf exclude-min-bw {
       type rt-types:bandwidth-ieee-float32;
       description

Lindem & Qu              Expires 7 January 2026                [Page 61]
Internet-Draft            OSPF YANG Augments V1                July 2025

         "A 32-bit field specifying the link bandwidth in IEEE
          floating point format (IEEE754). The units are
          bytes-per-second.";
     }

     leaf exclude-max-delay {
       type rt-types:uint24;
       description
         "A 24-bit field specifying the maximum link delay in
          microseconds.";
     }
   }

   /* Database */

   augment "/rt:routing/"
         + "rt:control-plane-protocols/rt:control-plane-protocol/"
         + "ospf:ospf/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:te-opaque/"
         + "ospf:link-tlv" {
     when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv2')" {
       description
         "This augmentation is only valid for OSPFv2.";
     }

     description
       "TE link TLV of OSPF TE LSA.";

     uses generic-metric-sub-tlv;
   }

   augment "/rt:routing/"
         + "rt:control-plane-protocols/rt:control-plane-protocol/"
         + "ospf:ospf/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-inter-as-te:inter-as-te-v2/"
         + "ospf-inter-as-te:link-tlv" {
     when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv2')" {
       description
         "This augmentation is only valid for OSPFv2.";
     }

Lindem & Qu              Expires 7 January 2026                [Page 62]
Internet-Draft            OSPF YANG Augments V1                July 2025

     description
       "Area scope TE link TLV of OSPFv2 Inter-AS-TE-v2 LSA.";

     uses generic-metric-sub-tlv;
   }

   augment "/rt:routing/"
         + "rt:control-plane-protocols/rt:control-plane-protocol/"
         + "ospf:ospf/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-inter-as-te:inter-as-te-v2/"
         + "ospf-inter-as-te:link-tlv" {
     when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv2')" {
       description
         "This augment OSPFv2 routing protocol when used";
     }
     description
       "AS scope TE link TLV of OSPFv2 Inter-AS-TE-v2 LSA.";

     uses generic-metric-sub-tlv;
   }

   augment "/rt:routing/"
         + "rt:control-plane-protocols/rt:control-plane-protocol/"
         + "ospf:ospf/ospf:areas/"
         + "ospf:area/ospf:database/"
         + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
         + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"
         + "ospf:ospfv3/ospf:body/ospf-te:ospfv3-intra-area-te/"
         + "ospf-te:link-tlv" {
     when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
       description
         "This augmentation is only valid for OSPFv3.";
     }
     description
       "TE Link TLV of OSPFv3 Intra-Area-TE-LSA.";

     uses generic-metric-sub-tlv;
   }

   augment "/rt:routing/"
         + "rt:control-plane-protocols/rt:control-plane-protocol/"
         + "ospf:ospf/ospf:areas/"
         + "ospf:area/ospf:database/"

Lindem & Qu              Expires 7 January 2026                [Page 63]
Internet-Draft            OSPF YANG Augments V1                July 2025

         + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
         + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"
         + "ospf:ospfv3/ospf:body/ospf-inter-as-te:inter-as-te-v3/"
         + "ospf-inter-as-te:link-tlv" {
     when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
       description
         "This augmentation is only valid for OSPFv3.";
     }
     description
       "Area scope TE Link TLV of OSPFv3 Inter-AS-TE-v3 LSA.";

     uses generic-metric-sub-tlv;
   }

   augment "/rt:routing/"
         + "rt:control-plane-protocols/rt:control-plane-protocol/"
         + "ospf:ospf/ospf:database/"
         + "ospf:as-scope-lsa-type/ospf:as-scope-lsas/"
         + "ospf:as-scope-lsa/ospf:version/ospf:ospfv3/"
         + "ospf:ospfv3/ospf:body/ospf-inter-as-te:inter-as-te-v3/"
         + "ospf-inter-as-te:link-tlv" {
     when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
       description
         "This augmentation is only valid for OSPFv3.";
     }
     description
       "AS scope TE Link TLV of OSPFv3 Inter-AS-TE-v3 LSA.";

     uses generic-metric-sub-tlv;
   }
   augment "/rt:routing/"
         + "rt:control-plane-protocols/rt:control-plane-protocol/"
         + "ospf:ospf/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-opaque/ospf:extended-link-tlv/"
         + "ospf-link-attr:app-specific-link-attr-sub-tlvs" {
     when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv2')" {
       description
         "This augmentation is only valid for OSPFv2.";
     }
     description
       "OSPF Application-Specific Link Attributes (ASLA) sub-TLV is

Lindem & Qu              Expires 7 January 2026                [Page 64]
Internet-Draft            OSPF YANG Augments V1                July 2025

        a sub-TLV of OSPFv2 Extended Link TLV (RFC7684).";

     uses generic-metric-sub-tlv;
   }

   augment "/rt:routing/"
        + "rt:control-plane-protocols/rt:control-plane-protocol/"
        + "ospf:ospf/ospf:areas/ospf:area/ospf:database/"
        + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
        + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"
        + "ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-router/"
        + "ospfv3-e-lsa:e-router-tlvs/ospfv3-e-lsa:link-tlv/"
        + "ospf-link-attr:app-specific-link-attr-sub-tlvs" {
     when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
          description
            "This augmentation is only valid for OSPFv3
             E-Router LSAs";
        }
     description
       "Application-Specific Link Attributes (ASLA) sub-TLV (RFC9492)
        of the OSPFv3 Router-Link TLV (RFC8362).";

     uses generic-metric-sub-tlv;
   }

   augment "/rt:routing/"
         + "rt:control-plane-protocols/rt:control-plane-protocol/"
         + "ospf:ospf/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-opaque/ospf:extended-link-tlv/"
         + "ospf-l2-bundle:l2-bdl-mbr-attr/"
         + "ospf-l2-bundle:l2-bdl-mbrs" {
     when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv2')" {
       description
         "This augmentation is only valid for OSPFv2.";
     }
     description
       "OSPFv2 L2 Bundle Member Attributes sub-TLV is
        a sub-TLV of OSPFv2 Extended Link TLV (RFC7684).";

     uses generic-metric-sub-tlv;
   }

Lindem & Qu              Expires 7 January 2026                [Page 65]
Internet-Draft            OSPF YANG Augments V1                July 2025

   augment "/rt:routing/"
        + "rt:control-plane-protocols/rt:control-plane-protocol/"
        + "ospf:ospf/ospf:areas/ospf:area/ospf:database/"
        + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
        + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"
        + "ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-router/"
        + "ospfv3-e-lsa:e-router-tlvs/ospfv3-e-lsa:link-tlv/"
        + "ospf-l2-bundle:l2-bdl-mbr-attr/"
        + "ospf-l2-bundle:l2-bdl-mbrs" {
     when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
          description
            "This augmentation is only valid for OSPFv3
             E-Router LSAs";
        }
     description
       "OSPFv3 L2 Bundle Member Attributes sub-TLV in
        OSPFv3 Area scope router-link TLV.";

     uses generic-metric-sub-tlv;

   }

   augment "/rt:routing/"
         + "rt:control-plane-protocols/rt:control-plane-protocol/"
         + "ospf:ospf/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:ri-opaque/"
         + "ospf-flex-algo:fad-tlvs/ospf-flex-algo:fad-tlv" {
     when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv2')" {
       description
         "This augmentation is only valid for OSPFv2.";
     }

     description
       "Flex-algo definition TLVs for OSPFv2 type 9 opaque RI LSA.";

     uses faemb-sub-tlv;
     uses faemd-sub-tlv;
     uses fadrb-sub-tlv;
     uses fadbt-sub-tlv;
   }

   augment "/rt:routing/"
         + "rt:control-plane-protocols/rt:control-plane-protocol/"

Lindem & Qu              Expires 7 January 2026                [Page 66]
Internet-Draft            OSPF YANG Augments V1                July 2025

         + "ospf:ospf/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:ri-opaque/"
         + "ospf-flex-algo:fad-tlvs/ospf-flex-algo:fad-tlv" {
     when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv2')" {
       description
         "This augmentation is only valid for OSPFv2.";
     }

     description
       "Flex-algo definition TLVs for OSPFv2 type 10 opaque RI LSA.";

     uses faemb-sub-tlv;
     uses faemd-sub-tlv;
     uses fadrb-sub-tlv;
     uses fadbt-sub-tlv;
   }

   augment "/rt:routing/"
         + "rt:control-plane-protocols/rt:control-plane-protocol/"
         + "ospf:ospf/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:ri-opaque/"
         + "ospf-flex-algo:fad-tlvs/ospf-flex-algo:fad-tlv" {
     when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv2')" {
       description
         "This augmentation is only valid for OSPFv2.";
     }
     description
       "Flex-algo definition TLVs for OSPFv2 type 11 opaque RI LSA.";

     uses faemb-sub-tlv;
     uses faemd-sub-tlv;
     uses fadrb-sub-tlv;
     uses fadbt-sub-tlv;
   }

   augment "/rt:routing/"
         + "rt:control-plane-protocols/rt:control-plane-protocol/"
         + "ospf:ospf/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:ospfv3/"

Lindem & Qu              Expires 7 January 2026                [Page 67]
Internet-Draft            OSPF YANG Augments V1                July 2025

         + "ospf:ospfv3/ospf:body/ospf:router-information/"
         + "ospf-flex-algo:fad-tlvs/ospf-flex-algo:fad-tlv" {
     when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
       description
         "This augmentation is only valid for OSPFv3.";
     }

     description
       "Flex-algo definition TLVs for OSPFv3 Router
        Information (RI) LSA.";

     uses faemb-sub-tlv;
     uses faemd-sub-tlv;
     uses fadrb-sub-tlv;
     uses fadbt-sub-tlv;
   }

   augment "/rt:routing/"
         + "rt:control-plane-protocols/rt:control-plane-protocol/"
         + "ospf:ospf/ospf:areas/"
         + "ospf:area/ospf:database/"
         + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
         + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"
         + "ospf:ospfv3/ospf:body/ospf:router-information/"
         + "ospf-flex-algo:fad-tlvs/ospf-flex-algo:fad-tlv" {
     when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
       description
         "This augmentation is only valid for OSPFv3.";
     }

     description
       "Flex-algo definition TLVs for OSPFv3 Router
        Information (RI) LSA.";

     uses faemb-sub-tlv;
     uses faemd-sub-tlv;
     uses fadrb-sub-tlv;
     uses fadbt-sub-tlv;
   }

   augment "/rt:routing/"
         + "rt:control-plane-protocols/rt:control-plane-protocol/"
         + "ospf:ospf/ospf:database/"
         + "ospf:as-scope-lsa-type/ospf:as-scope-lsas/"
         + "ospf:as-scope-lsa/ospf:version/ospf:ospfv3/"
         + "ospf:ospfv3/ospf:body/ospf:router-information/"

Lindem & Qu              Expires 7 January 2026                [Page 68]
Internet-Draft            OSPF YANG Augments V1                July 2025

         + "ospf-flex-algo:fad-tlvs/ospf-flex-algo:fad-tlv" {
     when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
       description
         "This augmentation is only valid for OSPFv3.";
     }
     description
       "Flex-algo definition TLVs for OSPFv3 Router Information LSA.";

     uses faemb-sub-tlv;
     uses faemd-sub-tlv;
     uses fadrb-sub-tlv;
     uses fadbt-sub-tlv;
   }
 }

10.  Security Considerations

   The YANG modules specified in this document define a schema for data
   that is designed to be accessed via network management protocols such
   as NETCONF [RFC6241] or RESTCONF [RFC8040].  The lowest NETCONF layer
   is the secure transport layer, and the mandatory-to-implement secure
   transport is Secure Shell (SSH) [RFC6242].  The lowest RESTCONF layer
   is HTTPS, and the mandatory-to-implement secure transport is TLS
   [RFC5246].

   The NETCONF access control model [RFC6536] provides the means to
   restrict access for particular NETCONF or RESTCONF users to a pre-
   configured subset of all available NETCONF or RESTCONF protocol
   operations and content.

   There are a number of data nodes defined in the modules that are
   writable/creatable/deletable (i.e., config true, which is the
   default).  These data nodes may be considered sensitive or vulnerable
   in some network environments.  Write operations (e.g., edit-config)
   to these data nodes without proper protection can have a negative
   effect on network operations.

   Some of the readable data nodes in the modules may be considered
   sensitive or vulnerable in some network environments.  It is thus
   important to control read access (e.g., via get, get-config, or
   notification) to these data nodes.  The exposure of the Link State
   Database (LSDB) will expose the detailed topology of the network.
   This may be undesirable since both due to the fact that exposure may
   facilitate other attacks.  Additionally, network operators may
   consider their topologies to be sensitive confidential data.

Lindem & Qu              Expires 7 January 2026                [Page 69]
Internet-Draft            OSPF YANG Augments V1                July 2025

11.  IANA Considerations

   This document registers URIs in the IETF XML registry [RFC3688].
   Following the format in [RFC3688], the following registrations is
   requested to be made:

      URI: urn:ietf:params:xml:ns:yang:ietf-ospf-te
      Registrant Contact: The IESG.
      XML: N/A, the requested URI is an XML namespace.

      URI: urn:ietf:params:xml:ns:yang:ietf-ospf-inter-as-te
      Registrant Contact: The IESG.
      XML: N/A, the requested URI is an XML namespace.

      URI: urn:ietf:params:xml:ns:yang:ietf-ospf-two-metric
      Registrant Contact: The IESG.
      XML: N/A, the requested URI is an XML namespace.

      URI: urn:ietf:params:xml:ns:yang:ietf-ospf-grace-linkdown
      Registrant Contact: The IESG.
      XML: N/A, the requested URI is an XML namespace.

      URI: urn:ietf:params:xml:ns:yang:ietf-ospf-lls-localid
      Registrant Contact: The IESG.
      XML: N/A, the requested URI is an XML namespace.

      URI: urn:ietf:params:xml:ns:yang:ietf-ospf-msd
      Registrant Contact: The IESG.
      XML: N/A, the requested URI is an XML namespace.

      URI: urn:ietf:params:xml:ns:yang:ietf-l2-bundle
      Registrant Contact: The IESG.
      XML: N/A, the requested URI is an XML namespace.

      URI: urn:ietf:params:xml:ns:yang:ietf-ospf-flex-algo-bw-con
      Registrant Contact: The IESG.
      XML: N/A, the requested URI is an XML namespace.

   This document registers the YANG modules in the YANG Module Names
   registry [RFC6020].

      name: ietf-ospf-te
      Maintained by IANA?  N
      namespace: urn:ietf:params:xml:ns:yang:ietf-ospf-te
      prefix: ospf-te
      reference: RFC XXXX

Lindem & Qu              Expires 7 January 2026                [Page 70]
Internet-Draft            OSPF YANG Augments V1                July 2025

      name: ietf-ospf-inter-as-te
      Maintained by IANA?  N
      namespace: urn:ietf:params:xml:ns:yang:ietf-ospf-inter-as-te
      prefix: ospf-inter-as-te
      reference: RFC XXXX

      name: ietf-ospf-two-metric
      Maintained by IANA?  N
      namespace: urn:ietf:params:xml:ns:yang:ietf-ospf-two-metric
      prefix: ospf-two-metric
      reference: RFC XXXX

      name: ietf-ospf-grace-linkdown
      Maintained by IANA?  N
      namespace: urn:ietf:params:xml:ns:yang:ietf-ospf-grace-linkdown
      prefix: ospf-grace-linkdown
      reference: RFC XXXX

      name: ietf-ospf-lls-localid
      Maintained by IANA?  N
      namespace: urn:ietf:params:xml:ns:yang:ietf-ospf-lls-localid
      prefix: ospf-lls-localid
      reference: RFC XXXX

      name: ietf-ospf-msd
      Maintained by IANA?  N
      namespace: urn:ietf:params:xml:ns:yang:ietf-ospf-msd
      prefix: ospf-msd
      reference: RFC XXXX

      name: ietf-ospf-l2-bundle
      Maintained by IANA?  N
      namespace: urn:ietf:params:xml:ns:yang:ietf-ospf-l2-bundle
      prefix: ospf-l2-bundle
      reference: RFC XXXX

      name: ietf-ospf-flex-algo-bw-con
      Maintained by IANA?  N
      namespace: urn:ietf:params:xml:ns:yang:ietf-ospf-flex-algo-bw-con
      prefix: ospf-flex-algo-bw-con
      reference: RFC XXXX

12.  Acknowledgements

   This document was produced using Marshall Rose's xml2rfc tool.

   The YANG model was developed using the suite of YANG tools written
   and maintained by numerous authors.

Lindem & Qu              Expires 7 January 2026                [Page 71]
Internet-Draft            OSPF YANG Augments V1                July 2025

13.  Normative References

   [I-D.ietf-lsr-flex-algo-bw-con]
              Hegde, S., Britto, W., Shetty, R., Decraene, B., Psenak,
              P., and T. Li, "IGP Flexible Algorithms: Bandwidth, Delay,
              Metrics and Constraints", Work in Progress, Internet-
              Draft, draft-ietf-lsr-flex-algo-bw-con-22, 13 February
              2025, <https://datatracker.ietf.org/doc/html/draft-ietf-
              lsr-flex-algo-bw-con-22>.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC3630]  Katz, D., Kompella, K., and D. Yeung, "Traffic Engineering
              (TE) Extensions to OSPF Version 2", RFC 3630,
              DOI 10.17487/RFC3630, September 2003,
              <https://www.rfc-editor.org/info/rfc3630>.

   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
              DOI 10.17487/RFC3688, January 2004,
              <https://www.rfc-editor.org/info/rfc3688>.

   [RFC5246]  Dierks, T. and E. Rescorla, "The Transport Layer Security
              (TLS) Protocol Version 1.2", RFC 5246,
              DOI 10.17487/RFC5246, August 2008,
              <https://www.rfc-editor.org/info/rfc5246>.

   [RFC5329]  Ishiguro, K., Manral, V., Davey, A., and A. Lindem, Ed.,
              "Traffic Engineering Extensions to OSPF Version 3",
              RFC 5329, DOI 10.17487/RFC5329, September 2008,
              <https://www.rfc-editor.org/info/rfc5329>.

   [RFC5392]  Chen, M., Zhang, R., and X. Duan, "OSPF Extensions in
              Support of Inter-Autonomous System (AS) MPLS and GMPLS
              Traffic Engineering", RFC 5392, DOI 10.17487/RFC5392,
              January 2009, <https://www.rfc-editor.org/info/rfc5392>.

   [RFC6020]  Bjorklund, M., Ed., "YANG - A Data Modeling Language for
              the Network Configuration Protocol (NETCONF)", RFC 6020,
              DOI 10.17487/RFC6020, October 2010,
              <https://www.rfc-editor.org/info/rfc6020>.

   [RFC6241]  Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
              and A. Bierman, Ed., "Network Configuration Protocol
              (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
              <https://www.rfc-editor.org/info/rfc6241>.

Lindem & Qu              Expires 7 January 2026                [Page 72]
Internet-Draft            OSPF YANG Augments V1                July 2025

   [RFC6242]  Wasserman, M., "Using the NETCONF Protocol over Secure
              Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011,
              <https://www.rfc-editor.org/info/rfc6242>.

   [RFC6536]  Bierman, A. and M. Bjorklund, "Network Configuration
              Protocol (NETCONF) Access Control Model", RFC 6536,
              DOI 10.17487/RFC6536, March 2012,
              <https://www.rfc-editor.org/info/rfc6536>.

   [RFC7950]  Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
              RFC 7950, DOI 10.17487/RFC7950, August 2016,
              <https://www.rfc-editor.org/info/rfc7950>.

   [RFC8040]  Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
              Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
              <https://www.rfc-editor.org/info/rfc8040>.

   [RFC8042]  Zhang, Z., Wang, L., and A. Lindem, "OSPF Two-Part
              Metric", RFC 8042, DOI 10.17487/RFC8042, December 2016,
              <https://www.rfc-editor.org/info/rfc8042>.

   [RFC8349]  Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for
              Routing Management (NMDA Version)", RFC 8349,
              DOI 10.17487/RFC8349, March 2018,
              <https://www.rfc-editor.org/info/rfc8349>.

   [RFC8379]  Hegde, S., Sarkar, P., Gredler, H., Nanduri, M., and L.
              Jalil, "OSPF Graceful Link Shutdown", RFC 8379,
              DOI 10.17487/RFC8379, May 2018,
              <https://www.rfc-editor.org/info/rfc8379>.

   [RFC8476]  Tantsura, J., Chunduri, U., Aldrin, S., and P. Psenak,
              "Signaling Maximum SID Depth (MSD) Using OSPF", RFC 8476,
              DOI 10.17487/RFC8476, December 2018,
              <https://www.rfc-editor.org/info/rfc8476>.

   [RFC8510]  Psenak, P., Ed., Talaulikar, K., Henderickx, W., and P.
              Pillay-Esnault, "OSPF Link-Local Signaling (LLS)
              Extensions for Local Interface ID Advertisement",
              RFC 8510, DOI 10.17487/RFC8510, January 2019,
              <https://www.rfc-editor.org/info/rfc8510>.

   [RFC9129]  Yeung, D., Qu, Y., Zhang, Z., Chen, I., and A. Lindem,
              "YANG Data Model for the OSPF Protocol", RFC 9129,
              DOI 10.17487/RFC9129, October 2022,
              <https://www.rfc-editor.org/info/rfc9129>.

Lindem & Qu              Expires 7 January 2026                [Page 73]
Internet-Draft            OSPF YANG Augments V1                July 2025

   [RFC9356]  Talaulikar, K., Ed. and P. Psenak, "Advertising Layer 2
              Bundle Member Link Attributes in OSPF", RFC 9356,
              DOI 10.17487/RFC9356, January 2023,
              <https://www.rfc-editor.org/info/rfc9356>.

Authors' Addresses

   Acee Lindem
   LabN Consulting, LLC
   301 Midenhall Way
   Cary, NC 27513
   Email: acee.ietf@gmail.com

   Yingzhen Qu
   Futurewei Technologies
   United States of America
   Email: yingzhen.ietf@gmail.com

Lindem & Qu              Expires 7 January 2026                [Page 74]