blob: f9a291e6b6c61f65d8bf4e67b96eb9fa2b357ea5 [file] [log] [blame]
romanc1d2b092023-02-02 08:58:27 +01001module ietf-tcp-common {
2 yang-version 1.1;
3 namespace "urn:ietf:params:xml:ns:yang:ietf-tcp-common";
4 prefix tcpcmn;
5
6 organization
7 "IETF NETCONF (Network Configuration) Working Group and the
8 IETF TCP Maintenance and Minor Extensions (TCPM) Working Group";
9
10 contact
11 "WG Web: https://datatracker.ietf.org/wg/netconf
12 https://datatracker.ietf.org/wg/tcpm
13 WG List: NETCONF WG list <mailto:netconf@ietf.org>
14 TCPM WG list <mailto:tcpm@ietf.org>
15 Authors: Kent Watsen <mailto:kent+ietf@watsen.net>
16 Michael Scharf
17 <mailto:michael.scharf@hs-esslingen.de>";
18
19 description
Michal Vaskocf898172024-01-15 15:04:28 +010020 "This module define a reusable 'grouping' that is common
21 to both TCP-clients and TCP-servers. This grouping statement
22 is used by both the 'ietf-tcp-client' and 'ietf-tcp-server'
23 modules.
romanc1d2b092023-02-02 08:58:27 +010024
roman7fdc84d2023-06-06 13:14:53 +020025 Copyright (c) 2023 IETF Trust and the persons identified
romanc1d2b092023-02-02 08:58:27 +010026 as authors of the code. All rights reserved.
27
28 Redistribution and use in source and binary forms, with
29 or without modification, is permitted pursuant to, and
30 subject to the license terms contained in, the Revised
31 BSD License set forth in Section 4.c of the IETF Trust's
32 Legal Provisions Relating to IETF Documents
33 (https://trustee.ietf.org/license-info).
34
35 This version of this YANG module is part of RFC DDDD
36 (https://www.rfc-editor.org/info/rfcDDDD); see the RFC
37 itself for full legal notices.
38
39 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
40 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
41 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
42 are to be interpreted as described in BCP 14 (RFC 2119)
43 (RFC 8174) when, and only when, they appear in all
44 capitals, as shown here.";
45
Michal Vaskocf898172024-01-15 15:04:28 +010046 revision 2023-12-28 {
romanc1d2b092023-02-02 08:58:27 +010047 description
48 "Initial version";
49 reference
50 "RFC DDDD: YANG Groupings for TCP Clients and TCP Servers";
51 }
52
53 // Features
54
55 feature keepalives-supported {
56 description
57 "Indicates that keepalives are supported.";
58 }
59
60 // Groupings
Michal Vaskocf898172024-01-15 15:04:28 +010061
romanc1d2b092023-02-02 08:58:27 +010062 grouping tcp-common-grouping {
63 description
64 "A reusable grouping for configuring TCP parameters common
65 to TCP connections as well as the operating system as a
66 whole.";
67 container keepalives {
68 if-feature "keepalives-supported";
romanc1d2b092023-02-02 08:58:27 +010069 description
70 "Configures the keep-alive policy, to proactively test the
71 aliveness of the TCP peer. An unresponsive TCP peer is
Michal Vaskocf898172024-01-15 15:04:28 +010072 dropped after approximately (idle-time + max-probes *
73 probe-interval) seconds. Further guidance can be found
74 in Section 2.1.5 of RFC DDDD.";
roman7fdc84d2023-06-06 13:14:53 +020075 reference
76 "RFC 9293:
77 Transmission Control Protocol (TCP), Section 3.8.4..";
romanc1d2b092023-02-02 08:58:27 +010078 leaf idle-time {
79 type uint16 {
80 range "1..max";
81 }
82 units "seconds";
Michal Vaskocf898172024-01-15 15:04:28 +010083 default 7200;
romanc1d2b092023-02-02 08:58:27 +010084 description
85 "Sets the amount of time after which if no data has been
86 received from the TCP peer, a TCP-level probe message
87 will be sent to test the aliveness of the TCP peer.
88 Two hours (7200 seconds) is safe value, per RFC 1122.";
89 reference
90 "RFC 1122:
91 Requirements for Internet Hosts -- Communication Layers";
92 }
93 leaf max-probes {
94 type uint16 {
95 range "1..max";
96 }
Michal Vaskocf898172024-01-15 15:04:28 +010097 default 9;
romanc1d2b092023-02-02 08:58:27 +010098 description
99 "Sets the maximum number of sequential keep-alive probes
100 that can fail to obtain a response from the TCP peer
101 before assuming the TCP peer is no longer alive.";
102 }
103 leaf probe-interval {
104 type uint16 {
105 range "1..max";
106 }
107 units "seconds";
Michal Vaskocf898172024-01-15 15:04:28 +0100108 default 75;
romanc1d2b092023-02-02 08:58:27 +0100109 description
110 "Sets the time interval between failed probes. The interval
111 SHOULD be significantly longer than one second in order to
112 avoid harm on a congested link.";
113 }
114 } // container keepalives
115 } // grouping tcp-common-grouping
116
117}