idnits 2.17.1 draft-liu-dhc-dhcp-yang-model-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 38 instances of too long lines in the document, the longest one being 31 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 200 has weird spacing: '...address yan...' == Line 204 has weird spacing: '...tart-ip ine...' == Line 227 has weird spacing: '...up-name str...' == Line 488 has weird spacing: '... type inet:...' == Line 492 has weird spacing: '... type strin...' == (8 more instances...) == The document doesn't use any RFC 2119 keywords, yet has text resembling RFC 2119 boilerplate text. -- The document date (March 7, 2017) is 2601 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'RFC6241' is mentioned on line 86, but not defined == Unused Reference: 'RFC2131' is defined on line 929, but no explicit reference was found in the text == Unused Reference: 'RFC2629' is defined on line 933, but no explicit reference was found in the text == Unused Reference: 'RFC6021' is defined on line 942, but no explicit reference was found in the text == Unused Reference: 'RFC7950' is defined on line 946, but no explicit reference was found in the text ** Obsolete normative reference: RFC 2629 (Obsoleted by RFC 7749) ** Obsolete normative reference: RFC 6021 (Obsoleted by RFC 6991) Summary: 3 errors (**), 0 flaws (~~), 13 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Internet Engineering Task Force B. Liu, Ed. 2 Internet Draft K. Lou 3 Intended status: Standards Track Huawei Technologies 4 Expires: September 2017 C. Chen 5 Ericsson 6 March 7, 2017 8 Yang Data Model for DHCP Protocol 9 draft-liu-dhc-dhcp-yang-model-06.txt 11 Abstract 13 This document defines a YANG data model for DHCP Server, relay, and 14 client, including configuration and running state. 16 Status of this Memo 18 This Internet-Draft is submitted in full conformance with the provisions 19 of BCP 78 and BCP 79. 21 Internet-Drafts are working documents of the Internet Engineering Task 22 Force (IETF), its areas, and its working groups. Note that other groups 23 may also distribute working documents as Internet-Drafts. 25 Internet-Drafts are draft documents valid for a maximum of six months 26 and may be updated, replaced, or obsoleted by other documents at any 27 time. It is inappropriate to use Internet-Drafts as reference material 28 or to cite them other than as "work in progress." 30 The list of current Internet-Drafts can be accessed at 31 http://www.ietf.org/ietf/1id-abstracts.txt 33 The list of Internet-Draft Shadow Directories can be accessed at 34 http://www.ietf.org/shadow.html 36 This Internet-Draft will expire on September 7, 2017. 38 Copyright Notice 40 Copyright (c) 2017 IETF Trust and the persons identified as the document 41 authors. All rights reserved. 43 This document is subject to BCP 78 and the IETF Trust's Legal Provisions 44 Relating to IETF Documents (http://trustee.ietf.org/license-info) in 45 effect on the date of publication of this document. Please review these 46 documents carefully, as they describe your rights and restrictions with 47 respect to this document. Code Components extracted from this document 48 must include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction ................................................ 2 55 1.1. Terminology ............................................ 2 56 1.2. Tree Diagrams .......................................... 3 57 2. Design of Data Model......................................... 3 58 2.1. Overview ............................................... 3 59 2.2. DHCP Server ............................................ 4 60 2.3. DHCP Relay ............................................. 5 61 2.4. DHCP Client ............................................ 6 62 2.5. DHCP State ............................................. 6 63 3. DHCP YANG Module ............................................ 8 64 4. Security Considerations ..................................... 20 65 5. Contributors ............................................... 20 66 6. IANA Considerations ........................................ 20 67 7. Normative References........................................ 20 69 1. Introduction 71 This document defines a YANG [RFC6020] data model that can be used to 72 configure and manage DHCP. 74 This data model includes configuration data and state data, in which 75 DHCP server, replay, and client nodes are defined. 77 1.1. Terminology 79 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 80 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 81 "OPTIONAL" in this document are to be interpreted as described in BCP 14 82 [RFC2119]. 84 The following terms are used within this document: 86 The following terms are defined in [RFC6241] and are not redefined here: 88 o client 90 o configuration data 92 o server 93 o state data 95 The following terms are defined in [RFC6020] and are not redefined here: 97 o augment 99 o data model 101 o data node 103 o presence container 105 1.2. Tree Diagrams 107 A simplified graphical representation of the data model is used in this 108 document. The meaning of the symbols in these diagrams is as follows: 110 o Brackets "[" and "]" enclose list keys. 112 o Abbreviations before data node names: "rw" means configuration (read- 113 write), and "ro" means state data (read-only). 115 o Symbols after data node names: "?" means an optional node, "!" means 116 a presence container, and "*" denotes a list and leaf-list. 118 o Parentheses enclose choice and case nodes, and case nodes are also 119 marked with a colon (":"). 121 o Ellipsis ("...") stands for contents of subtrees that are not shown. 123 2. Design of Data Model 125 The goal of this document is to define a data model that provides a 126 common user interface to the DHCP protocol. There is very information 127 that is designated as "mandatory", providing freedom for vendors to 128 adapt this data model to their respective product implementations. 130 2.1. Overview 132 The overall structure of the model is described as the following. 134 module: ietf-dhcp 135 +--rw dhcp 136 | +--rw server 137 | | ... 138 | | ... 139 | +--rw relay 140 | | ... 141 | | ... 142 | +--rw client 143 | | ... 144 | | ... 145 +--ro dhcp-state 146 +--ro server 147 | ... 148 | ... 149 +--ro relay 150 | ... 151 | ... 152 +--ro client 153 ... 154 ... 156 Furthermore, design three if-feature for deployment of DHCP 157 server/relay/client as below: 158 feature dhcp-server { 159 description "Feature DHCP server"; 160 } 162 feature dhcp-client { 163 description "Feature DHCP client"; 164 } 166 feature dhcp-relay { 167 description "Feature DHCP relay"; 168 } 170 2.2. DHCP Server 172 Server configurations contain lease time, ping packet, IP address 173 pool and option configuration. 175 The most important part is the IP pool configuration. Specifying IP 176 address section is for dynamic allocation. Configuring the mapping 177 between IP address and MAC address is for manual allocation. 179 module: ietf-dhcp 180 +--rw dchp 181 +--rw server 182 +--rw lease-time? uint32 183 +--rw ping-packet-number? uint8 184 +--rw ping-packet-timeout? uint16 185 +--rw option 186 | +--rw dhcp-server-identifier? inet:ip-address 187 | +--rw domain-name? string 188 | +--rw domain-name-server? inet:ip-address 189 | +--rw interface-mtu? uint32 190 | +--rw netbios-name-server? inet:ip-address 191 | +--rw netbios-node-type? uint32 192 | +--rw netbios-scope? string 193 +--rw dhcp-ip-pool* [ip-pool-name] 194 +--rw ip-pool-name string 195 +--rw interface? if:interface-ref 196 +--rw gateway-ip? inet:ip-address 197 +--rw gateway-mask? inet:ip-prefix 198 +--rw lease-time? uint32 199 +--rw manual-allocation* [mac-address ip-address] 200 | +--rw mac-address yang:mac-address 201 | +--rw ip-address inet:ip-address 202 +--rw section* [section-index] 203 | +--rw section-index uint16 204 | +--rw section-start-ip inet:ipv4-address 205 | +--rw section-end-ip? inet:ipv4-address 206 +--rw option 207 +--rw dhcp-server-identifier? inet:ip-address 208 +--rw domain-name? string 209 +--rw domain-name-server? inet:ip-address 210 +--rw interface-mtu? uint32 211 +--rw netbios-name-server? inet:ip-address 212 +--rw netbios-node-type? uint32 213 +--rw netbios-scope? string 215 2.3. DHCP Relay 217 The relay function is configured per interface. Enable/disable relay 218 functionality on a specific interface, and specify the DHCP server. 220 module: ietf-dhcp 221 +--rw dchp 222 +--rw server 223 ... 224 ... 225 +--rw relay 226 +--rw server-group* [server-group-name] 227 +--rw server-group-name string 228 +--rw interface? if:interface-ref 229 +--rw gateway-address? inet:ipv4-address 230 +--rw server-address* inet:ipv4-address 232 2.4. DHCP Client 234 DHCP client is also managed per interface, including enable/disable 235 client DHCP client function, client id and lease time. 237 module: ietf-dhcp 238 +--rw dchp 239 +--rw server 240 ... 241 ... 242 +--rw relay 243 ... 244 ... 245 +--rw client 246 +--rw interfaces* [interface] 247 +--rw interface? if:interface-ref 248 +--rw client-id? string 249 +--rw lease? uint32 251 2.5. DHCP State 253 The " dhcp-state" records the package statistic information and host 254 allocated status, including server, relay and client. 256 module: ietf-dhcp 257 +--rw dhcp 258 +--rw server 259 ... 260 ... 261 +--rw relay 262 ... 263 ... 264 +--rw client 265 ... 266 ... 267 +--ro dhcp-state 268 +--ro server {server}? 269 | +--ro packet-statistics 270 | | +--ro interface? if:interface-state-ref 271 | | +--ro receive 272 | | | +--ro decline-packet? uint32 273 | | | +--ro discover-packet? uint32 274 | | | +--ro request-packet? uint32 275 | | | +--ro release-packet? uint32 276 | | | +--ro inform-packet? uint32 277 | | +--ro send 278 | | +--ro offer-packet? uint32 279 | | +--ro ack-packet? uint32 280 | | +--ro nack-packet? uint32 281 | +--ro host 282 | | +--ro interface? string 283 | | +--ro host-ip? string 284 | | +--ro host-hardware-address? string 285 | | +--ro lease? uint32 286 | | +--ro type? allocate-type 287 | +--ro ip-pool* [ip-pool-name] 288 | +--ro ip-pool-name string 289 | +--ro gateway-ip? inet:ip-address 290 | +--ro gateway-mask? inet:ip-prefix 291 | +--ro used-ip-count? uint32 292 | +--ro idle-ip-count? uint32 293 | +--ro conflict-ip-count? uint32 294 | +--ro total-ip-count? uint32 295 +--ro relay {relay}? 296 | +--ro packet-statistics 297 | +--ro interface? if:interface-state-ref 298 | +--ro receive 299 | | +--ro offer-packet? uint32 300 | | +--ro ack-packet? uint32 301 | | +--ro nack-packet? uint32 302 | | +--ro decline-packet? uint32 303 | | +--ro discover-packet? uint32 304 | | +--ro request-packet? uint32 305 | | +--ro release-packet? uint32 306 | | +--ro inform-packet? uint32 307 | +--ro send 308 | +--ro offer-packet? uint32 309 | +--ro ack-packet? uint32 310 | +--ro nack-packet? uint32 311 | +--ro decline-packet? uint32 312 | +--ro discover-packet? uint32 313 | +--ro request-packet? uint32 314 | +--ro release-packet? uint32 315 | +--ro inform-packet? uint32 316 +--ro client {client}? 317 +--ro packet-statistics 318 +--ro interface? if:interface-state-ref 319 +--ro receive 320 | +--ro offer-packet? uint32 321 | +--ro ack-packet? uint32 322 | +--ro nack-packet? uint32 323 +--ro send 324 +--ro decline-packet? uint32 325 +--ro discover-packet? uint32 326 +--ro request-packet? uint32 327 +--ro release-packet? uint32 328 +--ro inform-packet? uint32 330 2.6. DHCP RPC 332 The " dhcp-rpc" is designed to clean the packet statistics on 333 server/relay/client node. 335 rpcs: 336 +---x clean-server-statistics {dhcp-server}? 337 | +---w input 338 | | +---w interface? -> /dhcp-state/server/packet-statistics/interface 339 | | +---w clean-at? yang:date-and-time 340 | +--ro output 341 | +--ro clean-finished-at? yang:date-and-time 342 +---x clean-relay-statistics {dhcp-relay}? 343 | +---w input 344 | | +---w interface? -> /dhcp-state/relay/packet-statistics/interface 345 | | +---w clean-at? yang:date-and-time 346 | +--ro output 347 | +--ro clean-finished-at? yang:date-and-time 348 +---x clean-client-statistics {dhcp-client}? 349 +---w input 350 | +---w interface? -> /dhcp-state/client/packet-statistics/interface 351 | +---w clean-at? yang:date-and-time 352 +--ro output 353 +--ro clean-finished-at? yang:date-and-time 355 3. DHCP YANG Module 357 file "ietf-dhcp@2017-03-02.yang" 358 module ietf-dhcp { 359 namespace "urn:ietf:params:xml:ns:yang:ietf-dhcp"; 360 prefix "dhcp"; 362 import ietf-inet-types { 363 prefix "inet"; 364 } 365 import ietf-yang-types { 366 prefix "yang"; 367 } 368 import ietf-interfaces { 369 prefix "if"; 370 } 372 organization "IETF dhc (Dynamic Host Configuration Protocol) 373 Working Group"; 374 contact "leo.liubing@huawei.com 375 loukunkun@huawei.com 376 chin.chen@ericsson.com"; 377 description "The module for implementing DHCP protocol"; 379 revision 2017-03-02 { 380 description "initial draft revision"; 381 reference "rfc2131 rfc6020"; 382 } 384 /*--------------------*/ 385 /* Features */ 386 /*--------------------*/ 387 feature dhcp-server { 388 description "Feature DHCP server"; 389 } 391 feature dhcp-client { 392 description "Feature DHCP client"; 393 } 395 feature dhcp-relay { 396 description "Feature DHCP relay"; 397 } 399 /*--------------------*/ 400 /* Types Defination */ 401 /*--------------------*/ 402 typedef allocate-type { 403 type enumeration { 404 enum automatic { 405 description 406 "DHCP assigns a permanent IP address to a client"; 407 } 408 enum dynamic { 409 description 410 "DHCP assigns an IP address to a client 411 for a limited period of time"; 412 } 413 enum manual { 414 description 415 "a client's IP address is assigned by the 416 network administrator, and DHCP is used 417 simply to convey the assigned address to the client"; 418 } 419 } 420 description "Mechanisms for IP address allocation"; 421 } 423 /*--------------------*/ 424 /* Groupings */ 425 /*--------------------*/ 426 grouping server-packet { 427 description "The packets are sent from server "; 429 leaf offer-packet { 430 type uint32; 431 config "false"; 432 description "Total number of DHCPOFFER packets"; 433 } 434 leaf ack-packet { 435 type uint32; 436 config "false"; 437 description "Total number of DHCPACK packets"; 438 } 439 leaf nack-packet { 440 type uint32; 441 config "false"; 442 description "Total number of DHCPNAK packets"; 443 } 444 } 446 grouping client-packet { 447 description "The packets are sent from client "; 449 leaf decline-packet { 450 type uint32; 451 config "false"; 452 description "Total number of DHCPDECLINE packets"; 453 } 454 leaf discover-packet { 455 type uint32; 456 config "false"; 457 description "Total number of DHCPDISCOVER packets"; 458 } 459 leaf request-packet { 460 type uint32; 461 config "false"; 462 description "Total number of DHCPREQUEST packets"; 463 } 464 leaf release-packet { 465 type uint32; 466 config "false"; 467 description "Total number of DHCPRELEASE packets"; 468 } 469 leaf inform-packet { 470 type uint32; 471 config "false"; 472 description "Total number of DHCPINFORM packets"; 473 } 474 } 476 grouping sum-packet { 477 description "All of commnicated packets between server and client"; 479 uses server-packet; 481 uses client-packet; 482 } 484 grouping dhcp-option { 485 description "Configuration option"; 487 leaf dhcp-server-identifier { 488 type inet:ip-address; 489 description "DHCP server identifier"; 490 } 491 leaf domain-name { 492 type string; 493 description "Name of the domain"; 494 } 495 leaf domain-name-server { 496 type inet:ip-address; 497 description "IPv4 address of the domain"; 498 } 499 leaf interface-mtu { 500 type uint32 { 501 range "0..65535"; 502 } 503 description "Minimum Transmission Unit (MTU) of the interface"; 504 } 505 leaf netbios-name-server { 506 type inet:ip-address; 507 description "NETBIOS name server"; 508 } 509 leaf netbios-node-type { 510 type uint32 { 511 range "0..65535"; 512 } 513 description "NETBIOS node type"; 514 } 515 leaf netbios-scope { 516 type string; 517 description "NETBIOS scope"; 518 } 519 } 521 /*--------------------*/ 522 /* Configuration Data */ 523 /*--------------------*/ 524 container dhcp { 525 description 526 "DHCP configuration"; 527 container server { 528 if-feature dhcp-server; 529 description 530 "DHCP server configuration"; 531 leaf lease-time { 532 type uint32{ 533 range "180..31536000"; 534 } 535 description 536 "Default network address lease time assigned to DHCP clients"; 537 } 538 leaf ping-packet-number{ 539 type uint8 { 540 range "0..10"; 541 } 542 default "0"; 543 description "Number of ping packets"; 544 } 545 leaf ping-packet-timeout { 546 type uint16 { 547 range "0..10000"; 548 } 549 default "500"; 550 description "Timeout of ping packet"; 551 } 552 container option { 553 description "Configuration option"; 554 uses dhcp-option; 555 } 556 list dhcp-ip-pool { 557 key "ip-pool-name"; 558 description "Global IP pool configuration"; 560 leaf ip-pool-name { 561 type string { 562 length "1..64"; 563 } 564 description "Name of the IP pool"; 565 } 566 leaf interface { 567 type if:interface-ref; 568 description 569 "Name of the interface"; 570 } 571 leaf gateway-ip { 572 type inet:ip-address; 573 description "IPv4 address of the gateway"; 574 } 575 leaf gateway-mask { 576 type inet:ip-prefix; 577 description "Network submask of the gateway"; 578 } 579 leaf lease-time { 580 type uint32 { 581 range "180..31536000"; 582 } 583 description 584 "Default network address lease time assigned to DHCP clients"; 585 } 586 list manual-allocation { 587 key "mac-address ip-address"; 588 description "Mapping from MAC address to IP address"; 590 leaf mac-address { 591 type yang:mac-address; 592 description "MAC address of the host"; 593 } 594 leaf ip-address { 595 type inet:ip-address; 596 description "IPv4 address of the host"; 597 } 598 } 599 list section { 600 key "section-index"; 601 description "IPv4 address for the range"; 602 leaf section-index { 603 type uint16 { 604 range "0..255"; 605 } 606 description "Index of IPv4 address range"; 607 } 608 leaf section-start-ip { 609 type inet:ipv4-address; 610 mandatory "true"; 611 description "Starting IPv4 Address of a section"; 612 } 613 leaf section-end-ip { 614 type inet:ipv4-address; 615 description "Last IPv4 Address of a section"; 616 } 617 } 618 container option { 619 description "Configuration option"; 620 uses dhcp-option; 621 } 622 } 623 } 624 container relay { 625 if-feature dhcp-relay; 626 description "DHCP relay agent configuration"; 628 list server-group { 629 key "server-group-name"; 630 description 631 "DHCP server group configuration that DHCP relays to"; 632 leaf server-group-name { 633 type string; 634 description "Name of a DHCP server group"; 635 } 636 leaf interface { 637 type if:interface-ref; 638 description "Name of the interface"; 639 } 640 leaf gateway-address { 641 type inet:ipv4-address; 642 description "IPv4 address of the gateway"; 643 } 644 leaf-list server-address { 645 type inet:ipv4-address; 646 description "IPv4 address of the server"; 647 } 648 } 649 } 650 container client { 651 if-feature dhcp-client; 652 description "DHCP client configuration"; 654 list interfaces { 655 key "interface"; 656 description "Interface configuration"; 658 leaf interface { 659 type if:interface-ref; 660 description "Name of the interface"; 661 } 662 leaf client-id { 663 type string; 664 description "DHCP client identifier"; 665 } 666 leaf lease { 667 type uint32 { 668 range "1..4294967295"; 669 } 670 description "Default network address lease time assigned to DHCP clients"; 671 } 672 } 673 } 674 } 676 /*--------------------------*/ 677 /* Operational State Data */ 678 /*--------------------------*/ 679 container dhcp-state { 680 config "false"; 681 description "DHCP state data"; 683 container server { 684 if-feature dhcp-server; 685 description "DHCP server state data"; 687 container packet-statistics { 688 description "Packet statistics"; 690 leaf interface { 691 type if:interface-state-ref; 692 description "Name of the interface"; 693 } 695 container receive { 696 description "Number of received packets"; 697 uses client-packet; 698 } 699 container send { 700 description "Number of sent packets"; 702 uses server-packet; 703 } 704 } 705 container host { 706 description "Host status information"; 707 leaf interface { 708 type string; 709 config "false"; 710 description "Name of the interface"; 711 } 712 leaf host-ip { 713 type string; 714 config "false"; 715 description "IPv4 address of the host"; 716 } 717 leaf host-hardware-address { 718 type string; 719 config "false"; 720 description "MAC address of the host"; 721 } 722 leaf lease { 723 type uint32; 724 config "false"; 725 description "Default network address lease 726 time assigned to DHCP clients"; 727 } 728 leaf type { 729 type allocate-type; 730 config "false"; 731 description "Mechanisms for IP address allocation"; 732 } 733 } 734 list ip-pool { 735 key "ip-pool-name"; 736 description "Global IP pool configuration"; 738 leaf ip-pool-name { 739 type string { 740 length "1..64"; 741 } 742 description "Name of an IP pool"; 744 } 745 leaf gateway-ip { 746 type inet:ip-address; 747 description "IPv4 address of the gateway"; 748 } 749 leaf gateway-mask { 750 type inet:ip-prefix; 751 description "Network submask of the gateway"; 752 } 753 leaf used-ip-count { 754 type uint32; 755 config "false"; 756 description "Total number of used IPv4 addresses"; 757 } 758 leaf idle-ip-count { 759 type uint32; 760 config "false"; 761 description "Total number of idle IPv4 addresses"; 762 } 763 leaf conflict-ip-count { 764 type uint32; 765 config "false"; 766 description "Total number of conflict IPv4 addresses"; 767 } 768 leaf total-ip-count { 769 type uint32; 770 config "false"; 771 description "Total number of IPv4 addresses"; 772 } 773 } 774 } 775 container relay { 776 if-feature dhcp-relay; 777 description "DHCP reply agent state data"; 779 container packet-statistics { 780 description "Packet statistics"; 782 leaf interface { 783 type if:interface-state-ref; 784 description "Name of the interface"; 785 } 787 container receive { 788 description "Number of received packets"; 790 uses sum-packet; 792 } 793 container send { 794 description 795 "Number of sent packets"; 797 uses sum-packet; 798 } 799 } 800 } 801 container client { 802 if-feature dhcp-client; 803 description "DHCP client state data"; 805 container packet-statistics { 806 description "Packet statistics"; 808 leaf interface { 809 type if:interface-state-ref; 810 description "Name of the interface"; 811 } 813 container receive { 814 description "Number of received packets"; 816 uses server-packet; 817 } 818 container send { 819 description "Number of sent packets"; 821 uses client-packet; 822 } 823 } 824 } 825 } 827 /*--------------------------*/ 828 /* Define RPC for action */ 829 /*--------------------------*/ 830 rpc clean-server-statistics { 831 if-feature dhcp-server; 832 description "Clean server packet statistics"; 833 input { 834 leaf interface { 835 type leafref { 836 path "/dhcp:dhcp-state/dhcp:server/"+ 837 "dhcp:packet-statistics/dhcp:interface"; 838 } 839 description "Name of the interface"; 840 } 841 leaf clean-at { 842 type yang:date-and-time; 843 description "The start time to clean packet statistics"; 844 } 845 } 846 output { 847 leaf clean-finished-at { 848 type yang:date-and-time; 849 description "The finish time to clean packet statistics"; 850 } 851 } 852 } 854 rpc clean-relay-statistics { 855 if-feature dhcp-relay; 856 description "Clean relay packet statistics"; 857 input { 858 leaf interface { 859 type leafref { 860 path "/dhcp:dhcp-state/dhcp:relay/"+ 861 "dhcp:packet-statistics/dhcp:interface"; 862 } 863 description "Name of the interface"; 864 } 865 leaf clean-at { 866 type yang:date-and-time; 867 description "The start time to clean packet statistics"; 868 } 870 } 871 output { 872 leaf clean-finished-at { 873 type yang:date-and-time; 874 description "The finish time to clean packet statistics"; 875 } 876 } 877 } 879 rpc clean-client-statistics { 880 if-feature dhcp-client; 881 description "Clean client packet statistics"; 882 input { 883 leaf interface { 884 type leafref { 885 path "/dhcp:dhcp-state/dhcp:client/"+ 886 "dhcp:packet-statistics/dhcp:interface"; 887 } 888 description "Name of the interface"; 889 } 890 leaf clean-at { 891 type yang:date-and-time; 892 description "The start time to clean packet statistics"; 893 } 895 } 896 output { 897 leaf clean-finished-at { 898 type yang:date-and-time; 899 description "The finish time to clean packet statistics"; 900 } 901 } 902 } 903 } 904 906 4. Security Considerations 908 The data model defined does not create any security implications. 910 5. Contributors 912 The following people all contributed significantly to the initial 914 YANG model: 916 - Gang Yan (Huawei) 918 - Hongying Sheng (Ericsson) 920 6. IANA Considerations 922 This draft does not request any IANA action. 924 7. Normative References 926 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 927 Requirement Levels", BCP 14, RFC 2119, March 1997. 929 [RFC2131] Droms, R., "Dynamic Host Configuration Protocol", RFC 2131, 930 DOI 10.17487/RFC2131, March 1997, . 933 [RFC2629] Rose, M., "Writing I-Ds and RFCs using XML", RFC 2629, DOI 934 10.17487/RFC2629, June 1999, . 937 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for the 938 Network Configuration Protocol (NETCONF)", RFC 6020, DOI 939 10.17487/RFC6020, October 2010, . 942 [RFC6021] Schoenwaelder, J., Ed., "Common YANG Data Types", RFC 6021, 943 DOI 10.17487/RFC6021, October 2010, . 946 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", RFC 947 7950, DOI 10.17487/RFC7950, September 2016, . 950 Authors' Addresses 952 Bing Liu 953 Huawei Technologies 954 Q14, Huawei Campus, No.156 Beiqing Road 955 Hai-Dian District, Beijing, 100095 956 P.R. China 958 Email: leo.liubing@huawei.com 960 Kunkun Lou 961 Huawei Technologies 962 Huawei Nanjing R&D Center 963 101 Software Avenue, Yuhua District, Nanjing, Jiangsu, 210012 964 P.R. China 966 Email: loukunkun@huawei.com 968 Chin Chen 969 Ericsson (China) Communications Company Ltd. 970 Ericsson Tower, No. 5 Lize East Street, 971 Chaoyang District Beijing 100102, P.R. China 973 Email: chin.chen@ericsson.com