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 XXXX: YANG Data Model for MPLS LDP";
// RFC Editor: replace XXXX with actual RFC number and remove
// this note
}
import ietf-interfaces {
prefix "if";
reference "RFC 8343: A YANG Data Model for Interface Management";
}
organization
"IETF MPLS Working Group";
contact
"WG Web:
WG List:
Editor: Kamran Raza
Editor: Rajiv Asati
Editor: Xufeng Liu
Editor: Santosh Esale
Editor: Xia Chen
Editor: Himanshu Shah
";
description
"This YANG module defines the extended components for the
management of Multi-Protocol Label Switching (MPLS) Label
Distribution Protocol (LDP). It is also the model to
be augmented for extended Multipoint LDP (mLDP).
Copyright (c) 2018 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see the
RFC itself for full legal notices.";
// RFC Editor: replace XXXX with actual RFC number and remove
// this note
revision 2018-10-22 {
description
"Initial revision.";
reference
"RFC XXXX: YANG Data Model for MPLS LDP.";
// RFC Editor: replace XXXX with actual RFC number and remove
// this note
}
/*
* Features
*/
feature dual-stack-transport-pereference {
description
"This feature indicates that the system allows to configure
the transport connection pereference in a dual-stack setup.";
}
feature capability-end-of-lib {
description
"This feature indicates that the system allows to configure
LDP end-of-lib capability.";
}
feature capability-typed-wildcard-fec {
description
"This feature indicates that the system allows to configure
LDP typed-wildcard-fec capability.";
}
feature capability-upstream-label-assignment {
description
"This feature indicates that the system allows to configure
LDP upstream label assignment capability.";
}
feature forwarding-nexthop-config {
description
"This feature indicates that the system allows to configure
forwarding nexthop on interfaces.";
}
feature graceful-restart-helper-mode {
description
"This feature indicates that the system supports graceful
restart helper mode.";
}
feature key-chain {
description
"This feature indicates that the system supports keychain for
authentication.";
}
feature per-interface-timer-config {
description
"This feature indicates that the system allows to configure
interface hello timers at the per-interface level.";
}
feature per-peer-admin-down {
description
"This feature indicates that the system allows to
administratively disable a peer.";
}
feature per-peer-graceful-restart-config {
description
"This feature indicates that the system allows to configure
graceful restart at the per-peer level.";
}
feature per-peer-session-attributes-config {
description
"This feature indicates that the system allows to configure
session attributes at the per-peer level.";
}
feature policy-label-assignment-config {
description
"This feature indicates that the system allows to configure
policies to assign labels according to certain prefixes.";
}
feature policy-ordered-label-config {
description
"This feature indicates that the system allows to configure
ordered label policies.";
}
feature policy-targeted-discovery-config {
description
"This feature indicates that the system allows to configure
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 to configure
session downstream-on-demand";
}
/*
* Typedefs
*/
typedef neighbor-list-ref {
type string;
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. The definition
of such an address list is outside the scope of this
document.";
}
typedef prefix-list-ref {
type string;
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. The definition
of such a prefix set is outside the scope of this document.";
}
typedef peer-list-ref {
type string;
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. The definition
of such an address list is outside the scope of this
document.";
}
/*
* 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
"RFC5036. Sec. 3.5.2.";
}
} // address-family-ipv4-augment
grouping authentication-keychain-augment {
description "Augmentation to authentication to add keychain.";
leaf key-chain {
type key-chain:key-chain-ref;
description
"key-chain name.
If not specified, no key chain is used.";
}
} // authentication-keychain-augment
grouping capability-augment {
description "Augmentation to capability.";
container end-of-lib {
if-feature capability-end-of-lib;
description
"Configure end-of-lib capability.";
leaf enable {
type boolean;
default false;
description
"Enable end-of-lib capability.";
}
}
container typed-wildcard-fec {
if-feature capability-typed-wildcard-fec;
description
"Configure typed-wildcard-fec capability.";
leaf enable {
type boolean;
default false;
description
"Enable typed-wildcard-fec capability.";
}
}
container upstream-label-assignment {
if-feature capability-upstream-label-assignment;
description
"Configure upstream label assignment capability.";
leaf enable {
type boolean;
default false;
description
"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.";
}
} // global-augment
grouping global-forwarding-nexthop-augment {
description
"Augmentation to global forwarding nexthop interfaces.";
container forwarding-nexthop {
if-feature forwarding-nexthop-config;
description
"Configuration for forwarding nexthop.";
container interfaces {
description
"A list of interfaces on which forwarding is disabled.";
list interface {
key "name";
description
"List of LDP interfaces used for LDP Basic Discovery.";
uses ldp:ldp-interface-ref;
list address-family {
key "afi";
description
"Per-vrf per-af params.";
leaf afi {
type ldp:ldp-address-family;
description
"Address family type value.";
}
leaf ldp-disable {
type boolean;
default false;
description
"'true' to disable LDP forwarding on the interface.";
}
} // address-family
} // list interface
} // interfaces
} // forwarding-nexthop
} // global-forwarding-nexthop-augment
grouping graceful-restart-augment {
description "Augmentation to graceful restart.";
leaf helper-enable {
if-feature graceful-restart-helper-mode;
type boolean;
default false;
description
"Enable or disable graceful restart helper mode.";
}
} // graceful-restart-augment
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.";
}
} // interface-address-family-ipv4-augment
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.";
}
} // interface-address-family-ipv6-augment
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;
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.";
}
} // interface-augment
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.";
}
} // accept
} // label-policy
} // 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;
}
} // peer-augment
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 enable {
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-pereference {
if-feature dual-stack-transport-pereference;
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 prefered for transport connection
establishment, subject to the 'peer-list' in this
container.";
description
"Uses IPv4 as the prefered 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 prefered 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 prefered 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 enable {
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.";
}
} // advertise
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.";
}
} // accept
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).";
}
} // independent-mode
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.";
}
} // ordered-mode
} // assign
} // label-policy
} // policy-container
/*
* Configuration and state data nodes
*/
// Forwarding nexthop augmentation to the global tree
augment "/rt:routing/rt:control-plane-protocols/ldp:mpls-ldp/"
+ "ldp:global" {
description "Graceful forwarding nexthop augmentation.";
uses global-forwarding-nexthop-augment;
}
// global/address-families/ipv6
augment "/rt:routing/rt:control-plane-protocols/ldp:mpls-ldp/"
+ "ldp:global/ldp:address-families" {
description "Global IPv6 augmentation.";
container ipv6 {
presence
"Present if IPv6 is enabled, unless the 'enable'
leaf is set to 'false'";
description
"Containing data related to the IPv6 address family.";
leaf enable {
type boolean;
default true;
description
"'true' to enable 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-controlmode {
type enumeration {
enum independent {
description
"Independent label distribution control.";
}
enum ordered {
description
"Ordered label distribution control.";
}
}
config false;
description
"Label distribution control mode.";
reference
"RFC5036: 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;
} // binding-address
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;
} // fec-label
} // bindings
} // ipv6
}
// discovery/interfaces/interface/address-families/ipv6
augment "/rt:routing/rt:control-plane-protocols/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 'enable'
leaf is set to 'false'";
description
"IPv6 address family.";
leaf enable {
type boolean;
default true;
description
"Enable the address family on the interface.";
}
// ipv6
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-container;
} // hello-adjacency
} // hello-adjacencies
} // ipv6
}
// discovery/targeted/address-families/ipv6
augment "/rt:routing/rt:control-plane-protocols/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-container;
} // hello-adjacency
} // hello-adjacencies
list target {
key "adjacent-address";
description
"Targeted discovery params.";
leaf adjacent-address {
type inet:ipv6-address;
description
"Configures a remote LDP neighbor and enables
extended LDP discovery of the specified
neighbor.";
}
leaf enable {
type boolean;
default true;
description
"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/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.";
}
} // hello-adjacency
} // hello-adjacencies
} // ipv6
}
/*
* Configuration data and operational state data nodes
*/
augment "/rt:routing/rt:control-plane-protocols/ldp:mpls-ldp/"
+ "ldp:global" {
description "Graceful restart augmentation.";
uses global-augment;
}
augment "/rt:routing/rt:control-plane-protocols/ldp:mpls-ldp/"
+ "ldp:global/ldp:capability" {
description "Capability augmentation.";
uses capability-augment;
}
augment "/rt:routing/rt:control-plane-protocols/ldp:mpls-ldp/"
+ "ldp:global/ldp:graceful-restart" {
description "Graceful restart augmentation.";
uses graceful-restart-augment;
}
augment "/rt:routing/rt:control-plane-protocols/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/ldp:mpls-ldp/"
+ "ldp:discovery/ldp:interfaces/ldp:interface" {
description "Interface augmentation.";
uses interface-augment;
}
augment "/rt:routing/rt:control-plane-protocols/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/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/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, 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/ldp:mpls-ldp/"
+ "ldp:peers" {
description "Peers augmentation.";
uses peers-augment;
}
augment "/rt:routing/rt:control-plane-protocols/ldp:mpls-ldp/"
+ "ldp:peers/ldp:authentication/ldp:auth-type-selection" {
if-feature key-chain;
description "Peers authentication augmentation.";
case auth-key-chain {
uses authentication-keychain-augment;
}
}
augment "/rt:routing/rt:control-plane-protocols/ldp:mpls-ldp/"
+ "ldp:peers/ldp:peer" {
description "Peer list entry augmentation.";
uses peer-augment;
}
augment "/rt:routing/rt:control-plane-protocols/ldp:mpls-ldp/"
+ "ldp:peers/ldp:peer/ldp:authentication/"
+ "ldp:auth-type-selection" {
if-feature key-chain;
description "Peer list entry authentication augmentation.";
case auth-key-chain {
uses authentication-keychain-augment;
}
}
augment "/rt:routing/rt:control-plane-protocols/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/ldp:mpls-ldp/"
+ "ldp:peers/ldp:peer/ldp:address-families/ldp-ext:ipv6" {
description
"Peer list entry IPv6 augmentation.";
uses peer-af-policy-container;
}
}