ietf-dhcpv6-server

This YANG module defines components for the configuration and management of DHCPv6 servers. Copyright (c) 2022 IETF Trust and t...

  • Version: 2022-06-20

    ietf-dhcpv6-server@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";
    
        }
    
        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.";
              }
    
              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
    
              container auth-option {
                description
                  "OPTION_AUTH (11) Authentication Option.";
                leaf algorithm {
                  type uint8;
                  description
                    "The algorithm used in the authentication protocol.";
                }
    
                leaf rdm {
                  type uint8;
                  description
                    "The Replay Detection Method (RDM) used in this
    Authentication option.";
                }
    
                leaf replay-detection {
                  type uint64;
                  description
                    "The replay detection information for the RDM.";
                }
    
                choice protocol {
                  description
                    "The authentication protocol used in the option.  Protocol
    Namespace Values 1 (delayed authentication) and 2 (Delayed
    Authentication (Obsolete)) are not applicable and so are
    not modeled.";
                  leaf token-auth-information {
                    type binary;
                    description
                      "Protocol Namespace Value 0.  The authentication
    information, as specified by the protocol and
    algorithm used in this Authentication option.";
                  }
    
                  case rkap {
                    description
                      "Protocol Namespace Value 3.  The Reconfigure Key
    Authentication Protocol (RKAP) provides protection
    against misconfiguration of a client caused by a
    Reconfigure message sent by a malicious DHCP
    server.";
                    leaf datatype {
                      type uint8 {
                        range "1 .. 2";
                      }
                      description
                        "Type of data in the Value field carried in this
    option.
     1  Reconfigure key value (used in the Reply
        message).
     2  HMAC-MD5 digest of the message (used in
        the Reconfigure message).";
                    }
    
                    leaf auth-info-value {
                      type binary {
                        length "16";
                      }
                      description
                        "Data, as defined by the Type field.  A 16-octet
    field.";
                    }
                  }  // case rkap
                }  // choice protocol
              }  // container auth-option
    
              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
    
              container rapid-commit-option {
                presence
                  "Enable sending of this option";
                description
                  "OPTION_RAPID_COMMIT (14) Rapid Commit Option.";
              }  // container rapid-commit-option
    
              container vendor-specific-information-options {
                description
                  "OPTION_VENDOR_OPTS (17) Vendor-specific Information
    Option.";
                list vendor-specific-information-option {
                  key "enterprise-number";
                  description
                    "The Vendor-specific Information option allows for
    multiple instances in a single message.  Each list entry
    defines the contents of an instance of the option.";
                  leaf enterprise-number {
                    type uint32;
                    description
                      "The vendor's registered Enterprise Number, as
    maintained by IANA.";
                    reference
                      "IANA 'Private Enterprise Numbers' registry
                      <https://www.iana.org/assignments/enterprise-numbers>";
    
                  }
    
                  list vendor-option-data {
                    key "sub-option-code";
                    description
                      "Vendor options, interpreted by vendor-specific
    client/server functions.";
                    leaf sub-option-code {
                      type uint16;
                      description
                        "The code for the sub-option.";
                    }
    
                    leaf sub-option-data {
                      type binary;
                      description
                        "The data area for the sub-option.";
                    }
                  }  // list vendor-option-data
                }  // list vendor-specific-information-option
              }  // container vendor-specific-information-options
    
              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
    
              container reconfigure-accept-option {
                presence
                  "Enable sending of this option";
                description
                  "OPTION_RECONF_ACCEPT (20) Reconfigure Accept Option.";
              }  // container reconfigure-accept-option
    
              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
    
              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
    
              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
    
              container sip-server-domain-name-list-option {
                description
                  "OPTION_SIP_SERVER_D (21) SIP Servers Domain Name List
    Option.";
                list sip-server {
                  key "sip-serv-id";
                  description
                    "SIP server information.";
                  leaf sip-serv-id {
                    type uint8;
                    description
                      "SIP server list identifier.";
                  }
    
                  leaf sip-serv-domain-name {
                    type inet:domain-name;
                    description
                      "SIP server domain name.";
                  }
                }  // list sip-server
              }  // container sip-server-domain-name-list-option
    
              container sip-server-address-list-option {
                description
                  "OPTION_SIP_SERVER_A (22) SIP Servers IPv6 Address List
    Option.";
                list sip-server {
                  key "sip-serv-id";
                  description
                    "SIP server information.";
                  leaf sip-serv-id {
                    type uint8;
                    description
                      "SIP server list entry identifier.";
                  }
    
                  leaf sip-serv-addr {
                    type inet:ipv6-address;
                    description
                      "SIP server IPv6 address.";
                  }
                }  // list sip-server
              }  // container sip-server-address-list-option
            }  // 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.";
            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";
    
            }
    
            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.";
              }
    
              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";
    
              }
    
              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.";
                  }
    
                  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";
    
                  }
    
                  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.";
                      }
    
                      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";
    
                      }
                    }  // 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.";
                      }
    
                      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";
    
                      }
    
                      container status {
                        description
                          "Status code information, relating to the success or failure
    of operations requested in messages.";
                        leaf code {
                          type uint16;
                          description
                            "The numeric code for the status encoded in this option.
    See the 'Status Codes' registry at
    <https://www.iana.org/assignments/dhcpv6-parameters>
    for the current list of status codes.";
                        }
    
                        leaf message {
                          type string;
                          description
                            "A UTF-8-encoded text string suitable for display to an
    end user.  It MUST NOT be null terminated.";
                        }
                      }  // container status
                    }  // 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.";
                  }
    
                  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";
    
                  }
    
                  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
    
                    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";
    
                    }
                  }  // 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.";
                      }
    
                      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";
    
                      }
    
                      container status {
                        description
                          "Status code information, relating to the success or failure
    of operations requested in messages.";
                        leaf code {
                          type uint16;
                          description
                            "The numeric code for the status encoded in this option.
    See the 'Status Codes' registry at
    <https://www.iana.org/assignments/dhcpv6-parameters>
    for the current list of status codes.";
                        }
    
                        leaf message {
                          type string;
                          description
                            "A UTF-8-encoded text string suitable for display to an
    end user.  It MUST NOT be null terminated.";
                        }
                      }  // container status
                    }  // list active-lease
                  }  // container active-leases
                }  // list prefix-pool
              }  // container prefix-pools
            }  // list allocation-range
    
            container statistics {
              description
                "DHCPv6 message counters for the server.";
              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.";
              }
            }  // 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.";
          }
    
          container status {
            description
              "Status code information, relating to the success or failure
    of operations requested in messages.";
            leaf code {
              type uint16;
              description
                "The numeric code for the status encoded in this option.
    See the 'Status Codes' registry at
    <https://www.iana.org/assignments/dhcpv6-parameters>
    for the current list of status codes.";
            }
    
            leaf message {
              type string;
              description
                "A UTF-8-encoded text string suitable for display to an
    end user.  It MUST NOT be null terminated.";
            }
          }  // container status
        }  // notification non-success-code-sent
      }  // module ietf-dhcpv6-server
    

© 2023 YumaWorks, Inc. All rights reserved.