draft-ietf-dhc-dhcpv6-yang-12.txt   draft-ietf-dhc-dhcpv6-yang-13.txt 
DHC Working Group Y. Cui DHC Working Group Y. Cui
Internet-Draft L. Sun Internet-Draft L. Sun
Intended status: Standards Track Tsinghua University Intended status: Standards Track Tsinghua University
Expires: 7 June 2021 I.F. Farrer Expires: 13 June 2021 I.F. Farrer
S.Z. Zechlin S.Z. Zechlin
Deutsche Telekom AG Deutsche Telekom AG
Z. He Z. He
Tsinghua University Tsinghua University
M.N. Nowikowski M.N. Nowikowski
Internet Systems Consortium Internet Systems Consortium
4 December 2020 10 December 2020
YANG Data Model for DHCPv6 Configuration YANG Data Model for DHCPv6 Configuration
draft-ietf-dhc-dhcpv6-yang-12 draft-ietf-dhc-dhcpv6-yang-13
Abstract Abstract
This document describes YANG data modules for the configuration and This document describes YANG data modules for the configuration and
management of DHCPv6 servers, relays, and clients. management of DHCPv6 servers, relays, and clients.
Requirements Language Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
skipping to change at page 1, line 46 skipping to change at page 1, line 46
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on 7 June 2021. This Internet-Draft will expire on 13 June 2021.
Copyright Notice Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents (https://trustee.ietf.org/ Provisions Relating to IETF Documents (https://trustee.ietf.org/
license-info) in effect on the date of publication of this document. license-info) in effect on the date of publication of this document.
Please review these documents carefully, as they describe your rights Please review these documents carefully, as they describe your rights
skipping to change at page 2, line 34 skipping to change at page 2, line 34
1.2.1. DHCPv6 Option Definitions . . . . . . . . . . . . . . 4 1.2.1. DHCPv6 Option Definitions . . . . . . . . . . . . . . 4
1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4
2. DHCPv6 Tree Diagrams . . . . . . . . . . . . . . . . . . . . 5 2. DHCPv6 Tree Diagrams . . . . . . . . . . . . . . . . . . . . 5
2.1. DHCPv6 Server Tree Diagram . . . . . . . . . . . . . . . 5 2.1. DHCPv6 Server Tree Diagram . . . . . . . . . . . . . . . 5
2.2. DHCPv6 Relay Tree Diagram . . . . . . . . . . . . . . . . 12 2.2. DHCPv6 Relay Tree Diagram . . . . . . . . . . . . . . . . 12
2.3. DHCPv6 Client Tree Diagram . . . . . . . . . . . . . . . 14 2.3. DHCPv6 Client Tree Diagram . . . . . . . . . . . . . . . 14
3. DHCPv6 YANG Modules . . . . . . . . . . . . . . . . . . . . . 17 3. DHCPv6 YANG Modules . . . . . . . . . . . . . . . . . . . . . 17
3.1. DHCPv6 Server YANG Module . . . . . . . . . . . . . . . . 17 3.1. DHCPv6 Server YANG Module . . . . . . . . . . . . . . . . 17
3.2. DHCPv6 Relay YANG Module . . . . . . . . . . . . . . . . 31 3.2. DHCPv6 Relay YANG Module . . . . . . . . . . . . . . . . 31
3.3. DHCPv6 Client YANG Module . . . . . . . . . . . . . . . . 40 3.3. DHCPv6 Client YANG Module . . . . . . . . . . . . . . . . 40
3.4. RFC8415 Server Options YANG Module . . . . . . . . . . . 49 3.4. RFC8415 Server Options YANG Module . . . . . . . . . . . 50
3.5. RFC8415 Relay Options YANG Module . . . . . . . . . . . . 56 3.5. RFC8415 Relay Options YANG Module . . . . . . . . . . . . 57
3.6. RFC8415 Client Options YANG Module . . . . . . . . . . . 62 3.6. RFC8415 Client Options YANG Module . . . . . . . . . . . 64
3.7. DHCPv6 Common YANG Module . . . . . . . . . . . . . . . . 67 3.7. DHCPv6 Common YANG Module . . . . . . . . . . . . . . . . 70
4. Security Considerations . . . . . . . . . . . . . . . . . . . 71 4. Security Considerations . . . . . . . . . . . . . . . . . . . 74
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 72 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 75
6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 73 6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 76
7. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 74 7. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 76
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 74 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 77
8.1. Normative References . . . . . . . . . . . . . . . . . . 74 8.1. Normative References . . . . . . . . . . . . . . . . . . 77
8.2. Informative References . . . . . . . . . . . . . . . . . 76 8.2. Informative References . . . . . . . . . . . . . . . . . 79
Appendix A. Example of Augmenting Additional DHCPv6 Option Appendix A. Example of Augmenting Additional DHCPv6 Option
Definitions . . . . . . . . . . . . . . . . . . . . . . . 76 Definitions . . . . . . . . . . . . . . . . . . . . . . . 79
Appendix B. Example Vendor Specific Server Configuration Appendix B. Example Vendor Specific Server Configuration
Module . . . . . . . . . . . . . . . . . . . . . . . . . 79 Module . . . . . . . . . . . . . . . . . . . . . . . . . 83
Appendix C. Example definition of class selector Appendix C. Example definition of class selector
configuration . . . . . . . . . . . . . . . . . . . . . . 85 configuration . . . . . . . . . . . . . . . . . . . . . . 89
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 91 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 95
1. Introduction 1. Introduction
DHCPv6 [RFC8415] is widely used for supplying configuration and other DHCPv6 [RFC8415] is widely used for supplying configuration and other
relevant parameters to clients in IPv6 networks. This document relevant parameters to clients in IPv6 networks. This document
defines YANG modules for the configuration and management of DHCPv6 defines YANG modules for the configuration and management of DHCPv6
servers, relays and clients. Separate 'element' modules are defined servers, relays and clients. Separate 'element' modules are defined
for each of these. There is an additional module per-element for each of these. There is an additional module per-element
defining DHCP options which are relevant for that element (taken from defining DHCP options which are relevant for that element (taken from
the options defined in [RFC8415]. the options defined in [RFC8415].
skipping to change at page 6, line 46 skipping to change at page 6, line 46
+--rw option-set-id* leafref +--rw option-set-id* leafref
+--rw valid-lifetime? +--rw valid-lifetime?
| dhcpv6-common:timer-seconds32 | dhcpv6-common:timer-seconds32
+--rw renew-time? +--rw renew-time?
| dhcpv6-common:timer-seconds32 | dhcpv6-common:timer-seconds32
+--rw rebind-time? +--rw rebind-time?
| dhcpv6-common:timer-seconds32 | dhcpv6-common:timer-seconds32
+--rw preferred-lifetime? +--rw preferred-lifetime?
| dhcpv6-common:timer-seconds32 | dhcpv6-common:timer-seconds32
+--rw rapid-commit? boolean +--rw rapid-commit? boolean
+--rw network-range* [network-range-id] +--rw network-range* [id]
| +--rw id uint32 | +--rw id uint32
| +--rw description string | +--rw description string
| +--rw network-prefix inet:ipv6-prefix | +--rw network-prefix inet:ipv6-prefix
| +--rw option-set-id* leafref | +--rw option-set-id* leafref
| +--rw valid-lifetime? | +--rw valid-lifetime?
| | dhcpv6-common:timer-seconds32 | | dhcpv6-common:timer-seconds32
| +--rw renew-time? | +--rw renew-time?
| | dhcpv6-common:timer-seconds32 | | dhcpv6-common:timer-seconds32
| +--rw rebind-time? | +--rw rebind-time?
| | dhcpv6-common:timer-seconds32 | | dhcpv6-common:timer-seconds32
skipping to change at page 17, line 41 skipping to change at page 17, line 41
* retransmission-failed: Raised when the retransmission mechanism * retransmission-failed: Raised when the retransmission mechanism
defined in [RFC8415] has failed. defined in [RFC8415] has failed.
3. DHCPv6 YANG Modules 3. DHCPv6 YANG Modules
3.1. DHCPv6 Server YANG Module 3.1. DHCPv6 Server YANG Module
This module imports typedefs from [RFC6991], [RFC8343]. This module imports typedefs from [RFC6991], [RFC8343].
<CODE BEGINS> file ietf-dhcpv6-server.yang <CODE BEGINS> file "ietf-dhcpv6-server.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 "dhcpv6-server"; prefix "dhcpv6-server";
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";
skipping to change at page 18, line 47 skipping to change at page 18, line 47
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 without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
(http://trustee.ietf.org/license-info). (http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 8513; see This version of this YANG module is part of RFC 8513; see
the RFC itself for full legal notices."; the RFC itself for full legal notices.";
revision 2020-12-10 {
description "Version update for draft -13 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-13";
}
revision 2020-12-01 { revision 2020-12-01 {
description "Version update for draft -12 publication."; description "Version update for draft -12 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-12"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-12";
} }
revision 2020-05-26 { revision 2020-05-26 {
description "Version update for draft -11 publication and description "Version update for draft -11 publication and
to align revisions across the different modules."; to align revisions across the different modules.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-11"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-11";
} }
revision 2019-12-02 { revision 2019-12-02 {
description "Major reworking of the module."; description "Major reworking of the module.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-10"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-10";
} }
skipping to change at page 19, line 42 skipping to change at page 19, line 47
description "First version of the separated server specific description "First version of the separated server specific
YANG model."; YANG model.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang"; reference "I-D: draft-ietf-dhc-dhcpv6-yang";
} }
/* /*
* Identities * Identities
*/ */
identity server { identity server {
description "DHCPv6 server identity.";
base "dhcpv6-common:dhcpv6-node"; base "dhcpv6-common:dhcpv6-node";
description "DHCPv6 server identity.";
} }
leaf dhcpv6-node-type { leaf dhcpv6-node-type {
description "Type for a DHCPv6 server.";
type identityref { type identityref {
base "dhcpv6-common:dhcpv6-node"; base "dhcpv6-common:dhcpv6-node";
} }
} description "Type for a DHCPv6 server.";
}
/* /*
* Features * Features
*/ */
feature prefix-delegation { feature prefix-delegation {
description "Denotes that the server implements DHCPv6 prefix description "Denotes that the server implements DHCPv6 prefix
delegation."; delegation.";
} }
/* /*
skipping to change at page 21, line 4 skipping to change at page 21, line 10
type dhcpv6-common:timer-seconds32; type dhcpv6-common:timer-seconds32;
description "Preferred lifetime for the Identity Association description "Preferred lifetime for the Identity Association
(IA)."; (IA).";
} }
leaf rapid-commit { leaf rapid-commit {
type boolean; type boolean;
description "A value of 1 specifies that the pool supports description "A value of 1 specifies that the pool supports
client-server exchanges involving two messages."; client-server exchanges involving two messages.";
} }
} }
grouping lease-information { grouping lease-information {
description "Binding information for each client that has description "Binding information for each client that has
been allocated an IPv6 address or prefix."; been allocated an IPv6 address or prefix.";
leaf client-duid { leaf client-duid {
description "Client DUID.";
type binary; type binary;
description "Client DUID.";
} }
leaf iaid { leaf iaid {
type uint32; type uint32;
mandatory true; mandatory true;
description "Client's IAID"; description "Client's IAID";
} }
leaf allocation-time { leaf allocation-time {
description "Time and date that the lease was made.";
type yang:date-and-time; type yang:date-and-time;
description "Time and date that the lease was made.";
} }
leaf last-renew-rebind { leaf last-renew-rebind {
type yang:date-and-time;
description "Time of the last successful renew or description "Time of the last successful renew or
rebind."; rebind.";
type yang:date-and-time;
} }
leaf preferred-lifetime { leaf preferred-lifetime {
type dhcpv6-common:timer-seconds32;
description "The preferred lifetime expressed in description "The preferred lifetime expressed in
seconds."; seconds.";
type dhcpv6-common:timer-seconds32;
} }
leaf valid-lifetime { leaf valid-lifetime {
type dhcpv6-common:timer-seconds32;
description "The valid lifetime for the leased prefix description "The valid lifetime for the leased prefix
expressed in seconds."; expressed in seconds.";
type dhcpv6-common:timer-seconds32;
} }
leaf lease-t1 { leaf lease-t1 {
type dhcpv6-common:timer-seconds32;
description "The time interval after which the client description "The time interval after which the client
should contact the server from which the addresses should contact the server from which the addresses
in the IA_NA were obtained to extend the lifetimes in the IA_NA were obtained to extend the lifetimes
of the addresses assigned to the IA_PD."; of the addresses assigned to the IA_PD.";
type dhcpv6-common:timer-seconds32;
} }
leaf lease-t2 { leaf lease-t2 {
type dhcpv6-common:timer-seconds32;
description "The time interval after which the client description "The time interval after which the client
should contact any available server to extend should contact any available server to extend
the lifetimes of the addresses assigned to the the lifetimes of the addresses assigned to the
IA_PD."; IA_PD.";
type dhcpv6-common:timer-seconds32;
} }
} }
grouping message-stats { grouping message-stats {
description "Counters for DHCPv6 messages."; description "Counters for DHCPv6 messages.";
leaf solicit-count { leaf solicit-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Solicit (1) messages received."; description "Number of Solicit (1) messages received.";
} }
leaf advertise-count { leaf advertise-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Advertise (2) messages sent."; description "Number of Advertise (2) messages sent.";
} }
leaf request-count { leaf request-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Request (3) messages received."; description "Number of Request (3) messages received.";
} }
leaf confirm-count { leaf confirm-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Confirm (4) messages received."; description "Number of Confirm (4) messages received.";
} }
leaf renew-count { leaf renew-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Renew (5) messages received."; description "Number of Renew (5) messages received.";
} }
leaf rebind-count { leaf rebind-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Rebind (6) messages received."; description "Number of Rebind (6) messages received.";
} }
leaf reply-count { leaf reply-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Reply (7) messages sent."; description "Number of Reply (7) messages sent.";
} }
leaf release-count { leaf release-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Release (8) messages received."; description "Number of Release (8) messages received.";
} }
leaf decline-count { leaf decline-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Decline (9) messages received."; description "Number of Decline (9) messages received.";
} }
leaf reconfigure-count { leaf reconfigure-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Reconfigure (10) messages sent."; description "Number of Reconfigure (10) messages sent.";
} }
leaf information-request-count { leaf information-request-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Information-request (11) messages description "Number of Information-request (11) messages
received."; received.";
} }
} }
/* /*
* Data Nodes * Data Nodes
*/ */
container dhcpv6-server { container dhcpv6-server {
description "Configuration nodes for the DHCPv6 server.";
container server-duid { container server-duid {
description "DUID of the server."; description "DUID of the server.";
uses dhcpv6-common:duid; uses dhcpv6-common:duid;
} }
container vendor-config { container vendor-config {
description "This container provides a location for description "This container provides a location for
augmenting vendor or implementation specific augmenting vendor or implementation specific
configuration nodes."; configuration nodes.";
} }
container option-sets { container option-sets {
skipping to change at page 24, line 22 skipping to change at page 24, line 30
their own class-selector YANG."; their own class-selector YANG.";
} }
container network-ranges { container network-ranges {
description "This model is based on an address and parameter description "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 network-ranges. Under is defined as the container for all network-ranges. Under
this are the individual network-ranges."; this are the individual network-ranges.";
uses resource-config; uses resource-config;
list network-range { list network-range {
key network-range-id; key id;
description "Network-ranges are identified by the description "Network-ranges are identified by the
'network-range-id' key."; 'id' key.";
leaf id { leaf id {
type uint32; type uint32;
mandatory true; mandatory true;
description "Equivalent to subnet ID."; description "Equivalent to subnet ID.";
} }
leaf description { leaf description {
type string; type string;
mandatory true; mandatory true;
description "Description for the network range."; description "Description for the network range.";
} }
skipping to change at page 25, line 33 skipping to change at page 25, line 41
mandatory true; mandatory true;
description "Maximum number of addresses that can description "Maximum number of addresses that can
be simultaneously allocated from this pool."; be simultaneously allocated from this pool.";
} }
uses resource-config; uses resource-config;
container host-reservations { container host-reservations {
description "Configuration for host reservations from description "Configuration for host reservations from
the address pool."; the address pool.";
list host-reservation { list host-reservation {
key reserved-addr; key reserved-addr;
description "List of host reservations.";
leaf client-duid { leaf client-duid {
type binary; type binary;
description "Client DUID for the reservation."; description "Client DUID for the reservation.";
} }
leaf reserved-addr { leaf reserved-addr {
type inet:ipv6-address; type inet:ipv6-address;
description "Reserved IPv6 address."; description "Reserved IPv6 address.";
} }
uses resource-config; uses resource-config;
} }
} }
container active-leases { container active-leases {
config false;
description "Holds state related to active client description "Holds state related to active client
leases."; leases.";
config false;
leaf total-count { leaf total-count {
type uint64; type uint64;
mandatory true; mandatory true;
description "The total number of addresses in the description "The total number of addresses in the
pool."; pool.";
} }
leaf allocated-count { leaf allocated-count {
type uint64; type uint64;
mandatory true; mandatory true;
description "The number of addresses or prefixes description "The number of addresses or prefixes
in the pool that are currently allocated."; in the pool that are currently allocated.";
} }
list active-lease { list active-lease {
key leased-address; key leased-address;
description "List of active address leases.";
leaf leased-address { leaf leased-address {
type inet:ipv6-address; type inet:ipv6-address;
description "Active address lease entry.";
} }
uses lease-information; uses lease-information;
} }
} }
} }
} }
container prefix-pools { container prefix-pools {
if-feature prefix-delegation;
description "Configuration for the DHCPv6 server's description "Configuration for the DHCPv6 server's
prefix pools."; prefix pools.";
if-feature prefix-delegation;
list prefix-pool { list prefix-pool {
key pool-id; key pool-id;
description "List of prefix pools for allocation to description "List of prefix pools for allocation to
clients, distinguished by 'pool-id'."; clients, distinguished by 'pool-id'.";
leaf pool-id { leaf pool-id {
type uint32; type uint32;
mandatory true; mandatory true;
description "Unique identifier for the pool."; description "Unique identifier for the pool.";
} }
leaf pool-prefix { leaf pool-prefix {
skipping to change at page 27, line 8 skipping to change at page 27, line 19
type dhcpv6-common:threshold; type dhcpv6-common:threshold;
mandatory true; mandatory true;
description "Maximum percentage utilization of the description "Maximum percentage utilization of the
prefix pool in this pool."; prefix pool in this pool.";
} }
uses resource-config; uses resource-config;
container host-reservations { container host-reservations {
description "Configuration for host reservations description "Configuration for host reservations
from the prefix pool."; from the prefix pool.";
list prefix-reservation { list prefix-reservation {
description "reserved prefix reservation";
key reserved-prefix; key reserved-prefix;
description "reserved prefix reservation";
leaf client-duid { leaf client-duid {
type binary; type binary;
description "Client DUID for the reservation."; description "Client DUID for the reservation.";
} }
leaf reserved-prefix { leaf reserved-prefix {
type inet:ipv6-prefix; type inet:ipv6-prefix;
description "Reserved IPv6 prefix"; description "Reserved IPv6 prefix";
} }
leaf reserved-prefix-len { leaf reserved-prefix-len {
type uint8; type uint8;
description "Reserved IPv6 prefix length."; description "Reserved IPv6 prefix length.";
} }
} }
uses resource-config; uses resource-config;
} }
container active-leases { container active-leases {
config false;
description "Holds state related to for active client description "Holds state related to for active client
prefix leases."; prefix leases.";
config false;
leaf total-count { leaf total-count {
type uint64; type uint64;
mandatory true; mandatory true;
description "The total number of prefixes in description "The total number of prefixes in
the pool."; the pool.";
} }
leaf allocated-count { leaf allocated-count {
type uint64; type uint64;
mandatory true; mandatory true;
description "The number of prefixes in the pool description "The number of prefixes in the pool
that are currently allocated."; that are currently allocated.";
} }
list active-lease { list active-lease {
key leased-prefix; key leased-prefix;
description "List of active prefix leases.";
leaf leased-prefix { leaf leased-prefix {
type inet:ipv6-prefix; type inet:ipv6-prefix;
description "Active leased prefix entry.";
} }
uses lease-information; uses lease-information;
} }
} }
} }
} }
} }
uses message-stats; uses message-stats;
} }
} }
/* /*
* Notifications * Notifications
*/ */
notification address-pool-utilization-threshold-exceeded { notification address-pool-utilization-threshold-exceeded {
description "Notification sent when the address pool description "Notification sent when the address pool
utilization exceeds the configured threshold."; utilization exceeds the configured threshold.";
leaf pool-id { leaf pool-id {
type leafref { type leafref {
path "/dhcpv6-server/network-ranges/network-range/address-poo path "/dhcpv6-server/network-ranges/network-range/" +
ls/address-pool/pool-id"; "address-pools/address-pool/pool-id";
} }
description "Leafref to the address pool which the notification
is being generated for.";
} }
leaf total-address-count { leaf total-address-count {
type uint64; type uint64;
mandatory true; mandatory true;
description "Count of the total addresses in the pool."; description "Count of the total addresses in the pool.";
} }
leaf max-address-count { leaf max-address-count {
type uint64; type uint64;
mandatory true; mandatory true;
description "Maximum count of addresses that can be allocated description "Maximum count of addresses that can be allocated
skipping to change at page 28, line 37 skipping to change at page 29, line 4
type uint64; type uint64;
mandatory true; mandatory true;
description "Maximum count of addresses that can be allocated description "Maximum count of addresses that can be allocated
in the pool. This value may be less than count of total in the pool. This value may be less than count of total
addresses."; addresses.";
} }
leaf allocated-address-count { leaf allocated-address-count {
type uint64; type uint64;
mandatory true; mandatory true;
description "Count of allocated addresses in the pool."; description "Count of allocated addresses in the pool.";
} }
} }
notification prefix-pool-utilization-threshold-exceeded { notification prefix-pool-utilization-threshold-exceeded {
if-feature prefix-delegation;
description "Notification sent when the prefix pool description "Notification sent when the prefix pool
utilization exceeds the configured threshold."; utilization exceeds the configured threshold.";
if-feature prefix-delegation;
leaf pool-id { leaf pool-id {
type leafref { type leafref {
path "/dhcpv6-server/network-ranges/network-range/prefix-pool path "/dhcpv6-server/network-ranges/network-range/" +
s/prefix-pool/pool-id"; "prefix-pools/prefix-pool/pool-id";
} }
mandatory true; mandatory true;
description "Unique identifier for the pool.";
} }
leaf max-pd-space-utilization { leaf max-pd-space-utilization {
description "PD space utilization threshold.";
type leafref { type leafref {
path "/dhcpv6-server/network-ranges/network-range/prefix-pool path "/dhcpv6-server/network-ranges/network-range/" +
s/prefix-pool/max-pd-space-utilization"; "prefix-pools/prefix-pool/max-pd-space-utilization";
} }
mandatory true; mandatory true;
description "PD space utilization threshold.";
} }
leaf pd-space-utilization { leaf pd-space-utilization {
description "Current PD space utilization";
type uint64; type uint64;
description "Current PD space utilization";
} }
} }
notification invalid-client-detected { notification invalid-client-detected {
description "Notification sent when the server detects an description "Notification sent when the server detects an
invalid client."; invalid client.";
leaf duid { leaf duid {
description "Client DUID.";
type binary; type binary;
description "Client DUID.";
} }
leaf description { leaf description {
type string; type string;
description "Description of the event (e.g. and error code or description "Description of the event (e.g. and error code or
log message)."; log message).";
} }
} }
notification decline-received { notification decline-received {
description "Notification sent when the server has received a description "Notification sent when the server has received a
Decline (9) message from a client."; Decline (9) message from a client.";
leaf duid { leaf duid {
description "Client DUID.";
type binary; type binary;
description "Client DUID.";
} }
list declined-resources { list declined-resources {
description "List of declined addresses and/or prefixes."; description "List of declined addresses and/or prefixes.";
choice resource-type { choice resource-type {
description "Type of resource that has been declined.";
case declined-address { case declined-address {
leaf address { leaf address {
type inet:ipv6-address; type inet:ipv6-address;
description "Address that has been declined.";
} }
} }
case declined-prefix { case declined-prefix {
leaf prefix { leaf prefix {
type inet:ipv6-prefix; type inet:ipv6-prefix;
description "Prefix that has been declined.";
} }
} }
} }
} }
} }
notification non-success-code-sent { notification non-success-code-sent {
description "Notification sent when the server responded description "Notification sent when the server responded
to a client with non-success status code."; to a client with non-success status code.";
leaf status-code { leaf status-code {
type uint16; type uint16;
mandatory true; mandatory true;
description "Status code returned to the client."; description "Status code returned to the client.";
skipping to change at page 30, line 17 skipping to change at page 30, line 35
notification non-success-code-sent { notification non-success-code-sent {
description "Notification sent when the server responded description "Notification sent when the server responded
to a client with non-success status code."; to a client with non-success status code.";
leaf status-code { leaf status-code {
type uint16; type uint16;
mandatory true; mandatory true;
description "Status code returned to the client."; description "Status code returned to the client.";
} }
leaf duid { leaf duid {
description "Client DUID.";
type binary; type binary;
description "Client DUID.";
} }
} }
/* /*
* RPCs * RPCs
*/ */
rpc delete-address-lease { rpc delete-address-lease {
nacm:default-deny-all; nacm:default-deny-all;
description "Deletes a client's active address lease from the description "Deletes a client's active address lease from the
skipping to change at page 31, line 21 skipping to change at page 31, line 39
} }
} }
output { output {
leaf return-message { leaf return-message {
type string; type string;
description "Response message from the server."; description "Response message from the server.";
} }
} }
} }
} }
<CODE ENDS> <CODE ENDS>
3.2. DHCPv6 Relay YANG Module 3.2. DHCPv6 Relay YANG Module
This module imports typedefs from [RFC6991], [RFC8343]. This module imports typedefs from [RFC6991], [RFC8343].
<CODE BEGINS> file ietf-dhcpv6-relay.yang <CODE BEGINS> file "ietf-dhcpv6-relay.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 "dhcpv6-relay"; prefix "dhcpv6-relay";
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";
skipping to change at page 32, line 44 skipping to change at page 33, line 15
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 without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
(http://trustee.ietf.org/license-info). (http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 8513; see This version of this YANG module is part of RFC 8513; see
the RFC itself for full legal notices."; the RFC itself for full legal notices.";
revision 2020-12-10 {
description "Version update for draft -13 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-13";
}
revision 2020-12-01 { revision 2020-12-01 {
description "Version update for draft -12 publication."; description "Version update for draft -12 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-12"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-12";
} }
revision 2020-05-26 { revision 2020-05-26 {
description "Version update for draft -11 publication and description "Version update for draft -11 publication and
to align revisions across the different modules."; to align revisions across the different modules.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-11"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-11";
} }
revision 2019-09-20 { revision 2019-09-20 {
description ""; description "";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-10"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-10";
} }
revision 2018-03-04 { revision 2018-03-04 {
description "Resolved most issues on the DHC official description "Resolved most issues on the DHC official
skipping to change at page 33, line 30 skipping to change at page 34, line 4
description description
"Resolve most issues on Ians Github."; "Resolve most issues on Ians Github.";
reference reference
"I-D: draft-ietf-dhc-dhcpv6-yang"; "I-D: draft-ietf-dhc-dhcpv6-yang";
} }
revision 2017-11-24 { revision 2017-11-24 {
description description
"First version of the separated relay specific "First version of the separated relay specific
YANG model."; YANG model.";
reference reference
"I-D: draft-ietf-dhc-dhcpv6-yang"; "I-D: draft-ietf-dhc-dhcpv6-yang";
} }
/* /*
* Identities * Identities
*/ */
identity relay { identity relay {
description "DHCPv6 relay agent identity.";
base "dhcpv6-common:dhcpv6-node"; base "dhcpv6-common:dhcpv6-node";
description "DHCPv6 relay agent identity.";
} }
leaf dhcpv6-node-type { leaf dhcpv6-node-type {
description "Type for a DHCPv6 relay.";
type identityref { type identityref {
base "dhcpv6-common:dhcpv6-node"; base "dhcpv6-common:dhcpv6-node";
} }
description "Type for a DHCPv6 relay.";
} }
/* /*
* Features * Features
*/ */
feature prefix-delegation { feature prefix-delegation {
description "Enable if the relay functions as a delegating router description "Enable if the relay functions as a delegating router
for DHCPv6 prefix delegation."; for DHCPv6 prefix delegation.";
} }
/* /*
* Groupings * Groupings
*/ */
grouping pd-lease-state { grouping pd-lease-state {
description "State data for the relay."; description "State data for the relay.";
list pd-leases { list pd-leases {
config false;
key ia-pd-prefix; key ia-pd-prefix;
config false;
description "Information about an active IA_PD prefix description "Information about an active IA_PD prefix
delegation."; delegation.";
leaf ia-pd-prefix { leaf ia-pd-prefix {
description "Prefix that is delegated.";
type inet:ipv6-prefix; type inet:ipv6-prefix;
description "Prefix that is delegated.";
} }
leaf last-renew { leaf last-renew {
type yang:date-and-time;
description "Time of the last successful refresh or renew description "Time of the last successful refresh or renew
of the delegated prefix."; of the delegated prefix.";
type yang:date-and-time;
} }
leaf client-peer-address { leaf client-peer-address {
description "Peer-address of the client.";
type inet:ipv6-address; type inet:ipv6-address;
description "Peer-address of the client.";
} }
leaf client-duid { leaf client-duid {
description "DUID of the leasing client.";
type binary; type binary;
description "DUID of the leasing client.";
} }
leaf server-duid { leaf server-duid {
description "DUID of the delegating server.";
type binary; type binary;
description "DUID of the delegating server.";
} }
} }
} }
grouping message-statistics { grouping message-statistics {
description "Contains counters for the different DHCPv6 description "Contains counters for the different DHCPv6
message types."; message types.";
leaf solicit-received-count { leaf solicit-received-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Solicit (1) messages received."; description "Number of Solicit (1) messages received.";
} }
leaf advertise-sent-count { leaf advertise-sent-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Advertise (2) messages sent."; description "Number of Advertise (2) messages sent.";
} }
leaf request-received-count { leaf request-received-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Request (3) messages received."; description "Number of Request (3) messages received.";
} }
leaf confirm-received-count { leaf confirm-received-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Confirm (4) messages received."; description "Number of Confirm (4) messages received.";
} }
leaf renew-received-count { leaf renew-received-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Renew (5) messages received."; description "Number of Renew (5) messages received.";
} }
leaf rebind-received-count { leaf rebind-received-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Rebind (6) messages received."; description "Number of Rebind (6) messages received.";
} }
leaf reply-sent-count { leaf reply-sent-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Reply (7) messages received."; description "Number of Reply (7) messages received.";
} }
leaf release-received-count { leaf release-received-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Release (8) messages sent."; description "Number of Release (8) messages sent.";
} }
leaf decline-received-count { leaf decline-received-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Decline (9) messages sent."; description "Number of Decline (9) messages sent.";
} }
leaf reconfigure-sent-count { leaf reconfigure-sent-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Reconfigure (10) messages sent."; description "Number of Reconfigure (10) messages sent.";
} }
leaf information-request-received-count { leaf information-request-received-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Information-request (11) messages description "Number of Information-request (11) messages
received."; received.";
} }
leaf unknown-message-received-count { leaf unknown-message-received-count {
config "false";
type uint32; type uint32;
config "false";
description description
"Number of messages of unknown type that have been "Number of messages of unknown type that have been
received."; received.";
} }
leaf unknown-message-sent-count { leaf unknown-message-sent-count {
config "false";
type uint32; type uint32;
config "false";
description description
"Number of messages of unknown type that have been sent."; "Number of messages of unknown type that have been sent.";
} }
leaf discarded-message-count { leaf discarded-message-count {
config "false";
type uint32; type uint32;
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 global-statistics { grouping global-statistics {
description "Global statistics for the device.";
leaf relay-forward-sent-count { leaf relay-forward-sent-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Relay-forward (12) messages sent."; description "Number of Relay-forward (12) messages sent.";
} }
leaf relay-forward-received-count { leaf relay-forward-received-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Relay-forward (12) messages received."; description "Number of Relay-forward (12) messages received.";
} }
leaf relay-reply-received-count { leaf relay-reply-received-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Relay-reply (13) messages received."; description "Number of Relay-reply (13) messages received.";
} }
leaf relay-forward-unknown-sent-count { leaf relay-forward-unknown-sent-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Relay-forward (12) messages containing description "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 {
config "false";
type uint32; type uint32;
config "false";
description "Number of Relay-forward (12) messages containing description "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 {
config "false";
type uint32; type uint32;
config "false";
description "Number of messages that have been discarded description "Number of messages that have been discarded
for any reason."; for any reason.";
} }
} }
/* /*
* Data Nodes * Data Nodes
*/ */
container dhcpv6-relay { container dhcpv6-relay {
description description
"This container contains the configuration data nodes for "This container contains the configuration data nodes for
the relay."; the relay.";
list relay-if { list relay-if {
key if-name; key if-name;
description "List of interfaces configured for DHCPv6 relaying.
";
leaf if-name { leaf if-name {
type if:interface-ref; type if:interface-ref;
description "interface-ref to the relay interface.";
} }
leaf-list destination-addresses { leaf-list destination-addresses {
type inet:ipv6-address; type inet:ipv6-address;
description "Each DHCPv6 relay agent may be configured with description "Each DHCPv6 relay agent may be configured with
a list of destination addresses for relayed messages. a list of destination addresses for relayed messages.
The list may include unicast addresses, multicast addresses The list may include unicast addresses, multicast addresses
or other valid addresses."; or other valid addresses.";
} }
leaf link-address { leaf link-address {
description "An address that may be used by the server
to identify the link on which the client is located.";
type binary { type binary {
length "0..16"; length "0..16";
} }
} description "An address that may be used by the server
to identify the link on which the client is located.";
}
container relay-options { container relay-options {
description "Definitions for DHCPv6 options that can be sent description "Definitions for DHCPv6 options that can be sent
by the relay are augmented to this location from other YANG by the relay are augmented to this location from other YANG
modules as required."; modules as required.";
} }
uses message-statistics; uses message-statistics;
container prefix-delegation { container prefix-delegation {
if-feature prefix-delegation;
presence "Enables prefix delegation for this interface.";
description "Controls and holds state information for prefix description "Controls and holds state information for prefix
delegation."; delegation.";
presence "Enables prefix delegation for this interface.";
if-feature prefix-delegation;
uses pd-lease-state; uses pd-lease-state;
} }
} }
uses global-statistics; uses global-statistics;
} }
/* /*
* 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 "Raised if the entry for and interface with DHCPv6 description "Raised if the entry for and interface with DHCPv6
related configuration or state is removed from related configuration or state is removed from
if:interface-refs."; if:interface-refs.";
leaf relay-if-name { leaf relay-if-name {
description "Name of the interface that has been removed.";
type leafref { type leafref {
path "/dhcpv6-relay/relay-if/if-name"; path "/dhcpv6-relay/relay-if/if-name";
} }
description "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 "Last IPv6 address configured on the interface."; description "Last IPv6 address configured on the interface.";
} }
} }
} }
/* /*
* RPCs * RPCs
skipping to change at page 40, line 9 skipping to change at page 40, line 36
} }
} }
} }
} }
<CODE ENDS> <CODE ENDS>
3.3. DHCPv6 Client YANG Module 3.3. DHCPv6 Client YANG Module
This module imports typedefs from [RFC6991], [RFC8343]. This module imports typedefs from [RFC6991], [RFC8343].
<CODE BEGINS> file ietf-dhcpv6-client.yang <CODE BEGINS> file "ietf-dhcpv6-client.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 "dhcpv6-client"; prefix "dhcpv6-client";
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";
skipping to change at page 41, line 18 skipping to change at page 41, line 46
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 without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
(http://trustee.ietf.org/license-info). (http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 8513; see This version of this YANG module is part of RFC 8513; see
the RFC itself for full legal notices."; the RFC itself for full legal notices.";
revision 2020-12-10 {
description "Version update for draft -13 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-13";
}
revision 2020-12-01 { revision 2020-12-01 {
description "Version update for draft -12 publication."; description "Version update for draft -12 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-12"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-12";
} }
revision 2020-05-26 { revision 2020-05-26 {
description "Version update for draft -11 publication and description "Version update for draft -11 publication and
to align revisions across the different modules."; to align revisions across the different modules.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-11"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-11";
} }
skipping to change at page 42, line 17 skipping to change at page 42, line 50
/* /*
* Identities * Identities
*/ */
identity client { identity client {
base "dhcpv6-common:dhcpv6-node"; base "dhcpv6-common:dhcpv6-node";
description "DHCPv6 client identity."; description "DHCPv6 client identity.";
} }
leaf dhcpv6-node-type { leaf dhcpv6-node-type {
description "Type for a DHCPv6 client.";
type identityref { type identityref {
base "dhcpv6-common:dhcpv6-node"; base "dhcpv6-common:dhcpv6-node";
} }
description "Type for a DHCPv6 client.";
} }
/* /*
* Groupings * Groupings
*/ */
grouping message-statistics { grouping message-statistics {
description "Counters for DHCPv6 messages."; description "Counters for DHCPv6 messages.";
leaf solicit-count { leaf solicit-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Solicit (1) messages sent."; description "Number of Solicit (1) messages sent.";
} }
leaf advertise-count { leaf advertise-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Advertise (2) messages received."; description "Number of Advertise (2) messages received.";
} }
leaf request-count { leaf request-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Request (3) messages sent."; description "Number of Request (3) messages sent.";
} }
leaf confirm-count { leaf confirm-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Confirm (4) messages sent."; description "Number of Confirm (4) messages sent.";
} }
leaf renew-count { leaf renew-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Renew (5) messages sent."; description "Number of Renew (5) messages sent.";
} }
leaf rebind-count { leaf rebind-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Rebind (6) messages sent."; description "Number of Rebind (6) messages sent.";
} }
leaf reply-count { leaf reply-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Reply (7) messages received."; description "Number of Reply (7) messages received.";
} }
leaf release-count { leaf release-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Release (8) messages sent."; description "Number of Release (8) messages sent.";
} }
leaf decline-count { leaf decline-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Decline (9) messages sent."; description "Number of Decline (9) messages sent.";
} }
leaf reconfigure-count { leaf reconfigure-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Reconfigure (10) messages received."; description "Number of Reconfigure (10) messages received.";
} }
leaf information-request-count { leaf information-request-count {
config "false";
type uint32; type uint32;
config "false";
description "Number of Information-request (11) messages description "Number of Information-request (11) messages
sent."; sent.";
} }
} }
/* /*
* Data Nodes * Data Nodes
*/ */
container dhcpv6-client { container dhcpv6-client {
skipping to change at page 44, line 31 skipping to change at page 45, line 16
} }
container ia-na-options { container ia-na-options {
description "An augmentation point for additional options description "An augmentation point for additional options
that the client will send in the IA_NA-options field that the client will 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 "Information about the active IA_NA lease."; description "Information about the active IA_NA lease.";
leaf ia-na-address { leaf ia-na-address {
description "Address that is currently leased.";
type inet:ipv6-address; type inet:ipv6-address;
description "Address that is currently leased.";
} }
leaf preferred-lifetime { leaf preferred-lifetime {
type dhcpv6-common:timer-seconds32;
description "The preferred lifetime for the leased description "The preferred lifetime for the leased
address expressed in units of seconds."; address expressed in units of seconds.";
type dhcpv6-common:timer-seconds32;
} }
leaf valid-lifetime { leaf valid-lifetime {
type dhcpv6-common:timer-seconds32;
description "The valid lifetime for the leased address description "The valid lifetime for the leased address
expressed in units of seconds."; expressed in units of seconds.";
type dhcpv6-common:timer-seconds32;
} }
leaf lease-t1 { leaf lease-t1 {
type dhcpv6-common:timer-seconds32;
description "The time interval after which the client description "The time interval after which the client
should contact the server from which the addresses should contact the server from which the addresses
in the IA_NA were obtained to extend the lifetimes in the IA_NA were obtained to extend the lifetimes
of the addresses assigned to the IA_NA."; of the addresses assigned to the IA_NA.";
type dhcpv6-common:timer-seconds32;
} }
leaf lease-t2 { leaf lease-t2 {
type dhcpv6-common:timer-seconds32;
description "The time interval after which the client description "The time interval after which the client
should contact any available server to extend should contact any available server to extend
the lifetimes of the addresses assigned to the IA_NA."; the lifetimes of the addresses assigned to the IA_NA.";
type dhcpv6-common:timer-seconds32;
} }
leaf allocation-time { leaf allocation-time {
type yang:date-and-time;
description "Time and date that the address was first description "Time and date that the address was first
leased."; leased.";
type yang:date-and-time;
} }
leaf last-renew-rebind { leaf last-renew-rebind {
type yang:date-and-time;
description "Time of the last successful renew or rebind description "Time of the last successful renew or rebind
of the leased address."; of the leased address.";
type yang:date-and-time;
} }
leaf server-duid { leaf server-duid {
description "DUID of the leasing server.";
type binary; type binary;
description "DUID of the leasing server.";
} }
} }
} }
list ia-ta { list ia-ta {
key iaid; key iaid;
description "Configuration relevant for an IA_TA."; description "Configuration relevant for an IA_TA.";
reference "RFC8415: Dynamic Host Configuration Protocol for reference "RFC8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6)."; IPv6 (DHCPv6).";
leaf iaid { leaf iaid {
type uint32; type uint32;
skipping to change at page 45, line 43 skipping to change at page 46, line 28
} }
container ia-ta-options { container ia-ta-options {
description "An augmentation point for additional options description "An augmentation point for additional options
that the client will send in the IA_TA-options field that the client will 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 "Information about an active IA_TA lease."; description "Information about an active IA_TA lease.";
leaf ia-ta-address { leaf ia-ta-address {
description "Address that is currently leased.";
type inet:ipv6-address; type inet:ipv6-address;
description "Address that is currently leased.";
} }
leaf preferred-lifetime { leaf preferred-lifetime {
type dhcpv6-common:timer-seconds32;
description "The preferred lifetime for the leased description "The preferred lifetime for the leased
address expressed in units of seconds."; address expressed in units of seconds.";
type dhcpv6-common:timer-seconds32;
} }
leaf valid-lifetime { leaf valid-lifetime {
type dhcpv6-common:timer-seconds32;
description "The valid lifetime for the leased address description "The valid lifetime for the leased address
expressed in units of seconds."; expressed in units of seconds.";
type dhcpv6-common:timer-seconds32;
} }
leaf allocation-time { leaf allocation-time {
type yang:date-and-time;
description "Time and date that the address was first description "Time and date that the address was first
leased."; leased.";
type yang:date-and-time;
} }
leaf last-renew-rebind { leaf last-renew-rebind {
type yang:date-and-time;
description "Time of the last successful renew or rebind description "Time of the last successful renew or rebind
of the address."; of the address.";
type yang:date-and-time;
} }
leaf server-duid { leaf server-duid {
description "DUID of the leasing server.";
type binary; type binary;
description "DUID of the leasing server.";
} }
} }
} }
list ia-pd { list ia-pd {
key iaid; key iaid;
description "Configuration relevant for an IA_PD.";
reference "RFC8415: Dynamic Host Configuration Protocol for reference "RFC8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6)."; IPv6 (DHCPv6).";
description "Configuration relevant for an IA_PD.";
leaf iaid { leaf iaid {
type uint32; type uint32;
description "The unique identifier for this IA_PD."; description "The unique identifier for this IA_PD.";
} }
container ia-pd-options { container ia-pd-options {
description "An augmentation point for additional options description "An augmentation point for additional options
that the client will send in the IA_PD-options field that the client will send in the IA_PD-options field
of OPTION_IA_TA."; of OPTION_IA_TA.";
} }
container lease-state { container lease-state {
config "false"; config "false";
description "Information about an active IA_PD delegated description "Information about an active IA_PD delegated
prefix."; prefix.";
leaf ia-pd-prefix { leaf ia-pd-prefix {
description "Delegated prefix that is currently leased.";
type inet:ipv6-prefix; type inet:ipv6-prefix;
description "Delegated prefix that is currently leased.";
} }
leaf preferred-lifetime { leaf preferred-lifetime {
type dhcpv6-common:timer-seconds32;
description "The preferred lifetime for the leased prefix description "The preferred lifetime for the leased prefix
expressed in units of seconds."; expressed in units of seconds.";
type dhcpv6-common:timer-seconds32;
} }
leaf valid-lifetime { leaf valid-lifetime {
type dhcpv6-common:timer-seconds32;
description "The valid lifetime for the leased prefix description "The valid lifetime for the leased prefix
expressed in units of seconds."; expressed in units of seconds.";
type dhcpv6-common:timer-seconds32;
} }
leaf lease-t1 { leaf lease-t1 {
type dhcpv6-common:timer-seconds32;
description "The time interval after which the client description "The time interval after which the client
should contact the server from which the addresses should contact the server from which the addresses
in the IA_NA were obtained to extend the lifetimes in the IA_NA were obtained to extend the lifetimes
of the addresses assigned to the IA_PD."; of the addresses assigned to the IA_PD.";
type dhcpv6-common:timer-seconds32;
} }
leaf lease-t2 { leaf lease-t2 {
type dhcpv6-common:timer-seconds32;
description "The time interval after which the client description "The time interval after which the client
should contact any available server to extend should contact any available server to extend
the lifetimes of the addresses assigned to the IA_PD."; the lifetimes of the addresses assigned to the IA_PD.";
type dhcpv6-common:timer-seconds32;
} }
leaf allocation-time { leaf allocation-time {
type yang:date-and-time;
description "Time and date that the prefix was first description "Time and date that the prefix was first
leased."; leased.";
type yang:date-and-time;
} }
leaf last-renew-rebind { leaf last-renew-rebind {
type yang:date-and-time;
description "Time of the last successful renew or rebind description "Time of the last successful renew or rebind
of the delegated prefix."; of the delegated prefix.";
type yang:date-and-time;
} }
leaf server-duid { leaf server-duid {
description "DUID of the delegating server.";
type binary; type binary;
description "DUID of the delegating server.";
} }
} }
} }
uses message-statistics; uses message-statistics;
} }
} }
/* /*
* Notifications * Notifications
*/ */
skipping to change at page 48, line 38 skipping to change at page 49, line 24
notification unsuccessful-status-code { notification unsuccessful-status-code {
description "Notification sent when the client receives a message description "Notification sent when the client receives a message
that includes an unsuccessful Status Code option."; that includes an unsuccessful Status Code option.";
leaf status-code { leaf status-code {
type uint16; type uint16;
mandatory true; mandatory true;
description "Unsuccessful status code received by a client."; description "Unsuccessful status code received by a client.";
} }
leaf server-duid { leaf server-duid {
type binary;
mandatory true;
description "DUID of the server sending the unsuccessful description "DUID of the server sending the unsuccessful
error code."; error code.";
mandatory true;
type binary;
} }
} }
notification server-duid-changed { notification server-duid-changed {
description "Notification sent when the client receives a lease description "Notification sent when the client receives a lease
from a server with different DUID to the one currently stored from a server with different DUID to the one currently stored
by the client."; by the client.";
leaf new-server-duid { leaf new-server-duid {
description "DUID of the new server.";
mandatory true;
type binary; type binary;
mandatory true;
description "DUID of the new server.";
} }
leaf previous-server-duid { leaf previous-server-duid {
description "DUID of the previous server.";
mandatory true;
type binary; type binary;
mandatory true;
description "DUID of the previous server.";
} }
leaf lease-ia-na { leaf lease-ia-na {
description "Reference to the IA_NA lease.";
type leafref { type leafref {
path "/dhcpv6-client/client-if/ia-na/iaid"; path "/dhcpv6-client/client-if/ia-na/iaid";
} }
description "Reference to the IA_NA lease.";
} }
leaf lease-ia-ta { leaf lease-ia-ta {
description "Reference to the IA_TA lease.";
type leafref { type leafref {
path "/dhcpv6-client/client-if/ia-ta/iaid"; path "/dhcpv6-client/client-if/ia-ta/iaid";
} }
description "Reference to the IA_TA lease.";
} }
leaf lease-ia-pd { leaf lease-ia-pd {
description "Reference to the IA_PD lease.";
type leafref { type leafref {
path "/dhcpv6-client/client-if/ia-pd/iaid"; path "/dhcpv6-client/client-if/ia-pd/iaid";
} }
description "Reference to the IA_PD lease.";
} }
} }
} }
<CODE ENDS> <CODE ENDS>
3.4. RFC8415 Server Options YANG Module 3.4. RFC8415 Server Options YANG Module
This module imports typedefs from [RFC6991]. This module imports typedefs from [RFC6991].
<CODE BEGINS> file ietf-dhcpv6-options-rfc8415-server.yang <CODE BEGINS> file "ietf-dhcpv6-options-rfc8415-server.yang"
module ietf-dhcpv6-options-rfc8415 { module ietf-dhcpv6-options-rfc8415-server {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-options-8415-ser namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-options-rfc8415-
ver"; server";
prefix "rfc8415-srv"; prefix "rfc8415-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-dhcpv6-common { import ietf-dhcpv6-common {
prefix dhcpv6-common; prefix dhcpv6-common;
skipping to change at page 50, line 25 skipping to change at page 51, line 10
organization "DHC WG"; organization "DHC WG";
contact contact
"cuiyong@tsinghua.edu.cn "cuiyong@tsinghua.edu.cn
wangh13@mails.tsinghua.edu.cn wangh13@mails.tsinghua.edu.cn
lh.sunlinh@gmail.com lh.sunlinh@gmail.com
ian.farrer@telekom.de ian.farrer@telekom.de
sladjana.zechlin@telekom.de sladjana.zechlin@telekom.de
hezihao9512@gmail.com"; hezihao9512@gmail.com";
description "This YANG module contains DHCPv6 options defined description "This YANG module contains DHCPv6 options defined
in RFC8415 that can be used by DHCPv6 servers."; in RFC8415 that can be used by DHCPv6 servers.
Copyright (c) 2018 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 8513; see
the RFC itself for full legal notices.";
revision 2020-12-10 {
description "Version update for draft -13 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-13";
}
revision 2020-12-01 { revision 2020-12-01 {
description "Version update for draft -12 publication."; description "Version update for draft -12 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-12"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-12";
} }
revision 2020-11-19 { revision 2020-11-19 {
description "Separated into a client specific set of options."; description "Separated into a client specific set of options.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-12"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-12";
} }
skipping to change at page 51, line 29 skipping to change at page 52, line 31
description "First version of the separated DHCPv6 options description "First version of the separated DHCPv6 options
YANG model."; YANG model.";
reference "I-D:draft-ietf-dhc-dhcpv6-yang"; reference "I-D:draft-ietf-dhc-dhcpv6-yang";
} }
/* /*
* Groupings * Groupings
*/ */
grouping preference-option-group { grouping preference-option-group {
container preference-option { description "OPTION_PREFERENCE (7) Preference Option.";
description "OPTION_PREFERENCE (7) Preference Option"; reference "RFC8415: Dynamic Host Configuration Protocol for
reference "RFC8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6)";
IPv6 (DHCPv6)"; container preference-option {
leaf pref-value { description "OPTION_PREFERENCE (7) Preference Option container."
;
leaf pref-value {
type uint8; type uint8;
description "The preference value for the server in this description "The preference value for the server in this
message. A 1-octet unsigned integer."; message. A 1-octet unsigned integer.";
} }
} }
} }
grouping auth-option-group { grouping auth-option-group {
description "OPTION_AUTH (11) Authentication Option.";
reference "RFC8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
container auth-option { container auth-option {
description "OPTION_AUTH (11) Authentication Option"; description "OPTION_AUTH (11) Authentication Option container.";
reference "RFC8415: Dynamic Host Configuration Protocol leaf protocol {
for IPv6 (DHCPv6)";
leaf protocol {
type uint8; type uint8;
description "The authentication protocol used in this description "The authentication protocol used in this
Authentication option."; Authentication option.";
} }
leaf algorithm { leaf algorithm {
type uint8; type uint8;
description "The algorithm used in the authentication description "The algorithm used in the authentication
protocol."; protocol.";
} }
leaf rdm { leaf rdm {
skipping to change at page 52, line 27 skipping to change at page 53, line 32
leaf auth-information { leaf auth-information {
type string; type string;
description "The authentication information, as specified description "The authentication information, as specified
by the protocol and algorithm used in this Authentication by the protocol and algorithm used in this Authentication
option."; option.";
} }
} }
} }
grouping server-unicast-option-group { grouping server-unicast-option-group {
description "OPTION_UNICAST (12) Server Unicast Option.";
reference "RFC8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6)";
container server-unicast-option { container server-unicast-option {
description "OPTION_UNICAST (12) Server Unicast Option"; description "OPTION_UNICAST (12) Server Unicast Option
reference "RFC8415: Dynamic Host Configuration Protocol for container.";
IPv6 (DHCPv6)";
leaf server-address { leaf server-address {
type inet:ipv6-address; type inet:ipv6-address;
description "The 128-bit address to which the client description "The 128-bit address to which the client
should send messages delivered using unicast."; should send messages delivered using unicast.";
} }
} }
} }
grouping status-code-option-group { grouping status-code-option-group {
description "OPTION_STATUS_CODE (13) Status Code Option.";
reference "RFC8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
container status-code-option { container status-code-option {
description "OPTION_STATUS_CODE (13) Status Code Option."; description "OPTION_STATUS_CODE (13) Status Code Option
reference "RFC8415: Dynamic Host Configuration Protocol container.";
for IPv6 (DHCPv6)";
leaf status-code { leaf status-code {
type uint16; type uint16;
description "The numeric code for the status encoded description "The numeric code for the status encoded
in this option. See the Status Codes registry at in this option. 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 status-message { leaf status-message {
type string; type string;
description "A UTF-8 encoded text string suitable for description "A UTF-8 encoded text string suitable for
display to an end user. MUST NOT be null-terminated."; display to an end user. MUST NOT be null-terminated.";
} }
} }
} }
grouping rapid-commit-option-group { grouping rapid-commit-option-group {
container rapid-commit-option { description "OPTION_RAPID_COMMIT (14) Rapid Commit Option.";
presence "Enable sending of this option"; reference "RFC8415: Dynamic Host Configuration Protocol for
description "OPTION_RAPID_COMMIT (14) Rapid Commit Option. IPv6 (DHCPv6)";
The presence node is used to enable the option."; container rapid-commit-option {
reference "RFC8415: Dynamic Host Configuration Protocol for presence "Enable sending of this option";
IPv6 (DHCPv6)"; description "OPTION_RAPID_COMMIT (14) Rapid Commit Option
container.";
} }
} }
grouping vendor-specific-information-option-group { grouping vendor-specific-information-option-group {
description "OPTION_VENDOR_OPTS (17) Vendor-specific
Information Option.";
reference "RFC8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
container vendor-specific-information-option { container vendor-specific-information-option {
description "OPTION_VENDOR_OPTS (17) Vendor-specific description "OPTION_VENDOR_OPTS (17) Vendor-specific
Information Option"; Information Option container.";
reference "RFC8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
list vendor-specific-information-option-instances { list vendor-specific-information-option-instances {
key enterprise-number; key enterprise-number;
description "The vendor specific information option allows description "The vendor specific information option allows
for multiple instances in a single message. Each list entry for 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 "The vendor's registered Enterprise Number, description "The vendor's registered Enterprise Number,
as maintained by IANA."; as maintained by IANA.";
} }
skipping to change at page 54, line 4 skipping to change at page 55, line 16
type uint16; type uint16;
description "The code for the sub-option."; description "The code for the sub-option.";
} }
leaf sub-option-data { leaf sub-option-data {
type string; type string;
description "The data area for the sub-option."; description "The data area for the sub-option.";
} }
} }
} }
} }
} }
grouping reconfigure-message-option-group { grouping reconfigure-message-option-group {
description "OPTION_RECONF_MSG (19) Reconfigure Message
Option.";
reference "RFC8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6)";
container reconfigure-message-option { container reconfigure-message-option {
description "OPTION_RECONF_MSG (19) Reconfigure Message description "OPTION_RECONF_MSG (19) Reconfigure Message
Option."; Option.";
reference "RFC8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6)";
leaf msg-type { leaf msg-type {
type uint8; type uint8;
description "5 for Renew message, 6 for Rebind message, description "5 for Renew message, 6 for Rebind message,
11 for Information-request message."; 11 for Information-request message.";
} }
} }
} }
grouping reconfigure-accept-option-group { grouping reconfigure-accept-option-group {
description "OPTION_RECONF_ACCEPT (20) Reconfigure Accept
Option.
A client uses the Reconfigure Accept option to announce to
the server whether the client is willing to accept
Reconfigure messages, and a server uses this option to tell
the client whether or not to accept Reconfigure messages.
In the absence of this option, the default behavior is that
the client is unwilling to accept Reconfigure messages.
The presence node is used to enable the option.";
reference "RFC8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
container reconfigure-accept-option { container reconfigure-accept-option {
presence "Enable sending of this option"; presence "Enable sending of this option";
description "OPTION_RECONF_ACCEPT (20) Reconfigure Accept description "OPTION_RECONF_ACCEPT (20) Reconfigure Accept
Option. Option container.";
A client uses the Reconfigure Accept option to announce to
the server whether the client is willing to accept
Reconfigure messages, and a server uses this option to tell
the client whether or not to accept Reconfigure messages.
In the absence of this option, the default behavior is that
the client is unwilling to accept Reconfigure messages.
The presence node is used to enable the option.";
reference "RFC8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
} }
} }
grouping info-refresh-time-option-group { grouping info-refresh-time-option-group {
description "OPTION_INFORMATION_REFRESH_TIME (32)
Information Refresh Time option.";
reference "RFC8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6)";
container info-refresh-time-option { container info-refresh-time-option {
description "OPTION_INFORMATION_REFRESH_TIME (32) description "OPTION_INFORMATION_REFRESH_TIME (32)
Information Refresh Time option."; Information Refresh Time option container.";
reference "RFC8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6)";
leaf info-refresh-time { leaf info-refresh-time {
type dhcpv6-common:timer-seconds32; type dhcpv6-common:timer-seconds32;
description "Time duration relative to the current time, description "Time duration relative to the current time,
expressed in units of seconds."; expressed in units of seconds.";
} }
} }
} }
grouping sol-max-rt-option-group { grouping sol-max-rt-option-group {
container sol-max-rt-option { description "OPTION_SOL_MAX_RT (82) sol max rt option.";
description "OPTION_SOL_MAX_RT (82) sol max rt option"; reference "RFC8415: Dynamic Host Configuration Protocol for
reference "RFC8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6)";
IPv6 (DHCPv6)"; container sol-max-rt-option {
description "OPTION_SOL_MAX_RT (82) sol max rt option container
.";
leaf sol-max-rt-value { leaf sol-max-rt-value {
type dhcpv6-common:timer-seconds32; type dhcpv6-common:timer-seconds32;
description "sol max rt value"; description "sol max rt value";
} }
} }
} }
grouping inf-max-rt-option-group { grouping inf-max-rt-option-group {
description "OPTION_INF_MAX_RT (83) inf max rt option.";
reference "RFC8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6)";
container inf-max-rt-option { container inf-max-rt-option {
description "OPTION_INF_MAX_RT (83) inf max rt option"; description "OPTION_INF_MAX_RT (83) inf max rt option container
reference "RFC8415: Dynamic Host Configuration Protocol for .";
IPv6 (DHCPv6)";
leaf inf-max-rt-value { leaf inf-max-rt-value {
type dhcpv6-common:timer-seconds32; type dhcpv6-common:timer-seconds32;
description "inf max rt value"; description "inf max rt value";
} }
} }
} }
/* /*
* Augmentations * Augmentations
*/ */
augment "/dhcpv6-server:dhcpv6-server/dhcpv6-server:option-sets/dhc augment "/dhcpv6-server:dhcpv6-server/dhcpv6-server:option-sets/" +
pv6-server:option-set" { "dhcpv6-server:option-set" {
when "../../../dhcpv6-server:dhcpv6-node-type='dhcpv6-server:serv when "../../../dhcpv6-server:dhcpv6-node-type=" +
er'"; "'dhcpv6-server:server'";
description "Augment the option definition groupings to the
relay module.";
uses preference-option-group; uses preference-option-group;
uses auth-option-group; uses auth-option-group;
uses server-unicast-option-group; uses server-unicast-option-group;
uses status-code-option-group; uses status-code-option-group;
uses rapid-commit-option-group; uses rapid-commit-option-group;
uses vendor-specific-information-option-group; uses vendor-specific-information-option-group;
uses reconfigure-message-option-group; uses reconfigure-message-option-group;
uses reconfigure-accept-option-group; uses 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;
} }
} }
<CODE ENDS> <CODE ENDS>
3.5. RFC8415 Relay Options YANG Module 3.5. RFC8415 Relay Options YANG Module
This module imports typedefs from [RFC6991]. This module imports typedefs from [RFC6991].
<CODE BEGINS> file ietf-dhcpv6-options-rfc8415-server.yang <CODE BEGINS> file "ietf-dhcpv6-options-rfc8415-server.yang"
module ietf-dhcpv6-options-rfc8415 { module ietf-dhcpv6-options-rfc8415-server {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-options-8415-ser namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-options-rfc8415-
ver"; server";
prefix "rfc8415-srv"; prefix "rfc8415-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-dhcpv6-common { import ietf-dhcpv6-common {
prefix dhcpv6-common; prefix dhcpv6-common;
skipping to change at page 56, line 45 skipping to change at page 58, line 17
organization "DHC WG"; organization "DHC WG";
contact contact
"cuiyong@tsinghua.edu.cn "cuiyong@tsinghua.edu.cn
wangh13@mails.tsinghua.edu.cn wangh13@mails.tsinghua.edu.cn
lh.sunlinh@gmail.com lh.sunlinh@gmail.com
ian.farrer@telekom.de ian.farrer@telekom.de
sladjana.zechlin@telekom.de sladjana.zechlin@telekom.de
hezihao9512@gmail.com"; hezihao9512@gmail.com";
description "This YANG module contains DHCPv6 options defined description "This YANG module contains DHCPv6 options defined
in RFC8415 that can be used by DHCPv6 servers."; in RFC8415 that can be used by DHCPv6 servers.
Copyright (c) 2018 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 8513; see
the RFC itself for full legal notices.";
revision 2020-12-10 {
description "Version update for draft -13 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-13";
}
revision 2020-12-01 { revision 2020-12-01 {
description "Version update for draft -12 publication."; description "Version update for draft -12 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-12"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-12";
} }
revision 2020-11-19 { revision 2020-11-19 {
description "Separated into a client specific set of options."; description "Separated into a client specific set of options.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-12"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-12";
} }
skipping to change at page 57, line 48 skipping to change at page 59, line 38
description "First version of the separated DHCPv6 options description "First version of the separated DHCPv6 options
YANG model."; YANG model.";
reference "I-D:draft-ietf-dhc-dhcpv6-yang"; reference "I-D:draft-ietf-dhc-dhcpv6-yang";
} }
/* /*
* Groupings * Groupings
*/ */
grouping preference-option-group { grouping preference-option-group {
container preference-option { description "OPTION_PREFERENCE (7) Preference Option.";
description "OPTION_PREFERENCE (7) Preference Option"; reference "RFC8415: Dynamic Host Configuration Protocol for
reference "RFC8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6)";
IPv6 (DHCPv6)"; container preference-option {
description "OPTION_PREFERENCE (7) Preference Option container."
leaf pref-value { ;
leaf pref-value {
type uint8; type uint8;
description "The preference value for the server in this description "The preference value for the server in this
message. A 1-octet unsigned integer."; message. A 1-octet unsigned integer.";
} }
} }
} }
grouping auth-option-group { grouping auth-option-group {
description "OPTION_AUTH (11) Authentication Option.";
reference "RFC8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
container auth-option { container auth-option {
description "OPTION_AUTH (11) Authentication Option"; description "OPTION_AUTH (11) Authentication Option container.";
reference "RFC8415: Dynamic Host Configuration Protocol leaf protocol {
for IPv6 (DHCPv6)";
leaf protocol {
type uint8; type uint8;
description "The authentication protocol used in this description "The authentication protocol used in this
Authentication option."; Authentication option.";
} }
leaf algorithm { leaf algorithm {
type uint8; type uint8;
description "The algorithm used in the authentication description "The algorithm used in the authentication
protocol."; protocol.";
} }
leaf rdm { leaf rdm {
skipping to change at page 58, line 47 skipping to change at page 60, line 39
leaf auth-information { leaf auth-information {
type string; type string;
description "The authentication information, as specified description "The authentication information, as specified
by the protocol and algorithm used in this Authentication by the protocol and algorithm used in this Authentication
option."; option.";
} }
} }
} }
grouping server-unicast-option-group { grouping server-unicast-option-group {
description "OPTION_UNICAST (12) Server Unicast Option.";
reference "RFC8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6)";
container server-unicast-option { container server-unicast-option {
description "OPTION_UNICAST (12) Server Unicast Option"; description "OPTION_UNICAST (12) Server Unicast Option
reference "RFC8415: Dynamic Host Configuration Protocol for container.";
IPv6 (DHCPv6)";
leaf server-address { leaf server-address {
type inet:ipv6-address; type inet:ipv6-address;
description "The 128-bit address to which the client description "The 128-bit address to which the client
should send messages delivered using unicast."; should send messages delivered using unicast.";
} }
} }
} }
grouping status-code-option-group { grouping status-code-option-group {
description "OPTION_STATUS_CODE (13) Status Code Option.";
reference "RFC8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
container status-code-option { container status-code-option {
description "OPTION_STATUS_CODE (13) Status Code Option."; description "OPTION_STATUS_CODE (13) Status Code Option
reference "RFC8415: Dynamic Host Configuration Protocol container.";
for IPv6 (DHCPv6)";
leaf status-code { leaf status-code {
type uint16; type uint16;
description "The numeric code for the status encoded description "The numeric code for the status encoded
in this option. See the Status Codes registry at in this option. 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 status-message { leaf status-message {
type string; type string;
description "A UTF-8 encoded text string suitable for description "A UTF-8 encoded text string suitable for
display to an end user. MUST NOT be null-terminated."; display to an end user. MUST NOT be null-terminated.";
} }
} }
} }
grouping rapid-commit-option-group { grouping rapid-commit-option-group {
container rapid-commit-option { description "OPTION_RAPID_COMMIT (14) Rapid Commit Option.";
presence "Enable sending of this option"; reference "RFC8415: Dynamic Host Configuration Protocol for
description "OPTION_RAPID_COMMIT (14) Rapid Commit Option. IPv6 (DHCPv6)";
The presence node is used to enable the option."; container rapid-commit-option {
reference "RFC8415: Dynamic Host Configuration Protocol for presence "Enable sending of this option";
IPv6 (DHCPv6)"; description "OPTION_RAPID_COMMIT (14) Rapid Commit Option
container.";
} }
} }
grouping vendor-specific-information-option-group { grouping vendor-specific-information-option-group {
description "OPTION_VENDOR_OPTS (17) Vendor-specific
Information Option.";
reference "RFC8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
container vendor-specific-information-option { container vendor-specific-information-option {
description "OPTION_VENDOR_OPTS (17) Vendor-specific description "OPTION_VENDOR_OPTS (17) Vendor-specific
Information Option"; Information Option container.";
reference "RFC8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
list vendor-specific-information-option-instances { list vendor-specific-information-option-instances {
key enterprise-number; key enterprise-number;
description "The vendor specific information option allows description "The vendor specific information option allows
for multiple instances in a single message. Each list entry for 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 "The vendor's registered Enterprise Number, description "The vendor's registered Enterprise Number,
as maintained by IANA."; as maintained by IANA.";
} }
skipping to change at page 60, line 26 skipping to change at page 62, line 25
leaf sub-option-data { leaf sub-option-data {
type string; type string;
description "The data area for the sub-option."; description "The data area for the sub-option.";
} }
} }
} }
} }
} }
grouping reconfigure-message-option-group { grouping reconfigure-message-option-group {
description "OPTION_RECONF_MSG (19) Reconfigure Message
Option.";
reference "RFC8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6)";
container reconfigure-message-option { container reconfigure-message-option {
description "OPTION_RECONF_MSG (19) Reconfigure Message description "OPTION_RECONF_MSG (19) Reconfigure Message
Option."; Option.";
reference "RFC8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6)";
leaf msg-type { leaf msg-type {
type uint8; type uint8;
description "5 for Renew message, 6 for Rebind message, description "5 for Renew message, 6 for Rebind message,
11 for Information-request message."; 11 for Information-request message.";
} }
} }
} }
grouping reconfigure-accept-option-group { grouping reconfigure-accept-option-group {
description "OPTION_RECONF_ACCEPT (20) Reconfigure Accept
Option.
A client uses the Reconfigure Accept option to announce to
the server whether the client is willing to accept
Reconfigure messages, and a server uses this option to tell
the client whether or not to accept Reconfigure messages.
In the absence of this option, the default behavior is that
the client is unwilling to accept Reconfigure messages.
The presence node is used to enable the option.";
reference "RFC8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
container reconfigure-accept-option { container reconfigure-accept-option {
presence "Enable sending of this option"; presence "Enable sending of this option";
description "OPTION_RECONF_ACCEPT (20) Reconfigure Accept description "OPTION_RECONF_ACCEPT (20) Reconfigure Accept
Option. Option container.";
A client uses the Reconfigure Accept option to announce to
the server whether the client is willing to accept
Reconfigure messages, and a server uses this option to tell
the client whether or not to accept Reconfigure messages.
In the absence of this option, the default behavior is that
the client is unwilling to accept Reconfigure messages.
The presence node is used to enable the option.";
reference "RFC8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
} }
} }
grouping info-refresh-time-option-group { grouping info-refresh-time-option-group {
description "OPTION_INFORMATION_REFRESH_TIME (32)
Information Refresh Time option.";
reference "RFC8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6)";
container info-refresh-time-option { container info-refresh-time-option {
description "OPTION_INFORMATION_REFRESH_TIME (32) description "OPTION_INFORMATION_REFRESH_TIME (32)
Information Refresh Time option."; Information Refresh Time option container.";
reference "RFC8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6)";
leaf info-refresh-time { leaf info-refresh-time {
type dhcpv6-common:timer-seconds32; type dhcpv6-common:timer-seconds32;
description "Time duration relative to the current time, description "Time duration relative to the current time,
expressed in units of seconds."; expressed in units of seconds.";
} }
} }
} }
grouping sol-max-rt-option-group { grouping sol-max-rt-option-group {
container sol-max-rt-option { description "OPTION_SOL_MAX_RT (82) sol max rt option.";
description "OPTION_SOL_MAX_RT (82) sol max rt option"; reference "RFC8415: Dynamic Host Configuration Protocol for
reference "RFC8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6)";
IPv6 (DHCPv6)"; container sol-max-rt-option {
description "OPTION_SOL_MAX_RT (82) sol max rt option container
.";
leaf sol-max-rt-value { leaf sol-max-rt-value {
type dhcpv6-common:timer-seconds32; type dhcpv6-common:timer-seconds32;
description "sol max rt value"; description "sol max rt value";
} }
} }
} }
grouping inf-max-rt-option-group { grouping inf-max-rt-option-group {
description "OPTION_INF_MAX_RT (83) inf max rt option.";
reference "RFC8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6)";
container inf-max-rt-option { container inf-max-rt-option {
description "OPTION_INF_MAX_RT (83) inf max rt option"; description "OPTION_INF_MAX_RT (83) inf max rt option container
reference "RFC8415: Dynamic Host Configuration Protocol for .";
IPv6 (DHCPv6)";
leaf inf-max-rt-value { leaf inf-max-rt-value {
type dhcpv6-common:timer-seconds32; type dhcpv6-common:timer-seconds32;
description "inf max rt value"; description "inf max rt value";
} }
} }
} }
/* /*
* Augmentations * Augmentations
*/ */
augment "/dhcpv6-server:dhcpv6-server/dhcpv6-server:option-sets/dhc augment "/dhcpv6-server:dhcpv6-server/dhcpv6-server:option-sets/" +
pv6-server:option-set" { "dhcpv6-server:option-set" {
when "../../../dhcpv6-server:dhcpv6-node-type='dhcpv6-server:serv when "../../../dhcpv6-server:dhcpv6-node-type=" +
er'"; "'dhcpv6-server:server'";
description "Augment the option definition groupings to the
relay module.";
uses preference-option-group; uses preference-option-group;
uses auth-option-group; uses auth-option-group;
uses server-unicast-option-group; uses server-unicast-option-group;
uses status-code-option-group; uses status-code-option-group;
uses rapid-commit-option-group; uses rapid-commit-option-group;
uses vendor-specific-information-option-group; uses vendor-specific-information-option-group;
uses reconfigure-message-option-group; uses reconfigure-message-option-group;
uses reconfigure-accept-option-group; uses 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;
} }
} }
<CODE ENDS> <CODE ENDS>
3.6. RFC8415 Client Options YANG Module 3.6. RFC8415 Client Options YANG Module
This module imports typedefs from [RFC6991]. This module imports typedefs from [RFC6991].
<CODE BEGINS> file ietf-dhcpv6-options-rfc8415-client.yang <CODE BEGINS> file "ietf-dhcpv6-options-rfc8415-client.yang"
module ietf-dhcpv6-options-rfc8415 { module ietf-dhcpv6-options-rfc8415-client {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-options-8415-cli namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-options-rfc8415-
ent"; client";
prefix "rfc8415-cli"; prefix "rfc8415-cli";
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types";
}
import ietf-dhcpv6-common {
prefix dhcpv6-common;
reference
"To be updated on publication";
}
import ietf-dhcpv6-client { import ietf-dhcpv6-client {
prefix dhcpv6-client; prefix dhcpv6-client;
reference reference
"To be updated on publication"; "To be updated on publication";
} }
organization "DHC WG"; organization "DHC WG";
contact contact
"cuiyong@tsinghua.edu.cn "cuiyong@tsinghua.edu.cn
wangh13@mails.tsinghua.edu.cn wangh13@mails.tsinghua.edu.cn
lh.sunlinh@gmail.com lh.sunlinh@gmail.com
ian.farrer@telekom.de ian.farrer@telekom.de
sladjana.zechlin@telekom.de sladjana.zechlin@telekom.de
hezihao9512@gmail.com"; hezihao9512@gmail.com";
description "This YANG module contains DHCPv6 options defined description "This YANG module contains DHCPv6 options defined
in RFC8415 that can be used by DHCPv6 clients."; in RFC8415 that can be used by DHCPv6 clients.
Copyright (c) 2018 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 8513; see
the RFC itself for full legal notices.";
revision 2020-12-10 {
description "Version update for draft -13 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-13";
}
revision 2020-12-01 { revision 2020-12-01 {
description "Version update for draft -12 publication."; description "Version update for draft -12 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-12"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-12";
} }
revision 2020-11-19 { revision 2020-11-19 {
description "Separated into a client specific set of options."; description "Separated into a client specific set of options.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-12"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-12";
} }
skipping to change at page 64, line 18 skipping to change at page 66, line 35
description "First version of the separated DHCPv6 options description "First version of the separated DHCPv6 options
YANG model."; YANG model.";
reference "I-D:draft-ietf-dhc-dhcpv6-yang"; reference "I-D:draft-ietf-dhc-dhcpv6-yang";
} }
/* /*
* Groupings * Groupings
*/ */
grouping option-request-option-group { grouping option-request-option-group {
description "OPTION_ORO (6) Option Request Option. A client
MUST include an Option Request option in a Solicit, Request,
Renew, Rebind, or Information-request message to inform
the server about options the client wants the server to send
to the client.";
reference "RFC8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6)";
container option-request-option { container option-request-option {
description "OPTION_ORO (6) Option Request Option. A client description "OPTION_ORO (6) Option Request Option container.";
MUST include an Option Request option in a Solicit, Request,
Renew, Rebind, or Information-request message to inform
the server about options the client wants the server t
o send
to the client.";
reference "RFC8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6)";
leaf-list oro-option { leaf-list oro-option {
description "List of options that the client is requesting,
identified by option code";
type uint16; type uint16;
description "List of options that the client is requesting,
identified by option code";
} }
} }
} }
grouping status-code-option-group { grouping status-code-option-group {
description "OPTION_STATUS_CODE (13) Status Code Option.";
reference "RFC8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
container status-code-option { container status-code-option {
description "OPTION_STATUS_CODE (13) Status Code Option."; description "OPTION_STATUS_CODE (13) Status Code Option
reference "RFC8415: Dynamic Host Configuration Protocol container.";
for IPv6 (DHCPv6)";
leaf status-code { leaf status-code {
type uint16; type uint16;
description "The numeric code for the status encoded description "The numeric code for the status encoded
in this option. See the Status Codes registry at in this option. 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 status-message { leaf status-message {
type string; type string;
description "A UTF-8 encoded text string suitable for description "A UTF-8 encoded text string suitable for
skipping to change at page 65, line 4 skipping to change at page 67, line 23
in this option. See the Status Codes registry at in this option. 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 status-message { leaf status-message {
type string; type string;
description "A UTF-8 encoded text string suitable for description "A UTF-8 encoded text string suitable for
display to an end user. MUST NOT be null-terminated."; display to an end user. MUST NOT be null-terminated.";
} }
} }
} }
grouping rapid-commit-option-group { grouping rapid-commit-option-group {
description "OPTION_RAPID_COMMIT (14) Rapid Commit Option.
The presence node is used to enable the option.";
reference "RFC8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6)";
container rapid-commit-option { container rapid-commit-option {
presence "Enable sending of this option"; presence "Enable sending of this option";
description "OPTION_RAPID_COMMIT (14) Rapid Commit Option. description "OPTION_RAPID_COMMIT (14) Rapid Commit Option
The presence node is used to enable the option."; container.";
reference "RFC8415: Dynamic Host Configuration Protocol for }
IPv6 (DHCPv6)";
}
} }
grouping user-class-option-group { grouping user-class-option-group {
description "OPTION_USER_CLASS (15) User Class Option";
reference "RFC8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
container user-class-option { container user-class-option {
description "OPTION_USER_CLASS (15) User Class Option"; description "OPTION_USER_CLASS (15) User Class Option
reference "RFC8415: Dynamic Host Configuration Protocol container.";
for IPv6 (DHCPv6)";
list user-class-data { list user-class-data {
key user-class-datum-id; key user-class-datum-id;
min-elements 1; min-elements 1;
description "The user classes of which the client description "The user classes of which the client
is a member."; is a member.";
leaf user-class-datum-id { leaf user-class-datum-id {
type uint8; type uint8;
description "User class datum ID"; description "User class datum ID";
} }
leaf user-class-datum { leaf user-class-datum {
type string; type string;
description "Opaque field representing a User Class description "Opaque field representing a User Class
of which the client is a member."; of which the client is a member.";
} }
} }
} }
} }
skipping to change at page 65, line 41 skipping to change at page 68, line 16
leaf user-class-datum { leaf user-class-datum {
type string; type string;
description "Opaque field representing a User Class description "Opaque field representing a User Class
of which the client is a member."; of which the client is a member.";
} }
} }
} }
} }
grouping vendor-class-option-group { grouping vendor-class-option-group {
description "OPTION_VENDOR_CLASS (16) Vendor Class Option";
reference "RFC8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
container vendor-class-option { container vendor-class-option {
description "OPTION_VENDOR_CLASS (16) Vendor Class Option"; description "OPTION_VENDOR_CLASS (16) Vendor Class Option
reference "RFC8415: Dynamic Host Configuration Protocol container.";
for IPv6 (DHCPv6)";
list vendor-class-option-instances { list vendor-class-option-instances {
key enterprise-number; key enterprise-number;
description "The vendor class option allows for multiple description "The vendor class option allows for multiple
instances in a single message. Each list entry defines instances in a single message. Each list entry defines
the contents of an instance of the option."; the contents of an instance of the option.";
leaf enterprise-number { leaf enterprise-number {
type uint32; type uint32;
description "The vendor's registered Enterprise Number description "The vendor's registered Enterprise Number
as maintained by IANA."; as maintained by IANA.";
} }
skipping to change at page 66, line 25 skipping to change at page 68, line 51
type string; type string;
description "Opaque field representing a vendor class description "Opaque field representing a vendor class
of which the client is a member."; of which the client is a member.";
} }
} }
} }
} }
} }
grouping vendor-specific-information-option-group { grouping vendor-specific-information-option-group {
description "OPTION_VENDOR_OPTS (17) Vendor-specific
Information Option";
reference "RFC8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
container vendor-specific-information-option { container vendor-specific-information-option {
description "OPTION_VENDOR_OPTS (17) Vendor-specific description "OPTION_VENDOR_OPTS (17) Vendor-specific
Information Option"; Information Option container.";
reference "RFC8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
list vendor-specific-information-option-instances { list vendor-specific-information-option-instances {
key enterprise-number; key enterprise-number;
description "The vendor specific information option allows description "The vendor specific information option allows
for multiple instances in a single message. Each list entry for 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 "The vendor's registered Enterprise Number, description "The vendor's registered Enterprise Number,
as maintained by IANA."; as maintained by IANA.";
} }
skipping to change at page 67, line 4 skipping to change at page 69, line 32
description "Vendor options, interpreted by vendor-specific description "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 "The code for the sub-option."; description "The code for the sub-option.";
} }
leaf sub-option-data { leaf sub-option-data {
type string; type string;
description "The data area for the sub-option."; description "The data area for the sub-option.";
} }
} }
} }
} }
} }
grouping reconfigure-accept-option-group { grouping reconfigure-accept-option-group {
description "OPTION_RECONF_ACCEPT (20) Reconfigure Accept
Option.
A client uses the Reconfigure Accept option to announce to
the server whether the client is willing to accept
Reconfigure messages, and a server uses this option to tell
the client whether or not to accept Reconfigure messages.
In the absence of this option, the default behavior is that
the client is unwilling to accept Reconfigure messages.
The presence node is used to enable the option.";
reference "RFC8415: Dynamic Host Configuration Protocol for IPv6
(DHCPv6)";
container reconfigure-accept-option { container reconfigure-accept-option {
presence "Enable sending of this option"; presence "Enable sending of this option";
description "OPTION_RECONF_ACCEPT (20) Reconfigure Accept description "OPTION_RECONF_ACCEPT (20) Reconfigure Accept
Option. Option container.";
A client uses the Reconfigure Accept option to announce to
the server whether the client is willing to accept }
Reconfigure messages, and a server uses this option to tell
the client whether or not to accept Reconfigure messages.
In the absence of this option, the default behavior is that
the client is unwilling to accept Reconfigure messages.
The presence node is used to enable the option.";
reference "RFC8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
}
} }
/* /*
* Augmentations * Augmentations
*/ */
augment "/dhcpv6-client:dhcpv6-client/dhcpv6-client:client-if/dhcpv augment "/dhcpv6-client:dhcpv6-client/dhcpv6-client:client-if/" +
6-client:client-configured-options" { "dhcpv6-client:client-configured-options" {
when "../../../dhcpv6-client:dhcpv6-node-type='dhcpv6-client:clie when "../../../dhcpv6-client:dhcpv6-node-type=" +
nt'"; "'dhcpv6-client:client'";
description "Augment the option definition groupings to the
client module.";
uses option-request-option-group; uses option-request-option-group;
uses status-code-option-group; uses status-code-option-group;
uses rapid-commit-option-group; uses 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 vendor-specific-information-option-group; uses vendor-specific-information-option-group;
uses reconfigure-accept-option-group; uses reconfigure-accept-option-group;
} }
} }
<CODE ENDS> <CODE ENDS>
3.7. DHCPv6 Common YANG Module 3.7. DHCPv6 Common YANG Module
This module imports typedefs from [RFC6991]. This module imports typedefs from [RFC6991].
<CODE BEGINS> file ietf-dhcpv6-common.yang <CODE BEGINS> file "ietf-dhcpv6-common.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 "dhcpv6-common"; prefix "dhcpv6-common";
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";
skipping to change at page 68, line 27 skipping to change at page 71, line 6
organization "DHC WG"; organization "DHC WG";
contact contact
"yong@csnet1.cs.tsinghua.edu.cn "yong@csnet1.cs.tsinghua.edu.cn
lh.sunlinh@gmail.com lh.sunlinh@gmail.com
ian.farrer@telekom.de ian.farrer@telekom.de
sladjana.zechlin@telekom.de sladjana.zechlin@telekom.de
hezihao9512@gmail.com"; hezihao9512@gmail.com";
description "This YANG module defines common components description "This YANG module defines common components
used for the configuration and management of DHCPv6."; used for the configuration and management of DHCPv6.
Copyright (c) 2018 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 8513; see
the RFC itself for full legal notices.";
revision 2020-12-10 {
description "Version update for draft -13 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-13";
}
revision 2020-12-01 { revision 2020-12-01 {
description "Version update for draft -12 publication."; description "Version update for draft -12 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-12"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-12";
} }
revision 2020-05-26 { revision 2020-05-26 {
description "Version update for draft -11 publication and description "Version update for draft -11 publication and
to align revisions across the different modules."; to align revisions across the different modules.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-11"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-11";
skipping to change at page 71, line 22 skipping to change at page 74, line 19
case duid-unstructured { case duid-unstructured {
description "DUID which does not follow any of the other description "DUID which does not follow any of the other
structures, expressed as bytes."; structures, expressed as bytes.";
leaf data { leaf data {
type binary; type binary;
description "The bits to be used as the identifier."; description "The bits to be used as the identifier.";
} }
} }
} }
leaf active-duid { leaf active-duid {
type binary;
config "false"; config "false";
description "The DUID which is currently in use."; description "The DUID which is currently in use.";
type binary;
} }
} }
} }
<CODE ENDS> <CODE ENDS>
4. Security Considerations 4. Security Considerations
The YANG modules defined in this document are designed to be accessed The YANG modules defined in this document are designed to be accessed
via network management protocols such as NETCONF [RFC6241] or via network management protocols such as NETCONF [RFC6241] or
RESTCONF [RFC8040]. The lowest NETCONF layer is the secure transport RESTCONF [RFC8040]. The lowest NETCONF layer is the secure transport
skipping to change at page 77, line 5 skipping to change at page 80, line 5
* Fields which can have multiple entries or instances are defined * Fields which 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). If an option is element's module (server, relay and/or client). If an option is
relevant to more than one element type, then an augment statement for relevant to more than one element type, then an augment statement for
each element is used. each element is used.
<CODE BEGINS> file example-dhcpv6-options-rfc3319-server.yang <CODE BEGINS> file "ietf-example-dhcpv6-options-rfc3319-server.yang"
module example-dhcpv6-options-rfc3319 { module ietf-example-dhcpv6-options-rfc3319-server {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:example-dhcpv6-options-rfc33 namespace "urn:ietf:params:xml:ns:yang:ietf-example-dhcpv6-options-
19"; rfc3319-server";
prefix "rfc3319"; prefix "rfc3319-srv";
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
} }
import ietf-dhcpv6-server { import ietf-dhcpv6-server {
prefix dhcpv6-server; prefix dhcpv6-server;
} }
organization "DHC WG"; organization "DHC WG";
contact contact
"ian.farrer@telekom.de "ian.farrer@telekom.de
godfryd@isc.org"; godfryd@isc.org";
description "This YANG module contains DHCPv6 options defined description "This YANG module contains DHCPv6 options defined
in RFC3319 that can be used by DHCPv6 servers."; in RFC3319 that can be used by DHCPv6 servers.
Copyright (c) 2018 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 8513; see
the RFC itself for full legal notices.";
revision 2020-12-10 {
description "Version update for draft -13 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-13";
}
revision 2020-12-01 { revision 2020-12-01 {
description "Version update for draft -12 publication."; description "Version update for draft -12 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-12"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-12";
} }
revision 2020-05-26 { revision 2020-05-26 {
description "Version update for draft -11 publication and description "Version update for draft -11 publication and
to align revisions across the different modules."; to align revisions across the different modules.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-11"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-11";
skipping to change at page 77, line 50 skipping to change at page 81, line 19
revision 2019-10-18 { revision 2019-10-18 {
description "Initial version."; description "Initial version.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang"; reference "I-D: draft-ietf-dhc-dhcpv6-yang";
} }
/* /*
* Groupings * Groupings
*/ */
grouping sip-server-domain-name-list-option-group { grouping sip-server-domain-name-list-option-group {
description "OPTION_SIP_SERVER_D (21) SIP Servers Domain Name
List";
reference "RFC3319: Dynamic Host Configuration Protocol
(DHCPv6) Options for Session Initiation Protocol (SIP)
Servers";
container sip-server-domain-name-list-option { container sip-server-domain-name-list-option {
description "OPTION_SIP_SERVER_D (21) SIP Servers Domain Name description "OPTION_SIP_SERVER_D (21) SIP Servers Domain Name Li
List"; st
container.";
reference "RFC3319: Dynamic Host Configuration Protocol list sip-server {
(DHCPv6) Options for Session Initiation Protocol (SIP)
Servers";
list sip-server {
key sip-serv-id; key sip-serv-id;
description "sip server info"; description "sip server info";
leaf sip-serv-id { leaf sip-serv-id {
type uint8; type uint8;
description "sip server id"; description "sip server id";
} }
leaf sip-serv-domain-name { leaf sip-serv-domain-name {
type inet:domain-name; type inet:domain-name;
description "sip server domain name"; description "sip server domain name";
} }
} }
} }
} }
grouping sip-server-address-list-option-group { grouping sip-server-address-list-option-group {
description "OPTION_SIP_SERVER_A (22) SIP Servers IPv6 Address
List";
reference "RFC3319: Dynamic Host Configuration Protocol
(DHCPv6) Options for Session Initiation Protocol (SIP)
Servers";
container sip-server-address-list-option { container sip-server-address-list-option {
description "OPTION_SIP_SERVER_A (22) SIP Servers IPv6 Address description "OPTION_SIP_SERVER_A (22) SIP Servers IPv6 Address
List"; List container.";
reference "RFC3319: Dynamic Host Configuration Protocol
(DHCPv6) Options for Session Initiation Protocol (SIP) list sip-server {
Servers";
list sip-server {
key sip-serv-id; key sip-serv-id;
description "sip server info"; description "sip server info";
leaf sip-serv-id { leaf sip-serv-id {
type uint8; type uint8;
description "sip server id"; description "sip server id";
} }
leaf sip-serv-addr { leaf sip-serv-addr {
type inet:ipv6-address; type inet:ipv6-address;
description "sip server addr"; description "sip server addr";
} }
} }
} }
} }
/* /*
* Augmentations * Augmentations
*/ */
augment "/dhcpv6-server:dhcpv6-server/dhcpv6-server:option-sets/dhc augment "/dhcpv6-server:dhcpv6-server/dhcpv6-server:option-sets/" +
pv6-server:option-set" {
when "../../../dhcpv6-server:dhcpv6-node-type='dhcpv6-server:serv "dhcpv6-server:option-set" {
er'"; when "../../../dhcpv6-server:dhcpv6-node-type=" +
"'dhcpv6-server:server'";
description "Augment the option definition groupings to the serve
r
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. E.g. for options which will be augmented into the specific option. E.g. for options which will be augmented into the
ietf-dhcpv6-server module, in many cases, these will be augmented to: ietf-dhcpv6-server module, in many cases, these will be augmented to:
skipping to change at page 80, line 5 skipping to change at page 83, line 30
The example module defines additional server attributes such as name The example module defines additional server attributes such as name
and description. Storage for leases is configured using a lease- and description. Storage for leases is configured using a lease-
storage container. It allows storing leases in one of three options: storage container. It allows storing leases in one of three options:
memory (memfile), MySQL and PosgreSQL. For each case, the necessary memory (memfile), MySQL and PosgreSQL. For each case, the necessary
configuration parameters are provided. configuration parameters are provided.
At the end there is an augment statement which adds the vendor At the end there is an augment statement which adds the vendor
specific configuration defined in "dhcpv6-server-config:config" under specific configuration defined in "dhcpv6-server-config:config" under
'/dhcpv6-server:config/dhcpv6-server:vendor-config' mount point. '/dhcpv6-server:config/dhcpv6-server:vendor-config' mount point.
<CODE BEGINS> file example-dhcpv6-server-config.yang <CODE BEGINS> file "ietf-example-dhcpv6-server-config.yang"
module example-dhcpv6-server-config { module ietf-example-dhcpv6-server-config {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:example-dhcpv6-server-config namespace "urn:ietf:params:xml:ns:yang:ietf-example-dhcpv6-server-c
"; onfig";
prefix "dhcpv6-server-config"; prefix "dhcpv6-server-config";
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
} }
import ietf-interfaces { import ietf-interfaces {
prefix if; prefix if;
} }
skipping to change at page 80, line 37 skipping to change at page 84, line 13
"cuiyong@tsinghua.edu.cn "cuiyong@tsinghua.edu.cn
lh.sunlinh@gmail.com lh.sunlinh@gmail.com
ian.farrer@telekom.de ian.farrer@telekom.de
sladjana.zechlin@telekom.de sladjana.zechlin@telekom.de
hezihao9512@gmail.com"; hezihao9512@gmail.com";
description "This YANG module defines components for the description "This YANG module defines components for the
configuration and management of vendor/implementation specific configuration and management of vendor/implementation specific
DHCPv6 server functionality. As this functionality varies DHCPv6 server functionality. As this functionality varies
greatly between different implementations, the module greatly between different implementations, the module
provided as an example only."; provided as an example only.
Copyright (c) 2018 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 8513; see
the RFC itself for full legal notices.";
revision 2020-12-10 {
description "Version update for draft -13 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-13";
}
revision 2020-12-01 { revision 2020-12-01 {
description "Version update for draft -12 publication."; description "Version update for draft -12 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-12"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-12";
} }
revision 2020-05-26 { revision 2020-05-26 {
description "Version update for draft -11 publication and description "Version update for draft -11 publication and
to align revisions across the different modules."; to align revisions across the different modules.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-11"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-11";
skipping to change at page 81, line 38 skipping to change at page 85, line 32
description "UDP port that the server will listen on."; description "UDP port that the server will listen on.";
} }
choice listening-interfaces { choice listening-interfaces {
default all-interfaces; default all-interfaces;
description "Configures which interface or addresses the description "Configures which interface or addresses the
server will listen for incoming messages on."; server will listen for incoming messages on.";
case all-interfaces { case all-interfaces {
container all-interfaces { container all-interfaces {
presence true; presence true;
description "Configures the server to listen for description "Configures the server to listen for
incoming messages on all IPv6 addresses (unicats and incoming messages on all IPv6 addresses (unicast and
multicast) on all of its network interfaces."; multicast) on all 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 "List of interfaces that the server will description "List of interfaces that the server will
listen for incoming messages on. Messages addressed listen for incoming messages on. Messages addressed
to any valid IPv6 address (unicast and multicast) will to any valid IPv6 address (unicast and multicast) will
be received."; be received.";
skipping to change at page 82, line 43 skipping to change at page 86, line 37
at which the server will perform a lease file cleanup at which the server will perform a lease file cleanup
(LFC)."; (LFC).";
} }
} }
case mysql { case mysql {
leaf mysql-name { leaf mysql-name {
type string; type string;
description "Name of the database."; description "Name of the database.";
} }
choice mysql-host { choice mysql-host {
description "Define host or address for MySQL server.";
case mysql-server-hostname { case mysql-server-hostname {
leaf mysql-hostname { leaf mysql-hostname {
type inet:domain-name; type inet:domain-name;
default "localhost"; default "localhost";
description "If the database is located on a description "If the database is located on a
different system to the DHCPv6 server, the different system to the DHCPv6 server, the
domain name can be specified."; domain name can be specified.";
} }
} }
case mysql-server-address { case mysql-server-address {
skipping to change at page 83, line 45 skipping to change at page 87, line 40
} }
leaf mysql-connect-timeout { leaf mysql-connect-timeout {
type uint64; type uint64;
description "Defines the timeout interval for description "Defines the timeout interval for
connecting to the database. A longer interval can connecting to the database. A longer interval can
be specified if the database is remote."; be specified if the database is remote.";
} }
} }
case postgresql { case postgresql {
choice postgresql-host { choice postgresql-host {
description "Define host or address for postgresql
server.";
case postgresql-server-hostname { case postgresql-server-hostname {
leaf postgresql-hostname { leaf postgresql-hostname {
type inet:domain-name; type inet:domain-name;
default "localhost"; default "localhost";
description "If the database is located on a description "If the database is located on a
different system to the DHCPv6 server, the different system to the DHCPv6 server, the
domain name can be specified."; domain name can be specified.";
} }
} }
case postgresql-server-address { case postgresql-server-address {
leaf postgresql-address { leaf postgresql-address {
type inet:ip-address; type inet:ip-address;
default "::"; default "::";
description "Configure the location of the database description "Configure the location of the database
using an IP (v6 or v6) literal address"; using an IP (v6 or v6) literal address";
} }
} }
skipping to change at page 85, line 7 skipping to change at page 89, line 4
} }
} }
} }
/* /*
* Augmentations * Augmentations
*/ */
augment "/dhcpv6-server:dhcpv6-server/dhcpv6-server:vendor-config" augment "/dhcpv6-server:dhcpv6-server/dhcpv6-server:vendor-config"
{ {
description "Augment the server specific YANG to the
ietf-dhcpv6-server module.";
uses dhcpv6-server-config:config; uses dhcpv6-server-config:config;
} }
} }
<CODE ENDS> <CODE ENDS>
Appendix C. Example definition of class selector configuration Appendix C. Example definition of class selector configuration
The module "example-dhcpv6-class-selector" provides an example of how The module "ietf-example-dhcpv6-class-selector" provides an example
vendor specific class selection configuration can be modelled and of how vendor specific class selection configuration can be modelled
integrated with the "ietf-dhcpv6-server" module defined in this and integrated with the "ietf-dhcpv6-server" module defined in this
document. document.
The example module defines "client-class-names" with associated The example module defines "client-class-names" with associated
matching rules. A client can be classified based on "client-id", matching rules. A client can be classified based on "client-id",
"interface-id" (ingress interface of the client's messages), packets "interface-id" (ingress interface of the client's messages), packets
source or destination address, relay link address, relay link source or destination address, relay link address, relay link
interface-id and more. Actually, there are endless methods for interface-id and more. Actually, there are endless methods for
classifying clients. So this standard does not try to provide full classifying clients. So this standard does not try to provide full
specification for class selection, it only shows an example how it specification for class selection, it only shows an example how it
can be defined. can be defined.
skipping to change at page 85, line 43 skipping to change at page 89, line 42
Server configuration. Server configuration.
* client-class leafrefs augmented to "network-range", "address-pool" * client-class leafrefs augmented to "network-range", "address-pool"
and "pd-pool", pointing to the "client-class-name" that is and "pd-pool", pointing to the "client-class-name" that is
required. required.
The mechanism is as follows: class is associated to client based on The mechanism is as follows: class is associated to client based on
rules and then client is allowed to get address(es)/prefix(es) from rules and then client is allowed to get address(es)/prefix(es) from
given network-range/pool if the class name matches. given network-range/pool if the class name matches.
<CODE BEGINS> file example-dhcpv6-class-selector.yang <CODE BEGINS> file "ietf-example-dhcpv6-class-selector.yang"
module example-dhcpv6-class-selector { module ietf-example-dhcpv6-class-selector {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:example-dhcpv6-class-selecto namespace "urn:ietf:params:xml:ns:yang:ietf-example-dhcpv6-class-se
r"; lector";
prefix "dhcpv6-class-selector"; prefix "dhcpv6-class-selector";
import ietf-inet-types { import ietf-inet-types {
prefix inet; prefix inet;
} }
import ietf-interfaces { import ietf-interfaces {
prefix if; prefix if;
} }
skipping to change at page 86, line 31 skipping to change at page 90, line 31
"yong@csnet1.cs.tsinghua.edu.cn "yong@csnet1.cs.tsinghua.edu.cn
lh.sunlinh@gmail.com lh.sunlinh@gmail.com
ian.farrer@telekom.de ian.farrer@telekom.de
sladjana.zechlin@telekom.de sladjana.zechlin@telekom.de
hezihao9512@gmail.com"; hezihao9512@gmail.com";
description "This YANG module defines components for the definition description "This YANG module defines components for the definition
and configuration of the client class selector function for a and 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) 2018 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 8513; see
the RFC itself for full legal notices.";
revision 2020-12-10 {
description "Version update for draft -13 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-13";
}
revision 2020-12-01 { revision 2020-12-01 {
description "Version update for draft -12 publication."; description "Version update for draft -12 publication.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-12"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-12";
} }
revision 2020-05-26 { revision 2020-05-26 {
description "Version update for draft -11 publication and description "Version update for draft -11 publication and
to align revisions across the different modules."; to align revisions across the different modules.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang-11"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-11";
skipping to change at page 87, line 14 skipping to change at page 91, line 31
grouping client-class-id { grouping client-class-id {
description "Definitions of client message classification for description "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;
description "Unique Identifier for client class identification description "Unique Identifier for client class identification
list entries."; list entries.";
} }
choice id-type { choice id-type {
mandatory true;
description "Definitions for different client identifier description "Definitions for different client identifier
types."; types.";
mandatory true;
case client-id-id { case client-id-id {
description "Client class selection based on a string literal
client identifier.";
leaf client-id { leaf client-id {
description "String literal client identifier.";
mandatory true;
type string; type string;
mandatory true;
description "String literal client identifier.";
} }
description "Client class selection based on a string literal
client identifier.";
} }
case received-interface-id { case received-interface-id {
description "Client class selection based on the incoming description "Client class selection based on the incoming
interface of the DHCPv6 message."; interface of the DHCPv6 message.";
leaf received-interface { leaf received-interface {
type if:interface-ref;
description "Reference to the interface entry description "Reference to the interface entry
for the incoming DHCPv6 message."; for the incoming DHCPv6 message.";
type if:interface-ref;
} }
} }
case packet-source-address-id { case packet-source-address-id {
description "Client class selection based on the source description "Client class selection based on the source
address of the DHCPv6 message."; address of the DHCPv6 message.";
leaf packet-source-address { leaf packet-source-address {
description "Source address of the DHCPv6 message.";
mandatory true;
type inet:ipv6-address; type inet:ipv6-address;
mandatory true;
description "Source address of the DHCPv6 message.";
} }
} }
case packet-destination-address-id { case packet-destination-address-id {
description "Client class selection based on the destination description "Client class selection based on the destination
address of the DHCPv6 message."; address of the DHCPv6 message.";
leaf packet-destination-address { leaf packet-destination-address {
description "Destination address of the DHCPv6 message.";
mandatory true;
type inet:ipv6-address; type inet:ipv6-address;
mandatory true;
description "Destination address of the DHCPv6 message.";
} }
} }
case relay-link-address-id { case relay-link-address-id {
description "Client class selection based on the prefix description "Client class selection based on the prefix
of the link-address field in the relay agent message of the link-address field in the relay agent message
header."; header.";
leaf relay-link-address { leaf relay-link-address {
type inet:ipv6-prefix;
mandatory true;
description "Prefix of the link-address field in the relay description "Prefix of the link-address field in the relay
agent message header."; agent message header.";
mandatory true;
type inet:ipv6-prefix;
} }
} }
case relay-peer-address-id { case relay-peer-address-id {
description "Client class selection based on the value of the description "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;
mandatory true;
description "Prefix of the peer-address field description "Prefix of the peer-address field
in the relay agent message header."; in the relay agent message header.";
mandatory true;
type inet:ipv6-prefix;
} }
} }
case relay-interface-id { case relay-interface-id {
description "Client class selection based on the incoming description "Client class selection based on the incoming
interface-id option."; interface-id option.";
leaf relay-interface { leaf relay-interface {
type string;
description "Reference to the interface entry description "Reference to the interface entry
for the incoming DHCPv6 message."; for the incoming DHCPv6 message.";
type string;
} }
} }
case user-class-option-id { case user-class-option-id {
description "Client class selection based on the value of the description "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 {
description "Value of the enterprise-number field.";
mandatory true;
type string; type string;
mandatory true;
description "Value of the enterprise-number field.";
} }
} }
case vendor-class-present-id { case vendor-class-present-id {
description "Client class selection based on the presence of description "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;
mandatory true;
description "Presence of OPTION_VENDOR_CLASS(16) description "Presence of OPTION_VENDOR_CLASS(16)
in the received message."; in the received message.";
mandatory true;
type boolean;
} }
} }
case vendor-class-option-enterprise-number-id { case vendor-class-option-enterprise-number-id {
description "Client class selection based on the value of the description "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 {
description "Value of the enterprise-number field.";
mandatory true;
type uint32; type uint32;
mandatory true;
description "Value of the enterprise-number field.";
} }
} }
case vendor-class-option-data-id { case vendor-class-option-data-id {
description "Client class selection based on the value description "Client class selection based on the value
of a data field within a vendor-class-data entry of a data field within a vendor-class-data entry
for a matching enterprise-number field for a matching enterprise-number field
in OPTION_VENDOR_CLASS(16)."; in OPTION_VENDOR_CLASS(16).";
container vendor-class-option-data { container vendor-class-option-data {
description "Vendor class option data container.";
leaf vendor-class-option-enterprise-number { leaf vendor-class-option-enterprise-number {
type uint32;
mandatory true;
description "Value of the enterprise-number field description "Value of the enterprise-number field
for matching the data contents."; for matching the data contents.";
mandatory true;
type uint32;
} }
leaf vendor-class-data { leaf vendor-class-data {
description "Vendor class data to match.";
mandatory true;
type string; type string;
mandatory true;
description "Vendor class data to match.";
} }
} }
} }
case remote-id { case remote-id {
description "Client class selection based on the value description "Client class selection based on the value
of Remote-ID ."; of Remote-ID .";
container remote-id { container remote-id {
description "Remote-id client class selector container.";
leaf vendor-class-option-enterprise-number { leaf vendor-class-option-enterprise-number {
type uint32;
mandatory true;
description "Value of the enterprise-number field description "Value of the enterprise-number field
for matching the data contents."; for matching the data contents.";
mandatory true;
type uint32;
} }
leaf remote-id { leaf remote-id {
description "Remote-ID data to match.";
mandatory true;
type string; type string;
mandatory true;
description "Remote-ID data to match.";
} }
} }
} }
case client-duid-id { case client-duid-id {
description "Client class selection based on the value description "Client class selection based on the value
of the received client DUID."; of the received client DUID.";
uses dhcpv6-common:duid; uses dhcpv6-common:duid;
} }
} }
} }
/* /*
* Augmentations * Augmentations
*/ */
augment "/dhcpv6-server:dhcpv6-server/dhcpv6-server:class-selector" augment "/dhcpv6-server:dhcpv6-server/dhcpv6-server:class-selector"
{ {
description "Augment class selector functions to the DHCPv6 serve
r
module.";
container client-classes { container client-classes {
description "Client classes to augment.";
list class { list class {
key client-class-name;
description "List of the client class identifiers applicable description "List of the client class identifiers applicable
to clients served by this address pool"; to clients served by this address pool";
key client-class-name;
uses dhcpv6-class-selector:client-class-id; uses dhcpv6-class-selector:client-class-id;
} }
} }
} }
augment "/dhcpv6-server:dhcpv6-server/dhcpv6-server:network-ranges/ augment "/dhcpv6-server:dhcpv6-server/" +
dhcpv6-server:network-range" { "dhcpv6-server:network-ranges/dhcpv6-server:network-range" {
description "Augment class selector functions to the DHCPv6 serve
r
network-ranges.";
leaf-list client-class { leaf-list client-class {
type leafref { type leafref {
path "/dhcpv6-server:dhcpv6-server/dhcpv6-server:class-select path "/dhcpv6-server:dhcpv6-server/dhcpv6-server:" +
or/client-classes/class/client-class-name"; "class-selector/client-classes/class/client-class-name";
} }
description "Leafrefs to client classes.";
} }
} }
augment "/dhcpv6-server:dhcpv6-server/dhcpv6-server:network-ranges/ augment "/dhcpv6-server:dhcpv6-server/dhcpv6-server:" +
dhcpv6-server:network-range/dhcpv6-server:address-pools/dhcpv6-server "network-ranges/dhcpv6-server:network-range/dhcpv6-server:" +
:address-pool" { "address-pools/dhcpv6-server:address-pool" {
description "Augment class selector functions to the DHCPv6 serve
r
address-pools.";
leaf-list client-class { leaf-list client-class {
type leafref { type leafref {
path "/dhcpv6-server:dhcpv6-server/dhcpv6-server:class-select path "/dhcpv6-server:dhcpv6-server/dhcpv6-server:" +
or/client-classes/class/client-class-name"; "class-selector/client-classes/class/client-class-name";
} }
description "Leafrefs to client classes.";
} }
} }
augment "/dhcpv6-server:dhcpv6-server/dhcpv6-server:network-ranges/ augment "/dhcpv6-server:dhcpv6-server/dhcpv6-server:" +
dhcpv6-server:network-range/dhcpv6-server:prefix-pools/dhcpv6-server: "network-ranges/dhcpv6-server:network-range/dhcpv6-server:" +
prefix-pool" { "prefix-pools/dhcpv6-server:prefix-pool" {
description "Augment class selector functions to the DHCPv6 serve
r
prefix-pools.";
leaf-list client-class { leaf-list client-class {
type leafref { type leafref {
path "/dhcpv6-server:dhcpv6-server/dhcpv6-server:class-select path "/dhcpv6-server:dhcpv6-server/dhcpv6-server:" +
or/client-classes/class/client-class-name"; "class-selector/client-classes/class/client-class-name";
} }
description "Leafrefs to client classes.";
} }
} }
} }
<CODE ENDS> <CODE ENDS>
Authors' Addresses Authors' Addresses
Yong Cui Yong Cui
Tsinghua University Tsinghua University
Beijing Beijing
100084 100084
P.R. China P.R. China
Phone: +86-10-6260-3059 Phone: +86-10-6260-3059
Email: cuiyong@tsinghua.edu.cn Email: cuiyong@tsinghua.edu.cn
Linhui Sun Linhui Sun
 End of changes. 407 change blocks. 
411 lines changed or deleted 643 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/