This YANG module defines components necessary for the configuration and management of DHCPv6 clients. The key words 'MUST', 'MU...
Version: 2022-06-20
module ietf-dhcpv6-client { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-client"; prefix dhc6-clnt; import ietf-inet-types { prefix inet; reference "RFC 6991: Common YANG Data Types"; } import ietf-yang-types { prefix yang; reference "RFC 6991: Common YANG Data Types"; } import ietf-dhcpv6-common { prefix dhc6; reference "RFC 9243: A YANG Data Model for DHCPv6 Configuration"; } import ietf-interfaces { prefix if; reference "RFC 8343: A YANG Data Model for Interface Management"; } organization "IETF Dynamic Host Configuration (DHC) Working Group"; contact "WG Web: <https://datatracker.ietf.org/wg/dhc/> WG List: <mailto:dhcwg@ietf.org> Author: Yong Cui <yong@csnet1.cs.tsinghua.edu.cn> Author: Linhui Sun <lh.sunlinh@gmail.com> Editor: Ian Farrer <ian.farrer@telekom.de> Author: Sladjana Zeichlin <sladjana.zechlin@telekom.de> Author: Zihao He <hezihao9512@gmail.com> Author: Michal Nowikowski <godfryd@isc.org>"; description "This YANG module defines components necessary for the configuration and management of DHCPv6 clients. 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 (RFC 2119) (RFC 8174) when, and only when, they appear in all capitals, as shown here. Copyright (c) 2022 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 9243 (https://www.rfc-editor.org/info/rfc9243); see the RFC itself for full legal notices."; revision "2022-06-20" { description "Initial revision."; reference "RFC 9243: A YANG Data Model for DHCPv6 Configuration"; } feature non-temp-addr { description "Denotes that the client supports DHCPv6 non-temporary address allocations."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 6.2"; } feature temp-addr { description "Denotes that the client supports DHCPv6 temporary address allocations."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 6.5"; } feature prefix-delegation { description "Denotes that the client implements DHCPv6 prefix delegation."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 6.3"; } feature anon-profile { description "Denotes that the client supports DHCP anonymity profiles."; reference "RFC 7844: Anonymity Profiles for DHCP Clients"; } container dhcpv6-client { description "DHCPv6 client configuration and state."; leaf enabled { type boolean; default "true"; description "Globally enables the DHCP client function."; } leaf client-duid { if-feature (non-temp-addr or prefix-delegation or temp-addr) and not anon-profile; type dhc6:duid; description "A single client DUID that will be used by all of the client's DHCPv6-enabled interfaces."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 11"; } list client-if { key "if-name"; description "The list of interfaces for which the client will be requesting DHCPv6 configuration."; leaf if-name { type if:interface-ref; mandatory true; description "Reference to the interface entry that the requested configuration is relevant to."; } leaf enabled { type boolean; default "true"; description "Enables the DHCP client function for this interface."; } leaf interface-duid { if-feature (non-temp-addr or prefix-delegation or temp-addr) and anon-profile; type dhc6:duid; description "Per-interface client DUIDs for use with DHCP anonymity profiles."; reference "RFC 7844: Anonymity Profiles for DHCP Clients, Section 3"; } container client-configured-options { description "Definitions for DHCPv6 options that can be sent by the client. Additional option definitions can be augmented to this location from other YANG modules as required."; container option-request-option { description "OPTION_ORO (6) Option Request Option."; leaf-list oro-option { type uint16; description "List of options that the client is requesting, identified by option code. This list MUST include the code for option SOL_MAX_RT (82) when included in a Solicit message. If this option is being sent in an Information-request message, then the code for option OPTION_INFORMATION_REFRESH_TIME (32) and INF_MAX_RT (83) MUST be included."; } } // container option-request-option container rapid-commit-option { presence "Enable sending of this option"; description "OPTION_RAPID_COMMIT (14) Rapid Commit Option."; } // container rapid-commit-option container user-class-option { presence "Configures the option"; description "OPTION_USER_CLASS (15) User Class Option."; list user-class-data-instance { key "user-class-data-id"; min-elements 1; description "The user classes of which the client is a member."; leaf user-class-data-id { type uint8; description "User class data ID."; } leaf user-class-data { type binary; description "Opaque field representing a User Class of which the client is a member."; } } // list user-class-data-instance } // container user-class-option container vendor-class-option { description "OPTION_VENDOR_CLASS (16) Vendor Class Option."; list vendor-class-option-instances { key "enterprise-number"; description "The vendor class option allows for multiple instances in a single message. Each list entry defines the contents of an instance of the option."; leaf enterprise-number { type uint32; description "The vendor's registered Enterprise Number, as maintained by IANA."; } list vendor-class-data-element { key "vendor-class-data-id"; description "The vendor classes of which the client is a member."; leaf vendor-class-data-id { type uint8; description "Vendor class data ID."; } leaf vendor-class-data { type binary; description "Opaque field representing a vendor class of which the client is a member."; } } // list vendor-class-data-element } // list vendor-class-option-instances } // container vendor-class-option container vendor-specific-information-options { description "OPTION_VENDOR_OPTS (17) Vendor-specific Information Option."; list vendor-specific-information-option { key "enterprise-number"; description "The Vendor-specific Information option allows for multiple instances in a single message. Each list entry defines the contents of an instance of the option."; leaf enterprise-number { type uint32; description "The vendor's registered Enterprise Number, as maintained by IANA."; reference "IANA 'Private Enterprise Numbers' registry <https://www.iana.org/assignments/enterprise-numbers>"; } list vendor-option-data { key "sub-option-code"; description "Vendor options, interpreted by vendor-specific client/server functions."; leaf sub-option-code { type uint16; description "The code for the sub-option."; } leaf sub-option-data { type binary; description "The data area for the sub-option."; } } // list vendor-option-data } // list vendor-specific-information-option } // container vendor-specific-information-options container reconfigure-accept-option { presence "Enable sending of this option"; description "OPTION_RECONF_ACCEPT (20) Reconfigure Accept Option."; } // container reconfigure-accept-option } // container client-configured-options list ia-na { if-feature non-temp-addr; key "ia-id"; description "Configuration relevant for an Identity Association for Non-temporary Addresses (IA_NA)."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 13.1"; leaf ia-id { type uint32; description "A unique identifier for this IA_NA."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 12"; } container ia-na-options { description "An augmentation point for additional options that the client may send in the IA_NA-options field of OPTION_IA_NA."; } // container ia-na-options container lease-state { config false; description "Information about the active IA_NA lease."; leaf ia-na-address { type inet:ipv6-address; description "Address that is currently leased."; } leaf lease-t1 { type dhc6:timer-seconds32; description "The time interval after which the client should contact the server from which the addresses in the IA_NA were obtained to extend the lifetimes of the addresses assigned to the IA_NA."; } leaf lease-t2 { type dhc6:timer-seconds32; description "The time interval after which the client should contact any available server to extend the lifetimes of the addresses assigned to the IA_NA."; } leaf preferred-lifetime { type dhc6:timer-seconds32; description "The preferred lifetime for the leased address expressed in seconds."; } leaf valid-lifetime { type dhc6:timer-seconds32; description "The valid lifetime for the leased address expressed in seconds."; } leaf allocation-time { type yang:date-and-time; description "Time and date that the address was first leased."; } leaf last-renew-rebind { type yang:date-and-time; description "Time of the last successful renew or rebind of the leased address."; } leaf server-duid { type dhc6:duid; description "DUID of the leasing server."; } container status { description "Status code information, relating to the success or failure of operations requested in messages."; leaf code { type uint16; description "The numeric code for the status encoded in this option. See the 'Status Codes' registry at <https://www.iana.org/assignments/dhcpv6-parameters> for the current list of status codes."; } leaf message { type string; description "A UTF-8-encoded text string suitable for display to an end user. It MUST NOT be null terminated."; } } // container status } // container lease-state } // list ia-na list ia-ta { if-feature temp-addr; key "ia-id"; description "Configuration relevant for an Identity Association for Temporary Addresses (IA_TA)."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 13.2"; leaf ia-id { type uint32; description "The unique identifier for this IA_TA."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 12"; } container ia-ta-options { description "An augmentation point for additional options that the client may send in the IA_TA-options field of OPTION_IA_TA."; } // container ia-ta-options container lease-state { config false; description "Information about an active IA_TA lease."; leaf ia-ta-address { type inet:ipv6-address; description "Address that is currently leased."; } leaf preferred-lifetime { type dhc6:timer-seconds32; description "The preferred lifetime for the leased address expressed in seconds."; } leaf valid-lifetime { type dhc6:timer-seconds32; description "The valid lifetime for the leased address expressed in seconds."; } leaf allocation-time { type yang:date-and-time; description "Time and date that the address was first leased."; } leaf last-renew-rebind { type yang:date-and-time; description "Time of the last successful renew or rebind of the leased address."; } leaf server-duid { type dhc6:duid; description "DUID of the leasing server."; } container status { description "Status code information, relating to the success or failure of operations requested in messages."; leaf code { type uint16; description "The numeric code for the status encoded in this option. See the 'Status Codes' registry at <https://www.iana.org/assignments/dhcpv6-parameters> for the current list of status codes."; } leaf message { type string; description "A UTF-8-encoded text string suitable for display to an end user. It MUST NOT be null terminated."; } } // container status } // container lease-state } // list ia-ta list ia-pd { if-feature prefix-delegation; key "ia-id"; description "Configuration relevant for an Identity Association for Prefix Delegation (IA_PD)."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 13.3"; leaf ia-id { type uint32; description "The unique identifier for this IA_PD."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 12"; } leaf prefix-length-hint { type uint8 { range "1..128"; } description "Prefix-length hint value included in the messages sent to the server to indicate a preference for the size of the prefix to be delegated."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 18.2.1"; } container ia-pd-options { description "An augmentation point for additional options that the client will send in the IA_PD-options field of OPTION_IA_TA."; } // container ia-pd-options container lease-state { config false; description "Information about an active IA_PD-delegated prefix."; leaf ia-pd-prefix { type inet:ipv6-prefix; description "Delegated prefix that is currently leased."; } leaf lease-t1 { type dhc6:timer-seconds32; description "The time interval after which the client should contact the server from which the addresses in the IA_NA were obtained to extend the lifetimes of the addresses assigned to the IA_PD."; } leaf lease-t2 { type dhc6:timer-seconds32; description "The time interval after which the client should contact any available server to extend the lifetimes of the addresses assigned to the IA_PD."; } leaf preferred-lifetime { type dhc6:timer-seconds32; description "The preferred lifetime for the leased address expressed in seconds."; } leaf valid-lifetime { type dhc6:timer-seconds32; description "The valid lifetime for the leased address expressed in seconds."; } leaf allocation-time { type yang:date-and-time; description "Time and date that the address was first leased."; } leaf last-renew-rebind { type yang:date-and-time; description "Time of the last successful renew or rebind of the leased address."; } leaf server-duid { type dhc6:duid; description "DUID of the leasing server."; } container status { description "Status code information, relating to the success or failure of operations requested in messages."; leaf code { type uint16; description "The numeric code for the status encoded in this option. See the 'Status Codes' registry at <https://www.iana.org/assignments/dhcpv6-parameters> for the current list of status codes."; } leaf message { type string; description "A UTF-8-encoded text string suitable for display to an end user. It MUST NOT be null terminated."; } } // container status } // container lease-state } // list ia-pd container statistics { description "DHCPv6 message counters for the client."; leaf discontinuity-time { type yang:date-and-time; description "The time on the most recent occasion at which any one or more of DHCPv6 client's counters suffered a discontinuity. If no such discontinuities have occurred since the last re-initialization of the local management subsystem, then this node contains the time the local management subsystem re-initialized itself."; } leaf solicit-count { type yang:counter32; config false; description "Number of Solicit (1) messages sent."; } leaf advertise-count { type yang:counter32; config false; description "Number of Advertise (2) messages received."; } leaf request-count { type yang:counter32; config false; description "Number of Request (3) messages sent."; } leaf confirm-count { type yang:counter32; config false; description "Number of Confirm (4) messages sent."; } leaf renew-count { type yang:counter32; config false; description "Number of Renew (5) messages sent."; } leaf rebind-count { type yang:counter32; config false; description "Number of Rebind (6) messages sent."; } leaf reply-count { type yang:counter32; config false; description "Number of Reply (7) messages received."; } leaf release-count { type yang:counter32; config false; description "Number of Release (8) messages sent."; } leaf decline-count { type yang:counter32; config false; description "Number of Decline (9) messages sent."; } leaf reconfigure-count { type yang:counter32; config false; description "Number of Reconfigure (10) messages received."; } leaf information-request-count { type yang:counter32; config false; description "Number of Information-request (11) messages sent."; } leaf discarded-message-count { type yang:counter32; config false; description "Number of messages that have been discarded for any reason."; } } // container statistics } // list client-if } // container dhcpv6-client notification invalid-ia-address-detected { if-feature non-temp-addr or temp-addr; description "Notification sent when an address received in an identity association option is determined invalid. Possible conditions include a duplicate or otherwise illegal address."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 18.2.10.1"; leaf ia-id { type uint32; mandatory true; description "IAID."; } leaf ia-na-t1-timer { type uint32; description "The value of the T1 time field for non-temporary address allocations (OPTION_IA_NA)."; } leaf ia-na-t2-timer { type uint32; description "The value of the preferred-lifetime field for non-temporary address allocations (OPTION_IA_NA)."; } leaf invalid-address { type inet:ipv6-address; description "The IP address that has been detected to be invalid."; } leaf preferred-lifetime { type uint32; description "The value of the preferred-lifetime field in OPTION_IAADDR."; } leaf valid-lifetime { type uint32; description "The value of the valid-lifetime field in OPTION_IAADDR."; } leaf ia-options { type binary; description "A copy of the contents of the IAaddr-options field."; } leaf description { type string; description "Description of the invalid Identity Association (IA) detection error."; } } // notification invalid-ia-address-detected notification transmission-failed { description "Notification sent when the transmission or retransmission of a message fails."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 7.6"; leaf failure-type { type enumeration { enum "solicit-timeout" { value 0; description "Max Solicit timeout value (SOL_MAX_RT) exceeded."; } enum "request-timeout" { value 1; description "Max Request timeout value (REQ_MAX_RT) exceeded."; } enum "request-retries-exceeded" { value 2; description "Max Request retry attempts (REC_MAX_RC) exceeded."; } enum "confirm-duration-exceeded" { value 3; description "Max Confirm duration (CNF_MAX_RD) exceeded."; } enum "renew-timeout" { value 4; description "Max Renew timeout value (REN_MAX_RT) exceeded."; } enum "rebind-timeout" { value 5; description "Max Rebind timeout value (REB_MAX_RT) exceeded."; } enum "info-request-timeout" { value 6; description "Max Information-request timeout value (INF_MAX_RT) exceeded."; } enum "release-retries-exceeded" { value 7; description "Max Release retry attempts (REL_MAX_RC) exceeded."; } enum "decline-retries-exceeded" { value 8; description "Max Decline retry attempts (DEC_MAX_RT) exceeded."; } } mandatory true; description "Description of the failure."; } leaf description { type string; description "Information related to the failure, such as number of retries and timer values."; } } // notification transmission-failed notification unsuccessful-status-code { description "Notification sent when the client receives a message that includes an unsuccessful Status Code option."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 21.13"; leaf server-duid { type dhc6:duid; mandatory true; description "DUID of the server sending the unsuccessful error code."; } container status { description "Status code information, relating to the success or failure of operations requested in messages."; leaf code { type uint16; description "The numeric code for the status encoded in this option. See the 'Status Codes' registry at <https://www.iana.org/assignments/dhcpv6-parameters> for the current list of status codes."; } leaf message { type string; description "A UTF-8-encoded text string suitable for display to an end user. It MUST NOT be null terminated."; } } // container status } // notification unsuccessful-status-code notification server-duid-changed { if-feature non-temp-addr or prefix-delegation or temp-addr; description "Notification sent when the client receives a lease from a server with different DUID to the one currently stored by the client, e.g., in response to a Rebind message."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 18.2.5"; leaf new-server-duid { type dhc6:duid; mandatory true; description "DUID of the new server."; } leaf previous-server-duid { type dhc6:duid; mandatory true; description "DUID of the previous server."; } leaf lease-ia-na { if-feature non-temp-addr; type leafref { path "/dhcpv6-client/client-if/ia-na/ia-id"; } description "Reference to the IA_NA lease."; } leaf lease-ia-ta { if-feature temp-addr; type leafref { path "/dhcpv6-client/client-if/ia-ta/ia-id"; } description "Reference to the IA_TA lease."; } leaf lease-ia-pd { if-feature prefix-delegation; type leafref { path "/dhcpv6-client/client-if/ia-pd/ia-id"; } description "Reference to the IA_PD lease."; } } // notification server-duid-changed } // module ietf-dhcpv6-client
© 2023 YumaWorks, Inc. All rights reserved.