draft-ietf-dhc-dhcpv6-yang-09.txt   draft-ietf-dhc-dhcpv6-yang-10.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: March 11, 2020 I. Farrer Expires: 7 May 2020 I.F. Farrer
S. Zechlin S.Z. Zechlin
Deutsche Telekom AG Deutsche Telekom AG
Z. He Z. He
Tsinghua University Tsinghua University
September 8, 2019 M.N. Nowikowski
Internet Systems Consortium
4 November 2019
YANG Data Model for DHCPv6 Configuration YANG Data Model for DHCPv6 Configuration
draft-ietf-dhc-dhcpv6-yang-09 draft-ietf-dhc-dhcpv6-yang-10
Abstract Abstract
This document describes a YANG data model [RFC6020] for the This document describes several YANG data modules for the
configuration and management of DHCPv6 servers, relays, and clients. configuration and 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", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
document are to be interpreted as described in [RFC2119]. "OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
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 March 11, 2020. This Internet-Draft will expire on 7 May 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2019 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 Provisions Relating to IETF Documents (https://trustee.ietf.org/
(https://trustee.ietf.org/license-info) in effect on the date of license-info) in effect on the date of publication of this document.
publication of this document. Please review these documents Please review these documents carefully, as they describe your rights
carefully, as they describe your rights and restrictions with respect and restrictions with respect to this document. Code Components
to this document. Code Components extracted from this document must extracted from this document must include Simplified BSD License text
include Simplified BSD License text as described in Section 4.e of as described in Section 4.e of the Trust Legal Provisions and are
the Trust Legal Provisions and are provided without warranty as provided without warranty as described in the Simplified BSD License.
described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Scope . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. DHCPv6 Tree Diagram . . . . . . . . . . . . . . . . . . . . . 3 1.2. Extensibility of the DHCPv6 Server YANG Module . . . . . 3
2.1. DHCPv6 Server Tree Diagrams . . . . . . . . . . . . . . . 3 1.2.1. DHCPv6 Option Definitions . . . . . . . . . . . . . . 4
2.2. DHCPv6 Relay Tree Diagrams . . . . . . . . . . . . . . . 16 1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4
2.3. DHCPv6 Client Tree Diagrams . . . . . . . . . . . . . . . 20 2. DHCPv6 Tree Diagrams . . . . . . . . . . . . . . . . . . . . 4
3. DHCPv6 YANG Model . . . . . . . . . . . . . . . . . . . . . . 27 2.1. DHCPv6 Server Tree Diagram . . . . . . . . . . . . . . . 4
3.1. DHCPv6 Server YANG Model . . . . . . . . . . . . . . . . 27 2.2. DHCPv6 Relay Tree Diagram . . . . . . . . . . . . . . . . 11
3.2. DHCPv6 Relay YANG Model . . . . . . . . . . . . . . . . . 47 2.3. DHCPv6 Client Tree Diagram . . . . . . . . . . . . . . . 14
3.3. DHCPv6 Client YANG Model . . . . . . . . . . . . . . . . 57 3. DHCPv6 YANG Model . . . . . . . . . . . . . . . . . . . . . . 17
3.4. DHCPv6 Options YANG Model . . . . . . . . . . . . . . . . 65 3.1. DHCPv6 Server YANG Model . . . . . . . . . . . . . . . . 17
3.5. DHCPv6 Types YANG Model . . . . . . . . . . . . . . . . . 94 3.2. DHCPv6 Relay YANG Model . . . . . . . . . . . . . . . . . 29
4. Security Considerations (TBD) . . . . . . . . . . . . . . . . 99 3.3. DHCPv6 Client YANG Model . . . . . . . . . . . . . . . . 36
5. IANA Considerations (TBD) . . . . . . . . . . . . . . . . . . 99 3.4. DHCPv6 RFC8415 Options YANG Model . . . . . . . . . . . . 45
6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 99 3.5. DHCPv6 Common YANG Model . . . . . . . . . . . . . . . . 54
7. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 99 4. Security Considerations (TBD) . . . . . . . . . . . . . . . . 58
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 100 5. IANA Considerations (TBD) . . . . . . . . . . . . . . . . . . 58
8.1. Normative References . . . . . . . . . . . . . . . . . . 100 6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 59
8.2. Informative References . . . . . . . . . . . . . . . . . 100 7. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 59
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 102 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 59
8.1. Normative References . . . . . . . . . . . . . . . . . . 59
8.2. Informative References . . . . . . . . . . . . . . . . . 60
Appendix A. Example of Adding New DHCPv6 Option
Definitions . . . . . . . . . . . . . . . . . . . . . . . 61
Appendix B. Example Vendor Specific Server Configuration
Module . . . . . . . . . . . . . . . . . . . . . . . . . 63
Appendix C. Example definition of class selector
configuration . . . . . . . . . . . . . . . . . . . . . . 68
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 73
1. Introduction 1. Introduction
DHCPv6 [RFC3315] 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 a DHCPv6 YANG data model, containing sub-modules for the defines DHCPv6 YANG modules for the configuration and management of
configuration and management of DHCPv6 servers, relays and clients. DHCPv6 servers, relays and clients. This document defines separate
A single YANG model covering all of these elements provides an 'element' modules for each of these.
operator with a common interface for the management of the entire
DHCPv6 deployment in their network.
Since the publication of the original DHCPv6 specification, there
have been a large number of additional documents that update the
protocol's operation, add new functions and define new options. The
YANG model described in this document incorporates all relevant
changes. A full list of the documents which have been considered in
the development of this model is included in Appendix A.
IF - Comment - Does anyone have this list? Additionally, a 'common' module contains typedefs and groupings used
by the element modules. A further module contains an initial set of
DHCPv6 option definitions.
It is worth noting that as DHCPv6 is itself a device configuration It is worth noting that as DHCPv6 is itself a client configuration
protocol, it is not the intention of this document to replace the protocol, it is not the intention of this document to replace the
configuration of DHCPv6 options and parameters using the DHCPv6 allocation of DHCPv6 assigned addressing and parameters using
protocol with the configuration of DHCPv6 options using NETCONF/YANG. NETCONF/YANG. The DHCPv6 client model is intended for the
The DHCPv6 client model is intended for the configuration of the configuration and monitoring of the DHCPv6 client function and does
DHCPv6 client function and also for obtaining read-only state data not affect the normal DHCPv6 message flow.
from the client which has been learned via the normal DHCPv6 message
flow. This gives an operator a better method for managing DHCPv6
clients and simplifies troubleshooting.
1.1. Terminology
The reader should be familiar with the terms defined in DHCPv6
[RFC3315] and other relevant documents.
The DHCPv6 tree diagrams provide a concise representation of a YANG
module to help the reader understand the module structure.
A simplified graphical representation of the data model is provided
in this document. For a description of the symbols in these
diagrams, please refer to [I-D.ietf-netmod-yang-tree-diagrams].
2. DHCPv6 Tree Diagram
2.1. DHCPv6 Server Tree Diagrams
module: ietf-dhcpv6-server
+--rw server!
+--rw server-config
| +--rw serv-attributes
| | +--rw duid
| | | +--rw type-code? uint16
| | | +--rw (duid-type)?
| | | +--:(duid-llt)
| | | | +--rw duid-llt-hardware-type? uint16
| | | | +--rw duid-llt-time? yang:timeticks
| | | | +--rw duid-llt-link-layer-addr? yang:mac-address
| | | +--:(duid-en)
| | | | +--rw duid-en-enterprise-number? uint32
| | | | +--rw duid-en-identifier? string
| | | +--:(duid-ll)
| | | | +--rw duid-ll-hardware-type? uint16
| | | | +--rw duid-ll-link-layer-addr? yang:mac-address
| | | +--:(duid-uuid)
| | | | +--rw uuid? yang:uuid
| | | +--:(duid-unknown)
| | | +--rw data? binary
| | +--rw name? string
| | +--rw description? string
| | +--rw ipv6-address* inet:ipv6-address
| | +--rw interfaces-config* if:interface-ref
| | +--rw lease-storage
| | | +--rw (storage-type)?
| | | +--:(memfile)
| | | | +--rw memfile-name? string
| | | | +--rw memfile-lfc-interval? uint64
| | | +--:(mysql)
| | | | +--rw mysql-name? string
| | | | +--rw mysql-host? string
| | | | +--rw mysql-password? string
| | | | +--rw mysql-port? uint8
| | | | +--rw mysql-lfc-interval? uint64
| | | | +--rw mysql-connect-timeout? uint64
| | | +--:(postgresql)
| | | | +--rw postgresql-name? string
| | | | +--rw postgresql-host? string
| | | | +--rw postgresql-password? string
| | | | +--rw postgresql-port? uint8
| | | | +--rw postgresql-lfc-interval? uint64
| | | | +--rw postgresql-connect-timeout? uint64
| | | +--:(cassandra)
| | | +--rw cassandra-name? string
| | | +--rw cassandra-contact-points? string
| | | +--rw cassandra-password? string
| | | +--rw cassandra-lfc-interval? uint64
| | | +--rw cassandra-connect-timeout? uint64
| | +--rw vendor-info
| | +--rw ent-num uint32
| | +--rw data* string
| +--rw option-sets
| | +--rw option-set* [option-set-id]
| | +--rw option-set-id uint32
| | +--rw server-unicast-option! {server-unicast-op}?
| | | +--rw server-address? inet:ipv6-address
| | +--rw sip-server-domain-name-list-option! {sip-server-domain-name-list-op}?
| | | +--rw sip-serv-domain-name string
| | +--rw sip-server-address-list-option! {sip-server-address-list-op}?
| | | +--rw sip-server* [sip-serv-id]
| | | +--rw sip-serv-id uint8
| | | +--rw sip-serv-addr inet:ipv6-address
| | +--rw dns-servers-option! {dns-servers-op}?
| | | +--rw dns-server* [dns-serv-id]
| | | +--rw dns-serv-id uint8
| | | +--rw dns-serv-addr inet:ipv6-address
| | +--rw domain-searchlist-option! {domain-searchlist-op}?
| | | +--rw domain-searchlist* [domain-searchlist-id]
| | | +--rw domain-searchlist-id uint8
| | | +--rw domain-search-list-entry string
| | +--rw nis-config-option! {nis-config-op}?
| | | +--rw nis-server* [nis-serv-id]
| | | +--rw nis-serv-id uint8
| | | +--rw nis-serv-addr inet:ipv6-address
| | +--rw nis-plus-config-option! {nis-plus-config-op}?
| | | +--rw nis-plus-server* [nis-plus-serv-id]
| | | +--rw nis-plus-serv-id uint8
| | | +--rw nis-plus-serv-addr inet:ipv6-address
| | +--rw nis-domain-name-option! {nis-domain-name-op}?
| | | +--rw nis-domain-name? string
| | +--rw nis-plus-domain-name-option! {nis-plus-domain-name-op}?
| | | +--rw nis-plus-domain-name? string
| | +--rw sntp-server-option! {sntp-server-op}?
| | | +--rw sntp-server* [sntp-serv-id]
| | | +--rw sntp-serv-id uint8
| | | +--rw sntp-serv-addr inet:ipv6-address
| | +--rw info-refresh-time-option! {info-refresh-time-op}?
| | | +--rw info-refresh-time yang:timeticks
| | +--rw client-fqdn-option! {client-fqdn-op}?
| | | +--rw server-initiate-update boolean
| | | +--rw client-initiate-update boolean
| | | +--rw modify-name-from-cli boolean
| | +--rw posix-timezone-option! {posix-timezone-op}?
| | | +--rw tz-posix string
| | +--rw tzdb-timezone-option! {tzdb-timezone-op}?
| | | +--rw tz-database string
| | +--rw ntp-server-option! {ntp-server-op}?
| | | +--rw ntp-server* [ntp-serv-id]
| | | +--rw ntp-serv-id uint8
| | | +--rw (ntp-time-source-suboption)?
| | | +--:(server-address)
| | | | +--rw ntp-serv-addr-suboption* inet:ipv6-address
| | | +--:(server-multicast-address)
| | | | +--rw ntp-serv-mul-addr-suboption* inet:ipv6-address
| | | +--:(server-fqdn)
| | | +--rw ntp-serv-fqdn-suboption* string
| | +--rw boot-file-url-option! {boot-file-url-op}?
| | | +--rw boot-file* [boot-file-id]
| | | +--rw boot-file-id uint8
| | | +--rw suitable-arch-type* uint16
| | | +--rw suitable-net-if* uint32
| | | +--rw boot-file-url string
| | +--rw boot-file-param-option! {boot-file-param-op}?
| | | +--rw boot-file-params* [param-id]
| | | +--rw param-id uint8
| | | +--rw parameter string
| | +--rw aftr-name-option! {aftr-name-op}?
| | | +--rw tunnel-endpoint-name string
| | +--rw kbr-default-name-option! {kbr-default-name-op}?
| | | +--rw default-realm-name string
| | +--rw kbr-kdc-option! {kbr-kdc-op}?
| | | +--rw kdc-info* [kdc-id]
| | | +--rw kdc-id uint8
| | | +--rw priority uint16
| | | +--rw weight uint16
| | | +--rw transport-type uint8
| | | +--rw port-number uint16
| | | +--rw kdc-ipv6-addr inet:ipv6-address
| | | +--rw realm-name string
| | +--rw sol-max-rt-option! {sol-max-rt-op}?
| | | +--rw sol-max-rt-value yang:timeticks
| | +--rw inf-max-rt-option! {inf-max-rt-op}?
| | | +--rw inf-max-rt-value yang:timeticks
| | +--rw addr-selection-option! {addr-selection-op}?
| | | +--rw a-bit-set boolean
| | | +--rw p-bit-set boolean
| | | +--rw policy-table* [policy-id]
| | | +--rw policy-id uint8
| | | +--rw label uint8
| | | +--rw precedence uint8
| | | +--rw prefix-len uint8
| | | +--rw prefix inet:ipv6-prefix
| | +--rw pcp-server-option! {pcp-server-op}?
| | | +--rw pcp-server* [pcp-serv-id]
| | | +--rw pcp-serv-id uint8
| | | +--rw pcp-serv-addr inet:ipv6-address
| | +--rw s46-rule-option! {s46-rule-op}?
| | | +--rw s46-rule* [rule-id]
| | | +--rw rule-id uint8
| | | +--rw rule-type enumeration
| | | +--rw prefix4-len uint8
| | | +--rw ipv4-prefix inet:ipv4-prefix
| | | +--rw prefix6-len uint8
| | | +--rw ipv6-prefix inet:ipv6-prefix
| | | +--rw port-parameter
| | | +--rw offset uint8
| | | +--rw psid-len uint8
| | | +--rw psid uint16
| | +--rw s46-br-option! {s46-br-op}?
| | | +--rw br* [br-id]
| | | +--rw br-id uint8
| | | +--rw br-ipv6-addr inet:ipv6-address
| | +--rw s46-dmr-option! {s46-dmr-op}?
| | | +--rw dmr* [dmr-id]
| | | +--rw dmr-id uint8
| | | +--rw dmr-prefix-len uint8
| | | +--rw dmr-ipv6-prefix inet:ipv6-prefix
| | +--rw s46-v4-v6-binding-option! {s46-v4-v6-binding-op}?
| | | +--rw ce* [ce-id]
| | | +--rw ce-id uint8
| | | +--rw ipv4-addr inet:ipv4-address
| | | +--rw bind-prefix6-len uint8
| | | +--rw bind-ipv6-prefix inet:ipv6-prefix
| | | +--rw port-parameter
| | | +--rw offset uint8
| | | +--rw psid-len uint8
| | | +--rw psid uint16
| | +--rw operator-option-ipv6-address! {operator-op-ipv6-address}?
| | | +--rw operator-ipv6-addr* [operator-ipv6-addr-id]
| | | +--rw operator-ipv6-addr-id uint8
| | | +--rw operator-ipv6-addr inet:ipv6-address
| | +--rw operator-option-single-flag! {operator-op-single-flag}?
| | | +--rw flag* [flag-id]
| | | +--rw flag-id uint8
| | | +--rw flag-value boolean
| | +--rw operator-option-ipv6-prefix! {operator-op-ipv6-prefix}?
| | | +--rw operator-ipv6-prefix* [operator-ipv6-prefix-id]
| | | +--rw operator-ipv6-prefix-id uint8
| | | +--rw operator-ipv6-prefix6-len uint8
| | | +--rw operator-ipv6-prefix inet:ipv6-prefix
| | +--rw operator-option-int32! {operator-op-int32}?
| | | +--rw int32val* [int32val-id]
| | | +--rw int32val-id uint8
| | | +--rw int32val uint32
| | +--rw operator-option-int16! {operator-op-int16}?
| | | +--rw int16val* [int16val-id]
| | | +--rw int16val-id uint8
| | | +--rw int16val uint16
| | +--rw operator-option-int8! {operator-op-int8}?
| | | +--rw int8val* [int8val-id]
| | | +--rw int8val-id uint8
| | | +--rw int8val uint8
| | +--rw operator-option-uri! {operator-op-uri}?
| | | +--rw uri* [uri-id]
| | | +--rw uri-id uint8
| | | +--rw uri string
| | +--rw operator-option-textstring! {operator-op-textstring}?
| | | +--rw textstring* [textstring-id]
| | | +--rw textstring-id uint8
| | | +--rw textstring string
| | +--rw operator-option-var-data! {operator-op-var-data}?
| | | +--rw int32val* [var-data-id]
| | | +--rw var-data-id uint8
| | | +--rw var-data binary
| | +--rw operator-option-dns-wire! {operator-op-dns-wire}?
| | +--rw operator-option-dns-wire* [operator-option-dns-wire-id]
| | +--rw operator-option-dns-wire-id uint8
| | +--rw operator-option-dns-wire binary
| +--rw network-ranges
| | +--rw option-set-id? -> /server/server-config/option-sets/option-set/option-set-id
| | +--rw network-range* [network-range-id]
| | +--rw network-range-id uint32
| | +--rw network-description string
| | +--rw network-prefix inet:ipv6-prefix
| | +--rw option-set-id? -> /server/server-config/option-sets/option-set/option-set-id
| | +--rw address-pools
| | | +--rw address-pool* [pool-id]
| | | +--rw pool-id uint32
| | | +--rw pool-prefix? inet:ipv6-prefix
| | | +--rw start-address inet:ipv6-address-no-zone
| | | +--rw end-address inet:ipv6-address-no-zone
| | | +--rw valid-lifetime yang:timeticks
| | | +--rw renew-time yang:timeticks
| | | +--rw rebind-time yang:timeticks
| | | +--rw preferred-lifetime yang:timeticks
| | | +--rw rapid-commit boolean
| | | +--rw client-class? string
| | | +--rw max-address-count threshold
| | | +--rw option-set-id? -> /server/server-config/option-sets/option-set/option-set-id
| | +--rw pd-pools
| | | +--rw pd-pool* [pool-id]
| | | +--rw pool-id uint32
| | | +--rw prefix inet:ipv6-prefix
| | | +--rw delegated-length uint8
| | | +--rw valid-lifetime yang:timeticks
| | | +--rw renew-time yang:timeticks
| | | +--rw rebind-time yang:timeticks
| | | +--rw preferred-lifetime yang:timeticks
| | | +--rw rapid-commit boolean
| | | +--rw client-class? string
| | | +--rw max-pd-space-utilization threshold
| | | +--rw option-set-id? -> /server/server-config/option-sets/option-set/option-set-id
| | +--rw host-reservations
| | +--rw host-reservation* [cli-id]
| | +--rw cli-id uint32
| | +--rw (client-identifier)?
| | | +--:(duid)
| | | | +--rw type-code? uint16
| | | | +--rw (duid-type)?
| | | | +--:(duid-llt)
| | | | | +--rw duid-llt-hardware-type? uint16
| | | | | +--rw duid-llt-time? yang:timeticks
| | | | | +--rw duid-llt-link-layer-addr? yang:mac-address
| | | | +--:(duid-en)
| | | | | +--rw duid-en-enterprise-number? uint32
| | | | | +--rw duid-en-identifier? string
| | | | +--:(duid-ll)
| | | | | +--rw duid-ll-hardware-type? uint16
| | | | | +--rw duid-ll-link-layer-addr? yang:mac-address
| | | | +--:(duid-uuid)
| | | | | +--rw uuid? yang:uuid
| | | | +--:(duid-unknown)
| | | | +--rw data? binary
| | | +--:(hw-address)
| | | +--rw hardware-address? yang:mac-address
| | +--rw reserv-addr* inet:ipv6-address
| | +--rw prefix-reservation* [reserv-prefix-id]
| | | +--rw reserv-prefix-id uint32
| | | +--rw reserv-prefix inet:ipv6-prefix
| | | +--rw reserv-prefix-len uint8
| | +--rw hostname? string
| | +--rw option-set-id? -> /server/server-config/option-sets/option-set/option-set-id
| +--rw relay-opaque-params
| | +--rw relays* [relay-name]
| | +--rw relay-name string
| | +--rw interface-info* [if-name]
| | | +--rw if-name string
| | | +--rw interface-id string
| | +--rw subscribers* [subscriber]
| | | +--rw subscriber uint32
| | | +--rw subscriber-id string
| | +--rw remote-host* [ent-num]
| | +--rw ent-num uint32
| | +--rw remote-id string
| +--rw rsoo-enabled-options
| +--rw rsoo-enabled-option* [option-code]
| +--rw option-code uint16
| +--rw description string
+--ro server-state
+--ro network-ranges
| +--ro network-range* [network-range-id]
| +--ro network-range-id uint32
| +--ro address-pools
| | +--ro address-pool* [pool-id]
| | | +--ro pool-id uint32
| | | +--ro total-address-count uint64
| | | +--ro allocated-address-conut uint64
| | +--ro binding-info* [cli-id]
| | +--ro cli-id uint32
| | +--ro duid
| | | +--ro type-code? uint16
| | | +--ro (duid-type)?
| | | +--:(duid-llt)
| | | | +--ro duid-llt-hardware-type? uint16
| | | | +--ro duid-llt-time? yang:timeticks
| | | | +--ro duid-llt-link-layer-addr? yang:mac-address
| | | +--:(duid-en)
| | | | +--ro duid-en-enterprise-number? uint32
| | | | +--ro duid-en-identifier? string
| | | +--:(duid-ll)
| | | | +--ro duid-ll-hardware-type? uint16
| | | | +--ro duid-ll-link-layer-addr? yang:mac-address
| | | +--:(duid-uuid)
| | | | +--ro uuid? yang:uuid
| | | +--:(duid-unknown)
| | | +--ro data? binary
| | +--ro cli-ia* [iaid]
| | +--ro ia-type string
| | +--ro iaid uint32
| | +--ro cli-addr* inet:ipv6-address
| | +--ro pool-id uint32
| +--ro pd-pools
| | +--ro prefix-pool* [pool-id]
| | | +--ro pool-id uint32
| | | +--ro pd-space-utilization threshold
| | +--ro binding-info* [cli-id]
| | +--ro cli-id uint32
| | +--ro duid
| | | +--ro type-code? uint16
| | | +--ro (duid-type)?
| | | +--:(duid-llt)
| | | | +--ro duid-llt-hardware-type? uint16
| | | | +--ro duid-llt-time? yang:timeticks
| | | | +--ro duid-llt-link-layer-addr? yang:mac-address
| | | +--:(duid-en)
| | | | +--ro duid-en-enterprise-number? uint32
| | | | +--ro duid-en-identifier? string
| | | +--:(duid-ll)
| | | | +--ro duid-ll-hardware-type? uint16
| | | | +--ro duid-ll-link-layer-addr? yang:mac-address
| | | +--:(duid-uuid)
| | | | +--ro uuid? yang:uuid
| | | +--:(duid-unknown)
| | | +--ro data? binary
| | +--ro cli-iapd* [iaid]
| | +--ro iaid uint32
| | +--ro cli-prefix* inet:ipv6-prefix
| | +--ro cli-prefix-len* uint8
| | +--ro pool-id uint32
| +--ro host-reservations
| +--ro binding-info* [cli-id]
| +--ro cli-id uint32
| +--ro duid
| | +--ro type-code? uint16
| | +--ro (duid-type)?
| | +--:(duid-llt)
| | | +--ro duid-llt-hardware-type? uint16
| | | +--ro duid-llt-time? yang:timeticks
| | | +--ro duid-llt-link-layer-addr? yang:mac-address
| | +--:(duid-en)
| | | +--ro duid-en-enterprise-number? uint32
| | | +--ro duid-en-identifier? string
| | +--:(duid-ll)
| | | +--ro duid-ll-hardware-type? uint16
| | | +--ro duid-ll-link-layer-addr? yang:mac-address
| | +--:(duid-uuid)
| | | +--ro uuid? yang:uuid
| | +--:(duid-unknown)
| | +--ro data? binary
| +--ro cli-ia* [iaid]
| | +--ro ia-type string
| | +--ro iaid uint32
| | +--ro cli-addr* inet:ipv6-address
| +--ro cli-iapd* [iaid]
| +--ro iaid uint32
| +--ro cli-prefix* inet:ipv6-prefix
| +--ro cli-prefix-len* uint8
+--ro packet-stats
+--ro solicit-count uint32
+--ro request-count uint32
+--ro renew-count uint32
+--ro rebind-count uint32
+--ro decline-count uint32
+--ro release-count uint32
+--ro info-req-count uint32
+--ro advertise-count uint32
+--ro confirm-count uint32
+--ro reply-count uint32
+--ro reconfigure-count uint32
+--ro relay-forward-count uint32
+--ro relay-reply-count uint32
notifications: 1.1. Scope
+---n notifications
+--ro dhcpv6-server-event
+--ro address-pool-running-out
| +--ro total-address-count uint64
| +--ro max-address-count uint64
| +--ro allocated-address-conut uint64
| +--ro duid
| | +--ro type-code? uint16
| | +--ro (duid-type)?
| | +--:(duid-llt)
| | | +--ro duid-llt-hardware-type? uint16
| | | +--ro duid-llt-time? yang:timeticks
| | | +--ro duid-llt-link-layer-addr? yang:mac-address
| | +--:(duid-en)
| | | +--ro duid-en-enterprise-number? uint32
| | | +--ro duid-en-identifier? string
| | +--:(duid-ll)
| | | +--ro duid-ll-hardware-type? uint16
| | | +--ro duid-ll-link-layer-addr? yang:mac-address
| | +--:(duid-uuid)
| | | +--ro uuid? yang:uuid
| | +--:(duid-unknown)
| | +--ro data? binary
| +--ro serv-name? string
| +--ro pool-name string
+--ro pd-pool-running-out
| +--ro max-pd-space-utilization threshold
| +--ro pd-space-utilization threshold
| +--ro duid
| | +--ro type-code? uint16
| | +--ro (duid-type)?
| | +--:(duid-llt)
| | | +--ro duid-llt-hardware-type? uint16
| | | +--ro duid-llt-time? yang:timeticks
| | | +--ro duid-llt-link-layer-addr? yang:mac-address
| | +--:(duid-en)
| | | +--ro duid-en-enterprise-number? uint32
| | | +--ro duid-en-identifier? string
| | +--:(duid-ll)
| | | +--ro duid-ll-hardware-type? uint16
| | | +--ro duid-ll-link-layer-addr? yang:mac-address
| | +--:(duid-uuid)
| | | +--ro uuid? yang:uuid
| | +--:(duid-unknown)
| | +--ro data? binary
| +--ro serv-name? string
| +--ro pool-name string
+--ro invalid-client-detected
+--ro duid
| +--ro type-code? uint16
| +--ro (duid-type)?
| +--:(duid-llt)
| | +--ro duid-llt-hardware-type? uint16
| | +--ro duid-llt-time? yang:timeticks
| | +--ro duid-llt-link-layer-addr? yang:mac-address
| +--:(duid-en)
| | +--ro duid-en-enterprise-number? uint32
| | +--ro duid-en-identifier? string
| +--:(duid-ll)
| | +--ro duid-ll-hardware-type? uint16
| | +--ro duid-ll-link-layer-addr? yang:mac-address
| +--:(duid-uuid)
| | +--ro uuid? yang:uuid
| +--:(duid-unknown)
| +--ro data? binary
+--ro description? string
Figure 1: DHCPv6 Data Model Structure [RFC8415] describes the current version of the DHCPv6 base protocol
specification. In addition to this, a large number of addition
specifications have also been published, extending DHCPv6 element
functionality and adding new options. The YANG modules contained in
this document do not attempt to capture all of these extensions and
additions, rather to model the DHCPv6 functions and options covered
in [RFC8415]. A focus has also been given on the extensibility of
the modules so that it is easy to augment in additional functionality
as required by a particular implementation or deployment scenario.
Introduction of important nodes: 1.2. Extensibility of the DHCPv6 Server YANG Module
o server-config: This container contains the configuration data of a The modules in this document only attempt to model DHCPv6 specific
server. behavior and do not cover the configuration and management of
functionality relevant for specific server implementations. The
level of variance between implementations is too great to attempt to
standardize in a way that is useful without being restrictive.
o serv-attributes: This container contains basic attributes of a However, it is recognized that implementation specific configuration
DHCPv6 server such as DUID, server name and so on. Some optional and management is also an essential part of DHCP deployment and
functions that can be provided by the server is also included. operations. To resolve this, Appendix B contains an example YANG
module for the configuration of implementation specific functions,
illustrating how this functionality can be augmented into the main
ietf-dhcpv6-server.yang module.
o duid: Each server and client has only one DUID (DHCP Unique In DHCPv6 the concept of 'class selection' for messages received by
Identifier). The DUID here identifies a unique DHCPv6 server for the server is common. This is the identification and classification
clients. DUID consists of a two-octet type field and an arbitrary of messages based on a number of parameters so that the correct
length (no more than 128 bytes) content field. Currently there provisioning information can be supplied. For example, allocating a
are four defined types of DUIDs in [RFC3315] and [RFC6355] - DUID- prefix from the correct pool, or supplying a set of options relevant
LLT, DUID-EN, DUID-LL and DUID-UUID. DUID-Unknown represents for a specific vendor's client implementation. During the
those unconventional DUIDs. development of this document, research has been carried out into a
number of vendor's class selection implementations and the findings
were that while this function is common to all, the method for
implementing this differs greatly. Therefore, configuration of the
class selection function has been omitted from the DHCPv6 server
module to allow implementors to define their own suitable YANG
module. Appendix C provides an example of this, to demonstrate how
this is can be integrated with the main "ietf-dhcpv6-server.yang"
module.
o lease-storage: The server can store lease data in different 1.2.1. DHCPv6 Option Definitions
repositories, whether in a CSV file for smaller deployments or in
a database for larger deployments.
o operator-option-ipv6-address, operator-option-single-flag, A large number of DHCPv6 options have been created in addition to
operator-option-ipv6-prefix, operator-option-int32, operator- those defined in [RFC8415]. As implementations differ widely in
option-int16, operator-option-int8, operator-option-uri, operator- which DHCPv6 options that they support, the following approach has
option-textstring, operator-option-var-data, operator-option-dns- been taken to defining options: Only the relevant set of DHCPv6
wire: are generic option formats described in [RFC7227]. options defined in [RFC8415] are included in this document. Further
options definitions can be added by additional YANG modules via
augmentation into the relevant element modules from this document.
Appendix A contains an example module showing how the DHCPv6 option
definitions can be extended in this manner and provides guidance on
writing YANG modules for DHCPv6 options.
o interfaces-config: A leaf list to denote which one or more 1.3. Terminology
interfaces the server should listen on. The default value is to
listen on all the interfaces. This node is also used to set a
unicast address for the server to listen with a specific
interface. For example, if the server is being configured to
listen on a unicast address assigned to a specific interface, the
format "eth1/2001:db8::1" can be used.
o option-sets: DHCPv6 employs various options to carry additional The reader should be familiar with the YANG data modelling language
information and parameters in DHCP messages. This container defined in [RFC7950].
defines all the possible options that need to be configured at the
server side. The relevant RFCs that define those options include:
[RFC3315], [RFC3319], [RFC3646], [RFC3898], [RFC4242], [RFC4704],
[RFC4833], [RFC5908], [RFC5970], [RFC4075], [RFC6334], [RFC6784],
[RFC7078], [RFC7083], [RFC7291], [RFC7598].
o option-set: A server may allow different option sets to be The YANG modules in this document adopt the Network Management
configured for different conditions (i.e. different networks, Datastore Architecture (NMDA) [RFC8342]. The meanings of the symbols
clients and etc). This "option-set" list enables various sets of used in tree diagrams are defined in [RFC8340].
options being defined and configured in a single server.
Different sets are distinguished by the key called "option-set-
id". All the possible options discussed above are defined in the
list and each option is corresponding to a container. Since all
the options in the list are optional, each container in this list
has a 'presence' statement to indicate whether this option
(container) will be included in the current option set or not. In
addition, each container also has a 'if-feature' statement to
indicate whether the server supports this option (container).
o network-ranges: This model supports a hierarchy to achieve dynamic The reader should be familiar with the terms defined in DHCPv6
configuration. That is to say we could configure the server at [RFC8415] and other relevant documents.
different levels through this model. The top level is a global
level which is defined as the container "network-ranges". The
following levels are defined as sub-containers under it. The
"network-ranges" contains the parameters (e.g. option-sets) that
would be allocated to all the clients served by this server.
o network-range: Under the "network-ranges" container, a "network- 2. DHCPv6 Tree Diagrams
range" list is defined to configure the server at a network level
which is also considered as the second level. Different network
are identified by the key "network-range-id". This is because a
server may have different configuration parameters (e.g. option
sets) for different networks.
o address-pools: Under the "network-range" list, a container 2.1. DHCPv6 Server Tree Diagram
describes the DHCPv6 server's address pools for a specific network
is defined. This container supports the server to be configured
at a pool level.
o address-pool: A DHCPv6 server can be configured with several The tree diagram in Figure 1 provides an overview of the DHCPv6
address pools for a specific network. This list defines such server module. The tree also includes the augmentations of the
address pools which are distinguish by the key called "pool-id". relevant option definitions from Section 3.4 and the common functions
module Section 3.5.
o rapid-commit: Setting the value to 'true' represents the address/ module: ietf-dhcpv6-server
prefix pool support the Solicit-Reply message exchange. 'false' +--rw dhcpv6-node-type? identityref
means the server will simply ignore the Rapid Commit option in +--rw dhcpv6-server
Solicit message. +--rw server-duid
| +--rw type-code? uint16
| +--rw (duid-type)?
| | +--:(duid-llt)
| | | +--rw duid-llt-hardware-type? uint16
| | | +--rw duid-llt-time? yang:timeticks
| | | +--rw duid-llt-link-layer-address?
| | | yang:mac-address
| | +--:(duid-en)
| | | +--rw duid-en-enterprise-number? uint32
| | | +--rw duid-en-identifier? string
| | +--:(duid-ll)
| | | +--rw duid-ll-hardware-type? uint16
| | | +--rw duid-ll-link-layer-address?
| | | yang:mac-address
| | +--:(duid-uuid)
| | | +--rw uuid? yang:uuid
| | +--:(duid-unknown)
| | +--rw data? binary
| +--ro active-duid? binary
+--rw vendor-config
+--rw option-sets
| +--rw option-set* [option-set-id]
| +--rw option-set-id
| | uint32
| +--rw description?
| | string
| +--rw rfc3319:sip-server-domain-name-list-option
| | +--rw rfc3319:sip-serv-domain-name?
| | inet:domain-name
| +--rw rfc3319:sip-server-address-list-option
| | +--rw rfc3319:sip-server* [sip-serv-id]
| | +--rw rfc3319:sip-serv-id uint8
| | +--rw rfc3319:sip-serv-addr? inet:ipv6-address
| +--rw rfc8415:preference-option
| | +--rw rfc8415:pref-value? uint8
| +--rw rfc8415:auth-option
| | +--rw rfc8415:protocol? uint8
| | +--rw rfc8415:algorithm? uint8
| | +--rw rfc8415:rdm? uint8
| | +--rw rfc8415:replay-detection? uint64
| | +--rw rfc8415:auth-information? string
| +--rw rfc8415:server-unicast-option
| | +--rw rfc8415:server-address? inet:ipv6-address
| +--rw rfc8415:status-code-option
| | +--rw rfc8415:status-code? uint16
| | +--rw rfc8415:status-message? string
| +--rw rfc8415:rapid-commit-option!
| +--rw rfc8415:vendor-specific-information-option
| | +--rw rfc8415:vendor-specific-information-option-inst
ances*
| | [enterprise-number]
| | +--rw rfc8415:enterprise-number uint32
| | +--rw rfc8415:vendor-option-data*
| | [sub-option-code]
| | +--rw rfc8415:sub-option-code uint16
| | +--rw rfc8415:sub-option-data? string
| +--rw rfc8415:reconfigure-message-option
| | +--rw rfc8415:msg-type? uint8
| +--rw rfc8415:reconfigure-accept-option!
| +--rw rfc8415:info-refresh-time-option
| | +--rw rfc8415:info-refresh-time?
| | dhcpv6-common:timer-value-seconds32
| +--rw rfc8415:sol-max-rt-option
| | +--rw rfc8415:sol-max-rt-value?
| | dhcpv6-common:timer-value-seconds32
| +--rw rfc8415:inf-max-rt-option
| +--rw rfc8415:inf-max-rt-value?
| dhcpv6-common:timer-value-seconds32
+--rw class-selector
+--rw network-ranges
+--rw option-set-id* leafref
+--rw valid-lifetime
| dhcpv6-common:timer-value-seconds32
+--rw renew-time
| dhcpv6-common:timer-value-seconds32
+--rw rebind-time
| dhcpv6-common:timer-value-seconds32
+--rw preferred-lifetime
| dhcpv6-common:timer-value-seconds32
+--rw rapid-commit boolean
+--rw network-range* [network-range-id]
+--rw network-range-id uint32
+--rw network-description string
+--rw network-prefix inet:ipv6-prefix
+--rw option-set-id* leafref
+--rw valid-lifetime
| dhcpv6-common:timer-value-seconds32
+--rw renew-time
| dhcpv6-common:timer-value-seconds32
+--rw rebind-time
| dhcpv6-common:timer-value-seconds32
+--rw preferred-lifetime
| dhcpv6-common:timer-value-seconds32
+--rw rapid-commit boolean
+--rw address-pools
| +--rw address-pool* [pool-id]
| +--rw pool-id uint32
| +--rw pool-prefix inet:ipv6-prefix
| +--rw start-address
| | inet:ipv6-address-no-zone
| +--rw end-address
| | inet:ipv6-address-no-zone
| +--rw max-address-count
| | dhcpv6-common:threshold
| +--rw option-set-id* leafref
| +--rw valid-lifetime
| | dhcpv6-common:timer-value-seconds32
| +--rw renew-time
| | dhcpv6-common:timer-value-seconds32
| +--rw rebind-time
| | dhcpv6-common:timer-value-seconds32
| +--rw preferred-lifetime
| | dhcpv6-common:timer-value-seconds32
| +--rw rapid-commit boolean
| +--rw host-reservations
| | +--rw host-reservation* [reserved-addr]
| | +--rw client-duid? binary
| | +--rw reserved-addr
| | | inet:ipv6-address
| | +--rw prefix-reservation*
| | | [reserv-prefix-id]
| | | +--rw reserv-prefix-id uint32
| | | +--rw reserv-prefix
| | | | inet:ipv6-prefix
| | | +--rw reserv-prefix-len uint8
| | +--rw option-set-id* leafref
| | +--rw valid-lifetime
| | | dhcpv6-common:timer-value-seconds32
| | +--rw renew-time
| | | dhcpv6-common:timer-value-seconds32
| | +--rw rebind-time
| | | dhcpv6-common:timer-value-seconds32
| | +--rw preferred-lifetime
| | | dhcpv6-common:timer-value-seconds32
| | +--rw rapid-commit boolean
| +--ro active-leases* [leased-address]
| +--ro leased-address
| | inet:ipv6-address
| +--ro total-address-count uint64
| +--ro allocated-address-count uint64
| +--ro binding-info* [client-duid]
| +--ro client-duid binary
| +--ro iaid* [iaid]
| +--ro iaid uint32
| +--ro allocation-time?
| | yang:date-and-time
| +--ro last-renew-rebind?
| | yang:date-and-time
| +--ro preferred-lifetime?
| | dhcpv6-common:timer-value-seconds
32
| +--ro valid-lifetime?
| | dhcpv6-common:timer-value-seconds
32
| +--ro lease-t1?
| | dhcpv6-common:timer-value-seconds
32
| +--ro lease-t2?
| dhcpv6-common:timer-value-seconds
32
+--rw prefix-pools {prefix-delegation}?
| +--rw prefix-pool* [pool-id]
| +--rw pool-id uint32
| +--rw prefix
| | inet:ipv6-prefix
| +--rw prefix-length uint8
| +--rw max-pd-space-utilization
| | dhcpv6-common:threshold
| +--rw option-set-id* leafref
| +--rw valid-lifetime
| | dhcpv6-common:timer-value-seconds32
| +--rw renew-time
| | dhcpv6-common:timer-value-seconds32
| +--rw rebind-time
| | dhcpv6-common:timer-value-seconds32
| +--rw preferred-lifetime
| | dhcpv6-common:timer-value-seconds32
| +--rw rapid-commit boolean
| +--rw host-reservations
| +--rw prefix-reservation* [reserved-prefix]
| | +--rw client-duid? binary
| | +--rw reserved-prefix
| | | inet:ipv6-prefix
| | +--rw reserv-prefix-len uint8
| +--rw option-set-id* leafref
| +--rw valid-lifetime
| | dhcpv6-common:timer-value-seconds32
| +--rw renew-time
| | dhcpv6-common:timer-value-seconds32
| +--rw rebind-time
| | dhcpv6-common:timer-value-seconds32
| +--rw preferred-lifetime
| | dhcpv6-common:timer-value-seconds32
| +--rw rapid-commit boolean
| +--ro active-leases* [leased-prefix]
| +--ro leased-prefix
| | inet:ipv6-prefix
| +--ro total-address-count uint64
| +--ro allocated-address-count uint64
| +--ro binding-info* [client-duid]
| +--ro client-duid binary
| +--ro iaid* [iaid]
| +--ro iaid uint32
| +--ro allocation-time?
| | yang:date-and-time
| +--ro last-renew-rebind?
| | yang:date-and-time
| +--ro preferred-lifetime?
| | dhcpv6-common:timer-value-seco
nds32
| +--ro valid-lifetime?
| | dhcpv6-common:timer-value-seco
nds32
| +--ro lease-t1?
| | dhcpv6-common:timer-value-seco
nds32
| +--ro lease-t2?
| dhcpv6-common:timer-value-seco
nds32
+--ro solicit-count? uint32
+--ro advertise-count? uint32
+--ro request-count? uint32
+--ro confirm-count? uint32
+--ro renew-count? uint32
+--ro rebind-count? uint32
+--ro reply-count? uint32
+--rw release-count? uint32
+--ro decline-count? uint32
+--ro reconfigure-count? uint32
+--ro information-request-count? uint32
o client-class: If this is instantiated, the address/pd pool will notifications:
only serve the clients belonging to this class. +---n address-pool-running-out
| +--ro total-address-count uint64
| +--ro max-address-count uint64
| +--ro allocated-address-count uint64
| +--ro pool-id uint32
+---n pd-pool-running-out
| +--ro max-pd-space-utilization dhcpv6-common:threshold
| +--ro pd-space-utilization dhcpv6-common:threshold
| +--ro pool-id uint32
+---n invalid-client-detected
| +--ro duid? binary
| +--ro description? string
+---n decline-received
| +--ro duid? binary
| +--ro addresses* inet:ipv6-address
+---n non-success-code-sent
+--ro status-code uint16
+--ro duid? binary
o max-address-count: Maximum count of addresses that can be Figure 1: DHCPv6 Server Data Model Structure
allocated in this pool. This value may be less than count of
total addresses in this pool.
o prefix-pools: If a server supports prefix delegation function, Description of important nodes:
this container under the "network-range" list will be valid to
define the delegating router's prefix pools for a specific
network. This container also supports the server to be configured
at a pool level.
o prefix-pool: Similar to server's address pools, a delegating * dhcpv6-node-type: The different functional DHCPv6 elements each
router can also be configured with multiple prefix pools specified have their relevant identities.
by a list called "prefix-pool".
o max-pd-space-utilization: Maximum utilization of pd space in this * dhcpv6-server: This container holds the server's DHCPv6 specific
pool. configuration.
o host-reservations: This container allows the server to make * server-duid: Each server must have a DUID (DHCP Unique Identifier)
reservations at host level. to identify itself to clients. A DUID consists of a two-octet
type field and an arbitrary length (of no more than 128-bytes)
content field. Currently there are four defined types of DUIDs in
[RFC8415] and [RFC6355]: DUID-LLT, DUID-EN, DUID-LL, and DUID-
UUID. DUID-Unknown is used for arbitrary DUID formats which do
not follow any of these defined types. 'active-duid' is a read-
only field that the server's current DUID can be retrieved from.
The DUID definitions are imported from the 'ietf-
dhcpv6-common.yang' module as they are also used by the 'ietf-
dhcpv6-client.yang' module.
o host-reservation: This list allows the server to reserve * vendor-config: This container is provided as a location for
addresses, prefixes, hostname and options for different clients. additional implementation specific YANG nodes for the
A server may reserve multiple addresses and prefixes for a single configuration of the device to be augmented. See Appendix B for
client. an example of this.
o relay-opaque-params: This container contains some opaque values in * option-sets: The server can be configured with multiple option-
Relay Agent options that need to be configured on the server side sets. These are groups of DHCPv6 options with common parameters
only for value match. Such Relay Agent options include Interface- which will be supplied to the intended clients. The 'option-set-
Id option, Remote-Id option and Subscriber-Id option. id' field is the key field which is referenced by the relevant
address or prefix pool configuration.
o rsoo-enabled-options: [RFC6422] requires that the server SHOULD * option-set: Holds definitions for DHCPv6 options themselves. The
have an administrator-configurable list of RSOO-enabled options. initial set of definitions are contained in the module 'ietf-
This container include a list called "rsoo-enabled-option" to dhcpv6-options-rfc8415.yang' and are augmented into the server
allow new RSOO-enabled options to be defined at the server side. module at this point.
o server-state: This container includes the state data of a server. * class-selector: This is provided as a location for additional
implementation specific YANG nodes for vendor specific class
selector nodes to be augmented. See Appendix C for an example of
this.
o binding-info: A list records a static binding information for each * network-ranges: This model uses a hierarchical model for the
DHCPv6 client that has already been assigned IPv6 addresses/ allocation of addresses and prefixes. At the top level 'network-
prefixes that are dynamically allocated and reserved in advance. ranges' holds global configuration parameters. Under this, a list
of 'network-ranges' can be defined. Inside 'network-rages',
'address-pools' (for IA_NA and IA_TA allocations), and 'prefix-
pools' (for IA_PD allocation) are defined. Finally within the
pools, specific host-reservations are held.
o packet-stats: A container presents the packet statistics related * prefix-pools: Defines prefix pools to be used for prefix
to the DHCPv6 server. delegation to clients. As prefix delegation is not supported by
all DHCPv6 server implementations, it is enabled by a feature
statement.
Information about notifications: Information about notifications:
o address/pd-pool-running-out: raised when the address/prefix pool * address/pd-pool-running-out: Raised when the address/prefix pool
is going to run out. A threshold for utilization ratio of the is going to run out. A threshold for the utilization ratio of the
pool (max-address-count/max-pd-space utilization) has been defined pool (max-address-count/max-pd-space utilization) has been defined
in the server feature so that it will notify the administrator in the server features so that it will notify the administrator
when the utilization ratio reaches the threshold, and such when the utilization ratio reaches the threshold, and such
threshold is a settable parameter. threshold is a settable parameter.
o invalid-client-detected: raised when the server has found a client * invalid-client-detected: Raised when the server has found a client
which can be regarded as a potential attacker. Some description which can be regarded as a potential attacker. A description may
could also be included. also be included.
2.2. DHCPv6 Relay Tree Diagrams
module: ietf-dhcpv6-relay
+--rw relay!
+--rw relay-config
| +--rw relay-attributes
| | +--rw name? string
| | +--rw description? string
| | +--rw dest-addrs* inet:ipv6-address
| | +--rw subscribers* [subscriber]
| | | +--rw subscriber uint8
| | | +--rw subscriber-id string
| | +--rw remote-host* [ent-num]
| | | +--rw ent-num uint32
| | | +--rw remote-id string
| | +--rw vendor-info
| | +--rw ent-num uint32
| | +--rw data* string
| +--rw rsoo-option-sets
| | +--rw option-set* [option-set-id]
| | +--rw option-set-id uint32
| | +--rw erp-local-domain-name-option!
{erp-local-domain-name-op}?
| | +--rw erp-for-client* [cli-id]
| | +--rw cli-id uint32
| | +--rw duid
| | | +--rw type-code? uint16
| | | +--rw (duid-type)?
| | | +--:(duid-llt)
| | | | +--rw duid-llt-hardware-type? uint16
| | | | +--rw duid-llt-time? yang:timeticks
| | | | +--rw duid-llt-link-layer-addr?
yang:mac-address
| | | +--:(duid-en)
| | | | +--rw duid-en-enterprise-number? uint32
| | | | +--rw duid-en-identifier? string
| | | +--:(duid-ll)
| | | | +--rw duid-ll-hardware-type? uint16
| | | | +--rw duid-ll-link-layer-addr?
yang:mac-address
| | | +--:(duid-uuid)
| | | | +--rw uuid? yang:uuid
| | | +--:(duid-unknown)
| | | +--rw data? binary
| | +--rw erp-name string
| +--rw relay-if* [if-name]
| +--rw if-name if:interface-ref
| +--rw interface-id? string
| +--rw ipv6-address? inet:ipv6-address
| +--rw rsoo-option-set-id?
-> /relay/relay-config/rsoo-option-sets/option-set/option-set-id
| +--rw next-entity* [dest-addr]
| +--rw dest-addr inet:ipv6-address
| +--rw available boolean
| +--rw multicast boolean
| +--rw server boolean
+--ro relay-state
+--ro relay-if* [if-name]
| +--ro if-name string
| +--ro pd-route* [pd-route-id]
| | +--ro pd-route-id uint8
| | +--ro requesting-router-id uint32
| | +--ro delegating-router-id uint32
| | +--ro next-router inet:ipv6-address
| | +--ro last-router inet:ipv6-address
| +--ro next-entity* [dest-addr]
| +--ro dest-addr inet:ipv6-address
| +--ro packet-stats
| +--ro solicit-rvd-count uint32
| +--ro request-rvd-count uint32
| +--ro renew-rvd-count uint32
| +--ro rebind-rvd-count uint32
| +--ro decline-rvd-count uint32
| +--ro release-rvd-count uint32
| +--ro info-req-rvd-count uint32
| +--ro relay-for-rvd-count uint32
| +--ro relay-rep-rvd-count uint32
| +--ro packet-to-cli-count uint32
| +--ro adver-sent-count uint32
| +--ro confirm-sent-count uint32
| +--ro reply-sent-count uint32
| +--ro reconfig-sent-count uint32
| +--ro relay-for-sent-count uint32
| +--ro relay-rep-sent-count uint32
+--ro relay-stats
+--ro cli-packet-rvd-count uint32
+--ro relay-for-rvd-count uint32
+--ro relay-rep-rvd-count uint32
+--ro packet-to-cli-count uint32
+--ro relay-for-sent-count uint32
+--ro relay-rep-sent-count uint32
+--ro discarded-packet-count uint32
notifications: * decline-received: Raised when a DHCPv6 Decline message is received
+---n notifications from a client.
+--ro dhcpv6-relay-event
+--ro topo-changed
+--ro relay-if-name string
+--ro first-hop boolean
+--ro last-entity-addr inet:ipv6-address
Introduction of important nodes: * non-success-code-sent: Raised when a status message is raised for
an error.
o relay-config: This container contains the configuration data of 2.2. DHCPv6 Relay Tree Diagram
the relay.
o relay-attributes: A container describes some basic attributes of The tree diagram in Figure 2 provides an overview of the DHCPv6 relay
the relay agent including some relay agent specific options data module. The tree also includes the augmentations of the relevant
that need to be configured previously. Such options include option definitions from Section 3.4 and the common functions module
Remote-Id option and Subscriber-Id option. Section 3.5.
o dest-addrs: Each DHCPv6 relay agent may be configured with a list module: ietf-dhcpv6-relay
of destination addresses. This node defines such a list of IPv6 +--rw dhcpv6-node-type? identityref
addresses that may include unicast addresses, multicast addresses +--rw dhcpv6-relay
or other addresses. +--rw relay-if* [if-name]
| +--rw if-name
| | if:interface-ref
| +--rw destination-addresses*
| | inet:ipv6-address
| +--rw link-address? binary
| +--rw relay-options
| | +--rw rfc8415:auth-option
| | | +--rw rfc8415:protocol? uint8
| | | +--rw rfc8415:algorithm? uint8
| | | +--rw rfc8415:rdm? uint8
| | | +--rw rfc8415:replay-detection? uint64
| | | +--rw rfc8415:auth-information? string
| | +--rw rfc8415:status-code-option
| | | +--rw rfc8415:status-code? uint16
| | | +--rw rfc8415:status-message? string
| | +--rw rfc8415:interface-id-option
| | +--rw rfc8415:interface-id? string
| +--ro solicit-received-count? uint32
| +--ro advertise-sent-count? uint32
| +--ro request-received-count? uint32
| +--ro confirm-received-count? uint32
| +--ro renew-received-count? uint32
| +--ro rebind-received-count? uint32
| +--ro reply-sent-count? uint32
| +--ro release-received-count? uint32
| +--ro decline-received-count? uint32
| +--ro reconfigure-sent-count? uint32
| +--ro information-request-received-count? uint32
| +--ro unknown-message-received-count? uint32
| +--ro unknown-message-sent-count? uint32
| +--ro discarded-message-count? uint32
| +--rw prefix-delegation! {prefix-delegation}?
| +--ro pd-leases* [ia-pd-prefix]
| +--ro ia-pd-prefix inet:ipv6-prefix
| +--ro last-renew? yang:date-and-time
| +--ro client-peer-address? inet:ipv6-address
| +--ro client-duid? binary
| +--ro server-duid? binary
+--ro relay-forward-sent-count? uint32
+--ro relay-forward-received-count? uint32
+--ro relay-reply-received-count? uint32
+--ro relay-forward-unknown-sent-count? uint32
+--ro relay-forward-unknown-received-count? uint32
+--ro discarded-message-count? uint32
o rsoo-options-sets: DHCPv6 relay agent could provide some notifications:
information that would be useful to DHCPv6 client. Since relay +---n relay-event
agent cannot provide options directly to the client, [RFC6422] +--ro topology-change
defines RSOO-enabled options to propose options for the server to +--ro relay-if-name?
send to the client. This container models such RSOO-enabled | -> /dhcpv6-relay/relay-if/if-name
options. +--ro last-ipv6-addr? inet:ipv6-address
o option-set: This list under the "rsoo-option-sets" container is Figure 2: DHCPv6 Relay Data Model Structure
similar to the that defined in server module. It allows the relay
to implement several sets of RSOO-enabled options for different
interfaces. The list only include the EAP Re-authentication
Protocol (ERP) Local Domain Name DHCPv6 Option defined in
[RFC6440], since it is the only one RSOO-enabled options accepted
by IANA so far.
o relay-if: A relay agent may have several interfaces, we should Description of important nodes:
provide a way to configure and manage parameters on the interface-
level. A list that describes specific interfaces and their
corresponding parameters is employed to fulfill the configuration.
Here we use a string called "if-name" as the key of list.
o relay-state: This container contains the configuration data of the * dhcpv6-node-type: The different functional DHCPv6 elements each
relay. have their relevant identities.
o pd-route: A sub-container of "relay-if" which describes the route * dhcpv6-relay: This container holds the relay's DHCPv6 specific
for delegated prefixes into the provider edge router. configuration.
o next-entity: This node defines a list that is used to describe the * relay-if: As a relay may have multiple client-facing interfaces,
next hop entity of this relay agent. Different entities are they are configured in a list. The if-name leaf is the key and is
distinguished by their addresses. an interface-ref to the applicable interface defined by the 'ietf-
interfaces' YANG module.
o packet-stats: A container shows packet state information of a * destination-addresses: Defines a list of IPv6 addresses that
specific data communication. client messages will be relayed to. May include unicast or
multicast addresses.
o relay-stats: The "relay-stats" container records and presents the * link-address: Allows the configuration of the value that the relay
overall packet statistics of the relay agent. will put into the link-address field of Relay-Forward messages.
Information about notifications: * prefix-delegation: As prefix delegation is not supported by all
DHCPv6 relay implementations, it is enabled by this feature
statement where required.
o topo-changed: raised when the topology of the relay agent is * pd-leases: Contains read only nodes for holding information about
changed. active delegated prefix leases.
2.3. DHCPv6 Client Tree Diagrams * relay-options: As with the Server module, DHCPv6 options that can
be sent by the relay are augmented here.
module: ietf-dhcpv6-client Information about notifications:
+--rw client!
+--rw client-config
| +--rw duid
| | +--rw type-code? uint16
| | +--rw (duid-type)?
| | +--:(duid-llt)
| | | +--rw duid-llt-hardware-type? uint16
| | | +--rw duid-llt-time? yang:timeticks
| | | +--rw duid-llt-link-layer-addr? yang:mac-address
| | +--:(duid-en)
| | | +--rw duid-en-enterprise-number? uint32
| | | +--rw duid-en-identifier? string
| | +--:(duid-ll)
| | | +--rw duid-ll-hardware-type? uint16
| | | +--rw duid-ll-link-layer-addr? yang:mac-address
| | +--:(duid-uuid)
| | | +--rw uuid? yang:uuid
| | +--:(duid-unknown)
| | +--rw data? binary
| +--rw client-if* [if-name]
| +--rw if-name if:interface-ref
| +--rw cli-id uint32
| +--rw pd-function boolean
| +--rw rapid-commit boolean
| +--rw client-configured-options
| +--rw new-or-standard-cli-option* [option-code]
| | +--rw option-code uint16
| | +--rw option-name string
| | +--rw option-description string
| | +--rw option-reference? string
| | +--rw option-value string
| +--rw option-request-option! {option-request-op}?
| | +--rw oro-option* [option-code]
| | +--rw option-code uint16
| | +--rw description string
| +--rw user-class-option! {user-class-op}?
| | +--rw user-class* [user-class-id]
| | +--rw user-class-id uint8
| | +--rw user-class-data string
| +--rw vendor-class-option! {vendor-class-op}?
| | +--rw enterprise-number uint32
| | +--rw vendor-class* [vendor-class-id]
| | +--rw vendor-class-id uint8
| | +--rw vendor-class-data string
| +--rw client-fqdn-option! {client-fqdn-op}?
| | +--rw fqdn string
| | +--rw server-initiate-update boolean
| | +--rw client-initiate-update boolean
| +--rw client-arch-type-option! {client-arch-type-op}?
| | +--rw architecture-types* [type-id]
| | +--rw type-id uint16
| | +--rw most-preferred boolean
| +--rw client-network-interface-identifier-option!
{client-network-interface-identifier-op}?
| | +--rw type uint8
| | +--rw major uint8
| | +--rw minor uint8
| +--rw kbr-principal-name-option! {kbr-principal-name-op}?
| | +--rw principle-name* [principle-name-id]
| | +--rw principle-name-id uint8
| | +--rw name-type int32
| | +--rw name-string string
| +--rw kbr-realm-name-option! {kbr-realm-name-op}?
| | +--rw realm-name string
| +--rw client-link-layer-addr-option!
{client-link-layer-addr-op}?
| +--rw link-layer-type uint16
| +--rw link-layer-addr string
+--ro client-state
+--ro if-other-params
| +--ro server-unicast-option! {server-unicast-op}?
| | +--ro server-address? inet:ipv6-address
| +--ro sip-server-domain-name-list-option!
{sip-server-domain-name-list-op}?
| | +--ro sip-serv-domain-name string
| +--ro sip-server-address-list-option!
{sip-server-address-list-op}?
| | +--ro sip-server* [sip-serv-id]
| | +--ro sip-serv-id uint8
| | +--ro sip-serv-addr inet:ipv6-address
| +--ro dns-servers-option! {dns-servers-op}?
| | +--ro dns-server* [dns-serv-id]
| | +--ro dns-serv-id uint8
| | +--ro dns-serv-addr inet:ipv6-address
| +--ro domain-searchlist-option! {domain-searchlist-op}?
| | +--ro domain-searchlist* [domain-searchlist-id]
| | +--ro domain-searchlist-id uint8
| | +--ro domain-search-list-entry string
| +--ro nis-config-option! {nis-config-op}?
| | +--ro nis-server* [nis-serv-id]
| | +--ro nis-serv-id uint8
| | +--ro nis-serv-addr inet:ipv6-address
| +--ro nis-plus-config-option! {nis-plus-config-op}?
| | +--ro nis-plus-server* [nis-plus-serv-id]
| | +--ro nis-plus-serv-id uint8
| | +--ro nis-plus-serv-addr inet:ipv6-address
| +--ro nis-domain-name-option! {nis-domain-name-op}?
| | +--ro nis-domain-name? string
| +--ro nis-plus-domain-name-option! {nis-plus-domain-name-op}?
| | +--ro nis-plus-domain-name? string
| +--ro sntp-server-option! {sntp-server-op}?
| | +--ro sntp-server* [sntp-serv-id]
| | +--ro sntp-serv-id uint8
| | +--ro sntp-serv-addr inet:ipv6-address
| +--ro info-refresh-time-option! {info-refresh-time-op}?
| | +--ro info-refresh-time yang:timeticks
| +--ro client-fqdn-option! {client-fqdn-op}?
| | +--ro server-initiate-update boolean
| | +--ro client-initiate-update boolean
| | +--ro modify-name-from-cli boolean
| +--ro posix-timezone-option! {posix-timezone-op}?
| | +--ro tz-posix string
| +--ro tzdb-timezone-option! {tzdb-timezone-op}?
| | +--ro tz-database string
| +--ro ntp-server-option! {ntp-server-op}?
| | +--ro ntp-server* [ntp-serv-id]
| | +--ro ntp-serv-id uint8
| | +--ro (ntp-time-source-suboption)?
| | +--:(server-address)
| | | +--ro ntp-serv-addr-suboption* inet:ipv6-address
| | +--:(server-multicast-address)
| | | +--ro ntp-serv-mul-addr-suboption*
inet:ipv6-address
| | +--:(server-fqdn)
| | +--ro ntp-serv-fqdn-suboption* string
| +--ro boot-file-url-option! {boot-file-url-op}?
| | +--ro boot-file* [boot-file-id]
| | +--ro boot-file-id uint8
| | +--ro suitable-arch-type* uint16
| | +--ro suitable-net-if* uint32
| | +--ro boot-file-url string
| +--ro boot-file-param-option! {boot-file-param-op}?
| | +--ro boot-file-params* [param-id]
| | +--ro param-id uint8
| | +--ro parameter string
| +--ro aftr-name-option! {aftr-name-op}?
| | +--ro tunnel-endpoint-name string
| +--ro kbr-default-name-option! {kbr-default-name-op}?
| | +--ro default-realm-name string
| +--ro kbr-kdc-option! {kbr-kdc-op}?
| | +--ro kdc-info* [kdc-id]
| | +--ro kdc-id uint8
| | +--ro priority uint16
| | +--ro weight uint16
| | +--ro transport-type uint8
| | +--ro port-number uint16
| | +--ro kdc-ipv6-addr inet:ipv6-address
| | +--ro realm-name string
| +--ro sol-max-rt-option! {sol-max-rt-op}?
| | +--ro sol-max-rt-value yang:timeticks
| +--ro inf-max-rt-option! {inf-max-rt-op}?
| | +--ro inf-max-rt-value yang:timeticks
| +--ro addr-selection-option! {addr-selection-op}?
| | +--ro a-bit-set boolean
| | +--ro p-bit-set boolean
| | +--ro policy-table* [policy-id]
| | +--ro policy-id uint8
| | +--ro label uint8
| | +--ro precedence uint8
| | +--ro prefix-len uint8
| | +--ro prefix inet:ipv6-prefix
| +--ro pcp-server-option! {pcp-server-op}?
| | +--ro pcp-server* [pcp-serv-id]
| | +--ro pcp-serv-id uint8
| | +--ro pcp-serv-addr inet:ipv6-address
| +--ro s46-rule-option! {s46-rule-op}?
| | +--ro s46-rule* [rule-id]
| | +--ro rule-id uint8
| | +--ro rule-type enumeration
| | +--ro prefix4-len uint8
| | +--ro ipv4-prefix inet:ipv4-prefix
| | +--ro prefix6-len uint8
| | +--ro ipv6-prefix inet:ipv6-prefix
| | +--ro port-parameter
| | +--ro offset uint8
| | +--ro psid-len uint8
| | +--ro psid uint16
| +--ro s46-br-option! {s46-br-op}?
| | +--ro br* [br-id]
| | +--ro br-id uint8
| | +--ro br-ipv6-addr inet:ipv6-address
| +--ro s46-dmr-option! {s46-dmr-op}?
| | +--ro dmr* [dmr-id]
| | +--ro dmr-id uint8
| | +--ro dmr-prefix-len uint8
| | +--ro dmr-ipv6-prefix inet:ipv6-prefix
| +--ro s46-v4-v6-binding-option! {s46-v4-v6-binding-op}?
| +--ro ce* [ce-id]
| +--ro ce-id uint8
| +--ro ipv4-addr inet:ipv4-address
| +--ro bind-prefix6-len uint8
| +--ro bind-ipv6-prefix inet:ipv6-prefix
| +--ro port-parameter
| +--ro offset uint8
| +--ro psid-len uint8
| +--ro psid uint16
+--ro packet-stats
+--ro solicit-count uint32
+--ro request-count uint32
+--ro renew-count uint32
+--ro rebind-count uint32
+--ro decline-count uint32
+--ro release-count uint32
+--ro info-req-count uint32
+--ro advertise-count uint32
+--ro confirm-count uint32
+--ro reply-count uint32
+--ro reconfigure-count uint32
notifications: * topology-changed: Raised when the topology of the relay agent is
+---n notifications changed, e.g. a client facing interface is reconfigured.
+--ro dhcpv6-client-event
+--ro ia-lease-event
| +--ro event-type enumeration
| +--ro duid
| | +--ro type-code? uint16
| | +--ro (duid-type)?
| | +--:(duid-llt)
| | | +--ro duid-llt-hardware-type? uint16
| | | +--ro duid-llt-time? yang:timeticks
| | | +--ro duid-llt-link-layer-addr? yang:mac-address
| | +--:(duid-en)
| | | +--ro duid-en-enterprise-number? uint32
| | | +--ro duid-en-identifier? string
| | +--:(duid-ll)
| | | +--ro duid-ll-hardware-type? uint16
| | | +--ro duid-ll-link-layer-addr? yang:mac-address
| | +--:(duid-uuid)
| | | +--ro uuid? yang:uuid
| | +--:(duid-unknown)
| | +--ro data? binary
| +--ro iaid uint32
| +--ro serv-name? string
| +--ro description? string
+--ro invalid-ia-detected
| +--ro duid
| | +--ro type-code? uint16
| | +--ro (duid-type)?
| | +--:(duid-llt)
| | | +--ro duid-llt-hardware-type? uint16
| | | +--ro duid-llt-time? yang:timeticks
| | | +--ro duid-llt-link-layer-addr? yang:mac-address
| | +--:(duid-en)
| | | +--ro duid-en-enterprise-number? uint32
| | | +--ro duid-en-identifier? string
| | +--:(duid-ll)
| | | +--ro duid-ll-hardware-type? uint16
| | | +--ro duid-ll-link-layer-addr? yang:mac-address
| | +--:(duid-uuid)
| | | +--ro uuid? yang:uuid
| | +--:(duid-unknown)
| | +--ro data? binary
| +--ro cli-duid uint32
| +--ro iaid uint32
| +--ro serv-name? string
| +--ro description? string
+--ro retransmission-failed
| +--ro duid
| | +--ro type-code? uint16
| | +--ro (duid-type)?
| | +--:(duid-llt)
| | | +--ro duid-llt-hardware-type? uint16
| | | +--ro duid-llt-time? yang:timeticks
| | | +--ro duid-llt-link-layer-addr? yang:mac-address
| | +--:(duid-en)
| | | +--ro duid-en-enterprise-number? uint32
| | | +--ro duid-en-identifier? string
| | +--:(duid-ll)
| | | +--ro duid-ll-hardware-type? uint16
| | | +--ro duid-ll-link-layer-addr? yang:mac-address
| | +--:(duid-uuid)
| | | +--ro uuid? yang:uuid
| | +--:(duid-unknown)
| | +--ro data? binary
| +--ro description enumeration
+--ro failed-status-turn-up
+--ro duid
| +--ro type-code? uint16
| +--ro (duid-type)?
| +--:(duid-llt)
| | +--ro duid-llt-hardware-type? uint16
| | +--ro duid-llt-time? yang:timeticks
| | +--ro duid-llt-link-layer-addr? yang:mac-address
| +--:(duid-en)
| | +--ro duid-en-enterprise-number? uint32
| | +--ro duid-en-identifier? string
| +--:(duid-ll)
| | +--ro duid-ll-hardware-type? uint16
| | +--ro duid-ll-link-layer-addr? yang:mac-address
| +--:(duid-uuid)
| | +--ro uuid? yang:uuid
| +--:(duid-unknown)
| +--ro data? binary
+--ro status-code enumeration
Introduction of important nodes: 2.3. DHCPv6 Client Tree Diagram
o client-config: This container includes the configuration data of The tree diagram in Figure 3 provides an overview of the DHCPv6
the client. client module. The tree also includes the augmentations of the
relevant option definitions from Section 3.4 and the common functions
module Section 3.5.
o duid: Each server and client has only one DUID (DHCP Unique module: ietf-dhcpv6-client
Identifier). The DUID here will be carried in the Client ID +--rw dhcpv6-node-type? identityref
option to identify a specific DHCPv6 client. This leaf are same +--rw dhcpv6-client
as the "duid" leaf in "dhcpv6-server" feature. +--rw client-if* [if-name]
+--rw if-name
| if:interface-ref
+--rw type-code? uint16
+--rw (duid-type)?
| +--:(duid-llt)
| | +--rw duid-llt-hardware-type? uint16
| | +--rw duid-llt-time? yang:timeticks
| | +--rw duid-llt-link-layer-address?
| | yang:mac-address
| +--:(duid-en)
| | +--rw duid-en-enterprise-number? uint32
| | +--rw duid-en-identifier? string
| +--:(duid-ll)
| | +--rw duid-ll-hardware-type? uint16
| | +--rw duid-ll-link-layer-address?
| | yang:mac-address
| +--:(duid-uuid)
| | +--rw uuid? yang:uuid
| +--:(duid-unknown)
| +--rw data? binary
+--ro active-duid? binary
+--rw client-configured-options
| +--rw rfc8415:option-request-option
| | +--rw rfc8415:oro-option* uint16
| +--rw rfc8415:status-code-option
| | +--rw rfc8415:status-code? uint16
| | +--rw rfc8415:status-message? string
| +--rw rfc8415:rapid-commit-option!
| +--rw rfc8415:user-class-option
| | +--rw rfc8415:user-class-data*
| | [user-class-datum-id]
| | +--rw rfc8415:user-class-datum-id uint8
| | +--rw rfc8415:user-class-datum? string
| +--rw rfc8415:vendor-class-option
| | +--rw rfc8415:vendor-class-option-instances*
| | [enterprise-number]
| | +--rw rfc8415:enterprise-number uint32
| | +--rw rfc8415:vendor-class*
| | [vendor-class-datum-id]
| | +--rw rfc8415:vendor-class-datum-id uint8
| | +--rw rfc8415:vendor-class-datum? string
| +--rw rfc8415:vendor-specific-information-option
| | +--rw rfc8415:vendor-specific-information-option-inst
ances*
| | [enterprise-number]
| | +--rw rfc8415:enterprise-number uint32
| | +--rw rfc8415:vendor-option-data*
| | [sub-option-code]
| | +--rw rfc8415:sub-option-code uint16
| | +--rw rfc8415:sub-option-data? string
| +--rw rfc8415:reconfigure-accept-option!
+--rw ia-na* [iaid]
| +--rw iaid uint32
| +--rw ia-na-options
| +--ro lease-state
| +--ro ia-na-address? inet:ipv6-address
| +--ro preferred-lifetime?
| | dhcpv6-common:timer-value-seconds32
| +--ro valid-lifetime?
| | dhcpv6-common:timer-value-seconds32
| +--ro lease-t1?
| | dhcpv6-common:timer-value-seconds32
| +--ro lease-t2?
| | dhcpv6-common:timer-value-seconds32
| +--ro allocation-time? yang:date-and-time
| +--ro last-renew-rebind? yang:date-and-time
| +--ro server-duid? binary
+--rw ia-ta* [iaid]
| +--rw iaid uint32
| +--rw ia-ta-options
| +--ro lease-state
| +--ro ia-ta-address? inet:ipv6-address
| +--ro preferred-lifetime?
| | dhcpv6-common:timer-value-seconds32
| +--ro valid-lifetime?
| | dhcpv6-common:timer-value-seconds32
| +--ro allocation-time? yang:date-and-time
| +--ro last-renew-rebind? yang:date-and-time
| +--ro server-duid? binary
+--rw ia-pd* [iaid]
| +--rw iaid uint32
| +--rw ia-pd-options
| +--ro lease-state
| +--ro ia-pd-prefix? inet:ipv6-prefix
| +--ro preferred-lifetime?
| | dhcpv6-common:timer-value-seconds32
| +--ro valid-lifetime?
| | dhcpv6-common:timer-value-seconds32
| +--ro lease-t1?
| | dhcpv6-common:timer-value-seconds32
| +--ro lease-t2?
| | dhcpv6-common:timer-value-seconds32
| +--ro allocation-time? yang:date-and-time
| +--ro last-renew-rebind? yang:date-and-time
| +--ro server-duid? binary
+--ro solicit-count? uint32
+--ro advertise-count? uint32
+--ro request-count? uint32
+--ro confirm-count? uint32
+--ro renew-count? uint32
+--ro rebind-count? uint32
+--ro reply-count? uint32
+--rw release-count? uint32
+--ro decline-count? uint32
+--ro reconfigure-count? uint32
+--ro information-request-count? uint32
o client-if: A client may have several interfaces, it is more notifications:
reasonable to configure and manage parameters on the interface- +---n invalid-ia-detected
level. The list defines a specific client interface and its data. | +--ro iaid uint32
Different interfaces are distinguished by the "ifName" key which | +--ro description? string
is a configurable string value. +---n retransmission-failed
| +--ro failure-type enumeration
+---n unsuccessful-status-code
| +--ro status-code uint16
| +--ro server-duid binary
+---n server-duid-changed
+--ro new-server-duid binary
+--ro previous-server-duid binary
+--ro lease-ia-na?
| -> /dhcpv6-client/client-if/ia-na/iaid
+--ro lease-ia-ta?
| -> /dhcpv6-client/client-if/ia-ta/iaid
+--ro lease-ia-pd?
-> /dhcpv6-client/client-if/ia-pd/iaid
o pd-function: Whether the client can act as a requesting router to Figure 3: DHCPv6 Client Data Model Structure
request prefixes using prefix delegation ([RFC3633]).
o rapid-commit: 'true' indicates a client can initiate a Solicit- Description of important nodes:
Reply message exchange by adding a Rapid Commit option in Solicit
message. 'false' means the client is not allowed to add a Rapid
Commit option to request addresses in a two-message exchange
pattern.
o client-configured-options: Similar to the server, the client also * dhcpv6-node-type: The different functional DHCPv6 elements each
need to configure some options to fulfill some desired functions. have their relevant identities.
This container include all the potential options that need to be
configured at the client side. The relevant RFCs that define
those options include: [RFC3315], [RFC4704], [RFC5970], [RFC6784],
[RFC6939].
o option-request-option: This container provide a way to configure * dhcpv6-client: This container holds the client's DHCPv6 specific
the list of options that the client will request in its ORO configuration.
option.
o client-state: This container includes the state data of the * client-if: As a client may have multiple interfaces requesting
client. configuration over DHCP, they are configured in a list. The if-
name leaf is the key and is an interface-ref to the applicable
interface defined by the 'ietf-interfaces' YANG module.
o if-other-params: A client can obtain extra configuration data * client-duid: Each DHCP client must have a DUID (DHCP Unique
other than address and prefix information through DHCPv6 options. Identifier) to identify itself to clients. A DUID consists of a
This container describes such data the client was configured two-octet type field and an arbitrary length (of no more than
through DHCPv6. The potential configuration data may include DNS 128-bytes) content field. Currently there are four defined types
server parameters, SIP server parameters and etc. of DUIDs in [RFC8415]: DUID-LLT, DUID-EN, DUID-LL, and DUID-UUID.
DUID-Unknown is used for arbitrary DUID formats which do not
follow any of these defined types. 'active-duid' is a read-only
field that the client's current DUID can be retrieved from. The
DUID definitions are imported from the 'ietf-dhcpv6-common.yang'
module. DUID is configured under the 'client-if' to allow a
client to have different DUIDs for each interface if required.
o packet-stats: A container records all the packet status * ia-na, ia-ta, ia-pd: Contains configuration nodes relevant for
information of a specific interface. requesting one or more of each of the lease types. Also contains
read only nodes related to active leases.
Information about notifications: Information about notifications:
o ia-lease-event: raised when the client was allocated a new IA from * invalid-ia-detected: Raised when the identity association of the
the server or it renew/rebind/release its current IA.
o invalid-ia-detected: raised when the identity association of the
client can be proved to be invalid. Possible condition includes client can be proved to be invalid. Possible condition includes
duplicated address, illegal address, etc. duplicated address, illegal address, etc.
o retransmission-failed: raised when the retransmission mechanism * retransmission-failed: Raised when the retransmission mechanism
defined in [RFC3315] is failed. defined in [RFC8415] is failed.
o failed-status-turn-up: raised when the client receives a message * failed-status-turn-up: Raised when the client receives a message
includes an unsuccessful Status Code option. includes an unsuccessful Status Code option.
3. DHCPv6 YANG Model 3. DHCPv6 YANG Model
3.1. DHCPv6 Server YANG Model 3.1. DHCPv6 Server YANG Model
This module imports typedefs from [RFC6991], [RFC7223]. This module imports typedefs from [RFC6991], [RFC8343].
<CODE BEGINS> file "ietf-dhcpv6-server.yang"
module ietf-dhcpv6-server {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-server";
prefix "dhcpv6-server";
import ietf-inet-types {
prefix inet;
}
import ietf-yang-types {
prefix yang;
}
import ietf-dhcpv6-options {
prefix dhcpv6-options;
}
import ietf-dhcpv6-types {
prefix dhcpv6-types;
}
import ietf-interfaces {
prefix if;
}
organization "DHC WG";
contact
"cuiyong@tsinghua.edu.cn
lh.sunlinh@gmail.com
ian.farrer@telekom.de
sladjana.zechlin@telekom.de
hezihao9512@gmail.com";
description "This model defines a YANG data model that can be
used to configure and manage a DHCPv6 server.";
revision 2018-09-04 {
description "";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
revision 2018-03-04 {
description "Resolved most issues on the DHC official
github";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
revision 2017-12-22 {
description "Resolve most issues on Ian's github.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
revision 2017-11-24 {
description "First version of the separated server specific
YANG model.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
/*
* Typedef
*/
typedef threshold {
type union {
type uint16 {
range 0..100;
}
type enumeration {
enum "disabled" {
description "No threshold";
}
}
}
description "Threshold value in percent";
}
/*
* Data Nodes
*/
container server {
presence "Enables the server";
description "DHCPv6 server portion";
/*
* Configuration data
*/
container server-config {
description "This container contains the configuration data
of a server.";
container serv-attributes {
description
"This container contains basic attributes of a DHCPv6 server
such as IPv6 address, server name and so on. Some optional
functions that can be provided by the server is also included.";
container duid {
description "Sets the DUID of server";
uses dhcpv6-types:duid;
}
leaf name {
type string;
description "server's name";
}
leaf description {
type string;
description "description of the server.";
}
leaf-list ipv6-address {
type inet:ipv6-address;
description "server's IPv6 address.";
}
leaf-list interfaces-config {
// Note - this should probably be references to
// entries in the ietf-interfaces model
type if:interface-ref;
description "A leaf list to denote which one or more interfaces
the server should listen on. The default value is to listen
on all the interfaces. This node is also used to set a unicast
address for the server to listen with a specific interface.
For example, if people want the server to listen on a unicast
address with a specific interface, he can use the format like
'eth1/2001:db8::1'.";
}
container lease-storage {
description "Indicates how the server stores the lease";
choice storage-type {
description "the type of lease storage";
// leaf persist {
// type boolean;
// mandatory true;
// description "controls whether the new leases and updates to existing leases are
// written to the file";
// }
case memfile {
description "the server stores lease information in a CSV file";
leaf memfile-name {
type string;
description "specifies an absolute location of the lease file in which new leases
and lease updates will be recorded";
}
leaf memfile-lfc-interval {
type uint64;
description "specifies the interval in seconds, at which the server will perform a
lease file cleanup (LFC)";
}
}
case mysql {
leaf mysql-name {
type string;
description "type of the database";
}
leaf mysql-host {
type string;
description "If the database is located
on a different system to the DHCPv6 server, the database host name must also be specified.";
}
leaf mysql-password {
type string;
description "the credentials of the account under which the server will access the database";
}
leaf mysql-port {
type uint8;
description "If the database is located on a different system, the port number may be specified";
}
leaf mysql-lfc-interval {
type uint64;
description "specifies the interval in seconds, at which the server will perform a
lease file cleanup (LFC)";
}
leaf mysql-connect-timeout {
type uint64;
description "If the database is located on a different system, a longer interval needs to be specified";
}
} module ietf-dhcpv6-server {
case postgresql { yang-version 1.1;
leaf postgresql-name { namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-server";
type string; prefix "dhcpv6-server";
description "type of the database";
}
leaf postgresql-host {
type string;
description "If the database is located
on a different system to the DHCPv6 server, the database host name must also be specified.";
}
leaf postgresql-password {
type string;
description "the credentials of the account under which the server will access the database";
}
leaf postgresql-port {
type uint8;
description "If the database is located on a different system, the port number may be specified";
}
leaf postgresql-lfc-interval {
type uint64;
description "specifies the interval in seconds, at which the server will perform a
lease file cleanup (LFC)";
}
leaf postgresql-connect-timeout {
type uint64;
description "If the database is located on a different system, a longer interval needs to be specified";
}
}
case cassandra {
leaf cassandra-name {
type string;
description "type of the database";
}
leaf cassandra-contact-points {
type string;
description "Cassandra takes a list of comma separated IP addresses to contact the cluster";
}
leaf cassandra-password {
type string;
description "the credentials of the account under which the server will access the database";
}
leaf cassandra-lfc-interval {
type uint64;
description "specifies the interval in seconds, at which the server will perform a
lease file cleanup (LFC)";
}
leaf cassandra-connect-timeout {
type uint64;
description "If the database is located on a different system, a longer interval needs to be specified";
}
}
}
}
uses dhcpv6-types:vendor-infor;
}
container option-sets { import ietf-inet-types {
description "DHCPv6 employs various options to carry additional prefix inet;
information and parameters in DHCP messages. This container defines }
all the possible options that need to be configured at the server import ietf-yang-types {
side. "; prefix yang;
list option-set { }
key option-set-id; import ietf-dhcpv6-common {
description "A server may allow different option sets to be prefix dhcpv6-common;
configured for different conditions (i.e. different networks, }
clients and etc). This 'option-set' list enables various sets of
options being defined and configured in a single server. Different
sets are distinguished by the key called 'option-set-id'. All the
possible options discussed above are defined in the list and each
option is corresponding to a container. Since all the options in
the list are optional, each container in this list has a 'presence'
statement to indicate whether this option (container) will be
included in the current option set or not. In addition, each container
also has a 'if-feature' statement to indicate whether the server
supports this option (container).";
leaf option-set-id {
type uint32;
description "option set id";
}
uses dhcpv6-options:server-option-definitions;
uses dhcpv6-options:custom-option-definitions;
}
}
container network-ranges { organization "DHC WG";
contact
"cuiyong@tsinghua.edu.cn
lh.sunlinh@gmail.com
ian.farrer@telekom.de
sladjana.zechlin@telekom.de
hezihao9512@gmail.com
godfryd@isc.org";
description "This model supports a hierarchy description "This is a YANG data module for the configuration
to achieve dynamic configuration. That is to say we could configure the and management of DHCPv6 servers.
server at different levels through this model. The top level is a global
level which is defined as the container 'network-ranges'. The following
levels are defined as sub-containers under it. The 'network-ranges'
contains the parameters (e.g. option-sets) that would be allocated to
all the clients served by this server.";
leaf option-set-id { Copyright (c) 2018 IETF Trust and the persons identified as
type leafref { authors of the code. All rights reserved.
path "/server/server-config/option-sets/option-set/option-set-id";
}
description
"The ID field of relevant global option-set to be provisioned to
clients.";
}
list network-range {
key network-range-id;
description
"Under the 'network-ranges' container, a 'network-range' list
is defined to configure the server at a network level which is also
considered as the second level. Different network are identified by the
key 'network-range-id'. This is because a server may have different
configuration parameters (e.g. option sets) for different networks.";
leaf network-range-id {
type uint32;
mandatory true;
description "equivalent to subnet id";
}
leaf network-description {
type string;
mandatory true;
description "description of the subnet";
}
leaf network-prefix {
type inet:ipv6-prefix;
mandatory true;
description "subnet prefix";
}
leaf option-set-id {
type leafref {
path "/server/server-config/option-sets/option-set/option-set-id";
}
description "The ID field of relevant option-set to be provisioned to
clients of this network-range.";
}
container address-pools { 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).
description This version of this YANG module is part of RFC 8513; see
"A container that describes the DHCPv6 server's the RFC itself for full legal notices.";
address pools.";
list address-pool {
key pool-id;
description "A DHCPv6 server can be configured with
several address pools. This list defines such address pools
which are distinguished by the key called 'pool-id' inside
a network range.";
leaf pool-id {
type uint32;
mandatory true;
description "pool id";
}
leaf pool-prefix {
type inet:ipv6-prefix;
description "Pool prefix. SHOULD be set when the
'start-address..end-address' range is a prefix.";
}
leaf start-address {
type inet:ipv6-address-no-zone;
mandatory true;
description "start address";
}
leaf end-address {
type inet:ipv6-address-no-zone;
mandatory true;
description "end address";
}
leaf valid-lifetime {
type yang:timeticks;
mandatory true;
description "valid lifetime for IA";
}
leaf renew-time {
type yang:timeticks;
mandatory true;
description "renew time";
}
leaf rebind-time {
type yang:timeticks;
mandatory true;
description "rebind time";
}
leaf preferred-lifetime {
type yang:timeticks;
mandatory true;
description "preferred lifetime for IA";
} revision 2018-09-04 {
leaf rapid-commit { description "";
type boolean; reference "I-D: draft-ietf-dhc-dhcpv6-yang";
mandatory true; }
description "A boolean value specifies whether the pool
supports client-server exchanges involving two messages.";
}
leaf client-class {
type string;
description
"If this leaf is specified, this pool will only serve
the clients belonging to this class.";
}
leaf max-address-count {
type threshold;
mandatory true;
description "maximum count of addresses that can
be allocated in this pool. This value may be
less than count of total addresses.";
}
leaf option-set-id {
type leafref {
path "/server/server-config/option-sets/option-set/option-set-id";
}
description "The ID field of relevant option-set to be
provisioned to clients of this address-pool.";
}
}
}
container pd-pools { revision 2018-03-04 {
description "If a server supports prefix delegation function, this description "Resolved most issues on the DHC official
container will be used to define the delegating router's prefix github";
pools."; reference "I-D: draft-ietf-dhc-dhcpv6-yang";
list pd-pool { }
key pool-id;
description "Similar to server's address pools, a delegating
router can also be configured with multiple prefix pools
specified by a list called 'prefix-pool'.";
leaf pool-id {
type uint32;
mandatory true;
description "pool id";
}
leaf prefix {
type inet:ipv6-prefix;
mandatory true;
description "ipv6 prefix";
} revision 2017-12-22 {
leaf delegated-length { description "Resolve most issues on Ian's github.";
type uint8; reference "I-D: draft-ietf-dhc-dhcpv6-yang";
mandatory true;
description "default delegated prefix length";
}
leaf valid-lifetime {
type yang:timeticks;
mandatory true;
description "valid lifetime for IA";
}
leaf renew-time {
type yang:timeticks;
mandatory true;
description "renew time";
}
leaf rebind-time {
type yang:timeticks;
mandatory true;
description "rebind time";
}
leaf preferred-lifetime {
type yang:timeticks;
mandatory true;
description "preferred lifetime for IA";
}
leaf rapid-commit {
type boolean;
mandatory true;
description "A boolean value specifies whether the server
support client-server exchanges involving two messages defined.";
}
leaf client-class {
type string;
description "client class";
}
leaf max-pd-space-utilization {
type threshold;
mandatory true;
description "Maximum utilization of pd space in this pool";
}
leaf option-set-id {
type leafref {
path "/server/server-config/option-sets/option-set/option-set-id";
}
description "The ID field of relevant option-set to be
provisioned to clients of this prefix-pool.";
}
} }
}
container host-reservations { revision 2017-11-24 {
description description "First version of the separated server specific
"This container allows the server to make reservations at host level."; YANG model.";
list host-reservation { reference "I-D: draft-ietf-dhc-dhcpv6-yang";
key cli-id; }
description "This list allows the server to reserve addresses,
prefixes, hostname and options for different clients.";
leaf cli-id {
type uint32;
mandatory true;
description "client id";
}
choice client-identifier { /*
description "When making reservations, the server needs to choose a * Typedef
identifier to identify the client. Currently 'DUID' and 'hardware */
address' are supported.";
case duid {
description "DUID";
uses dhcpv6-types:duid;
}
case hw-address {
description "hardware address";
leaf hardware-address {
type yang:mac-address;
description "MAC address of client";
}
}
}
leaf-list reserv-addr { identity server {
type inet:ipv6-address; base "dhcpv6-common:dhcpv6-node";
description "reserved addr"; description "DHCPv6 server.";
} }
list prefix-reservation { leaf dhcpv6-node-type {
key reserv-prefix-id; description "Type for a DHCPv6 server";
description "reserved prefix reservation"; type identityref {
leaf reserv-prefix-id { base "dhcpv6-server:server";
type uint32; }
mandatory true; }
description "reserved prefix id";
}
leaf reserv-prefix {
type inet:ipv6-prefix;
mandatory true;
description "reserved prefix";
}
leaf reserv-prefix-len {
type uint8;
mandatory true;
description "reserved prefix length";
}
}
leaf hostname { feature prefix-delegation {
type string; description "Enable if the server implements prefix delegation.";
description "reserved hostname"; }
}
leaf option-set-id { grouping resource-config {
type leafref { description "Nodes that are reused by multiple levels
path "/server/server-config/option-sets/option-set/option-set-id"; in the DHCPv6 server's addressing hierarchy.";
} leaf-list option-set-id {
description "The ID field of relevant option-set to be provisioned type leafref {
in the host reservation."; path "/dhcpv6-server/option-sets/option-set/option-set-id";
} }
} description "The ID field of relevant option-set
} to be provisioned to clients of this network-range.";
}
leaf valid-lifetime {
type dhcpv6-common:timer-value-seconds32;
mandatory true;
description "Valid lifetime for the IA.";
}
leaf renew-time {
type dhcpv6-common:timer-value-seconds32;
mandatory true;
description "Renew (T1) time.";
}
leaf rebind-time {
type dhcpv6-common:timer-value-seconds32;
mandatory true;
description "Rebind (T2) time.";
}
leaf preferred-lifetime {
type dhcpv6-common:timer-value-seconds32;
mandatory true;
description "Preferred lifetime for the IA";
}
leaf rapid-commit {
type boolean;
mandatory true;
description "A value of 1 specifies that the pool supports
client-server exchanges involving two messages.";
}
}
} grouping lease-information {
} leaf total-address-count {
type uint64;
mandatory true;
description "count of total addresses in the pool";
}
leaf allocated-address-count {
type uint64;
mandatory true;
description "count of allocated addresses in the pool";
}
list binding-info {
key client-duid;
description "Records binding information for each client that
has previously been allocated IPv6 addresses.";
leaf client-duid {
description "Client DUID.";
type binary;
}
list iaid {
key iaid;
description "Clients IAID.";
leaf iaid {
type uint32;
mandatory true;
description "IAID";
}
leaf allocation-time {
description "Time and date that the lease was made.";
type yang:date-and-time;
container relay-opaque-params { }
description "This container contains some opaque values in Relay Agent leaf last-renew-rebind {
options that need to be configured on the server side only for value description "Time of the last successful renew or rebind.";
match. Such Relay Agent options include Interface-Id option, type yang:date-and-time;
Remote-Id option and Subscriber-Id option."; }
list relays { leaf preferred-lifetime {
key relay-name; description "The preferred lifetime expressed in units
description "relay agents"; of seconds.";
leaf relay-name { type dhcpv6-common:timer-value-seconds32;
type string; }
mandatory true; leaf valid-lifetime {
description "relay agent name"; description "The valid lifetime for the leased prefix
} expressed in units of seconds.";
list interface-info { type dhcpv6-common:timer-value-seconds32;
key if-name; }
description "interface info"; leaf lease-t1 {
leaf if-name { description "The time interval after which the client
type string; should contact the server from which the addresses
mandatory true; in the IA_NA were obtained to extend the lifetimes
description "interface name"; of the addresses assigned to the IA_PD.";
type dhcpv6-common:timer-value-seconds32;
}
leaf lease-t2 {
description "The time interval after which the client
should contact any available server to extend
the lifetimes of the addresses assigned to the IA_PD.";
type dhcpv6-common:timer-value-seconds32;
}
}
}
}
} grouping message-stats {
leaf interface-id { description "Counters for DHCPv6 messages.";
type string; leaf solicit-count {
mandatory true; config "false";
description "interface id"; type uint32;
} description "Number of Solicit (1) messages received.";
} }
list subscribers { leaf advertise-count {
key subscriber; config "false";
description "subscribers"; type uint32;
leaf subscriber { description "Number of Advertise (2) messages sent.";
type uint32; }
mandatory true; leaf request-count {
description "subscriber"; config "false";
} type uint32;
leaf subscriber-id { description "Number of Request (3) messages received.";
type string;
mandatory true;
description "subscriber id";
}
}
list remote-host {
key ent-num;
description "remote host";
leaf ent-num {
type uint32;
mandatory true;
description "enterprise number";
}
leaf remote-id {
type string;
mandatory true;
description "remote id";
}
}
}
}
container rsoo-enabled-options { }
description "rsoo enabled options"; leaf confirm-count {
list rsoo-enabled-option { config "false";
key option-code; type uint32;
description "rsoo enabled option"; description "Number of Confirm (4) messages received.";
leaf option-code { }
type uint16; leaf renew-count {
mandatory true; config "false";
description "option code"; type uint32;
} description "Number of Renew (5) messages received.";
leaf description { }
type string; leaf rebind-count {
mandatory true; config "false";
description "description of the option"; type uint32;
} description "Number of Rebind (6) messages received.";
} }
} leaf reply-count {
config "false";
type uint32;
description "Number of Reply (7) messages sent.";
}
leaf release-count {
type uint32;
description "Number of Release (8) messages received.";
}
leaf decline-count {
config "false";
type uint32;
description "Number of Decline (9) messages received.";
}
leaf reconfigure-count {
config "false";
type uint32;
description "Number of Reconfigure (10) messages sent.";
}
leaf information-request-count {
config "false";
type uint32;
description "Number of Information-request (11) messages
received.";
}
}
} /*
* Data Nodes
*/
container dhcpv6-server {
container server-duid {
description "DUID of the server.";
uses dhcpv6-common:duid;
}
container vendor-config {
description "This container provides a location for augmenting
vendor or implementation specific configuration nodes.";
}
container option-sets {
description "A server may allow different option sets
to be configured for clients matching specific parameters
such as topological location or client type. The 'option-set'
list is a set of options and their contents that
will be returned to clients.";
list option-set {
key option-set-id;
description "YANG definitions for DHCPv6 options are
contained in separate YANG modules and augmented to this
container as required.";
leaf option-set-id {
type uint32;
description "Option set identifier.";
}
leaf description {
type string;
description "An optional field for storing additional
information relevant to the option set.";
}
}
}
/* container class-selector {
* State data description "DHCPv6 servers use a 'class-selector' function
*/ in order to identify and classify incoming client messages
container server-state { so that they can be given the correct configuration.
config "false"; The mechanisms used for implementing this function vary
description "states of server"; greatly between different implementations such that they are
container network-ranges { not possible to include in this module. This container
description "This model supports a hierarchy to achieve dynamic configuration. provides a location for server implementors to augment their
That is to say we could configure the server at different levels through own class-selector YANG.";
this model. The top level is a global level which is defined as the container }
'network-ranges'. The following levels are defined as sub-containers under it.
The 'network-ranges' contains the parameters (e.g. option-sets) that would be
allocated to all the clients served by this server.";
list network-range {
key network-range-id;
description "The ID field of relevant option-set to be provisioned
to clients of this network-range.";
leaf network-range-id {
type uint32;
mandatory true;
description "equivalent to subnet id";
}
container address-pools {
description "A container that describes the DHCPv6 server's address pools";
list address-pool {
key pool-id;
description "A DHCPv6 server can be configured with
several address pools. This list defines such address pools
which are distinguished by the key called 'pool-id'.";
leaf pool-id {
type uint32;
mandatory true;
description "pool id";
}
leaf total-address-count {
type uint64;
mandatory true;
description "count of total addresses in the pool";
} container network-ranges {
leaf allocated-address-conut { description "This model supports a hierarchy to achieve dynamic
type uint64; configuration. That is to say we could configure the server
mandatory true; at different levels through this model. The top level is
description "count of allocated addresses in the pool"; a global level which is defined as the container
} 'network-ranges'. The following levels are defined
} as sub-containers under it. The 'network-ranges' contains the
list binding-info { parameters (e.g. option-sets) that would be allocated to
key cli-id; all the clients served by this server.";
description "A list that records a binding information for each DHCPv6 uses resource-config;
client that has already been allocated IPv6 addresses."; list network-range {
leaf cli-id { key network-range-id;
type uint32; description "Under the 'network-ranges' container,
mandatory true; a 'network-range' list is defined to configure the server
description "client id"; at a network level which is also considered as the second
} level. Different network are identified by the key
container duid { 'network-range-id'. This is because a server may have
description "Read the DUID"; different configuration parameters (e.g. option sets)
uses dhcpv6-types:duid; for different networks.";
} leaf network-range-id {
list cli-ia { type uint32;
key iaid; mandatory true;
description "client IA"; description "Equivalent to subnet ID";
leaf ia-type { }
type string; leaf network-description {
mandatory true; type string;
description "IA type"; mandatory true;
} description "Description of the network range.";
leaf iaid { }
type uint32; leaf network-prefix {
mandatory true; type inet:ipv6-prefix;
description "IAID"; mandatory true;
} description "Network prefix";
leaf-list cli-addr { }
type inet:ipv6-address; uses resource-config;
description "client addr"; container address-pools {
} description
leaf pool-id { "A container that describes the DHCPv6 server's
type uint32; address pools.";
mandatory true; list address-pool {
description "pool id"; key pool-id;
} description "A DHCPv6 server can be configured with
} several address pools. This list defines such address
} pools which are distinguished by the key called
} 'pool-id'.";
container pd-pools { leaf pool-id {
description "If a server supports prefix delegation function, type uint32;
this container will be used to define the delegating mandatory true;
router's prefix pools."; description "Pool ID";
list prefix-pool { }
key pool-id; leaf pool-prefix {
description "Similar to server's address pools, a delegating type inet:ipv6-prefix;
router can also be configured with multiple prefix pools mandatory true;
specified by a list called 'prefix-pool'."; description "Pool prefix";
leaf pool-id { }
type uint32; leaf start-address {
mandatory true; type inet:ipv6-address-no-zone;
description "pool id"; mandatory true;
} description "Start address";
leaf pd-space-utilization { }
type threshold; leaf end-address {
mandatory true; type inet:ipv6-address-no-zone;
description "current PD space utilization"; mandatory true;
} description "End address";
} }
list binding-info { leaf max-address-count {
key cli-id; type dhcpv6-common:threshold;
description "A list records a binding information for each DHCPv6 mandatory true;
client that has already been allocated IPv6 prefixes."; description "Maximum count of addresses that can
leaf cli-id { be allocated in this pool. This value may be
type uint32; less than count of total addresses.";
mandatory true; }
description "client id"; uses resource-config;
} container host-reservations {
container duid { description "Configuration for host reservations
description "Reads the DUID"; in the address pool.";
uses dhcpv6-types:duid; list host-reservation {
} key reserved-addr;
list cli-iapd { leaf client-duid {
key iaid; type binary;
description "client IAPD"; description "Client DUID.";
leaf iaid { }
type uint32; leaf reserved-addr {
mandatory true; type inet:ipv6-address;
description "IAID"; description "reserved addr";
} }
leaf-list cli-prefix { list prefix-reservation {
type inet:ipv6-prefix; key reserv-prefix-id;
description "client ipv6 prefix"; description "reserved prefix reservation";
} leaf reserv-prefix-id {
leaf-list cli-prefix-len { type uint32;
type uint8; mandatory true;
description "client prefix length"; description "reserved prefix id";
} }
leaf pool-id { leaf reserv-prefix {
type uint32; type inet:ipv6-prefix;
mandatory true; mandatory true;
description "pool id"; description "reserved prefix";
} }
} leaf reserv-prefix-len {
} type uint8;
} mandatory true;
description "reserved prefix length";
container host-reservations { }
description "This container provides host reservations in the host level."; }
list binding-info { uses resource-config;
key cli-id; }
description }
"A list records a binding information for each DHCPv6 list active-leases {
client that has already been allocated IPv6 addresses or prefixes description "Holds state for active client leases.";
by host reservations."; config false;
leaf cli-id { key leased-address;
type uint32; leaf leased-address {
mandatory true; type inet:ipv6-address;
description "client id"; }
} uses lease-information;
container duid { }
description "Reads the DUID"; }
uses dhcpv6-types:duid; }
} container prefix-pools {
list cli-ia { description "Defines IPv6 prefix pools to be delegated
key iaid; to clients.";
description "client IA"; if-feature prefix-delegation;
leaf ia-type { list prefix-pool {
type string; key pool-id;
mandatory true; description "A server can be configured with multiple
description "IA type, IA_NA or IA_TA"; prefix pools.";
} leaf pool-id {
leaf iaid { type uint32;
type uint32; mandatory true;
mandatory true; description "Unique identifier for the pool.";
description "IAID"; }
} leaf prefix {
leaf-list cli-addr { type inet:ipv6-prefix;
type inet:ipv6-address; mandatory true;
description "client addr"; description "IPv6 prefix";
} }
} leaf prefix-length {
type uint8;
mandatory true;
description "Length of prefixes that will be delegated
to clients.";
}
leaf max-pd-space-utilization {
type dhcpv6-common:threshold;
mandatory true;
description "Maximum utilization of PD space
in this pool";
}
uses resource-config;
container host-reservations {
description "Configuration for host reservations
in the prefix pool.";
list prefix-reservation {
description "reserved prefix reservation";
key reserved-prefix;
leaf client-duid {
type binary;
description "Client DUID.";
}
leaf reserved-prefix {
type inet:ipv6-prefix;
mandatory true;
description "reserved prefix";
}
leaf reserv-prefix-len {
type uint8;
mandatory true;
description "reserved prefix length";
}
}
uses resource-config;
list active-leases {
description "Holds state for active client leases.";
config false;
key leased-prefix;
leaf leased-prefix{
type inet:ipv6-prefix;
}
uses lease-information;
}
}
}
}
uses message-stats;
}
}
}
list cli-iapd { /*
key iaid; * Notifications
description "client IAPD"; */
leaf iaid {
type uint32;
mandatory true;
description "IAID";
}
leaf-list cli-prefix {
type inet:ipv6-prefix;
description "client ipv6 prefix";
}
leaf-list cli-prefix-len {
type uint8;
description "client prefix length";
}
}
}
}
} notification address-pool-running-out {
} description "Notification sent when the address pool is going to
run out. A threshold for utilization ratio of the pool has
been defined in the server feature so that it will notify the
administrator when the utilization ratio reaches the
threshold, and such threshold is a settable parameter";
container packet-stats { leaf total-address-count {
description "A container presents the packet statistics related to type uint64;
the DHCPv6 server."; mandatory true;
leaf solicit-count { description "Count of total addresses in the pool";
type uint32; }
mandatory true; leaf max-address-count {
description "solicit counter"; type uint64;
} mandatory true;
leaf request-count { description "Maximum count of addresses that can be allocated
type uint32; in the pool. This value may be less than count of total
mandatory true; addresses";
description "request counter"; }
} leaf allocated-address-count {
leaf renew-count { type uint64;
type uint32; mandatory true;
mandatory true; description "Count of allocated addresses in the pool";
description "renew counter"; }
} leaf pool-id {
leaf rebind-count { type uint32;
type uint32; mandatory true;
mandatory true; description "Pool ID";
description "rebind counter"; }
} }
leaf decline-count {
type uint32;
mandatory true;
description "decline count";
}
leaf release-count {
type uint32;
mandatory true;
description "release counter";
}
leaf info-req-count {
type uint32;
mandatory true;
description "information request counter";
}
leaf advertise-count {
type uint32;
mandatory true;
description "advertise counter";
}
leaf confirm-count {
type uint32;
mandatory true;
description "confirm counter";
}
leaf reply-count {
type uint32;
mandatory true;
description "reply counter";
}
leaf reconfigure-count {
type uint32;
mandatory true;
description "reconfigure counter";
}
leaf relay-forward-count {
type uint32;
mandatory true;
description "relay forward counter";
}
leaf relay-reply-count {
type uint32;
mandatory true;
description "relay reply counter";
}
}
}
}
/* notification pd-pool-running-out {
* Notifications description "Notification sent when the address/prefix pool
*/ is going to run out. A threshold for utilization ratio
of the pool has been defined in the server feature so that
it will notify the administrator when the utilization ratio
reaches the threshold, and such threshold is a settable
parameter";
leaf max-pd-space-utilization {
type dhcpv6-common:threshold;
mandatory true;
description "Maximum PD space utilization";
}
leaf pd-space-utilization {
type dhcpv6-common:threshold;
mandatory true;
description "Current PD space utilization";
}
leaf pool-id {
type uint32;
mandatory true;
description "Pool ID";
}
}
notification invalid-client-detected {
description "Notification sent when the server has found a client
which can be regarded as a potential attacker. Some description
could also be included.";
leaf duid {
description "Client's DUID";
type binary;
}
leaf description {
type string;
description "Description of the event";
}
}
notification notifications { notification decline-received {
description "dhcpv6 server notification module"; description "Notification sent when the server has received
DECLINE message from a client.";
leaf duid {
description "Client's DUID";
type binary;
}
leaf-list addresses {
type inet:ipv6-address;
description "List of suspicious addresses";
}
}
container dhcpv6-server-event { notification non-success-code-sent {
description "dhcpv6 server event"; description "Notification sent when the server responded
container address-pool-running-out { to a client with non-success status code.";
description "raised when the address pool is going to leaf status-code {
run out. A threshold for utilization ratio of the pool has type uint16;
been defined in the server feature so that it will notify the mandatory true;
administrator when the utilization ratio reaches the description "Status code returned to a client";
threshold, and such threshold is a settable parameter"; }
leaf total-address-count { leaf duid {
type uint64; description "Client's DUID";
mandatory true; type binary;
description "count of total addresses in the pool"; }
} }
leaf max-address-count { }
type uint64;
mandatory true;
description "maximum count of addresses that can be allocated
in the pool. This value may be less than count of total
addresses";
}
leaf allocated-address-conut {
type uint64;
mandatory true;
description "count of allocated addresses in the pool";
}
container duid {
description "server duid";
uses dhcpv6-types:duid;
}
leaf serv-name {
type string;
description "server name";
}
leaf pool-name {
type string;
mandatory true;
description "pool name";
}
}
container pd-pool-running-out {
description "raised when the address/prefix pool is going to
run out. A threshold for utilization ratio of the pool has
been defined in the server feature so that it will notify the
administrator when the utilization ratio reaches the
threshold, and such threshold is a settable parameter";
leaf max-pd-space-utilization {
type threshold;
mandatory true;
description "maximum pd space utilization";
}
leaf pd-space-utilization {
type threshold;
mandatory true;
description "current pd space utilization";
}
container duid {
description "Sets the DUID";
uses dhcpv6-types:duid;
}
leaf serv-name {
type string;
description "server name";
}
leaf pool-name {
type string;
mandatory true;
description "pool name";
}
}
container invalid-client-detected {
description "raised when the server has found a client which
can be regarded as a potential attacker. Some description
could also be included.";
container duid {
description "Sets the DUID";
uses dhcpv6-types:duid;
}
leaf description {
type string;
description "description of the event";
}
}
}
}
}
<CODE ENDS>
3.2. DHCPv6 Relay YANG Model 3.2. DHCPv6 Relay YANG Model
This module imports typedefs from [RFC6991], [RFC7223]. This module imports typedefs from [RFC6991], [RFC8343].
<CODE BEGINS> file "ietf-dhcpv6-relay.yang"
module ietf-dhcpv6-relay {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-relay";
prefix "dhcpv6-relay";
import ietf-inet-types {
prefix inet;
}
import ietf-dhcpv6-options {
prefix dhcpv6-options;
}
import ietf-dhcpv6-types {
prefix dhcpv6-types;
}
import ietf-interfaces {
prefix if;
}
organization module ietf-dhcpv6-relay {
"IETF DHC (Dynamic Host Configuration) Working group"; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-relay";
prefix "dhcpv6-relay";
contact import ietf-inet-types {
"cuiyong@tsinghua.edu.cn prefix inet;
lh.sunlinh@gmail.com }
ian.farrer@telekom.de import ietf-yang-types {
sladjana.zechlin@telekom.de prefix yang;
hezihao9512@gmail.com"; }
import ietf-dhcpv6-common {
prefix dhcpv6-common;
}
import ietf-interfaces {
prefix if;
}
description organization
"This model defines a YANG data model that can be "IETF DHC (Dynamic Host Configuration) Working group";
used to configure and manage a DHCPv6 relay.";
revision 2018-09-04 { contact
description ""; "cuiyong@tsinghua.edu.cn
reference "I-D: draft-ietf-dhc-dhcpv6-yang"; lh.sunlinh@gmail.com
} ian.farrer@telekom.de
sladjana.zechlin@telekom.de
hezihao9512@gmail.com
godfryd@isc.org";
revision 2018-03-04 { description
description "Resolved most issues on the DHC official "This model defines a YANG data model that can be
github"; used to configure and manage a DHCPv6 relay.
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
revision 2017-12-22 { Copyright (c) 2018 IETF Trust and the persons identified as
description authors of the code. All rights reserved.
"Resolve most issues on Ian's github.";
reference
"I-D: draft-ietf-dhc-dhcpv6-yang";
}
revision 2017-11-24 { Redistribution and use in source and binary forms, with or
description without modification, is permitted pursuant to, and subject
"First version of the separated relay specific to the license terms contained in, the Simplified BSD License
YANG model."; set forth in Section 4.c of the IETF Trust's Legal Provisions
reference Relating to IETF Documents
"I-D: draft-ietf-dhc-dhcpv6-yang"; (http://trustee.ietf.org/license-info).
}
/* This version of this YANG module is part of RFC 8513; see
* Data Nodes the RFC itself for full legal notices.";
*/
container relay { revision 2019-09-20 {
presence description "";
"Enables the relay"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-10";
description }
"DHCPv6 relay portion";
container relay-config { revision 2018-03-04 {
description description "Resolved most issues on the DHC official
"This container contains the configuration data github";
of the relay."; reference "I-D: draft-ietf-dhc-dhcpv6-yang";
container relay-attributes { }
description
"A container describes some basic attributes of the relay
agent including some relay agent specific options data that
need to be configured previously.
Such options include Remote-Id option and Subscriber-Id
option.";
leaf name {
type string;
description
"Relay agent name";
}
leaf description {
type string;
description
"Textual description of the relay agent";
}
leaf-list dest-addrs {
type inet:ipv6-address;
description
"Each DHCPv6 relay agent may be configured with a list
of destination addresses.
This node defines such a list of IPv6 addresses that
may include unicast addresses, multicast addresses or
other addresses.";
}
list subscribers {
key subscriber;
description
"Subscribers";
leaf subscriber {
type uint8;
mandatory true;
description
"Subscriber";
}
leaf subscriber-id {
type string;
mandatory true;
description
"Subscriber id";
}
}
list remote-host {
key ent-num;
description
"Remote host";
leaf ent-num {
type uint32;
mandatory true;
description
"Enterprise number";
}
leaf remote-id {
type string;
mandatory true;
description
"Remote id";
}
}
uses dhcpv6-types:vendor-infor;
}
container rsoo-option-sets { revision 2017-12-22 {
description description
"DHCPv6 relay agent could provide some information that would "Resolve most issues on Ians Github.";
be useful to DHCPv6 client. reference
Since relay agent cannot provide options directly to the "I-D: draft-ietf-dhc-dhcpv6-yang";
client, RSOO-enabled options are defined to propose options }
for the server to send to the client.
This container models such RSOO-enabled options.";
reference
"RFC6422";
list option-set {
key option-set-id;
description
"This list under the 'rsoo-option-sets' container is similar
to the that defined in server module.
It allows the relay to implement several sets of RSOO-enabled
options for different interfaces.
The list only includes the EAP Re-authentication Protocol
(ERP) Local Domain Name DHCPv6 Option defined in RFC6440,
since it is the only one RSOO-enabled options accepted by
IANA so far.";
leaf option-set-id {
type uint32;
description "Option sed id";
}
uses dhcpv6-options:relay-supplied-option-definitions;
}
}
list relay-if { revision 2017-11-24 {
// if - This should reference an entry in ietf-interfaces description
key if-name; "First version of the separated relay specific
description YANG model.";
"A relay agent may have several interfaces, we should provide reference
a way to configure and manage parameters on the interface-level. "I-D: draft-ietf-dhc-dhcpv6-yang";
A list that describes specific interfaces and their corresponding }
parameters is employed to fulfill the configuration. Here we use
a string called 'if-name' as the key of list.";
leaf if-name {
type if:interface-ref;
mandatory true;
description
"Interface name";
}
leaf interface-id {
type string;
description
"Interface id";
}
/* identity relay {
leaf enable { base "dhcpv6-common:dhcpv6-node";
type boolean; description "DHCPv6 relay agent.";
mandatory true; }
description "whether this interface is enabled";
}
*/
leaf ipv6-address { leaf dhcpv6-node-type {
type inet:ipv6-address; description "Type for a DHCPv6 relay";
description type identityref {
"IPv6 address for this interface"; base "dhcpv6-relay:relay";
}
}
} feature prefix-delegation {
description "Enable if the relay functions as a delegating router
for prefix delegation.";
}
leaf rsoo-option-set-id { grouping pd-lease-state {
type leafref { description "State data for the relay";
path "/relay/relay-config/rsoo-option-sets/option-set/option-set-id"; list pd-leases {
} config false;
description "Configured Relay Supplied Option set"; key ia-pd-prefix;
} description "Information about an active IA_PD prefix
delegation.";
list next-entity { leaf ia-pd-prefix {
key dest-addr; description "Prefix that is delegated.";
description type inet:ipv6-prefix;
"This node defines a list that is used to describe the }
next hop entity of this relay distinguished by their leaf last-renew {
addresses."; description "Time of the last successful refresh or renew
leaf dest-addr { of the delegated prefix.";
type inet:ipv6-address; type yang:date-and-time;
mandatory true; }
description leaf client-peer-address {
"Destination addr"; description "Peer-address of the client.";
} type inet:ipv6-address;
leaf available { }
type boolean; leaf client-duid {
mandatory true; description "DUID of the client.";
description type binary;
"Whether the next entity is available or not"; }
} leaf server-duid {
leaf multicast { description "DUID of the delegating server.";
type boolean; type binary;
mandatory true; }
description }
"Whether the address is multicast or not"; }
}
leaf server {
type boolean;
mandatory true;
description
"Whether the next entity is a server";
}
}
}
}
container relay-state { grouping message-statistics {
config "false"; description "Contains counters for DHCPv6 messages.";
description leaf solicit-received-count {
"State data of relay"; config "false";
type uint32;
description "Number of Solicit (1) messages received.";
}
leaf advertise-sent-count {
config "false";
type uint32;
description "Number of Advertise (2) messages sent.";
}
leaf request-received-count {
config "false";
type uint32;
description "Number of Request (3) messages received.";
}
leaf confirm-received-count {
config "false";
type uint32;
description "Number of Confirm (4) messages received.";
}
leaf renew-received-count {
config "false";
type uint32;
description "Number of Renew (5) messages received.";
}
leaf rebind-received-count {
config "false";
type uint32;
description "Number of Rebind (6) messages received.";
}
leaf reply-sent-count {
config "false";
type uint32;
description "Number of Reply (7) messages received.";
}
leaf release-received-count {
config "false";
type uint32;
description "Number of Release (8) messages sent.";
}
leaf decline-received-count {
config "false";
type uint32;
description "Number of Decline (9) messages sent.";
}
leaf reconfigure-sent-count {
config "false";
type uint32;
description "Number of Reconfigure (10) messages sent.";
}
leaf information-request-received-count {
config "false";
type uint32;
description "Number of Information-request (11) messages
received.";
}
leaf unknown-message-received-count {
config "false";
type uint32;
description
"Number of messages of unknown type that have been received."
;
}
leaf unknown-message-sent-count {
config "false";
type uint32;
description
"Number of messages of unknown type that have been sent.";
}
leaf discarded-message-count {
config "false";
type uint32;
description
"Number of messages that have been discarded for any reason."
;
}
}
list relay-if { grouping global-statistics {
key if-name; leaf relay-forward-sent-count {
description config "false";
"A relay agent may have several interfaces, we should provide type uint32;
a way to configure and manage parameters on the interface-level. description "Number of Relay-forward (12) messages sent.";
A list that describes specific interfaces and their corresponding }
parameters is employed to fulfill the configuration. Here we use leaf relay-forward-received-count {
a string called 'if-name' as the key of list."; config "false";
leaf if-name{ type uint32;
type string; description "Number of Relay-forward (12) messages received.";
mandatory true; }
description leaf relay-reply-received-count {
"Interface name"; config "false";
} type uint32;
list pd-route { description "Number of Relay-reply (13) messages received.";
// if - need to look at if/how we model these. If they are }
// going to be modeled, then they should be ro state leaf relay-forward-unknown-sent-count {
// entries (we're not trying to configure routes here) config "false";
key pd-route-id; type uint32;
description "pd route"; description "Number of Relay-forward (12) messages containing
leaf pd-route-id { a message of unknown type sent.";
type uint8; }
mandatory true; leaf relay-forward-unknown-received-count {
description config "false";
"PD route id"; type uint32;
} description "Number of Relay-forward (12) messages containing
leaf requesting-router-id { a message of unknown type received.";
type uint32; }
mandatory true; leaf discarded-message-count {
description config "false";
"Requesting router id"; type uint32;
} description "Number of messages that have been discarded
leaf delegating-router-id { for any reason.";
type uint32; }
mandatory true; }
description
"Delegating router id";
}
leaf next-router {
type inet:ipv6-address;
mandatory true;
description
"Next router";
}
leaf last-router {
type inet:ipv6-address;
mandatory true;
description
"Previous router";
}
}
list next-entity {
key dest-addr;
description "This node defines a list that is used to
describe the next hop entity of this relay agent.
Different entities are distinguished by their
addresses.";
leaf dest-addr {
type inet:ipv6-address;
mandatory true;
description "destination addr";
}
container packet-stats {
description "packet statistics";
leaf solicit-rvd-count {
type uint32;
mandatory true;
description "solicit received counter";
}
leaf request-rvd-count {
type uint32;
mandatory true;
description "request received counter";
}
leaf renew-rvd-count {
type uint32;
mandatory true;
description "renew received counter";
}
leaf rebind-rvd-count {
type uint32;
mandatory true;
description "rebind received counter";
}
leaf decline-rvd-count {
type uint32;
mandatory true;
description "decline received counter";
}
leaf release-rvd-count {
type uint32;
mandatory true;
description "release received counter";
}
leaf info-req-rvd-count {
type uint32;
mandatory true;
description "information request counter";
}
leaf relay-for-rvd-count {
type uint32;
mandatory true;
description "relay forward received counter";
}
leaf relay-rep-rvd-count {
type uint32;
mandatory true;
description "relay reply received counter";
}
leaf packet-to-cli-count {
type uint32;
mandatory true;
description "packet to client counter";
}
leaf adver-sent-count {
type uint32;
mandatory true;
description "advertisement sent counter";
}
leaf confirm-sent-count {
type uint32;
mandatory true;
description "confirm sent counter";
}
leaf reply-sent-count {
type uint32;
mandatory true;
description "reply sent counter";
}
leaf reconfig-sent-count {
type uint32;
mandatory true;
description "reconfigure sent counter";
}
leaf relay-for-sent-count {
type uint32;
mandatory true;
description "relay forward sent counter";
}
leaf relay-rep-sent-count {
type uint32;
mandatory true;
description "relay reply sent counter";
}
} /*
} * Data Nodes
} */
container relay-stats {
config "false";
description
"Relay statistics";
leaf cli-packet-rvd-count {
type uint32;
mandatory true;
description
"Client packet received counter";
}
leaf relay-for-rvd-count {
type uint32;
mandatory true;
description
"Relay forward received counter";
}
leaf relay-rep-rvd-count {
type uint32;
mandatory true;
description
"Relay reply received counter";
}
leaf packet-to-cli-count {
type uint32;
mandatory true;
description
"Packet to client counter";
}
leaf relay-for-sent-count {
type uint32;
mandatory true;
description
"Relay forward sent counter";
}
leaf relay-rep-sent-count {
type uint32;
mandatory true;
description
"Relay reply sent counter";
}
leaf discarded-packet-count {
type uint32;
mandatory true;
description
"Discarded packet counter";
} container dhcpv6-relay {
} description
} "This container contains the configuration data of the relay.";
} list relay-if {
key if-name;
leaf if-name {
type if:interface-ref;
}
leaf-list destination-addresses {
type inet:ipv6-address;
description "Each DHCPv6 relay agent may be configured with
a list of destination addresses for relayed messages.
The list may include unicast addresses, multicast addresses
or other addresses.";
}
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 {
length "0..16";
}
}
container relay-options {
description "Definitions for DHCPv6 options that can be sent
by the relay are augmented to this location from other YANG
modules as required.";
}
uses message-statistics;
container prefix-delegation {
description "Controls and holds state information for prefix
delegation.";
presence "Enables prefix delegation for this interface.";
if-feature prefix-delegation;
uses pd-lease-state;
}
}
uses global-statistics;
}
/* /*
* Notifications * Notifications
*/ */
notification notifications { notification relay-event {
description "DHCPv6 relay notification module"; description
container dhcpv6-relay-event { "DHCPv6 relay event";
description container topology-change {
"DHCPv6 relay event"; description "Raised if the entry for and interface with DHCPv6
container topo-changed { related configuration or state is removed
description from if:interface-refs.";
"Raised when the topology of the relay agent is changed."; leaf relay-if-name {
leaf relay-if-name { description "Name of the interface that has been removed.";
type string; type leafref {
mandatory true; path "/dhcpv6-relay/relay-if/if-name";
description }
"Relay interface name"; }
} leaf last-ipv6-addr {
leaf first-hop { type inet:ipv6-address;
type boolean; description "Last IPv6 address configured on the interface.";
mandatory true; }
description }
"First hop"; }
} }
leaf last-entity-addr {
type inet:ipv6-address;
mandatory true;
description
"Last entity address";
}
}
}
}
}
<CODE ENDS>
3.3. DHCPv6 Client YANG Model 3.3. DHCPv6 Client YANG Model
This module imports typedefs from [RFC6991], [RFC7223]. This module imports typedefs from [RFC6991], [RFC8343].
<CODE BEGINS> file "ietf-dhcpv6-client.yang"
module ietf-dhcpv6-client {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-client";
prefix "dhcpv6-client";
import ietf-dhcpv6-options {
prefix dhcpv6-options;
}
import ietf-dhcpv6-types {
prefix dhcpv6-types;
}
import ietf-interfaces {
prefix if;
}
organization "DHC WG";
contact
"cuiyong@tsinghua.edu.cn
wangh13@mails.tsinghua.edu.cn
lh.sunlinh@gmail.com
ian.farrer@telekom.de
sladjana.zechlin@telekom.de
hezihao9512@gmail.com ";
description "This model defines a YANG data model that can be
used to configure and manage a DHCPv6 client.";
revision 2018-09-04 {
description "";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
revision 2018-03-04 {
description "Resolved most issues on the DHC official
github";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
revision 2017-12-22 {
description "Resolve most issues on Ian's github.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
revision 2017-11-24 {
description "First version of the separated client specific
YANG model.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
/*
* Data Nodes
*/
container client {
presence "Enables the client";
description "dhcpv6 client portion";
container client-config {
description "configuration tree of client";
container duid {
description "Sets the DUID";
uses dhcpv6-types:duid;
}
list client-if {
key if-name;
description "A client may have several interfaces, it is more reasonable to
configure and manage parameters on the interface-level. The list defines
specific client interfaces and their data. Different interfaces are
distinguished by the key which is a configurable string value.";
leaf if-name {
type if:interface-ref;
mandatory true;
description "interface name";
}
leaf cli-id {
type uint32;
mandatory true;
description "client id";
}
/*
leaf description {
type string;
description "description of the client interface";
}
*/
leaf pd-function {
type boolean;
mandatory true;
description "Whether the client can act as a requesting router
to request prefixes using prefix delegation ([RFC3633]).";
}
leaf rapid-commit {
type boolean;
mandatory true;
description "'true' indicates a client can initiate a Solicit-Reply message
exchange by adding a Rapid Commit option in Solicit message. 'false' means
the client is not allowed to add a Rapid Commit option to request
addresses in a two-message exchange pattern.";
}
/*
container mo-tab {
description "The management tab label indicates the operation mode of the
DHCPv6 client.
'm'=1 and 'o'=1 indicate the client will use DHCPv6 to obtain all the configuration
data.
'm'=1 and 'o'=0 are a meaningless combination.
'm'=0 and 'o'=1 indicate the client will use stateless DHCPv6 to obtain configuration
data apart from addresses/prefixes data.
'm'=0 and 'o'=0 represent the client will not use DHCPv6 but use SLAAC to
achieve configuration.";
// if - not sure about the intended use here as it seems
// to be redefining what will be received in the PIO. Is
// the intention to be whether they PIO options will be
// obeyed as received or overridden?
leaf m-tab {
type boolean;
mandatory true;
description "m tab";
}
leaf o-tab {
type boolean;
mandatory true;
description "o tab";
}
}
*/
container client-configured-options {
description "client configured options";
uses dhcpv6-options:client-option-definitions;
}
}
}
container client-state {
config "false";
description "state tree of client";
container if-other-params {
description "A client can obtain extra configuration
data other than address and prefix information through
DHCPv6. This container describes such data the client
was configured. The potential configuration data may
include DNS server addresses, SIP server domain names, etc.";
uses dhcpv6-options:server-option-definitions;
}
container packet-stats {
config "false";
description "A container records
all the packet status information
of a specific interface.";
leaf solicit-count {
type uint32;
mandatory true;
description "solicit counter";
}
leaf request-count {
type uint32;
mandatory true;
description "request counter";
}
leaf renew-count {
type uint32;
mandatory true;
description "renew counter";
}
leaf rebind-count {
type uint32;
mandatory true;
description "rebind counter";
}
leaf decline-count {
type uint32;
mandatory true;
description "decline counter";
}
leaf release-count {
type uint32;
mandatory true;
description "release counter";
}
leaf info-req-count {
type uint32;
mandatory true;
description "information request counter";
}
leaf advertise-count {
type uint32;
mandatory true;
description "advertise counter";
}
leaf confirm-count {
type uint32;
mandatory true;
description "confirm counter";
}
leaf reply-count {
type uint32;
mandatory true;
description "reply counter";
}
leaf reconfigure-count {
type uint32;
mandatory true;
description "reconfigure counter";
}
}
}
}
/*
* Notifications
*/
notification notifications {
description "dhcpv6 client notification module";
container dhcpv6-client-event {
description "dhcpv6 client event";
container ia-lease-event {
description "raised when the client was allocated
a new IA from the server or it renew/rebind/release
its current IA";
leaf event-type {
type enumeration {
enum "allocation" {
description "allocate";
}
enum "rebind" {
description "rebind";
}
enum "renew" {
description "renew";
}
enum "release" {
description "release";
}
}
mandatory true;
description "event type";
}
container duid {
description "Sets the DUID";
uses dhcpv6-types:duid;
}
leaf iaid {
type uint32;
mandatory true;
description "IAID";
}
leaf serv-name {
type string;
description "server name";
}
leaf description {
type string;
description "description of event";
}
}
container invalid-ia-detected {
description "raised when the identity association of the
client can be proved to be invalid. Possible condition
includes duplicated address, illegal address, etc.";
container duid {
description "Sets the DUID";
uses dhcpv6-types:duid;
}
leaf cli-duid {
type uint32;
mandatory true;
description "duid of client";
}
leaf iaid {
type uint32;
mandatory true;
description "IAID";
}
leaf serv-name {
type string;
description "server name";
}
leaf description {
type string;
description "description of the event";
}
}
container retransmission-failed {
description "raised when the retransmission mechanism defined
in [RFC3315] is failed.";
container duid {
description "Sets the DUID";
uses dhcpv6-types:duid;
}
leaf description {
type enumeration {
enum "MRC failed" {
description "MRC failed";
}
enum "MRD failed" {
description "MRD failed";
}
}
mandatory true;
description "description of failure";
}
}
container failed-status-turn-up {
description "raised when the client receives a message includes
an unsuccessful Status Code option.";
container duid {
description "Sets the DUID";
uses dhcpv6-types:duid;
}
leaf status-code {
type enumeration {
enum "1" {
description "UnspecFail";
}
enum "2" {
description "NoAddrAvail";
}
enum "3" {
description "NoBinding";
}
enum "4" {
description "NotOnLink";
}
enum "5" {
description "UseMulticast";
}
}
mandatory true;
description "employed status code";
}
}
}
}
}
<CODE ENDS>
3.4. DHCPv6 Options YANG Model
This module imports typedefs from [RFC6991], [RFC7223].
<CODE BEGINS> file "ietf-dhcpv6-options.yang"
module ietf-dhcpv6-options {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-options";
prefix "dhcpv6-options";
import ietf-inet-types {
prefix inet;
}
import ietf-yang-types {
prefix yang;
}
import ietf-dhcpv6-types {
prefix dhcpv6-types;
}
organization "DHC WG";
contact
"cuiyong@tsinghua.edu.cn
wangh13@mails.tsinghua.edu.cn
lh.sunlinh@gmail.com
ian.farrer@telekom.de
sladjana.zechlin@telekom.de
hezihao9512@gmail.com";
description "This model defines a YANG data model that can be
used to configure DHCPv6 options.";
revision 2018-09-04 {
description "";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
revision 2018-03-04 {
description "Resolved most issues on the DHC official
github";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
revision 2017-12-22 {
description "Resolve most issues on Ian's github.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
revision 2017-11-24 {
description "First version of the separated DHCPv6 options
YANG model.";
reference "I-D:draft-ietf-dhc-dhcpv6-yang";
}
/*
* Features
*/
// features for server options
feature server-unicast-op {
description "Support for Server Unicast option";
}
feature sip-server-domain-name-list-op {
description "Support for SIP Server Domain Name List option";
}
feature sip-server-address-list-op {
description "Support for SIP Server Address List option";
}
feature dns-servers-op {
description "Support for DNS Servers Option";
}
feature domain-searchlist-op {
description "Support for Domain Search List Option";
}
feature nis-config-op {
description "Support for Network Information Service (NIS)
Servers option";
}
feature nis-plus-config-op {
description "Support for Network Information Service V2 (NIS+)
Servers option";
}
feature nis-domain-name-op {
description "Support for Network Information Service (NIS)
Domain Name option";
}
feature nis-plus-domain-name-op {
description "Support for Network Information Service V2 (NIS+)
Server option";
}
feature sntp-server-op {
description "Support for Simple Network Protocol Configuration
(SNTP) Servers option";
}
feature info-refresh-time-op {
description "Support for Information Refresh Time option";
}
feature client-fqdn-op {
description "Support for Client FQDN option";
}
feature posix-timezone-op {
description "Support for New POIX Timezone option";
}
feature tzdb-timezone-op {
description "Support for New TZDB Timezone option";
}
feature ntp-server-op {
description "Support for Network Time Protocol (NTP)
Server option";
}
feature boot-file-url-op {
description "Support for Boot File URL option";
}
feature boot-file-param-op {
description "Support for Boot File Parameters option";
}
feature aftr-name-op {
description "Support for Address Family Transition
Router (AFTR) option";
}
feature kbr-default-name-op {
description "Support for Kerberos Default Name
Option";
}
feature kbr-kdc-op {
description "Support for Kerberos KDC option";
}
feature sol-max-rt-op {
description "Support for SOL_MAX_RT option";
}
feature inf-max-rt-op {
description "Support for INF_MAX_RT option";
}
feature addr-selection-op {
description "Support for Address Selection option";
}
feature pcp-server-op {
description "Support for Port Control Protocol (PCP)
option";
}
feature s46-rule-op {
description "Support for S46 Rule option";
}
feature s46-br-op {
description "Support for S46 Border Relay (BR) option";
}
feature s46-dmr-op {
description "Support for S46 Default Mapping Rule
(DMR) option";
}
feature s46-v4-v6-binding-op {
description "Support for S46 IPv4/IPv6 Address
Bind option";
}
// features for relay-supplied options
feature erp-local-domain-name-op {
description "Support for ERP Local Domain Name option";
}
// features for client options module ietf-dhcpv6-client {
feature option-request-op { yang-version 1.1;
description "Support for Option Request option"; namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-client";
} prefix "dhcpv6-client";
feature rapid-commit-op {
description "Support for Rapid Commit option";
}
feature user-class-op {
description "Support for User Class option";
}
feature vendor-class-op {
description "Support for Vendor Class option";
}
feature client-arch-type-op {
description "Support for Client System Architecture
Type option";
}
feature client-network-interface-identifier-op {
description "Support for Client Network Interface
Identifier option";
}
feature kbr-principal-name-op {
description "Support for Kerberos Principal
Name option";
}
feature kbr-realm-name-op {
description "Support Kerberos Realm Name option";
}
feature client-link-layer-addr-op {
description "Support for Client Link-Layer Address
Option";
}
// features for custom options import ietf-inet-types {
feature operator-op-ipv6-address { prefix inet;
description "Support for Option with IPv6 Addresses"; }
} import ietf-yang-types {
feature operator-op-single-flag { prefix yang;
description "Support for Option with Single Flag"; }
} import ietf-dhcpv6-common {
feature operator-op-ipv6-prefix { prefix dhcpv6-common;
description "Support for Option with IPv6 Prefix"; }
} import ietf-interfaces {
feature operator-op-int32 { prefix if;
description "Support for Option with 32-bit }
Integer Value";
}
feature operator-op-int16 {
description "Support for Option with 16-bit Integer Value";
}
feature operator-op-int8 {
description "Support for Option with 8-bit Integer Value";
}
feature operator-op-uri {
description "Support for Option with URI";
}
feature operator-op-textstring {
description "Support for Option with Text String";
}
feature operator-op-var-data {
description "Support for Option with Variable-Length Data";
}
feature operator-op-dns-wire {
description "Support for Option with DNS Wire
Format Domain Name List";
}
/* organization "DHC WG";
* Groupings contact
*/ "cuiyong@tsinghua.edu.cn
wangh13@mails.tsinghua.edu.cn
lh.sunlinh@gmail.com
ian.farrer@telekom.de
sladjana.zechlin@telekom.de
hezihao9512@gmail.com
godfryd@isc.org";
grouping server-option-definitions { description "This is a YANG data module for the configuration
description "Contains definitions for options configured on the and management of DHCPv6 clients.
DHCPv6 server which will be supplied to clients.";
container server-unicast-option { Copyright (c) 2018 IETF Trust and the persons identified as
if-feature server-unicast-op; authors of the code. All rights reserved.
presence "Enable this option";
description "OPTION_UNICAST (12) Server Unicast Option";
reference "RFC3315: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6)";
leaf server-address {
type inet:ipv6-address;
description "server ipv6 address";
}
}
container sip-server-domain-name-list-option { Redistribution and use in source and binary forms, with or
if-feature sip-server-domain-name-list-op; without modification, is permitted pursuant to, and subject
presence "Enable this option"; to the license terms contained in, the Simplified BSD License
description "OPTION_SIP_SERVER_D (21) SIP Servers Domain Name List"; set forth in Section 4.c of the IETF Trust's Legal Provisions
reference "RFC3319: Dynamic Host Configuration Protocol Relating to IETF Documents
(DHCPv6) Options for Session Initiation Protocol (SIP) Servers"; (http://trustee.ietf.org/license-info).
leaf sip-serv-domain-name {
type string;
mandatory true;
description "sip server domain name";
}
}
container sip-server-address-list-option { This version of this YANG module is part of RFC 8513; see
if-feature sip-server-address-list-op; the RFC itself for full legal notices.";
presence "Enable this option";
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";
list sip-server {
key sip-serv-id;
description "sip server info";
leaf sip-serv-id {
type uint8;
mandatory true;
description "sip server id";
}
leaf sip-serv-addr {
type inet:ipv6-address;
mandatory true;
description "sip server addr";
}
}
}
container dns-servers-option { revision 2019-09-20 {
if-feature dns-servers-op; description "";
presence "Enable this option"; reference "I-D: draft-ietf-dhc-dhcpv6-yang-10";
description "OPTION_DNS_SERVERS (23) DNS recursive Name Server option"; }
reference "RFC3646: DNS Configuration options for Dynamic Host Configuration
Protocol for IPv6 (DHCPv6)";
list dns-server {
key dns-serv-id;
description "dns server info";
leaf dns-serv-id {
type uint8;
mandatory true;
description "DNS server list entry ID.";
}
leaf dns-serv-addr {
type inet:ipv6-address;
mandatory true;
description "DNS server address.";
}
}
}
container domain-searchlist-option { revision 2018-09-04 {
if-feature domain-searchlist-op; description "";
presence "Enable this option"; reference "I-D: draft-ietf-dhc-dhcpv6-yang";
description "OPTION_DOMAIN_LIST (24) Domain Search List Option"; }
reference "RFC3646: DNS Configuration options for Dynamic
Host Configuration Protocol for IPv6 (DHCPv6)";
list domain-searchlist {
key domain-searchlist-id;
description "dns server info";
leaf domain-searchlist-id {
type uint8;
mandatory true;
description "Domain seachlist entry ID.";
}
leaf domain-search-list-entry {
type string;
mandatory true;
description "Domain search list entry.";
}
}
}
container nis-config-option {
if-feature nis-config-op;
presence "Enable this option";
description "OPTION_NIS_SERVERS (27) Network Information Service (NIS)
Servers Option.";
reference "RFC3898: Network Information Service (NIS) Configuration
Options for Dynamic Host Configuration Protocol for IPv6 (DHCPv6)";
list nis-server {
key nis-serv-id;
description "nis server info";
leaf nis-serv-id {
type uint8;
mandatory true;
description "nis server id";
}
leaf nis-serv-addr {
type inet:ipv6-address;
mandatory true;
description "nis server addr";
}
}
}
container nis-plus-config-option { revision 2018-03-04 {
if-feature nis-plus-config-op; description "Resolved most issues on the DHC official github";
presence "Enable this option"; reference "I-D: draft-ietf-dhc-dhcpv6-yang";
description "OPTION_NISP_SERVERS (28): Network Information Service V2 }
(NIS+) Servers Option.";
reference "RFC3989: Network Information Service (NIS) Configuration
Options for Dynamic Host Configuration Protocol for IPv6 (DHCPv6)";
list nis-plus-server {
key nis-plus-serv-id;
description "NIS+ server information.";
leaf nis-plus-serv-id {
type uint8;
mandatory true;
description "nisp server id";
}
leaf nis-plus-serv-addr {
type inet:ipv6-address;
mandatory true;
description "nisp server addr";
}
}
}
container nis-domain-name-option { revision 2017-12-22 {
if-feature nis-domain-name-op; description "Resolve most issues on Ian's Github.";
presence "Enable this option"; reference "I-D: draft-ietf-dhc-dhcpv6-yang";
description "OPTION_NIS_DOMAIN_NAME (29) Network Information }
Service (NIS) Domain Name Option";
reference "RFC3989: Network Information Service (NIS)
Configuration Options for Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
leaf nis-domain-name {
type string;
description "The Network Information Service (NIS) Domain Name
option is used by the server to convey client's NIS Domain Name
info to the client.";
}
}
container nis-plus-domain-name-option { revision 2017-11-24 {
if-feature nis-plus-domain-name-op; description "First version of the separated client specific
presence "Enable this option"; YANG model.";
description "OPTION_NISP_DOMAIN_NAME (30) Network Information reference "I-D: draft-ietf-dhc-dhcpv6-yang";
Service V2 (NIS+) Domain Name Option"; }
reference "RFC3989: Network Information Service (NIS)
Configuration Options for Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)";
leaf nis-plus-domain-name {
type string;
description "The Network Information Service V2 (NIS+) Domain Name
option is used by the server to convey client's NIS+ Domain Name
info to the client.";
}
}
container sntp-server-option { identity client {
if-feature sntp-server-op; base "dhcpv6-common:dhcpv6-node";
presence "Enable this option"; description "DHCPv6 client.";
description "OPTION_SNTP_SERVERS (31) Simple Network Time Protocol }
(SNTP) Servers Option";
reference "RFC4075: Simple Network Time Protocol (SNTP) Configuration
Option for DHCPv6";
list sntp-server {
key sntp-serv-id;
description "sntp server info";
leaf sntp-serv-id {
type uint8;
mandatory true;
description "sntp server id";
}
leaf sntp-serv-addr {
type inet:ipv6-address;
mandatory true;
description "sntp server addr";
}
}
}
container info-refresh-time-option { leaf dhcpv6-node-type {
if-feature info-refresh-time-op; description "Type for a DHCPv6 client";
presence "Enable this option"; type identityref {
description "OPTION_INFORMATION_REFRESH_TIME (32) Information Refresh base "dhcpv6-client:client";
Time option."; }
reference "RFC4242: Information Refresh Time Option for Dynamic Host }
Configuration Protocol for IPv6 (DHCPv6";
leaf info-refresh-time {
type yang:timeticks;
mandatory true;
description "The refresh time.";
}
}
container client-fqdn-option { /*
if-feature client-fqdn-op; * Groupings
presence "Enable this option"; */
description "OPTION_CLIENT_FQDN (39) DHCPv6 Client FQDN Option";
reference "RFC4704: The Dynamic Host Configuration Protocol for IPv6
(DHCPv6) Client Fully Qualified Domain Name (FQDN) Option";
leaf server-initiate-update {
type boolean;
mandatory true;
description "server initiate";
}
leaf client-initiate-update {
type boolean;
mandatory true;
description "client initiate";
}
leaf modify-name-from-cli {
type boolean;
mandatory true;
description "modify by client";
}
}
container posix-timezone-option { grouping message-statistics {
if-feature posix-timezone-op; description "Counters for DHCPv6 messages.";
presence "Enable this option"; leaf solicit-count {
description "OPTION_NEW_POSIX_TIMEZONE (41) Posix Timezone option"; config "false";
reference "RFC4833: Timezone Options for DHCP"; type uint32;
leaf tz-posix { description "Number of Solicit (1) messages sent.";
type string; }
mandatory true; leaf advertise-count {
description "TZ Posix IEEE 1003.1 String"; config "false";
} type uint32;
} description "Number of Advertise (2) messages received.";
}
leaf request-count {
config "false";
type uint32;
description "Number of Request (3) messages sent.";
}
leaf confirm-count {
config "false";
type uint32;
description "Number of Confirm (4) messages sent.";
}
leaf renew-count {
config "false";
type uint32;
description "Number of Renew (5) messages sent.";
}
leaf rebind-count {
config "false";
type uint32;
description "Number of Rebind (6) messages sent.";
}
leaf reply-count {
config "false";
type uint32;
description "Number of Reply (7) messages received.";
}
leaf release-count {
type uint32;
description "Number of Release (8) messages sent.";
}
leaf decline-count {
config "false";
type uint32;
description "Number of Decline (9) messages sent.";
}
leaf reconfigure-count {
config "false";
type uint32;
description "Number of Reconfigure (10) messages received.";
}
leaf information-request-count {
config "false";
type uint32;
description "Number of Information-request (11) messages
sent.";
}
}
container tzdb-timezone-option { /*
if-feature tzdb-timezone-op; * Data Nodes
presence "Enable this option"; */
description "OPTION_NEW_TZDB_TIMEZONE (42) Timezone Database option";
reference "RFC4822: Timezone Options for DHCP";
leaf tz-database {
type string;
mandatory true;
description "Reference to the TZ Database";
}
}
container ntp-server-option { container dhcpv6-client {
//This option looks like it needs work to correctly model the description "DHCPv6 client configuration and state.";
//option as defined in the RFC. list client-if {
key if-name;
description "The list of interfaces that the client will be
requesting DHCPv6 configuration for.";
leaf if-name {
type if:interface-ref;
mandatory true;
description "Reference to the interface entry that
the requested configuration is relevant to.";
}
uses dhcpv6-common:duid;
container client-configured-options {
description "Definitions for DHCPv6 options that can be be
sent by the client are augmented to this location from
other YANG modules as required.";
}
list ia-na {
key iaid;
description "Configuration relevant for an IA_NA.";
reference "RFC8415: Dynamic Host Configuration Protocol
for IPv6 (DHCPv6).";
leaf iaid {
type uint32;
description "The unique identifier for this IA_NA.";
}
container ia-na-options {
description "An augmenation point for additional options
that the client will send in the IA_NA-options field
of OPTION_IA_NA options.";
}
container lease-state {
config "false";
description "Information about the active IA_NA lease.";
leaf ia-na-address {
description "Address that is currently leased.";
type inet:ipv6-address;
}
leaf preferred-lifetime {
description "The preferred lifetime for the leased
address expressed in units of seconds.";
type dhcpv6-common:timer-value-seconds32;
}
leaf valid-lifetime {
description "The valid lifetime for the leased address
expressed in units of seconds.";
type dhcpv6-common:timer-value-seconds32;
}
leaf lease-t1 {
description "The time interval after which the client
should contact the server from which the addresses
in the IA_NA were obtained to extend the lifetimes
of the addresses assigned to the IA_NA.";
type dhcpv6-common:timer-value-seconds32;
}
leaf lease-t2 {
description "The time interval after which the client
should contact any available server to extend
the lifetimes of the addresses assigned to the IA_NA.";
type dhcpv6-common:timer-value-seconds32;
}
leaf allocation-time {
description "Time and date that the address was first
leased.";
type yang:date-and-time;
}
leaf last-renew-rebind {
description "Time of the last successful renew or rebind
of the leased address.";
// Zihao - Re-modeled so it only contains one time source suboption type yang:date-and-time;
}
leaf server-duid {
description "DUID of the leasing server.";
type binary;
}
}
}
list ia-ta {
key iaid;
description "Configuration relevant for an IA_TA.";
reference "RFC8415: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6).";
leaf iaid {
type uint32;
description "The unique identifier for this IA_TA.";
}
container ia-ta-options {
description "An augmenation point for additional options
that the client will send in the IA_TA-options field
of OPTION_IA_TA options.";
}
container lease-state {
config "false";
description "Information about an active IA_TA lease.";
leaf ia-ta-address {
description "Address that is currently leased.";
type inet:ipv6-address;
}
leaf preferred-lifetime {
description "The preferred lifetime for the leased
address expressed in units of seconds.";
type dhcpv6-common:timer-value-seconds32;
}
leaf valid-lifetime {
description "The valid lifetime for the leased address
expressed in units of seconds.";
type dhcpv6-common:timer-value-seconds32;
}
leaf allocation-time {
description "Time and date that the address was first
leased.";
type yang:date-and-time;
}
leaf last-renew-rebind {
description "Time of the last successful renew or rebind
of the address.";
type yang:date-and-time;
if-feature ntp-server-op; }
presence "Enable this option"; leaf server-duid {
description "OPTION_NTP_SERVER (56) NTP Server Option for DHCPv6"; description "DUID of the leasing server.";
reference "RFC5908: Network Time Protocol (NTP) Server Option for type binary;
DHCPv6"; }
list ntp-server { }
key ntp-serv-id; }
description "ntp server info"; list ia-pd {
leaf ntp-serv-id { key iaid;
type uint8; reference "RFC8415: Dynamic Host Configuration Protocol for
mandatory true; IPv6 (DHCPv6).";
description "NTP server id"; description "Configuration relevant for an IA_PD.";
} leaf iaid {
choice ntp-time-source-suboption { type uint32;
description "Select a NTP time source suboption."; description "The unique identifier for this IA_PD.";
case server-address { }
leaf-list ntp-serv-addr-suboption { container ia-pd-options {
type inet:ipv6-address; description "An augmenation point for additional options
description "NTP server addr"; that the client will send in the IA_PD-options field
} of OPTION_IA_TA options.";
} }
case server-multicast-address { container lease-state {
leaf-list ntp-serv-mul-addr-suboption { config "false";
description "Information about an active IA_PD delegated
prefix.";
leaf ia-pd-prefix {
description "Delegated prefix that is currently leased.";
type inet:ipv6-prefix;
}
leaf preferred-lifetime {
description "The preferred lifetime for the leased prefix
expressed in units of seconds.";
type dhcpv6-common:timer-value-seconds32;
}
leaf valid-lifetime {
description "The valid lifetime for the leased prefix
expressed in units of seconds.";
type dhcpv6-common:timer-value-seconds32;
}
leaf lease-t1 {
description "The time interval after which the client
should contact the server from which the addresses
in the IA_NA were obtained to extend the lifetimes
of the addresses assigned to the IA_PD.";
type dhcpv6-common:timer-value-seconds32;
}
leaf lease-t2 {
description "The time interval after which the client
should contact any available server to extend
the lifetimes of the addresses assigned to the IA_PD.";
type dhcpv6-common:timer-value-seconds32;
}
leaf allocation-time {
description "Time and date that the prefix was first
leased.";
type yang:date-and-time;
}
leaf last-renew-rebind {
description "Time of the last successful renew or rebind
of the delegated prefix.";
type yang:date-and-time;
}
leaf server-duid {
description "DUID of the delegating server.";
type binary;
}
}
}
uses message-statistics;
}
}
type inet:ipv6-address; /*
description "NTP server multicast addr"; * Notifications
} */
}
case server-fqdn {
leaf-list ntp-serv-fqdn-suboption {
type string;
description "NTP server fqdn";
}
}
}
}
}
container boot-file-url-option { notification invalid-ia-detected {
if-feature boot-file-url-op; description "Notification sent when the identity association
presence "Enable this option"; of the client can be proved to be invalid. Possible conditions
description "OPT_BOOTFILE_URL (59) Boot File URL Option"; include a duplicate or otherwise illegal address.";
reference "RFC5970: DHCPv6 Options for Network Boot"; leaf iaid {
list boot-file { type uint32;
key boot-file-id; mandatory true;
description "boot file info"; description "IAID";
leaf boot-file-id { }
type uint8; leaf description {
mandatory true; type string;
description "boot file id"; description "Description of the event.";
} }
leaf-list suitable-arch-type { }
type uint16;
description "architecture type";
}
leaf-list suitable-net-if {
type uint32;
description "network interface";
}
leaf boot-file-url {
type string;
mandatory true;
description "url for boot file";
}
}
}
container boot-file-param-option { notification retransmission-failed {
if-feature boot-file-param-op; description "Notification sent when the retransmission mechanism
presence "Enable this option"; defined in [RFC8415] is unsucessful.";
description "OPT_BOOTFILE_PARAM (60) Boot File Parameters Option"; leaf failure-type {
reference "RFC5970: DHCPv6 Options for Network Boot"; type enumeration {
enum "MRC-exceeded" {
description "Maximum retransmission count exceeded.";
}
enum "MRD-exceeded" {
description "Maximum retransmission duration exceeded.";
}
}
mandatory true;
description "Description of the failure.";
}
}
list boot-file-params { notification unsuccessful-status-code {
key param-id; description "Notification sent when the client receives a message
description "boot file parameters"; that includes an unsuccessful Status Code option.";
leaf param-id { leaf status-code {
type uint8; type uint16;
mandatory true; mandatory true;
description "parameter id"; description "Unsuccessful status code recevied by a client.";
} }
leaf parameter { leaf server-duid {
type string; description "DUID of the server sending the unsuccessful
mandatory true; error code.";
description "parameter value"; mandatory true;
} type binary;
} }
} }
container aftr-name-option { notification server-duid-changed {
if-feature aftr-name-op; description "Notification sent when the client receives a lease
presence "Enable this option"; from a server with different DUID to the one currently stored
description "OPTION_AFTR_NAME (64) AFTR-Name DHCPv6 Option"; by the client.";
reference "RFC6334: Dynamic Host Configuration Protocol for IPv6 leaf new-server-duid {
(DHCPv6) Option for Dual-Stack Lite"; description "DUID of the new server.";
leaf tunnel-endpoint-name { mandatory true;
type string; type binary;
mandatory true; }
description "aftr name"; leaf previous-server-duid {
} description "DUID of the previous server.";
} mandatory true;
type binary;
}
leaf lease-ia-na {
description "Reference to the IA_NA lease.";
type leafref {
path "/dhcpv6-client/client-if/ia-na/iaid";
}
}
leaf lease-ia-ta {
description "Reference to the IA_TA lease.";
type leafref {
path "/dhcpv6-client/client-if/ia-ta/iaid";
}
}
leaf lease-ia-pd {
description "Reference to the IA_PD lease.";
type leafref {
path "/dhcpv6-client/client-if/ia-pd/iaid";
}
}
}
}
container kbr-default-name-option { 3.4. DHCPv6 RFC8415 Options YANG Model
if-feature kbr-default-name-op;
presence "Enable this option";
description "OPTION_KRB_DEFAULT_REALM_NAME (77) Kerberos Default Realm Name Option";
reference "RFC6784: Kerberos Options for DHCPv6";
leaf default-realm-name {
type string;
mandatory true;
description "default realm name";
}
}
container kbr-kdc-option { This module imports typedefs from [RFC6991].
if-feature kbr-kdc-op;
presence "Enable this option";
description "OPTION_KRB_KDC (78) Kerberos KDB Option";
reference "RFC6784: Kerberos Options for DHCPv6";
list kdc-info {
key kdc-id;
description "kdc info";
leaf kdc-id {
type uint8;
mandatory true;
description "kdc id";
}
leaf priority {
type uint16;
mandatory true;
description "priority";
}
leaf weight {
type uint16;
mandatory true;
description "weight";
}
leaf transport-type {
type uint8;
mandatory true;
description "transport type";
}
leaf port-number {
type uint16;
mandatory true;
description "port number";
}
leaf kdc-ipv6-addr {
type inet:ipv6-address;
mandatory true;
description "kdc ipv6 addr";
}
leaf realm-name {
type string;
mandatory true;
description "realm name";
}
}
}
container sol-max-rt-option { module ietf-dhcpv6-options-rfc8415 {
if-feature sol-max-rt-op; yang-version 1.1;
presence "Enable this option"; namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-options-8415";
description "OPTION_SOL_MAX_RT (82) sol max rt option"; prefix "rfc8415";
reference "RFC7083: Modification to Default Values of
SOL_MAX_RT and INF_MAX_RT";
leaf sol-max-rt-value {
type yang:timeticks;
mandatory true;
description "sol max rt value";
}
}
container inf-max-rt-option { import ietf-inet-types {
if-feature inf-max-rt-op; prefix inet;
presence "Enable this option"; }
description "OPTION_INF_MAX_RT (83) inf max rt option";
reference "RFC7083: Modification to Default Values of
SOL_MAX_RT and INF_MAX_RT";
leaf inf-max-rt-value {
type yang:timeticks;
mandatory true;
description "inf max rt value";
}
}
container addr-selection-option { import ietf-dhcpv6-common {
if-feature addr-selection-op; prefix dhcpv6-common;
presence "Enable this option"; }
description "OPTION_ADDRSEL (84) and OPTION_ADDRSEL_TABLE (85)";
reference "RFC7078: Distributing Address Selection Policy Using
DHCPv6";
// if - Needs checking to see if this matches the RFC - there
// are two options here.
// Zihao - I think this matches RFC7078
leaf a-bit-set {
type boolean;
mandatory true;
description "a bit";
}
leaf p-bit-set {
type boolean;
mandatory true;
description "p bit";
}
list policy-table {
key policy-id;
description "policy table";
leaf policy-id {
type uint8;
mandatory true;
description "policy id";
}
leaf label {
type uint8;
mandatory true;
description "label";
} import ietf-dhcpv6-server {
leaf precedence { prefix dhcpv6-server;
type uint8; }
mandatory true;
description "precedence";
}
leaf prefix-len {
type uint8;
mandatory true;
description "prefix length";
}
leaf prefix {
type inet:ipv6-prefix;
mandatory true;
description "prefix";
}
}
}
container pcp-server-option { import ietf-dhcpv6-relay {
if-feature pcp-server-op; prefix dhcpv6-relay;
presence "Enable this option"; }
description "OPTION_V6_PCP_SERVER (86) pcp server option";
reference "RFC7291: DHCP Options for the Port Control
Protocol (PCP)";
list pcp-server {
key pcp-serv-id;
description "pcp server info";
leaf pcp-serv-id {
type uint8;
mandatory true;
description "pcp server id";
}
leaf pcp-serv-addr {
type inet:ipv6-address;
mandatory true;
description "pcp server addr";
}
}
}
container s46-rule-option { import ietf-dhcpv6-client {
if-feature s46-rule-op; prefix dhcpv6-client;
presence "Enable this option"; }
description "OPTION_S46_RULE (89) S46 rule option";
reference "RFC7598: DHCPv6 Options for Configuration of
Softwire Address and Port-Mapped Clients";
list s46-rule {
key rule-id;
description "s46 rule";
leaf rule-id {
type uint8;
mandatory true;
description "rule id";
}
leaf rule-type {
type enumeration {
enum "BMR" {
description "BMR";
}
enum "FMR" {
description "FMR";
}
}
mandatory true;
description "rule type";
}
leaf prefix4-len {
type uint8;
mandatory true;
description "ipv4 prefix length";
}
leaf ipv4-prefix {
type inet:ipv4-prefix;
mandatory true;
description "ipv4 prefix";
}
leaf prefix6-len {
type uint8;
mandatory true;
description "ipv6 prefix length";
}
leaf ipv6-prefix {
type inet:ipv6-prefix;
mandatory true;
description "ipv6 prefix";
}
uses dhcpv6-types:portset-param;
}
}
container s46-br-option { organization "DHC WG";
if-feature s46-br-op; contact
presence "Enable this option"; "cuiyong@tsinghua.edu.cn
description "OPTION_S46_BR (90) S46 BR Option"; wangh13@mails.tsinghua.edu.cn
reference "RFC7598: DHCPv6 Options for Configuration of lh.sunlinh@gmail.com
Softwire Address and Port-Mapped Clients"; ian.farrer@telekom.de
list br { sladjana.zechlin@telekom.de
key br-id; hezihao9512@gmail.com";
description "br info";
leaf br-id {
type uint8;
mandatory true;
description "br id";
}
leaf br-ipv6-addr {
type inet:ipv6-address;
mandatory true;
description "br ipv6 addr";
}
}
}
container s46-dmr-option { description "This YANG module contains DHCPv6 options defined
if-feature s46-dmr-op; in RFC8415 that can be used by DHCPv6 clients, relays
presence "Enable this option"; and servers.";
description "OPTION_S46_DMR (91) S46 DMR Option";
reference "RFC7598: DHCPv6 Options for Configuration of
Softwire Address and Port-Mapped Clients";
list dmr {
key dmr-id;
description "dmr info";
leaf dmr-id {
type uint8;
mandatory true;
description "dmr id";
}
leaf dmr-prefix-len {
type uint8;
mandatory true;
description "dmr prefix length";
}
leaf dmr-ipv6-prefix {
type inet:ipv6-prefix;
mandatory true;
description "dmr ipv6 prefix";
}
}
}
container s46-v4-v6-binding-option { revision 2019-06-07 {
if-feature s46-v4-v6-binding-op; description "Major reworking to only contain RFC8415 options.
presence "Enable this option"; if-feature for each option removed. Removed groupings
description "OPTION_S46_V4V6BIND (92) S46 IPv4/IPv6 Address of features by device or combination of devices. Added ";
Binding option"; reference "I-D: draft-ietf-dhc-dhcpv6-yang";
reference "RFC7598: DHCPv6 Options for Configuration of }
Softwire Address and Port-Mapped Clients";
list ce {
key ce-id;
description "ce info";
leaf ce-id {
type uint8;
mandatory true;
description "ce id";
}
leaf ipv4-addr {
type inet:ipv4-address;
mandatory true;
description "ce ipv4 addr";
}
leaf bind-prefix6-len {
type uint8;
mandatory true;
description "bind ipv6 prefix
length";
}
leaf bind-ipv6-prefix {
type inet:ipv6-address;
mandatory true;
description "bind ipv6 prefix";
}
uses dhcpv6-types:portset-param;
}
}
} revision 2018-09-04 {
//if - NB - The list of options needs to be updated. description "";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
grouping relay-supplied-option-definitions { revision 2018-03-04 {
// if - The structure here needs to be checked and probably reworked. description "Resolved most issues on the DHC official
description "OPTION_RSOO (66) Relay-Supplied Options option"; github";
reference "RFC6422: Relay-Supplied DHCP Options"; reference "I-D: draft-ietf-dhc-dhcpv6-yang";
container erp-local-domain-name-option { }
if-feature erp-local-domain-name-op;
presence "Enable this option";
description "OPTION_ERP_LOCAL_DOMAIN_NAME (65) DHCPv6 ERP Local
Domain Name Option";
reference "RFC6440: The EAP Re-authentication Protocol (ERP)
Local Domain Name DHCPv6 Option";
list erp-for-client {
key cli-id;
description "erp for client";
leaf cli-id {
type uint32;
mandatory true;
description "client id";
}
container duid {
description "Sets the DUID";
// uses duid;
// if - Maybe DUID definition needs to be moved to this module.
uses dhcpv6-types:duid;
}
leaf erp-name {
type string;
mandatory true;
description "erp name";
}
}
}
}
grouping client-option-definitions { revision 2017-12-22 {
description "Contains definitions for options configured on the description "Resolve most issues on Ian's github.";
DHCPv6 client which will be sent to the server."; reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
list new-or-standard-cli-option { revision 2017-11-24 {
key option-code; description "First version of the separated DHCPv6 options
description "new or standard client option"; YANG model.";
leaf option-code { reference "I-D:draft-ietf-dhc-dhcpv6-yang";
type uint16; }
mandatory true;
description "option code";
}
leaf option-name {
type string;
mandatory true;
description "option name";
}
leaf option-description {
type string;
mandatory true;
description "description of client
option";
}
leaf option-reference {
type string;
description "the reference of option";
}
leaf option-value {
type string;
mandatory true;
description "the option value";
}
}
container option-request-option { /*
if-feature option-request-op; * Features
presence "Enable this option";
description "OPTION_ORO (6) Option Request Option";
reference "RFC3315: Dynamic Host Configuration Protocol for
IPv6 (DHCPv6)";
list oro-option {
key option-code;
description "oro option";
leaf option-code {
type uint16;
mandatory true;
description "option code";
}
leaf description {
type string;
mandatory true;
description "description of oro
options";
}
}
}
container user-class-option { /*
if-feature user-class-op; * Groupings
presence "Enable this option"; */
description "OPTION_USER_CLASS (15) User Class Option"; grouping option-iaaddr-option {
reference "RFC3315: Dynamic Host Configuration Protocol description "OPTION_IAADDR (5) IA Address Option.";
for IPv6 (DHCPv6)"; reference "RFC8415: Dynamic Host Configuration Protocol for IPv6
list user-class { (DHCPv6)";
key user-class-id;
description "user class";
leaf user-class-id {
type uint8;
mandatory true;
description "user class id";
}