This YANG module defines the configuration and operational state for OSPFv3 Extended LSAs, which is common across all vendor imp...
Version: 2024-06-07
module ietf-ospfv3-extended-lsa { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-ospfv3-extended-lsa"; prefix ospfv3-e-lsa; import ietf-routing-types { prefix rt-types; reference "RFC 8294: Common YANG Data Types for the Routing Area"; } 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; 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: Acee Lindem <mailto:acee.ietf@gmail.com> Author: Sharmila Palani <mailto:sharmila.palani@microsoft.com> Author: Yingzhen Qu <mailto:yingzhen.ietf@gmail.com>"; description "This YANG module defines the configuration and operational state for OSPFv3 Extended LSAs, which is common across all vendor implementations. The semantics and encodings for OSPFv3 Extended LSAs are described in RFC 8362. OSPFv3 Extended LSAs provide extensible TLV-based LSAs for the base LSA types defined in RFC 5340. This YANG data model conforms to the Network Management Datastore Architecture (NMDA) 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 9587; see the RFC itself for full legal notices."; reference "RFC 9587: YANG Data Model for OSPFv3 Extended Link State Advertisements (LSAs)"; revision "2024-06-07" { description "Initial revision."; reference "RFC 9587: YANG Data Model for OSPFv3 Extended Link State Advertisements (LSAs)"; } identity ospfv3-e-router-lsa { base ospf:ospfv3-lsa-type; description "OSPFv3 E-Router-LSA - Type 0xA021."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 4.1"; } identity ospfv3-e-network-lsa { base ospf:ospfv3-lsa-type; description "OSPFv3 E-Network-LSA - Type 0xA022."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 4.2"; } identity ospfv3-e-summary-lsa-type { base ospf:ospfv3-lsa-type; description "OSPFv3 Extended Summary LSA types: E-Inter-Area-Prefix-LSA and E-Inter-Area-Router-LSA."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Sections 4.3 and 4.4"; } identity ospfv3-e-inter-area-prefix-lsa { base ospfv3-e-summary-lsa-type; description "OSPFv3 E-Inter-Area-Prefix-LSA - Type 0xA023."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 4.3"; } identity ospfv3-e-inter-area-router-lsa { base ospfv3-e-summary-lsa-type; description "OSPFv3 E-Inter-Area-Router-LSA - Type 0xA024."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 4.4"; } identity ospfv3-e-external-lsa-type { base ospf:ospfv3-lsa-type; description "OSPFv3 Extended External LSA types: E-AS-External-LSA and E-NSSA-LSA (where NSSA expands to Not-So-Stubby-Area)."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Sections 4.5 and 4.6"; } identity ospfv3-e-as-external-lsa { base ospfv3-e-external-lsa-type; description "OSPFv3 E-AS-External-LSA - Type 0xC025."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 4.5"; } identity ospfv3-e-nssa-lsa { base ospfv3-e-external-lsa-type; description "OSPFv3 E-NSSA-LSA - Type 0xA027."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 4.6"; } identity ospfv3-e-link-lsa { base ospf:ospfv3-lsa-type; description "OSPFv3 E-Link-LSA - Type 0x8028."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 4.7"; } identity ospfv3-e-intra-area-prefix-lsa { base ospf:ospfv3-lsa-type; description "OSPFv3 E-Intra-Area-Prefix-LSA - Type 0xA029."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 4.8"; } identity ospfv3-e-prefix-option { description "Base identity for OSPFv3 prefix options."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 3.1"; } identity nu-bit { base ospfv3-e-prefix-option; description "When set, the prefix should be excluded from IPv6 unicast calculations."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 3.1 RFC 5340: OSPF for IPv6, Appendix A.4.1.1"; } identity la-bit { base ospfv3-e-prefix-option; description "When set, the prefix is actually an IPv6 interface address of the advertising router."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 3.1 RFC 5340: OSPF for IPv6, Appendix A.4.1.1"; } identity p-bit { base ospfv3-e-prefix-option; description "When set, the NSSA prefix should be translated to an E-AS-External-LSA and advertised by the translating NSSA Border Router."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 3.1 RFC 5340: OSPF for IPv6, Appendix A.4.1.1"; } identity dn-bit { base ospfv3-e-prefix-option; description "When set, the E-Inter-Area-Prefix-LSA or E-AS-External-LSA prefix has been advertised as an L3VPN prefix."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 3.1 RFC 5340: OSPF for IPv6, Appendix A.4.1.1"; } identity n-bit { base ospfv3-e-prefix-option; description "When set, the prefix is a host address that identifies the advertising router."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 3.1 RFC 5340: OSPF for IPv6, Appendix A.4.1.1"; } identity ospfv3-e-external-prefix-option { description "Base identity for OSPFv3 external prefix options."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 3.6"; } identity e-bit { base ospfv3-e-external-prefix-option; description "When the E-bit is set, the metric specified is a Type 2 external metric. This means the metric is considered larger than any intra-AS path. When the E-bit is clear, the specified metric is a Type 1 external metric. This means that it is expressed in the same units as other LSAs (i.e., the same units as the interface costs in Router-LSAs)."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 3.6"; } grouping unknown-sub-tlv { description "Unknown TLV grouping."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 6.3"; container unknown-sub-tlv { description "Unknown External TLV sub-TLV."; uses ospf:tlv; } // container unknown-sub-tlv } // grouping unknown-sub-tlv grouping ospfv3-lsa-prefix { description "OSPFv3 LSA prefix."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 3"; leaf prefix { type inet:ip-prefix; description "LSA prefix."; } container prefix-options { description "Prefix options."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 3.1"; leaf-list prefix-options { type identityref { base ospfv3-e-prefix-option; } description "OSPFv3 prefix options flag list. This list will contain the identities for the OSPFv3 options that are set for the OSPFv3 prefix."; } } // container prefix-options } // grouping ospfv3-lsa-prefix grouping external-prefix-tlv { description "External-Prefix TLV grouping."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 3.6"; container external-prefix-tlv { description "External-Prefix TLV."; container flags { description "External prefix flags."; leaf-list ospfv3-e-external-prefix-bits { type identityref { base ospfv3-e-external-prefix-option; } description "OSPFv3 External-Prefix TLV bits list."; } } // container flags leaf metric { type ospf:ospf-metric; description "External prefix metric."; } uses ospfv3-lsa-prefix; list sub-tlvs { description "External-Prefix TLV sub-TLVs."; container ipv6-fwd-addr-sub-tlv { description "IPv6-Forwarding-Address sub-TLV for E-AS-External-LSAs and E-NSSA-LSAs for the IPv6 address family."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 3.10"; leaf forwarding-address { type inet:ipv6-address; description "IPv6 forwarding address."; } } // container ipv6-fwd-addr-sub-tlv container ipv4-fwd-addr-sub-tlv { description "IPv4-Forwarding-Address sub-TLV for E-AS-External-LSAs and E-NSSA-LSAs for the IPv4 address family."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 3.11"; leaf forwarding-address { type inet:ipv4-address; description "IPv4 forwarding address."; } } // container ipv4-fwd-addr-sub-tlv container route-tag-sub-tlv { description "Route-Tag sub-TLV."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 3.12"; leaf route-tag { type uint32; description "Route tag."; } } // container route-tag-sub-tlv uses unknown-sub-tlv; } // list sub-tlvs } // container external-prefix-tlv } // grouping external-prefix-tlv grouping intra-area-prefix-tlv { description "Intra-Area-Prefix TLV grouping."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 3.7"; container intra-prefix-tlv { description "Intra-Area-Prefix-LSA TLV."; leaf metric { type ospf:ospf-metric; description "Intra-Area Prefix metric."; } uses ospfv3-lsa-prefix; list sub-tlvs { description "Intra-Area-Prefix TLV sub-TLVs."; uses unknown-sub-tlv; } // list sub-tlvs } // container intra-prefix-tlv } // grouping intra-area-prefix-tlv grouping ipv6-link-local-addr-tlv { description "IPv6 Link-Local Address TLV grouping."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 3.8"; container ipv6-link-local-addr-tlv { description "IPv6 Link-Local Address TLV."; leaf link-local-address { type inet:ipv6-address; description "IPv6 Link-Local address."; } list sub-tlvs { description "IPv6 Link-Local Address TLV sub-TLVs."; uses unknown-sub-tlv; } // list sub-tlvs } // container ipv6-link-local-addr-tlv } // grouping ipv6-link-local-addr-tlv grouping ipv4-link-local-addr-tlv { description "IPv4 Link-Local Address TLV grouping."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 3.9"; container ipv4-link-local-addr-tlv { description "IPv4 Link-Local Address TLV."; leaf link-local-address { type inet:ipv4-address; description "IPv4 Link-Local address."; } list sub-tlvs { description "IPv4 Link-Local Address TLV sub-TLVs."; uses unknown-sub-tlv; } // list sub-tlvs } // container ipv4-link-local-addr-tlv } // grouping ipv4-link-local-addr-tlv augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf { when "../rt:type = 'ospf:ospfv3'" { description "This augments the OSPFv3 routing protocol when used."; } description "This augments the OSPFv3 protocol instance-level configuration with Extended LSA support. When enabled, OSPFv3 Extended LSAs will be advertised and OSPFv3 Legacy LSAs will not be advertised. When disabled, OSPFv3 Legacy LSAs will be advertised. However, OSPFv3 Extended LSAs could still be advertised in Extended LSA Sparse Mode to support incrementally deployed features as described in Section 6.2 of RFC 8362."; leaf extended-lsa-support { type boolean; default "false"; description "Enable OSPFv3 Extended LSA support for the OSPFv3 domain."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Appendix A - Global Configuration Support"; } } augment /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area { when "../../../rt:type = 'ospf:ospfv3'" { description "This augments the OSPFv3 protocol area-level configuration when used."; } description "This augments the OSPFv3 protocol area-level configuration with Extended LSA support."; leaf extended-lsa-support { type boolean; must "derived-from(../ospf:area-type,'stub-nssa-area') or " + "(current() = 'true') or " + "(../../../extended-lsa-support = 'false')" { description "For regular areas, i.e., areas where AS-scoped LSAs are flooded, disabling AreaExtendedLSASupport at the area level is prohibited when ExtendedLSASupport is enabled at the instance level. E-AS-External-LSAs are flooded into all OSPFv3 regular areas (i.e., not a stub or an NSSA), and disabling support at the area level is not possible."; } description "This augments the OSPFv3 protocol area-level configuration with Extended LSA support. When enabled, OSPFv3 Extended LSAs will be advertised and OSPFv3 Legacy LSAs will not be advertised. When disabled, OSPFv3 Legacy LSAs will be advertised. However, OSPFv3 Extended LSAs could still be advertised in Extended LSA Sparse Mode to support incrementally deployed features as described in Section 6.2 of RFC 8362. If not specified, Extended LSA support status is inherited from the instance-level configuration."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Appendix B - Area Configuration Support"; } } 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 { when "../../../../../../../../../../../" + "rt:type = 'ospf:ospfv3'" { description "This augmentation is only valid for OSPFv3."; } description "This augmentation adds OSPFv3 Link-scoped Extended LSAs to the operational state for an interface Link State Database (LSDB)."; container e-link { when "../../ospf:header/ospf:type = " + "'ospfv3-e-lsa:ospfv3-e-link-lsa'" { description "Only applies to E-Link-LSAs."; } description "E-Link-LSA contents."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 4.7"; leaf rtr-priority { type uint8; description "Router priority for the interface."; } uses ospf:ospfv3-lsa-options; list e-link-tlvs { description "E-Link-LSA TLVs."; container unknown-tlv { description "Unknown E-Link TLV."; uses ospf:tlv; } // container unknown-tlv uses intra-area-prefix-tlv; uses ipv6-link-local-addr-tlv; uses ipv4-link-local-addr-tlv; } // list e-link-tlvs } // container e-link } 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 "This augmentation adds OSPFv3 Area-scoped Extended LSAs to the operational state for an area LSDB."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 4"; container e-router { when "../../ospf:header/ospf:type = " + "'ospfv3-e-lsa:ospfv3-e-router-lsa'" { description "Only valid for OSPFv3 E-Router-LSAs."; } description "OSPFv3 E-Router-LSA contents."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 4.1"; uses ospf:ospf-router-lsa-bits; uses ospf:ospfv3-lsa-options; list e-router-tlvs { description "E-Router-LSA TLVs."; container unknown-tlv { description "Unknown E-Router TLV."; uses ospf:tlv; } // container unknown-tlv container link-tlv { description "E-Router-LSA TLV."; leaf interface-id { type uint32; description "Interface ID for link."; } leaf neighbor-interface-id { type uint32; description "Neighbor's Interface ID for link."; } leaf neighbor-router-id { type rt-types:router-id; description "Neighbor's Router ID for link."; } leaf type { type ospf:router-link-type; description "Link type: 1 - Point-to-Point Link 2 - Transit Network Link 3 - Stub Network Link 4 - Virtual Link."; } leaf metric { type ospf:ospf-link-metric; description "Link metric."; } list sub-tlvs { description "Link TLV sub-TLVs."; uses unknown-sub-tlv; } // list sub-tlvs } // container link-tlv } // list e-router-tlvs } // container e-router container e-network { when "../../ospf:header/ospf:type = " + "'ospfv3-e-lsa:ospfv3-e-network-lsa'" { description "Only applies to E-Network-LSAs."; } description "E-Network-LSA contents."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 4.2"; uses ospf:ospfv3-lsa-options; list e-network-tlvs { description "E-Network-LSA TLVs."; container unknown-tlv { description "Unknown E-Network TLV."; uses ospf:tlv; } // container unknown-tlv container attached-router-tlv { description "Attached-Routers TLV."; leaf-list adjacent-neighbor-router-id { type rt-types:router-id; description "Adjacent neighbor's Router ID."; } } // container attached-router-tlv } // list e-network-tlvs } // container e-network container e-nssa { when "../../ospf:header/ospf:type = " + "'ospfv3-e-lsa:ospfv3-e-nssa-lsa'" { description "Only applies to E-NSSA-LSAs."; } description "E-NSSA-LSA contents."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 4.6"; list e-external-tlvs { description "E-NSSA-LSA TLVs."; container unknown-tlv { description "Unknown E-External TLV."; uses ospf:tlv; } // container unknown-tlv uses external-prefix-tlv; } // list e-external-tlvs } // container e-nssa container e-inter-area-prefix { when "../../ospf:header/ospf:type = " + "'ospfv3-e-lsa:ospfv3-e-inter-area-prefix-lsa'" { description "Only applies to E-Inter-Area-Prefix-LSAs."; } description "E-Inter-Area-Prefix-LSA contents."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 4.3"; list e-inter-prefix-tlvs { description "E-Inter-Area-Prefix-LSA TLVs."; container unknown-tlv { description "Unknown E-Inter-Area-Prefix TLV."; uses ospf:tlv; } // container unknown-tlv container inter-prefix-tlv { description "Unknown E-Inter-Area-Prefix-LSA TLV."; leaf metric { type ospf:ospf-metric; description "Inter-Area Prefix metric."; } uses ospfv3-lsa-prefix; list sub-tlvs { description "Inter-Area-Prefix TLV sub-TLVs."; uses unknown-sub-tlv; } // list sub-tlvs } // container inter-prefix-tlv } // list e-inter-prefix-tlvs } // container e-inter-area-prefix container e-inter-area-router { when "../../ospf:header/ospf:type = " + "'ospfv3-e-lsa:ospfv3-e-inter-area-router-lsa'" { description "Only applies to E-Inter-Area-Router-LSAs."; } description "E-Inter-Area-Router-LSA contents."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 4.4"; list e-inter-router-tlvs { description "E-Inter-Area-Router-LSA TLVs."; container unknown-tlv { description "Unknown E-Inter-Area-Router TLV."; uses ospf:tlv; } // container unknown-tlv container inter-router-tlv { description "Unknown E-Inter-Area-Router-LSA TLV."; uses ospf:ospfv3-lsa-options; leaf metric { type ospf:ospf-metric; description "Inter-Area Router metric."; } leaf destination-router-id { type rt-types:router-id; description "Destination Router ID."; } list sub-tlvs { description "Inter-Area-Router TLV sub-TLVs."; uses unknown-sub-tlv; } // list sub-tlvs } // container inter-router-tlv } // list e-inter-router-tlvs } // container e-inter-area-router container e-intra-area-prefix { when "../../ospf:header/ospf:type = " + "'ospfv3-e-lsa:ospfv3-e-intra-area-prefix-lsa'" { description "Only applies to E-Intra-Area-Prefix-LSAs."; } description "E-Intra-Area-Prefix-LSA contents."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 4.8"; leaf referenced-ls-type { type uint16; description "Referenced Link State type."; } leaf referenced-link-state-id { type uint32; description "Referenced Link State ID."; } leaf referenced-adv-router { type rt-types:router-id; description "Referenced advertising router."; } list e-intra-prefix-tlvs { description "E-Intra-Area-Prefix-LSA TLVs."; container unknown-tlv { description "Unknown E-Intra-Area-Prefix TLV."; uses ospf:tlv; } // container unknown-tlv uses intra-area-prefix-tlv; } // list e-intra-prefix-tlvs } // container e-intra-area-prefix } 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 "../../../../../../../" + "rt:type = 'ospf:ospfv3'" { description "This augmentation is only valid for OSPFv3."; } description "This augmentation adds OSPFv3 AS-scoped Extended LSAs to the operational state for an AS instance-level LSDB."; container e-as-external { when "../../ospf:header/ospf:type = " + "'ospfv3-e-lsa:ospfv3-e-as-external-lsa'" { description "Only applies to E-AS-External-LSAs."; } description "E-AS-External-LSA contents."; reference "RFC 8362: OSPFv3 Link State Advertisement (LSA) Extensibility, Section 4.5"; list e-external-tlvs { description "E-AS-External-LSA TLVs."; container unknown-tlv { description "Unknown E-External TLV."; uses ospf:tlv; } // container unknown-tlv uses external-prefix-tlv; } // list e-external-tlvs } // container e-as-external } } // module ietf-ospfv3-extended-lsa
© 2023 YumaWorks, Inc. All rights reserved.