A YANG Model for Transmission Control
Protocol (TCP) Configuration and StateHochschule Esslingen -
University of Applied SciencesKanalstr. 3373728EsslingenGermanymichael.scharf@hs-esslingen.deKloud Servicesmjethanandani@gmail.comSamsungvmurgai@gmail.com
Transport
TCPMYANGThis document specifies a minimal YANG model for TCP on
devices that are configured and managed by network management
protocols. The YANG model defines a container for all TCP
connections, and groupings of authentication
parameters that can be imported and used in TCP implementations
or by other models that need to configure TCP parameters. The
model also includes basic TCP statistics. The model is compliant
with Network Management Datastore Architecture (NMDA) (RFC
8342).The Transmission Control
Protocol (TCP) is used by many applications in the Internet,
including control and management protocols. As such, TCP is
implemented on network elements that can be configured and managed
via network management protocols such as
NETCONF or RESTCONF.This document specifies a minimal YANG
1.1 model for configuring and managing TCP on network
elements that support YANG, a TCP connection table,
a TCP listener table containing
information about a particular TCP listener, and an augmentation
of the YANG Data Model for Key
Chains to support authentication. The YANG module specified
in this document is compliant with
Network Management Datastore Architecture (NMDA).The YANG module has a narrow scope and focuses on a subset of
fundamental TCP functions and basic statistics. It defines a
container for a list of TCP connections that includes definitions from
YANG Groupings
for TCP Clients and TCP Servers. The model adheres to
the recommendation in BGP/MPLS IP Virtual
Private Networks. Therefore it allows enabling of TCP-AO, and accommodates the installed
base that makes use of MD5. The module can be augmented or
updated to address more advanced or implementation-specific TCP
features in the future.This specification does not deprecate the Management Information Base (MIB) for the Transmission
Control Protocol (TCP). The basic statistics defined in this
document follow the model of the TCP MIB. An TCP
Extended Statistics MIB is also available, but this document does
not cover such extended statistics. The YANG module also omits some
selected parameters included in TCP MIB, most notably Retransmission
Timeout (RTO) configuration and a maximum connection limit. This is a
conscious decision as these parameters hardly matter in a
state-of-the-art TCP implementation. It would also be possible to
translate a MIB into a YANG module, for instance using Translation of Structure of Management Information
Version 2 (SMIv2) MIB Modules to YANG Modules. However, this
approach is not used in this document, because a translated model would
not be up-to-date.There are other existing TCP-related YANG models, which are
orthogonal to this specification. Examples are:TCP header attributes are modeled in other security-related
models, such as YANG Data Model for Network
Access Control Lists (ACLs), Distributed
Denial-of-Service Open Thread Signaling (DOTS) Data Channel
Specification,
I2NSF Capability
YANG Data Model, or
I2NSF Network
Security Function-Facing Interface YANG Data Model.TCP-related configuration of a NAT (e.g., NAT44, NAT64,
Destination NAT) is defined in A YANG
Module for Network Address Translation (NAT) and Network Prefix
Translation (NPT) and A YANG Data
Model for Dual-Stack Lite (DS-Lite).TCP-AO and TCP MD5 configuration for Layer 3 VPNs is modeled in
A Layer 3 VPN Network YANG
Model. This model assumes that TCP-AO specific parameters
are preconfigured in addition to the keychain parameters.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
when, and only when,
they appear in all capitals, as shown here.This document uses several placeholder values throughout the
document. Please replace them as follows and remove this note before
publication.RFC XXXX, where XXXX is the number assigned to this document at the
time of publication.2022-09-11 with the actual date of the publication of this
document.TCP is implemented on different system architectures. As a
result, there are many different and often
implementation-specific ways to configure parameters of the
TCP engine. In addition, in many TCP/IP stacks configuration
exists for different scopes:System-wide configuration: Many TCP implementations have
configuration parameters that affect all TCP
connections from or to this TCP stack. Typical examples include
enabling or disabling optional protocol features. For instance,
many implementations can turn on or off use of window scaling
Transmission Control Protocol (TCP)
Specification for all TCP connections.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.Connection parameters: Many implementations have means
to influence the behavior of each TCP connection, e.g., on
the programming interface used by applications. Typical
examples are socket options in the socket API, such as
disabling the Nagle algorithm Transmission Control Protocol (TCP)
Specification 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 BGP YANG Model for Service
Provider Networks .Application preferences: Setting of TCP parameters
can also be part of application preferences, templates,
or profiles. An example would be the preferences defined
in An Abstract
Application Layer Interface to Transport Services.As a result, there is no ground truth for setting certain TCP
parameters, and traditionally different TCP implementations 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.Nonetheless, a number of TCP stack parameters require configuration
by YANG models. This document therefore defines a minimal YANG model
with fundamental parameters. 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.This in particular applies to the support of TCP-AO and the corresponding
cryptographic algorithms.
TCP Authentication Option (TCP-AO) is
used on routers to secure routing protocols such as BGP. In that case,
a YANG model for TCP-AO configuration is required. The model defined
in this document includes the required parameters for TCP-AO
configuration, such as the values of SendID and RecvID. The
keychain for TCP-AO can be modeled by the YANG
Data Model for Key Chains. The groupings defined in this document
can be imported and used as part of such a preconfiguration.Given an installed base, the model also allows enabling of the
legacy TCP MD5 signature option.
The TCP MD5 signature option was obsoleted by TCP-AO in 2010. If current
implementations require TCP authentication, it is RECOMMENDED to use
TCP-AO.Similar to the TCP MIB, this document
also specifies basic statistics, a TCP connection list, and a TCP listener
list.Statistics: Counters for the number of active/passive opens,
sent and received TCP segments, errors, and possibly other detailed
debugging informationTCP connection list: Access to status information for all TCP
connections. Note, the connection table is modeled as a list
that is read-writeable, even though a connection cannot be
created by adding entries to the table. Similarly, deletion
of connections from this list is implementation-specific.TCP listener list: A list containing information about
TCP listeners, i.e., applications willing to accept connections.This allows implementations of TCP
MIB 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.This version of the module does not model details of
Multipath TCP. This could be addressed
in a later version of this document.The YANG model defined in this document includes definitions from
the YANG Groupings
for TCP Clients and TCP Servers. 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 BGP YANG Model for
Service Provider Networks .This section provides an abridged tree diagram for the YANG
module defined in this document. Annotations used in the
diagram are defined in YANG Tree
Diagrams . A complete tree diagram can be found in the
Appendix.This YANG module references
The TCP Authentication Option,
Protection of BGP Sessions via the TCP MD5 Signature,
Transmission Control
Protocol (TCP) Specification,
and imports Common YANG Data Types
, The NETCONF Access Control
Model, and
YANG Groupings for TCP Clients and TCP Servers.This document registers an URI in the "ns" subregistry of the
IETF XML Registry . Following the format
in IETF XML Registry , the following
registration is requested:The following entry is requested to be added to the
"YANG Module Names" registry created by
YANG - A Data Modeling Language for
the Network Configuration Protocol (NETCONF):The registration is not maintained by IANA.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 or RESTCONF
. The lowest NETCONF layer is the secure transport layer, and the
mandatory-to-implement secure transport is Secure Shell (SSH) described
in Using the NETCONF protocol over SSH .
The lowest RESTCONF layer is HTTPS, and the mandatory-to-implement
secure transport is TLS .The Network Configuration Access Control Model
(NACM) 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.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:Common configuration included from
NETCONF Client
and Server Models . Unrestricted
access to all the nodes, e.g., keepalive idle-timer,
can cause connections to fail or to timeout prematurely.Authentication configuration. Unrestricted access to the nodes under
authentication configuration can prevent the use of authenticated
communication and cause connection setups to fail. This can result
in massive security vulnerabilities and service disruption for the
traffic requiring authentication.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:Unrestricted access to connection information of the client or
server can be used by a malicious user to launch an attack.Similarly, unrestricted access to statistics of the client or
server can be used by a malicious user to exploit any
vulnerabilities of the system.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: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.The module specified in this document supports MD5 to basically
accommodate the installed BGP base. MD5 suffers from the security
weaknesses discussed in Section 2 of RFC 6151
or Section 2.1 of RFC 6952.Michael Scharf was supported by the StandICT.eu project, which is
funded by the European Commission under the Horizon 2020 Programme.The following persons have contributed to this document by
reviews (in alphabetical order): Mohamed Boucadair, Gorry Fairhurst,
Jeffrey Haas, and Tom Petch.This particular example demonstrates how both a particular
connection can be configured for keepalives.The following example demonstrates how to model a TCP-AO configuration for the example in TCP-AO Test Vectors. The
IP addresses and other parameters are taken from the test vectors.Here is the complete tree diagram for the TCP YANG model.