module ietf-dhcpv6-common {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-common";
prefix "dhc6";
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 common components used for the
configuration and management of DHCPv6.
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) 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
(https://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-07-02 {
description
"Initial Revision.";
reference
"XXXX: YANG Data Model for DHCPv6 Configuration";
}
typedef threshold {
type uint8 {
range 1..100;
}
description
"Threshold value in percent.";
}
typedef timer-seconds32 {
type uint32;
units "seconds";
description
"Timer value type, in seconds (32-bit range).";
}
typedef duid-base {
type string {
pattern '([0-9a-fA-F]{2}){3,130}';
}
description
"Each DHCP server and client has a DUID (DHCP Unique
Identifier). The DUID consists of a two-octet
type field and an arbitrary length (1-128 octets) content
field. The duid-base type is used by other duid types with
additional pattern constraints.
Currently, there are four defined types of DUIDs
in RFC 8415 and RFC 6355 - DUID-LLT, DUID-EN, DUID-LL
and DUID-UUID. DUID-unstructured represents DUIDs which
do not follow any of the defined formats.";
reference "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 11
RFC 6355: Definition of the UUID-Based DHCPv6 Unique
Identifier (DUID-UUID), Section 4";
}
typedef duid-llt {
type duid-base {
pattern '0001'
+ '[0-9a-fA-F]{12,}';
}
description
"DUID type 1, based on Link-Layer Address Plus Time
(DUID-LLT). Constructed with a 2-octet hardware type assigned
by IANA, 4-octet containing the time the DUID is generated
(represented in seconds since midnight (UTC), January 1, 2000,
modulo 2^32), and a link-layer address. The address is encoded
without separator characters. For example:
+------+------+----------+--------------+
| 0001 | 0006 | 28490058 | 00005E005300 |
+------+------+----------+--------------+
This example includes the 2-octet DUID type of 1 (0x01), the
hardware type is 0x06 (IEEE Hardware Types) the creation
time is 0x028490058 (constructed as described above). Finally,
the link-layer address is 0x5E005300 (EUI-48 address
00-00-5E-00-53-00)";
reference "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 11.2
IANA 'Hardware Types' registry.
";
}
typedef duid-en {
type duid-base {
pattern '0002'
+ '[0-9a-fA-F]{4,}';
}
description
"DUID type 2, assigned by vendor based on Enterprise
Number (DUID-EN). This DUID consists of the 4-octet vendor's
registered Private Enterprise Number as maintained by IANA
followed by a unique identifier assigned by the vendor. For
example:
+------+----------+------------------+
| 0002 | 00007ED9 | 0CC084D303000912 |
+------+----------+------------------+
This example includes the 2-octet DUID type of 2 (0x02),
4-octets for the Enterprise Number (0x7ED9), followed by
8-octets of identifier data (0x0CC084D303000912).";
reference "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 11.3
IANA 'Private Enterprise Numbers' registry.
";
}
typedef duid-ll {
type duid-base {
pattern '0003'
+ '([0-9a-fA-F]){4,}';
}
description
"DUID type 3, based on Link-Layer Address (DUID-LL).
Constructed with a 2-octet hardware type assigned
by IANA, and a link-layer address. The address is encoded
without separator characters. For example:
+------+------+--------------+
| 0003 | 0006 | 00005E005300 |
+------+------+--------------+
This example includes the 2-octet DUID type of 3 (0x03), the
hardware type is 0x06 (IEEE Hardware Types), and the link-layer
address is 0x5E005300 (EUI-48 address 00-00-5E-00-53-00)";
reference "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 11.4
IANA 'Hardware Types' registry.
";
}
typedef duid-uuid {
type duid-base {
pattern '0004'
+ '[0-9a-fA-F]{32}';
}
description
"DUID type 4, based on Universally Unique Identifier
(DUID-UUID). This type of DUID consists of 16 octets
containing a 128-bit UUID. For example:
+------+----------------------------------+
| 0004 | 9f03b182705747e38a1e422910078642 |
+------+----------------------------------+
This example includes the 2-octet DUID type of 4 (0x04), and
the UUID 9f03b182-7057-47e3-8a1e-422910078642.";
reference "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 11.5
RFC 6355: Definition of the UUID-Based DHCPv6 Unique Identifier
(DUID-UUID)";
}
typedef duid-unstructured {
type duid-base {
pattern '[0-9a-fA-F]{3}'
+ '[05-9a-fA-F]'
+ '([0-9a-fA-F])*';
}
description
"Used for DUIDs following any other formats than DUID
types 1-4. For example:
+----------------------------------+
| 7b6a164d325946539dc540fb539bc430 |
+----------------------------------+
Here, an arbitrary 16-octet value is used. The only constraint
placed on this is that the first 2-octects are not 0x01-0x04
to avoid collision with the other defined DUID types
(duid-llt, duid-en, duid-ll, or duid-uuid).";
reference "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 11";
}
typedef duid {
type union {
type duid-llt;
type duid-en;
type duid-ll;
type duid-uuid;
type duid-unstructured;
}
description
"Represents the DUID and is neutral to the DUID's construction
format.";
reference "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 11";
}
/*
* Groupings
*/
grouping status {
description
"Holds information about the most recent status code which
has been sent by the server or received by the client.";
reference "RFC 8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6), Section 7.5.";
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
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.";
}
}
}
grouping auth-option-group {
description
"OPTION_AUTH (11) Authentication Option.";
reference "RFC 8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6), Section 21.11
IANA 'Dynamic Host Configuration Protocol (DHCP) Authentication
Option Name Spaces' registry.
";
container auth-option {
description
"OPTION_AUTH (11) Authentication Option container.";
leaf protocol {
type uint8;
description
"The authentication protocol used by this Authentication
option.";
}
leaf algorithm {
type uint8;
description
"The algorithm used in the authentication protocol.";
}
leaf rdm {
type uint8;
description
"The Replay Detection Method (RDM) used in this
Authentication option.";
}
leaf replay-detection {
type uint64;
description
"The replay detection information for the RDM.";
}
leaf auth-information {
type string;
description
"The authentication information, as specified by the
protocol and algorithm used in this Authentication
option.";
}
}
}
grouping status-code-option-group {
description
"OPTION_STATUS_CODE (13) Status Code Option.";
reference "RFC 8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6), Section 21.13";
container status-code-option {
description
"OPTION_STATUS_CODE (13) Status Code Option container.";
leaf status-code {
type uint16;
description
"The numeric code for the status encoded in this option.
See the Status Codes registry at
for the current list of status codes.";
}
leaf status-message {
type string;
description
"A UTF-8 encoded text string suitable for display to an
end user. It MUST NOT be null-terminated.";
}
}
}
grouping rapid-commit-option-group {
description
"OPTION_RAPID_COMMIT (14) Rapid Commit Option.";
reference "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 21.14";
container rapid-commit-option {
presence "Enable sending of this option";
description
"OPTION_RAPID_COMMIT (14) Rapid Commit Option container.";
}
}
grouping vendor-specific-information-option-group {
description
"OPTION_VENDOR_OPTS (17) Vendor-specific Information
Option.";
reference "RFC 8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6), Section 21.17";
container vendor-specific-information-options {
description
"OPTION_VENDOR_OPTS (17) Vendor-specific Information
Option container.";
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.
";
}
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 string {
pattern '([0-9a-fA-F]{2}){0,}';
}
description
"The data area for the sub-option.";
}
}
}
}
}
grouping reconfigure-accept-option-group {
description
"OPTION_RECONF_ACCEPT (20) Reconfigure Accept Option.
A client uses the Reconfigure Accept option to announce to
the server whether the client is willing to accept Reconfigure
messages, and a server uses this option to tell the client
whether or not to accept Reconfigure messages. In the absence
of this option, the default behavior is that the client is
unwilling to accept Reconfigure messages. The presence node
is used to enable the option.";
reference "RFC 8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6), Section 21.20";
container reconfigure-accept-option {
presence "Enable sending of this option";
description
"OPTION_RECONF_ACCEPT (20) Reconfigure Accept Option
container.";
}
}
}