This YANG module defines components for the configuration and management of DHCPv6 servers. Copyright (c) 2022 IETF Trust and t...
Version: 2022-06-20
module ietf-dhcpv6-server { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-server"; prefix dhc6-srv; import ietf-inet-types { prefix inet; reference "RFC 6991: Common YANG Data Types"; } import ietf-yang-types { prefix yang; reference "RFC 6991: Common YANG Data Types"; } import ietf-dhcpv6-common { prefix dhc6; reference "RFC 9243: A YANG Data Model for DHCPv6 Configuration"; } import ietf-netconf-acm { prefix nacm; reference "RFC 8341: Network Configuration Access Control Model"; } organization "IETF Dynamic Host Configuration (DHC) Working Group"; contact "WG Web: <https://datatracker.ietf.org/wg/dhc/> WG List: <mailto:dhcwg@ietf.org> Author: Yong Cui <yong@csnet1.cs.tsinghua.edu.cn> Author: Linhui Sun <lh.sunlinh@gmail.com> Editor: Ian Farrer <ian.farrer@telekom.de> Author: Sladjana Zeichlin <sladjana.zechlin@telekom.de> Author: Zihao He <hezihao9512@gmail.com> Author: Michal Nowikowski <godfryd@isc.org>"; description "This YANG module defines components for the configuration and management of DHCPv6 servers. Copyright (c) 2022 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Revised BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info). This version of this YANG module is part of RFC 9243 (https://www.rfc-editor.org/info/rfc9243); see the RFC itself for full legal notices."; revision "2022-06-20" { description "Initial revision."; reference "RFC 9243: A YANG Data Model for DHCPv6 Configuration"; } feature na-assignment { description "Denotes that the server implements DHCPv6 non-temporary address assignment."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 6.2"; } feature prefix-delegation { description "Denotes that the server implements DHCPv6 prefix delegation."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 6.3"; } grouping resource-config { description "Nodes that are reused at multiple levels in the DHCPv6 server's addressing hierarchy."; leaf-list option-set-id { type leafref { path "/dhcpv6-server/option-sets/option-set/option-set-id"; } description "The ID field of the relevant set of DHCPv6 options (option-set) to be provisioned to clients using the allocation-range."; } leaf valid-lifetime { type dhc6:timer-seconds32; description "Valid lifetime for the Identity Association (IA)."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 12.1"; } leaf renew-time { type dhc6:timer-seconds32; description "Renew (T1) time."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 4.2"; } leaf rebind-time { type dhc6:timer-seconds32; description "Rebind (T2) time."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 4.2"; } leaf preferred-lifetime { type dhc6:timer-seconds32; description "Preferred lifetime for the IA."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 12.1"; } leaf rapid-commit { type boolean; description "When set to 'true', specifies that client-server exchanges involving two messages is supported."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 5.1"; } } // grouping resource-config grouping lease-information { description "Binding information for each client that has been allocated an IPv6 address or prefix."; leaf client-duid { type dhc6:duid; description "Client DUID."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 11"; } leaf ia-id { type uint32; mandatory true; description "Client's Identity Association IDentifier (IAID)."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 12"; } leaf allocation-time { type yang:date-and-time; description "Time and date that the lease was made."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 18"; } leaf last-renew-rebind { type yang:date-and-time; description "Time of the last successful renew or rebind."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 18"; } leaf preferred-lifetime { type dhc6:timer-seconds32; description "The preferred lifetime expressed in seconds."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 6"; } leaf valid-lifetime { type dhc6:timer-seconds32; description "The valid lifetime for the lease expressed in seconds."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 6"; } leaf lease-t1 { type dhc6:timer-seconds32; description "The time interval after which the client should contact the server from which the addresses in the IA_NA were obtained to extend the lifetimes of the addresses assigned to the Identity Association for Prefix Delegation (IA_PD)."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 4.2"; } leaf lease-t2 { type dhc6:timer-seconds32; description "The time interval after which the client should contact any available server to extend the lifetimes of the addresses assigned to the IA_PD."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 4.2"; } uses dhc6:status; } // grouping lease-information grouping message-statistics { description "Counters for DHCPv6 messages."; leaf discontinuity-time { type yang:date-and-time; description "The time on the most recent occasion at which any one or more of DHCPv6 server's counters suffered a discontinuity. If no such discontinuities have occurred since the last re-initialization of the local management subsystem, then this node contains the time the local management subsystem re-initialized itself."; } leaf solicit-count { type yang:counter32; config false; description "Number of Solicit (1) messages received."; } leaf advertise-count { type yang:counter32; config false; description "Number of Advertise (2) messages sent."; } leaf request-count { type yang:counter32; config false; description "Number of Request (3) messages received."; } leaf confirm-count { type yang:counter32; config false; description "Number of Confirm (4) messages received."; } leaf renew-count { type yang:counter32; config false; description "Number of Renew (5) messages received."; } leaf rebind-count { type yang:counter32; config false; description "Number of Rebind (6) messages received."; } leaf reply-count { type yang:counter32; config false; description "Number of Reply (7) messages sent."; } leaf release-count { type yang:counter32; config false; description "Number of Release (8) messages received."; } leaf decline-count { type yang:counter32; config false; description "Number of Decline (9) messages received."; } leaf reconfigure-count { type yang:counter32; config false; description "Number of Reconfigure (10) messages sent."; } leaf information-request-count { type yang:counter32; config false; description "Number of Information-request (11) messages received."; } leaf discarded-message-count { type yang:counter32; config false; description "Number of messages that have been discarded for any reason."; } } // grouping message-statistics grouping preference-option-group { description "OPTION_PREFERENCE (7) Preference Option."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 21.8"; container preference-option { description "OPTION_PREFERENCE (7) Preference Option."; leaf pref-value { type uint8; description "The preference value for the server in this message. A 1-octet unsigned integer."; } } // container preference-option } // grouping preference-option-group grouping server-unicast-option-group { description "OPTION_UNICAST (12) Server Unicast Option."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 21.12"; container server-unicast-option { description "OPTION_UNICAST (12) Server Unicast Option."; leaf server-address { type inet:ipv6-address; description "The 128-bit address to which the client should send messages delivered using unicast."; } } // container server-unicast-option } // grouping server-unicast-option-group grouping reconfigure-message-option-group { description "OPTION_RECONF_MSG (19) Reconfigure Message Option."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 21.19"; container reconfigure-message-option { description "OPTION_RECONF_MSG (19) Reconfigure Message Option."; leaf msg-type { type uint8; description "5 for Renew message, 6 for Rebind message, and 11 for Information-request message."; } } // container reconfigure-message-option } // grouping reconfigure-message-option-group grouping info-refresh-time-option-group { description "OPTION_INFORMATION_REFRESH_TIME (32) Information Refresh Time Option."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 21.23"; container info-refresh-time-option { description "OPTION_INFORMATION_REFRESH_TIME (32) Information Refresh Time Option."; leaf info-refresh-time { type dhc6:timer-seconds32; description "Time duration specifying an upper bound for how long a client should wait before refreshing information retrieved from a DHCP server."; } } // container info-refresh-time-option } // grouping info-refresh-time-option-group grouping sol-max-rt-option-group { description "OPTION_SOL_MAX_RT (82) SOL_MAX_RT Option (Max Solicit timeout value)."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 21.24"; container sol-max-rt-option { description "OPTION_SOL_MAX_RT (82) SOL_MAX_RT Option."; leaf sol-max-rt-value { type dhc6:timer-seconds32; description "Maximum Solicit timeout value."; } } // container sol-max-rt-option } // grouping sol-max-rt-option-group grouping inf-max-rt-option-group { description "OPTION_INF_MAX_RT (83) INF_MAX_RT Option (Max Information-request timeout value)."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 21.25"; container inf-max-rt-option { description "OPTION_INF_MAX_RT (83) INF_MAX_RT Option."; leaf inf-max-rt-value { type dhc6:timer-seconds32; description "Maximum Information-request timeout value."; } } // container inf-max-rt-option } // grouping inf-max-rt-option-group container dhcpv6-server { description "Configuration nodes for the DHCPv6 server."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 18.3"; leaf enabled { type boolean; description "Enables the DHCP server function."; } leaf server-duid { type dhc6:duid; description "DUID of the server."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 11"; } container vendor-config { description "This container provides a location for augmenting vendor or implementation-specific configuration nodes."; } // container vendor-config 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."; reference "RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6), Section 21"; 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 string; description "Option set identifier."; } leaf description { type string; description "An optional field for storing additional information relevant to the option set."; } uses preference-option-group; uses dhc6:auth-option-group; uses server-unicast-option-group; uses dhc6:rapid-commit-option-group; uses dhc6:vendor-specific-information-option-group; uses reconfigure-message-option-group; uses dhc6:reconfigure-accept-option-group; uses info-refresh-time-option-group; uses sol-max-rt-option-group; uses inf-max-rt-option-group; } // list option-set } // container option-sets container class-selector { description "DHCPv6 servers use a 'class-selector' function in order to identify and classify incoming client messages so that they can be given the correct configuration. The mechanisms used for implementing this function vary greatly between different implementations; as such, it is not possible to include them in this module. This container provides a location for server implementors to augment their own class-selector YANG."; } // container class-selector container allocation-ranges { description "This model is based on an address and parameter allocation hierarchy. The top level is 'global' -- which is defined as the container for all allocation-ranges. Under this are the individual allocation-ranges."; uses resource-config; list allocation-range { key "id"; description "Network ranges are identified by the 'id' key."; leaf id { type string; mandatory true; description "Unique identifier for the allocation range."; } leaf description { type string; description "Description for the allocation range."; } leaf network-prefix { type inet:ipv6-prefix; mandatory true; description "Network prefix."; } uses resource-config; container address-pools { if-feature na-assignment; description "Configuration for the DHCPv6 server's address pools."; list address-pool { key "pool-id"; description "List of address pools for allocation to clients, distinguished by 'pool-id'."; leaf pool-id { type string; mandatory true; description "Unique identifier for the pool."; } leaf pool-prefix { type inet:ipv6-prefix; mandatory true; description "IPv6 prefix for the pool. Should be contained within the network-prefix if configured."; } leaf start-address { type inet:ipv6-address-no-zone; mandatory true; description "Starting IPv6 address for the pool."; } leaf end-address { type inet:ipv6-address-no-zone; mandatory true; description "Ending IPv6 address for the pool."; } leaf max-address-utilization { type dhc6:threshold; description "Maximum amount of the addresses in the pool that can be simultaneously allocated, calculated as a percentage of the available addresses (end-address minus start-address plus one), and rounded up. Used to set the value for the address-pool-utilization-threshold-exceeded notification."; } uses resource-config; container host-reservations { description "Configuration for host reservations from the address pool."; list host-reservation { key "reserved-addr"; description "List of host reservations."; leaf client-duid { type dhc6:duid; description "Client DUID for the reservation."; } leaf reserved-addr { type inet:ipv6-address; description "Reserved IPv6 address."; } uses resource-config; } // list host-reservation } // container host-reservations container active-leases { config false; description "Holds state related to active client leases."; leaf total-count { type uint64; mandatory true; description "The total number of addresses in the pool."; } leaf allocated-count { type uint64; mandatory true; description "The number of addresses or prefixes in the pool that are currently allocated."; } list active-lease { key "leased-address"; description "List of active address leases."; leaf leased-address { type inet:ipv6-address; description "Active address lease entry."; } uses lease-information; } // list active-lease } // container active-leases } // list address-pool } // container address-pools container prefix-pools { if-feature prefix-delegation; description "Configuration for the DHCPv6 server's prefix pools."; list prefix-pool { key "pool-id"; description "List of prefix pools for allocation to clients, distinguished by 'pool-id'."; leaf pool-id { type string; mandatory true; description "Unique identifier for the pool."; } leaf pool-prefix { type inet:ipv6-prefix; mandatory true; description "IPv6 prefix for the pool. Should be contained within the network-prefix if configured."; } leaf client-prefix-length { type uint8 { range "1 .. 128"; } mandatory true; description "Length of the prefixes that will be delegated to clients."; } leaf max-pd-space-utilization { type dhc6:threshold; description "Maximum amount of the prefixes in the pool that can be simultaneously allocated, calculated as a percentage of the available prefixes, and rounded up. Used to set the value for the prefix-pool-utilization-threshold-exceeded notification."; } uses resource-config; container host-reservations { description "Configuration for host reservations from the prefix pool."; list prefix-reservation { key "reserved-prefix"; description "Reserved prefix reservation."; leaf client-duid { type dhc6:duid; description "Client DUID for the reservation."; } leaf reserved-prefix { type inet:ipv6-prefix; description "Reserved IPv6 prefix."; } leaf reserved-prefix-len { type uint8; description "Reserved IPv6 prefix length."; } } // list prefix-reservation uses resource-config; } // container host-reservations container active-leases { config false; description "Holds state related to active client prefix leases."; leaf total-count { type uint64; mandatory true; description "The total number of prefixes in the pool."; } leaf allocated-count { type uint64; mandatory true; description "The number of prefixes in the pool that are currently allocated."; } list active-lease { key "leased-prefix"; description "List of active prefix leases."; leaf leased-prefix { type inet:ipv6-prefix; description "Active leased prefix entry."; } uses lease-information; } // list active-lease } // container active-leases } // list prefix-pool } // container prefix-pools } // list allocation-range container statistics { description "DHCPv6 message counters for the server."; uses message-statistics; } // container statistics } // container allocation-ranges } // container dhcpv6-server rpc delete-address-lease { nacm:default-deny-all; if-feature na-assignment; description "Deletes a client's active address lease from the server's lease database. Note that this will not cause the address to be revoked from the client, and the lease may be refreshed or renewed by the client."; input { leaf lease-address-to-delete { type leafref { path "/dhcpv6-server/allocation-ranges/allocation-range/address-pools/address-pool/active-leases/active-lease/leased-address"; } mandatory true; description "IPv6 address of an active lease that will be deleted from the server."; } } output { leaf return-message { type string; description "Response message from the server. If available, a language identifier should be included in the message."; reference "BCP 18 (RFC 2277) IETF Policy on Character Sets and Languages, Section 4.2"; } } } // rpc delete-address-lease rpc delete-prefix-lease { nacm:default-deny-all; if-feature prefix-delegation; description "Deletes a client's active prefix lease from the server's lease database. Note that this will not cause the prefix to be revoked from the client, and the lease may be refreshed or renewed by the client."; input { leaf lease-prefix-to-delete { type leafref { path "/dhcpv6-server/allocation-ranges/allocation-range/prefix-pools/prefix-pool/active-leases/active-lease/leased-prefix"; } mandatory true; description "IPv6 prefix of an active lease that will be deleted from the server."; } } output { leaf return-message { type string; description "Response message from the server. If available, a language identifier should be included in the message."; reference "BCP 18 (RFC 2277) IETF Policy on Character Sets and Languages, Section 4.2"; } } } // rpc delete-prefix-lease notification address-pool-utilization-threshold-exceeded { if-feature na-assignment; description "Notification sent when the address pool utilization exceeds the threshold configured in max-address-utilization."; leaf pool-id { type leafref { path "/dhcpv6-server/allocation-ranges/allocation-range/address-pools/address-pool/pool-id"; } mandatory true; description "Leafref to the address pool that the notification is being generated for."; } leaf total-pool-addresses { type uint64; mandatory true; description "Total number of addresses in the pool (end-address minus start-address plus one)."; } leaf max-allocated-addresses { type uint64; mandatory true; description "Maximum number of addresses that can be simultaneously allocated from the pool. This value may be less than the count of total addresses. Calculated as the max-address-utilization (percentage) of the total-pool-addresses and rounded up."; } leaf allocated-address-count { type uint64; mandatory true; description "Number of addresses allocated from the pool."; } } // notification address-pool-utilization-threshold-exceeded notification prefix-pool-utilization-threshold-exceeded { if-feature prefix-delegation; description "Notification sent when the prefix pool utilization exceeds the threshold configured in max-pd-space-utilization."; leaf pool-id { type leafref { path "/dhcpv6-server/allocation-ranges/allocation-range/prefix-pools/prefix-pool/pool-id"; } mandatory true; description "Unique identifier for the pool."; } leaf total-pool-prefixes { type uint64; mandatory true; description "Total number of prefixes in the pool."; } leaf max-allocated-prefixes { type uint64; mandatory true; description "Maximum number of prefixes that can be simultaneously allocated from the pool. This value may be less than the count of total prefixes. Calculated as the max-prefix-utilization (percentage) of the total-pool-prefixes and rounded up."; } leaf allocated-prefixes-count { type uint64; mandatory true; description "Number of prefixes allocated from the pool."; } } // notification prefix-pool-utilization-threshold-exceeded notification invalid-client-detected { description "Notification sent when the server detects an invalid client."; leaf message-type { type enumeration { enum "solicit" { value 0; description "Solicit (1) message."; } enum "request" { value 1; description "Request (3) message."; } enum "confirm" { value 2; description "Confirm (4) message."; } enum "renew" { value 3; description "Renew (5) message."; } enum "rebind" { value 4; description "Rebind (6) message."; } enum "release" { value 5; description "Release (8) message."; } enum "decline" { value 6; description "Decline (9) message."; } enum "info-request" { value 7; description "Information request (11) message."; } } description "The message type received by the server that has caused the error."; } leaf duid { type dhc6:duid; description "Client DUID."; } leaf description { type string; description "Description of the event (e.g., an error code or log message)."; } } // notification invalid-client-detected notification decline-received { if-feature na-assignment; description "Notification sent when the server has received a Decline (9) message from a client."; leaf duid { type dhc6:duid; description "Client DUID."; } list declined-resources { description "List of declined addresses and/or prefixes."; choice resource-type { description "Type of resource that has been declined."; leaf address { type inet:ipv6-address; description "Address that has been declined."; } leaf prefix { type inet:ipv6-prefix; description "Prefix that has been declined."; } } // choice resource-type } // list declined-resources } // notification decline-received notification non-success-code-sent { description "Notification sent when the server responded to a client with a non-success status code."; leaf duid { type dhc6:duid; description "Client DUID."; } uses dhc6:status; } // notification non-success-code-sent } // module ietf-dhcpv6-server
© 2023 YumaWorks, Inc. All rights reserved.