draft-ietf-netconf-netconf-client-server-05.txt   draft-ietf-netconf-netconf-client-server-06.txt 
NETCONF Working Group K. Watsen NETCONF Working Group K. Watsen
Internet-Draft Juniper Networks Internet-Draft Juniper Networks
Intended status: Standards Track G. Wu Intended status: Standards Track G. Wu
Expires: May 3, 2018 Cisco Networks Expires: December 6, 2018 Cisco Networks
October 30, 2017 June 4, 2018
NETCONF Client and Server Models NETCONF Client and Server Models
draft-ietf-netconf-netconf-client-server-05 draft-ietf-netconf-netconf-client-server-06
Abstract Abstract
This document defines two YANG modules, one module to configure a This document defines two YANG modules, one module to configure a
NETCONF client and the other module to configure a NETCONF server. NETCONF client and the other module to configure a NETCONF server.
Both modules support both the SSH and TLS transport protocols, and Both modules support both the SSH and TLS transport protocols, and
support both standard NETCONF and NETCONF Call Home connections. support both standard NETCONF and NETCONF Call Home connections.
Editorial Note (To be removed by RFC Editor) Editorial Note (To be removed by RFC Editor)
skipping to change at page 2, line 5 skipping to change at page 2, line 5
o "YYYY" --> the assigned RFC value for I-D.ietf-netconf-ssh-client- o "YYYY" --> the assigned RFC value for I-D.ietf-netconf-ssh-client-
server server
o "ZZZZ" --> the assigned RFC value for I-D.ietf-netconf-tls-client- o "ZZZZ" --> the assigned RFC value for I-D.ietf-netconf-tls-client-
server server
Artwork in this document contains placeholder values for the date of Artwork in this document contains placeholder values for the date of
publication of this draft. Please apply the following replacement: publication of this draft. Please apply the following replacement:
o "2017-10-30" --> the publication date of this draft o "2018-06-04" --> the publication date of this draft
The following Appendix section is to be removed prior to publication: The following Appendix section is to be removed prior to publication:
o Appendix A. Change Log o Appendix A. Change Log
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on May 3, 2018. This Internet-Draft will expire on December 6, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. The NETCONF Client Model . . . . . . . . . . . . . . . . . . 4 3. The NETCONF Client Model . . . . . . . . . . . . . . . . . . 4
3.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 4 3.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 4
3.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 10 3.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 9
3.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 11 3.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 11
4. The NETCONF Server Model . . . . . . . . . . . . . . . . . . 22 4. The NETCONF Server Model . . . . . . . . . . . . . . . . . . 22
4.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 22 4.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 22
4.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 28 4.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 28
4.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 33 4.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 33
5. Design Considerations . . . . . . . . . . . . . . . . . . . . 44 5. Design Considerations . . . . . . . . . . . . . . . . . . . . 44
5.1. Support all NETCONF transports . . . . . . . . . . . . . 44 5.1. Support all NETCONF transports . . . . . . . . . . . . . 45
5.2. Enable each transport to select which keys to use . . . . 45 5.2. Enable each transport to select which keys to use . . . . 45
5.3. Support authenticating NETCONF clients certificates . . . 45 5.3. Support authenticating NETCONF clients certificates . . . 45
5.4. Support mapping authenticated NETCONF client certificates 5.4. Support mapping authenticated NETCONF client certificates
to usernames . . . . . . . . . . . . . . . . . . . . . . 45 to usernames . . . . . . . . . . . . . . . . . . . . . . 45
5.5. Support both listening for connections and call home . . 45 5.5. Support both listening for connections and call home . . 45
5.6. For Call Home connections . . . . . . . . . . . . . . . . 45 5.6. For Call Home connections . . . . . . . . . . . . . . . . 46
5.6.1. Support more than one NETCONF client . . . . . . . . 45 5.6.1. Support more than one NETCONF client . . . . . . . . 46
5.6.2. Support NETCONF clients having more than one endpoint 46 5.6.2. Support NETCONF clients having more than one endpoint 46
5.6.3. Support a reconnection strategy . . . . . . . . . . . 46 5.6.3. Support a reconnection strategy . . . . . . . . . . . 46
5.6.4. Support both persistent and periodic connections . . 46 5.6.4. Support both persistent and periodic connections . . 46
5.6.5. Reconnection strategy for periodic connections . . . 46 5.6.5. Reconnection strategy for periodic connections . . . 46
5.6.6. Keep-alives for persistent connections . . . . . . . 46 5.6.6. Keep-alives for persistent connections . . . . . . . 47
5.6.7. Customizations for periodic connections . . . . . . . 47 5.6.7. Customizations for periodic connections . . . . . . . 47
6. Security Considerations . . . . . . . . . . . . . . . . . . . 47 6. Security Considerations . . . . . . . . . . . . . . . . . . . 47
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 48 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 48
7.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 48 7.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 48
7.2. The YANG Module Names Registry . . . . . . . . . . . . . 48 7.2. The YANG Module Names Registry . . . . . . . . . . . . . 48
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 49 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 49
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 49 8.1. Normative References . . . . . . . . . . . . . . . . . . 49
9.1. Normative References . . . . . . . . . . . . . . . . . . 49 8.2. Informative References . . . . . . . . . . . . . . . . . 50
9.2. Informative References . . . . . . . . . . . . . . . . . 50
Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 51 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 51
A.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 51 A.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 51
A.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 51 A.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 51
A.3. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 51 A.3. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 51
A.4. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 51 A.4. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 51
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 51 A.5. 04 to 05 . . . . . . . . . . . . . . . . . . . . . . . . 51
A.6. 05 to 06 . . . . . . . . . . . . . . . . . . . . . . . . 52
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 52
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 52
1. Introduction 1. Introduction
This document defines two YANG [RFC7950] modules, one module to This document defines two YANG [RFC7950] modules, one module to
configure a NETCONF [RFC6241] client and the other module to configure a NETCONF [RFC6241] client and the other module to
configure a NETCONF server. Both modules support both NETCONF over configure a NETCONF server. Both modules support both NETCONF over
SSH [RFC6242] and NETCONF over TLS [RFC7589] and NETCONF Call Home SSH [RFC6242] and NETCONF over TLS [RFC7589] and NETCONF Call Home
connections [RFC8071]. connections [RFC8071].
2. Terminology 2. Terminology
skipping to change at page 4, line 24 skipping to change at page 4, line 26
[I-D.ietf-netconf-tls-client-server] respectively. [I-D.ietf-netconf-tls-client-server] respectively.
All private keys and trusted certificates are held in the keystore All private keys and trusted certificates are held in the keystore
model defined in [I-D.ietf-netconf-keystore]. model defined in [I-D.ietf-netconf-keystore].
YANG feature statements are used to enable implementations to YANG feature statements are used to enable implementations to
advertise which parts of the model the NETCONF client supports. advertise which parts of the model the NETCONF client supports.
3.1. Tree Diagram 3.1. Tree Diagram
The following tree diagram [I-D.ietf-netmod-yang-tree-diagrams] The following tree diagram [RFC8340] provides an overview of the data
provides an overview of the data model for the "ietf-netconf-client" model for the "ietf-netconf-client" module. Just the container is
module. Just the container is displayed below, but there is also a displayed below, but there is also a reuable grouping by the same
reuable grouping by the same name that the container is using. name that the container is using.
[ note: '\' line wrapping for formatting only]
module: ietf-netconf-client
+--rw netconf-client
+--rw initiate {initiate}?
| +--rw netconf-server* [name]
| +--rw name string
| +--rw endpoints
| | +--rw endpoint* [name]
| | +--rw name string
| | +--rw (transport)
| | +--:(ssh) {ssh-initiate}?
| | | +--rw ssh
| | | +--rw address? inet:host
| | | +--rw port? inet:port-numbe\
r
| | | +--rw client-identity
| | | | +--rw username? string
| | | | +--rw (auth-type)
| | | | +--:(certificate)
| | | | | +--rw certificate
| | | | | {sshcom:ssh-x509-certs}?\
| | | | | +--rw algorithm? [Note: '\' line wrapping for formatting only]
| | | | | | identityref
| | | | | +--rw private-key?
| | | | | | union
| | | | | +--rw public-key?
| | | | | | binary
| | | | | +---x generate-private-key
| | | | | | +---w input
| | | | | | +---w algorithm
| | | | | | identityref
| | | | | +--rw certificates
| | | | | | +--rw certificate* [name]
| | | | | | +--rw name string
| | | | | | +--rw value? binary
| | | | | +---x generate-certificate-si\
gning-request
| | | | | +---w input
| | | | | | +---w subject
| | | | | | | binary
| | | | | | +---w attributes?
| | | | | | binary
| | | | | +--ro output
| | | | | +--ro certificate-signi\
ng-request
| | | | | binary
| | | | +--:(public-key)
| | | | | +--rw public-key
| | | | | +--rw algorithm?
| | | | | | identityref
| | | | | +--rw private-key?
| | | | | | union
| | | | | +--rw public-key?
| | | | | | binary
| | | | | +---x generate-private-key
| | | | | +---w input
| | | | | +---w algorithm
| | | | | identityref
| | | | +--:(password)
| | | | +--rw password? string
| | | +--rw server-auth
| | | | +--rw pinned-ssh-host-keys?
| | | | | ks:pinned-host-keys
| | | | +--rw pinned-ca-certs?
| | | | | ks:pinned-certificates
| | | | | {sshcom:ssh-x509-certs}?
| | | | +--rw pinned-server-certs?
| | | | ks:pinned-certificates
| | | | {sshcom:ssh-x509-certs}?
| | | +--rw transport-params
| | | {ssh-client-transport-params-conf\
ig}?
| | | +--rw host-key
| | | | +--rw host-key-alg* identityref
| | | +--rw key-exchange
| | | | +--rw key-exchange-alg* identityr\
ef
| | | +--rw encryption
| | | | +--rw encryption-alg* identityref\
| | | +--rw mac module: ietf-netconf-client
| | | | +--rw mac-alg* identityref +--rw netconf-client
| | | +--rw compression +--rw initiate! {initiate}?
| | | +--rw compression-alg* identityre\ | +--rw netconf-server* [name]
f | +--rw name string
| | +--:(tls) {tls-initiate}? | +--rw endpoints
| | +--rw tls | | +--rw endpoint* [name]
| | +--rw address? inet:host | | +--rw name string
| | +--rw port? inet:port-number\ | | +--rw (transport)
| | +--:(ssh) {ssh-initiate}?
| | | +--rw ssh
| | | +--rw address? inet:host
| | | +--rw port? inet:port-number\
| | +--rw client-identity | | | +--rw client-identity
| | | +--rw (auth-type) | | | | +--rw username? string
| | | +--:(certificate) | | | | +--rw (auth-type)
| | | +--rw certificate | | | | +--:(password)
| | | +--rw algorithm? | | | | | +--rw password? string
| | | | identityref | | | | +--:(public-key)
| | | +--rw private-key? | | | | | +--rw public-key
| | | | union | | | | | +--rw (local-or-keystore)
| | | +--rw public-key? | | | | | +--:(local)
| | | | binary | | | | | | +--rw algorithm
| | | +---x generate-private-key | | | | | | | ct:key-algorithm\
| | | | +---w input -ref
| | | | +---w algorithm | | | | | | +--rw public-key bin\
| | | | identityref ary
| | | +--rw certificates | | | | | | +--rw private-key uni\
| | | | +--rw certificate* [name] on
| | | | +--rw name string | | | | | +--:(keystore)
| | | | +--rw value? binary | | | | | {keystore-implemen\
| | | +---x generate-certificate-si\ ted}?
gning-request | | | | | +--rw reference
| | | +---w input | | | | | ks:asymmetric-ke\
| | | | +---w subject y-ref
| | | | | binary | | | | +--:(certificate)
| | | | +---w attributes? | | | | +--rw certificate
| | | | binary | | | | {sshcmn:ssh-x509-certs}?
| | | +--ro output | | | | +--rw (local-or-keystore)
| | | +--ro certificate-signi\ | | | | +--:(local)
ng-request | | | | | +--rw algorithm
| | | binary | | | | | | ct:key-algorithm\
| | +--rw server-auth -ref
| | | +--rw pinned-ca-certs? | | | | | +--rw public-key
| | | | ks:pinned-certificates | | | | | | binary
| | | +--rw pinned-server-certs? | | | | | +--rw private-key
| | | ks:pinned-certificates | | | | | | union
| | +--rw hello-params | | | | | +--rw cert
| | {tls-client-hello-params-config}?\ | | | | | | ct:end-entity-ce\
rt-cms
| | | | | +---n certificate-expira\
tion
| | | | | +-- expiration-date?
| | | | | yang:date-and\
-time
| | | | +--:(keystore)
| | | | {keystore-implemen\
ted}?
| | | | +--rw reference
| | | | ks:asymmetric-ke\
y-certificate-ref
| | | +--rw server-auth
| | | | +--rw pinned-ssh-host-keys?
| | | | | ta:pinned-host-keys-ref
| | | | +--rw pinned-ca-certs?
| | | | | ta:pinned-certificates-ref
| | | | | {sshcmn:ssh-x509-certs}?
| | | | +--rw pinned-server-certs?
| | | | ta:pinned-certificates-ref
| | | | {sshcmn:ssh-x509-certs}?
| | | +--rw transport-params
| | | {ssh-client-transport-params-confi\
g}?
| | | +--rw host-key
| | | | +--rw host-key-alg* identityref
| | | +--rw key-exchange
| | | | +--rw key-exchange-alg* identityre\
f
| | | +--rw encryption
| | | | +--rw encryption-alg* identityref
| | | +--rw mac
| | | +--rw mac-alg* identityref
| | +--:(tls) {tls-initiate}?
| | +--rw tls
| | +--rw address? inet:host
| | +--rw port? inet:port-number
| | +--rw client-identity
| | | +--rw (auth-type)
| | | +--:(certificate)
| | | +--rw certificate
| | | +--rw (local-or-keystore)
| | | +--:(local)
| | | | +--rw algorithm
| | | | | ct:key-algorithm\
-ref
| | | | +--rw public-key
| | | | | binary
| | | | +--rw private-key
| | | | | union
| | | | +--rw cert
| | | | | ct:end-entity-ce\
rt-cms
| | | | +---n certificate-expira\
tion
| | | | +-- expiration-date?
| | | | yang:date-and\
-time
| | | +--:(keystore)
| | | {keystore-implemen\
ted}?
| | | +--rw reference
| | | ks:asymmetric-ke\
y-certificate-ref
| | +--rw server-auth
| | | +--rw pinned-ca-certs?
| | | | ta:pinned-certificates-ref
| | | +--rw pinned-server-certs?
| | | ta:pinned-certificates-ref
| | +--rw hello-params
| | {tls-client-hello-params-config}?
| | +--rw tls-versions
| | | +--rw tls-version* identityref
| | +--rw cipher-suites
| | +--rw cipher-suite* identityref
| +--rw connection-type
| | +--rw (connection-type)?
| | +--:(persistent-connection)
| | | +--rw persistent!
| | | +--rw idle-timeout? uint32
| | | +--rw keep-alives
| | | +--rw max-wait? uint16
| | | +--rw max-attempts? uint8
| | +--:(periodic-connection)
| | +--rw periodic!
| | +--rw idle-timeout? uint16
| | +--rw reconnect-timeout? uint16
| +--rw reconnect-strategy
| +--rw start-with? enumeration
| +--rw max-attempts? uint8
+--rw listen! {listen}?
+--rw idle-timeout? uint16
+--rw endpoint* [name]
+--rw name string
+--rw (transport)
+--:(ssh) {ssh-listen}?
| +--rw ssh
| +--rw address? inet:ip-address
| +--rw port? inet:port-number
| +--rw client-identity
| | +--rw username? string
| | +--rw (auth-type)
| | +--:(password)
| | | +--rw password? string
| | +--:(public-key)
| | | +--rw public-key
| | | +--rw (local-or-keystore)
| | | +--:(local)
| | | | +--rw algorithm
| | | | | ct:key-algorithm-ref
| | | | +--rw public-key binary
| | | | +--rw private-key union
| | | +--:(keystore)
| | | {keystore-implemented}?
| | | +--rw reference
| | | ks:asymmetric-key-ref
| | +--:(certificate)
| | +--rw certificate {sshcmn:ssh-x509-cert\
s}?
| | +--rw (local-or-keystore)
| | +--:(local)
| | | +--rw algorithm
| | | | ct:key-algorithm-ref
| | | +--rw public-key
| | | | binary
| | | +--rw private-key
| | | | union
| | | +--rw cert
| | | | ct:end-entity-cert-cms\
| | +--rw tls-versions | | | +---n certificate-expiration
| | | +--rw tls-version* identityref | | | +-- expiration-date?
| | +--rw cipher-suites | | | yang:date-and-time
| | +--rw cipher-suite* identityref | | +--:(keystore)
| +--rw connection-type | | {keystore-implemented}?
| | +--rw (connection-type)? | | +--rw reference
| | +--:(persistent-connection) | | ks:asymmetric-key-cert\
| | | +--rw persistent! ificate-ref
| | | +--rw idle-timeout? uint32 | +--rw server-auth
| | | +--rw keep-alives | | +--rw pinned-ssh-host-keys?
| | | +--rw max-wait? uint16 | | | ta:pinned-host-keys-ref
| | | +--rw max-attempts? uint8 | | +--rw pinned-ca-certs?
| | +--:(periodic-connection) | | | ta:pinned-certificates-ref
| | +--rw periodic! | | | {sshcmn:ssh-x509-certs}?
| | +--rw idle-timeout? uint16 | | +--rw pinned-server-certs?
| | +--rw reconnect-timeout? uint16 | | ta:pinned-certificates-ref
| +--rw reconnect-strategy | | {sshcmn:ssh-x509-certs}?
| +--rw start-with? enumeration | +--rw transport-params
| +--rw max-attempts? uint8 | {ssh-client-transport-params-config}?
+--rw listen {listen}? | +--rw host-key
+--rw idle-timeout? uint16 | | +--rw host-key-alg* identityref
+--rw endpoint* [name] | +--rw key-exchange
+--rw name string | | +--rw key-exchange-alg* identityref
+--rw (transport) | +--rw encryption
+--:(ssh) {ssh-listen}? | | +--rw encryption-alg* identityref
| +--rw ssh | +--rw mac
| +--rw address? inet:ip-address | +--rw mac-alg* identityref
| +--rw port? inet:port-number +--:(tls) {tls-listen}?
| +--rw client-identity +--rw tls
| | +--rw username? string +--rw address? inet:ip-address
| | +--rw (auth-type) +--rw port? inet:port-number
| | +--:(certificate) +--rw client-identity
| | | +--rw certificate | +--rw (auth-type)
| | | {sshcom:ssh-x509-certs}? | +--:(certificate)
| | | +--rw algorithm? | +--rw certificate
| | | | identityref | +--rw (local-or-keystore)
| | | +--rw private-key? | +--:(local)
| | | | union | | +--rw algorithm
| | | +--rw public-key? | | | ct:key-algorithm-ref
| | | | binary | | +--rw public-key
| | | +---x generate-private-key | | | binary
| | | | +---w input | | +--rw private-key
| | | | +---w algorithm identityre\ | | | union
f | | +--rw cert
| | | +--rw certificates | | | ct:end-entity-cert-cms\
| | | | +--rw certificate* [name]
| | | | +--rw name string
| | | | +--rw value? binary
| | | +---x generate-certificate-signing-\
request
| | | +---w input
| | | | +---w subject binary
| | | | +---w attributes? binary
| | | +--ro output
| | | +--ro certificate-signing-req\
uest
| | | binary
| | +--:(public-key)
| | | +--rw public-key
| | | +--rw algorithm?
| | | | identityref
| | | +--rw private-key? union\
| | | +--rw public-key? binar\ | | +---n certificate-expiration
y | | +-- expiration-date?
| | | +---x generate-private-key | | yang:date-and-time
| | | +---w input | +--:(keystore)
| | | +---w algorithm identityre\ | {keystore-implemented}?
f | +--rw reference
| | +--:(password) | ks:asymmetric-key-cert\
| | +--rw password? string ificate-ref
| +--rw server-auth +--rw server-auth
| | +--rw pinned-ssh-host-keys? | +--rw pinned-ca-certs?
| | | ks:pinned-host-keys | | ta:pinned-certificates-ref
| | +--rw pinned-ca-certs? | +--rw pinned-server-certs?
| | | ks:pinned-certificates | ta:pinned-certificates-ref
| | | {sshcom:ssh-x509-certs}? +--rw hello-params
| | +--rw pinned-server-certs? {tls-client-hello-params-config}?
| | ks:pinned-certificates +--rw tls-versions
| | {sshcom:ssh-x509-certs}? | +--rw tls-version* identityref
| +--rw transport-params +--rw cipher-suites
| {ssh-client-transport-params-config}? +--rw cipher-suite* identityref
| +--rw host-key
| | +--rw host-key-alg* identityref
| +--rw key-exchange
| | +--rw key-exchange-alg* identityref
| +--rw encryption
| | +--rw encryption-alg* identityref
| +--rw mac
| | +--rw mac-alg* identityref
| +--rw compression
| +--rw compression-alg* identityref
+--:(tls) {tls-listen}?
+--rw tls
+--rw address? inet:ip-address
+--rw port? inet:port-number
+--rw client-identity
| +--rw (auth-type)
| +--:(certificate)
| +--rw certificate
| +--rw algorithm?
| | identityref
| +--rw private-key?
| | union
| +--rw public-key?
| | binary
| +---x generate-private-key
| | +---w input
| | +---w algorithm identityre\
f
| +--rw certificates
| | +--rw certificate* [name]
| | +--rw name string
| | +--rw value? binary
| +---x generate-certificate-signing-\
request
| +---w input
| | +---w subject binary
| | +---w attributes? binary
| +--ro output
| +--ro certificate-signing-req\
uest
| binary
+--rw server-auth
| +--rw pinned-ca-certs?
| | ks:pinned-certificates
| +--rw pinned-server-certs?
| ks:pinned-certificates
+--rw hello-params
{tls-client-hello-params-config}?
+--rw tls-versions
| +--rw tls-version* identityref
+--rw cipher-suites
+--rw cipher-suite* identityref
3.2. Example Usage 3.2. Example Usage
The following example illustrates configuring a NETCONF client to The following example illustrates configuring a NETCONF client to
initiate connections, using both the SSH and TLS transport protocols, initiate connections, using both the SSH and TLS transport protocols,
as well as listening for call-home connections, again using both the as well as listening for call-home connections, again using both the
SSH and TLS transport protocols. SSH and TLS transport protocols.
This example is consistent with the examples presented in Section 2.2 This example is consistent with the examples presented in Section 2.2
of [I-D.ietf-netconf-keystore]. of [I-D.ietf-netconf-keystore].
[ note: '\' line wrapping for formatting only] [Note: '\' line wrapping for formatting only]
<netconf-client
xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-client">
<netconf-client <!-- NETCONF servers to initiate connections to -->
xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-client"> <initiate>
<netconf-server>
<name>corp-fw1</name>
<endpoints>
<endpoint>
<name>corp-fw1.example.com</name>
<ssh>
<address>corp-fw1.example.com</address>
<client-identity>
<username>foobar</username>
<public-key>
<algorithm xmlns:ct="urn:ietf:params:xml:ns:yang:iet\
f-crypto-types">ct:secp521r1</algorithm>
<private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key>
</public-key>
</client-identity>
<server-auth>
<pinned-ca-certs>explicitly-trusted-server-ca-certs</p\
inned-ca-certs>
<pinned-server-certs>explicitly-trusted-server-certs</\
pinned-server-certs>
</server-auth>
</ssh>
</endpoint>
<endpoint>
<name>corp-fw2.example.com</name>
<ssh>
<address>corp-fw2.example.com</address>
<client-identity>
<username>foobar</username>
<public-key>
<algorithm xmlns:ct="urn:ietf:params:xml:ns:yang:iet\
f-crypto-types">ct:secp521r1</algorithm>
<private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key>
</public-key>
</client-identity>
<server-auth>
<pinned-ca-certs>explicitly-trusted-server-ca-certs</p\
inned-ca-certs>
<pinned-server-certs>explicitly-trusted-server-certs</\
pinned-server-certs>
</server-auth>
<!-- NETCONF servers to initiate connections to --> </ssh>
<initiate> </endpoint>
<netconf-server> </endpoints>
<name>corp-fw1</name> <connection-type>
<endpoints> <persistent/>
<endpoint> </connection-type>
<name>corp-fw1.example.com</name> <reconnect-strategy>
<ssh> <start-with>last-connected</start-with>
<address>corp-fw1.example.com</address> </reconnect-strategy>
<client-identity> </netconf-server>
<username>foobar</username> </initiate>
<public-key>
<algorithm xmlns:ks="urn:ietf:params:xml:ns:yang:ietf\
-keystore">ks:secp521r1</algorithm>
<private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key>
</public-key>
</client-identity>
<server-auth>
<pinned-server-certs>deployment-specific-ca-certs</pinn\
ed-server-certs>
</server-auth>
</ssh>
</endpoint>
<endpoint>
<name>corp-fw2.example.com</name>
<ssh>
<address>corp-fw2.example.com</address>
<client-identity>
<username>foobar</username>
<public-key>
<algorithm xmlns:ks="urn:ietf:params:xml:ns:yang:ietf\
-keystore">ks:secp521r1</algorithm>
<private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key>
</public-key>
</client-identity>
<server-auth>
<pinned-server-certs>deployment-specific-ca-certs</pinn\
ed-server-certs>
</server-auth>
</ssh>
</endpoint>
</endpoints>
</netconf-server>
</initiate>
<!-- endpoints to listen for NETCONF Call Home connections on --> <!-- endpoints to listen for NETCONF Call Home connections on -->
<listen> <listen>
<endpoint> <endpoint>
<name>Intranet-facing listener</name> <name>Intranet-facing listener</name>
<ssh> <ssh>
<address>192.0.2.7</address> <address>192.0.2.7</address>
<client-identity> <client-identity>
<username>foobar</username> <username>foobar</username>
<public-key> <public-key>
<algorithm xmlns:ks="urn:ietf:params:xml:ns:yang:ietf-key\ <algorithm xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-cr\
store">ks:secp521r1</algorithm> ypto-types">ct:secp521r1</algorithm>
<private-key>base64encodedvalue==</private-key> <private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key> <public-key>base64encodedvalue==</public-key>
</public-key> </public-key>
</client-identity> </client-identity>
<server-auth> <server-auth>
<pinned-ca-certs>deployment-specific-ca-certs</pinned-ca-ce\ <pinned-ca-certs>explicitly-trusted-server-ca-certs</pinne\
rts> d-ca-certs>
<pinned-server-certs>explicitly-trusted-server-certs</pinne\ <pinned-server-certs>explicitly-trusted-server-certs</pinn\
d-server-certs> ed-server-certs>
<pinned-ssh-host-keys>explicitly-trusted-ssh-host-keys</pin\ <pinned-ssh-host-keys>explicitly-trusted-ssh-host-keys</pi\
ned-ssh-host-keys> nned-ssh-host-keys>
</server-auth> </server-auth>
</ssh> </ssh>
</endpoint> </endpoint>
</listen> </listen>
</netconf-client> </netconf-client>
3.3. YANG Module 3.3. YANG Module
This YANG module imports YANG types from [RFC6991], and YANG This YANG module has normative references to [RFC6242], [RFC6991],
groupings from [I-D.ietf-netconf-ssh-client-server] and [RFC7589], [RFC8071], [I-D.ietf-netconf-ssh-client-server], and
[I-D.ietf-netconf-ssh-client-server]. [I-D.ietf-netconf-tls-client-server].
<CODE BEGINS> file "ietf-netconf-client@2017-10-30.yang"
module ietf-netconf-client {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-client"; <CODE BEGINS> file "ietf-netconf-client@2018-06-04.yang"
prefix "ncc"; module ietf-netconf-client {
yang-version 1.1;
import ietf-inet-types { namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-client";
prefix inet; prefix "ncc";
reference
"RFC 6991: Common YANG Data Types";
}
import ietf-ssh-client { import ietf-inet-types {
prefix ss; prefix inet;
revision-date 2017-10-30; // stable grouping definitions reference
reference "RFC 6991: Common YANG Data Types";
"RFC YYYY: YANG Groupings for SSH Clients and SSH Servers"; }
}
import ietf-tls-client { import ietf-ssh-client {
prefix ts; prefix ss;
revision-date 2017-10-30; // stable grouping definitions revision-date 2018-06-04; // stable grouping definitions
reference reference
"RFC ZZZZ: YANG Groupings for TLS Clients and TLS Servers"; "RFC YYYY: YANG Groupings for SSH Clients and SSH Servers";
} }
organization import ietf-tls-client {
"IETF NETCONF (Network Configuration) Working Group"; prefix ts;
revision-date 2018-06-04; // stable grouping definitions
reference
"RFC ZZZZ: YANG Groupings for TLS Clients and TLS Servers";
}
contact organization
"WG Web: <http://tools.ietf.org/wg/netconf/> "IETF NETCONF (Network Configuration) Working Group";
WG List: <mailto:netconf@ietf.org>
Author: Kent Watsen contact
<mailto:kwatsen@juniper.net> "WG Web: <http://datatracker.ietf.org/wg/netconf/>
WG List: <mailto:netconf@ietf.org>
Author: Gary Wu Author: Kent Watsen
<mailto:garywu@cisco.com>"; <mailto:kwatsen@juniper.net>
description Author: Gary Wu
"This module contains a collection of YANG definitions for <mailto:garywu@cisco.com>";
configuring NETCONF clients.
Copyright (c) 2017 IETF Trust and the persons identified as description
authors of the code. All rights reserved. "This module contains a collection of YANG definitions for
configuring NETCONF clients.
Redistribution and use in source and binary forms, with or Copyright (c) 2017 IETF Trust and the persons identified as
without modification, is permitted pursuant to, and subject authors of the code. All rights reserved.
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
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see Redistribution and use in source and binary forms, with or
the RFC itself for full legal notices."; 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
(http://trustee.ietf.org/license-info).
revision "2017-10-30" { This version of this YANG module is part of RFC XXXX; see
description the RFC itself for full legal notices.";
"Initial version";
reference
"RFC XXXX: NETCONF Client and Server Models";
}
// Features revision "2018-06-04" {
description
"Initial version";
reference
"RFC XXXX: NETCONF Client and Server Models";
}
feature initiate { // Features
description
"The 'initiate' feature indicates that the NETCONF client
supports initiating NETCONF connections to NETCONF servers
using at least one transport (e.g., SSH, TLS, etc.).";
}
feature ssh-initiate { feature initiate {
description description
"The 'ssh-initiate' feature indicates that the NETCONF client "The 'initiate' feature indicates that the NETCONF client
supports initiating SSH connections to NETCONF servers."; supports initiating NETCONF connections to NETCONF servers
reference using at least one transport (e.g., SSH, TLS, etc.).";
"RFC 6242: Using the NETCONF Protocol over Secure Shell (SSH)"; }
}
feature tls-initiate { feature ssh-initiate {
description description
"The 'tls-initiate' feature indicates that the NETCONF client "The 'ssh-initiate' feature indicates that the NETCONF client
supports initiating TLS connections to NETCONF servers."; supports initiating SSH connections to NETCONF servers.";
reference reference
"RFC 7589: Using the NETCONF Protocol over Transport "RFC 6242:
Layer Security (TLS) with Mutual X.509 Using the NETCONF Protocol over Secure Shell (SSH)";
Authentication"; }
}
feature listen { feature tls-initiate {
description description
"The 'listen' feature indicates that the NETCONF client "The 'tls-initiate' feature indicates that the NETCONF client
supports opening a port to accept NETCONF server call supports initiating TLS connections to NETCONF servers.";
home connections using at least one transport (e.g., reference
SSH, TLS, etc.)."; "RFC 7589: Using the NETCONF Protocol over Transport
} Layer Security (TLS) with Mutual X.509
Authentication";
}
feature ssh-listen { feature listen {
description description
"The 'ssh-listen' feature indicates that the NETCONF client "The 'listen' feature indicates that the NETCONF client
supports opening a port to listen for incoming NETCONF supports opening a port to accept NETCONF server call
server call-home SSH connections."; home connections using at least one transport (e.g.,
reference SSH, TLS, etc.).";
"RFC 8071: NETCONF Call Home and RESTCONF Call Home"; }
}
feature tls-listen { feature ssh-listen {
description description
"The 'tls-listen' feature indicates that the NETCONF client "The 'ssh-listen' feature indicates that the NETCONF client
supports opening a port to listen for incoming NETCONF supports opening a port to listen for incoming NETCONF
server call-home TLS connections."; server call-home SSH connections.";
reference reference
"RFC 8071: NETCONF Call Home and RESTCONF Call Home"; "RFC 8071: NETCONF Call Home and RESTCONF Call Home";
} }
container netconf-client { feature tls-listen {
uses netconf-client; description
description "The 'tls-listen' feature indicates that the NETCONF client
"Top-level container for NETCONF client configuration."; supports opening a port to listen for incoming NETCONF
} server call-home TLS connections.";
reference
"RFC 8071: NETCONF Call Home and RESTCONF Call Home";
}
grouping netconf-client { container netconf-client {
description uses netconf-client;
"Top-level grouping for NETCONF client configuration."; description
"Top-level container for NETCONF client configuration.";
}
container initiate { grouping netconf-client {
if-feature initiate; description
description "Top-level grouping for NETCONF client configuration.";
"Configures client initiating underlying TCP connections.";
list netconf-server {
key name;
min-elements 1;
description
"List of NETCONF servers the NETCONF client is to initiate
connections to in parallel.";
leaf name {
type string;
description
"An arbitrary name for the NETCONF server.";
}
container endpoints {
description
"Container for the list of endpoints.";
list endpoint {
key name;
min-elements 1;
ordered-by user;
description
"A user-ordered list of endpoints that the NETCONF
client will attempt to connect to in the specified
sequence. Defining more than one enables
high-availability.";
leaf name {
type string;
description
"An arbitrary name for the endpoint.";
}
choice transport {
mandatory true;
description
"Selects between available transports.";
case ssh {
if-feature ssh-initiate;
container ssh {
description
"Specifies IP and SSH specific configuration for
the connection.";
leaf address {
type inet:host;
description
"The IP address or hostname of the endpoint.
If a domain name is configured, then the DNS
resolution should happen on each usage attempt.
If the DNS resolution results in multiple IP
addresses, the IP addresses will be tried
according to local preference order until a
connection has been established or until all
IP addresses have failed.";
}
leaf port {
type inet:port-number;
default 830;
description
"The IP port for this endpoint. The NETCONF
client will use the IANA-assigned well-known
port for 'netconf-ssh' (830) if no value is
specified.";
}
uses ss:ssh-client-grouping;
} container initiate {
} // end ssh if-feature initiate;
case tls { presence "Enables client to initiate TCP connections";
if-feature tls-initiate; description
container tls { "Configures client initiating underlying TCP connections.";
description list netconf-server {
"Specifies IP and TLS specific configuration for key name;
the connection."; min-elements 1;
leaf address { description
type inet:host; "List of NETCONF servers the NETCONF client is to
description initiate connections to in parallel.";
leaf name {
type string;
description
"An arbitrary name for the NETCONF server.";
}
container endpoints {
description
"Container for the list of endpoints.";
list endpoint {
key name;
min-elements 1;
ordered-by user;
description
"A user-ordered list of endpoints that the NETCONF
client will attempt to connect to in the specified
sequence. Defining more than one enables
high-availability.";
leaf name {
type string;
description
"An arbitrary name for the endpoint.";
}
choice transport {
mandatory true;
description
"Selects between available transports.";
case ssh {
if-feature ssh-initiate;
container ssh {
description
"Specifies IP and SSH specific configuration
for the connection.";
leaf address {
type inet:host;
description
"The IP address or hostname of the endpoint. "The IP address or hostname of the endpoint.
If a domain name is configured, then the DNS If a domain name is configured, then the
resolution should happen on each usage attempt. DNS resolution should happen on each usage
If the DNS resolution results in multiple IP attempt. If the DNS resolution results in
addresses, the IP addresses will be tried multiple IP addresses, the IP addresses will
according to local preference order until a be tried according to local preference order
connection has been established or until all until a connection has been established or
IP addresses have failed."; until all IP addresses have failed.";
}
leaf port {
type inet:port-number;
default 6513;
description
"The IP port for this endpoint. The NETCONF
client will use the IANA-assigned well-known
port for 'netconf-tls' (6513) if no value is
specified.";
}
uses ts:tls-client-grouping {
refine "client-identity/auth-type" {
mandatory true;
description
"NETCONF/TLS clients MUST pass some
authentication credentials.";
}
} }
} leaf port {
} // end tls type inet:port-number;
} default 830;
} description
} "The IP port for this endpoint. The NETCONF
client will use the IANA-assigned well-known
container connection-type { port for 'netconf-ssh' (830) if no value is
description specified.";
"Indicates the kind of connection to use."; }
choice connection-type { uses ss:ssh-client-grouping;
description
"Selects between available connection types.";
case persistent-connection {
container persistent {
presence true;
description
"Maintain a persistent connection to the NETCONF
server. If the connection goes down, immediately
start trying to reconnect to it, using the
reconnection strategy.
This connection type minimizes any NETCONF server }
to NETCONF client data-transfer delay, albeit at } // end ssh
the expense of holding resources longer."; case tls {
leaf idle-timeout { if-feature tls-initiate;
type uint32; container tls {
units "seconds"; description
default 86400; // one day; "Specifies IP and TLS specific configuration
description for the connection.";
"Specifies the maximum number of seconds that a leaf address {
a NETCONF session may remain idle. A NETCONF type inet:host;
session will be dropped if it is idle for an description
interval longer than this number of seconds. "The IP address or hostname of the endpoint.
If set to zero, then the client will never drop If a domain name is configured, then the
a session because it is idle. Sessions that DNS resolution should happen on each usage
have a notification subscription active are attempt. If the DNS resolution results in
never dropped."; multiple IP addresses, the IP addresses will
} be tried according to local preference order
container keep-alives { until a connection has been established or
description until all IP addresses have failed.";
"Configures the keep-alive policy, to proactively }
test the aliveness of the SSH/TLS server. An leaf port {
unresponsive SSH/TLS server will be dropped after type inet:port-number;
approximately max-attempts * max-wait seconds."; default 6513;
reference description
"RFC 8071: NETCONF Call Home and RESTCONF Call "The IP port for this endpoint. The NETCONF
Home, Section 3.1, item S6"; client will use the IANA-assigned well-
leaf max-wait { known port for 'netconf-tls' (6513) if no
type uint16 { value is specified.";
range "1..max"; }
uses ts:tls-client-grouping {
refine "client-identity/auth-type" {
mandatory true;
description
"NETCONF/TLS clients MUST pass some
authentication credentials.";
}
} }
units seconds;
default 30;
description
"Sets the amount of time in seconds after which
if no data has been received from the SSH/TLS
server, a SSH/TLS-level message will be sent
to test the aliveness of the SSH/TLS server.";
}
leaf max-attempts {
type uint8;
default 3;
description
"Sets the maximum number of sequential keep-alive
messages that can fail to obtain a response from
the SSH/TLS server before assuming the SSH/TLS
server is no longer alive.";
} }
} } // end tls
} }
} }
case periodic-connection { }
container periodic {
presence true;
description
"Periodically connect to the NETCONF server, so that
the NETCONF server may deliver messages pending for
the NETCONF client. The NETCONF server must close
the connection when it is ready to release it. Once
the connection has been closed, the NETCONF client
will restart its timer until the next connection.";
leaf idle-timeout {
type uint16;
units "seconds";
default 300; // five minutes
description
"Specifies the maximum number of seconds that a
a NETCONF session may remain idle. A NETCONF
session will be dropped if it is idle for an
interval longer than this number of seconds.
If set to zero, then the server will never drop
a session because it is idle. Sessions that
have a notification subscription active are
never dropped.";
}
leaf reconnect-timeout {
type uint16 {
range "1..max";
}
units minutes;
default 60;
description
"Sets the maximum amount of unconnected time the
NETCONF client will wait before re-establishing
a connection to the NETCONF server. The NETCONF
client may initiate a connection before this
time if desired (e.g., to set configuration).";
} container connection-type {
} description
} "Indicates the kind of connection to use.";
} choice connection-type {
} default persistent-connection;
container reconnect-strategy { description
description "Selects between available connection types.";
"The reconnection strategy directs how a NETCONF client case persistent-connection {
reconnects to a NETCONF server, after discovering its container persistent {
connection to the server has dropped, even if due to a presence
reboot. The NETCONF client starts with the specified "Indicates that a persistent connection is to be
endpoint and tries to connect to it max-attempts times maintained.";
before trying the next endpoint in the list (round description
robin)."; "Maintain a persistent connection to the NETCONF
leaf start-with { server. If the connection goes down, immediately
type enumeration { start trying to reconnect to it, using the
enum first-listed { reconnection strategy.
description
"Indicates that reconnections should start with
the first endpoint listed.";
}
enum last-connected {
description
"Indicates that reconnections should start with
the endpoint last connected to. If no previous
connection has ever been established, then the
first endpoint configured is used. NETCONF
clients SHOULD be able to remember the last
endpoint connected to across reboots.";
}
}
default first-listed;
description
"Specifies which of the NETCONF server's endpoints the
NETCONF client should start with when trying to connect
to the NETCONF server.";
}
leaf max-attempts {
type uint8 {
range "1..max";
}
default 3;
description
"Specifies the number times the NETCONF client tries to
connect to a specific endpoint before moving on to the
next endpoint in the list (round robin).";
}
}
} // end netconf-server This connection type minimizes any NETCONF server
} // end initiate to NETCONF client data-transfer delay, albeit at
the expense of holding resources longer.";
leaf idle-timeout {
type uint32;
units "seconds";
default 86400; // one day;
description
"Specifies the maximum number of seconds that
a NETCONF session may remain idle. A NETCONF
session will be dropped if it is idle for an
interval longer than this number of seconds.
If set to zero, then the client will never
drop a session because it is idle. Sessions
that have a notification subscription active
are never dropped.";
}
container keep-alives {
description
"Configures the keep-alive policy, to
proactively test the aliveness of the SSH/TLS
server. An unresponsive SSH/TLS server will
be dropped after approximately max-attempts *
max-wait seconds.";
reference
"RFC 8071: NETCONF Call Home and RESTCONF Call
Home, Section 3.1, item S6";
leaf max-wait {
type uint16 {
range "1..max";
}
units seconds;
default 30;
description
"Sets the amount of time in seconds after
which if no data has been received from the
SSH/TLS server, a SSH/TLS-level message will
be sent to test the aliveness of the SSH/TLS
server.";
}
leaf max-attempts {
type uint8;
default 3;
description
"Sets the maximum number of sequential keep-
alive messages that can fail to obtain a
response from the SSH/TLS server before
assuming the SSH/TLS server is no longer
alive.";
}
}
}
}
case periodic-connection {
container periodic {
presence
"Indicates that a periodic connection is to be
maintained.";
description
"Periodically connect to the NETCONF server, so
that the NETCONF server may deliver messages
pending for the NETCONF client. The NETCONF
server must close the connection when it is
ready to release it. Once the connection has
been closed, the NETCONF client will restart
its timer until the next connection.";
leaf idle-timeout {
type uint16;
units "seconds";
default 300; // five minutes
description
"Specifies the maximum number of seconds that
a NETCONF session may remain idle. A NETCONF
session will be dropped if it is idle for an
interval longer than this number of seconds.
If set to zero, then the server will never
drop a session because it is idle. Sessions
that have a notification subscription active
are never dropped.";
}
leaf reconnect-timeout {
type uint16 {
range "1..max";
container listen { }
if-feature listen; units minutes;
description default 60;
"Configures client accepting call-home TCP connections."; description
"Sets the maximum amount of unconnected time
the NETCONF client will wait before re-
establishing a connection to the NETCONF
server. The NETCONF client may initiate a
connection before this time if desired
(e.g., to set configuration).";
}
}
}
}
}
container reconnect-strategy {
description
"The reconnection strategy directs how a NETCONF client
reconnects to a NETCONF server, after discovering its
connection to the server has dropped, even if due to a
reboot. The NETCONF client starts with the specified
endpoint and tries to connect to it max-attempts times
before trying the next endpoint in the list (round
robin).";
leaf start-with {
type enumeration {
enum first-listed {
description
"Indicates that reconnections should start with
the first endpoint listed.";
}
enum last-connected {
description
"Indicates that reconnections should start with
the endpoint last connected to. If no previous
connection has ever been established, then the
first endpoint configured is used. NETCONF
clients SHOULD be able to remember the last
endpoint connected to across reboots.";
}
}
default first-listed;
description
"Specifies which of the NETCONF server's endpoints
the NETCONF client should start with when trying
to connect to the NETCONF server.";
}
leaf max-attempts {
type uint8 {
range "1..max";
}
default 3;
description
"Specifies the number times the NETCONF client tries
to connect to a specific endpoint before moving on
to the next endpoint in the list (round robin).";
}
}
} // end netconf-server
} // end initiate
leaf idle-timeout { container listen {
type uint16; if-feature listen;
units "seconds"; presence "Enables client to accept call-home connections";
default 3600; // one hour description
description "Configures client accepting call-home TCP connections.";
"Specifies the maximum number of seconds that a NETCONF
session may remain idle. A NETCONF session will be dropped
if it is idle for an interval longer than this number of
seconds. If set to zero, then the server will never drop
a session because it is idle. Sessions that have a
notification subscription active are never dropped.";
}
list endpoint { leaf idle-timeout {
key name; type uint16;
min-elements 1; units "seconds";
description default 3600; // one hour
"List of endpoints to listen for NETCONF connections."; description
leaf name { "Specifies the maximum number of seconds that a NETCONF
type string; session may remain idle. A NETCONF session will be
description dropped if it is idle for an interval longer than this
"An arbitrary name for the NETCONF listen endpoint."; number of seconds. If set to zero, then the server
} will never drop a session because it is idle. Sessions
choice transport { that have a notification subscription active are never
mandatory true; dropped.";
description }
"Selects between available transports.";
case ssh {
if-feature ssh-listen;
container ssh {
description
"SSH-specific listening configuration for inbound
connections.";
leaf address {
type inet:ip-address;
description
"The IP address to listen on for incoming call-home
connections. The NETCONF client will listen on
all configured interfaces if no value is specified.
INADDR_ANY (0.0.0.0) or INADDR6_ANY (0:0:0:0:0:0:0:0
a.k.a. ::) MUST be used when the server is to listen
on all IPv4 or IPv6 addresses, respectively.";
}
leaf port {
type inet:port-number;
default 4334;
description
"The port number to listen on for call-home
connections. The NETCONF client will listen on the
IANA-assigned well-known port for 'netconf-ch-ssh'
(4334) if no value is specified.";
}
uses ss:ssh-client-grouping;
}
}
case tls {
if-feature tls-listen;
container tls {
description
"TLS-specific listening configuration for inbound
connections.";
leaf address {
type inet:ip-address;
description
"The IP address to listen on for incoming call-home
connections. The NETCONF client will listen on
all configured interfaces if no value is specified.
INADDR_ANY (0.0.0.0) or INADDR6_ANY (0:0:0:0:0:0:0:0
a.k.a. ::) MUST be used when the server is to listen
on all IPv4 or IPv6 addresses, respectively.";
}
leaf port {
type inet:port-number;
default 4335;
description
"The port number to listen on for call-home
connections. The NETCONF client will listen on the
IANA-assigned well-known port for 'netconf-ch-tls'
(4335) if no value is specified.";
}
uses ts:tls-client-grouping {
refine "client-identity/auth-type" {
mandatory true;
description
"NETCONF/TLS clients MUST pass some authentication
credentials.";
}
}
} list endpoint {
} key name;
} // end transport min-elements 1;
} // end endpoint description
} // end listen "List of endpoints to listen for NETCONF connections.";
leaf name {
type string;
description
"An arbitrary name for the NETCONF listen endpoint.";
}
choice transport {
mandatory true;
description
"Selects between available transports.";
case ssh {
if-feature ssh-listen;
container ssh {
description
"SSH-specific listening configuration for inbound
connections.";
leaf address {
type inet:ip-address;
description
"The IP address to listen on for incoming call-
home connections. The NETCONF client will listen
on all configured interfaces if no value is
specified. INADDR_ANY (0.0.0.0) or INADDR6_ANY
(0:0:0:0:0:0:0:0 a.k.a. ::) MUST be used when
the server is to listen on all IPv4 or IPv6
addresses, respectively.";
}
leaf port {
type inet:port-number;
default 4334;
description
"The port number to listen on for call-home
connections. The NETCONF client will listen
on the IANA-assigned well-known port for
'netconf-ch-ssh' (4334) if no value is
specified.";
}
uses ss:ssh-client-grouping;
}
}
case tls {
if-feature tls-listen;
container tls {
description
"TLS-specific listening configuration for inbound
connections.";
leaf address {
type inet:ip-address;
description
"The IP address to listen on for incoming call-
home connections. The NETCONF client will listen
on all configured interfaces if no value is
specified. INADDR_ANY (0.0.0.0) or INADDR6_ANY
(0:0:0:0:0:0:0:0 a.k.a. ::) MUST be used when
the server is to listen on all IPv4 or IPv6
addresses, respectively.";
}
leaf port {
type inet:port-number;
default 4335;
description
"The port number to listen on for call-home
connections. The NETCONF client will listen
on the IANA-assigned well-known port for
'netconf-ch-tls' (4335) if no value is
specified.";
}
uses ts:tls-client-grouping {
refine "client-identity/auth-type" {
mandatory true;
description
"NETCONF/TLS clients MUST pass some
authentication credentials.";
}
}
}
}
} // end transport
} // end endpoint
} // end listen
} // end netconf-client } // end netconf-client
} }
<CODE ENDS> <CODE ENDS>
4. The NETCONF Server Model 4. The NETCONF Server Model
The NETCONF server model presented in this section supports servers The NETCONF server model presented in this section supports servers
both listening for connections as well as initiating call-home both listening for connections as well as initiating call-home
connections. connections.
This model supports both the SSH and TLS transport protocols, using This model supports both the SSH and TLS transport protocols, using
the SSH server and TLS server groupings defined in the SSH server and TLS server groupings defined in
[I-D.ietf-netconf-ssh-client-server] and [I-D.ietf-netconf-ssh-client-server] and
[I-D.ietf-netconf-tls-client-server] respectively. [I-D.ietf-netconf-tls-client-server] respectively.
All private keys and trusted certificates are held in the keystore All private keys and trusted certificates are held in the keystore
model defined in [I-D.ietf-netconf-keystore]. model defined in [I-D.ietf-netconf-keystore].
YANG feature statements are used to enable implementations to YANG feature statements are used to enable implementations to
advertise which parts of the model the NETCONF server supports. advertise which parts of the model the NETCONF server supports.
4.1. Tree Diagram 4.1. Tree Diagram
The following tree diagram [I-D.ietf-netmod-yang-tree-diagrams] The following tree diagram [RFC8340] provides an overview of the data
provides an overview of the data model for the "ietf-netconf-server" model for the "ietf-netconf-server" module. Just the container is
module. Just the container is displayed below, but there is also a displayed below, but there is also a reuable grouping by the same
reuable grouping by the same name that the container is using. name that the container is using.
[ note: '\' line wrapping for formatting only]
module: ietf-netconf-server
+--rw netconf-server
+--rw listen {listen}?
| +--rw idle-timeout? uint16
| +--rw endpoint* [name]
| +--rw name string
| +--rw (transport)
| +--:(ssh) {ssh-listen}?
| | +--rw ssh
| | +--rw address inet:ip-address
| | +--rw port? inet:port-number
| | +--rw server-identity
| | | +--rw host-key* [name]
| | | +--rw name string
| | | +--rw (host-key-type)
| | | +--:(public-key)
| | | | +--rw public-key
| | | | +--rw algorithm?
| | | | | identityref
| | | | +--rw private-key?
| | | | | union
| | | | +--rw public-key?
| | | | | binary
| | | | +---x generate-private-key
| | | | +---w input
| | | | +---w algorithm
| | | | identityref
| | | +--:(certificate)
| | | +--rw certificate
| | | {sshcom:ssh-x509-certs}?
| | | +--rw algorithm?
| | | | identityref
| | | +--rw private-key?
| | | | union
| | | +--rw public-key?
| | | | binary
| | | +---x generate-private-key
| | | | +---w input
| | | | +---w algorithm
| | | | identityref
| | | +--rw certificates
| | | | +--rw certificate* [name]
| | | | +--rw name string
| | | | +--rw value? binary
| | | +---x generate-certificate-signi\
ng-request
| | | +---w input
| | | | +---w subject binary\
| | | | +---w attributes? binary\
| | | +--ro output
| | | +--ro certificate-signing-\
request
| | | binary
| | +--rw client-cert-auth {sshcom:ssh-x509-certs}?\
| | | +--rw pinned-ca-certs?
| | | | ks:pinned-certificates
| | | +--rw pinned-client-certs?
| | | ks:pinned-certificates
| | +--rw transport-params
| | {ssh-server-transport-params-config}?
| | +--rw host-key
| | | +--rw host-key-alg* identityref
| | +--rw key-exchange
| | | +--rw key-exchange-alg* identityref
| | +--rw encryption
| | | +--rw encryption-alg* identityref
| | +--rw mac
| | | +--rw mac-alg* identityref
| | +--rw compression
| | +--rw compression-alg* identityref
| +--:(tls) {tls-listen}?
| +--rw tls
| +--rw address inet:ip-address
| +--rw port? inet:port-number
| +--rw server-identity
| | +--rw algorithm?
| | | identityref
| | +--rw private-key?
| | | union
| | +--rw public-key?
| | | binary
| | +---x generate-private-key
| | | +---w input
| | | +---w algorithm identityref
| | +--rw certificates
| | | +--rw certificate* [name]
| | | +--rw name string
| | | +--rw value? binary
| | +---x generate-certificate-signing-request
| | +---w input
| | | +---w subject binary
| | | +---w attributes? binary
| | +--ro output
| | +--ro certificate-signing-request
| | binary
| +--rw client-auth
| | +--rw pinned-ca-certs?
| | | ks:pinned-certificates
| | +--rw pinned-client-certs?
| | | ks:pinned-certificates
| | +--rw cert-maps
| | +--rw cert-to-name* [id]
| | +--rw id uint32
| | +--rw fingerprint
| | | x509c2n:tls-fingerprint
| | +--rw map-type identityref
| | +--rw name string
| +--rw hello-params
| {tls-server-hello-params-config}?
| +--rw tls-versions
| | +--rw tls-version* identityref
| +--rw cipher-suites
| +--rw cipher-suite* identityref
+--rw call-home {call-home}?
+--rw netconf-client* [name]
+--rw name string
+--rw endpoints
| +--rw endpoint* [name]
| +--rw name string
| +--rw (transport)
| +--:(ssh) {ssh-call-home}?
| | +--rw ssh
| | +--rw address inet:host
| | +--rw port? inet:port-numbe\
r
| | +--rw server-identity
| | | +--rw host-key* [name]
| | | +--rw name string
| | | +--rw (host-key-type)
| | | +--:(public-key)
| | | | +--rw public-key
| | | | +--rw algorithm?
| | | | | identityref
| | | | +--rw private-key?
| | | | | union
| | | | +--rw public-key?
| | | | | binary
| | | | +---x generate-private-key\
| | | | +---w input [Note: '\' line wrapping for formatting only]
| | | | +---w algorithm
| | | | identityref
| | | +--:(certificate)
| | | +--rw certificate
| | | {sshcom:ssh-x509-cert\
s}?
| | | +--rw algorithm?
| | | | identityref
| | | +--rw private-key?
| | | | union
| | | +--rw public-key?
| | | | binary
| | | +---x generate-private-key\
| | | | +---w input
| | | | +---w algorithm
| | | | identityref
| | | +--rw certificates
| | | | +--rw certificate* [nam\
e]
| | | | +--rw name strin\
g
| | | | +--rw value? binar\
y
| | | +---x generate-certificate\
-signing-request
| | | +---w input
| | | | +---w subject
| | | | | binary
| | | | +---w attributes?
| | | | binary
| | | +--ro output
| | | +--ro certificate-si\
gning-request
| | | binary
| | +--rw client-cert-auth
| | | {sshcom:ssh-x509-certs}?
| | | +--rw pinned-ca-certs?
| | | | ks:pinned-certificates
| | | +--rw pinned-client-certs?
| | | ks:pinned-certificates
| | +--rw transport-params
| | {ssh-server-transport-params-conf\
ig}?
| | +--rw host-key
| | | +--rw host-key-alg* identityref
| | +--rw key-exchange
| | | +--rw key-exchange-alg* identityr\
ef
| | +--rw encryption
| | | +--rw encryption-alg* identityref\
| | +--rw mac module: ietf-netconf-server
| | | +--rw mac-alg* identityref +--rw netconf-server
| | +--rw compression +--rw listen! {listen}?
| | +--rw compression-alg* identityre\ | +--rw idle-timeout? uint16
f | +--rw endpoint* [name]
| +--:(tls) {tls-call-home}? | +--rw name string
| +--rw tls | +--rw (transport)
| +--rw address inet:host | +--:(ssh) {ssh-listen}?
| +--rw port? inet:port-number\ | | +--rw ssh
| +--rw server-identity | | +--rw address inet:ip-address
| | +--rw algorithm? | | +--rw port? inet:port-number
| | | identityref | | +--rw server-identity
| | +--rw private-key? | | | +--rw host-key* [name]
| | | union | | | +--rw name string
| | +--rw public-key? | | | +--rw (host-key-type)
| | | binary | | | +--:(public-key)
| | +---x generate-private-key | | | | +--rw public-key
| | | +---w input | | | | +--rw (local-or-keystore)
| | | +---w algorithm identityref | | | | +--:(local)
| | +--rw certificates | | | | | +--rw algorithm
| | | +--rw certificate* [name] | | | | | | ct:key-algorithm-re\
| | | +--rw name string f
| | | +--rw value? binary | | | | | +--rw public-key binary\
| | +---x generate-certificate-signing-req\
uest
| | +---w input
| | | +---w subject binary
| | | +---w attributes? binary
| | +--ro output
| | +--ro certificate-signing-reques\
t
| | binary
| +--rw client-auth
| | +--rw pinned-ca-certs?
| | | ks:pinned-certificates
| | +--rw pinned-client-certs?
| | | ks:pinned-certificates
| | +--rw cert-maps
| | +--rw cert-to-name* [id]
| | +--rw id uint32
| | +--rw fingerprint
| | | x509c2n:tls-fingerprint
| | +--rw map-type identityref\
| | +--rw name string | | | | | +--rw private-key union
| +--rw hello-params | | | | +--:(keystore)
| {tls-server-hello-params-config}?\ | | | | {keystore-implemented\
}?
| | | | +--rw reference
| | | | ks:asymmetric-key-r\
ef
| | | +--:(certificate)
| | | +--rw certificate
| | | {sshcmn:ssh-x509-certs}?
| | | +--rw (local-or-keystore)
| | | +--:(local)
| | | | +--rw algorithm
| | | | | ct:key-algorithm-re\
f
| | | | +--rw public-key
| | | | | binary
| | | | +--rw private-key
| | | | | union
| | | | +--rw cert
| | | | | ct:end-entity-cert-\
cms
| | | | +---n certificate-expiratio\
n
| | | | +-- expiration-date?
| | | | yang:date-and-ti\
me
| | | +--:(keystore)
| | | {keystore-implemented\
}?
| | | +--rw reference
| | | ks:asymmetric-key-c\
ertificate-ref
| | +--rw client-cert-auth {sshcmn:ssh-x509-certs}?
| | | +--rw pinned-ca-certs?
| | | | ta:pinned-certificates-ref
| | | +--rw pinned-client-certs?
| | | ta:pinned-certificates-ref
| | +--rw transport-params
| | {ssh-server-transport-params-config}?
| | +--rw host-key
| | | +--rw host-key-alg* identityref
| | +--rw key-exchange
| | | +--rw key-exchange-alg* identityref
| | +--rw encryption
| | | +--rw encryption-alg* identityref
| | +--rw mac
| | +--rw mac-alg* identityref
| +--:(tls) {tls-listen}?
| +--rw tls
| +--rw address inet:ip-address
| +--rw port? inet:port-number
| +--rw server-identity
| | +--rw (local-or-keystore)
| | +--:(local)
| | | +--rw algorithm
| | | | ct:key-algorithm-ref
| | | +--rw public-key binary
| | | +--rw private-key union
| | | +--rw cert
| | | | ct:end-entity-cert-cms
| | | +---n certificate-expiration
| | | +-- expiration-date?
| | | yang:date-and-time
| | +--:(keystore) {keystore-implemented}?
| | +--rw reference
| | ks:asymmetric-key-certificate-r\
ef
| +--rw client-auth
| | +--rw pinned-ca-certs?
| | | ta:pinned-certificates-ref
| | +--rw pinned-client-certs?
| | | ta:pinned-certificates-ref
| | +--rw cert-maps
| | +--rw cert-to-name* [id]
| | +--rw id uint32
| | +--rw fingerprint
| | | x509c2n:tls-fingerprint
| | +--rw map-type identityref
| | +--rw name string
| +--rw hello-params
| {tls-server-hello-params-config}?
| +--rw tls-versions
| | +--rw tls-version* identityref
| +--rw cipher-suites
| +--rw cipher-suite* identityref
+--rw call-home! {call-home}?
+--rw netconf-client* [name]
+--rw name string
+--rw endpoints
| +--rw endpoint* [name]
| +--rw name string
| +--rw (transport)
| +--:(ssh) {ssh-call-home}?
| | +--rw ssh
| | +--rw address inet:host
| | +--rw port? inet:port-number\
| +--rw tls-versions | | +--rw server-identity
| | +--rw tls-version* identityref | | | +--rw host-key* [name]
| +--rw cipher-suites | | | +--rw name string
| +--rw cipher-suite* identityref | | | +--rw (host-key-type)
+--rw connection-type | | | +--:(public-key)
| +--rw (connection-type)? | | | | +--rw public-key
| +--:(persistent-connection) | | | | +--rw (local-or-keystore)
| | +--rw persistent! | | | | +--:(local)
| | +--rw idle-timeout? uint32 | | | | | +--rw algorithm
| | +--rw keep-alives | | | | | | ct:key-algori\
| | +--rw max-wait? uint16 thm-ref
| | +--rw max-attempts? uint8 | | | | | +--rw public-key
| +--:(periodic-connection) | | | | | | binary
| +--rw periodic! | | | | | +--rw private-key
| +--rw idle-timeout? uint16 | | | | | union
| +--rw reconnect-timeout? uint16 | | | | +--:(keystore)
+--rw reconnect-strategy | | | | {keystore-imple\
+--rw start-with? enumeration mented}?
+--rw max-attempts? uint8 | | | | +--rw reference
| | | | ks:asymmetric\
-key-ref
| | | +--:(certificate)
| | | +--rw certificate
| | | {sshcmn:ssh-x509-certs\
}?
| | | +--rw (local-or-keystore)
| | | +--:(local)
| | | | +--rw algorithm
| | | | | ct:key-algori\
thm-ref
| | | | +--rw public-key
| | | | | binary
| | | | +--rw private-key
| | | | | union
| | | | +--rw cert
| | | | | ct:end-entity\
-cert-cms
| | | | +---n certificate-exp\
iration
| | | | +-- expiration-dat\
e?
| | | | yang:date-\
and-time
| | | +--:(keystore)
| | | {keystore-imple\
mented}?
| | | +--rw reference
| | | ks:asymmetric\
-key-certificate-ref
| | +--rw client-cert-auth
| | | {sshcmn:ssh-x509-certs}?
| | | +--rw pinned-ca-certs?
| | | | ta:pinned-certificates-ref
| | | +--rw pinned-client-certs?
| | | ta:pinned-certificates-ref
| | +--rw transport-params
| | {ssh-server-transport-params-confi\
g}?
| | +--rw host-key
| | | +--rw host-key-alg* identityref
| | +--rw key-exchange
| | | +--rw key-exchange-alg* identityre\
f
| | +--rw encryption
| | | +--rw encryption-alg* identityref
| | +--rw mac
| | +--rw mac-alg* identityref
| +--:(tls) {tls-call-home}?
| +--rw tls
| +--rw address inet:host
| +--rw port? inet:port-number
| +--rw server-identity
| | +--rw (local-or-keystore)
| | +--:(local)
| | | +--rw algorithm
| | | | ct:key-algorithm-ref
| | | +--rw public-key
| | | | binary
| | | +--rw private-key
| | | | union
| | | +--rw cert
| | | | ct:end-entity-cert-cms
| | | +---n certificate-expiration
| | | +-- expiration-date?
| | | yang:date-and-time
| | +--:(keystore) {keystore-implemented\
}?
| | +--rw reference
| | ks:asymmetric-key-certifi\
cate-ref
| +--rw client-auth
| | +--rw pinned-ca-certs?
| | | ta:pinned-certificates-ref
| | +--rw pinned-client-certs?
| | | ta:pinned-certificates-ref
| | +--rw cert-maps
| | +--rw cert-to-name* [id]
| | +--rw id uint32
| | +--rw fingerprint
| | | x509c2n:tls-fingerprint
| | +--rw map-type identityref
| | +--rw name string
| +--rw hello-params
| {tls-server-hello-params-config}?
| +--rw tls-versions
| | +--rw tls-version* identityref
| +--rw cipher-suites
| +--rw cipher-suite* identityref
+--rw connection-type
| +--rw (connection-type)?
| +--:(persistent-connection)
| | +--rw persistent!
| | +--rw idle-timeout? uint32
| | +--rw keep-alives
| | +--rw max-wait? uint16
| | +--rw max-attempts? uint8
| +--:(periodic-connection)
| +--rw periodic!
| +--rw idle-timeout? uint16
| +--rw reconnect-timeout? uint16
+--rw reconnect-strategy
+--rw start-with? enumeration
+--rw max-attempts? uint8
4.2. Example Usage 4.2. Example Usage
The following example illustrates configuring a NETCONF server to The following example illustrates configuring a NETCONF server to
listen for NETCONF client connections using both the SSH and TLS listen for NETCONF client connections using both the SSH and TLS
transport protocols, as well as configuring call-home to two NETCONF transport protocols, as well as configuring call-home to two NETCONF
clients, one using SSH and the other using TLS. clients, one using SSH and the other using TLS.
This example is consistent with the examples presented in Section 2.2 This example is consistent with the examples presented in Section 2.2
of [I-D.ietf-netconf-keystore]. of [I-D.ietf-netconf-keystore].
[ note: '\' line wrapping for formatting only] [Note: '\' line wrapping for formatting only]
<netconf-server
xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-server"
xmlns:x509c2n="urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name">\
<!-- listening for SSH and TLS connections -->
<listen>
<endpoint> <!-- listening for SSH connections -->
<name>netconf/ssh</name>
<ssh>
<address>192.0.2.7</address>
<server-identity>
<host-key>
<name>deployment-specific-certificate</name>
<public-key>
<algorithm xmlns:ks="urn:ietf:params:xml:ns:yang:ietf-k\
eystore">ks:secp521r1</algorithm>
<private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key>
</public-key>
</host-key>
</server-identity>
<client-cert-auth>
<pinned-ca-certs>deployment-specific-ca-certs</pinned-ca-ce\
rts>
<pinned-client-certs>explicitly-trusted-client-certs</pinne\
d-client-certs>
</client-cert-auth>
</ssh>
</endpoint>
<endpoint> <!-- listening for TLS sessions -->
<name>netconf/tls</name>
<tls>
<address>192.0.2.7</address>
<server-identity>
<algorithm xmlns:ks="urn:ietf:params:xml:ns:yang:ietf-keyst\
ore">ks:secp521r1</algorithm>
<private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key>
<certificates>
<certificate>
<name>domain certificate</name>
<value>base64encodedvalue==</value>
</certificate>
</certificates>
</server-identity>
<client-auth>
<pinned-ca-certs>deployment-specific-ca-certs</pinned-ca-ce\
rts>
<pinned-client-certs>explicitly-trusted-client-certs</pinne\
d-client-certs>
<cert-maps>
<cert-to-name>
<id>1</id>
<fingerprint>11:0A:05:11:00</fingerprint>
<map-type>x509c2n:san-any</map-type>
</cert-to-name>
<cert-to-name>
<id>2</id>
<fingerprint>B3:4F:A1:8C:54</fingerprint>
<map-type>x509c2n:specified</map-type>
<name>scooby-doo</name>
</cert-to-name>
</cert-maps>
</client-auth>
</tls>
</endpoint>
</listen>
<!-- calling home to an SSH and TLS based NETCONF clients -->
<call-home>
<netconf-client> <!-- SSH-based client -->
<name>config-mgr</name>
<endpoints>
<endpoint>
<name>east-data-center</name>
<ssh>
<address>east.config-mgr.example.com</address>
<server-identity>
<host-key>
<name>deployment-specific-certificate</name>
<public-key>
<algorithm xmlns:ks="urn:ietf:params:xml:ns:yang:ie\
tf-keystore">ks:secp521r1</algorithm>
<private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key>
</public-key>
</host-key>
</server-identity>
<client-cert-auth>
<pinned-ca-certs>deployment-specific-ca-certs</pinned-c\
a-certs>
<pinned-client-certs>explicitly-trusted-client-certs</p\
inned-client-certs>
</client-cert-auth>
</ssh>
</endpoint>
<endpoint>
<name>west-data-center</name>
<ssh>
<address>west.config-mgr.example.com</address>
<server-identity>
<host-key>
<name>deployment-specific-certificate</name>
<public-key>
<algorithm xmlns:ks="urn:ietf:params:xml:ns:yang:ie\
tf-keystore">ks:secp521r1</algorithm>
<private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key>
</public-key>
</host-key>
</server-identity>
<client-cert-auth>
<pinned-ca-certs>deployment-specific-ca-certs</pinned-c\
a-certs>
<pinned-client-certs>explicitly-trusted-client-certs</p\
inned-client-certs>
</client-cert-auth>
</ssh>
</endpoint>
</endpoints> <netconf-server
<connection-type> xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-server"
<periodic> xmlns:x509c2n="urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name"\
<idle-timeout>300</idle-timeout> >
<reconnect-timeout>60</reconnect-timeout>
</periodic>
</connection-type>
<reconnect-strategy>
<start-with>last-connected</start-with>
<max-attempts>3</max-attempts>
</reconnect-strategy>
</netconf-client>
<netconf-client> <!-- TLS-based client -->
<name>data-collector</name>
<endpoints>
<endpoint>
<name>east-data-center</name>
<tls>
<address>east.analytics.example.com</address>
<server-identity>
<algorithm xmlns:ks="urn:ietf:params:xml:ns:yang:ietf-k\
eystore">ks:secp521r1</algorithm>
<private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key>
<certificates>
<certificate>
<name>domain certificate</name>
<value>base64encodedvalue==</value>
</certificate>
</certificates>
</server-identity>
<client-auth>
<pinned-ca-certs>deployment-specific-ca-certs</pinned-c\
a-certs>
<pinned-client-certs>explicitly-trusted-client-certs</p\
inned-client-certs>
<cert-maps>
<cert-to-name>
<id>1</id>
<fingerprint>11:0A:05:11:00</fingerprint>
<map-type>x509c2n:san-any</map-type>
</cert-to-name>
<cert-to-name>
<id>2</id>
<fingerprint>B3:4F:A1:8C:54</fingerprint>
<map-type>x509c2n:specified</map-type>
<name>scooby-doo</name>
</cert-to-name>
</cert-maps> <!-- endpoints to listen for NETCONF connections on -->
</client-auth> <listen>
</tls> <endpoint> <!-- listening for SSH connections -->
</endpoint> <name>netconf/ssh</name>
<endpoint> <ssh>
<name>west-data-center</name> <address>192.0.2.7</address>
<tls> <server-identity>
<address>west.analytics.example.com</address> <host-key>
<server-identity> <name>deployment-specific-certificate</name>
<algorithm xmlns:ks="urn:ietf:params:xml:ns:yang:ietf-k\ <public-key>
eystore">ks:secp521r1</algorithm> <algorithm xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-\
<private-key>base64encodedvalue==</private-key> crypto-types">ct:secp521r1</algorithm>
<public-key>base64encodedvalue==</public-key> <private-key>base64encodedvalue==</private-key>
<certificates> <public-key>base64encodedvalue==</public-key>
<certificate> </public-key>
<name>domain certificate</name> </host-key>
<value>base64encodedvalue==</value> </server-identity>
</certificate> <client-cert-auth>
</certificates> <pinned-ca-certs>explicitly-trusted-client-ca-certs</pinne\
</server-identity> d-ca-certs>
<client-auth> <pinned-client-certs>explicitly-trusted-client-certs</pinn\
<pinned-ca-certs>deployment-specific-ca-certs</pinned-c\ ed-client-certs>
a-certs> </client-cert-auth>
<pinned-client-certs>explicitly-trusted-client-certs</p\ </ssh>
inned-client-certs> </endpoint>
<cert-maps> <endpoint> <!-- listening for TLS sessions -->
<cert-to-name> <name>netconf/tls</name>
<id>1</id> <tls>
<fingerprint>11:0A:05:11:00</fingerprint> <address>192.0.2.7</address>
<map-type>x509c2n:san-any</map-type> <server-identity>
</cert-to-name> <algorithm xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-cryp\
<cert-to-name> to-types">ct:secp521r1</algorithm>
<id>2</id> <private-key>base64encodedvalue==</private-key>
<fingerprint>B3:4F:A1:8C:54</fingerprint> <public-key>base64encodedvalue==</public-key>
<map-type>x509c2n:specified</map-type> <cert>base64encodedvalue==</cert>
<name>scooby-doo</name> </server-identity>
</cert-to-name> <client-auth>
</cert-maps> <pinned-ca-certs>explicitly-trusted-client-ca-certs</pinne\
</client-auth> d-ca-certs>
</tls> <pinned-client-certs>explicitly-trusted-client-certs</pinn\
</endpoint> ed-client-certs>
</endpoints> <cert-maps>
<connection-type> <cert-to-name>
<persistent> <id>1</id>
<idle-timeout>300</idle-timeout> <fingerprint>11:0A:05:11:00</fingerprint>
<keep-alives> <map-type>x509c2n:san-any</map-type>
<max-wait>30</max-wait> </cert-to-name>
<max-attempts>3</max-attempts> <cert-to-name>
<id>2</id>
<fingerprint>B3:4F:A1:8C:54</fingerprint>
<map-type>x509c2n:specified</map-type>
<name>scooby-doo</name>
</cert-to-name>
</cert-maps>
</client-auth>
</tls>
</endpoint>
</listen>
</keep-alives> <!-- calling home to SSH and TLS based NETCONF clients -->
</persistent> <call-home>
</connection-type> <netconf-client> <!-- SSH-based client -->
<reconnect-strategy> <name>config-mgr</name>
<start-with>first-listed</start-with> <endpoints>
<max-attempts>3</max-attempts> <endpoint>
</reconnect-strategy> <name>east-data-center</name>
</netconf-client> <ssh>
</call-home> <address>east.config-mgr.example.com</address>
</netconf-server> <server-identity>
<host-key>
<name>deployment-specific-certificate</name>
<public-key>
<algorithm xmlns:ct="urn:ietf:params:xml:ns:yang:i\
etf-crypto-types">ct:secp521r1</algorithm>
<private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key>
</public-key>
</host-key>
</server-identity>
<client-cert-auth>
<pinned-ca-certs>explicitly-trusted-client-ca-certs</p\
inned-ca-certs>
<pinned-client-certs>explicitly-trusted-client-certs</\
pinned-client-certs>
</client-cert-auth>
</ssh>
</endpoint>
<endpoint>
<name>west-data-center</name>
<ssh>
<address>west.config-mgr.example.com</address>
<server-identity>
<host-key>
<name>deployment-specific-certificate</name>
<public-key>
<algorithm xmlns:ct="urn:ietf:params:xml:ns:yang:i\
etf-crypto-types">ct:secp521r1</algorithm>
<private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key>
</public-key>
</host-key>
</server-identity>
<client-cert-auth>
<pinned-ca-certs>explicitly-trusted-client-ca-certs</p\
inned-ca-certs>
<pinned-client-certs>explicitly-trusted-client-certs</\
pinned-client-certs>
</client-cert-auth>
</ssh>
</endpoint>
</endpoints>
<connection-type>
<periodic>
<idle-timeout>300</idle-timeout>
<reconnect-timeout>60</reconnect-timeout>
</periodic>
</connection-type>
<reconnect-strategy>
<start-with>last-connected</start-with>
<max-attempts>3</max-attempts>
</reconnect-strategy>
</netconf-client>
<netconf-client> <!-- TLS-based client -->
<name>data-collector</name>
<endpoints>
<endpoint>
<name>east-data-center</name>
<tls>
<address>east.analytics.example.com</address>
<server-identity>
<algorithm xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-\
crypto-types">ct:secp521r1</algorithm>
<private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key>
<cert>base64encodedvalue==</cert>
</server-identity>
<client-auth>
<pinned-ca-certs>explicitly-trusted-client-ca-certs</p\
inned-ca-certs>
<pinned-client-certs>explicitly-trusted-client-certs</\
pinned-client-certs>
<cert-maps>
<cert-to-name>
<id>1</id>
<fingerprint>11:0A:05:11:00</fingerprint>
<map-type>x509c2n:san-any</map-type>
</cert-to-name>
<cert-to-name>
<id>2</id>
<fingerprint>B3:4F:A1:8C:54</fingerprint>
<map-type>x509c2n:specified</map-type>
<name>scooby-doo</name>
</cert-to-name>
</cert-maps>
</client-auth>
</tls>
</endpoint>
<endpoint>
<name>west-data-center</name>
<tls>
<address>west.analytics.example.com</address>
<server-identity>
<algorithm xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-\
crypto-types">ct:secp521r1</algorithm>
<private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key>
<cert>base64encodedvalue==</cert>
</server-identity>
<client-auth>
<pinned-ca-certs>explicitly-trusted-client-ca-certs</p\
inned-ca-certs>
<pinned-client-certs>explicitly-trusted-client-certs</\
pinned-client-certs>
<cert-maps>
<cert-to-name>
<id>1</id>
<fingerprint>11:0A:05:11:00</fingerprint>
<map-type>x509c2n:san-any</map-type>
</cert-to-name>
<cert-to-name>
<id>2</id>
<fingerprint>B3:4F:A1:8C:54</fingerprint>
<map-type>x509c2n:specified</map-type>
<name>scooby-doo</name>
</cert-to-name>
</cert-maps>
</client-auth>
</tls>
</endpoint>
</endpoints>
<connection-type>
<persistent>
<idle-timeout>300</idle-timeout>
<keep-alives>
<max-wait>30</max-wait>
<max-attempts>3</max-attempts>
</keep-alives>
</persistent>
</connection-type>
<reconnect-strategy>
<start-with>first-listed</start-with>
<max-attempts>3</max-attempts>
</reconnect-strategy>
</netconf-client>
</call-home>
</netconf-server>
4.3. YANG Module 4.3. YANG Module
This YANG module has normative references to [RFC6242], [RFC6991],
[RFC7407], [RFC7589], [RFC8071],
[I-D.ietf-netconf-ssh-client-server], and
[I-D.ietf-netconf-tls-client-server].
This YANG module imports YANG types from [RFC6991], and YANG This YANG module imports YANG types from [RFC6991], and YANG
groupings from [RFC7407], [I-D.ietf-netconf-ssh-client-server] and groupings from [RFC7407], [I-D.ietf-netconf-ssh-client-server] and
[I-D.ietf-netconf-ssh-client-server]. [I-D.ietf-netconf-ssh-client-server].
<CODE BEGINS> file "ietf-netconf-server@2017-10-30.yang" <CODE BEGINS> file "ietf-netconf-server@2018-06-04.yang"
module ietf-netconf-server { module ietf-netconf-server {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-server";
prefix "ncs";
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types";
}
import ietf-x509-cert-to-name {
prefix x509c2n;
reference
"RFC 7407: A YANG Data Model for SNMP Configuration";
}
import ietf-ssh-server { namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-server";
prefix ss; prefix "ncs";
revision-date 2017-10-30; // stable grouping definitions
reference
"RFC YYYY: YANG Groupings for SSH Clients and SSH Servers";
}
import ietf-tls-server { import ietf-inet-types {
prefix ts; prefix inet;
revision-date 2017-10-30; // stable grouping definitions reference
reference "RFC 6991: Common YANG Data Types";
"RFC ZZZZ: YANG Groupings for TLS Clients and TLS Servers"; }
} import ietf-x509-cert-to-name {
prefix x509c2n;
reference
"RFC 7407: A YANG Data Model for SNMP Configuration";
}
organization import ietf-ssh-server {
"IETF NETCONF (Network Configuration) Working Group"; prefix ss;
revision-date 2018-06-04; // stable grouping definitions
reference
"RFC YYYY: YANG Groupings for SSH Clients and SSH Servers";
}
contact import ietf-tls-server {
"WG Web: <http://tools.ietf.org/wg/netconf/> prefix ts;
WG List: <mailto:netconf@ietf.org> revision-date 2018-06-04; // stable grouping definitions
reference
"RFC ZZZZ: YANG Groupings for TLS Clients and TLS Servers";
}
Author: Kent Watsen organization
<mailto:kwatsen@juniper.net> "IETF NETCONF (Network Configuration) Working Group";
Author: Gary Wu contact
<mailto:garywu@cisco.com> "WG Web: <http://datatracker.ietf.org/wg/netconf/>
WG List: <mailto:netconf@ietf.org>
Author: Juergen Schoenwaelder Author: Kent Watsen
<mailto:j.schoenwaelder@jacobs-university.de>"; <mailto:kwatsen@juniper.net>
description Author: Gary Wu
"This module contains a collection of YANG definitions for <mailto:garywu@cisco.com>
configuring NETCONF servers.
Copyright (c) 2017 IETF Trust and the persons identified as Author: Juergen Schoenwaelder
authors of the code. All rights reserved. <mailto:j.schoenwaelder@jacobs-university.de>";
Redistribution and use in source and binary forms, with or description
without modification, is permitted pursuant to, and subject "This module contains a collection of YANG definitions for
to the license terms contained in, the Simplified BSD configuring NETCONF servers.
License set forth in Section 4.c of the IETF Trust's
Legal Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see Copyright (c) 2017 IETF Trust and the persons identified as
the RFC itself for full legal notices."; authors of the code. All rights reserved.
revision "2017-10-30" { Redistribution and use in source and binary forms, with or
description without modification, is permitted pursuant to, and subject
"Initial version"; to the license terms contained in, the Simplified BSD
reference License set forth in Section 4.c of the IETF Trust's
"RFC XXXX: NETCONF Client and Server Models"; Legal Provisions Relating to IETF Documents
} (http://trustee.ietf.org/license-info).
// Features This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices.";
feature listen { revision "2018-06-04" {
description description
"The 'listen' feature indicates that the NETCONF server "Initial version";
supports opening a port to accept NETCONF client connections reference
using at least one transport (e.g., SSH, TLS, etc.)."; "RFC XXXX: NETCONF Client and Server Models";
} }
feature ssh-listen { // Features
description
"The 'ssh-listen' feature indicates that the NETCONF server
supports opening a port to accept NETCONF over SSH
client connections.";
reference
"RFC 6242: Using the NETCONF Protocol over Secure Shell (SSH)";
}
feature tls-listen { feature listen {
description description
"The 'tls-listen' feature indicates that the NETCONF server "The 'listen' feature indicates that the NETCONF server
supports opening a port to accept NETCONF over TLS supports opening a port to accept NETCONF client connections
client connections."; using at least one transport (e.g., SSH, TLS, etc.).";
reference }
"RFC 7589: Using the NETCONF Protocol over Transport
Layer Security (TLS) with Mutual X.509
Authentication";
}
feature call-home { feature ssh-listen {
description description
"The 'call-home' feature indicates that the NETCONF server "The 'ssh-listen' feature indicates that the NETCONF server
supports initiating NETCONF call home connections to NETCONF supports opening a port to accept NETCONF over SSH
clients using at least one transport (e.g., SSH, TLS, etc.)."; client connections.";
reference reference
"RFC 8071: NETCONF Call Home and RESTCONF Call Home"; "RFC 6242:
} Using the NETCONF Protocol over Secure Shell (SSH)";
}
feature ssh-call-home { feature tls-listen {
description description
"The 'ssh-call-home' feature indicates that the NETCONF "The 'tls-listen' feature indicates that the NETCONF server
server supports initiating a NETCONF over SSH call supports opening a port to accept NETCONF over TLS
home connection to NETCONF clients."; client connections.";
reference reference
"RFC 8071: NETCONF Call Home and RESTCONF Call Home"; "RFC 7589: Using the NETCONF Protocol over Transport
} Layer Security (TLS) with Mutual X.509
Authentication";
}
feature tls-call-home { feature call-home {
description description
"The 'tls-call-home' feature indicates that the NETCONF "The 'call-home' feature indicates that the NETCONF server
server supports initiating a NETCONF over TLS call supports initiating NETCONF call home connections to
home connection to NETCONF clients."; NETCONF clients using at least one transport (e.g., SSH,
TLS, etc.).";
reference
"RFC 8071: NETCONF Call Home and RESTCONF Call Home";
}
reference feature ssh-call-home {
"RFC 8071: NETCONF Call Home and RESTCONF Call Home"; description
} "The 'ssh-call-home' feature indicates that the NETCONF
server supports initiating a NETCONF over SSH call
home connection to NETCONF clients.";
reference
"RFC 8071: NETCONF Call Home and RESTCONF Call Home";
}
container netconf-server { feature tls-call-home {
uses netconf-server; description
description "The 'tls-call-home' feature indicates that the NETCONF
"Top-level container for NETCONF server configuration."; server supports initiating a NETCONF over TLS call
} home connection to NETCONF clients.";
reference
"RFC 8071: NETCONF Call Home and RESTCONF Call Home";
}
container netconf-server {
uses netconf-server;
description
"Top-level container for NETCONF server configuration.";
}
grouping netconf-server { grouping netconf-server {
description
"Top-level grouping for NETCONF server configuration.";
container listen {
if-feature listen;
description description
"Configures listen behavior"; "Top-level grouping for NETCONF server configuration.";
leaf idle-timeout { container listen {
type uint16; if-feature listen;
units "seconds"; presence "Enables server to listen for TCP connections";
default 3600; // one hour description "Configures listen behavior";
description leaf idle-timeout {
"Specifies the maximum number of seconds that a NETCONF type uint16;
session may remain idle. A NETCONF session will be dropped units "seconds";
if it is idle for an interval longer than this number of default 3600; // one hour
seconds. If set to zero, then the server will never drop
a session because it is idle. Sessions that have a
notification subscription active are never dropped.";
}
list endpoint {
key name;
min-elements 1;
description
"List of endpoints to listen for NETCONF connections.";
leaf name {
type string;
description description
"An arbitrary name for the NETCONF listen endpoint."; "Specifies the maximum number of seconds that a NETCONF
session may remain idle. A NETCONF session will be
dropped if it is idle for an interval longer than this
number of seconds. If set to zero, then the server
will never drop a session because it is idle. Sessions
that have a notification subscription active are never
dropped.";
} }
choice transport { list endpoint {
mandatory true; key name;
min-elements 1;
description description
"Selects between available transports."; "List of endpoints to listen for NETCONF connections.";
case ssh { leaf name {
if-feature ssh-listen; type string;
container ssh { description
description "An arbitrary name for the NETCONF listen endpoint.";
"SSH-specific listening configuration for inbound
connections.";
leaf address {
type inet:ip-address;
mandatory true;
description
"The IP address to listen on for incoming
connections. The NETCONF server will listen
on all configured interfaces if no value is
specified. INADDR_ANY (0.0.0.0) or INADDR6_ANY
(0:0:0:0:0:0:0:0 a.k.a. ::) MUST be used when
the server is to listen on all IPv4 or IPv6
addresses, respectively.";
}
leaf port {
type inet:port-number;
default 830;
description
"The local port number to listen on. If no value
is specified, the IANA-assigned port value for
'netconf-ssh' (830) is used.";
}
uses ss:ssh-server-grouping;
}
} }
case tls { choice transport {
if-feature tls-listen; mandatory true;
container tls { description
description "Selects between available transports.";
"TLS-specific listening configuration for inbound case ssh {
connections."; if-feature ssh-listen;
leaf address { container ssh {
type inet:ip-address;
mandatory true;
description description
"The IP address to listen on for incoming "SSH-specific listening configuration for inbound
connections. The NETCONF server will listen connections.";
on all configured interfaces if no value is leaf address {
specified. INADDR_ANY (0.0.0.0) or INADDR6_ANY type inet:ip-address;
(0:0:0:0:0:0:0:0 a.k.a. ::) MUST be used when mandatory true;
the server is to listen on all IPv4 or IPv6 description
addresses, respectively."; "The IP address to listen on for incoming
connections. The NETCONF server will listen
on all configured interfaces if no value is
specified. INADDR_ANY (0.0.0.0) or INADDR6_ANY
(0:0:0:0:0:0:0:0 a.k.a. ::) MUST be used when
the server is to listen on all IPv4 or IPv6
addresses, respectively.";
}
leaf port {
type inet:port-number;
default 830;
description
"The local port number to listen on. If no value
is specified, the IANA-assigned port value for
'netconf-ssh' (830) is used.";
}
uses ss:ssh-server-grouping;
} }
leaf port { }
type inet:port-number; case tls {
default 6513; if-feature tls-listen;
container tls {
description description
"The local port number to listen on. If no value "TLS-specific listening configuration for inbound
is specified, the IANA-assigned port value for connections.";
'netconf-tls' (6513) is used."; leaf address {
} type inet:ip-address;
uses ts:tls-server-grouping { mandatory true;
refine "client-auth" {
must 'pinned-ca-certs or pinned-client-certs';
description description
"NETCONF/TLS servers MUST validate client "The IP address to listen on for incoming
certiticates."; connections. The NETCONF server will listen
on all configured interfaces if no value is
specified. INADDR_ANY (0.0.0.0) or INADDR6_ANY
(0:0:0:0:0:0:0:0 a.k.a. ::) MUST be used when
the server is to listen on all IPv4 or IPv6
addresses, respectively.";
} }
augment "client-auth" { leaf port {
type inet:port-number;
default 6513;
description description
"Augments in the cert-to-name structure."; "The local port number to listen on. If no value
container cert-maps { is specified, the IANA-assigned port value for
uses x509c2n:cert-to-name; 'netconf-tls' (6513) is used.";
}
uses ts:tls-server-grouping {
refine "client-auth" {
must 'pinned-ca-certs or pinned-client-certs';
description description
"The cert-maps container is used by a TLS-based "NETCONF/TLS servers MUST validate client
NETCONF server to map the NETCONF client's certiticates.";
presented X.509 certificate to a NETCONF }
username. If no matching and valid cert-to-name augment "client-auth" {
list entry can be found, then the NETCONF server description
MUST close the connection, and MUST NOT accept "Augments in the cert-to-name structure.";
NETCONF messages over it."; container cert-maps {
reference uses x509c2n:cert-to-name;
"RFC WWWW: NETCONF over TLS, Section 7"; description
"The cert-maps container is used by a TLS-
based NETCONF server to map the NETCONF
client's presented X.509 certificate to a
NETCONF username. If no matching and valid
cert-to-name list entry can be found, then
the NETCONF server MUST close the connection,
and MUST NOT accept NETCONF messages over
it.";
reference
"RFC WWWW: NETCONF over TLS, Section 7";
}
} }
} }
} }
} }
} }
} }
} }
}
container call-home { container call-home {
if-feature call-home; if-feature call-home;
description presence "Enables server to initiate TCP connections";
"Configures call-home behavior"; description "Configures call-home behavior";
list netconf-client { list netconf-client {
key name; key name;
min-elements 1; min-elements 1;
description
"List of NETCONF clients the NETCONF server is to initiate
call-home connections to in parallel.";
leaf name {
type string;
description
"An arbitrary name for the remote NETCONF client.";
}
container endpoints {
description description
"Container for the list of endpoints."; "List of NETCONF clients the NETCONF server is to
list endpoint { initiate call-home connections to in parallel.";
key name; leaf name {
min-elements 1; type string;
ordered-by user;
description description
"A non-empty user-ordered list of endpoints for this "An arbitrary name for the remote NETCONF client.";
NETCONF server to try to connect to in sequence. }
Defining more than one enables high-availability."; container endpoints {
leaf name { description
type string; "Container for the list of endpoints.";
description list endpoint {
"An arbitrary name for this endpoint."; key name;
} min-elements 1;
choice transport { ordered-by user;
mandatory true;
description description
"Selects between available transports."; "A non-empty user-ordered list of endpoints for this
case ssh { NETCONF server to try to connect to in sequence.
if-feature ssh-call-home; Defining more than one enables high-availability.";
container ssh { leaf name {
description type string;
"Specifies SSH-specific call-home transport description
configuration."; "An arbitrary name for this endpoint.";
leaf address {
type inet:host;
mandatory true;
description
"The IP address or hostname of the endpoint.
If a domain name is configured, then the DNS
resolution should happen on each usage attempt.
If the the DNS resolution results in multiple
IP addresses, the IP addresses will be tried
according to local preference order until a
connection has been established or until all
IP addresses have failed.";
}
leaf port {
type inet:port-number;
default 4334;
description
"The IP port for this endpoint. The NETCONF
server will use the IANA-assigned well-known
port for 'netconf-ch-ssh' (4334) if no value
is specified.";
}
uses ss:ssh-server-grouping;
}
} }
case tls { choice transport {
if-feature tls-call-home; mandatory true;
container tls { description
description "Selects between available transports.";
"Specifies TLS-specific call-home transport case ssh {
configuration."; if-feature ssh-call-home;
leaf address { container ssh {
type inet:host;
mandatory true;
description description
"The IP address or hostname of the endpoint. "Specifies SSH-specific call-home transport
If a domain name is configured, then the DNS configuration.";
resolution should happen on each usage attempt. leaf address {
If the the DNS resolution results in multiple type inet:host;
IP addresses, the IP addresses will be tried mandatory true;
according to local preference order until a description
connection has been established or until all "The IP address or hostname of the endpoint.
IP addresses have failed."; If a domain name is configured, then the
DNS resolution should happen on each usage
attempt. If the the DNS resolution results
in multiple IP addresses, the IP addresses
will be tried according to local preference
order until a connection has been established
or until all IP addresses have failed.";
}
leaf port {
type inet:port-number;
default 4334;
description
"The IP port for this endpoint. The NETCONF
server will use the IANA-assigned well-known
port for 'netconf-ch-ssh' (4334) if no value
is specified.";
}
uses ss:ssh-server-grouping;
} }
leaf port {
type inet:port-number; }
default 4335; case tls {
if-feature tls-call-home;
container tls {
description description
"The IP port for this endpoint. The NETCONF "Specifies TLS-specific call-home transport
server will use the IANA-assigned well-known configuration.";
port for 'netconf-ch-tls' (4335) if no value leaf address {
is specified."; type inet:host;
} mandatory true;
uses ts:tls-server-grouping {
refine "client-auth" {
must 'pinned-ca-certs or pinned-client-certs';
description description
"NETCONF/TLS servers MUST validate client "The IP address or hostname of the endpoint.
certiticates."; If a domain name is configured, then the
DNS resolution should happen on each usage
attempt. If the the DNS resolution results
in multiple IP addresses, the IP addresses
will be tried according to local preference
order until a connection has been established
or until all IP addresses have failed.";
} }
augment "client-auth" { leaf port {
type inet:port-number;
default 4335;
description description
"Augments in the cert-to-name structure."; "The IP port for this endpoint. The NETCONF
container cert-maps { server will use the IANA-assigned well-known
uses x509c2n:cert-to-name; port for 'netconf-ch-tls' (4335) if no value
is specified.";
}
uses ts:tls-server-grouping {
refine "client-auth" {
must 'pinned-ca-certs or pinned-client-certs';
description
"NETCONF/TLS servers MUST validate client
certiticates.";
}
augment "client-auth" {
description description
"The cert-maps container is used by a "Augments in the cert-to-name structure.";
TLS-based NETCONF server to map the NETCONF container cert-maps {
client's presented X.509 certificate to a uses x509c2n:cert-to-name;
NETCONF username. If no matching and valid description
cert-to-name list entry can be found, then "The cert-maps container is used by a
the NETCONF server MUST close the connection, TLS-based NETCONF server to map the
and MUST NOT accept NETCONF messages over NETCONF client's presented X.509
it."; certificate to a NETCONF username. If
reference no matching and valid cert-to-name list
"RFC WWWW: NETCONF over TLS, Section 7"; entry can be found, then the NETCONF
server MUST close the connection, and
MUST NOT accept NETCONF messages over
it.";
reference
"RFC WWWW: NETCONF over TLS, Section 7";
}
} }
} }
} }
} } // end tls
} // end tls } // end choice
} // end choice } // end endpoint
} // end endpoint }
} container connection-type {
container connection-type {
description
"Indicates the kind of connection to use.";
choice connection-type {
description description
"Selects between available connection types."; "Indicates the kind of connection to use.";
case persistent-connection { choice connection-type {
container persistent { default persistent-connection;
presence true; description
description "Selects between available connection types.";
"Maintain a persistent connection to the NETCONF case persistent-connection {
client. If the connection goes down, immediately container persistent {
start trying to reconnect to it, using the presence
reconnection strategy. "Indicates that a persistent connection is to be
maintained.";
This connection type minimizes any NETCONF client
to NETCONF server data-transfer delay, albeit at
the expense of holding resources longer.";
leaf idle-timeout {
type uint32;
units "seconds";
default 86400; // one day;
description description
"Specifies the maximum number of seconds that a "Maintain a persistent connection to the NETCONF
a NETCONF session may remain idle. A NETCONF client. If the connection goes down, immediately
session will be dropped if it is idle for an start trying to reconnect to it, using the
interval longer than this number of seconds. reconnection strategy.
If set to zero, then the server will never drop
a session because it is idle. Sessions that This connection type minimizes any NETCONF client
have a notification subscription active are to NETCONF server data-transfer delay, albeit at
never dropped."; the expense of holding resources longer.";
leaf idle-timeout {
type uint32;
units "seconds";
default 86400; // one day;
description
"Specifies the maximum number of seconds that
a NETCONF session may remain idle. A NETCONF
session will be dropped if it is idle for an
interval longer than this number of seconds.
If set to zero, then the server will never
drop a session because it is idle. Sessions
that have a notification subscription active
are never dropped.";
}
container keep-alives {
description
"Configures the keep-alive policy, to
proactively test the aliveness of the SSH/TLS
client. An unresponsive SSH/TLS client will
be dropped after approximately max-attempts *
max-wait seconds.";
reference
"RFC 8071: NETCONF Call Home and RESTCONF Call
Home, Section 3.1, item S6";
leaf max-wait {
type uint16 {
range "1..max";
}
units seconds;
default 30;
description
"Sets the amount of time in seconds after
which if no data has been received from
the SSH/TLS client, a SSH/TLS-level message
will be sent to test the aliveness of the
SSH/TLS client.";
}
leaf max-attempts {
type uint8;
default 3;
description
"Sets the maximum number of sequential keep-
alive messages that can fail to obtain a
response from the SSH/TLS client before
assuming the SSH/TLS client is no longer
alive.";
}
}
} }
container keep-alives { }
case periodic-connection {
container periodic {
presence
"Indicates that a periodic connection is to be
maintained.";
description description
"Configures the keep-alive policy, to proactively "Periodically connect to the NETCONF client, so
test the aliveness of the SSH/TLS client. An that the NETCONF client may deliver messages
unresponsive SSH/TLS client will be dropped after pending for the NETCONF server. The NETCONF
approximately max-attempts * max-wait seconds."; client must close the connection when it is
reference ready to release it. Once the connection has
"RFC 8071: NETCONF Call Home and RESTCONF Call been closed, the NETCONF server will restart
Home, Section 3.1, item S6"; its timer until the next connection.";
leaf max-wait { leaf idle-timeout {
type uint16;
units "seconds";
default 300; // five minutes
description
"Specifies the maximum number of seconds that
a NETCONF session may remain idle. A NETCONF
session will be dropped if it is idle for an
interval longer than this number of seconds.
If set to zero, then the server will never
drop a session because it is idle. Sessions
that have a notification subscription active
are never dropped.";
}
leaf reconnect-timeout {
type uint16 { type uint16 {
range "1..max"; range "1..max";
} }
units seconds; units minutes;
default 30; default 60;
description
"Sets the amount of time in seconds after which
if no data has been received from the SSH/TLS
client, a SSH/TLS-level message will be sent
to test the aliveness of the SSH/TLS client.";
}
leaf max-attempts {
type uint8;
default 3;
description description
"Sets the maximum number of sequential keep-alive "Sets the maximum amount of unconnected time the
messages that can fail to obtain a response from NETCONF server will wait before re-establishing
the SSH/TLS client before assuming the SSH/TLS a connection to the NETCONF client. The
client is no longer alive."; NETCONF server may initiate a connection before
this time if desired (e.g., to deliver an event
notification message).";
} }
} }
} }
} }
case periodic-connection { }
container periodic { container reconnect-strategy {
presence true; description
description "The reconnection strategy directs how a NETCONF server
"Periodically connect to the NETCONF client, so that reconnects to a NETCONF client, after discovering its
the NETCONF client may deliver messages pending for connection to the client has dropped, even if due to a
the NETCONF server. The NETCONF client must close reboot. The NETCONF server starts with the specified
the connection when it is ready to release it. Once endpoint and tries to connect to it max-attempts times
the connection has been closed, the NETCONF server before trying the next endpoint in the list (round
will restart its timer until the next connection."; robin).";
leaf idle-timeout { leaf start-with {
type uint16; type enumeration {
units "seconds"; enum first-listed {
default 300; // five minutes
description description
"Specifies the maximum number of seconds that a "Indicates that reconnections should start with
a NETCONF session may remain idle. A NETCONF the first endpoint listed.";
session will be dropped if it is idle for an
interval longer than this number of seconds.
If set to zero, then the server will never drop
a session because it is idle. Sessions that
have a notification subscription active are
never dropped.";
} }
leaf reconnect-timeout { enum last-connected {
type uint16 {
range "1..max";
}
units minutes;
default 60;
description description
"Sets the maximum amount of unconnected time the "Indicates that reconnections should start with
NETCONF server will wait before re-establishing the endpoint last connected to. If no previous
a connection to the NETCONF client. The NETCONF connection has ever been established, then the
server may initiate a connection before this first endpoint configured is used. NETCONF
time if desired (e.g., to deliver an event servers SHOULD be able to remember the last
notification message)."; endpoint connected to across reboots.";
} }
} }
default first-listed;
description
"Specifies which of the NETCONF client's endpoints
the NETCONF server should start with when trying
to connect to the NETCONF client.";
} }
} leaf max-attempts {
} type uint8 {
container reconnect-strategy { range "1..max";
description
"The reconnection strategy directs how a NETCONF server
reconnects to a NETCONF client, after discovering its
connection to the client has dropped, even if due to a
reboot. The NETCONF server starts with the specified
endpoint and tries to connect to it max-attempts times
before trying the next endpoint in the list (round
robin).";
leaf start-with {
type enumeration {
enum first-listed {
description
"Indicates that reconnections should start with
the first endpoint listed.";
}
enum last-connected {
description
"Indicates that reconnections should start with
the endpoint last connected to. If no previous
connection has ever been established, then the
first endpoint configured is used. NETCONF
servers SHOULD be able to remember the last
endpoint connected to across reboots.";
} }
default 3;
description
"Specifies the number times the NETCONF server tries
to connect to a specific endpoint before moving on
to the next endpoint in the list (round robin).";
} }
default first-listed;
description
"Specifies which of the NETCONF client's endpoints the
NETCONF server should start with when trying to connect
to the NETCONF client.";
}
leaf max-attempts {
type uint8 {
range "1..max";
}
default 3;
description
"Specifies the number times the NETCONF server tries to
connect to a specific endpoint before moving on to the
next endpoint in the list (round robin).";
} }
} }
} }
} }
} }
}
<CODE ENDS> <CODE ENDS>
5. Design Considerations 5. Design Considerations
Editorial: this section is a hold over from before, previously called Editorial: this section is a hold over from before, previously called
"Objectives". It was only written two support the "server" (not the "Objectives". It was only written two support the "server" (not the
"client"). The question is if it's better to add the missing "client"). The question is if it's better to add the missing
"client" parts, or remove this section altogether. "client" parts, or remove this section altogether.
The primary purpose of the YANG modules defined herein is to enable The primary purpose of the YANG modules defined herein is to enable
the configuration of the NETCONF client and servers. This scope the configuration of the NETCONF client and servers. This scope
skipping to change at page 49, line 5 skipping to change at page 49, line 15
name: ietf-netconf-client name: ietf-netconf-client
namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-client namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-client
prefix: ncc prefix: ncc
reference: RFC XXXX reference: RFC XXXX
name: ietf-netconf-server name: ietf-netconf-server
namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-server namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-server
prefix: ncs prefix: ncs
reference: RFC XXXX reference: RFC XXXX
8. Acknowledgements 8. References
The authors would like to thank for following for lively discussions
on list and in the halls (ordered by last name): Andy Bierman, Martin
Bjorklund, Benoit Claise, Mehmet Ersue, Balazs Kovacs, David
Lamparter, Alan Luchuk, Ladislav Lhotka, Radek Krejci, Tom Petch,
Juergen Schoenwaelder, Phil Shafer, Sean Turner, and Bert Wijnen.
9. References
9.1. Normative References 8.1. Normative References
[I-D.ietf-netconf-keystore] [I-D.ietf-netconf-keystore]
Watsen, K., "Keystore Model", draft-ietf-netconf- Watsen, K., "YANG Data Model for a "Keystore" Mechanism",
keystore-02 (work in progress), June 2017. draft-ietf-netconf-keystore-04 (work in progress), October
2017.
[I-D.ietf-netconf-ssh-client-server] [I-D.ietf-netconf-ssh-client-server]
Watsen, K. and G. Wu, "SSH Client and Server Models", Watsen, K. and G. Wu, "YANG Groupings for SSH Clients and
draft-ietf-netconf-ssh-client-server-03 (work in SSH Servers", draft-ietf-netconf-ssh-client-server-05
progress), June 2017. (work in progress), October 2017.
[I-D.ietf-netconf-tls-client-server] [I-D.ietf-netconf-tls-client-server]
Watsen, K. and G. Wu, "YANG Groupings for TLS Clients and Watsen, K. and G. Wu, "YANG Groupings for TLS Clients and
TLS Servers", draft-ietf-netconf-tls-client-server-04 TLS Servers", draft-ietf-netconf-tls-client-server-05
(work in progress), October 2017. (work in progress), October 2017.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
skipping to change at page 50, line 19 skipping to change at page 50, line 23
<https://www.rfc-editor.org/info/rfc7589>. <https://www.rfc-editor.org/info/rfc7589>.
[RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
RFC 7950, DOI 10.17487/RFC7950, August 2016, RFC 7950, DOI 10.17487/RFC7950, August 2016,
<https://www.rfc-editor.org/info/rfc7950>. <https://www.rfc-editor.org/info/rfc7950>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>. May 2017, <https://www.rfc-editor.org/info/rfc8174>.
9.2. Informative References 8.2. Informative References
[I-D.ietf-netmod-yang-tree-diagrams]
Bjorklund, M. and L. Berger, "YANG Tree Diagrams", draft-
ietf-netmod-yang-tree-diagrams-02 (work in progress),
October 2017.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004, DOI 10.17487/RFC3688, January 2004,
<https://www.rfc-editor.org/info/rfc3688>. <https://www.rfc-editor.org/info/rfc3688>.
[RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration
Protocol (NETCONF) Access Control Model", RFC 6536, Protocol (NETCONF) Access Control Model", RFC 6536,
DOI 10.17487/RFC6536, March 2012, DOI 10.17487/RFC6536, March 2012,
<https://www.rfc-editor.org/info/rfc6536>. <https://www.rfc-editor.org/info/rfc6536>.
[RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
<https://www.rfc-editor.org/info/rfc8040>. <https://www.rfc-editor.org/info/rfc8040>.
[RFC8071] Watsen, K., "NETCONF Call Home and RESTCONF Call Home", [RFC8071] Watsen, K., "NETCONF Call Home and RESTCONF Call Home",
RFC 8071, DOI 10.17487/RFC8071, February 2017, RFC 8071, DOI 10.17487/RFC8071, February 2017,
<https://www.rfc-editor.org/info/rfc8071>. <https://www.rfc-editor.org/info/rfc8071>.
[RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
<https://www.rfc-editor.org/info/rfc8340>.
Appendix A. Change Log Appendix A. Change Log
A.1. 00 to 01 A.1. 00 to 01
o Renamed "keychain" to "keystore". o Renamed "keychain" to "keystore".
A.2. 01 to 02 A.2. 01 to 02
o Added to ietf-netconf-client ability to connected to a cluster of o Added to ietf-netconf-client ability to connected to a cluster of
endpoints, including a reconnection-strategy. endpoints, including a reconnection-strategy.
skipping to change at page 51, line 42 skipping to change at page 51, line 42
o Replaced refine statement in ietf-netconf-client to add a o Replaced refine statement in ietf-netconf-client to add a
mandatory true. mandatory true.
o Added refine statement in ietf-netconf-server to add a must o Added refine statement in ietf-netconf-server to add a must
statement. statement.
o Now there are containers and groupings, for both the client and o Now there are containers and groupings, for both the client and
server models. server models.
A.5. 04 to 05
o Now tree diagrams reference ietf-netmod-yang-tree-diagrams o Now tree diagrams reference ietf-netmod-yang-tree-diagrams
o Updated examples to inline key and certificates (no longer a o Updated examples to inline key and certificates (no longer a
leafref to keystore) leafref to keystore)
A.6. 05 to 06
o Fixed change log missing section issue.
o Updated examples to match latest updates to the crypto-types,
trust-anchors, and keystore drafts.
o Reduced line length of the YANG modules to fit within 69 columns.
Acknowledgements
The authors would like to thank for following for lively discussions
on list and in the halls (ordered by last name): Andy Bierman, Martin
Bjorklund, Benoit Claise, Mehmet Ersue, Balazs Kovacs, David
Lamparter, Alan Luchuk, Ladislav Lhotka, Radek Krejci, Tom Petch,
Juergen Schoenwaelder, Phil Shafer, Sean Turner, and Bert Wijnen.
Authors' Addresses Authors' Addresses
Kent Watsen Kent Watsen
Juniper Networks Juniper Networks
EMail: kwatsen@juniper.net EMail: kwatsen@juniper.net
Gary Wu Gary Wu
Cisco Networks Cisco Networks
EMail: garywu@cisco.com EMail: garywu@cisco.com
 End of changes. 145 change blocks. 
1782 lines changed or deleted 1790 lines changed or added

This html diff was produced by rfcdiff 1.46. The latest version is available from http://tools.ietf.org/tools/rfcdiff/