module ietf-dhcpv6-client {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-client";
prefix "dhcpv6-client";
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 dhcpv6-common;
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.
Copyright (c) 2021 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 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
the RFC itself for full legal notices.";
revision 2021-02-22 {
description "Version update for draft -18 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-18";
}
revision 2021-01-29 {
description "Version update for draft -17 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-17";
}
revision 2021-01-06 {
description "Version update for draft -16 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-16";
}
revision 2020-12-22 {
description "Version update for draft -13 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-15";
}
revision 2020-12-10 {
description "Version update for draft -13 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-13";
}
revision 2020-12-01 {
description "Version update for draft -12 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-12";
}
revision 2020-05-26 {
description "Version update for draft -11 publication and
to align revisions across the different modules.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-11";
}
revision 2019-09-20 {
description "";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-10";
}
revision 2018-09-04 {
description "";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
revision 2018-03-04 {
description "Resolved most issues on the DHC official github";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
revision 2017-12-22 {
description "Resolve most issues on Ian's Github.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
revision 2017-11-24 {
description "First version of the separated client specific
YANG model.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
/*
* Groupings
*/
grouping message-statistics {
description "Counters for DHCPv6 messages.";
leaf solicit-count {
type uint32;
config "false";
description "Number of Solicit (1) messages sent.";
}
leaf advertise-count {
type uint32;
config "false";
description "Number of Advertise (2) messages received.";
}
leaf request-count {
type uint32;
config "false";
description "Number of Request (3) messages sent.";
}
leaf confirm-count {
type uint32;
config "false";
description "Number of Confirm (4) messages sent.";
}
leaf renew-count {
type uint32;
config "false";
description "Number of Renew (5) messages sent.";
}
leaf rebind-count {
type uint32;
config "false";
description "Number of Rebind (6) messages sent.";
}
leaf reply-count {
type uint32;
config "false";
description "Number of Reply (7) messages received.";
}
leaf release-count {
type uint32;
config "false";
description "Number of Release (8) messages sent.";
}
leaf decline-count {
type uint32;
config "false";
description "Number of Decline (9) messages sent.";
}
leaf reconfigure-count {
type uint32;
config "false";
description "Number of Reconfigure (10) messages received.";
}
leaf information-request-count {
type uint32;
config "false";
description "Number of Information-request (11) messages
sent.";
}
}
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), Section 21.7";
container option-request-option {
description "OPTION_ORO (6) Option Request Option container.";
leaf-list oro-option {
type uint16;
description "List of options that the client is requesting,
identified by option code";
}
}
}
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
container.";
list user-class-data {
key user-class-datum-id;
min-elements 1;
description "The user classes of which the client
is a member.";
leaf user-class-datum-id {
type uint8;
description "User class datum ID";
}
leaf user-class-datum {
type string;
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
container.";
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 {
key vendor-class-datum-id;
description "The vendor classes of which the client is
a member.";
leaf vendor-class-datum-id {
type uint8;
description "Vendor class datum ID";
}
leaf vendor-class-datum {
type string;
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.";
}
list client-if {
key if-name;
description "The list of interfaces that the client will be
requesting DHCPv6 configuration for.";
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 duid {
type dhcpv6-common:duid;
description "Client DUID.";
reference "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 11";
}
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 dhcpv6-common:status-code-option-group;
uses dhcpv6-common:rapid-commit-option-group;
uses user-class-option-group;
uses vendor-class-option-group;
uses dhcpv6-common:vendor-specific-information-option-group;
uses dhcpv6-common:reconfigure-accept-option-group;
}
list ia-na {
key iaid;
description "Configuration relevant for an IA_NA.";
reference "RFC 8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6), Section 13.1";
leaf iaid {
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 will 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 preferred-lifetime {
type dhcpv6-common:timer-seconds32;
description "The preferred lifetime for the leased
address expressed in units of seconds.";
}
leaf valid-lifetime {
type dhcpv6-common:timer-seconds32;
description "The valid lifetime for the leased address
expressed in units of seconds.";
}
leaf lease-t1 {
type dhcpv6-common: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 dhcpv6-common: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 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 dhcpv6-common:duid;
description "DUID of the leasing server.";
}
}
}
list ia-ta {
key iaid;
description "Configuration relevant for an IA_TA.";
reference "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 13.2";
leaf iaid {
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 will 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.";
}
leaf preferred-lifetime {
type dhcpv6-common:timer-seconds32;
description "The preferred lifetime for the leased
address expressed in units of seconds.";
}
leaf valid-lifetime {
type dhcpv6-common:timer-seconds32;
description "The valid lifetime for the leased address
expressed in units of 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 address.";
}
leaf server-duid {
type dhcpv6-common:duid;
description "DUID of the leasing server.";
}
}
}
list ia-pd {
key iaid;
description "Configuration relevant for an IA_PD.";
reference "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 13.3";
leaf iaid {
type uint32;
description "The unique identifier for this IA_PD.";
reference "RFC 8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6), Section 12";
}
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 preferred-lifetime {
type dhcpv6-common:timer-seconds32;
description "The preferred lifetime for the leased prefix
expressed in units of seconds.";
}
leaf valid-lifetime {
type dhcpv6-common:timer-seconds32;
description "The valid lifetime for the leased prefix
expressed in units of seconds.";
}
leaf lease-t1 {
type dhcpv6-common: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 dhcpv6-common: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 allocation-time {
type yang:date-and-time;
description "Time and date that the prefix was first
leased.";
}
leaf last-renew-rebind {
type yang:date-and-time;
description "Time of the last successful renew or rebind
of the delegated prefix.";
}
leaf server-duid {
type dhcpv6-common:duid;
description "DUID of the delegating server.";
}
}
}
uses message-statistics;
}
}
/*
* Notifications
*/
notification invalid-ia-detected {
description "Notification sent when the identity association
of the client can be proved to be 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 iaid {
type uint32;
mandatory true;
description "IAID";
}
leaf description {
type string;
description "Description of the event.";
}
}
notification retransmission-failed {
description "Notification sent when the retransmission mechanism
defined in RFC 8415 is unsuccessful.";
reference "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 7.6";
leaf failure-type {
type enumeration {
enum "MRC-exceeded" {
description "Maximum retransmission count exceeded.";
}
enum "MRD-exceeded" {
description "Maximum retransmission duration exceeded.";
}
}
mandatory true;
description "Description of the failure.";
}
}
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 status-code {
type uint16;
mandatory true;
description "Unsuccessful status code received by a client.";
}
leaf server-duid {
type dhcpv6-common:duid;
mandatory true;
description "DUID of the server sending the unsuccessful
error code.";
}
}
notification server-duid-changed {
description "Notification sent when the client receives a lease
from a server with different DUID to the one currently stored
by the client.";
reference "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 18.2.10.1";
leaf new-server-duid {
type dhcpv6-common:duid;
mandatory true;
description "DUID of the new server.";
}
leaf previous-server-duid {
type dhcpv6-common:duid;
mandatory true;
description "DUID of the previous server.";
}
leaf lease-ia-na {
type leafref {
path "/dhcpv6-client/client-if/ia-na/iaid";
}
description "Reference to the IA_NA lease.";
}
leaf lease-ia-ta {
type leafref {
path "/dhcpv6-client/client-if/ia-ta/iaid";
}
description "Reference to the IA_TA lease.";
}
leaf lease-ia-pd {
type leafref {
path "/dhcpv6-client/client-if/ia-pd/iaid";
}
description "Reference to the IA_PD lease.";
}
}
}