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 XXXX: To be updated on publication";
}
import ietf-interfaces {
prefix if;
reference
"RFC 8343: A YANG Data Model for Interface Management";
}
organization
"IETF DHC (Dynamic Host Configuration) Working Group";
contact
"WG Web:
WG List:
Author: Yong Cui
Author: Linhui Sun
Editor: Ian Farrer
Author: Sladjana Zeichlin
Author: Zihao He
Author: Michal Nowikowski ";
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 XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
for full legal notices.";
revision 2022-03-07 {
description
"Initial Revision.";
reference
"XXXX: YANG Data Model for DHCPv6 Configuration";
}
/*
* Features
*/
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";
}
/*
* Groupings
*/
grouping message-statistics {
description
"Counters for DHCPv6 messages.";
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.";
}
}
grouping lease-state {
description
"Information about the active IA_NA lease.";
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.";
}
uses dhc6:status;
}
grouping option-request-option-group {
description
"OPTION_ORO (6) Option Request Option. A client MUST include
an Option Request option in a Solicit, Request, Renew,
Rebind, or Information-request message to inform the server
about options the client wants the server to send to the
client.";
reference "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Sections 21.23, 21.24, 21.25, & 21.7";
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.";
}
}
}
grouping user-class-option-group {
description
"OPTION_USER_CLASS (15) User Class Option";
reference "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 21.15";
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.";
}
}
}
}
grouping vendor-class-option-group {
description
"OPTION_VENDOR_CLASS (16) Vendor Class Option";
reference "RFC 8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6), Section 21.16";
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.";
}
}
}
}
}
/*
* Data Nodes
*/
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 be sent by
the client. Additional option definitions can be
augmented to this location from other YANG modules as
required.";
uses option-request-option-group;
uses dhc6:rapid-commit-option-group;
uses user-class-option-group;
uses vendor-class-option-group;
uses dhc6:vendor-specific-information-option-group;
uses dhc6:reconfigure-accept-option-group;
}
list ia-na {
if-feature non-temp-addr;
key ia-id;
description
"Configuration relevant for an IA_NA (Identity Association
for Non-temporary Addresses).";
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 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.";
}
uses lease-state;
}
}
list ia-ta {
if-feature temp-addr;
key ia-id;
description
"Configuration relevant for an IA_TA (Identity Association
for Temporary Addresses).";
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 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.";
}
uses lease-state;
}
}
list ia-pd {
if-feature prefix-delegation;
key ia-id;
description
"Configuration relevant for an IA_PD (Identity Association
for Prefix Delegation).";
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 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.";
}
uses lease-state;
}
}
container statistics {
description
"DHCPv6 message counters for the client.";
uses message-statistics;
}
}
}
/*
* Notifications
*/
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
"IA-ID";
}
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 which 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 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" {
description
"Max Solicit timeout value (SOL_MAX_RT) exceeded.";
}
enum "request-timeout" {
description
"Max Request timeout value (REQ_MAX_RT) exceeded.";
}
enum "request-retries-exceeded" {
description
"Max Request retry attempts (REC_MAX_RC) exceeded.";
}
enum "confirm-duration-exceeded" {
description
"Max Confirm duration (CNF_MAX_RD) exceeded.";
}
enum "renew-timeout" {
description
"Max Renew timeout value (REN_MAX_RT) exceeded.";
}
enum "rebind-timeout" {
description
"Max Rebind timeout value (REB_MAX_RT)
exceeded.";
}
enum "info-request-timeout" {
description
"Max Information-request timeout value (INF_MAX_RT)
exceeded.";
}
enum "release-retries-exceeded" {
description
"Max Release retry attempts (REL_MAX_RC) exceeded.";
}
enum "decline-retries-exceeded" {
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 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.";
}
uses dhc6:status;
}
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.";
}
}
}