module ietf-softwire-ce {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-softwire-ce";
prefix "softwire-ce";
import ietf-inet-types {
prefix inet;
reference
"Section 4 of RFC 6991";
}
/*import ietf-yang-types {
prefix yang;
reference
"Section 3 of RFC 6991";
}*/
import ietf-interfaces {
prefix if;
reference
"RFC 8343: A YANG Data Model for Interface Management";
}
import ietf-softwire-common {
prefix softwire-common;
reference
"RFC XXXX: YANG Modules for IPv4-in-IPv6 Address plus Port
Softwires";
}
import iana-tunnel-type {
prefix iana-tunnel-type;
reference
"RFC XXXX: YANG Modules for IPv4-in-IPv6 Address plus Port
Softwires";
}
import ietf-interface-tunnel {
prefix ift;
reference
"RFC XXXX: YANG Modules for IPv4-in-IPv6 Address plus Port
Softwires";
}
organization
"IETF Softwire Working Group";
contact
"WG Web:
WG List:
Qi Sun
Linhui Sun
Yong Cui
Ian Farrer
Sladjana Zoric
Mohamed Boucadair
Rajiv
";
description
"This document defines a YANG data module for the configuration and
management of A+P Softwire Customer Premises Equipment (CEs). It
covers Lightweight 4over6, MAP-E, and MAP-T mechanisms.
Copyright (c) 2018 IETF Trust and the persons identified
as authors of the code. All rights reserved.
This version of this YANG module is part of RFC XXXX; see the RFC
itself for full legal notices.";
revision 2018-10-19 {
description
"Initial revision.";
reference
"RFC XXXX: YANG Modules for IPv4-in-IPv6 Address plus Port
Softwires";
}
/*
* Features
*/
feature binding-mode {
description
"Binding is used for configuring the Lightweight 4over6 mechanism.
Binding based softwire mechanisms are IPv4-over-IPv6 tunnelling
transition mechanisms specifically intended for complete
independence between the IPv6 subnet prefix (and IPv6 address)
and IPv4 address, with or without IPv4 address sharing.
This is accomplished by maintaining state for each softwire
(per-subscriber state) in the central Border Relay (BR) and using
a hub-and-spoke forwarding architecture. In order to delegate the
NAPT function and achieve IPv4 address sharing, port-restricted
IPv4 addresses needs to be allocated to CEs.
This feature indicates that the instance functions as a binding
based softwire instance.";
reference
"RFC7596: Lightweight 4over6: An Extension to the Dual-Stack Lite
Architecture
RFC7597: Mapping of Address and Port with Encapsulation (MAP-E)
RFC7599: Mapping of Address and Port using Translation (MAP-T)";
}
feature map-e {
description
"MAP-E is an IPv6 transition mechanism for transporting IPv4
packets across an IPv6 network using IP encapsulation. MAP-E
allows for a reduction of the amount of centralized state using
rules to express IPv4/IPv6 address mappings. This introduces an
algorithmic relationship between the IPv6 subnet and IPv4 address.
This feature indicates that the instance functions as a MAP-E.";
reference
"RFC7597: Mapping of Address and Port with Encapsulation (MAP-E)";
}
feature map-t {
description
"MAP-T is an IPv6 transition mechanism for transporting IPv4
packets across an IPv6 network using IP translation. It leverages
a double stateless NAT64 based solution as well as the stateless
algorithmic address & transport layer port mapping algorithm
defined for MAP-E.
This feature indicates that the instance functions as a MAP-T instance.";
reference
"RFC7599: Mapping of Address and Port using Translation (MAP-T)";
}
// Binding Entry
grouping binding-entry {
description
"The binding BR (Border Relay) maintains an address binding table
that contains the binding between the CE's IPv6 address,
the allocated IPv4 address and restricted port-set.";
leaf binding-ipv6info {
type union {
type inet:ipv6-address;
type inet:ipv6-prefix;
}
description
"The IPv6 information for a binding entry.
When the IPv6 prefix type is used,
the IPv6 source address of the CE is constructed
according to the description in RFC7596.
If the IPv6 address type is used, the CE can use
any valid /128 address from a prefix assigned to
the CE.";
reference
"Section 5.1 of RFC7596.";
}
leaf br-ipv6-addr {
type inet:ipv6-address;
mandatory true;
description
"The IPv6 address of the binding BR.";
}
}
// configuration and stateful parameters for softwire CE interface
augment "/if:interfaces/if:interface" {
when "derived-from(ift:tunnel-type, 'iana-tunnel-type:aplusp')";
description "Softwire CE interface configuration";
leaf softwire-payload-mtu {
type uint16;
units bytes;
description
"The payload IPv4 MTU for the softwire tunnel.";
}
leaf softwire-path-mru {
type uint16;
units bytes;
description
"The path MRU for the softwire (payload + encapsulation
overhead).";
}
choice ce-type {
description "Sets the softwire CE mechanism";
case binding {
if-feature binding-mode;
description "CE binding configuration";
uses binding-entry;
}
case algo {
if-feature "map-e or map-t";
description "CE algorithm configuration";
container algo-instances {
description
"Indicates that the instances supports the MAP-E and/or MAP-T
function. The instances advertise the MAP-E/MAP-T
feature through the capability exchange mechanism
when a NETCONF session is established.";
list algo-instances {
key "id";
description
"MAP forwarding rule instance for
MAP-E/MAP-T";
leaf id {
type uint32;
mandatory true;
description "Algorithm Instance ID";
}
uses softwire-common:algorithm-instance;
}
}
}
}
}
augment "/if:interfaces/if:interface/if:statistics" {
when "derived-from(../ift:tunnel-type, 'iana-tunnel-type:aplusp')";
description "Softwire CE interface statistics.";
uses softwire-common:traffic-stat;
}
/*
* Notifications
*/
notification softwire-ce-event {
if-feature binding-mode;
description "CE notification";
leaf ce-binding-ipv6-addr-change {
type inet:ipv6-address;
mandatory true;
description
"If the CE's binding IPv6 address changes for any reason,
it should notify the NETCONF client.";
}
}
}