Internet-Draft | udp-client-server-grouping | June 2024 |
Huang Feng, et al. | Expires 19 December 2024 | [Page] |
This document defines two YANG 1.1 modules to support the configuration of UDP clients and UDP servers.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 19 December 2024.¶
Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
This document defines two YANG 1.1 [RFC7950] modules to support the configuration of UDP clients and UDP servers [RFC768], either as standalone or in conjunction with configuration of other layers.¶
The "ietf-udp-client" YANG module defines the "udp-client-grouping" grouping for configuring UDP clients with remote server information.¶
The following tree diagram [RFC8340] illustrates the tree structure of the "udp-client-grouping" grouping:¶
module: ietf-udp-client grouping udp-client-grouping: +-- remote-address inet:host +-- remote-port? inet:port-number +-- local-address? inet:ip-address {local-binding-supported}? +-- local-port? inet:port-number {local-binding-supported}?¶
This section presents an example of usage of the "udp-client-grouping" grouping.¶
<!-- The outermost element below doesn't exist in the data model. --> <!-- It simulates if the "grouping" were a "container" instead. --> <udp-client xmlns="urn:ietf:params:xml:ns:yang:ietf-udp-client"> <remote-address>www.example.com</remote-address> <remote-port>10000</remote-port> <local-address>192.0.2.2</local-address> <local-port>12345</local-port> </udp-client>¶
This module imports types defined in [RFC6991].¶
<CODE BEGINS> file "ietf-udp-client@2024-05-27.yang" module ietf-udp-client { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-udp-client"; prefix udpc; import ietf-inet-types { prefix inet; reference "RFC 6991: Common YANG Data Types"; } organization "IETF NETCONF (Network Configuration) Working Group"; contact "WG Web: <http:/tools.ietf.org/wg/netconf/> WG List: <mailto:netconf@ietf.org> Authors: Alex Huang Feng <mailto:alex.huang-feng@insa-lyon.fr> Pierre Francois <mailto:pierre.francois@insa-lyon.fr>"; description "Defines a generic grouping for UDP-based client applications. Copyright (c) 2024 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Revised BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info). This version of this YANG module is part of RFC-to-be; see the RFC itself for full legal notices."; revision 2024-05-27 { description "Initial revision"; reference "RFC-to-be: YANG Grouping for UDP Clients and UDP Servers"; } feature local-binding-supported { description "Indicates that the UDP server supports configuring local bindings (i.e., the local address and local port) for UDP clients."; } grouping udp-client-grouping { description "A reusable grouping for configuring a UDP client. Note that this grouping uses fairly typical descendant node names such that a stack of 'uses' statements will have name conflicts. It is intended that the consuming data model will resolve the issue (e.g., by wrapping the 'uses' statement in a container called 'udp-client-parameters'). This model purposely does not do this itself so as to provide maximum flexibility to consuming models."; leaf remote-address { type inet:host; mandatory true; description "The IP address or hostname of the remote UDP server. If a domain name is configured, then the DNS resolution should happen on each connection attempt. If the DNS resolution results in multiple IP addresses, the IP addresses are tried according to local preference order until a connection has been established or until all IP addresses have failed."; } leaf remote-port { type inet:port-number; default "0"; description "The port number of the remote UDP server. An invalid default value is used so that importing modules may 'refine' it with the appropriate default port number value."; } leaf local-address { if-feature "local-binding-supported"; type inet:ip-address; description "The local IP address/interface to bind to when sending UDP messages to the remote server. INADDR_ANY ('0.0.0.0') or INADDR6_ANY ('0:0:0:0:0:0:0:0' a.k.a. '::') MAY be used to explicitly indicate the implicit default, that the server can bind to any IPv4 or IPv6 address."; } leaf local-port { if-feature "local-binding-supported"; type inet:port-number; default "0"; description "The local IP port number to bind to when sending UDP messages to the remote server. The port number '0', which is the default value, indicates that any available local port number may be used."; } } } <CODE ENDS>¶
The "ietf-udp-server" YANG module defines the "udp-server-grouping" grouping for configuring UDP servers.¶
The following tree diagram [RFC8340] illustrates the structure of "udp-server-grouping" grouping:¶
module: ietf-udp-server grouping udp-server-grouping: +-- local-bind* [local-address] +-- local-address inet:ip-address +-- local-port? inet:port-number¶
This section presents two examples of usage of the "udp-server-grouping" grouping. This example shows an example of a server configured for listening to a IPv4 address:¶
<!-- The outermost element below doesn't exist in the data model. --> <!-- It simulates if the "grouping" were a "container" instead. --> <udp-server xmlns="urn:ietf:params:xml:ns:yang:ietf-udp-server"> <local-bind> <local-address>192.0.2.2</local-address> <local-port>49152</local-port> </local-bind> </udp-server>¶
This example shows an example of a server configured to listen to an IPv4 and IPv6 together:¶
<!-- The outermost element below doesn't exist in the data model. --> <!-- It simulates if the "grouping" were a "container" instead. --> <udp-server xmlns="urn:ietf:params:xml:ns:yang:ietf-udp-server"> <local-bind> <local-address>192.0.2.2</local-address> <local-port>49152</local-port> </local-bind> <local-bind> <local-address>2001:DB8::0</local-address> <local-port>49153</local-port> </local-bind> </udp-server>¶
The "ietf-udp-server" imports types defined in [RFC6991].¶
<CODE BEGINS> file "ietf-udp-server@2024-05-27.yang" module ietf-udp-server { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-udp-server"; prefix udps; import ietf-inet-types { prefix inet; reference "RFC 6991: Common YANG Data Types"; } organization "IETF NETCONF (Network Configuration) Working Group"; contact "WG Web: <http:/tools.ietf.org/wg/netconf/> WG List: <mailto:netconf@ietf.org> Authors: Alex Huang Feng <mailto:alex.huang-feng@insa-lyon.fr> Pierre Francois <mailto:pierre.francois@insa-lyon.fr>"; description "Defines a generic grouping for UDP-based server applications. Copyright (c) 2024 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Revised BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info). This version of this YANG module is part of RFC-to-be; see the RFC itself for full legal notices."; revision 2024-05-27 { description "Initial revision"; reference "RFC-to-be: YANG Grouping for UDP Clients and UDP Servers"; } grouping udp-server-grouping { description "Provides a reusable grouping for configuring a UDP server. Note that this grouping uses fairly typical descendant node names such that a stack of 'uses' statements will have name conflicts. It is intended that the consuming data model will resolve the issue (e.g., by wrapping the 'uses' statement in a container called 'udp-server-parameters'). This model purposely does not do this itself so as to provide maximum flexibility to consuming models."; list local-bind { key local-address; min-elements 1; description "A list of bind (listen) points for this server instance. A server instance may have multiple bind points to support, e.g., the same port in different address families or different ports in the same address family."; leaf local-address { type inet:ip-address; mandatory true; description "The local IP address to listen on for incoming UDP messages. To configure listening on all IPv4 addresses the value must be '0.0.0.0' (INADDR_ANY). To configure listening on all IPv6 addresses the value must be '::' (INADDR6_ANY)."; } leaf local-port { type inet:port-number; default "0"; description "The local port number to listen on for incoming UDP messages. An invalid default value (0) is used (instead of 'mandatory true') so that an application level data model may 'refine' it with an application specific default port number value."; } } } } <CODE ENDS>¶
The YANG module specified in this document defines a schema for data that is designed to be accessed via network management protocols such as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer is the secure transport layer, and the mandatory-to-implement secure transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer is HTTPS, and the mandatory-to-implement secure transport is TLS [RFC8446].¶
The Network Configuration Access Control Model (NACM) [RFC8341] provides the means to restrict access for particular NETCONF or RESTCONF users to a preconfigured subset of all available NETCONF or RESTCONF protocol operations and content.¶
Since the module in this document only define groupings, these considerations are primarily for the designers of other modules that use these groupings.¶
None of the readable data nodes defined in this YANG module are considered sensitive or vulnerable in network environments. The NACM "default-deny-all" extension has not been set for any data nodes defined in this module.¶
None of the writable data nodes defined in this YANG module are considered sensitive or vulnerable in network environments. The NACM "default-deny-write" extension has not been set for any data nodes defined in this module.¶
This module does not define any RPCs, actions, or notifications, and thus the security consideration for such is not provided here.¶
This document describes the URIs from IETF XML Registry and the registration of a two new YANG module names¶
IANA is requested to assign two new URI from the IETF XML Registry [RFC3688]. The following two URIs are suggested:¶
URI: urn:ietf:params:xml:ns:yang:ietf-udp-client Registrant Contact: The IESG. XML: N/A; the requested URI is an XML namespace.¶
URI: urn:ietf:params:xml:ns:yang:ietf-udp-server Registrant Contact: The IESG. XML: N/A; the requested URI is an XML namespace.¶
This document also requests two new YANG module names in the YANG Module Names registry [RFC8342] with the following suggestions:¶
name: ietf-udp-client namespace: urn:ietf:params:xml:ns:yang:ietf-udp-client prefix: udpc maintained by IANA? N reference: RFC-to-be¶
name: ietf-udp-server namespace: urn:ietf:params:xml:ns:yang:ietf-udp-server prefix: udps maintained by IANA? N reference: RFC-to-be¶
The authors would like to thank Mohamed Boucadair, Benoit Claise, Qiufang Ma and Qin Wu for their review and valuable comments.¶