module ietf-mpls-ldp-extended { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-mpls-ldp-extended"; prefix ldp-ext; 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-key-chain { prefix key-chain; reference "RFC 8177: YANG Data Model for Key Chains"; } import ietf-mpls-ldp { prefix ldp; reference "RFC 9070: YANG Data Model for MPLS LDP"; } import ietf-interfaces { prefix if; reference "RFC 8343: A YANG Data Model for Interface Management"; } import ietf-routing-policy { prefix rt-pol; reference "RFC 9067: A YANG Data Model for Routing Policy"; } organization "IETF MPLS Working Group"; contact "WG Web: WG List: Editor: Kamran Raza Author: Rajiv Asati Author: Xufeng Liu Author: Santosh Easale Author: Xia Chen Author: Himanshu Shah "; description "This YANG module defines the extended components for the management of Multiprotocol Label Switching (MPLS) Label Distribution Protocol (LDP). It is also the model to be augmented for extended Multipoint LDP (mLDP). Copyright (c) 2022 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 9070; see the RFC itself for full legal notices."; revision 2022-03-14 { description "Initial revision."; reference "RFC 9070: YANG Data Model for MPLS LDP"; } /* * Features */ feature capability-end-of-lib { description "This feature indicates that the system allows for the configuration of LDP end-of-lib capability."; } feature capability-typed-wildcard-fec { description "This feature indicates that the system allows for the configuration of LDP typed-wildcard-fec capability."; } feature capability-upstream-label-assignment { description "This feature indicates that the system allows for the configuration of LDP upstream label assignment capability."; } feature forwarding-nexthop-config { description "This feature indicates that the system allows for controlling MPLS forwarding on an LDP interface."; } feature graceful-restart-helper-mode { description "This feature indicates that the system supports graceful restart helper mode. We call an LSR to be operating in GR helper mode when it advertises 0 as its FT Reconnect Timeout in the FT Session TLV. Please refer to Section 2 of RFC 3478 for details."; } feature key-chain { description "This feature indicates that the system supports key-chain for authentication."; } feature peers-dual-stack-transport-preference { description "This feature indicates that the system allows for the configuration of the transport connection preference in a dual-stack setup for peers."; } feature per-interface-timer-config { description "This feature indicates that the system allows for the configuration of interface Hello timers at the per-interface level."; } feature per-peer-admin-down { description "This feature indicates that the system allows for the administrative disabling of a peer."; } feature per-peer-graceful-restart-config { description "This feature indicates that the system allows for the configuration of graceful restart at the per-peer level."; } feature per-peer-session-attributes-config { description "This feature indicates that the system allows for the configuration of session attributes at the per-peer level."; } feature policy-label-assignment-config { description "This feature indicates that the system allows for the configuration of policies to assign labels according to certain prefixes."; } feature policy-ordered-label-config { description "This feature indicates that the system allows for the configuration of ordered label policies."; } feature policy-targeted-discovery-config { description "This feature indicates that the system allows for the configuration of policies to control the acceptance of targeted neighbor-discovery Hello messages."; } feature session-downstream-on-demand-config { description "This feature indicates that the system allows for the configuration of session downstream on demand."; } /* * Typedefs */ typedef neighbor-list-ref { type leafref { path "/rt-pol:routing-policy/rt-pol:defined-sets/" + "rt-pol:neighbor-sets/rt-pol:neighbor-set/rt-pol:name"; } description "A type for a reference to a neighbor address list. The string value is the name identifier for uniquely identifying the referenced address list, which contains a list of addresses that a routing policy can applied."; reference "RFC 9067: A YANG Data Model for Routing Policy"; } typedef prefix-list-ref { type leafref { path "/rt-pol:routing-policy/rt-pol:defined-sets/" + "rt-pol:prefix-sets/rt-pol:prefix-set/rt-pol:name"; } description "A type for a reference to a prefix list. The string value is the name identifier for uniquely identifying the referenced prefix set, which contains a list of prefixes that a routing policy can applied."; reference "RFC 9067: A YANG Data Model for Routing Policy"; } typedef peer-list-ref { type leafref { path "/rt-pol:routing-policy/rt-pol:defined-sets/" + "rt-pol:neighbor-sets/rt-pol:neighbor-set/rt-pol:name"; } description "A type for a reference to a peer address list. The string value is the name identifier for uniquely identifying the referenced address list, which contains a list of addresses that a routing policy can applied."; reference "RFC 9067: A YANG Data Model for Routing Policy"; } /* * Identities */ /* * Groupings */ grouping address-family-ipv4-augment { description "Augmentation to address family IPv4."; uses policy-container; leaf transport-address { type inet:ipv4-address; description "The transport address advertised in LDP Hello messages. If this value is not specified, the LDP LSR Id is used as the transport address."; reference "RFC 5036: LDP Specification, Sec. 3.5.2."; } } grouping authentication-keychain-augment { description "Augmentation to authentication to add key-chain."; leaf key-chain { type key-chain:key-chain-ref; description "key-chain name. If not specified, no key chain is used."; } } grouping capability-augment { description "Augmentation to capability."; container end-of-lib { if-feature "capability-end-of-lib"; description "Configure end-of-lib capability."; leaf enabled { type boolean; default "false"; description "'true' to enable end-of-lib capability."; } } container typed-wildcard-fec { if-feature "capability-typed-wildcard-fec"; description "Configure typed-wildcard-fec capability."; leaf enabled { type boolean; default "false"; description "'true' to enable typed-wildcard-fec capability."; } } container upstream-label-assignment { if-feature "capability-upstream-label-assignment"; description "Configure upstream label assignment capability."; leaf enabled { type boolean; default "false"; description "'true' to enable upstream label assignment."; } } } // capability-augment grouping global-augment { description "Augmentation to global attributes."; leaf igp-synchronization-delay { type uint16 { range "0 | 3..300"; } units "seconds"; default "0"; description "Sets the interval that the LDP waits before notifying the Interior Gateway Protocol (IGP) that label exchange is completed so that IGP can start advertising the normal metric for the link. If the value is not specified, there is no delay."; } } grouping global-forwarding-nexthop-augment { description "Augmentation at the global level for controlling MPLS forwarding on LDP interfaces."; container forwarding-nexthop { if-feature "forwarding-nexthop-config"; description "Configuration for controlling MPLS forwarding on LDP interfaces."; container interfaces { description "Containing a list of interfaces on which forwarding can be disabled."; list interface { key "name"; description "List of LDP interfaces on which forwarding can be disabled."; uses ldp:ldp-interface-ref; list address-family { key "afi"; description "Per-vrf per-af params."; leaf afi { type identityref { base rt:address-family; } description "Address family type value."; } leaf ldp-disable { type boolean; default "false"; description "'true' to disable LDP forwarding on the interface."; } } } // interface } // interfaces } // forwarding-nexthop } // global-forwarding-nexthop-augment grouping graceful-restart-augment { description "Augmentation to graceful restart."; leaf helper-enabled { if-feature "graceful-restart-helper-mode"; type boolean; default "false"; description "Enable or disable graceful restart helper mode."; } } grouping interface-address-family-ipv4-augment { description "Augmentation to interface address family IPv4."; leaf transport-address { type union { type enumeration { enum use-global-transport-address { description "Use the transport address set at the global level common for all interfaces for this address family."; } enum use-interface-address { description "Use interface address as the transport address."; } } type inet:ipv4-address; } default "use-global-transport-address"; description "IP address to be advertised as the LDP transport address."; } } grouping interface-address-family-ipv6-augment { description "Augmentation to interface address family IPv6."; leaf transport-address { type union { type enumeration { enum use-global-transport-address { description "Use the transport address set at the global level common for all interfaces for this address family."; } enum use-interface-address { description "Use interface address as the transport address."; } } type inet:ipv6-address; } default "use-global-transport-address"; description "IP address to be advertised as the LDP transport address."; } } grouping interface-augment { description "Augmentation to interface."; uses ldp:basic-discovery-timers { if-feature "per-interface-timer-config"; } leaf igp-synchronization-delay { if-feature "per-interface-timer-config"; type uint16 { range "0 | 3..300"; } units "seconds"; description "Sets the interval that the LDP waits before notifying the Interior Gateway Protocol (IGP) that label exchange is completed so that IGP can start advertising the normal metric for the link. This leaf may be configured at the per-interface level or the global level, with precedence given to the value at the per-interface level. If the leaf is not configured at either level, the default value at the global level is used."; } } grouping peer-af-policy-container { description "LDP policy attribute container under peer address family."; container label-policy { description "Label policy attributes."; container advertise { description "Label advertising policies."; leaf prefix-list { type prefix-list-ref; description "Applies the prefix list to filter outgoing label advertisements. If the value is not specified, no prefix filter is applied."; } } container accept { description "Label advertisement acceptance policies."; leaf prefix-list { type prefix-list-ref; description "Applies the prefix list to filer incoming label advertisements. If the value is not specified, no prefix filter is applied."; } } } } // peer-af-policy-container grouping peer-augment { description "Augmentation to each peer list entry."; leaf admin-down { if-feature "per-peer-admin-down"; type boolean; default "false"; description "'true' to disable the peer."; } uses ldp:graceful-restart-attributes-per-peer { if-feature "per-peer-graceful-restart-config"; } uses ldp:peer-attributes { if-feature "per-peer-session-attributes-config"; } } grouping peers-augment { description "Augmentation to peers container."; container session-downstream-on-demand { if-feature "session-downstream-on-demand-config"; description "Session downstream-on-demand attributes."; leaf enabled { type boolean; default "false"; description "'true' if session downstream on demand is enabled."; } leaf peer-list { type peer-list-ref; description "The name of a peer ACL, to be applied to the downstream-on-demand sessions. If this value is not specified, no filter is applied to any downstream-on-demand sessions."; } } container dual-stack-transport-preference { if-feature "peers-dual-stack-transport-preference"; description "The settings of peers to establish TCP connection in a dual-stack setup."; leaf max-wait { type uint16 { range "0..60"; } default "30"; description "The maximum wait time in seconds for preferred transport connection establishment. 0 indicates no preference."; } container prefer-ipv4 { presence "Present if IPv4 is preferred for transport connection establishment, subject to the 'peer-list' in this container."; description "Uses IPv4 as the preferred address family for transport connection establishment, subject to the 'peer-list' in this container. If this container is not present, as a default, IPv6 is the preferred address family for transport connection establishment."; leaf peer-list { type peer-list-ref; description "The name of a peer ACL, to be applied to the IPv4 transport connections. If this value is not specified, no filter is applied, and the IPv4 is preferred for all peers."; } } } } // peers-augment grouping policy-container { description "LDP policy attributes."; container label-policy { description "Label policy attributes."; container advertise { description "Label advertising policies."; container egress-explicit-null { description "Enables an egress router to advertise an explicit null label (value 0) in place of an implicit null label (value 3) to the penultimate hop router."; leaf enabled { type boolean; default "false"; description "'true' to enable explicit null."; } } leaf prefix-list { type prefix-list-ref; description "Applies the prefix list to filter outgoing label advertisements. If the value is not specified, no prefix filter is applied."; } } container accept { description "Label advertisement acceptance policies."; leaf prefix-list { type prefix-list-ref; description "Applies the prefix list to filter incoming label advertisements. If the value is not specified, no prefix filter is applied."; } } container assign { if-feature "policy-label-assignment-config"; description "Label assignment policies."; container independent-mode { description "Independent label policy attributes."; leaf prefix-list { type prefix-list-ref; description "Assign labels according to certain prefixes. If the value is not specified, no prefix filter is applied (labels are assigned to all learned routes)."; } } container ordered-mode { if-feature "policy-ordered-label-config"; description "Ordered label policy attributes."; leaf egress-prefix-list { type prefix-list-ref; description "Assign labels according to certain prefixes for egress LSR."; } } } // assign } // label-policy } // policy-container /* * Configuration and state data nodes */ // Forwarding nexthop augmentation to the global tree augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:global" { description "Forwarding nexthop augmentation."; uses global-forwarding-nexthop-augment; } // global/address-families/ipv6 augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:global/" + "ldp:address-families" { description "Global IPv6 augmentation."; container ipv6 { presence "Present if IPv6 is enabled, unless the 'enabled' leaf is set to 'false'."; description "Containing data related to the IPv6 address family."; leaf enabled { type boolean; default "true"; description "'false' to disable the address family."; } uses policy-container; leaf transport-address { type inet:ipv6-address; mandatory true; description "The transport address advertised in LDP Hello messages."; } leaf label-distribution-control-mode { type enumeration { enum independent { description "Independent label distribution control."; } enum ordered { description "Ordered label distribution control."; } } config false; description "Label distribution control mode."; reference "RFC 5036: LDP Specification, Sec. 2.6."; } // ipv6 bindings container bindings { config false; description "LDP address and label binding information."; list address { key "address"; description "List of address bindings learned by LDP."; leaf address { type inet:ipv6-address; description "The IPv6 address learned from an Address message received from or advertised to a peer."; } uses ldp:binding-address-state-attributes; } list fec-label { key "fec"; description "List of FEC-label bindings learned by LDP."; leaf fec { type inet:ipv6-prefix; description "The prefix FEC value in the FEC-Label binding, learned in a Label Mapping message received from or advertised to a peer."; } uses ldp:binding-label-state-attributes; } } // bindings } // ipv6 } // discovery/interfaces/interface/address-families/ipv6 augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:discovery/" + "ldp:interfaces/ldp:interface/" + "ldp:address-families" { description "Interface IPv6 augmentation."; container ipv6 { presence "Present if IPv6 is enabled, unless the 'enabled' leaf is set to 'false'."; description "IPv6 address family."; leaf enabled { type boolean; default "true"; description "'false' to disable the address family on the interface."; } container hello-adjacencies { config false; description "Containing a list of Hello adjacencies."; list hello-adjacency { key "adjacent-address"; config false; description "List of Hello adjacencies."; leaf adjacent-address { type inet:ipv6-address; description "Neighbor address of the Hello adjacency."; } uses ldp:adjacency-state-attributes; uses ldp:ldp-peer-ref-from-interface; } } } // ipv6 } // discovery/targeted/address-families/ipv6 augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:discovery/" + "ldp:targeted/ldp:address-families" { description "Targeted discovery IPv6 augmentation."; container ipv6 { presence "Present if IPv6 is enabled."; description "IPv6 address family."; container hello-adjacencies { config false; description "Containing a list of Hello adjacencies."; list hello-adjacency { key "local-address adjacent-address"; config false; description "List of Hello adjacencies."; leaf local-address { type inet:ipv6-address; description "Local address of the Hello adjacency."; } leaf adjacent-address { type inet:ipv6-address; description "Neighbor address of the Hello adjacency."; } uses ldp:adjacency-state-attributes; uses ldp:ldp-peer-ref-from-target; } } list target { key "adjacent-address"; description "Targeted discovery params."; leaf adjacent-address { type inet:ipv6-address; description "Configures a remote LDP neighbor for the extended LDP discovery."; } leaf enabled { type boolean; default "true"; description "'true' to enable the target."; } leaf local-address { type inet:ipv6-address; description "The local address used as the source address to send targeted Hello messages. If the value is not specified, the transport address is used as the source address."; } } // target } // ipv6 } // /peers/peer/state/address-families/ipv6 augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:peers/" + "ldp:peer/ldp:address-families" { description "Peer state IPv6 augmentation."; container ipv6 { presence "Present if IPv6 is enabled."; description "IPv6 address family."; container hello-adjacencies { config false; description "Containing a list of Hello adjacencies."; list hello-adjacency { key "local-address adjacent-address"; description "List of Hello adjacencies."; leaf local-address { type inet:ipv6-address; description "Local address of the Hello adjacency."; } leaf adjacent-address { type inet:ipv6-address; description "Neighbor address of the Hello adjacency."; } uses ldp:adjacency-state-attributes; leaf interface { type if:interface-ref; description "Interface for this adjacency."; } } } } // ipv6 } /* * Configuration data and operational state data nodes */ augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:global" { description "Graceful restart augmentation."; uses global-augment; } augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:global/" + "ldp:capability" { description "Capability augmentation."; uses capability-augment; } augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:global/" + "ldp:graceful-restart" { description "Graceful restart augmentation."; uses graceful-restart-augment; } augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:global/" + "ldp:address-families/ldp:ipv4" { description "Address family IPv4 augmentation."; uses address-family-ipv4-augment; } augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:discovery/" + "ldp:interfaces/ldp:interface" { description "Interface augmentation."; uses interface-augment; } augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:discovery/" + "ldp:interfaces/ldp:interface/ldp:address-families/" + "ldp:ipv4" { description "Interface address family IPv4 augmentation."; uses interface-address-family-ipv4-augment; } augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:discovery/" + "ldp:interfaces/ldp:interface/ldp:address-families/" + "ldp-ext:ipv6" { description "Interface address family IPv6 augmentation."; uses interface-address-family-ipv6-augment; } augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:discovery/" + "ldp:targeted/ldp:hello-accept" { description "Targeted discovery augmentation."; leaf neighbor-list { if-feature "policy-targeted-discovery-config"; type neighbor-list-ref; description "The name of a neighbor ACL, used to accept Hello messages from LDP peers as permitted by the neighbor-list policy. If this value is not specified, targeted Hello messages from any source are accepted."; } } augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:peers" { description "Peers augmentation."; uses peers-augment; } augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:peers/" + "ldp:authentication/ldp:authentication-type" { if-feature "key-chain"; description "Peers authentication augmentation."; case key-chain { uses authentication-keychain-augment; } } augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:peers/" + "ldp:peer" { description "Peer list entry augmentation."; uses peer-augment; } augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:peers/" + "ldp:peer/ldp:authentication/ldp:authentication-type" { if-feature "key-chain"; description "Peer list entry authentication augmentation."; case key-chain { uses authentication-keychain-augment; } } augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:peers/" + "ldp:peer/ldp:address-families/ldp:ipv4" { description "Peer list entry IPv4 augmentation."; uses peer-af-policy-container; } augment "/rt:routing/rt:control-plane-protocols/" + "rt:control-plane-protocol/ldp:mpls-ldp/ldp:peers/" + "ldp:peer/ldp:address-families/ldp-ext:ipv6" { description "Peer list entry IPv6 augmentation."; uses peer-af-policy-container; } }