RFC 9643: YANG Groupings for TCP Clients and TCP Servers
- K. Watsen,
- M. Scharf
Abstract
This document presents three YANG 1.1 modules to support the configuration of TCP clients and TCP servers. The modules include basic parameters of a TCP connection relevant for client or server applications, as well as client configuration required for traversing proxies. The data models defined by these modules may be used directly (e.g., to define a specific TCP client or TCP server) or in conjunction with the configuration defined for higher level protocols that depend on TCP (e.g., SSH, TLS, etc.). Examples of higher level protocol configuration designed to be used in conjunction with this configuration are in RFCs 9644 and 9645.¶
Status of This Memo
This is an Internet Standards Track document.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2024 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://
1. Introduction
This document defines three YANG 1.1 [RFC7950] modules to support the configuration of TCP clients and TCP servers (TCP is defined in [RFC9293]). The data models defined by these modules may be used directly (e.g., to define a specific TCP client or TCP server) or in conjunction with the configuration defined for higher level protocols that depend on TCP (e.g., SSH, TLS, etc.). Examples of higher level protocol configuration designed to be used in conjunction with this configuration are in [RFC9644] and [RFC9645].¶
The modules focus on three different types of base TCP parameters that matter
for TCP-based applications: First, the modules cover fundamental configuration of a
TCP client or TCP server application, such as addresses and port numbers. Second, a
reusable grouping enables modification of application
Please be advised that while this document presents support for some TCP proxy techniques, there are other TCP proxy techniques that are not part of this document but could be added by augmenting the YANG module.¶
1.1. Relation to Other RFCs
This document presents three YANG modules [RFC7950] that are part of a collection of RFCs that work together to ultimately support the configuration of both the clients and servers of both the Network Configuration Protocol (NETCONF) [RFC6241] and RESTCONF [RFC8040].¶
The dependency relationship between the primary YANG groupings defined in the various RFCs is presented in the below diagram. In some cases, a document may define secondary groupings that introduce dependencies not illustrated in the diagram. The labels in the diagram are shorthand names for the defining RFCs. The citation references for shorthand names are provided below the diagram.¶
Please note that the arrows in the diagram point from referencer to referenced. For example, the "crypto-types" RFC does not have any dependencies, whilst the "keystore" RFC depends on the "crypto-types" RFC.¶
1.2. Specification Language
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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
1.3. Adherence to the NMDA
This document is compliant with the Network Management Datastore Architecture (NMDA) [RFC8342]. It does not define any protocol accessible nodes that are "config false".¶
1.4. Conventions
Various examples in this document use the XML
[W3C
2. The "ietf-tcp-common" Module
This section defines a YANG 1.1 module called
"ietf
2.1. Data Model Overview
This section provides an overview of the "ietf
2.1.1. Model Scope
This document presents a common "grouping" statement for basic TCP connection
parameters that matter to applications. It is "common" in that this grouping
is used by both the "ietf
2.1.2. Features
The following diagram lists all the "feature" statements
defined in the "ietf
The diagram above uses syntax that is similar to but not defined in [RFC8340].¶
2.1.3. Groupings
The "ietf
This grouping is presented in the following subsection.¶
2.1.4. Protocol-Accessible Nodes
The "ietf
2.1.5. Guidelines for Configuring TCP Keepalives
Network stacks may include keepalives in their TCP implementations
Keepalive mechanisms exist in many protocols. Depending on the protocol stack, TCP keepalives may only be one out of several alternatives. Which mechanism(s) to use depends on the use case and application requirements. If keepalives are needed by an application, it is RECOMMENDED that the liveness check happens only at the protocol layers that are meaningful to the application.¶
A TCP keepalive mechanism SHOULD only be invoked in server applications that might otherwise hang indefinitely and consume resources unnecessarily if a client crashes or aborts a connection during a network failure [RFC9293]. TCP keepalives may consume significant resources both in the network and in endpoints (e.g., battery power). In addition, frequent keepalives risk network congestion. The higher the frequency of keepalives, the higher the overhead.¶
Given the cost of keepalives, parameters have to be configured carefully:¶
2.2. Example Usage
This section presents an example showing the "tcp
3. The "ietf-tcp-client" Module
This section defines a YANG 1.1 module called
"ietf
3.1. Data Model Overview
This section provides an overview of the "ietf
3.1.1. Features
The following diagram lists all the "feature" statements
defined in the "ietf
Comments:¶
The diagram above uses syntax that is similar to but not defined in [RFC8340].¶
3.1.2. Groupings
The "ietf
This grouping is presented in the following subsection.¶
3.1.3. Protocol-Accessible Nodes
The "ietf
3.2. Example Usage
This section presents two examples showing the "tcp
This example shows a TCP client configured to connect via a proxy.¶
4. The "ietf-tcp-server" Module
This section defines a YANG 1.1 module called
"ietf
4.1. Data Model Overview
This section provides an overview of the "ietf
4.1.1. Features
The following diagram lists all the "feature" statements
defined in the "ietf
The diagram above uses syntax that is similar to but not defined in [RFC8340].¶
4.1.2. Groupings
The "ietf
This grouping is presented in the following subsection.¶
4.1.3. Protocol-Accessible Nodes
The "ietf
4.2. Example Usage
This section presents an example showing the "tcp
5. Security Considerations
The three YANG modules in this document define groupings and will
not be deployed as standalone modules. Their security implications
may be context
5.1. Considerations for the "ietf-tcp-common" YANG Module
This section is modeled after the template defined in Section 3.7.1 of [RFC8407].¶
The "ietf
The Network Configuration Access Control Model (NACM) [RFC8341] provides the means to restrict access for particular users to a preconfigured subset of all available protocol operations and content.¶
Please be aware that this YANG module uses groupings from other YANG modules that define nodes that may be considered sensitive or vulnerable in network environments. Please review the security considerations for dependent YANG modules for information as to which nodes may be considered sensitive or vulnerable in network environments.¶
None of the readable data nodes defined in this YANG module are
considered sensitive or vulnerable in network environments.
The NACM "default
None of the writable data nodes defined in this YANG module are
considered sensitive or vulnerable in network environments.
The NACM "default
This module does not define any RPCs, actions, or notifications, and thus, the security considerations for such are not provided here.¶
5.2. Considerations for the "ietf-tcp-client" YANG Module
This section is modeled after the template defined in Section 3.7.1 of [RFC8407].¶
The "ietf
The Network Configuration Access Control Model (NACM) [RFC8341] provides the means to restrict access for particular users to a preconfigured subset of all available protocol operations and content.¶
Please be aware that this YANG module uses groupings from other YANG modules that define nodes that may be considered sensitive or vulnerable in network environments. Please review the security considerations for dependent YANG modules for information as to which nodes may be considered sensitive or vulnerable in network environments.¶
One readable data node defined in this YANG module may be considered sensitive or vulnerable in some network environments. This node is as follows:¶
None of the writable data nodes defined in this YANG module are
considered sensitive or vulnerable in network environments.
The NACM "default
This module does not define any RPCs, actions, or notifications, and thus, the security considerations for such are not provided here.¶
Implementations are RECOMMENDED to implement the "local
5.3. Considerations for the "ietf-tcp-server" YANG Module
This section is modeled after the template defined in Section 3.7.1 of [RFC8407].¶
The "ietf
The Network Configuration Access Control Model (NACM) [RFC8341] provides the means to restrict access for particular users to a preconfigured subset of all available protocol operations and content.¶
Please be aware that this YANG module uses groupings from other YANG modules that define nodes that may be considered sensitive or vulnerable in network environments. Please review the security considerations for dependent YANG modules for information as to which nodes may be considered sensitive or vulnerable in network environments.¶
None of the readable data nodes defined in this YANG module are
considered sensitive or vulnerable in network environments.
The NACM "default
None of the writable data nodes defined in this YANG module are
considered sensitive or vulnerable in network environments.
The NACM "default
This module does not define any RPCs, actions, or notifications, and thus, the security considerations for such are not provided here.¶
6. IANA Considerations
6.1. The IETF XML Registry
IANA has registered the following URI in the "ns" registry of the "IETF XML Registry" [RFC3688].¶
- URI:
- urn
:ietf :params :xml :ns :yang :ietf -tcp -common¶ - Registrant Contact:
- The IESG¶
- XML:
- N/A; the requested URI is an XML namespace.¶
6.2. The YANG Module Names Registry
IANA has registered the following three YANG modules in the "YANG Module Names" registry [RFC6020].¶
- Name:
- ietf-tcp-common¶
- Namespace:
- urn
:ietf :params :xml :ns :yang :ietf -tcp -common¶ - Prefix:
- tcpcmn¶
- Reference:
- RFC 9643¶
7. References
7.1. Normative References
- [RFC2119]
-
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10
.17487 , , <https:///RFC2119 www >..rfc -editor .org /info /rfc2119 - [RFC4252]
-
Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH) Authentication Protocol", RFC 4252, DOI 10
.17487 , , <https:///RFC4252 www >..rfc -editor .org /info /rfc4252 - [RFC6020]
-
Bjorklund, M., Ed., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10
.17487 , , <https:///RFC6020 www >..rfc -editor .org /info /rfc6020 - [RFC6991]
-
Schoenwaelder, J., Ed., "Common YANG Data Types", RFC 6991, DOI 10
.17487 , , <https:///RFC6991 www >..rfc -editor .org /info /rfc6991 - [RFC7950]
-
Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", RFC 7950, DOI 10
.17487 , , <https:///RFC7950 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 , , <https:///RFC8174 www >..rfc -editor .org /info /rfc8174 - [RFC8341]
-
Bierman, A. and M. Bjorklund, "Network Configuration Access Control Model", STD 91, RFC 8341, DOI 10
.17487 , , <https:///RFC8341 www >..rfc -editor .org /info /rfc8341 - [RFC9000]
-
Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based Multiplexed and Secure Transport", RFC 9000, DOI 10
.17487 , , <https:///RFC9000 www >..rfc -editor .org /info /rfc9000 - [RFC9293]
-
Eddy, W., Ed., "Transmission Control Protocol (TCP)", STD 7, RFC 9293, DOI 10
.17487 , , <https:///RFC9293 www >..rfc -editor .org /info /rfc9293 - [RFC9640]
-
Watsen, K., "YANG Data Types and Groupings for Cryptography", RFC 9640, DOI 10
.17487 , , <https:///RFC9640 www >..rfc -editor .org /info /rfc9640
7.2. Informative References
- [HTTP
-CLIENT -SERVER] -
Watsen, K., "YANG Groupings for HTTP Clients and HTTP Servers", Work in Progress, Internet-Draft, draft
-ietf , , <https://-netconf -http -client -server -23 datatracker >..ietf .org /doc /html /draft -ietf -netconf -http -client -server -23 - [NETCONF
-CLIENT -SERVER] -
Watsen, K., "NETCONF Client and Server Models", Work in Progress, Internet-Draft, draft
-ietf , , <https://-netconf -netconf -client -server -37 datatracker >..ietf .org /doc /html /draft -ietf -netconf -netconf -client -server -37 - [RESTCONF
-CLIENT -SERVER] -
Watsen, K., "RESTCONF Client and Server Models", Work in Progress, Internet-Draft, draft
-ietf , , <https://-netconf -restconf -client -server -38 datatracker >..ietf .org /doc /html /draft -ietf -netconf -restconf -client -server -38 - [RFC1928]
-
Leech, M., Ganis, M., Lee, Y., Kuris, R., Koblas, D., and L. Jones, "SOCKS Protocol Version 5", RFC 1928, DOI 10
.17487 , , <https:///RFC1928 www >..rfc -editor .org /info /rfc1928 - [RFC1929]
-
Leech, M., "Username
/Password Authentication for SOCKS V5" , RFC 1929, DOI 10.17487 , , <https:///RFC1929 www >..rfc -editor .org /info /rfc1929 - [RFC2743]
-
Linn, J., "Generic Security Service Application Program Interface Version 2, Update 1", RFC 2743, DOI 10
.17487 , , <https:///RFC2743 www >..rfc -editor .org /info /rfc2743 - [RFC3688]
-
Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, DOI 10
.17487 , , <https:///RFC3688 www >..rfc -editor .org /info /rfc3688 - [RFC6056]
-
Larsen, M. and F. Gont, "Recommendations for Transport
-Protocol Port Randomization" , BCP 156, RFC 6056, DOI 10.17487 , , <https:///RFC6056 www >..rfc -editor .org /info /rfc6056 - [RFC6241]
-
Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., and A. Bierman, Ed., "Network Configuration Protocol (NETCONF)", RFC 6241, DOI 10
.17487 , , <https:///RFC6241 www >..rfc -editor .org /info /rfc6241 - [RFC8040]
-
Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF Protocol", RFC 8040, DOI 10
.17487 , , <https:///RFC8040 www >..rfc -editor .org /info /rfc8040 - [RFC8259]
-
Bray, T., Ed., "The JavaScript Object Notation (JSON) Data Interchange Format", STD 90, RFC 8259, DOI 10
.17487 , , <https:///RFC8259 www >..rfc -editor .org /info /rfc8259 - [RFC8340]
-
Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", BCP 215, RFC 8340, DOI 10
.17487 , , <https:///RFC8340 www >..rfc -editor .org /info /rfc8340 - [RFC8342]
-
Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., and R. Wilton, "Network Management Datastore Architecture (NMDA)", RFC 8342, DOI 10
.17487 , , <https:///RFC8342 www >..rfc -editor .org /info /rfc8342 - [RFC8407]
-
Bierman, A., "Guidelines for Authors and Reviewers of Documents Containing YANG Data Models", BCP 216, RFC 8407, DOI 10
.17487 , , <https:///RFC8407 www >..rfc -editor .org /info /rfc8407 - [RFC8446]
-
Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10
.17487 , , <https:///RFC8446 www >..rfc -editor .org /info /rfc8446 - [RFC9641]
-
Watsen, K., "A YANG Data Model for a Truststore", RFC 9641, DOI 10
.17487 , , <https:///RFC9641 www >..rfc -editor .org /info /rfc9641 - [RFC9642]
-
Watsen, K., "A YANG Data Model for a Keystore", RFC 9642, DOI 10
.17487 , , <https:///RFC9642 www >..rfc -editor .org /info /rfc9642 - [RFC9644]
-
Watsen, K., "YANG Groupings for SSH Clients and SSH Servers", RFC 9644, DOI 10
.17487 , , <https:///RFC9644 www >..rfc -editor .org /info /rfc9644 - [RFC9645]
-
Watsen, K., "YANG Groupings for TLS Clients and TLS Servers", RFC 9645, DOI 10
.17487 , , <https:///RFC9645 www >..rfc -editor .org /info /rfc9645 - [SOCKS]
-
Koblas, D. and M. Koblas, "SOCKS", USENIX UNIX Security Symposium III, , <https://
www >..usenix .org /legacy /publications /library /proceedings /sec92 /full _papers /koblas .pdf - [SOCKS_4A]
-
Lee, Y., "SOCKS 4A: A Simple Extension to SOCKS 4 Protocol", <https://
www >..openssh .com /txt /socks4a .protocol - [W3C
.REC -xml -20081126] -
Bray, T., Paoli, J., Sperberg
-Mc , Maler, E., and F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth Edition)", World Wide Web Consortium Recommendation RECQueen, C.M. -xml , , <https://-20081126 www >..w3 .org /TR /2008 /REC -xml -20081126 /
Acknowledgements
The authors would like to thank the following for lively discussions on list and in the halls (ordered by first name): Éric Vyncke, Joe Clarke, Jürgen Schönwälder, Ladislav Lhotka, Mallory Knodel, Martin Duke, Michael Tüxen, Mohamed Boucadair, Nancy Cam-Winget, Nick Hancock, Per Andersson, Rob Wilton, Roman Danyliw, Tom Petch, and Wim Henderickx.¶