rfc-9648

YANG Data Model for TCP

M. Scharf, M. Jethanandani, V. Murgai
date2024-10 streamIETF areawit wgtcpm statusPROPOSED STANDARD pages25 canonicalhttps://www.rfc-editor.org/rfc/rfc9648 doi10.17487/RFC9648
This document specifies a minimal YANG data model for TCP on devices that are configured and managed by network management protocols. The YANG data 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).

Extracted elements (23)

design-rationale §3.1

The connection list is modeled as writable even though only some nodes are writable (e.g., keepalive), because different TCP implementations use different modeling approaches and there is no universal ground truth for TCP parameter configuration scope (system-wide, per-interface, per-connection, or application preference).

tcp, yang

design-rationale §3.2

The module defines YANG groupings to allow reuse in different YANG data models, intended for standalone use or as part of a stack of protocol-specific configuration models (e.g., BGP). This follows the design pattern of RFC 9643.

yang, tcp

design-rationale §1

The module intentionally omits Retransmission Timeout (RTO) configuration and a maximum connection limit from the TCP MIB, as these parameters 'hardly matter in a state-of-the-art TCP implementation.' The model is kept minimal and focused on parameters important for network elements such as routers.

tcp, yang

design-rationale §3.1

This version does not model Multipath TCP (RFC 8684) details; this could be addressed in a future version. The narrow scope focuses on fundamental parameters important for network elements.

tcp, yang, multipath

interoperability-note §3.1

The model supports both TCP-AO (RFC 5925) and legacy TCP MD5 (RFC 2385) authentication to accommodate the installed BGP base, with TCP-AO being the recommended choice. TCP-AO parameters include SendID and RecvID matching those defined in RFC 5925 Section 3.1.

tcp, yang, crypto, bgp

interoperability-note §3.1

This document does not deprecate the TCP MIB (RFC 4022); the basic statistics defined follow the TCP MIB model, allowing implementations to migrate from MIB to YANG. The YANG module adds a statistics reset capability not present in the TCP MIB.

tcp, yang, snmp

normative-requirement §4 SHOULD

Connections that are created and match the connection list SHOULD apply the writable parameters. Implementations may not allow creation of new TCP connections simply by adding entries to the list, and behavior upon removal is implementation-specific.

tcp, yang, netconf

normative-requirement §3.1 RECOMMENDED

If current implementations require TCP authentication, it is RECOMMENDED to use TCP-AO (RFC 5925) rather than the legacy TCP MD5 signature option, which was obsoleted by TCP-AO in 2010.

tcp, security, crypto

normative-requirement §4 SHOULD

The operational state of the connection list SHOULD reflect connections that have been configured but not created and connections that have been created. Connections in the CLOSED state are not reflected on this list.

tcp, yang

protocol-element §4

The 'aes-128' identity is defined as a base of key-chain:crypto-algorithm, representing the AES128 authentication algorithm used by TCP-AO as specified in RFC 5926.

yang, tcp, crypto

protocol-element §4

The 'connection' list entry includes writable fields for MSS (uint16 typedef), PMTUD (boolean, default false), and keepalive parameters imported from RFC 9643, plus a read-only 'state' enumeration reflecting the TCP connection state.

yang, tcp

protocol-element §4

The ietf-tcp YANG module defines a presence container 'tcp' containing a 'connections' list keyed by local-address, remote-address, local-port, and remote-port, along with a read-only 'tcp-listeners' list and an optional 'statistics' container.

yang, tcp, netconf

protocol-element §4

The module augments the ietf-key-chain model at '/key-chain:key-chains/key-chain:key-chain/key-chain:key' with an 'authentication' container (feature-gated) offering a choice between 'ao' (TCP-AO) and 'md5' presence containers, plus a keychain reference.

yang, tcp, crypto

protocol-element §4

The 'statistics' container (feature-gated) provides read-only counter64 leaves: active-opens, passive-opens, attempt-fails, establish-resets, in-segments, out-segments, retransmitted-segments, in-errors, out-resets, and auth-failures; plus a gauge32 currently-established and a 'reset' action protected by nacm:default-deny-all.

yang, tcp

protocol-element §4

The TCP-AO grouping 'ao' defines send-id (uint8), recv-id (uint8), include-tcp-options (boolean, default true), accept-key-mismatch (boolean), and r-next-key-id (uint8, read-only) for configuring TCP Authentication Option per RFC 5925.

tcp, yang, crypto, security

protocol-element §4

The 'tcp-listeners' list is keyed by type (inet:ip-version), address (union of ip-address or zero-length string), and port (inet:port-number), and is read-only, representing applications waiting to accept TCP connections.

yang, tcp

registry §5.2

IANA registered the module name 'ietf-tcp' with namespace 'urn:ietf:params:xml:ns:yang:ietf-tcp' and prefix 'tcp' in the YANG Module Names registry created by RFC 6020.

registry, yang

registry §5.1

IANA registered the URI 'urn:ietf:params:xml:ns:yang:ietf-tcp' in the 'ns' registry of the IETF XML Registry (RFC 3688).

registry, yang

security-consideration §6

The statistics reset action should be restricted to users with the right permission; it is protected by nacm:default-deny-all in the module. MD5 support is included only to accommodate the installed BGP base, despite its known security weaknesses.

security, tcp, yang

security-consideration §6

Unrestricted access to keepalive idle timer and other common configuration nodes included from RFC 9643 can cause connections to fail or timeout prematurely.

security, tcp, yang

security-consideration §6

Unrestricted read access to connection information and statistics can be exploited by malicious users to launch attacks or exploit system vulnerabilities; access MUST be controlled via NACM (RFC 8341).

security, tcp, yang, netconf

security-consideration §6

Unrestricted write access to authentication configuration nodes can prevent authenticated communication and cause connection setup failures, resulting in massive security vulnerabilities and service disruption for traffic requiring authentication.

security, tcp, yang

state-machine §4

The connection 'state' leaf enumerates eleven TCP states: closed (1), listen (2), syn-sent (3), syn-received (4), established (5), fin-wait-1 (6), fin-wait-2 (7), close-wait (8), last-ack (9), closing (10), and time-wait (11). The state is read-only and reflects the current TCP connection state as defined in RFC 9293.

tcp, yang