rfc9243v5.txt   rfc9243.txt 
skipping to change at line 951 skipping to change at line 951
of the client can be proved to be invalid. Possible conditions of the client can be proved to be invalid. Possible conditions
include duplicated address, illegal address, etc. include duplicated address, illegal address, etc.
retransmission-failed: This is raised when the retransmission retransmission-failed: This is raised when the retransmission
mechanism defined in [RFC8415] has failed. mechanism defined in [RFC8415] has failed.
4. DHCPv6 YANG Modules 4. DHCPv6 YANG Modules
4.1. DHCPv6 Common YANG Module 4.1. DHCPv6 Common YANG Module
<CODE BEGINS> file "ietf-dhcpv6-common@2022-05-04.yang" <CODE BEGINS> file "ietf-dhcpv6-common@2022-06-20.yang"
module ietf-dhcpv6-common { module ietf-dhcpv6-common {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-common"; namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-common";
prefix "dhc6"; prefix dhc6;
organization organization
"IETF Dynamic Host Configuration (DHC) Working Group"; "IETF Dynamic Host Configuration (DHC) Working Group";
contact contact
"WG Web: <https://datatracker.ietf.org/wg/dhc/> "WG Web: <https://datatracker.ietf.org/wg/dhc/>
WG List: <mailto:dhcwg@ietf.org> WG List: <mailto:dhcwg@ietf.org>
Author: Yong Cui <yong@csnet1.cs.tsinghua.edu.cn> Author: Yong Cui <yong@csnet1.cs.tsinghua.edu.cn>
Author: Linhui Sun <lh.sunlinh@gmail.com> Author: Linhui Sun <lh.sunlinh@gmail.com>
Editor: Ian Farrer <ian.farrer@telekom.de> Editor: Ian Farrer <ian.farrer@telekom.de>
Author: Sladjana Zeichlin <sladjana.zechlin@telekom.de> Author: Sladjana Zeichlin <sladjana.zechlin@telekom.de>
Author: Zihao He <hezihao9512@gmail.com> Author: Zihao He <hezihao9512@gmail.com>
Author: Michal Nowikowski <godfryd@isc.org>"; Author: Michal Nowikowski <godfryd@isc.org>";
description description
"This YANG module defines common components used for the "This YANG module defines common components used for the
configuration and management of DHCPv6. configuration and management of DHCPv6.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
are to be interpreted as described in BCP 14 (RFC 2119) are to be interpreted as described in BCP 14 (RFC 2119)
(RFC 8174) when, and only when, they appear in all (RFC 8174) when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
Copyright (c) 2022 IETF Trust and the persons identified as Copyright (c) 2022 IETF Trust and the persons identified as
authors of the code. All rights reserved. authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to without modification, is permitted pursuant to, and subject to
the license terms contained in, the Revised BSD License set the license terms contained in, the Revised BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
(https://trustee.ietf.org/license-info). (https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 9243 This version of this YANG module is part of RFC 9243
(https://www.rfc-editor.org/info/rfc9243); see the RFC itself (https://www.rfc-editor.org/info/rfc9243); see the RFC itself
for full legal notices."; for full legal notices.";
revision 2022-05-04 { revision 2022-06-20 {
description description
"Initial revision."; "Initial revision.";
reference reference
"RFC 9243: A YANG Data Model for DHCPv6 Configuration"; "RFC 9243: A YANG Data Model for DHCPv6 Configuration";
} }
typedef threshold { typedef threshold {
type uint8 { type uint8 {
range 1..100; range "1..100";
} }
description description
"Threshold value in percent."; "Threshold value in percent.";
} }
typedef timer-seconds32 { typedef timer-seconds32 {
type uint32; type uint32;
units "seconds"; units "seconds";
description description
"Timer value type in seconds (32-bit range)."; "Timer value type in seconds (32-bit range).";
} }
typedef duid-base { typedef duid-base {
type string { type string {
pattern '([0-9a-fA-F]{2}){3,130}'; pattern '([0-9a-fA-F]{2}){3,130}';
} }
description description
"Each DHCP server and client has a DHCP Unique Identifier "Each DHCP server and client has a DHCP Unique Identifier
(DUID). The DUID consists of a 2-octet type field (DUID). The DUID consists of a 2-octet type field
and an arbitrary length (1-128 octets) content field. and an arbitrary length (1-128 octets) content field.
The duid-base type is used by other duid types with The duid-base type is used by other duid types with
additional pattern constraints. additional pattern constraints.
Currently, there are four defined types of DUIDs Currently, there are four defined types of DUIDs
in RFCs 8415 and 6355 -- DUID-LLT, DUID-EN, DUID-LL, and in RFCs 8415 and 6355 -- DUID-LLT, DUID-EN, DUID-LL, and
DUID-UUID. DUID-unstructured represents DUIDs that do not DUID-UUID. DUID-unstructured represents DUIDs that do not
follow any of the defined formats. follow any of the defined formats.
Type 'string' is used to represent the hexadecimal DUID value Type 'string' is used to represent the hexadecimal DUID value
so that pattern constraints can be applied."; so that pattern constraints can be applied.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 11 "RFC 8415: Dynamic Host Configuration Protocol for
RFC 6355: Definition of the UUID-Based DHCPv6 Unique IPv6 (DHCPv6), Section 11
Identifier (DUID-UUID), Section 4"; RFC 6355: Definition of the UUID-Based DHCPv6 Unique
Identifier (DUID-UUID), Section 4";
} }
typedef duid-llt { typedef duid-llt {
type duid-base { type duid-base {
pattern '0001' pattern '0001'
+ '[0-9a-fA-F]{12,}'; + '[0-9a-fA-F]{12,}';
} }
description description
"DUID type 1, based on Link-Layer Address Plus Time "DUID type 1, based on Link-Layer Address Plus Time
(DUID-LLT). Constructed with a 2-octet hardware type assigned (DUID-LLT). Constructed with a 2-octet hardware type assigned
by IANA, 4 octets containing the time the DUID is generated by IANA, 4 octets containing the time the DUID is generated
(represented in seconds since midnight (UTC), January 1, 2000, (represented in seconds since midnight (UTC), January 1, 2000,
modulo 2^32), and a link-layer address. The address is encoded modulo 2^32), and a link-layer address. The address is encoded
without separator characters. For example: without separator characters. For example:
+------+------+----------+--------------+ +------+------+----------+--------------+
| 0001 | 0006 | 28490058 | 00005E005300 | | 0001 | 0006 | 28490058 | 00005E005300 |
+------+------+----------+--------------+ +------+------+----------+--------------+
This example includes the 2-octet DUID type of 1 (0x01); the This example includes the 2-octet DUID type of 1 (0x01); the
hardware type is 0x06 (IEEE Hardware Types), and the creation hardware type is 0x06 (IEEE Hardware Types), and the creation
time is 0x28490058 (constructed as described above). Finally, time is 0x28490058 (constructed as described above). Finally,
the link-layer address is 0x5E005300 (EUI-48 address the link-layer address is 0x5E005300 (EUI-48 address
00-00-5E-00-53-00)."; 00-00-5E-00-53-00).";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 11.2 "RFC 8415: Dynamic Host Configuration Protocol for
IANA 'Hardware Types' registry IPv6 (DHCPv6), Section 11.2
<https://www.iana.org/assignments/arp-parameters>"; IANA 'Hardware Types' registry
<https://www.iana.org/assignments/arp-parameters>";
} }
typedef duid-en { typedef duid-en {
type duid-base { type duid-base {
pattern '0002' pattern '0002'
+ '[0-9a-fA-F]{8,}'; + '[0-9a-fA-F]{8,}';
} }
description description
"DUID type 2, assigned by vendor based on Enterprise "DUID type 2, assigned by vendor based on Enterprise
Number (DUID-EN). This DUID consists of the 4-octet vendor's Number (DUID-EN). This DUID consists of the 4-octet vendor's
registered Private Enterprise Number, as maintained by IANA, registered Private Enterprise Number, as maintained by IANA,
followed by a unique identifier assigned by the vendor. For followed by a unique identifier assigned by the vendor. For
example: example:
+------+----------+------------------+ +------+----------+------------------+
| 0002 | 00007ED9 | 0CC084D303000912 | | 0002 | 00007ED9 | 0CC084D303000912 |
+------+----------+------------------+ +------+----------+------------------+
This example includes the 2-octet DUID type of 2 (0x02), This example includes the 2-octet DUID type of 2 (0x02),
4 octets for the Enterprise Number (0x7ED9), followed by 4 octets for the Enterprise Number (0x7ED9), followed by
8 octets of identifier data (0x0CC084D303000912)."; 8 octets of identifier data (0x0CC084D303000912).";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 11.3 "RFC 8415: Dynamic Host Configuration Protocol for
IANA 'Private Enterprise Numbers' registry IPv6 (DHCPv6), Section 11.3
<https://www.iana.org/assignments/enterprise-numbers>"; IANA 'Private Enterprise Numbers' registry
<https://www.iana.org/assignments/enterprise-numbers>";
} }
typedef duid-ll { typedef duid-ll {
type duid-base { type duid-base {
pattern '0003' pattern '0003'
+ '([0-9a-fA-F]){4,}'; + '([0-9a-fA-F]){4,}';
} }
description description
"DUID type 3, based on Link-Layer Address (DUID-LL). "DUID type 3, based on Link-Layer Address (DUID-LL).
Constructed with a 2-octet hardware type assigned Constructed with a 2-octet hardware type assigned
by IANA and a link-layer address. The address is encoded by IANA and a link-layer address. The address is encoded
without separator characters. For example: without separator characters. For example:
+------+------+--------------+ +------+------+--------------+
| 0003 | 0006 | 00005E005300 | | 0003 | 0006 | 00005E005300 |
+------+------+--------------+ +------+------+--------------+
This example includes the 2-octet DUID type of 3 (0x03); the This example includes the 2-octet DUID type of 3 (0x03); the
hardware type is 0x06 (IEEE Hardware Types), and the hardware type is 0x06 (IEEE Hardware Types), and the
link-layer address is 0x5E005300 (EUI-48 address link-layer address is 0x5E005300 (EUI-48 address
00-00-5E-00-53-00)."; 00-00-5E-00-53-00).";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 11.4 "RFC 8415: Dynamic Host Configuration Protocol for
IANA 'Hardware Types' registry IPv6 (DHCPv6), Section 11.4
<https://www.iana.org/assignments/arp-parameters>"; IANA 'Hardware Types' registry
<https://www.iana.org/assignments/arp-parameters>";
} }
typedef duid-uuid { typedef duid-uuid {
type duid-base { type duid-base {
pattern '0004' pattern '0004'
+ '[0-9a-fA-F]{32}'; + '[0-9a-fA-F]{32}';
} }
description description
"DUID type 4, based on Universally Unique Identifier "DUID type 4, based on Universally Unique Identifier
(DUID-UUID). This type of DUID consists of 16 octets (DUID-UUID). This type of DUID consists of 16 octets
containing a 128-bit UUID. For example: containing a 128-bit UUID. For example:
+------+----------------------------------+ +------+----------------------------------+
| 0004 | 9f03b182705747e38a1e422910078642 | | 0004 | 9f03b182705747e38a1e422910078642 |
+------+----------------------------------+ +------+----------------------------------+
This example includes the 2-octet DUID type of 4 (0x04) and This example includes the 2-octet DUID type of 4 (0x04) and
the UUID 9f03b182-7057-47e3-8a1e-422910078642."; the UUID 9f03b182-7057-47e3-8a1e-422910078642.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 11.5 "RFC 8415: Dynamic Host Configuration Protocol for
RFC 6355: Definition of the UUID-Based DHCPv6 Unique IPv6 (DHCPv6), Section 11.5
Identifier (DUID-UUID)"; RFC 6355: Definition of the UUID-Based DHCPv6 Unique
Identifier (DUID-UUID)";
} }
typedef duid-unstructured { typedef duid-unstructured {
type duid-base { type duid-base {
pattern '(000[1-4].*)' { pattern '(000[1-4].*)' {
modifier invert-match; modifier "invert-match";
} }
} }
description description
"Used for DUIDs following any formats other than DUID "Used for DUIDs following any formats other than DUID
types 1-4. For example: types 1-4. For example:
+----------------------------------+ +----------------------------------+
| 7b6a164d325946539dc540fb539bc430 | | 7b6a164d325946539dc540fb539bc430 |
+----------------------------------+ +----------------------------------+
Here, an arbitrary 16-octet value is used. The only constraint Here, an arbitrary 16-octet value is used. The only
placed on this is that the first 2 octets are not 0x01-0x04 constraint placed on this is that the first 2 octets
to avoid collision with the other defined DUID types are not 0x01-0x04 to avoid collision with the other
(duid-llt, duid-en, duid-ll, or duid-uuid)."; defined DUID types (duid-llt, duid-en, duid-ll,
reference "RFC 8415: Dynamic Host Configuration Protocol for or duid-uuid).";
IPv6 (DHCPv6), Section 11"; reference
"RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 11";
} }
typedef duid { typedef duid {
type union { type union {
type duid-llt; type duid-llt;
type duid-en; type duid-en;
type duid-ll; type duid-ll;
type duid-uuid; type duid-uuid;
type duid-unstructured; type duid-unstructured;
} }
description description
"Represents the DUID and is neutral to the DUID's construction "Represents the DUID and is neutral to the DUID's construction
format."; format.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 11"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 11";
} }
/* /*
* Groupings * Groupings
*/ */
grouping status { grouping status {
description description
"Holds information about the most recent status code that "Holds information about the most recent status code that
has been sent by the server or received by the client."; has been sent by the server or received by the client.";
reference "RFC 8415: Dynamic Host Configuration Protocol reference
for IPv6 (DHCPv6), Section 7.5."; "RFC 8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6), Section 7.5.";
container status { container status {
description description
"Status code information, relating to the success or failure "Status code information, relating to the success or failure
of operations requested in messages."; of operations requested in messages.";
leaf code { leaf code {
type uint16; type uint16;
description description
"The numeric code for the status encoded in this option. "The numeric code for the status encoded in this option.
See the 'Status Codes' registry at See the 'Status Codes' registry at
<https://www.iana.org/assignments/dhcpv6-parameters> <https://www.iana.org/assignments/dhcpv6-parameters>
for the current list of status codes."; for the current list of status codes.";
} }
leaf message { leaf message {
type string; type string;
description description
"A UTF-8-encoded text string suitable for display to an "A UTF-8-encoded text string suitable for display to an
end user. It MUST NOT be null terminated."; end user. It MUST NOT be null terminated.";
} }
} }
} }
grouping auth-option-group { grouping auth-option-group {
description description
"OPTION_AUTH (11) Authentication Option."; "OPTION_AUTH (11) Authentication Option.";
reference "RFC 8415: Dynamic Host Configuration Protocol reference
for IPv6 (DHCPv6), Section 21.11 "RFC 8415: Dynamic Host Configuration Protocol
RFC 3118: Authentication for DHCP Messages for IPv6 (DHCPv6), Section 21.11
IANA 'Dynamic Host Configuration Protocol (DHCP) RFC 3118: Authentication for DHCP Messages
Authentication Option Name Spaces' registry IANA 'Dynamic Host Configuration Protocol (DHCP)
<https://www.iana.org/assignments/auth-namespaces>"; Authentication Option Name Spaces' registry
<https://www.iana.org/assignments/auth-namespaces>";
container auth-option { container auth-option {
description description
"OPTION_AUTH (11) Authentication Option."; "OPTION_AUTH (11) Authentication Option.";
leaf algorithm { leaf algorithm {
type uint8; type uint8;
description description
"The algorithm used in the authentication protocol."; "The algorithm used in the authentication protocol.";
} }
leaf rdm { leaf rdm {
type uint8; type uint8;
description description
"The Replay Detection Method (RDM) used in this "The Replay Detection Method (RDM) used in this
Authentication option."; Authentication option.";
} }
leaf replay-detection { leaf replay-detection {
type uint64; type uint64;
description description
"The replay detection information for the RDM."; "The replay detection information for the RDM.";
} }
choice protocol { choice protocol {
description description
"The authentication protocol used in the option. Protocol "The authentication protocol used in the option. Protocol
Namespace Values 1 (delayed authentication) and 2 (Delayed Namespace Values 1 (delayed authentication) and 2 (Delayed
Authentication (Obsolete)) are not applicable and so are Authentication (Obsolete)) are not applicable and so are
not modeled."; not modeled.";
case conf-token { case conf-token {
leaf token-auth-information { leaf token-auth-information {
type binary; type binary;
description description
"Protocol Namespace Value 0. The authentication "Protocol Namespace Value 0. The authentication
information, as specified by the protocol and information, as specified by the protocol and
algorithm used in this Authentication option."; algorithm used in this Authentication option.";
} }
} }
case rkap { case rkap {
description description
"Protocol Namespace Value 3. The Reconfigure Key "Protocol Namespace Value 3. The Reconfigure Key
Authentication Protocol (RKAP) provides protection against Authentication Protocol (RKAP) provides protection
misconfiguration of a client caused by a Reconfigure against misconfiguration of a client caused by a
message sent by a malicious DHCP server."; Reconfigure message sent by a malicious DHCP
server.";
leaf datatype { leaf datatype {
type uint8 { type uint8 {
range "1 .. 2"; range "1 .. 2";
} }
description description
"Type of data in the Value field carried in this "Type of data in the Value field carried in this
option. option.
1 Reconfigure key value (used in the Reply 1 Reconfigure key value (used in the Reply
message). message).
2 HMAC-MD5 digest of the message (used in 2 HMAC-MD5 digest of the message (used in
the Reconfigure message)."; the Reconfigure message).";
} }
leaf auth-info-value { leaf auth-info-value {
type binary { type binary {
length 16; length "16";
} }
description description
"Data, as defined by the Type field. A 16-octet field."; "Data, as defined by the Type field. A 16-octet
field.";
} }
} }
} }
} }
} }
grouping rapid-commit-option-group { grouping rapid-commit-option-group {
description description
"OPTION_RAPID_COMMIT (14) Rapid Commit Option."; "OPTION_RAPID_COMMIT (14) Rapid Commit Option.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 21.14"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 21.14";
container rapid-commit-option { container rapid-commit-option {
presence "Enable sending of this option"; presence "Enable sending of this option";
description description
"OPTION_RAPID_COMMIT (14) Rapid Commit Option."; "OPTION_RAPID_COMMIT (14) Rapid Commit Option.";
} }
} }
grouping vendor-specific-information-option-group { grouping vendor-specific-information-option-group {
description description
"OPTION_VENDOR_OPTS (17) Vendor-specific Information "OPTION_VENDOR_OPTS (17) Vendor-specific Information
Option."; Option.";
reference "RFC 8415: Dynamic Host Configuration Protocol reference
for IPv6 (DHCPv6), Section 21.17"; "RFC 8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6), Section 21.17";
container vendor-specific-information-options { container vendor-specific-information-options {
description description
"OPTION_VENDOR_OPTS (17) Vendor-specific Information "OPTION_VENDOR_OPTS (17) Vendor-specific Information
Option."; Option.";
list vendor-specific-information-option { list vendor-specific-information-option {
key enterprise-number; key "enterprise-number";
description description
"The Vendor-specific Information option allows for "The Vendor-specific Information option allows for
multiple instances in a single message. Each list entry multiple instances in a single message. Each list entry
defines the contents of an instance of the option."; defines the contents of an instance of the option.";
leaf enterprise-number { leaf enterprise-number {
type uint32; type uint32;
description description
"The vendor's registered Enterprise Number, as "The vendor's registered Enterprise Number, as
maintained by IANA."; maintained by IANA.";
reference "IANA 'Private Enterprise Numbers' registry reference
<https://www.iana.org/assignments/enterprise-numbers>"; "IANA 'Private Enterprise Numbers' registry
<https://www.iana.org/assignments/enterprise-numbers>";
} }
list vendor-option-data { list vendor-option-data {
key sub-option-code; key "sub-option-code";
description description
"Vendor options, interpreted by vendor-specific "Vendor options, interpreted by vendor-specific
client/server functions."; client/server functions.";
leaf sub-option-code { leaf sub-option-code {
type uint16; type uint16;
description description
"The code for the sub-option."; "The code for the sub-option.";
} }
leaf sub-option-data { leaf sub-option-data {
type binary; type binary;
description description
"The data area for the sub-option."; "The data area for the sub-option.";
} }
} }
} }
} }
} }
grouping reconfigure-accept-option-group { grouping reconfigure-accept-option-group {
description description
"OPTION_RECONF_ACCEPT (20) Reconfigure Accept Option. "OPTION_RECONF_ACCEPT (20) Reconfigure Accept Option.
A client uses the Reconfigure Accept option to announce to A client uses the Reconfigure Accept option to announce to
the server whether or not the client is willing to accept the server whether or not the client is willing to accept
Reconfigure messages, and a server uses this option to tell Reconfigure messages, and a server uses this option to tell
the client whether or not to accept Reconfigure messages. In the client whether or not to accept Reconfigure messages. In
the absence of this option, the default behavior is that the the absence of this option, the default behavior is that the
client is unwilling to accept Reconfigure messages. The client is unwilling to accept Reconfigure messages. The
presence node is used to enable the option."; presence node is used to enable the option.";
reference "RFC 8415: Dynamic Host Configuration Protocol reference
for IPv6 (DHCPv6), Section 21.20"; "RFC 8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6), Section 21.20";
container reconfigure-accept-option { container reconfigure-accept-option {
presence "Enable sending of this option"; presence "Enable sending of this option";
description description
"OPTION_RECONF_ACCEPT (20) Reconfigure Accept Option."; "OPTION_RECONF_ACCEPT (20) Reconfigure Accept Option.";
} }
} }
} }
<CODE ENDS> <CODE ENDS>
4.2. DHCPv6 Server YANG Module 4.2. DHCPv6 Server YANG Module
This module imports typedefs from [RFC6991] and the module defined in This module imports typedefs from [RFC6991] and the module defined in
[RFC8343]. [RFC8343].
<CODE BEGINS> file "ietf-dhcpv6-server@2022-05-04.yang" <CODE BEGINS> file "ietf-dhcpv6-server@2022-06-20.yang"
module ietf-dhcpv6-server { module ietf-dhcpv6-server {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-server"; namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-server";
prefix "dhc6-srv"; prefix dhc6-srv;
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
reference reference
"RFC 6991: Common YANG Data Types"; "RFC 6991: Common YANG Data Types";
} }
import ietf-yang-types { import ietf-yang-types {
prefix yang; prefix yang;
reference reference
"RFC 6991: Common YANG Data Types"; "RFC 6991: Common YANG Data Types";
} }
import ietf-dhcpv6-common { import ietf-dhcpv6-common {
prefix dhc6; prefix dhc6;
reference reference
"RFC 9243: A YANG Data Model for DHCPv6 Configuration"; "RFC 9243: A YANG Data Model for DHCPv6 Configuration";
} }
import ietf-netconf-acm { import ietf-netconf-acm {
prefix nacm; prefix nacm;
reference reference
"RFC 8341: Network Configuration Access Control Model"; "RFC 8341: Network Configuration Access Control Model";
} }
organization organization
"IETF Dynamic Host Configuration (DHC) Working Group"; "IETF Dynamic Host Configuration (DHC) Working Group";
contact contact
"WG Web: <https://datatracker.ietf.org/wg/dhc/> "WG Web: <https://datatracker.ietf.org/wg/dhc/>
WG List: <mailto:dhcwg@ietf.org> WG List: <mailto:dhcwg@ietf.org>
Author: Yong Cui <yong@csnet1.cs.tsinghua.edu.cn> Author: Yong Cui <yong@csnet1.cs.tsinghua.edu.cn>
Author: Linhui Sun <lh.sunlinh@gmail.com> Author: Linhui Sun <lh.sunlinh@gmail.com>
Editor: Ian Farrer <ian.farrer@telekom.de> Editor: Ian Farrer <ian.farrer@telekom.de>
Author: Sladjana Zeichlin <sladjana.zechlin@telekom.de> Author: Sladjana Zeichlin <sladjana.zechlin@telekom.de>
Author: Zihao He <hezihao9512@gmail.com> Author: Zihao He <hezihao9512@gmail.com>
Author: Michal Nowikowski <godfryd@isc.org>"; Author: Michal Nowikowski <godfryd@isc.org>";
description description
"This YANG module defines components for the configuration "This YANG module defines components for the configuration
and management of DHCPv6 servers. and management of DHCPv6 servers.
Copyright (c) 2022 IETF Trust and the persons identified as Copyright (c) 2022 IETF Trust and the persons identified as
authors of the code. All rights reserved. authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to without modification, is permitted pursuant to, and subject to
the license terms contained in, the Revised BSD License set the license terms contained in, the Revised BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
(https://trustee.ietf.org/license-info). (https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 9243 This version of this YANG module is part of RFC 9243
(https://www.rfc-editor.org/info/rfc9243); see the RFC itself (https://www.rfc-editor.org/info/rfc9243); see the RFC itself
for full legal notices."; for full legal notices.";
revision 2022-05-04 { revision 2022-06-20 {
description description
"Initial revision."; "Initial revision.";
reference reference
"RFC 9243: A YANG Data Model for DHCPv6 Configuration"; "RFC 9243: A YANG Data Model for DHCPv6 Configuration";
} }
/* /*
* Features * Features
*/ */
feature na-assignment { feature na-assignment {
description description
"Denotes that the server implements DHCPv6 non-temporary "Denotes that the server implements DHCPv6 non-temporary
address assignment."; address assignment.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 6.2"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 6.2";
} }
feature prefix-delegation { feature prefix-delegation {
description description
"Denotes that the server implements DHCPv6 prefix "Denotes that the server implements DHCPv6 prefix
delegation."; delegation.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 6.3"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 6.3";
} }
/* /*
* Groupings * Groupings
*/ */
grouping resource-config { grouping resource-config {
description description
"Nodes that are reused at multiple levels in the DHCPv6 "Nodes that are reused at multiple levels in the DHCPv6
server's addressing hierarchy."; server's addressing hierarchy.";
leaf-list option-set-id { leaf-list option-set-id {
type leafref { type leafref {
path "/dhcpv6-server/option-sets/option-set/option-set-id"; path "/dhcpv6-server/option-sets/option-set/option-set-id";
} }
description description
"The ID field of the relevant set of DHCPv6 options "The ID field of the relevant set of DHCPv6 options
(option-set) to be provisioned to clients using the (option-set) to be provisioned to clients using the
allocation-range."; allocation-range.";
} }
leaf valid-lifetime { leaf valid-lifetime {
type dhc6:timer-seconds32; type dhc6:timer-seconds32;
description description
"Valid lifetime for the Identity Association (IA)."; "Valid lifetime for the Identity Association (IA).";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 12.1"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 12.1";
} }
leaf renew-time { leaf renew-time {
type dhc6:timer-seconds32; type dhc6:timer-seconds32;
description description
"Renew (T1) time."; "Renew (T1) time.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 4.2"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 4.2";
} }
leaf rebind-time { leaf rebind-time {
type dhc6:timer-seconds32; type dhc6:timer-seconds32;
description description
"Rebind (T2) time."; "Rebind (T2) time.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 4.2"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 4.2";
} }
leaf preferred-lifetime { leaf preferred-lifetime {
type dhc6:timer-seconds32; type dhc6:timer-seconds32;
description description
"Preferred lifetime for the IA."; "Preferred lifetime for the IA.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 12.1"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 12.1";
} }
leaf rapid-commit { leaf rapid-commit {
type boolean; type boolean;
description description
"When set to 'true', specifies that client-server exchanges "When set to 'true', specifies that client-server exchanges
involving two messages is supported."; involving two messages is supported.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 5.1"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 5.1";
} }
} }
grouping lease-information { grouping lease-information {
description description
"Binding information for each client that has been allocated "Binding information for each client that has been allocated
an IPv6 address or prefix."; an IPv6 address or prefix.";
leaf client-duid { leaf client-duid {
type dhc6:duid; type dhc6:duid;
description description
"Client DUID."; "Client DUID.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 11"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 11";
} }
leaf ia-id { leaf ia-id {
type uint32; type uint32;
mandatory true; mandatory true;
description description
"Client's Identity Association IDentifier (IAID)."; "Client's Identity Association IDentifier (IAID).";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 12"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 12";
} }
leaf allocation-time { leaf allocation-time {
type yang:date-and-time; type yang:date-and-time;
description description
"Time and date that the lease was made."; "Time and date that the lease was made.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 18"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 18";
} }
leaf last-renew-rebind { leaf last-renew-rebind {
type yang:date-and-time; type yang:date-and-time;
description description
"Time of the last successful renew or rebind."; "Time of the last successful renew or rebind.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 18"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 18";
} }
leaf preferred-lifetime { leaf preferred-lifetime {
type dhc6:timer-seconds32; type dhc6:timer-seconds32;
description description
"The preferred lifetime expressed in seconds."; "The preferred lifetime expressed in seconds.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 6"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 6";
} }
leaf valid-lifetime { leaf valid-lifetime {
type dhc6:timer-seconds32; type dhc6:timer-seconds32;
description description
"The valid lifetime for the lease expressed in seconds."; "The valid lifetime for the lease expressed in seconds.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 6"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 6";
} }
leaf lease-t1 { leaf lease-t1 {
type dhc6:timer-seconds32; type dhc6:timer-seconds32;
description description
"The time interval after which the client should contact "The time interval after which the client should contact
the server from which the addresses in the IA_NA were the server from which the addresses in the IA_NA were
obtained to extend the lifetimes of the addresses assigned obtained to extend the lifetimes of the addresses assigned
to the Identity Association for Prefix Delegation (IA_PD)."; to the Identity Association for Prefix Delegation (IA_PD).";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 4.2"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 4.2";
} }
leaf lease-t2 { leaf lease-t2 {
type dhc6:timer-seconds32; type dhc6:timer-seconds32;
description description
"The time interval after which the client should contact "The time interval after which the client should contact
any available server to extend the lifetimes of the any available server to extend the lifetimes of the
addresses assigned to the IA_PD."; addresses assigned to the IA_PD.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 4.2"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 4.2";
} }
uses dhc6:status; uses dhc6:status;
} }
grouping message-statistics { grouping message-statistics {
description description
"Counters for DHCPv6 messages."; "Counters for DHCPv6 messages.";
leaf discontinuity-time { leaf discontinuity-time {
type yang:date-and-time; type yang:date-and-time;
description description
"The time on the most recent occasion at which any one or "The time on the most recent occasion at which any one or
more of DHCPv6 server's counters suffered a discontinuity. more of DHCPv6 server's counters suffered a discontinuity.
If no such discontinuities have occurred since the last If no such discontinuities have occurred since the last
re-initialization of the local management subsystem, then re-initialization of the local management subsystem, then
this node contains the time the local management subsystem this node contains the time the local management subsystem
re-initialized itself."; re-initialized itself.";
} }
leaf solicit-count { leaf solicit-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Solicit (1) messages received."; "Number of Solicit (1) messages received.";
} }
leaf advertise-count { leaf advertise-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Advertise (2) messages sent."; "Number of Advertise (2) messages sent.";
} }
leaf request-count { leaf request-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Request (3) messages received."; "Number of Request (3) messages received.";
} }
leaf confirm-count { leaf confirm-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Confirm (4) messages received."; "Number of Confirm (4) messages received.";
} }
leaf renew-count { leaf renew-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Renew (5) messages received."; "Number of Renew (5) messages received.";
} }
leaf rebind-count { leaf rebind-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Rebind (6) messages received."; "Number of Rebind (6) messages received.";
} }
leaf reply-count { leaf reply-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Reply (7) messages sent."; "Number of Reply (7) messages sent.";
} }
leaf release-count { leaf release-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Release (8) messages received."; "Number of Release (8) messages received.";
} }
leaf decline-count { leaf decline-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Decline (9) messages received."; "Number of Decline (9) messages received.";
} }
leaf reconfigure-count { leaf reconfigure-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Reconfigure (10) messages sent."; "Number of Reconfigure (10) messages sent.";
} }
leaf information-request-count { leaf information-request-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Information-request (11) messages "Number of Information-request (11) messages
received."; received.";
} }
leaf discarded-message-count { leaf discarded-message-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of messages that have been discarded for any "Number of messages that have been discarded for any
reason."; reason.";
} }
} }
grouping preference-option-group { grouping preference-option-group {
description description
"OPTION_PREFERENCE (7) Preference Option."; "OPTION_PREFERENCE (7) Preference Option.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 21.8"; "RFC 8415: Dynamic Host Configuration Protocol for
container preference-option { IPv6 (DHCPv6), Section 21.8";
description container preference-option {
"OPTION_PREFERENCE (7) Preference Option."; description
leaf pref-value { "OPTION_PREFERENCE (7) Preference Option.";
leaf pref-value {
type uint8; type uint8;
description description
"The preference value for the server in this message. A "The preference value for the server in this message. A
1-octet unsigned integer."; 1-octet unsigned integer.";
} }
} }
} }
grouping server-unicast-option-group { grouping server-unicast-option-group {
description description
"OPTION_UNICAST (12) Server Unicast Option."; "OPTION_UNICAST (12) Server Unicast Option.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 21.12"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 21.12";
container server-unicast-option { container server-unicast-option {
description description
"OPTION_UNICAST (12) Server Unicast Option."; "OPTION_UNICAST (12) Server Unicast Option.";
leaf server-address { leaf server-address {
type inet:ipv6-address; type inet:ipv6-address;
description description
"The 128-bit address to which the client should send "The 128-bit address to which the client should send
messages delivered using unicast."; messages delivered using unicast.";
} }
} }
} }
grouping reconfigure-message-option-group { grouping reconfigure-message-option-group {
description description
"OPTION_RECONF_MSG (19) Reconfigure Message Option."; "OPTION_RECONF_MSG (19) Reconfigure Message Option.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 21.19"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 21.19";
container reconfigure-message-option { container reconfigure-message-option {
description description
"OPTION_RECONF_MSG (19) Reconfigure Message Option."; "OPTION_RECONF_MSG (19) Reconfigure Message Option.";
leaf msg-type { leaf msg-type {
type uint8; type uint8;
description description
"5 for Renew message, 6 for Rebind message, and 11 for "5 for Renew message, 6 for Rebind message, and 11 for
Information-request message."; Information-request message.";
} }
} }
} }
grouping info-refresh-time-option-group { grouping info-refresh-time-option-group {
description description
"OPTION_INFORMATION_REFRESH_TIME (32) Information Refresh "OPTION_INFORMATION_REFRESH_TIME (32) Information Refresh
Time Option."; Time Option.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 21.23"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 21.23";
container info-refresh-time-option { container info-refresh-time-option {
description description
"OPTION_INFORMATION_REFRESH_TIME (32) Information Refresh "OPTION_INFORMATION_REFRESH_TIME (32) Information Refresh
Time Option."; Time Option.";
leaf info-refresh-time { leaf info-refresh-time {
type dhc6:timer-seconds32; type dhc6:timer-seconds32;
description description
"Time duration specifying an upper bound for how long a "Time duration specifying an upper bound for how long a
client should wait before refreshing information retrieved client should wait before refreshing information retrieved
from a DHCP server."; from a DHCP server.";
} }
} }
} }
grouping sol-max-rt-option-group { grouping sol-max-rt-option-group {
description description
"OPTION_SOL_MAX_RT (82) SOL_MAX_RT Option (Max Solicit timeout "OPTION_SOL_MAX_RT (82) SOL_MAX_RT Option (Max Solicit timeout
value)."; value).";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 21.24"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 21.24";
container sol-max-rt-option { container sol-max-rt-option {
description description
"OPTION_SOL_MAX_RT (82) SOL_MAX_RT Option."; "OPTION_SOL_MAX_RT (82) SOL_MAX_RT Option.";
leaf sol-max-rt-value { leaf sol-max-rt-value {
type dhc6:timer-seconds32; type dhc6:timer-seconds32;
description description
"Maximum Solicit timeout value."; "Maximum Solicit timeout value.";
} }
} }
} }
grouping inf-max-rt-option-group { grouping inf-max-rt-option-group {
description description
"OPTION_INF_MAX_RT (83) INF_MAX_RT Option (Max "OPTION_INF_MAX_RT (83) INF_MAX_RT Option (Max
Information-request timeout value)."; Information-request timeout value).";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 21.25"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 21.25";
container inf-max-rt-option { container inf-max-rt-option {
description description
"OPTION_INF_MAX_RT (83) INF_MAX_RT Option."; "OPTION_INF_MAX_RT (83) INF_MAX_RT Option.";
leaf inf-max-rt-value { leaf inf-max-rt-value {
type dhc6:timer-seconds32; type dhc6:timer-seconds32;
description description
"Maximum Information-request timeout value."; "Maximum Information-request timeout value.";
} }
} }
} }
/* /*
* Data Nodes * Data Nodes
*/ */
container dhcpv6-server { container dhcpv6-server {
description description
"Configuration nodes for the DHCPv6 server."; "Configuration nodes for the DHCPv6 server.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 18.3"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 18.3";
leaf enabled { leaf enabled {
type boolean; type boolean;
description description
"Enables the DHCP server function."; "Enables the DHCP server function.";
} }
leaf server-duid { leaf server-duid {
type dhc6:duid; type dhc6:duid;
description description
"DUID of the server."; "DUID of the server.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 11"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 11";
} }
container vendor-config { container vendor-config {
description description
"This container provides a location for augmenting vendor "This container provides a location for augmenting vendor
or implementation-specific configuration nodes."; or implementation-specific configuration nodes.";
} }
container option-sets { container option-sets {
description description
"A server may allow different option sets to be configured "A server may allow different option sets to be configured
for clients matching specific parameters, such as topological for clients matching specific parameters, such as
location or client type. The 'option-set' list is a set of topological location or client type. The 'option-set' list
options and their contents that will be returned to is a set of options and their contents that will be
clients."; returned to clients.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 21"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 21";
list option-set { list option-set {
key option-set-id; key "option-set-id";
description description
"YANG definitions for DHCPv6 options are contained in "YANG definitions for DHCPv6 options are contained in
separate YANG modules and augmented to this container as separate YANG modules and augmented to this container as
required."; required.";
leaf option-set-id { leaf option-set-id {
type string; type string;
description description
"Option set identifier."; "Option set identifier.";
} }
leaf description { leaf description {
type string; type string;
description description
"An optional field for storing additional information "An optional field for storing additional information
relevant to the option set."; relevant to the option set.";
} }
uses preference-option-group; uses preference-option-group;
uses dhc6:auth-option-group; uses dhc6:auth-option-group;
uses server-unicast-option-group; uses server-unicast-option-group;
uses dhc6:rapid-commit-option-group; uses dhc6:rapid-commit-option-group;
uses dhc6:vendor-specific-information-option-group; uses dhc6:vendor-specific-information-option-group;
uses reconfigure-message-option-group; uses reconfigure-message-option-group;
uses dhc6:reconfigure-accept-option-group; uses dhc6:reconfigure-accept-option-group;
uses info-refresh-time-option-group; uses info-refresh-time-option-group;
uses sol-max-rt-option-group; uses sol-max-rt-option-group;
skipping to change at line 1834 skipping to change at line 1867
uses server-unicast-option-group; uses server-unicast-option-group;
uses dhc6:rapid-commit-option-group; uses dhc6:rapid-commit-option-group;
uses dhc6:vendor-specific-information-option-group; uses dhc6:vendor-specific-information-option-group;
uses reconfigure-message-option-group; uses reconfigure-message-option-group;
uses dhc6:reconfigure-accept-option-group; uses dhc6:reconfigure-accept-option-group;
uses info-refresh-time-option-group; uses info-refresh-time-option-group;
uses sol-max-rt-option-group; uses sol-max-rt-option-group;
uses inf-max-rt-option-group; uses inf-max-rt-option-group;
} }
} }
container class-selector { container class-selector {
description description
"DHCPv6 servers use a 'class-selector' function in order "DHCPv6 servers use a 'class-selector' function in order
to identify and classify incoming client messages to identify and classify incoming client messages
so that they can be given the correct configuration. so that they can be given the correct configuration.
The mechanisms used for implementing this function vary The mechanisms used for implementing this function vary
greatly between different implementations; as such, it is greatly between different implementations; as such, it is
not possible to include them in this module. This container not possible to include them in this module. This container
provides a location for server implementors to augment their provides a location for server implementors to augment their
own class-selector YANG."; own class-selector YANG.";
} }
container allocation-ranges { container allocation-ranges {
description description
"This model is based on an address and parameter "This model is based on an address and parameter
allocation hierarchy. The top level is 'global' -- which allocation hierarchy. The top level is 'global' -- which
is defined as the container for all allocation-ranges. Under is defined as the container for all allocation-ranges.
this are the individual allocation-ranges."; Under this are the individual allocation-ranges.";
uses resource-config; uses resource-config;
list allocation-range { list allocation-range {
key id; key "id";
description description
"Network ranges are identified by the 'id' key."; "Network ranges are identified by the 'id' key.";
leaf id { leaf id {
type string; type string;
mandatory true; mandatory true;
description description
"Unique identifier for the allocation range."; "Unique identifier for the allocation range.";
} }
leaf description { leaf description {
type string; type string;
skipping to change at line 1877 skipping to change at line 1908
"Description for the allocation range."; "Description for the allocation range.";
} }
leaf network-prefix { leaf network-prefix {
type inet:ipv6-prefix; type inet:ipv6-prefix;
mandatory true; mandatory true;
description description
"Network prefix."; "Network prefix.";
} }
uses resource-config; uses resource-config;
container address-pools { container address-pools {
if-feature na-assignment; if-feature "na-assignment";
description description
"Configuration for the DHCPv6 server's "Configuration for the DHCPv6 server's
address pools."; address pools.";
list address-pool { list address-pool {
key pool-id; key "pool-id";
description description
"List of address pools for allocation to clients, "List of address pools for allocation to clients,
distinguished by 'pool-id'."; distinguished by 'pool-id'.";
leaf pool-id { leaf pool-id {
type string; type string;
mandatory true; mandatory true;
description description
"Unique identifier for the pool."; "Unique identifier for the pool.";
} }
leaf pool-prefix { leaf pool-prefix {
type inet:ipv6-prefix; type inet:ipv6-prefix;
mandatory true; mandatory true;
description description
"IPv6 prefix for the pool. Should be contained "IPv6 prefix for the pool. Should be contained
within the network-prefix if configured."; within the network-prefix if configured.";
} }
leaf start-address { leaf start-address {
type inet:ipv6-address-no-zone; type inet:ipv6-address-no-zone;
mandatory true; mandatory true;
description description
"Starting IPv6 address for the pool."; "Starting IPv6 address for the pool.";
} }
leaf end-address { leaf end-address {
type inet:ipv6-address-no-zone; type inet:ipv6-address-no-zone;
mandatory true; mandatory true;
description description
"Ending IPv6 address for the pool."; "Ending IPv6 address for the pool.";
} }
leaf max-address-utilization { leaf max-address-utilization {
type dhc6:threshold; type dhc6:threshold;
description description
"Maximum amount of the addresses in the "Maximum amount of the addresses in the
pool that can be simultaneously allocated, pool that can be simultaneously allocated,
calculated as a percentage of the available calculated as a percentage of the available
addresses (end-address minus start-address plus addresses (end-address minus start-address plus
one), and rounded up. Used to set the value for one), and rounded up. Used to set the value for
the address-pool-utilization-threshold-exceeded the address-pool-utilization-threshold-exceeded
notification."; notification.";
} }
uses resource-config; uses resource-config;
container host-reservations { container host-reservations {
description description
"Configuration for host reservations from the "Configuration for host reservations from the
address pool."; address pool.";
list host-reservation { list host-reservation {
key reserved-addr; key "reserved-addr";
description description
"List of host reservations."; "List of host reservations.";
leaf client-duid { leaf client-duid {
type dhc6:duid; type dhc6:duid;
description description
"Client DUID for the reservation."; "Client DUID for the reservation.";
} }
leaf reserved-addr { leaf reserved-addr {
type inet:ipv6-address; type inet:ipv6-address;
description description
"Reserved IPv6 address."; "Reserved IPv6 address.";
} }
uses resource-config; uses resource-config;
} }
} }
container active-leases { container active-leases {
config false; config false;
description description
"Holds state related to active client "Holds state related to active client
leases."; leases.";
leaf total-count { leaf total-count {
type uint64; type uint64;
mandatory true; mandatory true;
description description
"The total number of addresses in the pool."; "The total number of addresses in the pool.";
} }
leaf allocated-count { leaf allocated-count {
type uint64; type uint64;
mandatory true; mandatory true;
description description
"The number of addresses or prefixes in the pool "The number of addresses or prefixes in the pool
that are currently allocated."; that are currently allocated.";
} }
list active-lease { list active-lease {
key leased-address; key "leased-address";
description description
"List of active address leases."; "List of active address leases.";
leaf leased-address { leaf leased-address {
type inet:ipv6-address; type inet:ipv6-address;
description description
"Active address lease entry."; "Active address lease entry.";
} }
uses lease-information; uses lease-information;
} }
} }
} }
} }
container prefix-pools { container prefix-pools {
if-feature prefix-delegation; if-feature "prefix-delegation";
description description
"Configuration for the DHCPv6 server's prefix pools."; "Configuration for the DHCPv6 server's prefix pools.";
list prefix-pool { list prefix-pool {
key pool-id; key "pool-id";
description description
"List of prefix pools for allocation to clients, "List of prefix pools for allocation to clients,
distinguished by 'pool-id'."; distinguished by 'pool-id'.";
leaf pool-id { leaf pool-id {
type string; type string;
mandatory true; mandatory true;
description description
"Unique identifier for the pool."; "Unique identifier for the pool.";
} }
leaf pool-prefix { leaf pool-prefix {
type inet:ipv6-prefix; type inet:ipv6-prefix;
mandatory true; mandatory true;
description description
"IPv6 prefix for the pool. Should be contained "IPv6 prefix for the pool. Should be contained
within the network-prefix if configured."; within the network-prefix if configured.";
} }
leaf client-prefix-length { leaf client-prefix-length {
type uint8 { type uint8 {
range "1 .. 128"; range "1 .. 128";
} }
mandatory true; mandatory true;
description description
"Length of the prefixes that will be delegated "Length of the prefixes that will be delegated
to clients."; to clients.";
} }
leaf max-pd-space-utilization { leaf max-pd-space-utilization {
type dhc6:threshold; type dhc6:threshold;
description description
"Maximum amount of the prefixes in the pool that "Maximum amount of the prefixes in the pool that
can be simultaneously allocated, calculated as a can be simultaneously allocated, calculated as a
percentage of the available prefixes, and rounded up. percentage of the available prefixes, and rounded
Used to set the value for the up. Used to set the value for the
prefix-pool-utilization-threshold-exceeded prefix-pool-utilization-threshold-exceeded
notification."; notification.";
} }
uses resource-config; uses resource-config;
container host-reservations { container host-reservations {
description description
"Configuration for host reservations from the "Configuration for host reservations from the
prefix pool."; prefix pool.";
list prefix-reservation { list prefix-reservation {
key reserved-prefix; key "reserved-prefix";
description description
"Reserved prefix reservation."; "Reserved prefix reservation.";
leaf client-duid { leaf client-duid {
type dhc6:duid; type dhc6:duid;
description description
"Client DUID for the reservation."; "Client DUID for the reservation.";
} }
leaf reserved-prefix { leaf reserved-prefix {
type inet:ipv6-prefix; type inet:ipv6-prefix;
description description
skipping to change at line 2048 skipping to change at line 2079
description description
"Reserved IPv6 prefix length."; "Reserved IPv6 prefix length.";
} }
} }
uses resource-config; uses resource-config;
} }
container active-leases { container active-leases {
config false; config false;
description description
"Holds state related to active client prefix "Holds state related to active client prefix
leases."; leases.";
leaf total-count { leaf total-count {
type uint64; type uint64;
mandatory true; mandatory true;
description description
"The total number of prefixes in the pool."; "The total number of prefixes in the pool.";
} }
leaf allocated-count { leaf allocated-count {
type uint64; type uint64;
mandatory true; mandatory true;
description description
"The number of prefixes in the pool that are "The number of prefixes in the pool that are
currently allocated."; currently allocated.";
} }
list active-lease { list active-lease {
key leased-prefix; key "leased-prefix";
description description
"List of active prefix leases."; "List of active prefix leases.";
leaf leased-prefix { leaf leased-prefix {
type inet:ipv6-prefix; type inet:ipv6-prefix;
description description
"Active leased prefix entry."; "Active leased prefix entry.";
} }
uses lease-information; uses lease-information;
} }
} }
skipping to change at line 2091 skipping to change at line 2122
} }
} }
} }
/* /*
* RPCs * RPCs
*/ */
rpc delete-address-lease { rpc delete-address-lease {
nacm:default-deny-all; nacm:default-deny-all;
if-feature na-assignment; if-feature "na-assignment";
description description
"Deletes a client's active address lease from the server's "Deletes a client's active address lease from the server's
lease database. Note that this will not cause the address lease database. Note that this will not cause the address
to be revoked from the client, and the lease may be refreshed to be revoked from the client, and the lease may be refreshed
or renewed by the client."; or renewed by the client.";
input { input {
leaf lease-address-to-delete { leaf lease-address-to-delete {
type leafref { type leafref {
path "/dhcpv6-server/allocation-ranges/" + path "/dhcpv6-server/allocation-ranges/"
"allocation-range/address-pools/address-pool" + + "allocation-range/address-pools/address-pool"
"/active-leases/active-lease/leased-address"; + "/active-leases/active-lease/leased-address";
} }
mandatory true; mandatory true;
description description
"IPv6 address of an active lease that will be "IPv6 address of an active lease that will be
deleted from the server."; deleted from the server.";
} }
} }
output { output {
leaf return-message { leaf return-message {
type string; type string;
description description
"Response message from the server. If available, a "Response message from the server. If available, a
language identifier should be included in the message."; language identifier should be included in the message.";
reference "BCP 18 (RFC 2277) IETF Policy on Character Sets reference
and Languages, Section 4.2"; "BCP 18 (RFC 2277) IETF Policy on Character Sets
and Languages, Section 4.2";
} }
} }
} }
rpc delete-prefix-lease { rpc delete-prefix-lease {
nacm:default-deny-all; nacm:default-deny-all;
if-feature prefix-delegation; if-feature "prefix-delegation";
description description
"Deletes a client's active prefix lease from the server's "Deletes a client's active prefix lease from the server's
lease database. Note that this will not cause the prefix lease database. Note that this will not cause the prefix
to be revoked from the client, and the lease may be refreshed to be revoked from the client, and the lease may be refreshed
or renewed by the client."; or renewed by the client.";
input { input {
leaf lease-prefix-to-delete { leaf lease-prefix-to-delete {
type leafref { type leafref {
path "/dhcpv6-server/allocation-ranges/" + path "/dhcpv6-server/allocation-ranges/"
"allocation-range/prefix-pools/prefix-pool" + + "allocation-range/prefix-pools/prefix-pool"
"/active-leases/active-lease/leased-prefix"; + "/active-leases/active-lease/leased-prefix";
} }
mandatory true; mandatory true;
description description
"IPv6 prefix of an active lease that will be deleted "IPv6 prefix of an active lease that will be deleted
from the server."; from the server.";
} }
} }
output { output {
leaf return-message { leaf return-message {
type string; type string;
description description
"Response message from the server. If available, a "Response message from the server. If available, a
language identifier should be included in the message."; language identifier should be included in the message.";
reference "BCP 18 (RFC 2277) IETF Policy on Character Sets reference
and Languages, Section 4.2"; "BCP 18 (RFC 2277) IETF Policy on Character Sets
and Languages, Section 4.2";
} }
} }
} }
/* /*
* Notifications * Notifications
*/ */
notification address-pool-utilization-threshold-exceeded { notification address-pool-utilization-threshold-exceeded {
if-feature na-assignment; if-feature "na-assignment";
description description
"Notification sent when the address pool "Notification sent when the address pool
utilization exceeds the threshold configured in utilization exceeds the threshold configured in
max-address-utilization."; max-address-utilization.";
leaf pool-id { leaf pool-id {
type leafref { type leafref {
path "/dhcpv6-server/allocation-ranges/" + path "/dhcpv6-server/allocation-ranges/"
"allocation-range/address-pools/address-pool" + + "allocation-range/address-pools/address-pool"
"/pool-id"; + "/pool-id";
} }
mandatory true; mandatory true;
description description
"Leafref to the address pool that the notification is being "Leafref to the address pool that the notification is being
generated for."; generated for.";
} }
leaf total-pool-addresses { leaf total-pool-addresses {
type uint64; type uint64;
mandatory true; mandatory true;
description description
"Total number of addresses in the pool (end-address minus "Total number of addresses in the pool (end-address minus
start-address plus one)."; start-address plus one).";
} }
leaf max-allocated-addresses { leaf max-allocated-addresses {
type uint64; type uint64;
mandatory true; mandatory true;
description description
"Maximum number of addresses that can be simultaneously "Maximum number of addresses that can be simultaneously
allocated from the pool. This value may be less than the allocated from the pool. This value may be less than the
count of total addresses. Calculated as the count of total addresses. Calculated as the
max-address-utilization (percentage) of the max-address-utilization (percentage) of the
total-pool-addresses and rounded up."; total-pool-addresses and rounded up.";
} }
leaf allocated-address-count { leaf allocated-address-count {
type uint64; type uint64;
mandatory true; mandatory true;
description description
"Number of addresses allocated from the pool."; "Number of addresses allocated from the pool.";
} }
} }
notification prefix-pool-utilization-threshold-exceeded { notification prefix-pool-utilization-threshold-exceeded {
if-feature prefix-delegation; if-feature "prefix-delegation";
description description
"Notification sent when the prefix pool utilization "Notification sent when the prefix pool utilization
exceeds the threshold configured in exceeds the threshold configured in
max-pd-space-utilization."; max-pd-space-utilization.";
leaf pool-id { leaf pool-id {
type leafref { type leafref {
path "/dhcpv6-server/allocation-ranges" + path "/dhcpv6-server/allocation-ranges"
"/allocation-range/prefix-pools/prefix-pool/pool-id"; + "/allocation-range/prefix-pools/prefix-pool/pool-id";
} }
mandatory true; mandatory true;
description description
"Unique identifier for the pool."; "Unique identifier for the pool.";
} }
leaf total-pool-prefixes { leaf total-pool-prefixes {
type uint64; type uint64;
mandatory true; mandatory true;
description description
"Total number of prefixes in the pool."; "Total number of prefixes in the pool.";
} }
leaf max-allocated-prefixes { leaf max-allocated-prefixes {
type uint64; type uint64;
mandatory true; mandatory true;
description description
"Maximum number of prefixes that can be simultaneously "Maximum number of prefixes that can be simultaneously
allocated from the pool. This value may be less than allocated from the pool. This value may be less than
the count of total prefixes. Calculated as the the count of total prefixes. Calculated as the
max-prefix-utilization (percentage) of the max-prefix-utilization (percentage) of the
total-pool-prefixes and rounded up."; total-pool-prefixes and rounded up.";
} }
leaf allocated-prefixes-count { leaf allocated-prefixes-count {
type uint64; type uint64;
mandatory true; mandatory true;
description description
"Number of prefixes allocated from the pool."; "Number of prefixes allocated from the pool.";
} }
} }
notification invalid-client-detected { notification invalid-client-detected {
description description
"Notification sent when the server detects an invalid "Notification sent when the server detects an invalid
client."; client.";
leaf message-type { leaf message-type {
type enumeration { type enumeration {
enum solicit { enum solicit {
description description
"Solicit (1) message."; "Solicit (1) message.";
} }
enum request { enum request {
description description
"Request (3) message."; "Request (3) message.";
} }
skipping to change at line 2281 skipping to change at line 2314
description description
"Decline (9) message."; "Decline (9) message.";
} }
enum info-request { enum info-request {
description description
"Information request (11) message."; "Information request (11) message.";
} }
} }
description description
"The message type received by the server that has caused "The message type received by the server that has caused
the error."; the error.";
} }
leaf duid { leaf duid {
type dhc6:duid; type dhc6:duid;
description description
"Client DUID."; "Client DUID.";
} }
leaf description { leaf description {
type string; type string;
description description
"Description of the event (e.g., an error code or log "Description of the event (e.g., an error code or log
message)."; message).";
} }
} }
notification decline-received { notification decline-received {
if-feature na-assignment; if-feature "na-assignment";
description description
"Notification sent when the server has received a Decline (9) "Notification sent when the server has received a Decline (9)
message from a client."; message from a client.";
leaf duid { leaf duid {
type dhc6:duid; type dhc6:duid;
description description
"Client DUID."; "Client DUID.";
} }
list declined-resources { list declined-resources {
description description
"List of declined addresses and/or prefixes."; "List of declined addresses and/or prefixes.";
choice resource-type { choice resource-type {
description description
skipping to change at line 2333 skipping to change at line 2366
"Prefix that has been declined."; "Prefix that has been declined.";
} }
} }
} }
} }
} }
notification non-success-code-sent { notification non-success-code-sent {
description description
"Notification sent when the server responded to a client with "Notification sent when the server responded to a client with
a non-success status code."; a non-success status code.";
leaf duid { leaf duid {
type dhc6:duid; type dhc6:duid;
description description
"Client DUID."; "Client DUID.";
} }
uses dhc6:status; uses dhc6:status;
} }
} }
<CODE ENDS> <CODE ENDS>
4.3. DHCPv6 Relay YANG Module 4.3. DHCPv6 Relay YANG Module
This module imports typedefs from [RFC6991] and modules defined in This module imports typedefs from [RFC6991] and modules defined in
[RFC8341] and [RFC8343]. [RFC8341] and [RFC8343].
<CODE BEGINS> file "ietf-dhcpv6-relay@2022-05-04.yang" <CODE BEGINS> file "ietf-dhcpv6-relay@2022-06-20.yang"
module ietf-dhcpv6-relay { module ietf-dhcpv6-relay {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-relay"; namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-relay";
prefix "dhc6-rly"; prefix dhc6-rly;
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
reference reference
"RFC 6991: Common YANG Data Types"; "RFC 6991: Common YANG Data Types";
} }
import ietf-yang-types { import ietf-yang-types {
prefix yang; prefix yang;
reference reference
"RFC 6991: Common YANG Data Types"; "RFC 6991: Common YANG Data Types";
} }
import ietf-dhcpv6-common { import ietf-dhcpv6-common {
prefix dhc6; prefix dhc6;
reference reference
"RFC 9243: A YANG Data Model for DHCPv6 Configuration"; "RFC 9243: A YANG Data Model for DHCPv6 Configuration";
} }
import ietf-interfaces { import ietf-interfaces {
prefix if; prefix if;
reference reference
"RFC 8343: A YANG Data Model for Interface Management"; "RFC 8343: A YANG Data Model for Interface Management";
} }
import ietf-netconf-acm { import ietf-netconf-acm {
prefix nacm; prefix nacm;
reference reference
"RFC 8341: Network Configuration Access Control Model"; "RFC 8341: Network Configuration Access Control Model";
} }
organization organization
"IETF Dynamic Host Configuration (DHC) Working Group"; "IETF Dynamic Host Configuration (DHC) Working Group";
contact contact
"WG Web: <https://datatracker.ietf.org/wg/dhc/> "WG Web: <https://datatracker.ietf.org/wg/dhc/>
WG List: <mailto:dhcwg@ietf.org> WG List: <mailto:dhcwg@ietf.org>
Author: Yong Cui <yong@csnet1.cs.tsinghua.edu.cn> Author: Yong Cui <yong@csnet1.cs.tsinghua.edu.cn>
Author: Linhui Sun <lh.sunlinh@gmail.com> Author: Linhui Sun <lh.sunlinh@gmail.com>
Editor: Ian Farrer <ian.farrer@telekom.de> Editor: Ian Farrer <ian.farrer@telekom.de>
Author: Sladjana Zeichlin <sladjana.zechlin@telekom.de> Author: Sladjana Zeichlin <sladjana.zechlin@telekom.de>
Author: Zihao He <hezihao9512@gmail.com> Author: Zihao He <hezihao9512@gmail.com>
Author: Michal Nowikowski <godfryd@isc.org>"; Author: Michal Nowikowski <godfryd@isc.org>";
description description
"This YANG module defines components necessary for the "This YANG module defines components necessary for the
configuration and management of DHCPv6 relays. configuration and management of DHCPv6 relays.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as 'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here. they appear in all capitals, as shown here.
Copyright (c) 2022 IETF Trust and the persons identified as Copyright (c) 2022 IETF Trust and the persons identified as
authors of the code. All rights reserved. authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to without modification, is permitted pursuant to, and subject to
the license terms contained in, the Revised BSD License set the license terms contained in, the Revised BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
(https://trustee.ietf.org/license-info). (https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 9243 This version of this YANG module is part of RFC 9243
(https://www.rfc-editor.org/info/rfc9243); see the RFC itself (https://www.rfc-editor.org/info/rfc9243); see the RFC itself
for full legal notices."; for full legal notices.";
revision 2022-05-04 { revision 2022-06-20 {
description description
"Initial revision."; "Initial revision.";
reference reference
"RFC 9243: A YANG Data Model for DHCPv6 Configuration"; "RFC 9243: A YANG Data Model for DHCPv6 Configuration";
} }
/* /*
* Features * Features
*/ */
feature prefix-delegation { feature prefix-delegation {
description description
"Enable if the relay functions as a delegating router for "Enable if the relay functions as a delegating router for
DHCPv6 prefix delegation."; DHCPv6 prefix delegation.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 6.3"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 6.3";
} }
/* /*
* Groupings * Groupings
*/ */
grouping pd-lease-state { grouping pd-lease-state {
description description
"State data for the relay."; "State data for the relay.";
list pd-leases { list pd-leases {
key ia-pd-prefix; key "ia-pd-prefix";
config false; config false;
description description
"Information about an active IA_PD prefix delegation."; "Information about an active IA_PD prefix delegation.";
leaf ia-pd-prefix { leaf ia-pd-prefix {
type inet:ipv6-prefix; type inet:ipv6-prefix;
description description
"Prefix that is delegated."; "Prefix that is delegated.";
} }
leaf last-renew { leaf last-renew {
type yang:date-and-time; type yang:date-and-time;
description description
"Time of the last successful refresh or renew of the "Time of the last successful refresh or renew of the
delegated prefix."; delegated prefix.";
} }
leaf client-peer-address { leaf client-peer-address {
type inet:ipv6-address; type inet:ipv6-address;
description description
"Peer-address of the leasing client."; "Peer-address of the leasing client.";
} }
leaf client-duid { leaf client-duid {
type dhc6:duid; type dhc6:duid;
description description
"DUID of the leasing client."; "DUID of the leasing client.";
skipping to change at line 2489 skipping to change at line 2517
} }
} }
grouping message-statistics { grouping message-statistics {
description description
"Contains counters for the different DHCPv6 message types."; "Contains counters for the different DHCPv6 message types.";
leaf discontinuity-time { leaf discontinuity-time {
type yang:date-and-time; type yang:date-and-time;
description description
"The time on the most recent occasion at which any one or "The time on the most recent occasion at which any one or
more of DHCPv6 relay's counters suffered a discontinuity. more of DHCPv6 relay's counters suffered a discontinuity.
If no such discontinuities have occurred since the last If no such discontinuities have occurred since the last
re-initialization of the local management subsystem, then re-initialization of the local management subsystem, then
this node contains the time the local management subsystem this node contains the time the local management subsystem
re-initialized itself."; re-initialized itself.";
} }
leaf solicit-received-count { leaf solicit-received-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Solicit (1) messages received."; "Number of Solicit (1) messages received.";
} }
leaf advertise-sent-count { leaf advertise-sent-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Advertise (2) messages sent."; "Number of Advertise (2) messages sent.";
} }
leaf request-received-count { leaf request-received-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Request (3) messages received."; "Number of Request (3) messages received.";
} }
leaf confirm-received-count { leaf confirm-received-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Confirm (4) messages received."; "Number of Confirm (4) messages received.";
} }
leaf renew-received-count { leaf renew-received-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Renew (5) messages received."; "Number of Renew (5) messages received.";
} }
leaf rebind-received-count { leaf rebind-received-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Rebind (6) messages received."; "Number of Rebind (6) messages received.";
} }
leaf reply-sent-count { leaf reply-sent-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Reply (7) messages sent."; "Number of Reply (7) messages sent.";
} }
leaf release-received-count { leaf release-received-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Release (8) messages received."; "Number of Release (8) messages received.";
} }
leaf decline-received-count { leaf decline-received-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Decline (9) messages received."; "Number of Decline (9) messages received.";
} }
leaf reconfigure-sent-count { leaf reconfigure-sent-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Reconfigure (10) messages sent."; "Number of Reconfigure (10) messages sent.";
} }
leaf information-request-received-count { leaf information-request-received-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Information-request (11) messages "Number of Information-request (11) messages
received."; received.";
} }
leaf unknown-message-received-count { leaf unknown-message-received-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of messages of unknown type that have "Number of messages of unknown type that have
been received."; been received.";
} }
leaf unknown-message-sent-count { leaf unknown-message-sent-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of messages of unknown type that have "Number of messages of unknown type that have
been sent."; been sent.";
} }
leaf discarded-message-count { leaf discarded-message-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of messages that have been discarded "Number of messages that have been discarded
for any reason."; for any reason.";
} }
} }
grouping global-statistics { grouping global-statistics {
description description
"Global statistics for the device."; "Global statistics for the device.";
leaf relay-forward-sent-count { leaf relay-forward-sent-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Relay-forward (12) messages sent."; "Number of Relay-forward (12) messages sent.";
} }
leaf relay-forward-received-count { leaf relay-forward-received-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Relay-forward (12) messages received."; "Number of Relay-forward (12) messages received.";
} }
leaf relay-reply-received-count { leaf relay-reply-received-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Relay-reply (13) messages received."; "Number of Relay-reply (13) messages received.";
} }
leaf relay-forward-unknown-sent-count { leaf relay-forward-unknown-sent-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Relay-forward (12) messages containing "Number of Relay-forward (12) messages containing
a message of unknown type sent."; a message of unknown type sent.";
} }
leaf relay-forward-unknown-received-count { leaf relay-forward-unknown-received-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Relay-forward (12) messages containing "Number of Relay-forward (12) messages containing
a message of unknown type received."; a message of unknown type received.";
} }
leaf discarded-message-count { leaf discarded-message-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of messages that have been discarded "Number of messages that have been discarded
for any reason."; for any reason.";
} }
} }
grouping interface-id-option-group { grouping interface-id-option-group {
description description
"OPTION_INTERFACE_ID (18) Interface-Id Option."; "OPTION_INTERFACE_ID (18) Interface-Id Option.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 21.18"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 21.18";
container interface-id-option { container interface-id-option {
description description
"OPTION_INTERFACE_ID (18) Interface-Id Option."; "OPTION_INTERFACE_ID (18) Interface-Id Option.";
leaf interface-id { leaf interface-id {
type binary; type binary;
description description
"An opaque value of arbitrary length generated by the "An opaque value of arbitrary length generated by the
relay agent to identify one of the relay agent's relay agent to identify one of the relay agent's
interfaces."; interfaces.";
} }
} }
} }
/* /*
* Data Nodes * Data Nodes
*/ */
container dhcpv6-relay { container dhcpv6-relay {
description description
"This container contains the configuration data nodes "This container contains the configuration data nodes
for the relay."; for the relay.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 19"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 19";
leaf enabled { leaf enabled {
type boolean; type boolean;
description description
"Globally enables the DHCP relay function."; "Globally enables the DHCP relay function.";
} }
list relay-if { list relay-if {
key if-name; key "if-name";
description description
"List of interfaces configured for DHCPv6 relaying."; "List of interfaces configured for DHCPv6 relaying.";
leaf if-name { leaf if-name {
type if:interface-ref; type if:interface-ref;
description description
"interface-ref to the relay interface."; "interface-ref to the relay interface.";
} }
leaf enabled { leaf enabled {
type boolean; type boolean;
description description
"Enables the DHCP relay function for this interface."; "Enables the DHCP relay function for this interface.";
} }
leaf-list destination-address { leaf-list destination-address {
type inet:ipv6-address; type inet:ipv6-address;
description description
"Each DHCPv6 relay agent may be configured with a list "Each DHCPv6 relay agent may be configured with a list
of destination addresses for relayed messages. of destination addresses for relayed messages.
The list may include unicast addresses, multicast The list may include unicast addresses, multicast
addresses, or other valid addresses."; addresses, or other valid addresses.";
} }
leaf link-address { leaf link-address {
type inet:ipv6-address; type inet:ipv6-address;
description description
"An address that may be used by the server to identify "An address that may be used by the server to identify
the link on which the client is located."; the link on which the client is located.";
} }
container relay-options { container relay-options {
description description
"Definitions for DHCPv6 options that can be sent "Definitions for DHCPv6 options that can be sent
by the relay are augmented to this location from other by the relay are augmented to this location from other
YANG modules as required."; YANG modules as required.";
uses dhc6:auth-option-group; uses dhc6:auth-option-group;
uses interface-id-option-group; uses interface-id-option-group;
} }
container statistics { container statistics {
description description
"DHCPv6 message counters for the relay's interface."; "DHCPv6 message counters for the relay's interface.";
uses message-statistics; uses message-statistics;
} }
container prefix-delegation { container prefix-delegation {
if-feature prefix-delegation; if-feature "prefix-delegation";
presence "Enables prefix delegation for this interface."; presence "Enables prefix delegation for this interface.";
description description
"Controls and holds state information for prefix "Controls and holds state information for prefix
delegation."; delegation.";
uses pd-lease-state; uses pd-lease-state;
} }
} }
container statistics { container statistics {
description description
"Global DHCPv6 message counters for the relay."; "Global DHCPv6 message counters for the relay.";
uses global-statistics; uses global-statistics;
} }
} }
/* /*
* RPCs * RPCs
*/ */
rpc clear-prefix-entry { rpc clear-prefix-entry {
nacm:default-deny-all; nacm:default-deny-all;
if-feature prefix-delegation; if-feature "prefix-delegation";
description description
"Clears an entry for an active delegated prefix "Clears an entry for an active delegated prefix
from the relay."; from the relay.";
reference "RFC 8987: DHCPv6 Prefix Delegating Relay Requirements, reference
Section 4.4"; "RFC 8987: DHCPv6 Prefix Delegating Relay Requirements,
Section 4.4";
input { input {
leaf lease-prefix { leaf lease-prefix {
type leafref { type leafref {
path "/dhcpv6-relay/relay-if/prefix-delegation" + path "/dhcpv6-relay/relay-if/prefix-delegation"
"/pd-leases/ia-pd-prefix"; + "/pd-leases/ia-pd-prefix";
} }
mandatory true; mandatory true;
description description
"IPv6 prefix of an active lease entry that will "IPv6 prefix of an active lease entry that will
be deleted from the relay."; be deleted from the relay.";
} }
} }
output { output {
leaf return-message { leaf return-message {
type string; type string;
description description
"Response message from the server. If available, a "Response message from the server. If available, a
language identifier should be included in the message."; language identifier should be included in the message.";
reference "BCP 18 (RFC 2277) IETF Policy on Character Sets reference
and Languages, Section 4.2"; "BCP 18 (RFC 2277) IETF Policy on Character Sets
and Languages, Section 4.2";
} }
} }
} }
rpc clear-client-prefixes { rpc clear-client-prefixes {
nacm:default-deny-all; nacm:default-deny-all;
if-feature prefix-delegation; if-feature "prefix-delegation";
description description
"Clears all active prefix entries for a single client."; "Clears all active prefix entries for a single client.";
reference "RFC 8987: DHCPv6 Prefix Delegating Relay Requirements, reference
Section 4.4"; "RFC 8987: DHCPv6 Prefix Delegating Relay Requirements,
input { Section 4.4";
input {
leaf client-duid { leaf client-duid {
type dhc6:duid; type dhc6:duid;
mandatory true; mandatory true;
description description
"DUID of the client."; "DUID of the client.";
} }
} }
output { output {
leaf return-message { leaf return-message {
type string; type string;
description description
"Response message from the server. If available, a "Response message from the server. If available, a
language identifier should be included in the message."; language identifier should be included in the message.";
reference "BCP 18 (RFC 2277) IETF Policy on Character Sets reference
and Languages, Section 4.2"; "BCP 18 (RFC 2277) IETF Policy on Character Sets
and Languages, Section 4.2";
} }
} }
} }
rpc clear-interface-prefixes { rpc clear-interface-prefixes {
nacm:default-deny-all; nacm:default-deny-all;
if-feature prefix-delegation; if-feature "prefix-delegation";
description description
"Clears all delegated prefix bindings from an "Clears all delegated prefix bindings from an
interface on the relay."; interface on the relay.";
reference "RFC 8987: DHCPv6 Prefix Delegating Relay Requirements, reference
Section 4.4"; "RFC 8987: DHCPv6 Prefix Delegating Relay Requirements,
Section 4.4";
input { input {
leaf interface { leaf interface {
type leafref { type leafref {
path "/dhcpv6-relay/relay-if/if-name"; path "/dhcpv6-relay/relay-if/if-name";
} }
mandatory true; mandatory true;
description description
"Reference to the relay interface that will have all "Reference to the relay interface that will have all
active prefix delegation bindings deleted."; active prefix delegation bindings deleted.";
} }
} }
output { output {
leaf return-message { leaf return-message {
type string; type string;
description description
"Response message from the server. If available, a "Response message from the server. If available, a
language identifier should be included in the message."; language identifier should be included in the message.";
reference "BCP 18 (RFC 2277) IETF Policy on Character Sets reference
and Languages, Section 4.2"; "BCP 18 (RFC 2277) IETF Policy on Character Sets
and Languages, Section 4.2";
} }
} }
} }
/* /*
* Notifications * Notifications
*/ */
notification relay-event { notification relay-event {
description description
"DHCPv6 relay event notifications."; "DHCPv6 relay event notifications.";
container topology-change { container topology-change {
description description
"Raised if the entry for an interface with DHCPv6-related "Raised if the entry for an interface with DHCPv6-related
configuration or state is removed from if:interface-refs."; configuration or state is removed from if:interface-refs.";
leaf relay-if-name { leaf relay-if-name {
type leafref { type leafref {
path "/dhcpv6-relay/relay-if/if-name"; path "/dhcpv6-relay/relay-if/if-name";
} }
description description
"Name of the interface that has been removed."; "Name of the interface that has been removed.";
} }
leaf last-ipv6-addr { leaf last-ipv6-addr {
type inet:ipv6-address; type inet:ipv6-address;
description description
skipping to change at line 2846 skipping to change at line 2882
} }
} }
} }
<CODE ENDS> <CODE ENDS>
4.4. DHCPv6 Client YANG Module 4.4. DHCPv6 Client YANG Module
This module imports typedefs from [RFC6991] and the module defined in This module imports typedefs from [RFC6991] and the module defined in
[RFC8343]. [RFC8343].
<CODE BEGINS> file "ietf-dhcpv6-client@2022-05-04.yang" <CODE BEGINS> file "ietf-dhcpv6-client@2022-06-20.yang"
module ietf-dhcpv6-client { module ietf-dhcpv6-client {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-client"; namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-client";
prefix "dhc6-clnt"; prefix dhc6-clnt;
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
reference reference
"RFC 6991: Common YANG Data Types"; "RFC 6991: Common YANG Data Types";
} }
import ietf-yang-types { import ietf-yang-types {
prefix yang; prefix yang;
reference reference
"RFC 6991: Common YANG Data Types"; "RFC 6991: Common YANG Data Types";
} }
import ietf-dhcpv6-common { import ietf-dhcpv6-common {
prefix dhc6; prefix dhc6;
reference reference
"RFC 9243: A YANG Data Model for DHCPv6 Configuration"; "RFC 9243: A YANG Data Model for DHCPv6 Configuration";
} }
import ietf-interfaces { import ietf-interfaces {
prefix if; prefix if;
reference reference
"RFC 8343: A YANG Data Model for Interface Management"; "RFC 8343: A YANG Data Model for Interface Management";
} }
organization organization
"IETF Dynamic Host Configuration (DHC) Working Group"; "IETF Dynamic Host Configuration (DHC) Working Group";
contact contact
"WG Web: <https://datatracker.ietf.org/wg/dhc/> "WG Web: <https://datatracker.ietf.org/wg/dhc/>
WG List: <mailto:dhcwg@ietf.org> WG List: <mailto:dhcwg@ietf.org>
Author: Yong Cui <yong@csnet1.cs.tsinghua.edu.cn> Author: Yong Cui <yong@csnet1.cs.tsinghua.edu.cn>
Author: Linhui Sun <lh.sunlinh@gmail.com> Author: Linhui Sun <lh.sunlinh@gmail.com>
Editor: Ian Farrer <ian.farrer@telekom.de> Editor: Ian Farrer <ian.farrer@telekom.de>
Author: Sladjana Zeichlin <sladjana.zechlin@telekom.de> Author: Sladjana Zeichlin <sladjana.zechlin@telekom.de>
Author: Zihao He <hezihao9512@gmail.com> Author: Zihao He <hezihao9512@gmail.com>
Author: Michal Nowikowski <godfryd@isc.org>"; Author: Michal Nowikowski <godfryd@isc.org>";
description description
"This YANG module defines components necessary for the "This YANG module defines components necessary for the
configuration and management of DHCPv6 clients. configuration and management of DHCPv6 clients.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
are to be interpreted as described in BCP 14 (RFC 2119) are to be interpreted as described in BCP 14 (RFC 2119)
(RFC 8174) when, and only when, they appear in all (RFC 8174) when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
Copyright (c) 2022 IETF Trust and the persons identified as Copyright (c) 2022 IETF Trust and the persons identified as
authors of the code. All rights reserved. authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to without modification, is permitted pursuant to, and subject to
the license terms contained in, the Revised BSD License set the license terms contained in, the Revised BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
(https://trustee.ietf.org/license-info). (https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 9243 This version of this YANG module is part of RFC 9243
(https://www.rfc-editor.org/info/rfc9243); see the RFC itself (https://www.rfc-editor.org/info/rfc9243); see the RFC itself
for full legal notices."; for full legal notices.";
revision 2022-05-04 { revision 2022-06-20 {
description description
"Initial revision."; "Initial revision.";
reference reference
"RFC 9243: A YANG Data Model for DHCPv6 Configuration"; "RFC 9243: A YANG Data Model for DHCPv6 Configuration";
} }
/* /*
* Features * Features
*/ */
feature non-temp-addr { feature non-temp-addr {
description description
"Denotes that the client supports DHCPv6 non-temporary address "Denotes that the client supports DHCPv6 non-temporary address
allocations."; allocations.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 6.2"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 6.2";
} }
feature temp-addr { feature temp-addr {
description description
"Denotes that the client supports DHCPv6 temporary address "Denotes that the client supports DHCPv6 temporary address
allocations."; allocations.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 6.5"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 6.5";
} }
feature prefix-delegation { feature prefix-delegation {
description description
"Denotes that the client implements DHCPv6 prefix "Denotes that the client implements DHCPv6 prefix
delegation."; delegation.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 6.3"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 6.3";
} }
feature anon-profile { feature anon-profile {
description description
"Denotes that the client supports DHCP anonymity profiles."; "Denotes that the client supports DHCP anonymity profiles.";
reference "RFC 7844: Anonymity Profiles for DHCP Clients"; reference
"RFC 7844: Anonymity Profiles for DHCP Clients";
} }
/* /*
* Groupings * Groupings
*/ */
grouping message-statistics { grouping message-statistics {
description description
"Counters for DHCPv6 messages."; "Counters for DHCPv6 messages.";
leaf discontinuity-time { leaf discontinuity-time {
type yang:date-and-time; type yang:date-and-time;
description description
"The time on the most recent occasion at which any one or "The time on the most recent occasion at which any one or
more of DHCPv6 client's counters suffered a discontinuity. more of DHCPv6 client's counters suffered a discontinuity.
If no such discontinuities have occurred since the last If no such discontinuities have occurred since the last
re-initialization of the local management subsystem, then re-initialization of the local management subsystem, then
this node contains the time the local management subsystem this node contains the time the local management subsystem
re-initialized itself."; re-initialized itself.";
} }
leaf solicit-count { leaf solicit-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Solicit (1) messages sent."; "Number of Solicit (1) messages sent.";
} }
leaf advertise-count { leaf advertise-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Advertise (2) messages received."; "Number of Advertise (2) messages received.";
} }
leaf request-count { leaf request-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Request (3) messages sent."; "Number of Request (3) messages sent.";
} }
leaf confirm-count { leaf confirm-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Confirm (4) messages sent."; "Number of Confirm (4) messages sent.";
} }
leaf renew-count { leaf renew-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Renew (5) messages sent."; "Number of Renew (5) messages sent.";
} }
leaf rebind-count { leaf rebind-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Rebind (6) messages sent."; "Number of Rebind (6) messages sent.";
} }
leaf reply-count { leaf reply-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Reply (7) messages received."; "Number of Reply (7) messages received.";
} }
leaf release-count { leaf release-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Release (8) messages sent."; "Number of Release (8) messages sent.";
} }
leaf decline-count { leaf decline-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Decline (9) messages sent."; "Number of Decline (9) messages sent.";
} }
leaf reconfigure-count { leaf reconfigure-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Reconfigure (10) messages received."; "Number of Reconfigure (10) messages received.";
} }
leaf information-request-count { leaf information-request-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of Information-request (11) messages sent."; "Number of Information-request (11) messages sent.";
} }
leaf discarded-message-count { leaf discarded-message-count {
type yang:counter32; type yang:counter32;
config "false"; config false;
description description
"Number of messages that have been discarded for any "Number of messages that have been discarded for any
reason."; reason.";
} }
} }
grouping lease-state { grouping lease-state {
description description
"Information about the active IA_NA lease."; "Information about the active IA_NA lease.";
leaf preferred-lifetime { leaf preferred-lifetime {
type dhc6:timer-seconds32; type dhc6:timer-seconds32;
description description
"The preferred lifetime for the leased address "The preferred lifetime for the leased address
expressed in seconds."; expressed in seconds.";
} }
leaf valid-lifetime { leaf valid-lifetime {
type dhc6:timer-seconds32; type dhc6:timer-seconds32;
description description
"The valid lifetime for the leased address expressed "The valid lifetime for the leased address expressed
in seconds."; in seconds.";
} }
leaf allocation-time { leaf allocation-time {
type yang:date-and-time; type yang:date-and-time;
description description
"Time and date that the address was first leased."; "Time and date that the address was first leased.";
} }
leaf last-renew-rebind { leaf last-renew-rebind {
type yang:date-and-time; type yang:date-and-time;
description description
"Time of the last successful renew or rebind of the "Time of the last successful renew or rebind of the
leased address."; leased address.";
} }
leaf server-duid { leaf server-duid {
type dhc6:duid; type dhc6:duid;
description description
"DUID of the leasing server."; "DUID of the leasing server.";
} }
uses dhc6:status; uses dhc6:status;
} }
grouping option-request-option-group { grouping option-request-option-group {
description description
"OPTION_ORO (6) Option Request Option. A client MUST include "OPTION_ORO (6) Option Request Option. A client MUST include
an Option Request option in a Solicit, Request, Renew, an Option Request option in a Solicit, Request, Renew,
Rebind, or Information-request message to inform the server Rebind, or Information-request message to inform the server
about options the client wants the server to send to the about options the client wants the server to send to the
client."; client.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Sections 21.23, 21.24, 21.25, & 21.7"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Sections 21.23, 21.24, 21.25, & 21.7";
container option-request-option { container option-request-option {
description description
"OPTION_ORO (6) Option Request Option."; "OPTION_ORO (6) Option Request Option.";
leaf-list oro-option { leaf-list oro-option {
type uint16; type uint16;
description description
"List of options that the client is requesting, "List of options that the client is requesting,
identified by option code. This list MUST include the identified by option code. This list MUST include the
code for option SOL_MAX_RT (82) when included in a code for option SOL_MAX_RT (82) when included in a
Solicit message. If this option is being sent in an Solicit message. If this option is being sent in an
Information-request message, then the code for option Information-request message, then the code for option
OPTION_INFORMATION_REFRESH_TIME (32) and INF_MAX_RT (83) OPTION_INFORMATION_REFRESH_TIME (32) and INF_MAX_RT (83)
MUST be included."; MUST be included.";
} }
} }
} }
grouping user-class-option-group { grouping user-class-option-group {
description description
"OPTION_USER_CLASS (15) User Class Option"; "OPTION_USER_CLASS (15) User Class Option";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 21.15"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 21.15";
container user-class-option { container user-class-option {
presence "Configures the option"; presence "Configures the option";
description description
"OPTION_USER_CLASS (15) User Class Option."; "OPTION_USER_CLASS (15) User Class Option.";
list user-class-data-instance { list user-class-data-instance {
key user-class-data-id; key "user-class-data-id";
min-elements 1; min-elements 1;
description description
"The user classes of which the client is a member."; "The user classes of which the client is a member.";
leaf user-class-data-id { leaf user-class-data-id {
type uint8; type uint8;
description description
"User class data ID."; "User class data ID.";
} }
leaf user-class-data { leaf user-class-data {
type binary; type binary;
description description
"Opaque field representing a User Class of which the "Opaque field representing a User Class of which the
client is a member."; client is a member.";
} }
} }
} }
} }
grouping vendor-class-option-group { grouping vendor-class-option-group {
description description
"OPTION_VENDOR_CLASS (16) Vendor Class Option."; "OPTION_VENDOR_CLASS (16) Vendor Class Option.";
reference "RFC 8415: Dynamic Host Configuration Protocol reference
for IPv6 (DHCPv6), Section 21.16"; "RFC 8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6), Section 21.16";
container vendor-class-option { container vendor-class-option {
description description
"OPTION_VENDOR_CLASS (16) Vendor Class Option."; "OPTION_VENDOR_CLASS (16) Vendor Class Option.";
list vendor-class-option-instances { list vendor-class-option-instances {
key enterprise-number; key "enterprise-number";
description description
"The vendor class option allows for multiple instances "The vendor class option allows for multiple instances
in a single message. Each list entry defines the contents in a single message. Each list entry defines the contents
of an instance of the option."; of an instance of the option.";
leaf enterprise-number { leaf enterprise-number {
type uint32; type uint32;
description description
"The vendor's registered Enterprise Number, as "The vendor's registered Enterprise Number, as
maintained by IANA."; maintained by IANA.";
} }
list vendor-class-data-element { list vendor-class-data-element {
key vendor-class-data-id; key "vendor-class-data-id";
description description
"The vendor classes of which the client is a member."; "The vendor classes of which the client is a member.";
leaf vendor-class-data-id { leaf vendor-class-data-id {
type uint8; type uint8;
description description
"Vendor class data ID."; "Vendor class data ID.";
} }
leaf vendor-class-data { leaf vendor-class-data {
type binary; type binary;
description description
"Opaque field representing a vendor class of which "Opaque field representing a vendor class of which
the client is a member."; the client is a member.";
} }
} }
} }
} }
} }
/* /*
* Data Nodes * Data Nodes
*/ */
container dhcpv6-client { container dhcpv6-client {
description description
"DHCPv6 client configuration and state."; "DHCPv6 client configuration and state.";
leaf enabled { leaf enabled {
type boolean; type boolean;
default true; default "true";
description description
"Globally enables the DHCP client function."; "Globally enables the DHCP client function.";
} }
leaf client-duid { leaf client-duid {
if-feature "(non-temp-addr or prefix-delegation " + if-feature "(non-temp-addr or prefix-delegation "
"or temp-addr) and not anon-profile"; + "or temp-addr) and not anon-profile";
type dhc6:duid; type dhc6:duid;
description description
"A single client DUID that will be used by all of the "A single client DUID that will be used by all of the
client's DHCPv6-enabled interfaces."; client's DHCPv6-enabled interfaces.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 11"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 11";
} }
list client-if { list client-if {
key if-name; key "if-name";
description description
"The list of interfaces for which the client will "The list of interfaces for which the client will
be requesting DHCPv6 configuration."; be requesting DHCPv6 configuration.";
leaf if-name { leaf if-name {
type if:interface-ref; type if:interface-ref;
mandatory true; mandatory true;
description description
"Reference to the interface entry that the requested "Reference to the interface entry that the requested
configuration is relevant to."; configuration is relevant to.";
} }
leaf enabled { leaf enabled {
type boolean; type boolean;
default true; default "true";
description description
"Enables the DHCP client function for this interface."; "Enables the DHCP client function for this interface.";
} }
leaf interface-duid { leaf interface-duid {
if-feature "(non-temp-addr or prefix-delegation " + if-feature "(non-temp-addr or prefix-delegation "
"or temp-addr) and anon-profile"; + "or temp-addr) and anon-profile";
type dhc6:duid; type dhc6:duid;
description description
"Per-interface client DUIDs for use with DHCP anonymity "Per-interface client DUIDs for use with DHCP anonymity
profiles."; profiles.";
reference "RFC 7844: Anonymity Profiles for DHCP Clients, reference
Section 3"; "RFC 7844: Anonymity Profiles for DHCP Clients,
Section 3";
} }
container client-configured-options { container client-configured-options {
description description
"Definitions for DHCPv6 options that can be be sent by "Definitions for DHCPv6 options that can be sent by
the client. Additional option definitions can be the client. Additional option definitions can be
augmented to this location from other YANG modules as augmented to this location from other YANG modules as
required."; required.";
uses option-request-option-group; uses option-request-option-group;
uses dhc6:rapid-commit-option-group; uses dhc6:rapid-commit-option-group;
uses user-class-option-group; uses user-class-option-group;
uses vendor-class-option-group; uses vendor-class-option-group;
uses dhc6:vendor-specific-information-option-group; uses dhc6:vendor-specific-information-option-group;
uses dhc6:reconfigure-accept-option-group; uses dhc6:reconfigure-accept-option-group;
} }
list ia-na { list ia-na {
if-feature non-temp-addr; if-feature "non-temp-addr";
key ia-id; key "ia-id";
description description
"Configuration relevant for an Identity Association "Configuration relevant for an Identity Association
for Non-temporary Addresses (IA_NA)."; for Non-temporary Addresses (IA_NA).";
reference "RFC 8415: Dynamic Host Configuration Protocol reference
for IPv6 (DHCPv6), Section 13.1"; "RFC 8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6), Section 13.1";
leaf ia-id { leaf ia-id {
type uint32; type uint32;
description description
"A unique identifier for this IA_NA."; "A unique identifier for this IA_NA.";
reference "RFC 8415: Dynamic Host Configuration Protocol reference
for IPv6 (DHCPv6), Section 12"; "RFC 8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6), Section 12";
} }
container ia-na-options { container ia-na-options {
description description
"An augmentation point for additional options "An augmentation point for additional options
that the client may send in the IA_NA-options field that the client may send in the IA_NA-options field
of OPTION_IA_NA."; of OPTION_IA_NA.";
} }
container lease-state { container lease-state {
config false; config false;
description description
"Information about the active IA_NA lease."; "Information about the active IA_NA lease.";
leaf ia-na-address { leaf ia-na-address {
type inet:ipv6-address; type inet:ipv6-address;
description description
"Address that is currently leased."; "Address that is currently leased.";
} }
leaf lease-t1 { leaf lease-t1 {
type dhc6:timer-seconds32; type dhc6:timer-seconds32;
description description
"The time interval after which the client should "The time interval after which the client should
contact the server from which the addresses in the contact the server from which the addresses in the
IA_NA were obtained to extend the lifetimes of the IA_NA were obtained to extend the lifetimes of the
addresses assigned to the IA_NA."; addresses assigned to the IA_NA.";
} }
leaf lease-t2 { leaf lease-t2 {
type dhc6:timer-seconds32; type dhc6:timer-seconds32;
description description
"The time interval after which the client should "The time interval after which the client should
contact any available server to extend the lifetimes contact any available server to extend the lifetimes
of the addresses assigned to the IA_NA."; of the addresses assigned to the IA_NA.";
} }
uses lease-state; uses lease-state;
} }
} }
list ia-ta { list ia-ta {
if-feature temp-addr; if-feature "temp-addr";
key ia-id; key "ia-id";
description description
"Configuration relevant for an Identity Association "Configuration relevant for an Identity Association
for Temporary Addresses (IA_TA)."; for Temporary Addresses (IA_TA).";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 13.2"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 13.2";
leaf ia-id { leaf ia-id {
type uint32; type uint32;
description description
"The unique identifier for this IA_TA."; "The unique identifier for this IA_TA.";
reference "RFC 8415: Dynamic Host Configuration Protocol reference
for IPv6 (DHCPv6), Section 12"; "RFC 8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6), Section 12";
} }
container ia-ta-options { container ia-ta-options {
description description
"An augmentation point for additional options "An augmentation point for additional options
that the client may send in the IA_TA-options field that the client may send in the IA_TA-options field
of OPTION_IA_TA."; of OPTION_IA_TA.";
} }
container lease-state { container lease-state {
config "false"; config false;
description description
"Information about an active IA_TA lease."; "Information about an active IA_TA lease.";
leaf ia-ta-address { leaf ia-ta-address {
type inet:ipv6-address; type inet:ipv6-address;
description description
"Address that is currently leased."; "Address that is currently leased.";
} }
uses lease-state; uses lease-state;
} }
} }
list ia-pd { list ia-pd {
if-feature prefix-delegation; if-feature "prefix-delegation";
key ia-id; key "ia-id";
description description
"Configuration relevant for an Identity Association "Configuration relevant for an Identity Association
for Prefix Delegation (IA_PD)."; for Prefix Delegation (IA_PD).";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 13.3"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 13.3";
leaf ia-id { leaf ia-id {
type uint32; type uint32;
description description
"The unique identifier for this IA_PD."; "The unique identifier for this IA_PD.";
reference "RFC 8415: Dynamic Host Configuration Protocol reference
for IPv6 (DHCPv6), Section 12"; "RFC 8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6), Section 12";
} }
leaf prefix-length-hint { leaf prefix-length-hint {
type uint8 { type uint8 {
range "1..128"; range "1..128";
} }
description description
"Prefix-length hint value included in the messages sent "Prefix-length hint value included in the messages sent
to the server to indicate a preference for the size of to the server to indicate a preference for the size of
the prefix to be delegated."; the prefix to be delegated.";
reference "RFC 8415: Dynamic Host Configuration Protocol reference
for IPv6 (DHCPv6), Section 18.2.1"; "RFC 8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6), Section 18.2.1";
} }
container ia-pd-options { container ia-pd-options {
description description
"An augmentation point for additional options that the "An augmentation point for additional options that the
client will send in the IA_PD-options field of client will send in the IA_PD-options field of
OPTION_IA_TA."; OPTION_IA_TA.";
} }
container lease-state { container lease-state {
config "false"; config false;
description description
"Information about an active IA_PD-delegated prefix."; "Information about an active IA_PD-delegated prefix.";
leaf ia-pd-prefix { leaf ia-pd-prefix {
type inet:ipv6-prefix; type inet:ipv6-prefix;
description description
"Delegated prefix that is currently leased."; "Delegated prefix that is currently leased.";
} }
leaf lease-t1 { leaf lease-t1 {
type dhc6:timer-seconds32; type dhc6:timer-seconds32;
description description
"The time interval after which the client should "The time interval after which the client should
contact the server from which the addresses in the contact the server from which the addresses in the
IA_NA were obtained to extend the lifetimes of the IA_NA were obtained to extend the lifetimes of the
addresses assigned to the IA_PD."; addresses assigned to the IA_PD.";
} }
leaf lease-t2 { leaf lease-t2 {
type dhc6:timer-seconds32; type dhc6:timer-seconds32;
description description
"The time interval after which the client should "The time interval after which the client should
contact any available server to extend the lifetimes contact any available server to extend the lifetimes
of the addresses assigned to the IA_PD."; of the addresses assigned to the IA_PD.";
} }
uses lease-state; uses lease-state;
} }
} }
container statistics { container statistics {
description description
"DHCPv6 message counters for the client."; "DHCPv6 message counters for the client.";
uses message-statistics; uses message-statistics;
} }
} }
} }
/* /*
* Notifications * Notifications
*/ */
notification invalid-ia-address-detected { notification invalid-ia-address-detected {
if-feature "non-temp-addr or temp-addr"; if-feature "non-temp-addr or temp-addr";
description description
"Notification sent when an address received in an identity "Notification sent when an address received in an identity
association option is determined invalid. Possible conditions association option is determined invalid. Possible conditions
include a duplicate or otherwise illegal address."; include a duplicate or otherwise illegal address.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 18.2.10.1"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 18.2.10.1";
leaf ia-id { leaf ia-id {
type uint32; type uint32;
mandatory true; mandatory true;
description description
"IAID."; "IAID.";
} }
leaf ia-na-t1-timer { leaf ia-na-t1-timer {
type uint32; type uint32;
description description
"The value of the T1 time field for non-temporary address "The value of the T1 time field for non-temporary address
allocations (OPTION_IA_NA)."; allocations (OPTION_IA_NA).";
} }
leaf ia-na-t2-timer { leaf ia-na-t2-timer {
type uint32; type uint32;
description description
"The value of the preferred-lifetime field for non-temporary "The value of the preferred-lifetime field for non-temporary
address allocations (OPTION_IA_NA)."; address allocations (OPTION_IA_NA).";
} }
leaf invalid-address { leaf invalid-address {
type inet:ipv6-address; type inet:ipv6-address;
description description
"The IP address that has been detected to be invalid."; "The IP address that has been detected to be invalid.";
} }
leaf preferred-lifetime { leaf preferred-lifetime {
type uint32; type uint32;
description description
"The value of the preferred-lifetime field in "The value of the preferred-lifetime field in
OPTION_IAADDR."; OPTION_IAADDR.";
} }
leaf valid-lifetime { leaf valid-lifetime {
type uint32; type uint32;
description description
"The value of the valid-lifetime field in OPTION_IAADDR."; "The value of the valid-lifetime field in OPTION_IAADDR.";
} }
leaf ia-options { leaf ia-options {
type binary; type binary;
description description
"A copy of the contents of the IAaddr-options field."; "A copy of the contents of the IAaddr-options field.";
} }
leaf description { leaf description {
type string; type string;
description description
"Description of the invalid Identity Association (IA) "Description of the invalid Identity Association (IA)
detection error."; detection error.";
} }
} }
notification transmission-failed { notification transmission-failed {
description description
"Notification sent when the transmission or retransmission "Notification sent when the transmission or retransmission
of a message fails."; of a message fails.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 7.6"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 7.6";
leaf failure-type { leaf failure-type {
type enumeration { type enumeration {
enum "solicit-timeout" { enum solicit-timeout {
description description
"Max Solicit timeout value (SOL_MAX_RT) exceeded."; "Max Solicit timeout value (SOL_MAX_RT) exceeded.";
} }
enum "request-timeout" { enum request-timeout {
description description
"Max Request timeout value (REQ_MAX_RT) exceeded."; "Max Request timeout value (REQ_MAX_RT) exceeded.";
} }
enum "request-retries-exceeded" { enum request-retries-exceeded {
description description
"Max Request retry attempts (REC_MAX_RC) exceeded."; "Max Request retry attempts (REC_MAX_RC) exceeded.";
} }
enum "confirm-duration-exceeded" { enum confirm-duration-exceeded {
description description
"Max Confirm duration (CNF_MAX_RD) exceeded."; "Max Confirm duration (CNF_MAX_RD) exceeded.";
} }
enum "renew-timeout" { enum renew-timeout {
description description
"Max Renew timeout value (REN_MAX_RT) exceeded."; "Max Renew timeout value (REN_MAX_RT) exceeded.";
} }
enum "rebind-timeout" { enum rebind-timeout {
description description
"Max Rebind timeout value (REB_MAX_RT) "Max Rebind timeout value (REB_MAX_RT)
exceeded."; exceeded.";
} }
enum "info-request-timeout" { enum info-request-timeout {
description description
"Max Information-request timeout value (INF_MAX_RT) "Max Information-request timeout value (INF_MAX_RT)
exceeded."; exceeded.";
} }
enum "release-retries-exceeded" { enum release-retries-exceeded {
description description
"Max Release retry attempts (REL_MAX_RC) exceeded."; "Max Release retry attempts (REL_MAX_RC) exceeded.";
} }
enum "decline-retries-exceeded" { enum decline-retries-exceeded {
description description
"Max Decline retry attempts (DEC_MAX_RT) exceeded."; "Max Decline retry attempts (DEC_MAX_RT) exceeded.";
} }
} }
mandatory true; mandatory true;
description description
"Description of the failure."; "Description of the failure.";
} }
leaf description { leaf description {
type string; type string;
description description
"Information related to the failure, such as number of "Information related to the failure, such as number of
retries and timer values."; retries and timer values.";
} }
} }
notification unsuccessful-status-code { notification unsuccessful-status-code {
description description
"Notification sent when the client receives a message that "Notification sent when the client receives a message that
includes an unsuccessful Status Code option."; includes an unsuccessful Status Code option.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 21.13"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 21.13";
leaf server-duid { leaf server-duid {
type dhc6:duid; type dhc6:duid;
mandatory true; mandatory true;
description description
"DUID of the server sending the unsuccessful error code."; "DUID of the server sending the unsuccessful error code.";
} }
uses dhc6:status; uses dhc6:status;
} }
notification server-duid-changed { notification server-duid-changed {
if-feature "non-temp-addr or prefix-delegation or " + if-feature "non-temp-addr or prefix-delegation or "
"temp-addr"; + "temp-addr";
description description
"Notification sent when the client receives a lease from a "Notification sent when the client receives a lease from a
server with different DUID to the one currently stored by the server with different DUID to the one currently stored by the
client, e.g., in response to a Rebind message."; client, e.g., in response to a Rebind message.";
reference "RFC 8415: Dynamic Host Configuration Protocol for reference
IPv6 (DHCPv6), Section 18.2.5"; "RFC 8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6), Section 18.2.5";
leaf new-server-duid { leaf new-server-duid {
type dhc6:duid; type dhc6:duid;
mandatory true; mandatory true;
description description
"DUID of the new server."; "DUID of the new server.";
} }
leaf previous-server-duid { leaf previous-server-duid {
type dhc6:duid; type dhc6:duid;
mandatory true; mandatory true;
description description
"DUID of the previous server."; "DUID of the previous server.";
} }
leaf lease-ia-na { leaf lease-ia-na {
if-feature non-temp-addr; if-feature "non-temp-addr";
type leafref { type leafref {
path "/dhcpv6-client/client-if/ia-na/ia-id"; path "/dhcpv6-client/client-if/ia-na/ia-id";
} }
description description
"Reference to the IA_NA lease."; "Reference to the IA_NA lease.";
} }
leaf lease-ia-ta { leaf lease-ia-ta {
if-feature temp-addr; if-feature "temp-addr";
type leafref { type leafref {
path "/dhcpv6-client/client-if/ia-ta/ia-id"; path "/dhcpv6-client/client-if/ia-ta/ia-id";
} }
description description
"Reference to the IA_TA lease."; "Reference to the IA_TA lease.";
} }
leaf lease-ia-pd { leaf lease-ia-pd {
if-feature prefix-delegation; if-feature "prefix-delegation";
type leafref { type leafref {
path "/dhcpv6-client/client-if/ia-pd/ia-id"; path "/dhcpv6-client/client-if/ia-pd/ia-id";
} }
description description
"Reference to the IA_PD lease."; "Reference to the IA_PD lease.";
} }
} }
} }
<CODE ENDS> <CODE ENDS>
skipping to change at line 3612 skipping to change at line 3663
These options could redirect clients to services under an These options could redirect clients to services under an
attacker's control, for example, by changing the address of a DNS attacker's control, for example, by changing the address of a DNS
server supplied in a DHCP option to point to a rogue server. server supplied in a DHCP option to point to a rogue server.
(dhc6-srv/option-sets) (dhc6-srv/option-sets)
These are the subtrees and data nodes in the 'ieft-dhcpv6-relay.yang' These are the subtrees and data nodes in the 'ieft-dhcpv6-relay.yang'
module and their sensitivity/vulnerability: module and their sensitivity/vulnerability:
* DoS attacks, based on disabling the DHCP relay function or * DoS attacks, based on disabling the DHCP relay function or
modifying the relay's "destination-address" to a non-existant modifying the relay's "destination-address" to a non-existent
address. address.
(dhc6-rly/relay-if) (dhc6-rly/relay-if)
* Modifying the relay's "destination-address" to send messages to a * Modifying the relay's "destination-address" to send messages to a
rogue DHCPv6 server. rogue DHCPv6 server.
(dhc6-rly/relay-if) (dhc6-rly/relay-if)
Some of the RPC operations in these YANG modules may be considered Some of the RPC operations in these YANG modules may be considered
skipping to change at line 4224 skipping to change at line 4275
* Fields that can have multiple entries or instances are defined * Fields that can have multiple entries or instances are defined
using list or leaf-list nodes. using list or leaf-list nodes.
Below the groupings for option definitions, augment statements are Below the groupings for option definitions, augment statements are
used to add the option definitions for use in the relevant DHCP used to add the option definitions for use in the relevant DHCP
element's module (server, relay, and/or client). element's module (server, relay, and/or client).
<CODE BEGINS> <CODE BEGINS>
module example-dhcpv6-opt-sip-serv { module example-dhcpv6-opt-sip-serv {
yang-version 1.1; yang-version 1.1;
namespace "https://example.com/ns/" + namespace "https://example.com/ns/"
"example-dhcpv6-opt-sip-serv"; + "example-dhcpv6-opt-sip-serv";
prefix "sip-srv"; prefix sip-srv;
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
} }
import ietf-dhcpv6-server { import ietf-dhcpv6-server {
prefix dhc6-srv; prefix dhc6-srv;
} }
organization organization
"IETF Dynamic Host Configuration (DHC) Working Group"; "IETF Dynamic Host Configuration (DHC) Working Group";
contact contact
"WG Web: <https://datatracker.ietf.org/wg/dhc/> "WG Web: <https://datatracker.ietf.org/wg/dhc/>
WG List: <mailto:dhcwg@ietf.org> WG List: <mailto:dhcwg@ietf.org>
Author: Yong Cui <yong@csnet1.cs.tsinghua.edu.cn> Author: Yong Cui <yong@csnet1.cs.tsinghua.edu.cn>
Author: Linhui Sun <lh.sunlinh@gmail.com> Author: Linhui Sun <lh.sunlinh@gmail.com>
Editor: Ian Farrer <ian.farrer@telekom.de> Editor: Ian Farrer <ian.farrer@telekom.de>
Author: Sladjana Zeichlin <sladjana.zechlin@telekom.de> Author: Sladjana Zeichlin <sladjana.zechlin@telekom.de>
Author: Zihao He <hezihao9512@gmail.com> Author: Zihao He <hezihao9512@gmail.com>
Author: Michal Nowikowski <godfryd@isc.org>"; Author: Michal Nowikowski <godfryd@isc.org>";
description description
"This YANG module contains DHCPv6 options defined in RFC 8415 "This YANG module contains DHCPv6 options defined in RFC 8415
that can be used by DHCPv6 servers. that can be used by DHCPv6 servers.
Copyright (c) 2022 IETF Trust and the persons identified as Copyright (c) 2022 IETF Trust and the persons identified as
authors of the code. All rights reserved. authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to without modification, is permitted pursuant to, and subject to
the license terms contained in, the Revised BSD License set the license terms contained in, the Revised BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
(https://trustee.ietf.org/license-info). (https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 9243 This version of this YANG module is part of RFC 9243
(https://www.rfc-editor.org/info/rfc9243); see the RFC itself (https://www.rfc-editor.org/info/rfc9243); see the RFC itself
for full legal notices."; for full legal notices.";
revision 2022-05-04 { revision 2022-05-04 {
description description
"Initial revision."; "Initial revision.";
reference reference
"RFC 9243: A YANG Data Model for DHCPv6 Configuration"; "RFC 9243: A YANG Data Model for DHCPv6 Configuration";
} }
/* /*
* Groupings * Groupings
*/ */
grouping sip-server-domain-name-list-option-group { grouping sip-server-domain-name-list-option-group {
description description
"OPTION_SIP_SERVER_D (21) SIP Servers Domain-Name List."; "OPTION_SIP_SERVER_D (21) SIP Servers Domain-Name List.";
reference "RFC 3319: Dynamic Host Configuration Protocol reference
(DHCPv6) Options for Session Initiation Protocol (SIP) "RFC 3319: Dynamic Host Configuration Protocol
Servers"; (DHCPv6) Options for Session Initiation Protocol (SIP)
Servers";
container sip-server-domain-name-list-option { container sip-server-domain-name-list-option {
description description
"OPTION_SIP_SERVER_D (21) SIP Servers Domain Name List "OPTION_SIP_SERVER_D (21) SIP Servers Domain Name List
Option."; Option.";
list sip-server { list sip-server {
key sip-serv-id; key "sip-serv-id";
description description
"SIP server information."; "SIP server information.";
leaf sip-serv-id { leaf sip-serv-id {
type uint8; type uint8;
description description
"SIP server list identifier."; "SIP server list identifier.";
} }
leaf sip-serv-domain-name { leaf sip-serv-domain-name {
type inet:domain-name; type inet:domain-name;
description description
"SIP server domain name."; "SIP server domain name.";
} }
} }
} }
} }
grouping sip-server-address-list-option-group { grouping sip-server-address-list-option-group {
description description
"OPTION_SIP_SERVER_A (22) SIP Servers IPv6 Address List."; "OPTION_SIP_SERVER_A (22) SIP Servers IPv6 Address List.";
reference "RFC 3319: Dynamic Host Configuration Protocol reference
(DHCPv6) Options for Session Initiation Protocol (SIP) "RFC 3319: Dynamic Host Configuration Protocol
Servers"; (DHCPv6) Options for Session Initiation Protocol (SIP)
Servers";
container sip-server-address-list-option { container sip-server-address-list-option {
description description
"OPTION_SIP_SERVER_A (22) SIP Servers IPv6 Address List "OPTION_SIP_SERVER_A (22) SIP Servers IPv6 Address List
Option."; Option.";
list sip-server { list sip-server {
key sip-serv-id; key "sip-serv-id";
description description
"SIP server information."; "SIP server information.";
leaf sip-serv-id { leaf sip-serv-id {
type uint8; type uint8;
description description
"SIP server list entry identifier."; "SIP server list entry identifier.";
} }
leaf sip-serv-addr { leaf sip-serv-addr {
type inet:ipv6-address; type inet:ipv6-address;
description description
"SIP server IPv6 address."; "SIP server IPv6 address.";
} }
} }
} }
} }
/* /*
* Augmentations * Augmentations
*/ */
augment "/dhc6-srv:dhcpv6-server/dhc6-srv:option-sets/" + augment "/dhc6-srv:dhcpv6-server/dhc6-srv:option-sets/"
"dhc6-srv:option-set" { + "dhc6-srv:option-set" {
description description
"Augment the option definition groupings to the server "Augment the option definition groupings to the server
module."; module.";
uses sip-server-domain-name-list-option-group; uses sip-server-domain-name-list-option-group;
uses sip-server-address-list-option-group; uses sip-server-address-list-option-group;
} }
} }
<CODE ENDS> <CODE ENDS>
The correct location to augment the new option definition(s) will The correct location to augment the new option definition(s) will
vary according to the specific rules defined for the use of that vary according to the specific rules defined for the use of that
specific option. For example, for options that will be augmented specific option. For example, for options that will be augmented
into the ietf-dhcpv6-server module, in many cases, these will be into the ietf-dhcpv6-server module, in many cases, these will be
skipping to change at line 4397 skipping to change at line 4447
between the DHCPv6 server and database server. A YANG module for between the DHCPv6 server and database server. A YANG module for
configuring TLS is defined in [GROUPINGS-TLS]. configuring TLS is defined in [GROUPINGS-TLS].
At the end, there is an augment statement that adds the vendor- At the end, there is an augment statement that adds the vendor-
specific configuration defined in "dhcpv6-server-config:config" under specific configuration defined in "dhcpv6-server-config:config" under
the "/dhcpv6-server:config/dhcpv6-server:vendor-config" mount point. the "/dhcpv6-server:config/dhcpv6-server:vendor-config" mount point.
<CODE BEGINS> <CODE BEGINS>
module example-dhcpv6-server-conf { module example-dhcpv6-server-conf {
yang-version 1.1; yang-version 1.1;
namespace "https://example.com/ns/" + namespace "https://example.com/ns/"
"example-dhcpv6-server-conf"; + "example-dhcpv6-server-conf";
prefix "dhc6-srv-conf"; prefix dhc6-srv-conf;
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
} }
import ietf-interfaces { import ietf-interfaces {
prefix if; prefix if;
} }
import ietf-dhcpv6-server { import ietf-dhcpv6-server {
prefix dhc6-srv; prefix dhc6-srv;
} }
organization organization
"IETF Dynamic Host Configuration (DHC) Working Group"; "IETF Dynamic Host Configuration (DHC) Working Group";
contact contact
"WG Web: <https://datatracker.ietf.org/wg/dhc/> "WG Web: <https://datatracker.ietf.org/wg/dhc/>
WG List: <mailto:dhcwg@ietf.org> WG List: <mailto:dhcwg@ietf.org>
Author: Yong Cui <yong@csnet1.cs.tsinghua.edu.cn> Author: Yong Cui <yong@csnet1.cs.tsinghua.edu.cn>
Author: Linhui Sun <lh.sunlinh@gmail.com> Author: Linhui Sun <lh.sunlinh@gmail.com>
Editor: Ian Farrer <ian.farrer@telekom.de> Editor: Ian Farrer <ian.farrer@telekom.de>
Author: Sladjana Zeichlin <sladjana.zechlin@telekom.de> Author: Sladjana Zeichlin <sladjana.zechlin@telekom.de>
Author: Zihao He <hezihao9512@gmail.com> Author: Zihao He <hezihao9512@gmail.com>
Author: Michal Nowikowski <godfryd@isc.org>"; Author: Michal Nowikowski <godfryd@isc.org>";
description description
"This YANG module defines components for the configuration and "This YANG module defines components for the configuration and
management of vendor-/implementation-specific DHCPv6 server management of vendor-/implementation-specific DHCPv6 server
functionality. As this functionality varies greatly between functionality. As this functionality varies greatly between
different implementations, the module is provided as an example different implementations, the module is provided as an example
only. only.
Copyright (c) 2022 IETF Trust and the persons identified as Copyright (c) 2022 IETF Trust and the persons identified as
authors of the code. All rights reserved. authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to without modification, is permitted pursuant to, and subject to
the license terms contained in, the Revised BSD License set the license terms contained in, the Revised BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
(https://trustee.ietf.org/license-info). (https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 9243 This version of this YANG module is part of RFC 9243
(https://www.rfc-editor.org/info/rfc9243); see the RFC itself (https://www.rfc-editor.org/info/rfc9243); see the RFC itself
for full legal notices."; for full legal notices.";
revision 2022-05-04 { revision 2022-06-20 {
description description
"Initial revision."; "Initial revision.";
reference reference
"RFC 9243: A YANG Data Model for DHCPv6 Configuration"; "RFC 9243: A YANG Data Model for DHCPv6 Configuration";
} }
/* /*
* Groupings * Groupings
*/ */
grouping config { grouping config {
description description
"Parameters necessary for the configuration of a DHCPv6 "Parameters necessary for the configuration of a DHCPv6
server."; server.";
container serv-attributes { container serv-attributes {
description description
"Contains basic attributes necessary for running a DHCPv6 "Contains basic attributes necessary for running a DHCPv6
server."; server.";
leaf name { leaf name {
type string; type string;
description description
"Name of the DHCPv6 server."; "Name of the DHCPv6 server.";
} }
leaf description { leaf description {
type string; type string;
description description
"Description of the DHCPv6 server."; "Description of the DHCPv6 server.";
} }
leaf ipv6-listen-port { leaf ipv6-listen-port {
type uint16; type uint16;
default 547; default "547";
description description
"UDP port that the server will listen on."; "UDP port that the server will listen on.";
} }
choice listening-interfaces { choice listening-interfaces {
default all-interfaces; default "all-interfaces";
description description
"Configures which interface or addresses the server will "Configures which interface or addresses the server will
listen for incoming messages on."; listen for incoming messages on.";
case all-interfaces { case all-interfaces {
container all-interfaces { container all-interfaces {
presence true; presence "true";
description description
"Configures the server to listen for incoming messages "Configures the server to listen for incoming messages
on all IPv6 addresses (unicast and multicast) on all of on all IPv6 addresses (unicast and multicast) on all
its network interfaces."; of its network interfaces.";
} }
} }
case interface-list { case interface-list {
leaf-list interfaces { leaf-list interfaces {
type if:interface-ref; type if:interface-ref;
description description
"List of interfaces on which the server will listen "List of interfaces on which the server will listen
for incoming messages. Messages addressed to any for incoming messages. Messages addressed to any
valid IPv6 address (unicast and multicast) will be valid IPv6 address (unicast and multicast) will be
received."; received.";
} }
} }
case address-list { case address-list {
leaf-list address-list { leaf-list address-list {
type inet:ipv6-address; type inet:ipv6-address;
description description
"List of IPv6 address(es) on which the server will "List of IPv6 address(es) on which the server will
listen for incoming DHCPv6 messages."; listen for incoming DHCPv6 messages.";
} }
} }
} }
leaf-list interfaces-config { leaf-list interfaces-config {
type if:interface-ref; type if:interface-ref;
default "if:interfaces/if:interface/if:name"; default "if:interfaces/if:interface/if:name";
description description
"A leaf list of interfaces on which the server should "A leaf list of interfaces on which the server should
listen."; listen.";
} }
container lease-storage { container lease-storage {
description description
"Configures how the server will store leases."; "Configures how the server will store leases.";
choice storage-type { choice storage-type {
description description
"The type of storage that will be used for lease "The type of storage that will be used for lease
information."; information.";
case memfile { case memfile {
description description
"Configuration for storing leases information in a "Configuration for storing leases information in a
Comma-Separated Value (CSV) file."; Comma-Separated Value (CSV) file.";
leaf memfile-name { leaf memfile-name {
type string; type string;
description description
"Specifies the absolute location of the lease file. "Specifies the absolute location of the lease file.
The format of the string follows the semantics of The format of the string follows the semantics of
the relevant operating system."; the relevant operating system.";
} }
leaf memfile-lfc-interval { leaf memfile-lfc-interval {
type uint64; type uint64;
description description
"Specifies the interval in seconds, at which the "Specifies the interval in seconds, at which the
server will perform a lease file cleanup (LFC)."; server will perform a lease file cleanup (LFC).";
} }
} }
case mysql { case mysql {
leaf mysql-name { leaf mysql-name {
type string; type string;
description description
"Name of the MySQL database, running on the "Name of the MySQL database, running on the
localhost."; localhost.";
} }
leaf mysql-username { leaf mysql-username {
type string; type string;
description description
"User name of the account under which the server "User name of the account under which the server
will access the database."; will access the database.";
} }
leaf mysql-password { leaf mysql-password {
type string; type string;
description description
"Password of the account under which the server "Password of the account under which the server
will access the database."; will access the database.";
} }
leaf mysql-port { leaf mysql-port {
type inet:port-number; type inet:port-number;
default 3306; default "3306";
description description
"If the database is located on a different system, "If the database is located on a different system,
the port number may be specified."; the port number may be specified.";
} }
leaf mysql-lfc-interval { leaf mysql-lfc-interval {
type uint64; type uint64;
description description
"Specifies the interval in seconds, at which the "Specifies the interval in seconds, at which the
server will perform a lease file cleanup (LFC)."; server will perform a lease file cleanup (LFC).";
} }
leaf mysql-connect-timeout { leaf mysql-connect-timeout {
type uint64; type uint64;
description description
"Defines the timeout interval for connecting to the "Defines the timeout interval for connecting to the
database. A longer interval can be specified if the database. A longer interval can be specified if the
database is remote."; database is remote.";
} }
} }
case postgresql { case postgresql {
leaf postgresql-name { leaf postgresql-name {
type string; type string;
description description
"Name of the PostgreSQL database, running on the "Name of the PostgreSQL database, running on the
localhost."; localhost.";
} }
leaf postgresql-username { leaf postgresql-username {
type string; type string;
description description
"User name of the account under which the server "User name of the account under which the server
will access the database."; will access the database.";
} }
leaf postgresql-password { leaf postgresql-password {
type string; type string;
description description
"Password of the account under which the server "Password of the account under which the server
will access the database."; will access the database.";
} }
leaf postgresql-port { leaf postgresql-port {
type inet:port-number; type inet:port-number;
default 5432; default "5432";
description description
"If the database is located on a different system, "If the database is located on a different system,
the port number may be specified."; the port number may be specified.";
} }
leaf postgresql-lfc-interval { leaf postgresql-lfc-interval {
type uint64; type uint64;
description description
"Specifies the interval in seconds, at which the "Specifies the interval in seconds, at which the
server will perform a lease file cleanup (LFC)."; server will perform a lease file cleanup (LFC).";
} }
leaf postgresql-connect-timeout { leaf postgresql-connect-timeout {
type uint64; type uint64;
description description
"Defines the timeout interval for connecting to the "Defines the timeout interval for connecting to the
database. A longer interval can be specified if the database. A longer interval can be specified if the
database is remote."; database is remote.";
} }
} }
} }
} }
} }
} }
/* /*
* Augmentations * Augmentations
*/ */
augment "/dhc6-srv:dhcpv6-server/dhc6-srv:vendor-config" { augment "/dhc6-srv:dhcpv6-server/dhc6-srv:vendor-config" {
description description
"Augment the server-specific YANG module to the "Augment the server-specific YANG module to the
ietf-dhcpv6-server module."; ietf-dhcpv6-server module.";
uses config; uses config;
} }
} }
<CODE ENDS> <CODE ENDS>
Appendix D. Example Definition of Class-Selector Configuration Appendix D. Example Definition of Class-Selector Configuration
The module "ietf-example-dhcpv6-class-selector" provides an example The module "ietf-example-dhcpv6-class-selector" provides an example
of how vendor-specific class selection configuration can be modeled of how vendor-specific class selection configuration can be modeled
and integrated with the "ietf-dhcpv6-server" module defined in this and integrated with the "ietf-dhcpv6-server" module defined in this
skipping to change at line 4680 skipping to change at line 4726
required required
The mechanism is as follows: class is associated to a client based on The mechanism is as follows: class is associated to a client based on
rules, and then a client is allowed to get an address(es) or a rules, and then a client is allowed to get an address(es) or a
prefix(es) from a given allocation-range/pool if the class name prefix(es) from a given allocation-range/pool if the class name
matches. matches.
<CODE BEGINS> <CODE BEGINS>
module example-dhcpv6-class-select { module example-dhcpv6-class-select {
yang-version 1.1; yang-version 1.1;
namespace "https://example.com/ns/" + namespace "https://example.com/ns/"
"example-dhcpv6-class-select"; + "example-dhcpv6-class-select";
prefix "dhc6-class-sel"; prefix dhc6-class-sel;
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
} }
import ietf-interfaces { import ietf-interfaces {
prefix if; prefix if;
} }
import ietf-dhcpv6-common { import ietf-dhcpv6-common {
prefix dhc6; prefix dhc6;
} }
import ietf-dhcpv6-server { import ietf-dhcpv6-server {
prefix dhc6-srv; prefix dhc6-srv;
} }
organization organization
"IETF Dynamic Host Configuration (DHC) Working Group"; "IETF Dynamic Host Configuration (DHC) Working Group";
contact contact
"WG Web: <https://datatracker.ietf.org/wg/dhc/> "WG Web: <https://datatracker.ietf.org/wg/dhc/>
WG List: <mailto:dhcwg@ietf.org> WG List: <mailto:dhcwg@ietf.org>
Author: Yong Cui <yong@csnet1.cs.tsinghua.edu.cn> Author: Yong Cui <yong@csnet1.cs.tsinghua.edu.cn>
Author: Linhui Sun <lh.sunlinh@gmail.com> Author: Linhui Sun <lh.sunlinh@gmail.com>
Editor: Ian Farrer <ian.farrer@telekom.de> Editor: Ian Farrer <ian.farrer@telekom.de>
Author: Sladjana Zeichlin <sladjana.zechlin@telekom.de> Author: Sladjana Zeichlin <sladjana.zechlin@telekom.de>
Author: Zihao He <hezihao9512@gmail.com> Author: Zihao He <hezihao9512@gmail.com>
Author: Michal Nowikowski <godfryd@isc.org>"; Author: Michal Nowikowski <godfryd@isc.org>";
description description
"This YANG module defines components for the definition and "This YANG module defines components for the definition and
configuration of the client class selector function for a configuration of the client class selector function for a
DHCPv6 server. As this functionality varies greatly between DHCPv6 server. As this functionality varies greatly between
different implementations, the module provided as an example different implementations, the module provided as an example
only. only.
Copyright (c) 2022 IETF Trust and the persons identified as Copyright (c) 2022 IETF Trust and the persons identified as
authors of the code. All rights reserved. authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to without modification, is permitted pursuant to, and subject to
the license terms contained in, the Revised BSD License set the license terms contained in, the Revised BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
(https://trustee.ietf.org/license-info). (https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 9243 This version of this YANG module is part of RFC 9243
(https://www.rfc-editor.org/info/rfc9243); see the RFC itself (https://www.rfc-editor.org/info/rfc9243); see the RFC itself
for full legal notices."; for full legal notices.";
revision 2022-05-04 { revision 2022-06-20 {
description description
"Initial revision."; "Initial revision.";
reference reference
"RFC 9243: A YANG Data Model for DHCPv6 Configuration"; "RFC 9243: A YANG Data Model for DHCPv6 Configuration";
} }
/* /*
* Groupings * Groupings
*/ */
grouping client-class-id { grouping client-class-id {
description description
"Definitions of client message classification for "Definitions of client message classification for
authorization and assignment purposes."; authorization and assignment purposes.";
leaf client-class-name { leaf client-class-name {
type string; type string;
mandatory true; mandatory true;
description description
"Unique identifier for client class identification list "Unique identifier for client class identification list
entries."; entries.";
} }
choice id-type { choice id-type {
mandatory true; mandatory true;
description description
"Definitions for different client identifier types."; "Definitions for different client identifier types.";
case client-id-id { case client-id-id {
leaf client-id { leaf client-id {
type string; type string;
mandatory true; mandatory true;
description description
"String literal client identifier."; "String literal client identifier.";
} }
description description
"Client class selection based on a string literal client "Client class selection based on a string literal client
identifier."; identifier.";
} }
case received-interface-id { case received-interface-id {
description description
"Client class selection based on the incoming interface "Client class selection based on the incoming interface
of the DHCPv6 message."; of the DHCPv6 message.";
leaf received-interface { leaf received-interface {
type if:interface-ref; type if:interface-ref;
description description
"Reference to the interface entry for the incoming "Reference to the interface entry for the incoming
DHCPv6 message."; DHCPv6 message.";
} }
} }
case packet-source-address-id { case packet-source-address-id {
description description
"Client class selection based on the source address of "Client class selection based on the source address of
the DHCPv6 message."; the DHCPv6 message.";
leaf packet-source-address { leaf packet-source-address {
type inet:ipv6-address; type inet:ipv6-address;
mandatory true; mandatory true;
description description
"Source address of the DHCPv6 message."; "Source address of the DHCPv6 message.";
} }
} }
case packet-destination-address-id { case packet-destination-address-id {
description description
"Client class selection based on the destination address "Client class selection based on the destination address
of the DHCPv6 message."; of the DHCPv6 message.";
leaf packet-destination-address { leaf packet-destination-address {
type inet:ipv6-address; type inet:ipv6-address;
mandatory true; mandatory true;
description description
"Destination address of the DHCPv6 message."; "Destination address of the DHCPv6 message.";
} }
} }
case relay-link-address-id { case relay-link-address-id {
description description
"Client class selection based on the prefix of the "Client class selection based on the prefix of the
link-address field in the relay agent message header."; link-address field in the relay agent message header.";
leaf relay-link-address { leaf relay-link-address {
type inet:ipv6-prefix; type inet:ipv6-prefix;
mandatory true; mandatory true;
description description
"Prefix of the link-address field in the relay agent "Prefix of the link-address field in the relay agent
message header."; message header.";
} }
} }
case relay-peer-address-id { case relay-peer-address-id {
description description
"Client class selection based on the value of the "Client class selection based on the value of the
peer-address field in the relay agent message header."; peer-address field in the relay agent message header.";
leaf relay-peer-address { leaf relay-peer-address {
type inet:ipv6-prefix; type inet:ipv6-prefix;
mandatory true; mandatory true;
description description
"Prefix of the peer-address field in the relay agent "Prefix of the peer-address field in the relay agent
message header."; message header.";
} }
} }
case relay-interface-id { case relay-interface-id {
description description
"Client class selection based on a received instance of "Client class selection based on a received instance of
OPTION_INTERFACE_ID (18)."; OPTION_INTERFACE_ID (18).";
leaf relay-interface { leaf relay-interface {
type string; type string;
description description
"An opaque value of arbitrary length generated by the "An opaque value of arbitrary length generated by the
relay agent to identify one of the relay agent's relay agent to identify one of the relay agent's
interfaces."; interfaces.";
} }
} }
case user-class-option-id { case user-class-option-id {
description description
"Client class selection based on the value of the "Client class selection based on the value of the
OPTION_USER_CLASS (15) and its user-class-data field."; OPTION_USER_CLASS (15) and its user-class-data field.";
leaf user-class-data { leaf user-class-data {
type string; type string;
mandatory true; mandatory true;
description description
"User Class value to match."; "User Class value to match.";
} }
} }
case vendor-class-present-id { case vendor-class-present-id {
description description
"Client class selection based on the presence of "Client class selection based on the presence of
OPTION_VENDOR_CLASS (16) in the received message."; OPTION_VENDOR_CLASS (16) in the received message.";
leaf vendor-class-present { leaf vendor-class-present {
type boolean; type boolean;
mandatory true; mandatory true;
description description
"Presence of OPTION_VENDOR_CLASS (16) in the received "Presence of OPTION_VENDOR_CLASS (16) in the received
message."; message.";
} }
} }
case vendor-class-option-enterprise-number-id { case vendor-class-option-enterprise-number-id {
description description
"Client class selection based on the value of the "Client class selection based on the value of the
enterprise-number field in OPTION_VENDOR_CLASS (16)."; enterprise-number field in OPTION_VENDOR_CLASS (16).";
leaf vendor-class-option-enterprise-number { leaf vendor-class-option-enterprise-number {
type uint32; type uint32;
mandatory true; mandatory true;
description description
"Value of the enterprise-number field."; "Value of the enterprise-number field.";
} }
} }
case vendor-class-option-data { case vendor-class-option-data {
description description
"Client class selection based on the value of a data "Client class selection based on the value of a data
field within a vendor-class-data entry for a matching field within a vendor-class-data entry for a matching
enterprise-number field in OPTION_VENDOR_CLASS (16)."; enterprise-number field in OPTION_VENDOR_CLASS (16).";
container vendor-class-option-data { container vendor-class-option-data {
description description
"Vendor class option data container."; "Vendor class option data container.";
leaf enterprise-number { leaf enterprise-number {
type uint32; type uint32;
description description
"The vendor's registered Enterprise Number, as "The vendor's registered Enterprise Number, as
maintained by IANA."; maintained by IANA.";
} }
leaf vendor-class-data-id { leaf vendor-class-data-id {
type uint8; type uint8;
description description
"Vendor class data ID."; "Vendor class data ID.";
} }
leaf vendor-class-data { leaf vendor-class-data {
type string; type string;
description description
"Opaque field for matching the client's vendor class "Opaque field for matching the client's vendor class
data."; data.";
} }
} }
} }
case client-duid-id { case client-duid-id {
description description
"Client class selection based on the value of the "Client class selection based on the value of the
received client DUID."; received client DUID.";
leaf duid { leaf duid {
type dhc6:duid; type dhc6:duid;
description description
"Client DUID."; "Client DUID.";
} }
} }
} }
} }
/* /*
* Augmentations * Augmentations
*/ */
augment "/dhc6-srv:dhcpv6-server/dhc6-srv:class-selector" { augment "/dhc6-srv:dhcpv6-server/dhc6-srv:class-selector" {
description description
"Augment class selector functions to the DHCPv6 server "Augment class selector functions to the DHCPv6 server
module."; module.";
container client-classes { container client-classes {
description description
"Client classes to augment."; "Client classes to augment.";
list class { list class {
key client-class-name; key "client-class-name";
description description
"List of the client class identifiers applicable to "List of the client class identifiers applicable to
clients served by this address pool."; clients served by this address pool.";
uses client-class-id; uses client-class-id;
} }
} }
} }
augment "/dhc6-srv:dhcpv6-server/" + augment "/dhc6-srv:dhcpv6-server/"
"dhc6-srv:allocation-ranges/dhc6-srv:allocation-range" { + "dhc6-srv:allocation-ranges/dhc6-srv:allocation-range" {
description description
"Augment class selector functions to the DHCPv6 server "Augment class selector functions to the DHCPv6 server
allocation-ranges."; allocation-ranges.";
leaf-list client-class { leaf-list client-class {
type leafref { type leafref {
path "/dhc6-srv:dhcpv6-server/dhc6-srv:" + path "/dhc6-srv:dhcpv6-server/dhc6-srv:"
"class-selector/client-classes/class/client-class-name"; + "class-selector/client-classes/class/client-class-name";
} }
description description
"Leafrefs to client classes."; "Leafrefs to client classes.";
} }
} }
augment "/dhc6-srv:dhcpv6-server/dhc6-srv:" + augment "/dhc6-srv:dhcpv6-server/dhc6-srv:"
"allocation-ranges/dhc6-srv:allocation-range/dhc6-srv:" + + "allocation-ranges/dhc6-srv:allocation-range/dhc6-srv:"
"address-pools/dhc6-srv:address-pool" { + "address-pools/dhc6-srv:address-pool" {
description description
"Augment class selector functions to the DHCPv6 server "Augment class selector functions to the DHCPv6 server
address-pools."; address-pools.";
leaf-list client-class { leaf-list client-class {
type leafref { type leafref {
path "/dhc6-srv:dhcpv6-server/dhc6-srv:" + path "/dhc6-srv:dhcpv6-server/dhc6-srv:"
"class-selector/client-classes/class/client-class-name"; + "class-selector/client-classes/class/client-class-name";
} }
description description
"Leafrefs to client classes."; "Leafrefs to client classes.";
} }
} }
augment "/dhc6-srv:dhcpv6-server/dhc6-srv:" + augment "/dhc6-srv:dhcpv6-server/dhc6-srv:"
"allocation-ranges/dhc6-srv:allocation-range/dhc6-srv:" + + "allocation-ranges/dhc6-srv:allocation-range/dhc6-srv:"
"prefix-pools/dhc6-srv:prefix-pool" { + "prefix-pools/dhc6-srv:prefix-pool" {
description description
"Augment class selector functions to the DHCPv6 "Augment class selector functions to the DHCPv6
server prefix-pools."; server prefix-pools.";
leaf-list client-class { leaf-list client-class {
type leafref { type leafref {
path "/dhc6-srv:dhcpv6-server/dhc6-srv:" + path "/dhc6-srv:dhcpv6-server/dhc6-srv:"
"class-selector/client-classes/class/client-class-name"; + "class-selector/client-classes/class/client-class-name";
} }
description description
"Leafrefs to client classes."; "Leafrefs to client classes.";
} }
} }
} }
<CODE ENDS> <CODE ENDS>
Acknowledgments Acknowledgments
 End of changes. 438 change blocks. 
842 lines changed or deleted 883 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/