netconfcentral logo

ietf-dhcpv6-client@2018-09-04



  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";

    }


    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;
        }  // container 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 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 client-configured-options {
            description
              "client configured options";
            uses dhcpv6-options:client-option-definitions;
          }  // container client-configured-options
        }  // list client-if
      }  // container client-config

      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 if-other-params

        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";
          }
        }  // container packet-stats
      }  // container client-state
    }  // container client

    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" {
                value 0;
                description "allocate";
              }
              enum "rebind" {
                value 1;
                description "rebind";
              }
              enum "renew" {
                value 2;
                description "renew";
              }
              enum "release" {
                value 3;
                description "release";
              }
            }
            mandatory true;
            description "event type";
          }

          container duid {
            description "Sets the DUID";
            uses dhcpv6-types:duid;
          }  // container 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 ia-lease-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;
          }  // container 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 invalid-ia-detected

        container retransmission-failed {
          description
            "raised when the retransmission mechanism defined
          in [RFC3315] is failed.";
          container duid {
            description "Sets the DUID";
            uses dhcpv6-types:duid;
          }  // container duid

          leaf description {
            type enumeration {
              enum "MRC failed" {
                value 0;
                description "MRC failed";
              }
              enum "MRD failed" {
                value 1;
                description "MRD failed";
              }
            }
            mandatory true;
            description
              "description of failure";
          }
        }  // container retransmission-failed

        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;
          }  // container duid

          leaf status-code {
            type enumeration {
              enum "1" {
                value 0;
                description "UnspecFail";
              }
              enum "2" {
                value 1;
                description "NoAddrAvail";
              }
              enum "3" {
                value 2;
                description "NoBinding";
              }
              enum "4" {
                value 3;
                description "NotOnLink";
              }
              enum "5" {
                value 4;
                description "UseMulticast";
              }
            }
            mandatory true;
            description
              "employed status code";
          }
        }  // container failed-status-turn-up
      }  // container dhcpv6-client-event
    }  // notification notifications
  }  // module ietf-dhcpv6-client