<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc category="std" docName="draft-ietf-tcpm-yang-tcp-02" ipr="trust200902">
  <front>
    <title abbrev="TCP Configuration">YANG Model for Transmission Control
    Protocol (TCP) Configuration</title>

    <author fullname="Michael Scharf" initials="M." surname="Scharf">
      <organization abbrev="Hochschule Esslingen">Hochschule Esslingen -
      University of Applied Sciences</organization>

      <address>
        <postal>
          <street>Flandernstr. 101</street>

          <code>73732</code>

          <city>Esslingen</city>

          <region/>

          <country>Germany</country>
        </postal>

        <!--<phone></phone>-->

        <email>michael.scharf@hs-esslingen.de</email>
      </address>
    </author>

    <author fullname="Vishal Murgai" initials="V." surname="Murgai">
      <organization>Samsung</organization>

      <address>
        <email>vmurgai@gmail.com</email>
      </address>
    </author>

    <author fullname="Mahesh Jethanandani" initials="M."
            surname="Jethanandani">
      <organization>Kloud Services</organization>

      <address>
        <email>mjethanandani@gmail.com</email>
      </address>
    </author>

    <date day="8" month="July" year="2021"/>

    <area>Transport</area>

    <workgroup>TCPM</workgroup>

    <keyword>YANG</keyword>

    <abstract>
      <t>This document specifies a YANG model for TCP on devices that are
      configured by network management protocols. The YANG model defines a
      container for all TCP connections and groupings of some of the
      parameters that can be imported and used in TCP implementations or by
      other models that need to configure TCP parameters. The model includes
      definitions from YANG Groupings for TCP Client and TCP Servers
      (I-D.ietf-netconf-tcp-client-server). The model is NMDA (RFC 8342)
      compliant.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>The <xref target="RFC0793">Transmission Control Protocol (TCP)
      </xref> is used by many applications in the Internet, including control
      and management protocols. Therefore, TCP is implemented on network
      elements that can be configured via network management protocols such as
      <xref target="RFC6241">NETCONF</xref> or <xref
      target="RFC8040">RESTCONF</xref>. This document specifies a <xref
      target="RFC7950">YANG</xref> 1.1 model for configuring TCP on network
      elements that support YANG data models, and is <xref
      target="RFC8342">Network Management Datastore Architecture (NMDA)</xref>
      compliant. This module defines a container for TCP connection, and
      includes definitions from <xref
      target="I-D.ietf-netconf-tcp-client-server">YANG Groupings for TCP
      Clients and TCP Servers</xref>. The model has a narrow scope and focuses
      on fundamental TCP functions and basic statistics. The model can be
      augmented or updated to address more advanced or implementation-specific
      TCP features in the future.</t>

      <t>Many protocol stacks on Internet hosts use other methods to configure
      TCP, such as operating system configuration or policies. Many TCP/IP
      stacks cannot be configured by network management protocols such as
      <xref target="RFC6241">NETCONF</xref> or <xref
      target="RFC8040">RESTCONF</xref>. Moreover, many existing TCP/IP stacks
      do not use YANG data models. Such TCP implementations often have other
      means to configure the parameters listed in this document, which are
      outside the scope of this document.</t>

      <t>This specification is orthogonal to the <xref
      target="RFC4022">Management Information Base (MIB) for the Transmission
      Control Protocol (TCP)</xref>. The basic statistics defined in this
      document follow the model of the TCP MIB. An <xref target="RFC4898">TCP
      Extended Statistics MIB</xref> is also available, but this document does
      not cover such extended statistics. It is possible also to translate a
      MIB into a YANG model, for instance using <xref
      target="RFC6643">Translation of Structure of Management Information
      Version 2 (SMIv2) MIB Modules to YANG Modules</xref>. However, this
      approach is not used in this document, as such a translated model would
      not be up-to-date.</t>

      <t>There are other existing TCP-related YANG models, which are
      orthogonal to this specification. Examples are:</t>

      <t><list style="symbols">
          <t>TCP header attributes are modeled in other models, such as <xref
          target="RFC8519">YANG Data Model for Network Access Control Lists
          (ACLs) </xref> and <xref target="RFC8783">Distributed
          Denial-of-Service Open Thread Signaling (DOTS) Data Channel
          Specification</xref>.</t>

          <t>TCP-related configuration of a NAT (e.g., NAT44, NAT64,
          Destination NAT, ...) is defined in <xref target="RFC8512">A YANG
          Module for Network Address Translation (NAT) and Network Prefix
          Translation (NPT) </xref> and <xref target="RFC8513">A YANG Data
          Model for Dual-Stack Lite (DS-Lite) </xref>.</t>
        </list></t>
    </section>

    <section title="Requirements Language">
      <t>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 BCP 14
      <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when,
      they appear in all capitals, as shown here.</t>

      <section title="Note to  RFC Editor">
        <t>This document uses several placeholder values throughout the
        document. Please replace them as follows and remove this note before
        publication.</t>

        <t>RFC XXXX, where XXXX is the number assigned to this document at the
        time of publication.</t>

        <t>2021-07-06 with the actual date of the publication of this
        document.</t>
      </section>
    </section>

    <section title="Model Overview">
      <section title="Modeling Scope">
        <t>TCP is implemented on many different system architectures. As a
        result, there are may different and often implementation-specific ways
        to configure parameters of the TCP protocol engine. In addition, in
        many TCP/IP stacks configuration exists for different scopes:</t>

        <t><list style="symbols">
            <t>Global configuration: Many TCP implementations have
            configuration parameters that affect all TCP connections. Typical
            examples include enabling or disabling optional protocol
            features.</t>

            <t>Interface configuration: It can be useful to use different TCP
            parameters on different interfaces, e.g., different device ports
            or IP interfaces. In that case, TCP parameters can be part of the
            interface configuration. Typical examples are the Maximum Segment
            Size (MSS) or configuration related to hardware offloading.</t>

            <t>Connection parameters: Many implementations have means to
            influence the behavior of each TCP connection, e.g., on the
            programming interface used by applications. A typical example are
            socket options in the socket API, such as disabling the Nagle
            algorithm by TCP_NODELAY. If an application uses such an
            interface, it is possible that the configuration of the
            application or application protocol includes TCP-related
            parameters. An example is the <xref
            target="I-D.ietf-idr-bgp-model">BGP YANG Model for Service
            Provider Networks </xref>.</t>

            <t>Policies: Setting of TCP parameters can also be part of system
            policies, templates, or profiles. An example would be the
            preferences defined in <xref target="I-D.ietf-taps-interface">An
            Abstract Application Layer Interface to Transport
            Services</xref>.</t>
          </list></t>

        <t>As a result, there is no ground truth for setting certain TCP
        parameters, and traditionally different TCP implementation have used
        different modeling approaches. For instance, one implementation may
        define a given configuration parameter globally, while another one
        uses per-interface settings, and both approaches work well for the
        corresponding use cases. Also, different systems may use different
        default values. In addition, TCP can be implemented in different ways
        and design choices by the protocol engine often affect configuration
        options.</t>

        <t>Nonetheless, a number of TCP stack parameters require configuration
        by YANG models. This document therefore defines a minimal YANG model
        with fundamental parameters directly following from TCP standards.</t>

        <t>An important use case is the TCP configuration on network elements
        such as routers, which often use YANG data models. The model therefore
        specifies TCP parameters that are important on such TCP stacks.</t>

        <t>A typical example is the support of <xref
        target="RFC5925">TCP-AO</xref>. TCP-AO is increasingly supported on
        routers to secure routing protocols such as BGP. In that case, TCP-AO
        configuration is required on routers. The model includes the required
        TCP parameters for TCP-AO configuration. The key chain for TCP-AO can
        be modeled by the <xref target="RFC8177">YANG Data Model for Key
        Chains</xref>.</t>

        <t>Given an installed base, the model also allows enabling of the
        legacy <xref target="RFC2385">TCP MD5</xref> signature option. As the
        TCP MD5 signature option is obsoleted by TCP-AO, it is strongly
        RECOMMENDED to use TCP-AO.</t>

        <t>Similar to the <xref target="RFC4022">TCP MIB</xref>, this document
        also specifies basic statistics and a TCP connection table.</t>

        <t><list style="symbols">
            <t>Statistics: Counters for the number of active/passive opens,
            sent and received segments, errors, and possibly other detailed
            debugging information</t>

            <t>TCP connection table: Access to status information for all TCP
            connections</t>
          </list></t>

        <t>This allows implementations of <xref target="RFC4022">TCP
        MIB</xref> to migrate to the YANG model defined in this memo.
        Note that the TCP MIB does not include means to reset statistics, which
        are defined in this document. This is not a major addition, as a reset
        can simply be implemented by storing offset values for the counters.</t>
      </section>

      <section title="Model Design">
        <t>The YANG model defined in this document includes definitions from
        the <xref target="I-D.ietf-netconf-tcp-client-server">YANG Groupings
        for TCP Clients and TCP Servers</xref>. Similar to that model, this
        specification defines YANG groupings. This allows reuse of these
        groupings in different YANG data models. It is intended that these
        groupings will be used either standalone or for TCP-based protocols as
        part of a stack of protocol-specific configuration models. An example
        could be the <xref target="I-D.ietf-idr-bgp-model">BGP YANG Model for
        Service Provider Networks </xref>.</t>
      </section>

      <section title="Tree Diagram">
        <t>This section provides a abridged tree diagram for the YANG module
        defined in this document. Annotations used in the diagram are defined
        in <xref target="RFC8340">YANG Tree Diagrams </xref>.</t>

        <figure>
          <artwork><![CDATA[
module: ietf-tcp
  +--rw tcp!
     +--rw connections
     |     ...
     +--ro statistics {statistics}?
           ...
]]></artwork>
        </figure>
      </section>
    </section>

    <section title="TCP YANG Model">
      <t><figure>
          <artwork><![CDATA[
<CODE BEGINS> file "ietf-tcp@2021-07-06.yang"

module ietf-tcp {
  yang-version "1.1";
  namespace "urn:ietf:params:xml:ns:yang:ietf-tcp";
  prefix "tcp";

  import ietf-yang-types {
    prefix "yang";
    reference
      "RFC 6991: Common YANG Data Types.";
  }
  import ietf-tcp-common {
    prefix "tcpcmn";
  }
  import ietf-inet-types {
    prefix "inet";
  }
  
  organization
    "IETF TCPM Working Group";

  contact
    "WG Web:   <http://tools.ietf.org/wg/tcpm>
     WG List:  <tcpm@ietf.org>

     Authors: Michael Scharf (michael.scharf at hs-esslingen dot de)
              Vishal Murgai (vmurgai at gmail dot com)
              Mahesh Jethanandani (mjethanandani at gmail dot com)";

  description
    "This module focuses on fundamental and standard TCP functions
     that widely implemented. The model can be augmented to address
     more advanced or implementation specific TCP features.

     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://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
     for full legal notices.

     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 BCP 14 (RFC 2119) (RFC 8174) when, and only when,
     they appear in all capitals, as shown here.";

  revision "2021-07-06" {
    description
      "Initial Version";
    reference 
      "RFC XXXX, TCP Configuration.";
  }

  // Features
  feature statistics {
    description
      "This implementation supports statistics reporting.";
  }

  // TCP-AO Groupings

  grouping ao {
    leaf enable-ao {
      type boolean;
      default "false";
      description
        "Enable support of TCP-Authentication Option (TCP-AO).";
    }

    leaf send-id {
      type uint8 {
        range "0..255";
      }
      must "../enable-ao = 'true'";
      description
        "The SendID is inserted as the KeyID of the TCP-AO option
         of outgoing segments. The SendID must match the RecvID
         at the other endpoint.";
      reference
        "RFC 5925: The TCP Authentication Option.";
    }

    leaf recv-id {
      type uint8 {
        range "0..255";
      }
      must "../enable-ao = 'true'";
      description
        "The RecvID is matched against the TCP-AO KeyID of incoming
         segments. The RecvID must match the SendID at the other
         endpoint.";
      reference
        "RFC 5925: The TCP Authentication Option.";
    }

    leaf include-tcp-options {
      type boolean;
      must "../enable-ao = 'true'";
      default true;
      description
        "Include TCP options in MAC calculation.";
    }

    leaf accept-key-mismatch {
      type boolean;
      must "../enable-ao = 'true'";
      description
        "Accept TCP segments with a Master Key Tuple (MKT) that is not
         configured.";
    }
    description
      "Authentication Option (AO) for TCP.";
    reference
      "RFC 5925: The TCP Authentication Option.";
  }

  // MD5 grouping

  grouping md5 {
    description
      "Grouping for use in authenticating TCP sessions using MD5.";
    reference
      "RFC 2385: Protection of BGP Sessions via the TCP MD5
       Signature.";

    leaf enable-md5 {
      type boolean;
      default "false";
      description
        "Enable support of MD5 to authenticate a TCP session.";
    }
  }

  // TCP configuration

  container tcp {
    presence "The container for TCP configuration.";

    description
      "TCP container.";
    
    container connections {
      list connection {
	key "local-address remote-address local-port remote-port";
	
	leaf local-address {
	  type inet:ip-address;
	  description
	    "Local address that forms the connection identifier.";
	}

	leaf remote-address {
	  type inet:ip-address;
	  description
	    "Remote address that forms the connection identifier.";
	}

	leaf local-port {
	  type inet:port-number;
	  description
	    "Local TCP port that forms the connection identifier.";
	}

	leaf remote-port {
	  type inet:port-number;
	  description
	    "Remote TCP port that forms the connection identifier.";
	}

	container common {
	  uses tcpcmn:tcp-common-grouping;

          choice authentication {
            case ao {
              uses ao;
              description
                "Use TCP-AO to secure the connection.";
            }

            case md5 {
              uses md5;
              description
                "Use TCP-MD5 to secure the connection.";
            }
            description
              "Choice of how to secure the TCP connection.";
          }
          description
            "Common definitions of TCP configuration. This includes
             parameters such as how to secure the connection,
             that can be part of either the client or server.";
        }
        description
          "List of TCP connections with their parameters. The list
           is modelled as writeable, but implementations may not allow
           creation of new TCP connections by adding entries to the
           list. Furthermore, the behavior upon removal is
           implementation-specific. Implementations may support
           closing or reseting a TCP connection upon an operation that
           removes the entry from the list.";
      }
      description
        "A container of all TCP connections.";
    }

    container statistics {
      if-feature statistics;
      config false;

      leaf active-opens {
        type yang:counter32;
        description
          "The number of times that TCP connections have made a direct
           transition to the SYN-SENT state from the CLOSED state.";
      }

      leaf passive-opens {
        type yang:counter32;
        description
          "The number of times TCP connections have made a direct
           transition to the SYN-RCVD state from the LISTEN state.";
      }

      leaf attempt-fails {
        type yang:counter32;
        description
          "The number of times that TCP connections have made a direct
           transition to the CLOSED state from either the SYN-SENT
           state or the SYN-RCVD state, plus the number of times that
           TCP connections have made a direct transition to the
           LISTEN state from the SYN-RCVD state.";
      }

      leaf establish-resets {
        type yang:counter32;
        description
          "The number of times that TCP connections have made a direct
           transition to the CLOSED state from either the ESTABLISHED
           state or the CLOSE-WAIT state.";
      }

      leaf currently-established {
        type yang:gauge32;
        description
          "The number of TCP connections for which the current state
           is either ESTABLISHED or CLOSE-WAIT.";
      }

      leaf in-segments {
        type yang:counter64;
        description
          "The total number of segments received, including those
           received in error.  This count includes segments received
           on currently established connections.";
      }

      leaf out-segments {
        type yang:counter64;
        description
          "The total number of segments sent, including those on
           current connections but excluding those containing only
           retransmitted octets.";
      }

      leaf retransmitted-segments {
        type yang:counter32;
        description
          "The total number of segments retransmitted; that is, the
           number of TCP segments transmitted containing one or more
           previously transmitted octets.";
      }

      leaf in-errors {
        type yang:counter32;
        description
          "The total number of segments received in error (e.g., bad
           TCP checksums).";
      }

      leaf out-resets {
        type yang:counter32;
        description
          "The number of TCP segments sent containing the RST flag.";
      }

      action reset {
        description
          "Reset statistics action command.";
        input {
          leaf reset-at {
            type yang:date-and-time;
            description
              "Time when the reset action needs to be
               executed.";
          }
        }
        output {
          leaf reset-finished-at {
            type yang:date-and-time;
            description
              "Time when the reset action command completed.";
          }
        }
      }
      description
        "Statistics across all connections.";
    }
  }
}

<CODE ENDS>]]></artwork>
        </figure></t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <section title="The IETF XML Registry">
        <t>This document registers two URIs in the "ns" subregistry of the
        <xref target="RFC3688">IETF XML Registry </xref>. Following the format
        in <xref target="RFC3688">IETF XML Registry </xref>, the following
        registrations are requested:</t>

        <t><figure>
            <artwork><![CDATA[
   URI: urn:ietf:params:xml:ns:yang:ietf-tcp
   Registrant Contact: The TCPM WG of the IETF.
   XML: N/A, the requested URI is an XML namespace.
]]></artwork>
          </figure></t>
      </section>

      <section title="The YANG Module Names Registry">
        <t>This document registers a YANG modules in the YANG Module Names
        registry <xref target="RFC6020">YANG - A Data Modeling Language
        </xref>. Following the format in <xref target="RFC6020">YANG - A Data
        Modeling Language </xref>, the following registrations are
        requested:</t>

        <t><figure>
            <artwork><![CDATA[
   name:         ietf-tcp
   namespace:    urn:ietf:params:xml:ns:yang:ietf-tcp
   prefix:       tcp
   reference:    RFC XXXX
]]></artwork>
          </figure></t>
      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>The YANG module specified in this document defines a schema for data
      that is designed to be accessed via network management protocols such as
      <xref target="RFC6241">NETCONF</xref> or <xref target="RFC8040">RESTCONF
      </xref>. The lowest NETCONF layer is the secure transport layer, and the
      mandatory-to-implement secure transport is Secure Shell (SSH) described
      in <xref target="RFC6242">Using the NETCONF protocol over SSH </xref>.
      The lowest RESTCONF layer is HTTPS, and the mandatory-to-implement
      secure transport is <xref target="RFC8446">TLS </xref>.</t>

      <t>The <xref target="RFC8341">Network Configuration Access Control Model
      (NACM) </xref> 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.</t>

      <t>There are a number of data nodes defined in this YANG module that are
      writable/creatable/deletable (i.e., "config true", which is the
      default). These data nodes may be considered sensitive or vulnerable in
      some network environments. Write operations (e.g., edit-config) to these
      data nodes without proper protection can have a negative effect on
      network operations. These are the subtrees and data nodes and their
      sensitivity/vulnerability:</t>

      <t>TODO</t>

      <!--
      <t><list style="symbols">
          <t>Server configuration. Unrestricted access to all the nodes under
          server configuration, e.g. local-address or keepalive idle-timer,
          can cause connections to the server to fail or to timeout
          prematurely.</t>

          <t>Client configuration. Similar to server configuration,
          unrestricted access to the nodes under client configuration can
          cause connections from the client to fail, or connections to the
          server to be redirected, and in case of keepalive, cause connections
          to timeout prematurely etc.</t>
        </list></t>
     -->

      <t>Some of the readable data nodes in this YANG module may be considered
      sensitive or vulnerable in some network environments. It is thus
      important to control read access (e.g., via get, get-config, or
      notification) to these data nodes. These are the subtrees and data nodes
      and their sensitivity/vulnerability:</t>

      <t><list style="symbols">
          <t>Unrestricted access to connection information of the client or
          server can be used by a malicious user to launch an attack, e.g.
          MITM.</t>

          <t>Similarly, unrestricted access to statistics of the client or
          server can be used by a malicious user to exploit any
          vulnerabilities of the system.</t>
        </list></t>

      <t>Some of the RPC operations in this YANG module may be considered
      sensitive or vulnerable in some network environments. It is thus
      important to control access to these operations. These are the
      operations and their sensitivity/vulnerability:</t>

      <t><list style="symbols">
          <t>The YANG module allows for the statistics to be cleared by
          executing the reset action. This action should be restricted to
          users with the right permission.</t>
        </list></t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='reference.RFC.0793.xml'?>

      <?rfc include='reference.RFC.2119.xml'?>

      <?rfc include='reference.RFC.2385.xml'?>

      <?rfc include='reference.RFC.3688.xml'?>

      <?rfc include='reference.RFC.5925.xml'?>

      <?rfc include='reference.RFC.6020.xml'?>

      <?rfc include='reference.RFC.6241.xml'?>

      <?rfc include='reference.RFC.6242.xml'?>

      <?rfc include='reference.RFC.7950.xml'?>

      <?rfc include='reference.RFC.8040.xml'?>

      <?rfc include='reference.RFC.8174.xml'?>

      <?rfc include='reference.RFC.8177.xml'?>

      <?rfc include='reference.RFC.8340.xml'?>

      <?rfc include='reference.RFC.8341.xml'?>

      <?rfc include='reference.RFC.8342.xml'?>

      <?rfc include='reference.RFC.8446.xml'?>

      <?rfc include='reference.I-D.ietf-netconf-tcp-client-server.xml'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.4022.xml'?>

      <?rfc include='reference.RFC.4898.xml'?>

      <?rfc include='reference.RFC.6643.xml'?>

      <?rfc include='reference.RFC.8512.xml'?>

      <?rfc include='reference.RFC.8513.xml'?>

      <?rfc include='reference.RFC.8519.xml'?>

      <?rfc include='reference.RFC.8783.xml'?>

      <?rfc include='reference.I-D.ietf-idr-bgp-model.xml'?>

      <?rfc include='reference.I-D.ietf-taps-interface.xml'?>

      <?rfc include='reference.I-D.touch-tcpm-ao-test-vectors.xml'?>
    </references>

    <section anchor="app_ack" title="Acknowledgements">
      <t>Michael Scharf was supported by the StandICT.eu project, which is
      funded by the European Commission under the Horizon 2020 Programme.</t>

      <t>The following persons have contributed to this document by reviews:
      Mohamed Boucadair</t>
    </section>

    <section anchor="app_changes"
             title="Changes compared to previous versions">
      <t>Changes compared to draft-scharf-tcpm-yang-tcp-04</t>

      <t><list style="symbols">
          <t>Removed congestion control</t>

          <t>Removed global stack parameters</t>
        </list>Changes compared to draft-scharf-tcpm-yang-tcp-03</t>

      <t><list style="symbols">
          <t>Updated TCP-AO grouping</t>

          <t>Added congestion control</t>
        </list></t>

      <t>Changes compared to draft-scharf-tcpm-yang-tcp-02</t>

      <t><list style="symbols">
          <t>Initial proposal of a YANG model including base configuration
          parameters, TCP-AO configuration, and a connection list</t>

          <t>Editorial bugfixes and outdated references reported by Mohamed
          Boucadair</t>

          <t>Additional co-author Mahesh Jethanandani</t>
        </list></t>

      <t>Changes compared to draft-scharf-tcpm-yang-tcp-01</t>

      <t><list style="symbols">
          <t>Alignment with <xref
          target="I-D.ietf-netconf-tcp-client-server"/></t>

          <t>Removing backward-compatibility to the TCP MIB</t>

          <t>Additional co-author Vishal Murgai</t>
        </list></t>

      <t>Changes compared to draft-scharf-tcpm-yang-tcp-00</t>

      <t><list style="symbols">
          <t>Editorial improvements</t>
        </list></t>
    </section>

    <section title="Examples">
      <section title="Keepalive Configuration">
        <t>This particular example demonstrates how both a particular
        connection can be configured for keepalives.</t>

        <t><figure>
            <artwork><![CDATA[
[note: '\' line wrapping for formatting only]

<?xml version="1.0" encoding="UTF-8"?>
<!--
This example shows how TCP keepalive can be configured for
a given connection. An idle connection is dropped after
idle-time + (max-probes * probe-interval).
-->
<tcp
    xmlns="urn:ietf:params:xml:ns:yang:ietf-tcp">
  <connections>
    <connection>
      <local-address>192.168.1.1</local-address>
      <remote-address>192.168.1.2</remote-address>
      <local-port>1025</local-port>
      <remote-port>80</remote-port>
      <common>
	<keepalives>
	  <idle-time>5</idle-time>
	  <max-probes>5</max-probes>
	  <probe-interval>10</probe-interval>
	</keepalives>
      </common>
    </connection>
  </connections>
</tcp>

]]></artwork>
          </figure></t>
      </section>

      <section title="TCP-AO Configuration">
        <t>The following example demonstrates how to model a <xref
        target="RFC5925">TCP-AO</xref> configuration for the example in <xref
        target="I-D.touch-tcpm-ao-test-vectors">TCP-AO Test Vectors</xref>,
        Section 5.1.1.</t>

        <t><figure>
            <artwork><![CDATA[
[note: '\' line wrapping for formatting only]

<?xml version="1.0" encoding="UTF-8"?>
<!--
This example sets TCP-AO configuration parameters as
demonstrated by examples in draft-touch-tcpm-ao-test-vectors.
-->

<tcp
    xmlns="urn:ietf:params:xml:ns:yang:ietf-tcp">
  <connections>
    <connection>
      <local-address>192.168.1.1</local-address>
      <remote-address>192.168.1.2</remote-address>
      <local-port>1025</local-port>
      <remote-port>80</remote-port>
      <common>
	<enable-ao>true</enable-ao>
      </common>
    </connection>
  </connections>
</tcp>

<key-chains
    xmlns="urn:ietf:params:xml:ns:yang:ietf-key-chain">
  <key-chain>
    <name>ao-config</name>
    <description>"An example for TCP-AO configuration."</description>\

    <key>
      <key-id>61</key-id>
      <crypto-algorithm>hmac-sha-1</crypto-algorithm>
      <key-string>
	<hexadecimal-string>01:23:a5:93:b9:db:70:62:9b:be:2c:a6:77:cd:fd:ea:\
6f:e0:ac:ad</hexadecimal-string>
      </key-string>
    </key>
  </key-chain>
</key-chains>

]]></artwork>
          </figure></t>
      </section>
    </section>

    <section title="Complete Tree Diagram">
      <t>Here is the complete tree diagram for the TCP YANG model.</t>

      <figure>
        <artwork><![CDATA[
module: ietf-tcp
  +--rw tcp!
     +--rw connections
     |  +--rw connection*
     |          [local-address remote-address local-port remote-port]
     |     +--rw local-address     inet:ip-address
     |     +--rw remote-address    inet:ip-address
     |     +--rw local-port        inet:port-number
     |     +--rw remote-port       inet:port-number
     |     +--rw common
     |        +--rw keepalives!
     |        |  +--rw idle-time         uint16
     |        |  +--rw max-probes        uint16
     |        |  +--rw probe-interval    uint16
     |        +--rw (authentication)?
     |           +--:(ao)
     |           |  +--rw enable-ao?             boolean
     |           |  +--rw send-id?               uint8
     |           |  +--rw recv-id?               uint8
     |           |  +--rw include-tcp-options?   boolean
     |           |  +--rw accept-key-mismatch?   boolean
     |           +--:(md5)
     |              +--rw enable-md5?            boolean
     +--ro statistics {statistics}?
        +--ro active-opens?             yang:counter32
        +--ro passive-opens?            yang:counter32
        +--ro attempt-fails?            yang:counter32
        +--ro establish-resets?         yang:counter32
        +--ro currently-established?    yang:gauge32
        +--ro in-segments?              yang:counter64
        +--ro out-segments?             yang:counter64
        +--ro retransmitted-segments?   yang:counter32
        +--ro in-errors?                yang:counter32
        +--ro out-resets?               yang:counter32
        +---x reset
           +---w input
           |  +---w reset-at?   yang:date-and-time
           +--ro output
              +--ro reset-finished-at?   yang:date-and-time

]]></artwork>
      </figure>
    </section>
  </back>
</rfc>
