module ietf-mpls-ldp-extended {
namespace "urn:ietf:params:xml:ns:yang:ietf-mpls-ldp-extended";
prefix "ldp-ext";
import ietf-inet-types {
prefix "inet";
}
import ietf-routing {
prefix "rt";
}
import ietf-key-chain {
prefix "key-chain";
}
import ietf-mpls-ldp {
prefix "ldp";
}
import ietf-interfaces {
prefix "if";
}
organization
"IETF MPLS Working Group";
contact
"WG Web:
WG List:
WG Chair: Loa Andersson
WG Chair: Ross Callon
WG Chair: George Swallow
Editor: Kamran Raza
Editor: Rajiv Asati
Editor: Xufeng Liu
Editor: Santosh Esale
Editor: Xia Chen
Editor: Himanshu Shah
";
description
"This YANG module defines the essential components for the
management of Multi-Protocol Label Switching (MPLS) Label
Distribution Protocol (LDP). It is also the base model to
be augmented for Multipoint LDP (mLDP).";
revision 2017-10-29 {
description
"Initial revision.";
reference
"RFC XXXX: YANG Data Model for MPLS LDP.";
}
/*
* Features
*/
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 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-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.";
}
} // 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.";
}
} // 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;
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;
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;
description
"Enable upstream label assignment.";
}
}
} // capability-augment
grouping global-augment {
description "Augmentation to global attributes.";
leaf igp-synchronization-delay {
type uint16 {
range 3..60;
}
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.";
}
} // 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.";
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;
description
"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;
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-interface-address" {
description
"Use interface address as the transport address.";
}
}
type inet:ipv4-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-interface-address" {
description
"Use interface address as the transport address.";
}
}
type inet:ipv6-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 3..60;
}
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.";
}
} // 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 outgoing label
advertisements.";
}
}
container accept {
description
"Label advertisement acceptance policies.";
leaf prefix-list {
type prefix-list-ref;
description
"Applies the prefix list to incoming label
advertisements.";
}
} // accept
} // label-policy
} // peer-af-policy-container
grouping peer-augment {
description "Augmentation to each peer list entry.";
leaf 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;
description
"'true' if session downstream-on-demand is enabled.";
}
leaf peer-list {
type peer-list-ref;
description
"The name of a peer ACL.";
}
}
} // 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;
description
"'true' to enable explicit null.";
}
}
leaf prefix-list {
type prefix-list-ref;
description
"Applies the prefix list to outgoing label
advertisements.";
}
} // advertise
container accept {
description
"Label advertisement acceptance policies.";
leaf prefix-list {
type prefix-list-ref;
description
"Applies the prefix list to incoming label
advertisements.";
}
} // 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.";
}
} // 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
"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.";
leaf address {
type inet:ipv6-address;
description
"Binding address.";
}
uses ldp:binding-address-state-attributes;
} // binding-address
list fec-label {
key "fec";
description
"List of label bindings.";
leaf fec {
type inet:ipv6-prefix;
description
"Prefix FEC.";
}
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;
leaf peer {
type leafref {
path "../../../../../../../../ldp:peers/ldp:peer/"
+ "ldp:lsr-id";
}
description
"LDP peer from this adjacency.";
}
} // 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;
leaf peer {
type leafref {
path "../../../../../../../ldp:peers/ldp:peer/"
+ "ldp:lsr-id";
}
description
"LDP peer from this adjacency.";
}
} // 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;
description
"Enable the target.";
}
leaf local-address {
type inet:ipv6-address;
description
"The local 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 peer ACL.";
}
}
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" {
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" {
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;
}
}