Softwire Working Group Q. Sun
Internet-Draft H. Wang
Intended status: Standards Track Y. Cui
Expires: June 28, 2015 Tsinghua University
I. Farrer
Deutsche Telekom AG
M. Boucadair
France Telecom
December 25, 2014

YANG Data Model for IPv4-in-IPv6 Softwire
draft-sun-softwire-yang-01

Abstract

This document defines a YANG data model for the configuration and management of IPv4-in-IPv6 Softwire Border Routers and Customer Premises Equipment. It covers Lightweight 4over6, MAP-E and MAP-T Softwire mechanisms.

Requirements Language

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on June 28, 2015.

Copyright Notice

Copyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.


Table of Contents

1. Introduction

The IETF Softwire Working Group has developed several IPv4-in-IPv6 Softwire mechanisms to address various deployment contexts and constraints. As a companion to the architectural specification documents, this document focuses on the provisioning aspects for softwire functional elements that are: Border Routers (BRs) and Customer Premises Equipment (CPEs).

This document defines a YANG data model that can be used for the configuration and management of IPv4-in-IPv6 Softwire BRs and/or CPEs. To ensure interoperability in mixed vendor environments, it is important that the models can be easily reused between different vendors and implementations.

Due to the inherent similarities of the data plane forwarding, the configuration and management parameters of the different softwire mechanisms are defined in the same YANG model. Parameters that are common to all solutions are abstracted in the common module while specific parameters are defined in individual modules that are specific to a given mechanism (see for example, [I-D.ietf-softwire-unified-cpe]).

Each specific softwire mechanism has their own individual YANG modules:

This model is structured into two root containers:

  1. Container "softwire-config" holds the collection of YANG definitions common to all softwire configuration of BRs and CPEs.
  2. Container "softwire-state" holds YANG definitions for the operational state of the Softwire BRs and CPEs.

This approach has been taken so that the model can be easily extended in the future to support additional softwire mechanism, should this be necessary.

1.1. Terminology

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].

The reader should be familiar with the terms defined in [I-D.ietf-softwire-lw4over6] [I-D.ietf-softwire-map] [I-D.ietf-softwire-map-t] , and the YANG data modelling language [RFC6020].

A simplified graphical representation of the data model is provided in this document. [RFC6087] provides definitions of the symbols used in these diagrams.

1.2. YANG Modelling of NAT44 Functionality

This documented model does not include NAT-specific provisioning parameters other than the external IP address and port set which a softwire client may use for NAT44. Additional NAT-specific considerations are out of scope.

2. Objectives

This document defines a YANG data model that can be used to configure and manage BRs and CPEs for the following IPv4-in-IPv6 Softwire mechanisms: Lightweight 4over6, MAP-E and MAP-T.

For the lightweight 4over6, the configure and manage information of B4 (CPE) and AFTR (BR) are different. The lw4o6 AFTRs needs to maintain the binding table of B4s. The lw4o6 B4s need to maintain the NAPT table of hosts.

For the MAP-T and MAP-T, CPE and BR both need to maintain the map- rule table. Thus, there is no need to distinguish BR and CPE.

2.1. Common

This common model abstracts the shared features of different BRs and CPEs such as softwire type, maximum number of softwires, etc.

The following sections of the document are structured with the root of the softwire YANG model (common to all mechanisms) described first. The subsequent sections describe the models relevant to the different softwire mechanisms. All functions are listed, but the YANG models use the "feature" statement to distinguish among the different softwire mechanisms.

2.2. Lightweight 4over6 AFTR

The lw4over6 AFTR holds configuration for IPv4-IPv6 address bindings. This is used for the forwarding of traffic originating from lwB4s.

2.3. Lightweight 4over6 B4

The lw4over6 B4 is configured with the relevant parameters for establishing the IPv4 in IPv6 tunnel including an IPv6 address for the lwAFTR and the IPv4 configuration for NAPT44.

2.4. MAP-E

MAP-E elements (BR and CPE) are provisioned with the MAP rules necessary for defining MAP domains and forwarding rules.

2.5. MAP-T

MAP-E elements (BR and CPE) are provisioned with the MAP rules necessary for defining MAP domains and forwarding rules. MAP-T CPEs an additional "ipv6-prefix" parameter is also configured.

3. Softwire YANG Tree Diagrams

3.1. Common Tree Diagrams

Figure 1 describes the softwire data model which is common to all of the different softwire mechanisms listed in Section 1:

+--rw softwire-config
|  +--rw enable                               boolean
|  +--rw name?                                string
|  +--rw description?                         string
|  +--rw tunnel-mtu                           uint32                           
|  +--rw lw4over6-aftr
|  +--rw lw4over6-b4
|  +--rw map-e
|  +--rw map-t
|
+--ro softwire-state
   +--ro enable                               boolean
   +--ro name?                                string
   +--ro description?                         string
   +--ro tunnel-mtu                           uint32
   +--ro lw4over6-aftr
   +--ro lw4over6-b4
   +--ro map-e
   +--ro map-t
          

Figure 1: Softwire Common Data Model Structure

The mechanism specific models for lw4over6-aftr, lw4over6-b4, MAP-E and MAP-T are described in detail in the following sections.

3.2. Lightweight 4over6 AFTR Tree Diagrams

Figure 2 defines the softwire data model for Lightweight 4over6 AFTR:

+--rw softwire-config
|  +--...
|  +--rw lw4over6-aftr
|     +--rw enable                              boolean
|     +--rw lw4over6-aftr-devices
|        +--rw lw4over6-aftr-device* [id]
|           +--rw id                            uint32
|           +--rw softwire-num-threshold        uint32
|           +--rw binding-table
|              +--rw binding-entry* [id]
|                 +--rw id                      uint32
|                 +--rw binding-ipv4-addr       inet:ipv4-address
|                 +--rw port-set
|                 |  +--rw offset               uint8
|                 |  +--rw psid                 yang:hex-string
|                 |  +--rw psid-len             uint8
|                 +--rw binding-ipv6-addr       inet:ipv6-address
|                 +--rw binding-ipv6-prefix     inet:ipv6-prefix 
|                 +--rw active                  boolean
|                 +--rw lifetime                yang:timestamp 
|
+--ro softwire-state
   +--...
   +--ro lw4over6-aftr
      +--ro enable                              boolean
      +--ro lw4over6-aftr-devices
         +--ro lw4over6-aftr-device* [id]
            +--ro id                            uint32
            +--ro active-softwire-num           uint32
            +--ro binding-table
               +--ro binding-entry* [id]
                  +--ro id                      uint32
                  +--ro binding-ipv4-addr       inet:ipv4-address
                  +--ro port-set
                  |  +--ro offset               uint8
                  |  +--ro psid                 yang:hex-string
                  |  +--ro psid-len             uint8
                  +--ro binding-ipv6-addr       inet:ipv6-address
                  +--ro binding-ipv6-prefix     inet:ipv6-prefix 
                  +--ro active                  boolean
                  +--ro lifetime                yang:timestamp 
          

Figure 2: Softwire Lightweight 4over6 AFTR Data Model Structure

  • Node "softwire-num-threshold" is used to set the maximum number of tunnels that can be created on the lw4over6 device simultaneously.
  • Node "active-softwire-num" is used to present the number of tunnels currently provisioned on the device.
  • Node "offset" is used to set the number of offset bits in the PSID.
  • Node "psid" is used to algorithmically identify a set of ports exclusively for a specific softwire.
  • Node "active" is used to add or delete a particular binding-entry.
  • Node "lifetime" is used to define the lifetime for a particular binding-table. The value of this parameter is likely to less than the lease time returned in DHCP for instance.

3.3. Lightweight 4over6 B4 Tree Diagrams

Figure 3 defines the softwire data model for a Lightweight 4over6 B4 element:

+--rw softwire-config
|  +--...
|  +--rw lw4over6-b4
|     +--rw enable                              boolean
|     +--rw lw4over6-b4-devices
|        +--rw lw4over6-b4-device* [id]
|           +--rw id                            uint32
|           +--rw b4-ipv6-addr-format           boolean
|           +--rw binding-ipv4-addr             inet:ipv4-address
|           +--rw port-set
|           |  +--rw offset                     uint8
|           |  +--rw psid                       yang:hex-string
|           |  +--rw psid-len                   uint8
|           +--rw hint-ipv6-prefix              inet:ipv6-prefix
|           +--rw aftr-ipv6-addr                inet:ipv6-address
|           +--rw nat-table
|              +--rw nat-entry* [id]
|                 +--...
|
+--ro softwire-state
   +--...
   +--ro lw4over6-b4
      +--ro enable                              boolean
      +--ro lw4over6-b4-devices
         +--ro lw4over6-b4-device* [id]
            +--ro id                            uint32
            +--ro b4-ipv6-addr-format           boolean
            +--ro binding-ipv4-addr             inet:ipv4-address
            +--ro port-set
            |  +--ro offset                     uint8
            |  +--ro psid                       yang:hex-string
            |  +--ro psid-len                   uint8
            +--ro hint-ipv6-prefix              inet:ipv6-prefix
            +--ro aftr-ipv6-addr                inet:ipv6-address
            +--ro nat-table
               +--ro nat-entry* [id]
                  +--...
          

Figure 3: Softwire Lightweight 4over6 B4 Data Model Structure

  • Node "b4-ipv6-addr-format" indicates that the default mode for building the lwB4 IPv6 address is used ([I-D.ietf-softwire-lw4over6]) if set to "1"; if set to "0", the lwB4 can use any address from the assigned IPv6 prefix. The default value is "1".
  • Node "binding-ipv4-addr" is used to allocate an IPv4 address to the lwB4.
  • Node "offset" is used to set the number of offset bits.
  • Node "psid" is used to algorithmically identifies a set of ports exclusively, it is allocated by vendors and calculated by devices.
  • Node "hint-ipv6-prefix" is used to perform a longest prefix match against the active IPv6 addresses configured on the lwB4 so that a suitable tunnel source address prefix can be selected.
  • Node "active" is used to add or delete a particular binding-entry.
  • Node "lifetime" is used to define a lifetime for a particular binding-table. The value of this parameter is likely to be less than the lease time returned in DHCP for instance.
  • Container "nat-table" is not extended. It means that the focus is on the provisioning of the external IP address and/or port set; other NAT-specific considerations are out of scope.

3.4. MAP-E Tree Diagrams

Figure 4 defines the softwire data model for MAP-E:

+--rw softwire-config
|  +--...
|  +--rw map-e
|     +--rw enable                              boolean
|     +--rw map-e-devices
|        +--rw map-e-device* [id]
|           +--rw id                            unit32
|           +--rw map-rules* [id]
|           |  +--rw id                         uint8
|           |  +--rw map-rule-type              enumeration
|           |  +--rw map-rule-table
|           |     +--rw map-rule-entry* [id]
|           |        +--rw id                   uint8
|           |        +--rw ipv6-prefix          inet:ipv6-prefix
|           |        +--rw ipv6-prefix-len      uint8
|           |        +--rw ipv4-prefix          inet:ipv4-prefix
|           |        +--rw ipv4-prefix-len      uint8  
|           |        +--rw port-set
|           |        |  +--rw offset            uint8
|           |        |  +--rw psid              yang:hex-string
|           |        |  +--rw psid-len          uint8
|           |        +--rw ea-len               uint8
|           |        +--rw active               boolean
|           +--rw map-e-cpe
|              +--rw cpe-ipv6-prefix            inet:ipv6-prefix
|
+--ro softwire-state
   +--...
   +--ro map-e
      +--ro enable                              boolean
      +--ro map-e-devices
         +--ro map-e-device* [id]
            +--ro id                            uint32
            +--ro map-rules* [id]
            |  +--ro id                         uint8
            |  +--ro map-rule-type              enumeration
            |  +--ro map-rule-table
            |     +--ro map-rule-entry* [id]
            |     |  +--ro id                   uint8
            |     |  +--ro ipv6-prefix          inet:ipv6-prefix
            |     |  +--ro ipv6-prefix-len      uint8
            |     |  +--ro ipv4-prefix          inet:ipv4-prefix
            |     |  +--ro ipv4-prefix-len      uint8
            |     |  +--ro port-set
            |     |  |  +--ro offset            uint8
            |     |  |  +--ro psid              yang:hex-string
            |     |  |  +--ro psid-len          uint8
            |     |  +--ro ea-len               boolean
            |     |  +--ro active               boolean
            |     +--ro active-map-rule-num     uint8   
            +--ro map-e-cpe
               +--ro cpe-ipv6-prefix            inet:ipv6-prefix   
      

Figure 4: Softwire MAP-E Data Model Structure

  • Node "map-rule-type" is used to define the type of map rule. The data type is enumeration, which are "BMR" and "FMR".
  • Node "offset" is used to set the number of offset bits.
  • Node "psid" is used to algorithmically identify a set of ports exclusively for a specific softwire.
  • Node "ea-len" is used to set the length of the Embedded- Address (EA), which defined in the mapping rule for a MAP domain.
  • Node "active" is used to add or delete a particular map-rule- entry
  • Node "active-map-rule-num" is used to present the number of map-rule-entries running on the device currently.

3.5. MAP-T Tree Diagrams

Figure 5 defines the softwire data model for MAP-T:

+--rw softwire-config
|  +--...
|  +--rw map-t
|     +--rw enable                              boolean
|     +--rw map-t-devices
|        +--rw map-t-device* [id]
|           +--rw id                            unit32
|           +--rw map-rules* [id]
|           |  +--rw id                         uint8
|           |  +--rw map-rule-type              enumeration
|           |  +--rw map-rule-table
|           |     +--rw map-rule-entry* [id]
|           |        +--rw id                   uint8
|           |        +--rw ipv6-prefix          inet:ipv6-prefix
|           |        +--rw ipv6-prefix-len      uint8
|           |        +--rw ipv4-prefix          inet:ipv4-prefix
|           |        +--rw ipv4-prefix-len      uint8  
|           |        +--rw port-set
|           |        |  +--rw offset            uint8
|           |        |  +--rw psid              yang:hex-string
|           |        |  +--rw psid-len          uint8
|           |        +--rw ea-len               uint8
|           |        +--rw active               boolean
|           +--rw map-t-cpe
|              +--rw cpe-ipv6-prefix            inet:ipv6-prefix
|
+--ro softwire-state
   +--...
   +--ro map-t
      +--ro enable                              boolean
      +--ro map-t-devices
         +--ro map-t-device* [id]
            +--ro id                            uint32
            +--ro map-rules* [id]
            |  +--ro id                         uint8
            |  +--ro map-rule-type              enumeration
            |  +--ro map-rule-table
            |     +--ro map-rule-entry* [id]
            |     |  +--ro id                   uint8
            |     |  +--ro ipv6-prefix          inet:ipv6-prefix
            |     |  +--ro ipv6-prefix-len      uint8
            |     |  +--ro ipv4-prefix          inet:ipv4-prefix
            |     |  +--ro ipv4-prefix-len      uint8
            |     |  +--ro port-set
            |     |  |  +--ro offset            uint8
            |     |  |  +--ro psid              yang:hex-string
            |     |  |  +--ro psid-len          uint8
            |     |  +--ro ea-len               boolean
            |     |  +--ro active               boolean
            |     +--ro active-map-rule-num     uint8   
            +--ro map-t-cpe
               +--ro cpe-ipv6-prefix            inet:ipv6-prefix   
          

Figure 5: Softwire MAP-T Data Model Structure

  • Node "map-rule-type" is used to define the type of map rule. The data type is enumeration, which are "DMR", "BMR" and "FMR".
  • Node "offset" is used to set the number of offset bits.
  • Node "psid" is used to algorithmically identify a set of ports exclusively for a specific softwire.
  • Node "ea-len" is used to set the length of the Embedded- Address (EA), which defined in the mapping rule for a MAP domain.
  • Node "active" is used to add or delete a particular map-rule- entry
  • Node "active-map-rule-num" is used to present the number of map-rule-entries running on the device currently.

4. Softwire YANG Model

This module imports typedefs from [RFC6991].

<CODE BEGINS> file "ietf-softwire@2014-12-14.yang"

module softwire {
  namespace "urn:ietf:params:xml:ns:yang:softwire";
  prefix "softwire";

  import ietf-inet-types { prefix inet; }
  import ietf-yang-types { prefix yang; } 

  organization "softwire";
  
  contact 
    " 
    Qi Sun sunqi@csnet1.cs.tsinghua.edu.cn
    Hao Wang wangh13@mails.tsinghua.edu.cn
    Yong Cui yong@csnet1.cs.tsinghua.edu.cn
    Ian Farrer ian.farrer@telekom.de
    Mohamed Boucadair mohamed.boucadair@orange.com
    Rajiv Asati rajiva@cisco.com
    ";

  description 
    "This document defines a YANG data model for the configuration and
    management of IPv4-in-IPv6 Softwire Border Routers and Customer Premises
    Equipment. It covers Lightweight 4over6, MAP-E and MAP-T Softwire
    mechanisms.

    Copyright (c) 2014 IETF Trust and the persons identified 
    as authors of the code. All rights reserved.
    This version of this YANG module is part of RFC XXX; see the RFC 
    itself for full legal notices.";

  revision 2014-12-14 {
    description
      "Initial revision.";
  }

/* 
 * Typedef
 */

/*
 * Features
 */
  
  feature lw4over6 {
    description
      "Lightweight 4over6 moves the Network Address and Port 
      Translation (NAPT) function from the centralized DS-Lite tunnel 
      concentrator to the tunnel client located in the Customer 
      Premises Equipment (CPE).  This removes the requirement for a 
      Carrier Grade NAT function in the tunnel concentrator and 
      reduces the amount of centralized state that must be held to a 
      per-subscriber level.  In order to delegate the NAPT function 
      and make IPv4 Address sharing possible, port-restricted IPv4
      addresses are allocated to the CPEs.";
    reference
      "I-D.ietf-softwire-lw4over6";
  }

  feature lw4over6-aftr {
    if-feature lw4over6;
    description
      "The AFTRs (BRs) for Lightweight 4over6, so-called lwAFTR.
      It means an AFTR element (Address Family Transition Router 
      element [RFC6333]), which supports Lightweight 4over6 extension. 
      An lwAFTR is an IPv4-in-IPv6 tunnel endpoint which maintains 
      per-subscriber address binding only and does not perform a NAPT44 
      function.";
  }

  feature lw4over6-b4 {
    if-feature lw4over6;
    description
      "The B4s (CPEs) for Lightweight 4over6, so-called lwB4.
      It means A B4 element (Basic Bridging BroadBand element [RFC6333]), 
      which supports Lightweight 4over6 extensions. An lwB4 is a function 
      implemented on a dual-stack capable node, (either a directly 
      connected device or a CPE), that supports port-restricted IPv4 
      address allocation, implements NAPT44 functionality and creates a 
      tunnel to an lwAFTR.";
  }

  feature map-e {
    description
      "MAP-E is a mechanism for transporting IPv4 packets across an 
      IPv6 network using IP encapsulation, and a generic mechanism 
      for mapping between IPv6 addresses and IPv4 addresses and 
      transport layer ports.";
    reference
      "I-D.ietf-softwire-map";
  }

  feature map-e-cpe {
    if-feature map-e;
    description
      "The CPEs for MAP-E.";
  }

  feature map-t {
    description
      "MAP-T is a mechanism for transporting IPv4 packets across an 
      IPv6 network using IP translation, and a generic mechanism
      for mapping between IPv6 addresses and IPv4 addresses and
      transport layer ports.";
    reference
      "I-D.ietf-softwire-map-t";
  }

  feature map-t-cpe {
    if-feature map-t;
    description
      "The CPEs for MAP-T.";
  }

  
/*
 * Grouping
 */
 
  grouping port-set {
    description
      "A range of transport layer ports.";
    leaf offset {
      type uint8;
      default "6";
      description
        "The number of offset bits.";
    }
    leaf psid {
      type yang:hex-string;
      description
        "Port Set Identifier (PSID), which identifies a set of ports 
        algorithmically.";
    }
    leaf psid-len {
      type uint8;
      description
        "The length of PSID.";
    }
  }

  grouping binding-table {
    description
      "The lwAFTR maintains an address binding table containing the
      binding between the lwB4's IPv6 address, the allocated IPv4
      address and restricted port-set.";
    list binding-entry {
      key "id";
      leaf id {
        type uint32;
      }
      leaf binding-ipv4-addr {
        type inet:ipv4-address;
        description
          "The IPv4 address assigned to a lwB4, which is used as the
          IPv4 External Address for lwB4 local NAPT44. One of three
          elemnts constructing a binding-entry.";
      }
      container port-set {
        uses port-set {
          refine offset {
            default "0";
          }
        }
      }          
      leaf binding-ipv6-addr {
        type inet:ipv6-address;
        description
          "The IPv6 address of the lwB4, which is used to bind the
          IPv4 address and port-set.";
      }
      leaf binding-ipv6-prefix {
        type inet:ipv6-prefix;
        description
          "The IPv6 prefix of the lwB4.";
      }
      leaf active {
        type boolean;
        default "1";
        description
          "Used to add or delete a particular binding-entry.";
      leaf lifetime {
        type yang:timestamp;
        description
          "Lifetime for a binding-entry.";
      }
    }
  }

  grouping nat-table {
    description
      "Grouping 'nat-table' is not extended. It means that we are 
      focusing on the provisioning of external IP address and port set; 
      other NAT-specific considerations are out of scope." 
  }

  grouping map-rule-table {
    description
      "The (conceptual) table containing rule Information for a 
      specific mapping rule. It can also be used for row creation.";
    list map-rule-entry {
      key "id";
      leaf id {
        type uint8;
      }
      leaf IPv6-prefix {
        type inet:ipv6-prefix;
        description
          "The IPv6 prefix defined in the mapping rule which will be
          assigned to CE.";
      }
      leaf IPv6-prefix-len {
        type uint8;
        description
          "The length of the IPv6 prefix defined in the mapping rule.
          As a parameter for the mapping rule, it will be also 
          assigned to CE.";
      }
      leaf IPv4-prefix {
        type inet:ipv4-prefix;
        description
          "The IPv4 prefix defined in the mapping rule which will be
          assigned to CE.";
      }
      leaf IPv4-prefix-len {
        type uint8;
        description
          "The length of the IPv4 prefix defined in the mapping
          rule. As a parameter for the mapping rule, it will be also
          assigned to CE.";
      }
      container port-set {
        uses port-set;
      }
      leaf ea-len {
        type uint8;
        description
          "The length of the Embedded-Address (EA) defined in
          mapping rule for a MAP domain. This dictates the sharing 
          ratio (i.e. Maximum number of CE sharing the same IPv4 
          address) used in MAP domain.";
      }
      leaf active {
        type boolean;
        default "1";
        description
            "Used to add or delete a particular map-rule-entry.";
      }
    }
  }
  
  grouping map-rules {
    list map-rules {
      key "id";
      leaf id {
        type uint8;
      }
      leaf map-rule-type {
        type enumeration {
          enum "BMR";
          enum "FMR";
        }
      }
      container map-rule-table {
        uses map-rule-table;
      }
    }
  }

/*
 * Configuration Data Nodes
 */

  container softwire-config {
    description
      "The configuration data for devices in Softwire. ";
    leaf enable {
      type boolean;
      default "1";
      description
        "Enable/disable the Softwire function.";
    }
    leaf name {
      type string;
      description
        "The name of Softwire.";
    }
    leaf description {
      type string;
      description
        "A textual description of Softwire.";
    }
    leaf tunnel-mtu {
      type uint32;
      description
        "The MTU of tunnel payload on the Softwire devices.";
    }
    container lw4over6-aftr {
      if-feature lw4over6-aftr;
      description
        "Indicate this device supports the lwAFTR function. Devices 
        advertise the lw4over6-aftr feature through the capability 
        exchange mechanism when a NETCONF session is established.";
      leaf enable {
        type boolean;
        default "1";
        description
          "Enable/disable the lwAFTR function.";
      }
      container lw4over6-aftr-devices {
        description
          "Refer to lwAFTRs.";
        list lw4over6-aftr-device {
          key "id";
          leaf id {
            type uint32;
          }
          leaf softwire-num-threshold {
            type uint32;
            description
              "The maximum number of tunnels that can be created on
              the lwAFTR.";
          }
          container binding-table {                                                                                                                                                                                                                                                                                                                                                                                                                                                   
            uses binding-table;
          }
        }
      }
    }
    container lw4over6-b4 {
      if-feature lw4over6-b4;
      description
        "Indicate this device supports the lwB4 function. Devices 
        advertise the lw4over6-b4 feature through the capability 
        exchange mechanism when a NETCONF session is established.";
      leaf enable {
        type boolean;
        default "1";
        description
          "Enable/disable the lwB4 function.";
      }
      container lw4over6-b4-devices {
        description
          "Refer to lwB4s.";
        list lw4over6-b4-device {
          key "id";
          leaf id {
            type uint32;
          }
          leaf b4-ipv6-addr-format {
            type boolean;
            default "1";
            description
              "The format of lwB4 IPv6 address. If set to "1" indicates 
              that the default mode for building the lwB4 IPv6 address 
              is used	([I-D.ietf-softwire-lw4over6]); if set to "0", the 
              lwB4 can use any address from the assigned IPv6 prefix.";
          }
          leaf binding-ipv4-addr {
            type inet:ipv4-address;
            description
              "The allocated IPv4 address of lwB4, which binding with 
              the port-set.";
          }
          container port-set {
            uses port-set {
              refine offset {
                default "0";
              }
            }
          }
          leaf hint-ipv6-prefix {
            type inet:ipv6-prefix;
            description
              "'hint-ipv6-prefix' is used to longest prefix match.";
          }
          leaf aftr-ipv6-addr {
            type inet:ipv6-address;
            description
              "The IPv6 address of lwAFTR.";
          }
          container nat-table {                                                                                                                                                                                                                                                                                                                                                                                                                                                   
            uses nat-table;
          }
        }
      }
    }
    container map-e {
      if-feature map-e;
      description
        "Indicate the devices support the MAP-E function. Devices 
        advertise the map-e feature through the capability exchange 
        mechanism when a NETCONF session is established.";
      leaf enable {
        type boolean;
        default "1";
        description
          "Enable/disable the MAP-E function.";
      }
      container map-e-devices {
        description
          "Refer to the MAP-E devices, includes BRs and CPEs.";
        list map-e-device {
          key "id";
          leaf id {
            type uint32;
          }
          uses map-rules;
          container map-e-cpe {
            if-feature map-e-cpe;
            leaf cpe-ipv6-prefix {
              type inet:ipv6-prefix;
              description
                "The IPv6 prefix of the MAP-E CPE.";
            }
          }
        }
      }
    }
    container map-t {
      if-feature map-t;
      description
        "Indicate the devices support the MAP-T function. Devices 
        advertise the map-t feature through the capability exchange 
        mechanism when a NETCONF session is established.";
      leaf enable {
        type boolean;
        default "1";
        description
          "Enable/disable the MAP-T function.";
      }
      container map-t-devices {
        description
          "Refer to the MAP-T devices, includes BRs and CPEs.";
        list map-t-device {
          key "id";
          leaf id {
            type uint32;
          }
          uses map-rules {
            refine map-rule-type {
              type enumeration {
                enum "DMR";
                enum "BMR";
                enum "FMR";
              }
            }
          }
          container map-t-cpe {
            if-feature map-t-cpe;
            leaf cpe-ipv6-prefix {
              type inet:ipv6-prefix;
              description
                "The IPv6 prefix of the MAP-T CPE.";
            }
          }
        }
      }
    }
  }
    
/*
 * Operational state Data Nodes
 */

  container softwire-state {
    config false;
    description
      "The operational state data for devices in softwire. ";
    leaf enable {
      type boolean;
      description
        "Status of the Softwire function.";
    }
    leaf name {
      type string;
      description
        "The name of the softwire devices.";
    }
    leaf description {
      type string;
      description
        "A textual description of the softwire devices.";
    }
    leaf tunnel-mtu {
      type uint32;
      description
        "The MTU of tunnel payload on the softwire devices.";
    }
    container lw4over6-aftr {
      if-feature lw4over6-aftr;
      description
        "Indicate this device supports the lwAFTR function. Devices 
        advertise the lw4over6-aftr feature through the capability 
        exchange mechanism when a NETCONF session is established.";
      leaf enable {
        type boolean;
        description
          "Enable/disable the lwAFTR function.";
      }
      container lw4over6-aftr-devices {
        description
          "Refer to lwAFTRs.";
        list lw4over6-aftr-device {
          key "id";
          leaf id {
            type uint32;
          }
          leaf active-softwire-num {
            type uint32;
            description
              "The number of tunnels running on the lw4over6 device.";
          }
          container binding-table {                                                                                                                                                                                                                                                                                                                                                                                                                                                   
            uses binding-table;
          }
        }
      }
    }
    container lw4over6-b4 {
      if-feature lw4over6-b4;
      description
        "Indicate this device supports the lwB4 function. Devices 
        advertise the lw4over6-b4 feature through the capability 
        exchange mechanism when a NETCONF session is established.";
      leaf enable {
        type boolean;
        description
          "Enable/disable the lwB4 function.";
      }
      container lw4over6-b4-devices {
        description
          "Refer to lwB4s.";
        list lw4over6-b4-device {
          key "id";
          leaf id {
            type uint32;
          }
          leaf b4-ipv6-addr-format {
            type boolean;
            description
              "The format of lwB4 IPv6 address. If set to "1" indicates 
              that the default mode for building the lwB4 IPv6 address 
              is used	([I-D.ietf-softwire-lw4over6]); if set to "0", the 
              lwB4 can use any address from the assigned IPv6 prefix.";
          }
          leaf binding-ipv4-addr {
            type inet:ipv4-address;
            description
              "The allocated IPv4 address of lwB4, which binding with 
              the port-set.";
          }
          container port-set {
            uses port-set;
          }
          leaf hint-ipv6-prefix {
            type inet:ipv6-prefix;
            description
              "'hint-ipv6-prefix' is used to longest prefix match.";
          }
          leaf aftr-ipv6-addr {
            type inet:ipv6-address;
            description
              "The IPv6 address of lwAFTR.";
          }
          container nat-table {                                                                                                                                                                                                                                                                                                                                                                                                                                                   
            uses nat-table;
          }
        }
      }
    }
    container map-e {
      if-feature map-e;
      description
        "Indicate the devices support the MAP-E function. Devices 
        advertise the map-e feature through the capability exchange 
        mechanism when a NETCONF session is established.";
      leaf enable {
        type boolean;
        description
          "Status of the MAP-E function.";
      }
      container map-e-devices {
        description
          "Refer to the MAP-E devices, includes BRs and CPEs.";
        list map-e-device {
          key "id";
          leaf id {
            type uint32;
          }
          leaf map-rule-type {
            type enumeration {
              enum "BMR";
              enum "FMR";
            }
          }
          container map-rule-table {
            uses map-rule-table;
          }
          container map-e-cpe {
            if-feature map-e-cpe;
            leaf cpe-ipv6-prefix {
              type cpe-ipv6-prefix;
              description
                "The IPv6 prefix of the MAP-E CPE.";
            }
          }
        }
      }
    }
    container map-t {
      if-feature map-t;
      description
        "Indicate the devices support the MAP-T function. Devices 
        advertise the map-t feature through the capability exchange 
        mechanism when a NETCONF session is established.";
      leaf enable {
        type boolean;
        description
          "Status of the MAP-T function.";
      }
      container map-t-devices {
        description
          "Refer to the MAP-T devices, includes BRs and CPEs.";
        list map-t-device {
          key "id";
          leaf id {
            type uint32;
          }
          leaf map-rule-type {
            type enumeration {
              enum "DMR";
              enum "BMR";
              enum "FMR";
            }
          }
          container map-rule-table {
            uses map-rule-table;
          }
          container map-t-cpe {
            if-feature map-t-cpe;
            leaf dmr-ipv6-prefix {
              type inet:ipv6-prefix;
              description
                "The IPv6 prefix of the DMR (default mapping rule).";
            }
            leaf cpe-ipv6-prefix {
              type inet:ipv6-prefix;
              description
                "The IPv6 prefix of the MAP-T CPE.";
            }
          }
        }
      }
    }
  }
}
<CODE ENDS>
        

5. Example of Configure Lw4over6 Binding-Table

The lwAFTR maintains an address binding table which contains the following 3-tuples:

  • IPv6 Address for a single lwB4
  • Public IPv4 Address
  • Restricted port-set

The entry has two functions: the IPv6 encapsulation of inbound IPv4 packets destined to the lwB4 and the validation of outbound IPv4-in-IPv6 packets received from the lwB4 for de-capsulation.

Requirement: Add an entry that maintain the relationship between 3-tuples of lwB4 (2001::1) in binding-table, which on the lwAFTR (2001::2). The data value of this 3-tuples are '2001::1', '123.1.1.1' and '1234' respectively.

Here is the example binding-table configuration xml:

    <rpc message-id="101" xmlns:nc="urn:params:xml:ns:yang:ietf-softwire:1.0">
  // replace with IANA namespace when assigned.
    <edit-config>
      <target>
        <running/>
      </target>
    <softwire-config>
      <lw4over6-aftr>
        <lw4over6-aftr-devices>
          <lw4over6-aftr-device>
            <aftr-ipv6-addr>2001::2</aftr-ipv6-addr>
            <binding-table>
              <binding-entry>
              	<binding-ipv4-addr>123.1.1.1</binding-ipv4-addr>
              	<port-set>
              	  <psid>1234</psid>
              	</port-set>
              	<binding-ipv6-addr>2001::1</binding-ipv6-addr>
              	<active>1</active>
              </binding-entry>
            </binding-table>
          </lw4over6-aftr-device>
        </lw4over6-aftr-devices>
      </lw4over6-aftr>
    </softwire-config>

        

Figure 6: Lw4over6 Binding-Table Configuration XML

6. Security Considerations (TBD)

TBD

7. IANA Considerations (TBD)

TBD

8. Acknowledgements

The authors would like to thank Lishan Li and Rajiv Asati for their contributions to this work.

9. References

9.1. Normative References

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, October 2010.
[RFC6021] Schoenwaelder, J., "Common YANG Data Types", RFC 6021, October 2010.
[RFC6087] Bierman, A., "Guidelines for Authors and Reviewers of YANG Data Model Documents", RFC 6087, January 2011.
[RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J. and A. Bierman, "Network Configuration Protocol (NETCONF)", RFC 6241, June 2011.
[RFC6991] Schoenwaelder, J., "Common YANG Data Types", RFC 6991, July 2013.

9.2. Informative References

[I-D.ietf-softwire-lw4over6] Cui, Y., Qiong, Q., Boucadair, M., Tsou, T., Lee, Y. and I. Farrer, "Lightweight 4over6: An Extension to the DS-Lite Architecture", Internet-Draft draft-ietf-softwire-lw4over6-13, November 2014.
[I-D.ietf-softwire-map] Troan, O., Dec, W., Li, X., Bao, C., Matsushima, S., Murakami, T. and T. Taylor, "Mapping of Address and Port with Encapsulation (MAP)", Internet-Draft draft-ietf-softwire-map-12, November 2014.
[I-D.ietf-softwire-map-t] Li, X., Bao, C., Dec, W., Troan, O., Matsushima, S. and T. Murakami, "Mapping of Address and Port using Translation (MAP-T)", Internet-Draft draft-ietf-softwire-map-t-08, December 2014.
[I-D.ietf-softwire-unified-cpe] Boucadair, M., Farrer, I., Perreault, S. and S. Sivakumar, "Unified IPv4-in-IPv6 Softwire CPE", Internet-Draft draft-ietf-softwire-unified-cpe-01, May 2013.
[RFC6333] Durand, A., Droms, R., Woodyatt, J. and Y. Lee, "Dual-Stack Lite Broadband Deployments Following IPv4 Exhaustion", RFC 6333, August 2011.

Authors' Addresses

Qi Sun Tsinghua University Beijing, 100084 P.R. China Phone: +86-10-6278-5822 EMail: sunqi@csnet1.cs.tsinghua.edu.cn
Hao Wang Tsinghua University Beijing, 100084 P.R. China Phone: +86-10-6278-5822 EMail: wangh13@mails.tsinghua.edu.cn
Yong Cui Tsinghua University Beijing, 100084 P.R. China Phone: +86-10-6260-3059 EMail: yong@csnet1.cs.tsinghua.edu.cn
Ian Farrer Deutsche Telekom AG CTO-ATI,Landgrabenweg 151 Bonn, NRW 53227 Germany EMail: ian.farrer@telekom.de
Mohamed Boucadair France Telecom Rennes, 35000 France EMail: mohamed.boucadair@orange.com