Skip to main content

IP Traffic Flow Security YANG Module
draft-fedyk-ipsecme-yang-iptfs-00

The information below is for an old version of the document.
Document Type
This is an older version of an Internet-Draft whose latest revision state is "Replaced".
Authors Don Fedyk , Christian Hopps
Last updated 2020-07-13
Replaced by draft-ietf-ipsecme-yang-iptfs, draft-ietf-ipsecme-yang-iptfs, RFC 9348
RFC stream (None)
Formats
Stream Stream state (No stream defined)
Consensus boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date (None)
Responsible AD (None)
Send notices to (None)
draft-fedyk-ipsecme-yang-iptfs-00
Network Working Group                                           D. Fedyk
Internet-Draft                                                  C. Hopps
Intended status: Standards Track                 LabN Consulting, L.L.C.
Expires: January 14, 2021                                  July 13, 2020

                  IP Traffic Flow Security YANG Module
                   draft-fedyk-ipsecme-yang-iptfs-00

Abstract

   This document describes a yang module for the management of IP
   Traffic Flow Security additions to IKEv2 and IPsec.

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 https://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 January 14, 2021.

Copyright Notice

   Copyright (c) 2020 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
   (https://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.

Fedyk & Hopps           Expires January 14, 2021                [Page 1]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Open Issues . . . . . . . . . . . . . . . . . . . . . . . . .   2
     2.1.  Terminology & Concepts  . . . . . . . . . . . . . . . . .   3
   3.  Overview  . . . . . . . . . . . . . . . . . . . . . . . . . .   3
   4.  YANG Management . . . . . . . . . . . . . . . . . . . . . . .   5
     4.1.  YANG Tree . . . . . . . . . . . . . . . . . . . . . . . .   5
     4.2.  YANG Module . . . . . . . . . . . . . . . . . . . . . . .   7
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  18
     5.1.  Updates to the IETF XML Registry  . . . . . . . . . . . .  18
     5.2.  Updates to the YANG Module Names Registry . . . . . . . .  18
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .  19
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  19
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .  19
     7.2.  Informative References  . . . . . . . . . . . . . . . . .  20
   Appendix A.  Examples . . . . . . . . . . . . . . . . . . . . . .  21
     A.1.  Example XML Configuration . . . . . . . . . . . . . . . .  21
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  25

1.  Introduction

   This document defines a YANG module [RFC7950] for the management of
   the IP Traffic Flow Security (IP-TFS) extensions as defined in
   [I-D.ietf-ipsecme-iptfs].  IP-TFS provides enhancements to an IPsec
   tunnel Security Association to provide improved traffic
   confidentiality.  Traffic confidentiality reduces the ability of
   traffic analysis to determine identity and correlate observable
   traffic patterns.  IP-TFS offers efficiency when aggregating traffic
   in fixed size IPsec tunnel packets.

   The YANG data model in this document conforms to the Network
   Management Datastore Architecture defined in [RFC8342].

2.  Open Issues

   Currently, the only actively published YANG modules for IPsec are
   found in [I-D.ietf-i2nsf-sdn-ipsec-flow-protection].  This document
   attempts to use these models as a general IPsec model that can be
   augmented, however, in their current form this does not seem to be a
   good fit.  The models in [I-D.ietf-i2nsf-sdn-ipsec-flow-protection]
   provide for an ike and an ikeless model but the ike model
   intentionally does not include a Security Association Database which
   is a logical place for IP-TFS attributes.

Fedyk & Hopps           Expires January 14, 2021                [Page 2]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

2.1.  Terminology & Concepts

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in
   [RFC2119] [RFC8174] when, and only when, they appear in all capitals,
   as shown here.

3.  Overview

   This document defines configuration and operational parameters of IP
   traffic flow security (IP-TFS).  IP-TFS, defined in
   [I-D.ietf-ipsecme-iptfs], configures a security association for
   tunnel mode IPsec with characteristics that improve traffic
   confidentiality and reduce bandwidth efficiency loss.  These
   documents assume familiarity with IP security concepts described in
   [RFC4301].

   IP-TFS uses tunnel mode to improve confidentiality by hiding inner
   packet identifiable information, packet size and packet timing.  IP-
   TFS provides a general capability allowing aggregation of multiple
   packets and packet size control utilizing padding and additionally
   utilizing inner packet fragments when a complete inner packet will
   not fit in the IPsec outer tunnel packet.  Zero byte padding is used
   to fill the packet when no data is available to send.

   This document specifies an extensible configuration model for IP-TFS.
   This initial version utilizes the capabilities of IP-TFS to configure
   fixed size IP-TFS Packets that are transmitted at a constant rate.
   This model is structured to allow for different types of operation
   through future augmentation.

   IP-TFS YANG augments IPsec YANG model from
   [I-D.ietf-i2nsf-sdn-ipsec-flow-protection].  IP-TFS makes use of
   IPsec tunnel mode and adds a small number configuration items to
   tunnel mode IPsec.  As defined in [I-D.ietf-ipsecme-iptfs], any SA
   configured to use IP-TFS supports only IP-TFS packets i.e. no mixed
   IPsec modes.

   The behavior for IP-TFS is controlled by the source.  The self-
   describing format of an IP-TFS packets allows a sending side to
   adjust the packet-size and timing independently from any receiver.
   Both directions are also independent, e.g.  IP-TFS may be run only in
   one direction.

   The data model uses following constructs for configuration and
   management:

Fedyk & Hopps           Expires January 14, 2021                [Page 3]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

   o Configuration

   o Operational State

   This YANG module supports configuration of fixed size and fixed rate
   packets, and elements that may be augmented to support future
   configuration.  The protocol specification [I-D.ietf-ipsecme-iptfs],
   goes beyond this simple fixed mode of operation by defining a general
   format for any type of scheme.  In this document the outer IPsec
   packets can be sent with fixed or variable size (without padding).
   The configuration allows the fixed packet size to be determined by
   the path MTU.  The fixed packet size can also be configured if a
   value lower than the path MTU is desired.

   Other configuration items include:

   o  Congestion Control.  A congestion control setting to allow IP-TFS
      to reduce the packet rate when congestion is detected.

   o  Fixed Rate configuration.  The IP-TFS tunnel rate can be
      configured taking into account either layer 2 overhead or layer 3
      overhead.  Layer 3 overhead is the IP data rate and layer 2
      overhead is the rate of bits on the link.  The combination of
      packet size and rate determines the nominal maximum bandwidth and
      the transmission interval when fixed size packets are used.

   o  User packet Fragmentation Control.  While fragmentation is
      recommended, a configuration is provided if users wish to observe
      the effect no-fragmentation on their data flows.

   The YANG operational data allows the readout of the configured
   parameters as well as the statistics and error counter for IP-TFS.
   Basic IPsec packet statistics are provided and IP-TFS statistics
   augment IPsec statistics with counters that allow observation of IP-
   TFS packet efficiency.

   Draft [I-D.ietf-i2nsf-sdn-ipsec-flow-protection] has a mature set of
   IPsec YANG management objects.

   IP-TFS YANG augments:

   o  Yang catalog entry for ietf-ipsec-ike@2019-08-05.yang

   o  Yang catalog entry for ietf-ipsec-ikeless@2019-08-05.yang

   The Security Policy database entry and Security Association entry for
   an IPsec Tunnel can be augmented with IP-TFS.

Fedyk & Hopps           Expires January 14, 2021                [Page 4]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

4.  YANG Management

4.1.  YANG Tree

   The following is the YANG tree diagram ([RFC8340]) for the IP-TFS
   extensions.

   module: ietf-ipsecme-iptfs
     augment /ike:ipsec-ike/ike:conn-entry/ike:spd/ike:spd-entry
               /ike:ipsec-policy-config/ike:processing-info
               /ike:ipsec-sa-cfg:
       +--rw traffic-flow-security
          +--rw congestion-control?    boolean
          +--rw packet-size
          |  +--rw use-path-mtu?        boolean
          |  +--rw outer-packet-size?   uint16
          +--rw (tunnel-rate)?
          |  +--:(l2-fixed-rate)
          |  |  +--rw l2-fixed-rate?   uint64
          |  +--:(l3-fixed-rate)
          |     +--rw l3-fixed-rate?   uint64
          +--rw dont-fragment?         boolean
     augment /ike:ipsec-ike/ike:conn-entry/ike:child-sa-info:
       +--ro traffic-flow-security
          +--ro congestion-control?    boolean
          +--ro packet-size
          |  +--ro use-path-mtu?        boolean
          |  +--ro outer-packet-size?   uint16
          +--ro (tunnel-rate)?
          |  +--:(l2-fixed-rate)
          |  |  +--ro l2-fixed-rate?   uint64
          |  +--:(l3-fixed-rate)
          |     +--ro l3-fixed-rate?   uint64
          +--ro dont-fragment?         boolean
     augment /ikeless:ipsec-ikeless/ikeless:spd/ikeless:spd-entry
               /ikeless:ipsec-policy-config/ikeless:processing-info
               /ikeless:ipsec-sa-cfg:
       +--rw traffic-flow-security
          +--rw congestion-control?    boolean
          +--rw packet-size
          |  +--rw use-path-mtu?        boolean
          |  +--rw outer-packet-size?   uint16
          +--rw (tunnel-rate)?
          |  +--:(l2-fixed-rate)
          |  |  +--rw l2-fixed-rate?   uint64
          |  +--:(l3-fixed-rate)
          |     +--rw l3-fixed-rate?   uint64

Fedyk & Hopps           Expires January 14, 2021                [Page 5]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

          +--rw dont-fragment?         boolean
     augment /ikeless:ipsec-ikeless/ikeless:sad/ikeless:sad-entry:
       +--ro traffic-flow-security
          +--ro congestion-control?    boolean
          +--ro packet-size
          |  +--ro use-path-mtu?        boolean
          |  +--ro outer-packet-size?   uint16
          +--ro (tunnel-rate)?
          |  +--:(l2-fixed-rate)
          |  |  +--ro l2-fixed-rate?   uint64
          |  +--:(l3-fixed-rate)
          |     +--ro l3-fixed-rate?   uint64
          +--ro dont-fragment?         boolean
     augment /ike:ipsec-ike/ike:conn-entry/ike:child-sa-info:
       +--ro tx-packets?                    uint64 {ipsec-stats}?
       +--ro tx-octets?                     uint64 {ipsec-stats}?
       +--ro tx-drop-packets?               uint64 {ipsec-stats}?
       +--ro rx-packets?                    uint64 {ipsec-stats}?
       +--ro rx-octets?                     uint64 {ipsec-stats}?
       +--ro rx-drop-packets?               uint64 {ipsec-stats}?
       +--rw rx-dropped-packet-detail {ipsec-stats}?
       |  +--ro sa-non-exist?   uint64
       |  +--ro queue-full?     uint64
       |  +--ro auth-failure?   uint64
       |  +--ro malform?        uint64
       |  +--ro replay?         uint64
       |  +--ro large-packet?   uint64
       |  +--ro invalid-sa?     uint64
       |  +--ro policy-deny?    uint64
       |  +--ro other-reason?   uint64
       +--ro tx-inner-packets?              uint64 {iptfs-stats}?
       +--ro tx-inner-octets?               uint64 {iptfs-stats}?
       +--ro tx-extra-pad-packets?          uint64 {iptfs-stats}?
       +--ro tx-extra-pad-octets?           uint64 {iptfs-stats}?
       +--ro tx-all-pad-packets?            uint64 {iptfs-stats}?
       +--ro tx-all-pad-octets?             uint64 {iptfs-stats}?
       +--ro rx-inner-packets?              uint64 {iptfs-stats}?
       +--ro rx-inner-octets?               uint64 {iptfs-stats}?
       +--ro rx-extra-pad-packets?          uint64 {iptfs-stats}?
       +--ro rx-extra-pad-octets?           uint64 {iptfs-stats}?
       +--ro rx-all-pad-packets?            uint64 {iptfs-stats}?
       +--ro rx-all-pad-octets?             uint64 {iptfs-stats}?
       +--ro rx-errored-packets?            uint64 {iptfs-stats}?
       +--ro rx-missed-packets?             uint64 {iptfs-stats}?
       +--ro rx-incomplete-inner-packets?   uint64 {iptfs-stats}?
     augment /ikeless:ipsec-ikeless/ikeless:sad/ikeless:sad-entry:
       +--ro tx-packets?                    uint64 {ipsec-stats}?
       +--ro tx-octets?                     uint64 {ipsec-stats}?

Fedyk & Hopps           Expires January 14, 2021                [Page 6]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

       +--ro tx-drop-packets?               uint64 {ipsec-stats}?
       +--ro rx-packets?                    uint64 {ipsec-stats}?
       +--ro rx-octets?                     uint64 {ipsec-stats}?
       +--ro rx-drop-packets?               uint64 {ipsec-stats}?
       +--rw rx-dropped-packet-detail {ipsec-stats}?
       |  +--ro sa-non-exist?   uint64
       |  +--ro queue-full?     uint64
       |  +--ro auth-failure?   uint64
       |  +--ro malform?        uint64
       |  +--ro replay?         uint64
       |  +--ro large-packet?   uint64
       |  +--ro invalid-sa?     uint64
       |  +--ro policy-deny?    uint64
       |  +--ro other-reason?   uint64
       +--ro tx-inner-packets?              uint64 {iptfs-stats}?
       +--ro tx-inner-octets?               uint64 {iptfs-stats}?
       +--ro tx-extra-pad-packets?          uint64 {iptfs-stats}?
       +--ro tx-extra-pad-octets?           uint64 {iptfs-stats}?
       +--ro tx-all-pad-packets?            uint64 {iptfs-stats}?
       +--ro tx-all-pad-octets?             uint64 {iptfs-stats}?
       +--ro rx-inner-packets?              uint64 {iptfs-stats}?
       +--ro rx-inner-octets?               uint64 {iptfs-stats}?
       +--ro rx-extra-pad-packets?          uint64 {iptfs-stats}?
       +--ro rx-extra-pad-octets?           uint64 {iptfs-stats}?
       +--ro rx-all-pad-packets?            uint64 {iptfs-stats}?
       +--ro rx-all-pad-octets?             uint64 {iptfs-stats}?
       +--ro rx-errored-packets?            uint64 {iptfs-stats}?
       +--ro rx-missed-packets?             uint64 {iptfs-stats}?
       +--ro rx-incomplete-inner-packets?   uint64 {iptfs-stats}?

4.2.  YANG Module

   The following is the YANG module for managing the IP-TFS extensions.

   <CODE BEGINS> file "ietf-ipsecme-iptfs@2020-07-13.yang"
   module ietf-ipsecme-iptfs {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-ipsecme-iptfs";
     prefix iptfs;

     import ietf-ipsec-ike {
       prefix ike;
     }
     import ietf-ipsec-ikeless {
       prefix ikeless;
     }

     organization

Fedyk & Hopps           Expires January 14, 2021                [Page 7]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

       "IETF IPSECME Working Group (IPSECME)";
     contact
       "WG Web:  <https://tools.ietf.org/wg/ipsecme/>
        WG List: <mailto:ipsecme@ietf.org>

        Author: Don Fedyk
                <mailto:dfedyk@labn.net>

        Author: Christian Hopps
                <mailto:chopps@chopps.org>";

     // RFC Ed.: replace XXXX with actual RFC number and
     // remove this note.

     description
       "This module defines the configuration and operational state for
        managing the IP Traffic Flow Security functionality [RFC XXXX].

        Copyright (c) 2020 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
        (https://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC XXXX
        (https://tools.ietf.org/html/rfcXXXX); see the RFC itself for
        full legal notices.";

     revision 2020-07-13 {
       description
         "Initial Revision";
       reference
         "RFC XXXX: IP Traffic Flow Security YANG Module";
     }

     feature ipsec-stats {
       description
         "This feature indicates the device supports IPsec
          statistics";
     }

     feature iptfs-stats {
       description
         "This feature indicates the device supports IP

Fedyk & Hopps           Expires January 14, 2021                [Page 8]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

          Traffic Flow Security statistics";
     }

     /*--------------------*/
     /*   groupings        */
     /*--------------------*/

     grouping ipsec-tx-stat-grouping {
       description
         "IPsec outbound statistics";
       leaf tx-packets {
         type uint64;
         config false;
         description
           "Outbound Packet count";
       }
       leaf tx-octets {
         type uint64;
         config false;
         description
           "Outbound Packet bytes";
       }
       leaf tx-drop-packets {
         type uint64;
         config false;
         description
           "Outbound dropped packets count";
       }
     }

     grouping ipsec-rx-stat-grouping {
       description
         "IPsec inbound statistics";
       leaf rx-packets {
         type uint64;
         config false;
         description
           "Inbound Packet count";
       }
       leaf rx-octets {
         type uint64;
         config false;
         description
           "Inbound Packet bytes";
       }
       leaf rx-drop-packets {
         type uint64;
         config false;

Fedyk & Hopps           Expires January 14, 2021                [Page 9]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

         description
           "Inbound dropped packets count";
       }
       container rx-dropped-packet-detail {
         description
           "The detail information of dropped packets";
         leaf sa-non-exist {
           type uint64;
           config false;
           description
             "The dropped packets counts caused by SA
              non-exist.";
         }
         leaf queue-full {
           type uint64;
           config false;
           description
             "The dropped packets counts caused by full
              processing queue";
         }
         leaf auth-failure {
           type uint64;
           config false;
           description
             "The dropped packets counts caused by
              authentication failure";
         }
         leaf malform {
           type uint64;
           config false;
           description
             "The dropped packets counts of malform";
         }
         leaf replay {
           type uint64;
           config false;
           description
             "The dropped packets counts of replay";
         }
         leaf large-packet {
           type uint64;
           config false;
           description
             "The dropped packets counts of too large";
         }
         leaf invalid-sa {
           type uint64;
           config false;

Fedyk & Hopps           Expires January 14, 2021               [Page 10]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

           description
             "The dropped packets counts of invalid SA";
         }
         leaf policy-deny {
           type uint64;
           config false;
           description
             "The dropped packets counts of denied by policy";
         }
         leaf other-reason {
           type uint64;
           config false;
           description
             "The dropped packets counts of other reason";
         }
       }
     }

     grouping iptfs-tx-stat-grouping {
       description
         "IP-TFS outbound statistics";
       leaf tx-inner-packets {
         type uint64;
         config false;
         description
           "Total number of IP-TFS inner packets sent. This
            count is whole packets only.  A fragmented packet
            counts as one packet";
         reference
           "draft-ietf-ipsecme-iptfs-01";
       }
       leaf tx-inner-octets {
         type uint64;
         config false;
         description
           "Total number of IP-TFS inner octets sent.  This is
            inner packet octets only.  Does not count padding.";
         reference
           "draft-ietf-ipsecme-iptfs-01";
       }
       leaf tx-extra-pad-packets {
         type uint64;
         config false;
         description
           "Total number of transmitted outer IP-TFS packets
            that included some padding.";
         reference
           "draft-ietf-ipsecme-iptfs-01";

Fedyk & Hopps           Expires January 14, 2021               [Page 11]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

       }
       leaf tx-extra-pad-octets {
         type uint64;
         config false;
         description
           "Total number of transmitted octets of padding added
            to outer IP-TFS packets with data.";
         reference
           "draft-ietf-ipsecme-iptfs-01";
       }
       leaf tx-all-pad-packets {
         type uint64;
         config false;
         description
           "Total number of transmitted IP-TFS packets that
            were all padding with no inner packet data.";
         reference
           "draft-ietf-ipsecme-iptfs-01";
       }
       leaf tx-all-pad-octets {
         type uint64;
         config false;
         description
           "Total number transmitted octets of padding added to
            IP-TFS packets with no inner packet data.";
         reference
           "draft-ietf-ipsecme-iptfs-01";
       }
     }

     grouping iptfs-rx-stat-grouping {
       description
         "IP-TFS inbound statistics";
       leaf rx-inner-packets {
         type uint64;
         config false;
         description
           "Total number of IP-TFS inner packets received.";
         reference
           "draft-ietf-ipsecme-iptfs-01";
       }
       leaf rx-inner-octets {
         type uint64;
         config false;
         description
           "Total number of IP-TFS inner octets received.  Does
            not include padding or overhead";
         reference

Fedyk & Hopps           Expires January 14, 2021               [Page 12]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

           "draft-ietf-ipsecme-iptfs-01";
       }
       leaf rx-extra-pad-packets {
         type uint64;
         config false;
         description
           "Total number of received outer IP-TFS packets that
            included some padding.";
         reference
           "draft-ietf-ipsecme-iptfs-01";
       }
       leaf rx-extra-pad-octets {
         type uint64;
         config false;
         description
           "Total number of received octets of padding added to
            outer IP-TFS packets with data.";
         reference
           "draft-ietf-ipsecme-iptfs-01";
       }
       leaf rx-all-pad-packets {
         type uint64;
         config false;
         description
           "Total number of received IP-TFS packets that were
            all padding with no inner packet data.";
         reference
           "draft-ietf-ipsecme-iptfs-01";
       }
       leaf rx-all-pad-octets {
         type uint64;
         config false;
         description
           "Total number received octets of padding added to
            IP-TFS packets with no inner packet data.";
         reference
           "draft-ietf-ipsecme-iptfs-01";
       }
       leaf rx-errored-packets {
         type uint64;
         config false;
         description
           "Total number of IP-TFS outer packets dropped due to
            errors.";
         reference
           "draft-ietf-ipsecme-iptfs-01";
       }
       leaf rx-missed-packets {

Fedyk & Hopps           Expires January 14, 2021               [Page 13]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

         type uint64;
         config false;
         description
           "Total number of IP-TFS outer packets missing
            indicated by missing sequence number.";
         reference
           "draft-ietf-ipsecme-iptfs-01";
       }
       leaf rx-incomplete-inner-packets {
         type uint64;
         config false;
         description
           "Total number of IP-TFS inner packets that were
            incomplete.  Usually this is due to fragments not
            received. Also, this may be due to misordering or
            errors in received outer packets.";
         reference
           "draft-ietf-ipsecme-iptfs-01";
       }
     }

     grouping iptfs-config {
       description
         "This is the grouping for iptfs configuration";
       container traffic-flow-security {
         // config true; want this so we can refine?
         description
           "Configure the IPSec TFS in Security
            Association Database (SAD)";
         leaf congestion-control {
           type boolean;
           default "true";
           description
             "Congestion Control With the congestion controlled
             mode, IP-TFS adapts to network congestion by
             lowering the packet send rate to accommodate the
             congestion, as well as raising the rate when
             congestion subsides.";
           reference
             "draft-ietf-ipsecme-iptfs-01 Section 2.5.2";
         }
         container packet-size {
           description
             "Packet size is either auto-discovered or manually
              configured.";
           leaf use-path-mtu {
             type boolean;
             default "true";

Fedyk & Hopps           Expires January 14, 2021               [Page 14]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

             description
               "Utilize path-mtu to determine maximum IP-TFS
               packet size.  If the packet size is explicitly
               configured, then it will only be adjusted
               downward if use-path-mtu is set.";
             reference
               "draft-ietf-ipsecme-iptfs-01 Section 4.2";
           }
           leaf outer-packet-size {
             type uint16;
             description
               "The size of the outer encapsulating tunnel
               packet (i.e., the IP packet containing the ESP
               payload).";
             reference
               "draft-ietf-ipsecme-iptfs-01 Section 4.2";
           }
         }
         choice tunnel-rate {
           description
             "TFS bit rate may be specified at layer 2 wire
              rate or layer 3 packet rate";
           leaf l2-fixed-rate {
             type uint64;
             description
               "Target bandwidth/bit rate in bps for iptfs
               tunnel. This fixed rate is the nominal timing
               for the fixed size packet. If congestion control
               is enabled the rate may be adjusted down (or up
               if unset).";
             reference
               "draft-ietf-ipsecme-iptfs-01 section 4.1";
           }
           leaf l3-fixed-rate {
             type uint64;
             description
               "Target bandwidth/bit rate in bps for iptfs
               tunnel. This fixed rate is the nominal timing
               for the fixed size packet. If congestion control
               is enabled the rate may be adjusted down (or up
               if unset).";
             reference
               "draft-ietf-ipsecme-iptfs-01 section 4.1";
           }
         }
         leaf dont-fragment {
           type boolean;
           default "false";

Fedyk & Hopps           Expires January 14, 2021               [Page 15]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

           description
             "Disable packet fragmentation across consecutive iptfs
              tunnel packets";
           reference
             "draft-ietf-ipsecme-iptfs-01 section 2.2.4 and 6.4.1";
         }
       }
     }

     /*
      * IP-TFS ike configuration
      */

     augment "/ike:ipsec-ike/ike:conn-entry/ike:spd/"
           + "ike:spd-entry/"
           + "ike:ipsec-policy-config/"
           + "ike:processing-info/"
           + "ike:ipsec-sa-cfg" {
       description
         "IP-TFS configuration for this policy.";
       uses iptfs-config;
     }

     augment "/ike:ipsec-ike/ike:conn-entry/"
           + "ike:child-sa-info" {
       description
         "IP-TFS configured on this SA.";
       uses iptfs-config {
         refine "traffic-flow-security" {
           config false;
         }
       }
     }

     /*
      * IP-TFS ikeless configuration
      */

     augment "/ikeless:ipsec-ikeless/ikeless:spd/"
           + "ikeless:spd-entry/"
           + "ikeless:ipsec-policy-config/"
           + "ikeless:processing-info/"
           + "ikeless:ipsec-sa-cfg" {
       description
         "IP-TFS configuration for this policy.";
       uses iptfs-config;
     }

Fedyk & Hopps           Expires January 14, 2021               [Page 16]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

     augment "/ikeless:ipsec-ikeless/ikeless:sad/"
           + "ikeless:sad-entry" {
       description
         "IP-TFS configured on this SA.";
       uses iptfs-config {
         refine "traffic-flow-security" {
           config false;
         }
       }
     }

     /*
      * packet counters
      */

     augment "/ike:ipsec-ike/ike:conn-entry/"
           + "ike:child-sa-info" {
       description
         "Per-SA IPsec SA with IP-TFS packet counters.";
       uses ipsec-tx-stat-grouping {
         //when "direction = 'outbound'";
         if-feature "ipsec-stats";
       }
       uses ipsec-rx-stat-grouping {
         //when "direction = 'inbound'";
         if-feature "ipsec-stats";
       }
       uses iptfs-tx-stat-grouping {
         //when "direction = 'outbound'";
         if-feature "iptfs-stats";
       }
       uses iptfs-rx-stat-grouping {
         //when "direction = 'inbound'";
         if-feature "iptfs-stats";
       }
     }

     /*
      * packet counters
      */

     augment "/ikeless:ipsec-ikeless/ikeless:sad/"
           + "ikeless:sad-entry" {
       description
         "Per-SA IPsec SA with IP-TFS packet counters.";
       uses ipsec-tx-stat-grouping {
         //when "direction = 'outbound'";
         if-feature "ipsec-stats";

Fedyk & Hopps           Expires January 14, 2021               [Page 17]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

       }
       uses ipsec-rx-stat-grouping {
         //when "direction = 'inbound'";
         if-feature "ipsec-stats";
       }
       uses iptfs-tx-stat-grouping {
         //when "direction = 'outbound'";
         if-feature "iptfs-stats";
       }
       uses iptfs-rx-stat-grouping {
         //when "direction = 'inbound'";
         if-feature "iptfs-stats";
       }
     }
   }
   <CODE ENDS>

5.  IANA Considerations

5.1.  Updates to the IETF XML Registry

   This document registers a URI in the "IETF XML Registry" [RFC3688].
   Following the format in [RFC3688], the following registration has
   been made:

   URI:
      urn:ietf:params:xml:ns:yang:ietf-ipsecme-iptfs

   Registrant Contact:
      The IESG.

   XML:
      N/A; the requested URI is an XML namespace.

5.2.  Updates to the YANG Module Names Registry

   This document registers one YANG module in the "YANG Module Names"
   registry [RFC6020].  Following the format in [RFC6020], the following
   registration has been made:

   name:
      ietf-ipsecme-iptfs

   namespace:
      urn:ietf:params:xml:ns:yang:ietf-ipsecme-iptfs

   prefix:
      iptfs

Fedyk & Hopps           Expires January 14, 2021               [Page 18]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

   reference:
      RFC XXXX (RFC Ed.: replace XXXX with actual RFC number and remove
      this note.)

6.  Security Considerations

   The YANG module specified in this document defines a schema for data
   that is designed to be accessed via network management protocols such
   as NETCONF [RFC6241] or RESTCONF [RFC8040].  The lowest NETCONF layer
   is the secure transport layer, and the mandatory-to-implement secure
   transport is Secure Shell (SSH) [RFC6242].  The lowest RESTCONF layer
   is HTTPS, and the mandatory-to-implement secure transport is TLS
   [RFC8446].

   The Network Configuration Access Control Model (NACM) [RFC8341]
   provides the means to restrict access for particular NETCONF or
   RESTCONF users to a preconfigured subset of all available NETCONF or
   RESTCONF protocol operations and content.

   The YANG module defined in this document can enable, disable and
   modify the behavior of IP traffic flow security, for the implications
   regarding these types of changes consult the [I-D.ietf-ipsecme-iptfs]
   which defines the functionality.

7.  References

7.1.  Normative References

   [I-D.ietf-i2nsf-sdn-ipsec-flow-protection]
              Lopez, R., Lopez-Millan, G., and F. Pereniguez-Garcia,
              "Software-Defined Networking (SDN)-based IPsec Flow
              Protection", draft-ietf-i2nsf-sdn-ipsec-flow-protection-08
              (work in progress), June 2020.

   [I-D.ietf-ipsecme-iptfs]
              Hopps, C., "IP Traffic Flow Security", draft-ietf-ipsecme-
              iptfs-01 (work in progress), March 2020.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC4301]  Kent, S. and K. Seo, "Security Architecture for the
              Internet Protocol", RFC 4301, DOI 10.17487/RFC4301,
              December 2005, <https://www.rfc-editor.org/info/rfc4301>.

Fedyk & Hopps           Expires January 14, 2021               [Page 19]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

   [RFC6020]  Bjorklund, M., Ed., "YANG - A Data Modeling Language for
              the Network Configuration Protocol (NETCONF)", RFC 6020,
              DOI 10.17487/RFC6020, October 2010,
              <https://www.rfc-editor.org/info/rfc6020>.

   [RFC7950]  Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
              RFC 7950, DOI 10.17487/RFC7950, August 2016,
              <https://www.rfc-editor.org/info/rfc7950>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

   [RFC8342]  Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
              and R. Wilton, "Network Management Datastore Architecture
              (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018,
              <https://www.rfc-editor.org/info/rfc8342>.

7.2.  Informative References

   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
              DOI 10.17487/RFC3688, January 2004,
              <https://www.rfc-editor.org/info/rfc3688>.

   [RFC6241]  Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
              and A. Bierman, Ed., "Network Configuration Protocol
              (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
              <https://www.rfc-editor.org/info/rfc6241>.

   [RFC6242]  Wasserman, M., "Using the NETCONF Protocol over Secure
              Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011,
              <https://www.rfc-editor.org/info/rfc6242>.

   [RFC8040]  Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
              Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
              <https://www.rfc-editor.org/info/rfc8040>.

   [RFC8340]  Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
              BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
              <https://www.rfc-editor.org/info/rfc8340>.

   [RFC8341]  Bierman, A. and M. Bjorklund, "Network Configuration
              Access Control Model", STD 91, RFC 8341,
              DOI 10.17487/RFC8341, March 2018,
              <https://www.rfc-editor.org/info/rfc8341>.

Fedyk & Hopps           Expires January 14, 2021               [Page 20]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

   [RFC8446]  Rescorla, E., "The Transport Layer Security (TLS) Protocol
              Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
              <https://www.rfc-editor.org/info/rfc8446>.

Appendix A.  Examples

   The following examples show configuration and operational data for
   the ikeless case in xml and ike case in json.  Also, the operational
   statistics for the ikeless case is shown using xml.

A.1.  Example XML Configuration

   <i:ipsec-ikeless
     xmlns:i="urn:ietf:params:xml:ns:yang:ietf-ipsec-ikeless"
     xmlns:ic="urn:ietf:params:xml:ns:yang:ietf-ipsec-common"
     xmlns:tfs="urn:ietf:params:xml:ns:yang:ietf-ipsecme-iptfs">
     <i:spd>
       <i:spd-entry>
         <i:name>protect-policy-1</i:name>
         <i:ipsec-policy-config>
           <i:traffic-selector>
             <i:local-subnet>1.1.1.1/32</i:local-subnet>
             <i:remote-subnet>2.2.2.2/32</i:remote-subnet>
           </i:traffic-selector>
           <i:processing-info>
             <i:action>protect</i:action>
             <i:ipsec-sa-cfg>
               <tfs:traffic-flow-security>
                <tfs:congestion-control>true</tfs:congestion-control>
                 <tfs:packet-size>
                   <tfs:use-path-mtu>true</tfs:use-path-mtu>
                 </tfs:packet-size>
                 <tfs:l2-fixed-rate>1000000000</tfs:l2-fixed-rate>
               </tfs:traffic-flow-security>
             </i:ipsec-sa-cfg>
           </i:processing-info>
         </i:ipsec-policy-config>
       </i:spd-entry>
     </i:spd>
   </i:ipsec-ikeless>

                Figure 1: Example IP-TFS XML configuration

Fedyk & Hopps           Expires January 14, 2021               [Page 21]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

   <i:ipsec-ikeless
     xmlns:i="urn:ietf:params:xml:ns:yang:ietf-ipsec-ikeless"
     xmlns:ic="urn:ietf:params:xml:ns:yang:ietf-ipsec-common"
     xmlns:tfs="urn:ietf:params:xml:ns:yang:ietf-ipsecme-iptfs">
     <i:sad>
       <i:sad-entry>
         <i:name>sad-1</i:name>
         <i:ipsec-sa-config>
           <i:spi>1</i:spi>
           <i:traffic-selector>
             <i:local-subnet>1.1.1.1/32</i:local-subnet>
             <i:remote-subnet>2.2.2.2/32</i:remote-subnet>
           </i:traffic-selector>
         </i:ipsec-sa-config>
         <tfs:traffic-flow-security>
          <tfs:congestion-control>true</tfs:congestion-control>
           <tfs:packet-size>
             <tfs:use-path-mtu>true</tfs:use-path-mtu>
           </tfs:packet-size>
           <tfs:l2-fixed-rate>1000000000</tfs:l2-fixed-rate>
         </tfs:traffic-flow-security>
       </i:sad-entry>
     </i:sad>
   </i:ipsec-ikeless>

               Figure 2: Example IP-TFS XML Operational data

Fedyk & Hopps           Expires January 14, 2021               [Page 22]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

   {
     "ietf-ipsec-ike:ipsec-ike": {
       "ietf-ipsec-ike:conn-entry": [
         {
           "name": "my-peer-connection",
           "ietf-ipsec-ike:spd": {
             "spd-entry": [
               {
                 "name": "protect-policy-1",
                 "ipsec-policy-config": {
                   "traffic-selector": {
                     "local-subnet": "1.1.1.1/32",
                     "remote-subnet": "2.2.2.2/32"
                   },
                   "processing-info": {
                     "action": "protect",
                     "ipsec-sa-cfg": {
                       "ietf-ipsecme-iptfs:traffic-flow-security": {
                         "congestion-control": "true",
                         "l2-fixed-rate": 1000000000,
                         "packet-size": {
                           "use-path-mtu": "true"
                         }
                       }
                     }
                   }
                 }
               }
             ]
           }
         }
       ]
     }
   }

                Figure 3: Example IP-TFS JSON configuration

Fedyk & Hopps           Expires January 14, 2021               [Page 23]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

   {
     "ietf-ipsec-ike:ipsec-ike": {
       "ietf-ipsec-ike:conn-entry": [
         {
           "name": "my-peer-connection",
           "ietf-ipsec-ike:child-sa-info": {
             "ietf-ipsecme-iptfs:traffic-flow-security": {
               "congestion-control": "true",
               "l2-fixed-rate": 1000000000,
               "packet-size": {
                 "use-path-mtu": "true"
               }
             }
           }
         }
       ]
     }
   }

              Figure 4: Example IP-TFS JSON Operational data

   <i:ipsec-ikeless
     xmlns:i="urn:ietf:params:xml:ns:yang:ietf-ipsec-ikeless"
     xmlns:ic="urn:ietf:params:xml:ns:yang:ietf-ipsec-common"
     xmlns:tfs="urn:ietf:params:xml:ns:yang:ietf-ipsecme-iptfs">
     <i:sad>
       <i:sad-entry>
         <i:name>sad-1</i:name>
         <i:ipsec-sa-config>
           <i:spi>1</i:spi>
           <i:traffic-selector>
             <i:local-subnet>1.1.1.1/32</i:local-subnet>
             <i:remote-subnet>2.2.2.2/32</i:remote-subnet>
           </i:traffic-selector>
         </i:ipsec-sa-config>
         <tfs:tx-packets>100</tfs:tx-packets>
         <tfs:tx-octets>80000</tfs:tx-octets>
         <tfs:tx-drop-packets>2</tfs:tx-drop-packets>
         <tfs:rx-packets>50</tfs:rx-packets>
         <tfs:rx-octets>50000</tfs:rx-octets>
         <tfs:rx-drop-packets>0</tfs:rx-drop-packets>
         <tfs:rx-dropped-packet-detail>
           <tfs:sa-non-exist>0</tfs:sa-non-exist>
           <tfs:queue-full>0</tfs:queue-full>
           <tfs:auth-failure>0</tfs:auth-failure>
           <tfs:malform>0</tfs:malform>
           <tfs:replay>0</tfs:replay>
           <tfs:large-packet>0</tfs:large-packet>

Fedyk & Hopps           Expires January 14, 2021               [Page 24]
Internet-Draft    IP Traffic Flow Security YANG Module         July 2020

           <tfs:invalid-sa>0</tfs:invalid-sa>
           <tfs:policy-deny>0</tfs:policy-deny>
           <tfs:other-reason>0</tfs:other-reason>
         </tfs:rx-dropped-packet-detail>
         <tfs:tx-inner-packets>250</tfs:tx-inner-packets>
         <tfs:tx-inner-octets>75000</tfs:tx-inner-octets>
         <tfs:tx-extra-pad-packets>200</tfs:tx-extra-pad-packets>
         <tfs:tx-extra-pad-octets>30000</tfs:tx-extra-pad-octets>
         <tfs:tx-all-pad-packets>40</tfs:tx-all-pad-packets>
         <tfs:tx-all-pad-octets>40000</tfs:tx-all-pad-octets>
         <tfs:rx-inner-packets>240</tfs:rx-inner-packets>
         <tfs:rx-inner-octets>95000</tfs:rx-inner-octets>
         <tfs:rx-extra-pad-packets>150</tfs:rx-extra-pad-packets>
         <tfs:rx-extra-pad-octets>25000</tfs:rx-extra-pad-octets>
         <tfs:rx-all-pad-packets>20</tfs:rx-all-pad-packets>
         <tfs:rx-all-pad-octets>20000</tfs:rx-all-pad-octets>
         <tfs:rx-errored-packets>0</tfs:rx-errored-packets>
         <tfs:rx-missed-packets>0</tfs:rx-missed-packets>
         <tfs:rx-incomplete-inner-packets>0
           </tfs:rx-incomplete-inner-packets>
       </i:sad-entry>
     </i:sad>
   </i:ipsec-ikeless>

                  Figure 5: Example IP-TFS XML Statistics

Authors' Addresses

   Don Fedyk
   LabN Consulting, L.L.C.

   Email: dfedyk@labn.net

   Christian Hopps
   LabN Consulting, L.L.C.

   Email: chopps@chopps.org

Fedyk & Hopps           Expires January 14, 2021               [Page 25]