[Docs] [txt|pdf|xml|html] [Tracker] [Email] [Diff1] [Diff2] [Nits]

Versions: 00 01 02 03 04 05 06 07

Internet Engineering Task Force                              B. Liu, Ed.
Internet-Draft                                                    K. Lou
Intended status: Standards Track                     Huawei Technologies
Expires: June 25, 2016                                 December 23, 2015


                A YANG Data Model for DHCP Configuration
                    draft-liu-dhc-dhcp-yang-model-04

Abstract

   This document defines a YANG data model for configuring DHCP Server,
   relay, and client.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on June 25, 2016.

Copyright Notice

   Copyright (c) 2015 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.






Liu, Ed. & Lou            Expires June 25, 2016                 [Page 1]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Requirements Language and Terminology . . . . . . . . . . . .   2
   3.  DHCP YANG Model Overview  . . . . . . . . . . . . . . . . . .   2
     3.1.  DHCP Relay  . . . . . . . . . . . . . . . . . . . . . . .   5
     3.2.  DHCP Server . . . . . . . . . . . . . . . . . . . . . . .   5
     3.3.  DHCP Client . . . . . . . . . . . . . . . . . . . . . . .   6
   4.  DHCP YANG Module  . . . . . . . . . . . . . . . . . . . . . .   6
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .  21
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  21
   7.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  21
   8.  Normative References  . . . . . . . . . . . . . . . . . . . .  21
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  22

1.  Introduction

   This document defines a YANG [RFC6020] [RFC6021] data model for
   configuring DHCP Server, relay, and client.

   This model is constructed based on IPv4 version of DHCP[RFC2131].
   This model contains three roles of a DHCP system: DHCP server, DHCP
   relay and DHCP client.  A device could be one of the roles, or a
   combination of two or three roles.  When a device is configured
   multiple roles, the roles are indenpendent with each other.  In other
   words, this model is only a container for the roles, there is no
   intrinsic relationship between the roles.

2.  Requirements Language and Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in
   [RFC2119] when they appear in ALL CAPS.  When these words are not in
   ALL CAPS (such as "should" or "Should"), they have their usual
   English meanings, and are not to be interpreted as [RFC2119] key
   words.

   Terminology:

   o  DHCP: Dynamic Host Configuration Protocol [RFC2131]

3.  DHCP YANG Model Overview

   The overall structure of the model is dicpicted as the following.

   module: ietf-dhcp
   +--dhcp



Liu, Ed. & Lou            Expires June 25, 2016                 [Page 2]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


      +--relay
      |  +--rw dhcpRelayIfCfgs
      |  |  +--rw dhcpRelayIfCfg* [ifName]
      |  |     +--rw ifName                     string
      |  |     +--rw enable                     boolean
      |  |     +--rw serverGroupName            string
      |  |     +--rw serverAddress              inet:ipv4-address
      |  +--rw dhcpRelayServerGroups
      |  |  +--rw dhcpRelayServerGroup* [serverGroupName]
      |  |     +--rw serverGroupName        string
      |  |     +--rw vpnName                if:interface-ref
      |  |     +--rw sourceIP               inet:ip-address
      |  |     +--rw gateway                inet:ip-address
      |  |     +--rw serverAddress          enum
      |  |     +--r dhcpRelaySerGrpStats
      |  |        +--r dhcpRelaySerGrpStat* [serverIpAddr]
      |  |           +--r serverIpAddr                inet:ipv4-address
      |  |           +--r pktsReceiveFromClient       uint32
      |  |           +--r discoverPktsReceive         uint32
      |  |           +--r requestPktsReceive          uint32
      |  |           +--r releasePktsReceive          uint32
      |  |           +--r informPktsRecevie           uint32
      |  |           +--r declinePktsReceive          uint32
      |  |           +--r pktsReceiveFromServers      uint32
      |  |           +--r offerPktsReceive            uint32
      |  |           +--r ackPktsReceive              uint32
      |  |           +--r nakPktsReceive              uint32
      |  |           +--r pktsSentToServers           uint32
      |  |           +--r pktsSentToClients           uint32
      |  |           +--r unicastPktsSentToClients    uint32
      |  |           +--r broadcastPktsSentToClients  uint32
      |  +--r dhcpRelayStatistics
      |     +--r badPacketsRecvd                uint32
      |     +--r packetsRecvdFromClient         uint32
      |     +--r discoverPacketsRecvd           uint32
      |     +--r requestPacketsRecvd            uint32
      |     +--r informPacketsRecvd             uint32
      |     +--r declinePacketsRecvd            uint32
      |     +--r releasePacketsRecvd            uint32
      |     +--r packetsRecvdFromServers        uint32
      |     +--r offerPacketsRecvd              uint32
      |     +--r ackPacketsRecvd                uint32
      |     +--r nakPacketsRecvd                uint32
      |     +--r packetsSentToServers           uint32
      |     +--r packetsSentToClients           uint32
      |     +--r unicastPacketsSentToClients    uint32
      |     +--r broadcastPacketsSentToClients  uint32
      |     +--r releasePacketsSentToServers    uint32



Liu, Ed. & Lou            Expires June 25, 2016                 [Page 3]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


      |     +--r sendRenewPacket                uint32
      |
      +--server
      |  +--rw common
      |  |  +--rw  pingPacketNumber  uint8
      |  |  +--rw  pingPacketTimeOut uint16
      |  +--rw globalIpPools
      |  |  +--rw globalIpPool*  [ipPoolName]
      |  |  |  +--rw ipPoolName     string
      |  |  |  +--rw vpnInstance    string
      |  |  |  +--rw gatewayIp
      |  |  |  +--rw gatewayIp    inet:ipv4-address
      |  |  |  +--rw gatewayMask  inet:ipv4-address
      |  |  +--rw sections
      |  |  |   +--rw section*  [sectionIndex]
      |  |  |     +--rw sectionIndex      uint16
      |  |  |     +--rw sectionStartIp    inet:ipv4-address
      |  |  |     +--rw sectionEndIp      inet:ipv4-address
      |  |  |     +--r ipPoolSectionStat
      |  |  |        +--r usedIpCount       uint32
      |  |  |        +--r idleIpCount       uint32
      |  |  |        +--r conflictIpCount   uint32
      |  |  |        +--r totalIpCount      uint32
      |  |  +--rw leaseTime
      |  |  |  +--rw day    uint16
      |  |  |  +--rw hour   uint8
      |  |  |  +--rw minute uint8
      |  |  +--rw domainNameServer  inet:ipv4-address
      |  |  +--rw domainName        string
      |  |  +--rw NbnsServer        inet:ipv4-address
      |  |  +--rw NbNodeType        enum
      |  |  +--rw UserDefOptions
      |  |  |  +--rw UserDefOptions*  [optionCode]
      |  |  |     +--rw optionCode    uint8
      |  |  |     +--rw ipAddress     inet:ipv4-address
      |  |  |     +--rw optionString  string
      |  |  |     +--rw optionHex     string
      |  |  +--r ipPoolStat
      |  |     +--r usedIpCount     uint32
      |  |     +--r idleIpCount     uint32
      |  |     +--r conflictIpCount uint32
      |  |     +--r totalIpCount    uint32
      |  +--r packetStatistics
      |     +--r clientRequestCount uint32
      |     +--r discoverCount      uint32
      |     +--r requestCount       uint32
      |     +--r declineCount       uint32
      |     +--r releaseCount       uint32



Liu, Ed. & Lou            Expires June 25, 2016                 [Page 4]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


      |     +--r informCount        uint32
      |     +--r serverReplyCount   uint32
      |     +--r offerCount         uint32
      |     +--r ackCount           uint32
      |     +--r nakCount           uint32
      |
      +--client
         +--rw dhcpClientIfs
            +--rw dhcpClientIf* [ifName]
            +--rw ifName  string
            +--rw enable  boolean
            +--r dhcpClientStatus
            |  +--r status            enum
            |  +--r clientIpAddr      inet:ipv4-address
            |  +--r dnsServerIpAddr   inet:ipv4-address
            +--r dhcpClientIfStatistics
               +--r discoverCount uint32
               +--r requestCount  uint32
               +--r declineCount  uint32
               +--r releaseCount  uint32
               +--r informCount   uint32
               +--r offerCount    uint32
               +--r ackCount      uint32
               +--r nakCount      uint32

3.1.  DHCP Relay

   The relay function is configured in a per interface manner.  Thus,
   there is a "dhcpRelayIfCfgs" container to list each interface's
   general relay configurations, which mainly include enable/disable of
   relay, servier address, and server group (see below).

   In some scenarios, there are multiple DHCP servers for high reliable,
   load balancing or other considerations.  The servers could combined
   as multiple groups, and each group is binding to a specific relay
   configuration (as decribed in above "dhcpRelayIfCfgs").  The groups
   are listed in the "dhcpRelayServerGroups" container.  The
   "dhcpRelaySerGrpStats" container records statistic information by
   each DHCP server IP address in the group.

   The "dhcpRelayStatistics" list records the statistic information of
   the whole relay entity.

3.2.  DHCP Server

   Server configurations contain common configurations, IP adderss pool
   configuration and statistic information.




Liu, Ed. & Lou            Expires June 25, 2016                 [Page 5]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


   Each time the DHCP server intends to allocate an IP adderss, it needs
   to confirm whether the address has been ocuppied or not through
   pinging.  The "common" container includes two parameters to control
   the packet number and timeout period respectively.

   The most important part of server configurations is the IP pool
   configuration.  Normally, the DNS configuration and some other option
   configuration are relevant to the IP pool where the allocated IP
   address comes from, so the option configuration is sorted under the
   IP pool container.  This model supports user defined options
   configuration through the "UserDefOptions" container.

3.3.  DHCP Client

   DHCP client is also managed in a per interface manner.  Except for
   enable/disable of client function, other objects are all status
   information.

4.  DHCP YANG Module

<CODE BEGINS> file "ietf-dhcp@2015-12-23.yang"
module ietf-dhcp {
  namespace "urn:ietf:params:xml:ns:yang:ietf-dhcp";
  prefix "dhcp";
  import ietf-inet-types {
    prefix "inet";
  }
  organization "IETF dhc (Dynamic Host Configuration Protocol)
                Working Group";
  contact
    "leo.liubing@huawei.com
     loukunkun@huawei.com";
  description "The module for implementing DHCP protocol";
  revision 2015-12-23 {
    description
    "version-03, minor grammar revision according to pyang validation.";
    reference
      "draft-liu-dhc-dhcp-yang-model-03";
  }

        container relay {
          description
            "This is a top level container for DHCP relay entity.
             It can have one or more relay configurations.";
          container dhcpRelayIfCfgs {
            description
              "This is relay configuration on a specific interface.";
            list dhcpRelayIfCfg {



Liu, Ed. & Lou            Expires June 25, 2016                 [Page 6]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


              key "ifName";
              description
                "Relay could be configured on different interfaces.";

                                leaf ifName {
                                        type "string";
                                        description "Specify the interface name that dhcp relay configured on";
                                }

                                leaf enable {
                                        type "boolean";
                                        default "false";
                                        description "Enable or disable dhcp relay function";
                                }

                                leaf serverGroupName {
                                        type "string";
                                        description "Server Group Name";
                                }

                                leaf-list serverAddress {
                                        type inet:ipv4-address;
                                        description "DHCP relay destination server IP address";
                                }

                        }

                }

                container dhcpRelayServerGroups {
                        description "Server Grouping is an important feature for carrier grade DHCP Servers.
                                     It is mostly for reliability consideration.";

                        list dhcpRelayServerGroup {

                                key "serverGroupName";

                                 description "DHCP relay server group ";

                                 leaf serverGroupName {
                                        type "string";

                                        description "name of server group";
                                }

                                leaf vpnName {
                                        type "string";




Liu, Ed. & Lou            Expires June 25, 2016                 [Page 7]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


                                        description "VPN name for server group";
                                }

                                leaf gateway {
                                        type inet:ipv4-address;

                                        description "gateway for server group";
                                }

                                leaf-list serverAddress {
                                        type inet:ipv4-address;

                                        description "DHCP relay destination server IP address";
                                }

                                container dhcpRelaySerGrpStats {
                                  description "DHCP relay server group packet statistics ";

                                        list dhcpRelaySerGrpStats {
                                            key "serverIpAddr";
                                            description "DHCP relay server group packet statistics ";
                                                    leaf serverIpAddr {
                                                    type inet:ipv4-address;
                                                    description "Server IP Address";
                                                }
                                                leaf pktsReceiveFromClient {
                                                    type "uint32";
                                                    config "false";
                                                    description "Packets count received from DHCP Client.";
                                                }
                                                leaf discoverPktsReceive {
                                                    type "uint32";
                                                    config "false";
                                                    description "Received Discovery packets count.";
                                                }
                                                leaf requestPktsReceive {
                                                    type "uint32";
                                                        config "false";
                                                        description "Received Request packets count.";
                                                }
                                                leaf releasePktsReceive {
                                                    type "uint32";
                                                        config "false";
                                                        description "Received Release packets count.";
                                                }
                                                leaf informPktsRecevie {
                                                    type "uint32";
                                                        config "false";



Liu, Ed. & Lou            Expires June 25, 2016                 [Page 8]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


                                                        description "Received Inform packets count.";
                                                }
                                                leaf declinePktsReceive {
                                                    type "uint32";
                                                        config "false";
                                                        description "Received Decline packets count.";
                                                }
                                                leaf pktsReceiveFromServers {
                                                    type "uint32";
                                                        config "false";
                                                        description "Count of all packets received from server.";
                                                }
                                                leaf offerPktsReceive {
                                                    type "uint32";
                                                        config "false";
                                                        description "Offer packets count.";
                                                }
                                                leaf ackPktsReceive {
                                                    type "uint32";
                                                        config "false";
                                                        description "Received Ack packets count.";
                                                }
                                                leaf nakPktsReceive {
                                                    type "uint32";
                                                        config "false";
                                                        description "Received Nak packets count.";
                                                }
                                                leaf pktsSentToServers {
                                                    type "uint32";
                                                        config "false";
                                                        description "Packets sent to DHCP Servers.";
                                                }
                                                leaf pktsSentToClients {
                                                    type "uint32";
                                                        config "false";
                                                        description "Packets sent to DHCP Clients.";
                                                }
                                                leaf unicastPktsSentToClients {
                                                    type "uint32";
                                                        config "false";
                                                        description "Unicast packets sent to DHCP Clients.";
                                                }
                                                leaf broadcastPktsSentToClients {
                                                    type "uint32";
                                                        config "false";
                                                        description "Broadcast packets sent to DHCP Clients.";
                                                }
                                        }



Liu, Ed. & Lou            Expires June 25, 2016                 [Page 9]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


                                }

                        }

                }

                container dhcpRelayStatistics {
                  description "This is the state data of the running situation of the relay devices/interfaces.";

                         leaf badPacketsRecvd {
                            type "uint32";
                                config "false";
                                description "Received bad packets count.";
                        }
                        leaf packetsRecvdFromClient {
                            type "uint32";
                                config "false";
                                description "Packets received from DHCP Client.";
                        }
                        leaf discoverPacketsRecvd {
                            type "uint32";
                                config "false";
                                description "Received Discovery packets count.";
                        }
                        leaf requestPacketsRecvd {
                            type "uint32";
                                config "false";
                                description "Received Request packets count.";
                        }
                        leaf informPacketsRecvd {
                            type "uint32";
                                config "false";
                                description "Received Inform packets count.";
                        }
                        leaf declinePacketsRecvd {
                            type "uint32";
                                config "false";
                                description "Received Decline packets count.";
                        }
                        leaf releasePacketsRecvd {
                            type "uint32";
                                config "false";
                                description "Received Release packets count.";
                        }
                        leaf packetsRecvdFromServers {
                            type "uint32";
                                config "false";
                                description "Packets received from DHCP Servers.";



Liu, Ed. & Lou            Expires June 25, 2016                [Page 10]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


                        }
                        leaf offerPacketsRecvd {
                            type "uint32";
                                config "false";
                                description "Received Offer packets count.";
                        }
                        leaf ackPacketsRecvd {
                            type "uint32";
                                config "false";
                                description "Received Ack packets count.";
                        }
                        leaf nakPacketsRecvd {
                            type "uint32";
                                config "false";
                                description "Received Nak packets count.";
                        }
                        leaf packetsSentToServers {
                            type "uint32";
                                config "false";
                                description "Packets sent to DHCP Servers.";
                        }
                        leaf packetsSentToClients {
                            type "uint32";
                                config "false";
                                description "Packets sent to DHCP Clients.";
                        }
                        leaf unicastPacketsSentToClients {
                            type "uint32";
                                config "false";
                                description "Unicast packets sent to DHCP Clients.";
                        }
                        leaf broadcastPacketsSentToClients {
                            type "uint32";
                                config "false";
                                description "Broadcast packets sent to DHCP Clients.";
                        }
                        leaf releasePacketsSentToServers {
                            type "uint32";
                                config "false";
                                description "Release packets sent to DHCP Servers.";
                        }
                        leaf sendRenewPacket {
                            type "uint32";
                                config "false";
                                description "Renew packets sent.";
                        }
                }




Liu, Ed. & Lou            Expires June 25, 2016                [Page 11]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


        }

        container server {
          description "This is the top level container. Server is configured parallel with Relay.";

                container common {
                  description "This is some basic configuration of DHCP Server.";

                         leaf pingPacketNumber{
                                type uint8 {
                                        range "0..10";
                                }

                                default "0";
                                description "Ping packet number";
                        }
                        leaf pingPacketTimeOut {
                                type uint16 {
                                        range "0..10000";
                                }

                                default "500";
                                description "Ping packet timeout";
                        }
                }

                container globalIpPool {
                  description "This is the global IP pool could be used by the DHCP Server.";

                        list globalIpPool {
                          key "ipPoolName";
                          description "Multiple global IP pools could be used by a single DHCP Server.";


                                leaf ipPoolName {
                                        type string {
                                                length "1..64";
                                        }

                                        description "IP pool name";
                                }
                                leaf vpnInstance {
                                        type string {
                                                length "1..31";
                                        }

                                        description "VPN name";
                                }



Liu, Ed. & Lou            Expires June 25, 2016                [Page 12]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


                                container gatewayIp {
                                  description "Gateway IP addresses.";
                                         leaf gatewayIp {
                                                type inet:ipv4-address;

                                                description "Gateway IP Address";
                                        }
                                        leaf gatewayMask {
                                                type inet:ipv4-address;

                                                description "Gateway IP Address Mask";
                                        }
                                }

                                container sections {
                                  description "An address pool could be contrusted by multiple address sections.";

                                        list section {
                                          key "sectionIndex";
                                          description "An address section.";

                                                leaf sectionIndex {
                                                        type uint16 {
                                                                range "0..255";
                                                        }

                                                        description "Section Index";

                                                }
                                                leaf sectionStartIp {
                                                        type inet:ipv4-address;

                                                        mandatory "true";
                                                        description "IP Address";
                                                }
                                                leaf sectionEndIp {

                                                        type inet:ipv4-address;
                                                        description "IP Address";
                                                }

                                                container ipPoolSectionStat {
                                                  description "Statistics of the usage of the address sections.";

                                                         leaf usedIpCount {
                                                                type uint32;
                                                                config "false";
                                                                description "Used Ip Count";



Liu, Ed. & Lou            Expires June 25, 2016                [Page 13]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


                                                        }
                                                        leaf idleIpCount {
                                                                type uint32;
                                                                config "false";
                                                                description "Idle Ip Count";
                                                        }
                                                        leaf conflictIpCount {
                                                                type uint32;
                                                                config "false";
                                                                description "Conflict Ip Count";
                                                        }
                                                        leaf totalIpCount {
                                                                type uint32;
                                                                config "false";
                                                                description "Total Ip Count";
                                                        }
                                                }

                                        }

                                }

                                container leaseTime {
                                    description "Specifies the lease time, option code is 51.";
                                         leaf day {
                                                type uint16 {
                                                        range "0..49710";
                                                }

                                                default "1";
                                                description "Day";
                                        }
                                        leaf hour {
                                                type uint8  {
                                                        range "0..23";
                                                }

                                                default "0";
                                                description "Hour";
                                        }
                                        leaf minute {
                                                type uint8 {
                                                        range "0..59";
                                                }

                                                default "0";
                                                description "Minute";
                                        }



Liu, Ed. & Lou            Expires June 25, 2016                [Page 14]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


                                }

                                leaf-list domainNameServer {
                                        type inet:ipv4-address;

                                        description "Specifies the domain name server, option code is 5.";
                                }

                                leaf domainName {
                                        type string {
                                                length "1..255";
                                        }

                                        description "Specifies the domain name, option code is 15.";
                                }

                                leaf-list NbnsServer {
                                        type inet:ipv4-address;

                                        description "Specifies the NetBIOS name server, option code is 44.";
                                }

                                leaf NbNodeType {
                                       type enumeration {
                                                enum B-node {
                                                        value "1";
                                                        description "NetBIOS node type B.";
                                                }
                                                enum P-node {
                                                        value "2";
                                                        description "NetBIOS node type P.";
                                                }
                                                enum M-node {
                                                    value "4";
                                                    description "NetBIOS node type M.";
                                                }
                                                enum H-node {
                                                    value "8";
                                                    description "NetBIOS node type H.";
                                                }
                                        }

                                        description "Specifies the NetBIOS node type, option code is 46.";
                                }

                            container UserDefOptions {
                              description "This model supports user defined DHCP options";




Liu, Ed. & Lou            Expires June 25, 2016                [Page 15]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


                                    list UserDefOption {
                                            key "optionCode";
                                            description "Specifieds the user defined DHCP options";

                                             leaf optionCode {
                                                    type uint8 {
                                                            range "2 | 4..5 | 7..14 | 16..43 | 47..49 | 56 | 62..81 | 83..254";
                                                    }

                                                    description "The option code of the user defined option";
                                            }

                                            leaf-list ipAddress {
                                                    type inet:ipv4-address;

                                                    description "IP address list";
                                            }

                                            leaf optionString {
                                                        type string {
                                                        length "1..254";
                                                }

                                                    description "User defined option string";
                                            }

                                            leaf optionHex {
                                                        type string {
                                                        length "2..508";
                                                }

                                                    description "User defined option HEX string";
                                            }

                                    }
                            }

                                container ipPoolStat {
                                  description "Statistics of the IP address pool.";

                                         leaf usedIpCount {
                                                type uint32;
                                                config "false";
                                                description "Used Ip Count";
                                        }
                                        leaf idleIpCount {
                                                type uint32;
                                                config "false";



Liu, Ed. & Lou            Expires June 25, 2016                [Page 16]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


                                                description "Idle Ip Count";
                                        }
                                        leaf conflictIpCount {
                                                type uint32;
                                                config "false";
                                                description "Conflict Ip Count";
                                        }
                                        leaf totalIpCount {
                                                type uint32;
                                                config "false";
                                                description "Total Ip Count";
                                        }
                                }

                        }

                }

                container packetStatistics {
                  description "Packet statistics.";

                         leaf clientRequestCount {
                                type uint32;
                                config "false";
                                description "Client Request Count";
                        }
                        leaf discoverCount {
                                type uint32;
                                config "false";
                                description "Discover Count";
                        }
                        leaf requestCount {
                                type uint32;
                                config "false";
                                description "Request Count";
                        }
                        leaf declineCount {
                                type uint32;
                                config "false";
                                description "Decline Count";
                        }
                        leaf releaseCount {
                                type uint32;
                                config "false";
                                description "Release Count";
                        }
                        leaf informCount {
                                type uint32;



Liu, Ed. & Lou            Expires June 25, 2016                [Page 17]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


                                config "false";
                                description "Inform Count";
                        }
                        leaf serverReplyCount {
                                type uint32;
                                config "false";
                                description "Server Reply Count";
                        }
                        leaf offerCount {
                                type uint32;
                                config "false";
                                description "Offer Count";
                        }
                        leaf ackCount {
                                type uint32;
                                config "false";
                                description "Ack Count";
                        }
                        leaf nakCount {
                                type uint32;
                                config "false";
                                description "Nak Count";
                        }
                }

        }

        container client {
          description "This is the top container. Client is configured in parallel with DHCP Relay and Server.";

                container dhcpClientIf {
                  description "Client is also configured per interface.";

                        list dhcpClientIf {
                          key "ifName";
                          description "Client configuration elements of one interface.";


                                leaf ifName {
                                        type "string";

                                        description "Specify the interface name that dhcp client configured on";
                                }

                                leaf enable {
                                        type "boolean";
                                        default "false";




Liu, Ed. & Lou            Expires June 25, 2016                [Page 18]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


                                        description "Enable or disable dhcp client function";
                                }

                                container dhcpClientStatus {

                                    description "Specify the status of DHCP client on the interface";

                                    leaf status {
                                            type enumeration {
                                                    enum Init {
                                                     description "Initial packets count.";
                                                    }
                                                    enum Discoverying {
                                                     description "Discovery packets count.";
                                                    }
                                                    enum Offered {
                                                     description "Offer packets count.";
                                                    }
                                                    enum Requesting {
                                                     description "Request packets count.";
                                                    }
                                                    enum Acked {
                                                     description "Ack packets count.";
                                                    }
                                                }
                                                config "false";
                                                description "Specify the status of DHCP client on the interface";
                                        }

                                    leaf clientIpAddr {
                                                type inet:ipv4-address;
                                                config "false";
                                                description "Specify the IP address obtained from DHCP server on the interface";
                                        }

                                        leaf-list dnsServerIpAddr {
                                                type inet:ipv4-address;
                                                config "false";
                                                description "Specify the DNS server IP address obtained from DHCP server on the interface";
                                    }

                                }

                                container dhcpClientIfStatistics {

                                        description "Specify the statistics of DHCP client send or receive packets on the interface";

                                    leaf discoverCount {



Liu, Ed. & Lou            Expires June 25, 2016                [Page 19]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


                                        type uint32;
                                        config "false";
                                        description "Discover Count";
                                }

                                        leaf requestCount {
                                                type uint32;
                                                config "false";
                                                description "Request Count";
                                        }

                                        leaf declineCount {
                                                type uint32;
                                                config "false";
                                                description "Decline Count";
                                        }

                                        leaf releaseCount {
                                                type uint32;
                                                config "false";
                                                description "Release Count";
                                        }

                                        leaf informCount {
                                                type uint32;
                                                config "false";
                                                description "Inform Count";
                                        }

                                    leaf offerCount {
                                                type uint32;
                                                config "false";
                                                description "Offer Count";
                                        }

                                        leaf ackCount {
                                                type uint32;
                                                config "false";
                                                description "Ack Count";
                                        }

                                        leaf nakCount {
                                                type uint32;
                                                config "false";
                                                description "Nak Count";
                                        }

                                }



Liu, Ed. & Lou            Expires June 25, 2016                [Page 20]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


                        }

                }

        }

}
<CODE ENDS>

5.  Security Considerations

   TBD.

6.  IANA Considerations

   TBD.

7.  Acknowledgements

   Valuable comment was received from Gang Yan and Guangying Zheng to
   improve the draft.

   This document was produced using the xml2rfc tool [RFC2629].

8.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <http://www.rfc-editor.org/info/rfc2119>.

   [RFC2131]  Droms, R., "Dynamic Host Configuration Protocol",
              RFC 2131, DOI 10.17487/RFC2131, March 1997,
              <http://www.rfc-editor.org/info/rfc2131>.

   [RFC2629]  Rose, M., "Writing I-Ds and RFCs using XML", RFC 2629,
              DOI 10.17487/RFC2629, June 1999,
              <http://www.rfc-editor.org/info/rfc2629>.

   [RFC6020]  Bjorklund, M., Ed., "YANG - A Data Modeling Language for
              the Network Configuration Protocol (NETCONF)", RFC 6020,
              DOI 10.17487/RFC6020, October 2010,
              <http://www.rfc-editor.org/info/rfc6020>.

   [RFC6021]  Schoenwaelder, J., Ed., "Common YANG Data Types",
              RFC 6021, DOI 10.17487/RFC6021, October 2010,
              <http://www.rfc-editor.org/info/rfc6021>.




Liu, Ed. & Lou            Expires June 25, 2016                [Page 21]


Internet-Draft           ietf DHCPv4 YANG Model            December 2015


Authors' Addresses

   Bing Liu
   Huawei Technologies
   Q14, Huawei Campus, No.156 Beiqing Road
   Hai-Dian District, Beijing, 100095
   P.R. China

   Email: leo.liubing@huawei.com


   Kunkun Lou
   Huawei Technologies
   Huawei Nanjing R&D Center
   101 Software Avenue, Yuhua District, Nanjing, Jiangsu, 210012
   P.R. China

   Email: loukunkun@huawei.com

































Liu, Ed. & Lou            Expires June 25, 2016                [Page 22]


Html markup produced by rfcmarkup 1.129d, available from https://tools.ietf.org/tools/rfcmarkup/